Skip to content

feat(factory): five read-only specialist reviewer briefs - #7

Draft
Bthornton1994 wants to merge 1 commit into
mainfrom
claude/specialist-briefs
Draft

Bthornton1994 wants to merge 1 commit into
mainfrom
claude/specialist-briefs

Conversation

@Bthornton1994

@Bthornton1994 Bthornton1994 commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

What changed

Adds five read-only reviewer briefs as a small typed module. It creates no bots, changes no routing, adds no dependencies, and adds no dispatch or orchestration.

File What
server/factory-specialist-briefs.ts The briefs, a validator, a renderer, an action check, and a report check
server/factory-specialist-briefs.test.ts 61 tests, with one synthetic fixture per specialist
docs/factory/specialist-briefs.md Catalog, inputs and evidence, read-only rules, API

Briefs:

Id Concluding outcomes Reads beyond repo and lane
codebase-navigator MAPPED run-tests, run-typecheck
security-privacy-review FINDINGS, NO_FINDINGS run-tests, run-typecheck
ui-accessibility-review FINDINGS, NO_FINDINGS inspect-ui
game-interaction-review (StageForge, Loadout) FINDINGS, NO_FINDINGS inspect-ui
release-readiness-review RECONCILED, MISMATCH read-ci-status, read-deploy-status

Every brief also has BLOCKED and NOT RUN.

Each brief keeps the task-pattern v1 fields (id, version, role, objective, inputs, steps, permittedTools, permittedActions, forbiddenActions, expectedArtifact, stopConditions). It adds:

  • role: "reviewer"
  • whenToUse
  • keyed requiredEvidence
  • outcomes and reportSections (the output format)
  • uncertaintyRules, rendered after shared rules on labelling, missing inputs and NOT RUN
  • a Done when … completionCondition

Read-only by construction

  • The reviewer action ceiling has no write, approval or sign-off action.
  • Every brief must forbid edit-files, commit, push-fork, approve-pr, merge, undraft, deploy, set-product-flags, clear-owner-gates, clear-project-gates, claim-production-readiness, record-qa-disposition, submit-qa-clearance, give-legal-advice, attest-for-owner, and the catalog's other hard-forbidden ids.
  • No outcome may read as a pass, approval or clearance. Validation rejects PASS, PASS_KEEP_DRAFT, APPROVED, READY, MERGE…, LAUNCH… and DEPLOY….

Fail-closed

  • renderSpecialistBrief refuses a missing required input, and the error says the review is BLOCKED.
  • checkSpecialistReport refuses a report that:
    • concludes while any required evidence is missing or is only a status word (PASS, NOT RUN, TBD)
    • has a reviewedSha that isn't a full SHA
    • labels a claim verified without citing evidence
    • says BLOCKED or NOT RUN without naming what is missing
    • carries an unknown field or evidence key, such as a smuggled mergeClearance

Independent QA is unchanged and stays independent.

  • Reviewers cannot record a QA disposition or submit QA clearance.
  • Release readiness reads the QA record verbatim, so PASS_KEEP_DRAFT stays PASS_KEEP_DRAFT.
  • RECONCILED only means all four sources were read for the same SHA. It is not clearance.

Why

The factory needs reusable reviewer briefs that cannot be read as approval, QA, or launch clearance, and that report BLOCKED or NOT RUN rather than guessing when inputs or evidence are missing.

Assumptions (checked before coding)

# Assumption Label Evidence
A1 server/factory-task-patterns.ts, docs/factory-task-patterns.md, server/factory-specialist-profiles.ts and docs/factory/specialist-profiles.md exist on main c223a3a verified false On c223a3a, git ls-files | grep -iE 'task-pattern|specialist|factory' returns only docs/factory/agent-systems.md. The catalog is on draft #1 (367822c) and #2 (eb1c5f1) only. The profiles are on draft #5 (83ed9ef) only.
A2 Because of A1, add a self-contained module on main that reuses the catalog's v1 field names and imports neither unmerged module. Do not port or duplicate draft #1/#2/#5 code. inferred Same choice and wording as #5's factory-specialist-profiles.ts: "Listed here rather than imported so this tip does not depend on unmerged PR #1 modules".
A3 The implementer, independent-qa and completion-report contracts are preserved verified Those files aren't on main and aren't touched. The reviewer role has no QA action.
A4 PASS_KEEP_DRAFT is an external QA disposition string unknown → handled git grep PASS_KEEP_DRAFT is empty on main and all draft branches. It is reported verbatim and can never be an outcome.
A5 No StageForge or Loadout vision or reference docs are in this repo verified git grep finds nothing, so they are required inputs and the review is BLOCKED without them.
A6 The isolated app fixture in docs/verification/README.md doesn't apply inferred The module is not wired into any server route, MCP tool, or conversation path. The t1759u digest used focused vitest and typecheck for the same reason.

