Skip to Content
turbo-12f
Architecture

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.

Explanation

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.

Build & Visual

QC, UI check & Explorer

Run build, lint, tests, mutation, PNG baselines, and optional UX probes.

Hygiene

Deslop

Catch stubs, clones, and narration filler on changed lines only.

Security & Review

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:

  1. Static (10m): Runs build, typecheck, and lint, checking worktree cleanliness (qc-tree-clean).
  2. Hygiene & guards: Runs comment-ban (max 100 lines), scenario-text, and test-guard via GuardTests (guard.go) blocking .skip/.only/deletions across JS/TS, Go, Python .py, and Rust .rs.
  3. Unit (UnitLimit): Runs commands.unit bounded by runner.Limit("unit") under runner.DefaultLock().
  4. E2E & capture (15m): Runs Playwright specs (reports/e2e/results.json) and ui-capture (e2e.SettleSeconds = 5).
  5. Mutation (20m): Runs StrykerJS on MutateRanges across changed JS/TS source and modified test files (qc-mutation-kill/survived block; unreached is should-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).

VerdictSeverityMeaning
ui-newnoteNew screen not yet on staging
ui-predictednoteScreen hash changed and s.Screen is in Analyzer's Predicted
ui-unpredictedblockingScreen hash changed unexpectedly (saves before-*.png evidence)
ui-unstyledblocking or should-fixMissing applied stylesheet (blocking on new/changed screens)
ui-overflowshould-fixRendered 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 and curl against empty/oversized inputs, unicode, double submits, reloads, 375x812 viewports, and post-signout routes.
  • Deterministic replay: Every finding needs steps, a sh recipe capturing "$SHOTS/<shot>", an expect string, and severity. Go replays each recipe against served.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): Checks typescript (11 rules including Effect DS-A3-swallowed-error), go (8), python (8), rust (8), and Markdown prose via deslop.CheckProse including release PR bodies.
  • Read-only audit (deslop_review): Evaluates fake-success, additive-workaround, over-built (function/inline/delete ladder), and doc-narration, plus adjudicating rule hits (t12 rules judge). Unrun audits log NotDone (Manifesto #15).

Red team (internal/roles/redteam)

internal/roles/redteam audits commits, dependencies, write routes, and live visitor security without altering worktree code.

CheckMechanism 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.
originCheckFlags .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 outside PlanFiles, PlanTests, TestGlobs, e2e/, or lockfiles, and checks manifests against npm, pnpm, yarn, bun, Python, and Rust lockfiles.
  • Stack-filtered packs (codereview/packs/*.json): Filters lean (5), security-web (8), tests (4), and typescript (5) via project.StackTagsIn (effect, cloudflare-workers, typescript, javascript, nodejs, go, python, rust).
  • 5-step review protocol: Adjudicates prior_findings, forms 2–4 hypotheses before reading Engineer's summary, checks spec and standards, 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

On this page