Promote Fact Checker to active roster; declare dual operating mode#1254
Promote Fact Checker to active roster; declare dual operating mode#1254tamirdresher wants to merge 1 commit into
Conversation
Promotes the existing fact-checker agent (stub charter, never on roster) to a full team member with FAO-inspired charter, claim-verification methodology, and hard rules against fabrication or unverified claims. Adds the Pre-Ship Fact Check ceremony so any user-facing artifact gets a claim-by-claim verification pass before it ships. Updates identity/now.md (12 weeks stale from v0.9.1) to reflect: - Current v0.10.0 release status - Dual operating mode: Brady's upstream maintenance + Tamir's framework R&D (both sharing the same roster and decisions ledger) - The 7 governance/MCP findings from the 2026-06-09 investigation session (#1226, #1228, #1241-#1247) - Two new state-tool gaps discovered while writing the new now.md itself Rationale: the 2026-06-09 forged-audit-entry incident showed concretely why an explicit Verification + Devil's Advocate role matters. The team was already substantially staffed but lacked someone whose job is to challenge claims with evidence. Fact Checker is that role. Known gap NOT addressed here: Rai (RAI Reviewer) is required by squad.agent.md but missing from this team's roster. The .squad/agents/Rai directory exists. This is migration drift from the team predating Rai; should be addressed in a separate PR for Brady's review. No code changes. Only static team config + one new charter. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🟢 Impact Analysis — PR #1254Risk tier: 🟢 LOW 📊 Summary
🎯 Risk Factors
📦 Modules Affectedsquad-state (5 files)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ✅ | Single commit | 1 commit — clean history |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | No Copilot review threads |
| ❌ | CI passing | 4 check(s) still running |
Files Changed (5 files, +180 −111)
| File | +/− |
|---|---|
.squad/agents/fact-checker/charter.md |
+93 −0 |
.squad/ceremonies.md |
+20 −0 |
.squad/identity/now.md |
+65 −111 |
.squad/routing.md |
+1 −0 |
.squad/team.md |
+1 −0 |
Total: +180 −111
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
|
There was a problem hiding this comment.
Pull request overview
Promotes the existing fact-checker agent from a stub to an active, rostered reviewer role, and updates team process/identity docs to formalize claim verification as part of the workflow.
Changes:
- Add Fact Checker to the team roster and routing rules as the verification/devil’s-advocate specialist.
- Introduce a Pre-Ship Fact Check ceremony to ensure user-facing artifacts get claim-by-claim verification.
- Rewrite
.squad/identity/now.mdto reflect current operating context, active workstreams, and recent governance/MCP findings.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.squad/agents/fact-checker/charter.md |
Adds a full charter with methodology, responsibilities, and hard rules for evidence-based verification. |
.squad/team.md |
Adds Fact Checker to the roster as a reviewer role. |
.squad/routing.md |
Adds routing entry for claim verification & devil’s-advocate work to Fact Checker. |
.squad/ceremonies.md |
Adds the Pre-Ship Fact Check ceremony definition. |
.squad/identity/now.md |
Updates the “current focus” document to v0.10.0+ context and dual operating mode. |
| ## Project Context | ||
|
|
||
| - **Project:** squad-sdk — programmable multi-agent runtime for GitHub Copilot | ||
| - **Stack:** TypeScript (strict, ESM-only), Node.js ≥20, `@github/copilot-sdk`, Vitest, esbuild |
…#1299) (#1300) * fix(docs): tell coordinator to roster Fact Checker on first-time cast (#1299) squad init correctly creates .squad/agents/fact-checker/ on disk (per merged PR #1223). But when the user opens copilot --agent squad and the coordinator runs first-time casting, it OMITS Fact Checker from the team.md ## Members table while including Scribe, Ralph, and Rai. Root cause: .squad-templates/squad.agent.md had two gaps: 1. Line 56 said "team size (typically 4-5 + Scribe)" — naming only Scribe 2. Rai had a dedicated ## Rai section with explicit "Rai always appears in team.md" instruction — Fact Checker had no equivalent section So the model added Rai (because instructed to) but had no instruction to add Fact Checker, even though the agent dir was scaffolded on disk. Fix: * Update team-size line to name all 4 always-on built-ins: Scribe + Ralph + Rai + Fact Checker * Add full ## Fact Checker — Verification & Devil's Advocate section mirroring the Rai pattern: roster-entry instruction, dual operating mode (per #789 + #1254), trigger phrase table, confidence ratings, DA brief structure, boundaries, state location Sync via sync-templates.mjs --sync propagates squad.agent.md changes to all 4 mirror targets: .squad-templates/, templates/, packages/squad-cli/ templates/, packages/squad-sdk/templates/, .github/agents/. Tests: new test/squad-agent-roster.test.ts runs against all 4 template targets and asserts: * The "Determine team size" line names all 4 built-ins * A ## Fact Checker section exists with "always appears in team.md" * The section declares dual operating mode (anchors #789 + #1254 design so a future PR can't accidentally split Fact Checker and Devil's Advocate again — cf. closed PR #1294) * Existing Ralph + Rai sections still present 16/16 pass. Closes #1299 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * doc(squad.agent.md): clarify Fact Checker is exempt from casting + correct on-demand reference path Reviewer follow-ups on #1300: 1. Team-size phrasing — the line read 'typically 4-5 + Scribe + Ralph + Rai + Fact Checker' which a model could parse as arithmetic (4-5 + 4 = 8-9, but it could also collapse). Rewrote it to make the composition explicit: '4-5 cast (user-domain) agents + 4 always-on built-ins = 8-9 total roster entries'. 2. Cast-exemption parity — Scribe, Ralph, and Rai each have an explicit 'exempt from casting' bullet but Fact Checker did not. Added the matching bullet right after Rai's. 3. Bad on-demand reference path — the FC section pointed at '.squad/templates/fact-checker-charter.md'. That file IS shipped (TEMPLATE_MANIFEST destination 'templates/fact-checker-charter.md') but only AFTER 'squad init' or 'squad upgrade' has populated .squad/templates/. A reader of squad.agent.md on an un-initialized repo (or in .github/agents/ on the cloud agent surface) would follow a dead link. Repointed to the '.squad/agents/fact-checker/charter.md' instance that ensureBuiltinAgents creates as part of the same init/upgrade path — that's where the rich charter actually lives at runtime per #1299 + #1301. All 4 mirrored copies re-synced via scripts/sync-templates.mjs. fact-checker-role.test.ts: 8/8 pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Tamir Dresher <tamirdresher@users.noreply.github.com>
…/fact-checker/ state dir (#1299 deep) (#1301) * fix(sdk): plumb Fact Checker like Rai — rich charter at init + .squad/fact-checker/ state dir (#1299 deep) PR #1300 fixed the documentation gap so the coordinator knows to roster Fact Checker. This PR fixes the structural gap behind it. Per user testing 2026-06-13: even after #1300 the actual agent on disk was still "a name on disk with a 21-line placeholder". Three structural problems: 1. squad init never used the rich {role}-charter.md templates. Both Rai and fact-checker got 478-byte generic stubs from generateCharter(). Rich templates only ran via squad upgrade's ensureBuiltinAgents path. 2. fact-checker had no state dir. Rai gets .squad/rai/{policy.md, audit-trail.md} via init.ts lines 879-941. fact-checker had nothing equivalent. 3. fact-checker-charter.md was only in packages/squad-cli/templates/ — missing from .squad-templates/ (canonical source) AND packages/ squad-sdk/templates/. SDK init's getSDKTemplatesDir() resolves to the SDK templates dir, so even if init tried to read the rich charter, the file wasn't there. Fix (4 parts): Part 1 - Rich charter at init (benefits BOTH Rai and fact-checker): * SDK init.ts agent loop now looks up {templatesDir}/{role}-charter.md for each agent and uses that as charter.md content if it exists. Falls back to generateCharter() for user-defined agents. * Result: fresh squad init produces .squad/agents/Rai/charter.md at 4525 bytes (full Rai charter) and fact-checker/charter.md at 3024 bytes (full FC charter). Previously both were 478-byte stubs. Part 2 - .squad/fact-checker/ state dir mirroring .squad/rai/: * New block in init.ts (right after the Rai seeding) creates .squad/fact-checker/policy.md (from templates/fact-checker-policy.md or inline fallback) and audit-trail.md. * New .squad-templates/fact-checker-policy.md (~6KB) is the canonical authority for dual-mode operating rules per #789 + #1254: - Mode 1 Verification: ✅/⚠️ /❌/🔍 confidence rating taxonomy - Mode 2 Devil's Advocate: required brief structure - Hard anti-fabrication rules - Advisory by default with narrow blocking exceptions - Audit trail rules (succinct, never raw source) Part 3 - Fix .squad-templates/ distribution gap: * Copied fact-checker-charter.md into .squad-templates/ so sync-templates.mjs propagates it to all 4 mirror targets including packages/squad-sdk/templates/. This unblocks Part 1. Part 4 - Plumbing: * .gitattributes: .squad/fact-checker/audit-trail.md merge=union * TEMPLATE_MANIFEST: fact-checker-policy.md * squad.agent.md Files Catalog: 2 new rows for FC state files Tests: 3 new regression tests in test/init.test.ts (28/28 pass total). npm run lint clean. Composability: This PR builds on #1300 (which adds the ## Fact Checker section to squad.agent.md and the team-size line fix). Both PRs modify squad.agent.md in disjoint regions and merge in either order. Full plumbing requires BOTH to land. Closes #1299 (deep fix; #1300 was the surface fix) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(sdk): lowercase fallback for rich-charter template lookup + sync .github/agents Two reviewer follow-ups on #1301 (#1299 deep): 1. Case-sensitive FS bug in rich-charter lookup The lookup tried '\-charter.md' and '\-charter.md' only. For Rai (role='Rai', name='Rai') this becomes 'Rai-charter.md', but the actual file shipped lowercase ('rai-charter.md'). On Windows the lookup succeeded because the filesystem is case-insensitive; on Linux CI it silently missed and fell back to the 478-byte generic stub — exactly the regression #1299 was trying to fix. Reproduced by 'should use the rich Rai-charter.md template at init' failing with 'expected 476 to be greater than 1000' on GitHub Actions. Add toLowerCase() candidates after the exact-case ones. De-dupe via a Set so we don't double-stat when role and name are already lowercase (fact-checker case). Guard each candidate against blank keys. 2. Template-sync parity The canonical .squad-templates/squad.agent.md gained two Fact Checker rows in the Files Catalog but the mirrored .github/agents/squad.agent.md copy was never re-synced, so the template-sync.test.ts byte-for-byte parity check would have fired. Run 'node scripts/sync-templates.mjs --sync' to regenerate. Verified: vitest 'rich Rai-charter' passes locally after the fix (previously failing on Linux CI run 27464079078). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Tamir Dresher <tamirdresher@users.noreply.github.com>
What
Promotes the existing
fact-checkeragent (stub charter, never on roster) to a full team member with FAO-inspired charter, claim-verification methodology, and hard rules against fabrication.Adds the Pre-Ship Fact Check ceremony so any user-facing artifact gets a claim-by-claim verification pass before it ships.
Updates
identity/now.md(12 weeks stale from v0.9.1) to reflect:now.mditself (will be filed separately)Why
The 2026-06-09 forged-audit-entry incident showed concretely why an explicit Verification + Devil's Advocate role matters. The team was already substantially staffed but lacked someone whose job is to challenge claims with evidence.
The existing
fact-checker/charter.mdalready named the role correctly: "Devil's advocate and verification agent — validates claims, detects hallucinations, and runs counter-hypotheses." This PR makes that real: full charter, on the roster, on routing, owning a ceremony.Charter highlights
Known gap NOT addressed here
Rai 🛡️ (RAI Reviewer) is missing from this team's roster despite being required by
squad.agent.mdgovernance. The.squad/agents/Rai/directory exists. This is migration drift from the team predating Rai's introduction.Deliberately deferred for a separate PR with Brady's review since it's a different concern.
Files
.squad/agents/fact-checker/charter.md.squad/team.md.squad/routing.md.squad/ceremonies.md.squad/identity/now.mdNo code changes. Build passes locally (
npm run buildclean in 16.4s).Related