Quality, hygiene, and review roles
Deterministic checks and read-only audits across QC, UI check, Explorer, Deslop, Red team, and Code review before merge policy evaluates a lane.
Steps 3 through 7 of every lane (qc, ui-check, deslop, red-team, code-review) plus release-only explorer verify candidates through caged execution, visual baselines, stack rules, offline scanners, replay recipes, and spec-vs-standards code review.
QC, UI check & Explorer
Run build, lint, tests, mutation, PNG baselines, and optional UX probes.
Deslop
Catch stubs, clones, and narration filler on changed lines only.
Red team & Code review
Scan secrets/CVEs, replay live attack recipes, and check rule packs.
QC (internal/roles/qc)
internal/roles/qc runs deterministic verification inside the container cage with zero LLM calls:
- Static (
10m): Runsbuild,typecheck, andlint, checking worktree cleanliness (qc-tree-clean). - Hygiene & guards: Runs
comment-ban(max100lines),scenario-text, andtest-guardviaGuardTests(guard.go) blocking.skip/.only/deletions across JS/TS, Go, Python.py, and Rust.rs. - Unit (
UnitLimit): Runscommands.unitbounded byrunner.Limit("unit")underrunner.DefaultLock(). - E2E & capture (
15m): Runs Playwright specs (reports/e2e/results.json) andui-capture(e2e.SettleSeconds = 5). - Mutation (
20m): Runs StrykerJS onMutateRangesacross changed JS/TS source and modified test files (qc-mutation-kill/survivedblock;unreachedisshould-fix).
<home>/qc-cache/<key[:2]>/<key>.json caches build, typecheck, lint, and unit, while e2e, ui-capture, and mutation always run fresh. Reports log fixedNotDone notes for whole-unit runs and assertion edits.
Every step records CheckResult coverage (ran, skipped, noop-true) on RoleReport.Checks so ["true"] placeholders surface in review briefs and scorecards.
UI check (internal/roles/uicheck)
internal/roles/uicheck compares settled screen PNGs byte-for-byte with zero LLM calls. When scenarios name screens, it renders or reuses <home>/ui-baselines/<hash24>/shots.jsonl under a 15m lock (ui-baseline blocks on failure).
| Verdict | Severity | Meaning |
|---|---|---|
ui-new | note | New screen not yet on staging |
ui-predicted | note | Screen hash changed and s.Screen is in Analyzer's Predicted |
ui-unpredicted | blocking | Screen hash changed unexpectedly (saves before-*.png evidence) |
ui-unstyled | blocking or should-fix | Missing applied stylesheet (blocking on new/changed screens) |
ui-overflow | should-fix | Rendered viewport overflows horizontally |
Open UI check items
Region/pixel diff images (odiff, looks-same), ui-mask regions, and before/after sign-off gallery pairs (D37) remain in NotDone.
Explorer (internal/roles/explorer)
internal/roles/explorer runs on the release lane when qc.explorer is true, probing $APP as a cautious first-time user (qc-explorer.md).
- Session scope: Runs
readonlysession.Run(15m,explore_report) with Playwright Chromium andcurlagainst empty/oversized inputs, unicode, double submits, reloads,375x812viewports, and post-signout routes. - Deterministic replay: Every finding needs
steps, ashrecipecapturing"$SHOTS/<shot>", anexpectstring, andseverity. Go replays each recipe againstserved.App; only reproducible hits stay actionable.
Deslop (internal/roles/deslop)
internal/roles/deslop inspects added and changed lines only (excluding deslop.exclude_paths), runs a deterministic .md em-dash fixer, and runs a 5m read-only audit (deslop-agent.md).
- Scripted rules (
deslop/*/rules.json): Checkstypescript(11rules including EffectDS-A3-swallowed-error),go(8),python(8),rust(8), and Markdown prose viadeslop.CheckProseincluding release PR bodies. - Read-only audit (
deslop_review): Evaluatesfake-success,additive-workaround,over-built(function/inline/delete ladder), anddoc-narration, plus adjudicating rule hits (t12 rules judge). Unrun audits logNotDone(Manifesto #15).
- 11 rules:
DS-A1-placeholder,DS-A2-fake-success,DS-A3-swallowed-error,DS-A4-additive-workaround,DS-B6-test-literal,DS-B9-owned-module-mock,DS-D13-new-clone,DS-D14-dead-weight,DS-D15-type-laundering,DS-F19-narration-filler,DS-F20-prose-words. - Manifesto tags: Rules map to offline Manifesto IDs (
#2,#5,#6,#8,#14,#15,#17,#18,#19,#21). - Promotion & proposals: Advisory rules emit
should-fixuntil<home>/deslop/stats.jsonrecords at least20hits with80%kept (or demotesblockingrules when over25%of at least10hits are dismissed). Patterns recurring across at least3runs (RecurringRunsMin) write<home>/proposals/guardrail-*.jsonfort12 rules approve|reject.
Red team (internal/roles/redteam)
internal/roles/redteam audits commits, dependencies, write routes, and live visitor security without altering worktree code.
| Check | Mechanism and findings |
|---|---|
gitleaks (v8.30.1) | Scans commits via synthetic .git (allowlists test fixtures for generic-api-key). squashLane retries Tree.Squash if intermediate commits leaked secrets. |
osv-scanner (v2.7.1) | Scans lockfiles against ~/t12/cache/osv ($T12_OSV_CACHE), filtering Base advisories and reporting new ones as should-fix. |
originCheck | Flags .post/.put/.patch/.delete Hono routes and Effect Platform HttpApiEndpoint / router routes missing cross-origin enforcement (should-fix). |
Visitor probes (attack.go) | On auth/input/data RiskTags, readonlysession.Run (10m, security_check) probes $APP via curl; app.Replay promotes confirmed recipe hits to blocking and unconfirmed ones to note. |
Open Red team items
Semgrep CE, ZAP passive, and nuclei -dast remain in NotDone.
Code review (internal/roles/codereview)
internal/roles/codereview pairs deterministic diff checks (checks.go) with one 10m readonlysession.Run session (code-review.md, tool code_review).
- Scripted gate (
unrequested,invented-dependency): Blocks edits outsidePlanFiles,PlanTests,TestGlobs,e2e/, or lockfiles, and checks manifests againstnpm,pnpm,yarn,bun, Python, and Rust lockfiles. - Stack-filtered packs (
codereview/packs/*.json): Filterslean(5),security-web(8),tests(4), andtypescript(5) viaproject.StackTagsIn(effect,cloudflare-workers,typescript,javascript,nodejs,go,python,rust). - 5-step review protocol: Adjudicates
prior_findings, forms2–4hypotheses before reading Engineer's summary, checksspecandstandards, and emits four-part findings (what,problem,fix,skip) deduplicated across(rule, path, lines)ranges.
Key takeaway
Every quality and security role pairs a cheap script gate with bounded, replay-verified read-only analysis, so unverified claims never block or pass a lane.
Next steps
Planning and build roles
Deep dive into Strategist DAG lane planning and routing, Analyzer repro creation and split plans, and Engineer caged edits, turn limits, and verify gates.
Delivery, operations, and Observer
How DevOps manages bootstraps and dry-run promotions, Release gates and bisects staging, SRE watches live URLs, and Observer resolves waiting items.