Follow-up once the catalog lands on main. The briefs' text was checked once, in a scratch copy only, against draft #2's findOverrideAttempts, with 0 hits. Moving them into the catalog would need a reviewer role and its ceiling there. Not done here, because the catalog isn't on main.

How it was verified

Local checks ran in a Linux container as root on Node v22.22.0 (package.json wants >=24; pnpm warns about the engine only).

Check Command Result
Focused tests pnpm exec vitest run server/factory-specialist-briefs.test.ts PASS: 1 file, 61 tests
Tests can fail Turned off one guard at a time (evidence check, clearance-word check, verified-claim check, BLOCKED-needs-missing check, per-brief permitted check) and re-ran, then restored PASS: 8, 8, 1, 5 and 2 tests failed respectively
Typecheck pnpm typecheck (tsc -b && tsc -p tsconfig.server.json) PASS: exit 0
Lint pnpm exec oxlint --deny-warnings . (also run by the pre-push hook) PASS: exit 0; 0 diagnostics on the two new files
Locale check pnpm i18n:check (pre-push hook) PASS: exit 0
Strip-types load node --experimental-strip-types -e "import('./server/factory-specialist-briefs.ts')…" PASS: loads 5 briefs (no TS parameter properties)
Full vitest suite, local pnpm exec vitest run FAIL, environmental and not from this PR: 784 files passed, 6 failed, 25 skipped (815); 9 failed, 10,429 passed (43 min). None of the failing files touch or import the new module. See the next two rows.
— same 6 files on main c223a3a pnpm exec vitest run electron/updater-handoff.electron.test.mjs server/checkpoints.test.ts server/cli-stop.e2e.test.ts server/kill-tree.test.ts server/local-computer-proxy.test.ts server/vps-computer.runner.test.ts FAIL on main too: the same 8 tests fail identically (checkpoints ×2, cli-stop.e2e ×2, kill-tree ×2, vps-computer.runner ×2). These are root-user file-permission and process-group signal tests in this container.
— the 2 Electron files, re-run on this branch pnpm exec vitest run electron/updater-handoff.electron.test.mjs server/local-computer-proxy.test.ts PASS: 2 files, 5 tests. In the full run they failed with "Electron failed to install correctly"; the Electron binary only finished installing at 21:17 UTC, after they had run.
CI on exact SHA 6f2c837 GitHub Actions run 37154125197 PASS: typecheck + lint; vitest 8/8 shards (ubuntu-latest and windows-latest, 4 each); renderer, packaged-server (Ubuntu, Windows), macOS, Windows CUA, package + smoke, OSS edition, cloudflared, behavior evals, control-plane; overall CI success. Kotlin/Android, Swift/iOS and CLA were skipped (paths not touched).
Bridge dispatch test n/a NOT RUN: nothing dispatches these briefs
Runs against Markout, Media Lens, Release Rescue, StageForge or Loadout n/a NOT RUN, by instruction; fixtures are synthetic

Main, draft #1, #2, #4 and #5 heads are unchanged (checked with git ls-remote after the push).

Screenshots (UI changes)

None. There is no UI change.

Checklist

  • pnpm typecheck and pnpm test pass: typecheck passes locally, and CI ran the full suite on the exact SHA and it is green. Locally, 8 container-environment tests fail on main too, and 2 Electron files pass on re-run.
  • Server behavior changes come with tests (61 focused tests)
  • No dist-server/ edits
  • No platform-specific code; no shell: true / cmd.exe strings
  • No secrets in logs, responses, events, or argv

🤖 Generated with Claude Code

https://claude.ai/code/session_0152NPtBTrqUhRy7bfMxVnkm

Add server/factory-specialist-briefs.ts: codebase navigator, security and
privacy, UI and accessibility, game and interaction design (StageForge,
Loadout), and release-readiness reviewer briefs. Each keeps the factory
task-pattern v1 fields and adds a reviewer role with when-to-use, keyed
required evidence, report outcomes and sections, uncertainty rules, stop
conditions, and a completion condition.

The briefs are read-only by construction: the reviewer action ceiling has
no edit, commit, push, approval, merge, deploy, flag, gate, readiness, or
QA-disposition action, and every brief forbids them. No outcome may read
as a pass, approval, or clearance. renderSpecialistBrief refuses missing
required inputs, and checkSpecialistReport refuses a concluding outcome
without its evidence, a verified claim without a citation, or BLOCKED /
NOT RUN without saying what is missing.

The task-pattern catalog and specialist profiles are only on draft PRs,
so this module imports neither and leaves the implementer, independent
QA, and completion-report patterns untouched. No bots, routing, bridge,
lanes, or dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0152NPtBTrqUhRy7bfMxVnkm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants