[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6K39QH3YYBPE2EFPKBHJA6H":3,"skill-same:01M6K39QH3YYBPE2EFPKBHJA6H":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":67},"01M6K39QH3YYBPE2EFPKBHJA6H","architecture-review",null,"Use only within an active harness lifecycle when pre-stories feasibility review, a pipeline batch drift check, or the SHIP as-built review is current. Do not invoke for ordinary implementation, code review, or general architecture questions.","jstoup111\u002Fai-conductor","jstoup111","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1585332?v=4","01M6K374Y0VEFPVCT2KPBAN4HC","James Stoup","01M6K3751X0GFKNBD0198F50XN",7,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjstoup111\u002Fai-conductor\u002Fblob\u002Fmain\u002Fskills\u002Farchitecture-review\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"architecture","review","architecture review","when","gating","invoke","as","harness","feasibility","opus","ship","active","claims","batch","code","drift","only","code review","decide","pipeline","2026-11-10 10:12:30",false,"---\nname: architecture-review\nimplicit_invocation: required\ndescription: \"Use only within an active harness lifecycle when pre-stories feasibility review, a pipeline batch drift check, or the SHIP as-built review is current. Do not invoke for ordinary implementation, code review, or general architecture questions.\"\nmodel: opus\nenforcement: gating\nphase: decide\nstandalone: true\nrequires: [verify-claims]\n---\n\n## Purpose\n\nReviews the design through an architectural lens BEFORE stories are written and before any code.\nCatches technical infeasibility, hidden complexity, architectural drift, and domain violations\nearly — when they're cheap to fix. This is where the *how* is resolved (so the PRD stays\nproduct-only) and captured as APPROVED ADRs.\n\nRead the `Scope boundary:` from `.docs\u002Ftrack\u002F\u003Cslug>.md` as binding; preserve the confirmed narrow\u002Fcomprehensive breadth outcome; do not permit a materially broader expansion beyond it unless the operator confirms before it enters the artifact.\n\n**Run after `\u002Fprd` (product track) or `\u002Fexplore` (technical track), and BEFORE `\u002Fstories`** (adr-2026-06-29-architecture-before-stories-convergent-kickback).\nThe review's input is the PRD's functional requirements (product) or the explore output + technical\nintent (technical) — stories and the plan do not exist yet at this point.\n\nAlso invocable at pipeline batch boundaries to verify implementation stays architecturally sound.\n\n**Correctness gate:** an ADR is the most load-bearing artifact in the flow — everything downstream\nbuilds on it. Apply the `\u002Fverify-claims` protocol before writing any APPROVED ADR: state each\ntechnical claim with a grounded confidence % and its basis (verified vs inferred), surface every\nassumption the design rests on, and HARD-BLOCK (operator approval interactive, HALT if autonomous)\non any unconfirmed assumption that would change the decision. Do not record a decision as APPROVED\nwhile it rests on an unconfirmed load-bearing assumption.\n\n### Provider-native delegation\n\nWhen this review delegates exploration or analysis, use the selected host's available subagent facility.\nPreserve the scope limits, evidence, ADR output, and veto\u002Fgate behavior regardless of host.\n**Claude delegation:** Claude uses the Agent tool; any Claude model choice is confined to\nthat facility. A Codex-selected run uses its available subagent facility and configured Codex\nprovider policy, without translating Claude model names.\n\n### Full vs amendment mode (convergence — adr-2026-06-29-architecture-before-stories-convergent-kickback)\n\n- **Full pass** — the pre-stories run above: full feasibility\u002Falignment, produces APPROVED ADRs.\n- **Amendment pass** — when a later step (`stories` or `conflict-check`) re-opens architecture with a\n  specific **structural** gap, address ONLY that gap; do not re-derive the design from scratch. This\n  is what makes the loop converge instead of oscillate.\n\nOnly a genuine structural gap (a missing component\u002Fseam\u002Fboundary) may re-open architecture — never a\nstory-phrasing nit or a coverage gap. The conductor caps re-openings and HALTs for a human on excess.\n\n**Accepted-artifact amendment:** When this review concludes that an accepted DECIDE assertion is\nfalsified, amend that non-story artifact during the DECIDE pass; do not instruct a later phase to\nmake the change. If it is already on the base branch, add this note beside the original assertion:\n\n```markdown\n> **Amended YYYY-MM-DD by #NNN:** \u003Cwhat the assertion now says, and why>\n```\n\nFor every non-story artifact, the note is additive only when the artifact is already on the base\nbranch: add the note; the original assertion remains preserved; never rewrite or delete it, and\ncreate no separate record. Story artifacts under `.docs\u002Fstories\u002F` are the exception: replace\nsuperseded assertions in place without an amendment record. The amended artifact is then part of\nthe spec-branch baseline before BUILD begins.\n\nAn accepted DECIDE artifact absent from the base branch is a draft: revise it in place, remove\nsuperseded text, and add no amendment note or revision log.\n\n### Lightweight Mode (Medium Complexity Tier)\n\nWhen the feature is classified as **Medium** by `\u002Fconduct`'s complexity assessment, run only:\n- **Section 2: Technical Feasibility** — full check\n- **Section 4: Architectural Alignment** — full check\n\nSkip:\n- Section 3 (Complexity Assessment) — already done by `\u002Fconduct`\n- Section 5 (Domain Integrity Pre-Check) — handled by TDD domain reviewer per-cycle\n- Section 7 (mandatory ADR creation) — only create ADRs for genuinely novel architectural decisions\n\n**Explore agent limits for Medium tier:** Max 2 agents with non-overlapping scopes:\n- Agent 1: the PRD\u002Fspec (`.docs\u002Fspecs\u002F`) — its FRs are the review input (stories\u002Fplan don't exist yet)\n- Agent 2: relevant source files for the feature area\n- Do NOT dispatch agents solely to read `.memory\u002F`; this active workflow reads relevant entries\n  directly when it needs them\n- Do NOT dispatch a third agent for decisions\u002FADRs (read `.docs\u002Fdecisions\u002F` directly if needed)\n\nFor **Small** features, the DECIDE-time architecture review is skipped by `\u002Fconduct`. This does\nnot skip the §12 as-built compliance gate at SHIP.\nFor **Large** features, run the full review (all sections).\n\n## Practices\n\n### 1. Load Architecture Context\n\nRead in order of authority (higher overrides lower):\n\n1. `.docs\u002Fdecisions\u002F` — ADRs are the authoritative architecture reference\n2. `.docs\u002Farchitecture\u002F` — C4 diagrams (system context, containers, components, ERD, sequences)\n3. `CLAUDE.md` — Project conventions and constraints\n4. `.memory\u002Fdecisions\u002F` — Prior architectural decisions\n5. Existing code structure — `config\u002Froutes.rb`, model relationships, directory layout\n\n**Approved decisions first; convention over precedent:** Applicable APPROVED decisions override\nobserved patterns. Existing code that conflicts with a documented decision is tech debt and must\nbe rejected as precedent. Never downgrade a finding because \"the codebase already does it this\nway.\"\n\n**Focused local pattern basis (when applicable):** When a concrete local precedent matters to a\nfeature concern that approved decisions do not already settle, record it in the review's ordinary\nprose. Keep the basis bounded to that concern and include:\n\n- the precedent's role;\n- the material semantic traits the new work should preserve;\n- why that precedent applies to this concern;\n- the variation that remains allowed; and\n- path and stable-symbol hints that help BUILD rediscover an equivalent on its current HEAD.\n\nHints are rediscovery seeds, not authoring-time snapshots: never anchor this basis to line numbers\nor require the original exemplar to remain at a fixed coordinate. BUILD must resolve the traits\nagainst its checkout at implementation time. A selected pattern does not establish a project-wide\nconvention or configuration rule, and it does not replace the separate exact-replication\n`Pattern-source` \u002F `Rename-map` contract.\n\nWhen no suitable precedent can be verified, record that verified no-fit in the ordinary review\nprose rather than inventing an exemplar. When the in-scope approach requires departing from an\notherwise applicable pattern, record the operator-authorized bounded departure, its reason, and\nits boundary before handing the approach to BUILD. Do not add this optional basis when no local\nprecedent affects the approach.\n\n### 2. Technical Feasibility\n\nFor each PRD functional requirement (product track) or each part of the explore output's technical\nintent (technical track), assess the proposed design:\n\n| Check | Question | Flag If |\n|---|---|---|\n| **Stack compatibility** | Can this be built with the current stack? | Requires new gems\u002Fpackages, external services, or infrastructure changes |\n| **Prerequisites** | What must exist before this can start? | Migrations, config changes, external account setup needed |\n| **Integration surface** | What other systems\u002Fmodules does this touch? | Crosses 3+ module boundaries or hits external APIs |\n| **Data implications** | Schema changes, migrations, data backfills? | Large table migrations, breaking schema changes, data loss risk |\n| **Performance risk** | Will this create N+1s, unbounded queries, heavy computation? | List endpoints without pagination, missing indexes on query paths |\n| **Worktree isolation** | Can this run in parallel worktrees without conflicts? | New Docker services, ports, databases, or shared state without `.env` boundary pattern |\n\n### 3. Complexity Assessment\n\n| Level | Criteria | Action |\n|---|---|---|\n| **Low** | 1 model, 1 endpoint, no external deps | Proceed |\n| **Medium** | 2–3 models, cross-model logic, background jobs | Proceed with boundary attention |\n| **High** | 4+ models, external APIs, complex state machines | Consider splitting |\n| **Spike** | Unknown tech, unclear requirements, novel patterns | Time-box spike before planning |\n\n### 3a. Split a Large Design Before Stories\n\nEstimate the plan's task count here, from the approved design, before `\u002Fstories` runs. When the\nestimate approaches the plan's scope ceiling (20+ tasks; `\u002Fplan` §6 refuses 30+ at land without a\nscope exception), propose splitting the design into sequential specs and get the operator's\ndecision now. Splitting after stories and plan exist forces a full restructuring pass: stories,\nplan, coverage, coherence mapping, and waivers all have to be re-cut.\n\nA proposed split states:\n\n- **The specs, in order.** The first ships the foundation; each later spec is blocked by the one\n  before it, and every spec inherits the original intake's blocking edges.\n- **A default-off flag** that keeps the partially delivered behavior dark. Only the last spec turns\n  it on, so no intermediate merge changes production behavior.\n- **Reachability per spec.** Each spec ships only primitives that have a production caller inside\n  that same spec; otherwise the as-built review (§12) blocks them as unreachable. Move a\n  constructor, writer, or helper to the spec that first calls it.\n- **Where deferred outcomes live.** Outcomes delivered by a later spec are waived in the coherence\n  mapping, each naming the later spec as its home. Leave the counterpart empty; do not invent a\n  placeholder id such as `none`. The draft stories and plan slices for later specs travel with\n  their follow-up intakes.\n\nThe ADR records the whole design once, with the split and the flag among its decisions; each spec\nthen plans only its own slice. If the operator declines the split, record that decision. A plan\nabove the ceiling then needs a `**Scope-exception:**` with that decision as its rationale.\n\n### 4. Architectural Alignment\n\nCheck the proposed design against documented architecture:\n\n**Domain boundaries:**\n- Does the design respect existing module\u002Fdomain boundaries?\n- Does it introduce coupling between domains that should be independent?\n- Are database queries staying within their domain, or reaching across to other domains' tables?\n\n**Pattern consistency:**\n- Does the implementation approach match existing patterns (service objects, concerns, etc.)?\n- If it establishes a new structural pattern, is there an ADR justifying the departure?\n\n**State management:**\n- Can invalid states be represented in the proposed data model?\n- Are state transitions explicit (enum\u002Fstate machine) or implicit (boolean flags)?\n- Does the proposal use `is_*` boolean flags where an enum would prevent invalid combinations?\n\n**Diagram accuracy:**\n- Do architecture diagrams in `.docs\u002Farchitecture\u002F` reflect the current architecture?\n- If new containers, services, or external integrations have been added, are diagrams updated?\n- Reference diagrams when assessing domain boundaries and coupling.\n\n**Worktree isolation:**\n- Does the new infrastructure use the `.env` \u002F `.env.local` boundary pattern?\n- Are new services added to shared infrastructure (Docker) or per-worktree?\n- If new ports or databases are introduced, are they parameterized via environment variables?\n- Would two worktrees running simultaneously conflict on any resource (port, DB name, file path, queue name)?\n\n**Security boundaries:**\n- Are new endpoints authenticated and authorized?\n- Does the data model expose sensitive fields that should be filtered?\n- Are there new user inputs that need validation at the boundary?\n\n**Production DI defaults:**\n- Verify that production dependency injection defaults use persistent stores (PostgreSQL,\n  Redis, filesystem) — not in-memory implementations\n- Flag any `InMemory*`, `Fake*`, or `Stub*` class registered as a production default\n- **BLOCKED if production DI defaults use in-memory stores for stateful data** — this means\n  data loss on restart and test\u002Fprod divergence when acceptance tests override DI\n\n### 5. Domain Integrity Pre-Check\n\nBefore stories and the plan are written, check the proposed design for domain modeling issues:\n\n| Principle | Check | Veto If |\n|---|---|---|\n| **No primitive obsession** | Design uses domain types, not raw strings\u002Fints | IDs, statuses, money, or email stored as primitives |\n| **Parse, don't validate** | Validation at construction, trusted types throughout | Design validates same field in multiple places |\n| **Invalid states unrepresentable** | Type system prevents impossible combinations | Booleans where enums should exist, nullable fields that must be present |\n| **Semantic types** | Types answer \"what IS this?\" not \"what is this LIKE?\" | `NonEmptyString` instead of `UserName` |\n| **Exhaustive matching** | No catch-all defaults for domain states | `else` \u002F `default` on status\u002Ftype switches |\n\n### 6. Risk Register\n\n```markdown\n| Risk | Type | Likelihood | Impact | Mitigation |\n|---|---|---|---|---|\n| Concurrent moves corrupt positions | Data | Medium | High | Row-level locking in transaction |\n```\n\nRisk types: **Technical**, **Integration**, **Data**, **Performance**, **Security**, **Knowledge**\n\n### 7. ADR Creation — Structural Prerequisite and Decision Categories\n\nA new ADR is warranted only for a real structural decision. Structural change is a necessary\nprerequisite: decision categories never independently require an ADR. First determine whether the\nproposal establishes or revises one of these durable architectural shapes:\n\n- a system boundary, including a bounded context or deployment boundary;\n- component or service decomposition, including merging services or assigning cross-module ownership;\n- an integration pattern, including an external API seam, anti-corruption layer, or asynchronous callback boundary;\n- state or data architecture, including a persistence model, event-store boundary, or durable state-transition design; or\n- foundational technology, including a runtime, framework, database, messaging, queuing, or caching platform.\n\nUse the categories only after that structural prerequisite is met, to make the decision explicit\nand reviewable. Importance, breadth, workflow policy, prompt wording, and ordinary implementation detail\nare not sufficient ADR triggers. A small change may still warrant an ADR when it makes one\nof the structural decisions above; a broad or important change does not when it does not.\n\nBefore drafting, read `.docs\u002Fdecisions\u002F` for an APPROVED ADR that already governs the structural\ndecision. Reuse an existing governing ADR rather than duplicate it. Cite and apply it when it\ncovers the proposal; draft a new ADR only for an uncovered structural decision, or supersede the\nexisting ADR when the structural decision itself changes.\n\n**ADR format:** Use `templates\u002Fadr.md.template` (relative to this skill's own directory). Name each ADR\n`.docs\u002Fdecisions\u002Fadr-YYYY-MM-DD-\u003Ckebab-slug>.md` — date plus a short descriptive slug — and title it\n`# ADR: \u003Ctitle>` (the heading carries **no** number). **Never use a sequential number, in the\nfilename or the heading:**\n\n- ❌ WRONG: `adr-0001-ci-fix.md` with heading `# ADR-0001: …`\n- ✅ RIGHT: `adr-2026-07-20-ci-fix.md` with heading `# ADR: …`\n\nSequential numbers collide when parallel worktrees each grab \"the next number\"; the date+slug never\ncollides and IS the ADR's identifier — cite the **filename stem** (never a number) when superseding\nor referencing one. If two ADRs land on the same date, the slug disambiguates. This applies to newly\ncreated ADRs only — existing numbered ADRs keep their names (append-only). (A deterministic gate to\nreject number-named ADRs is tracked in intake #705.)\nADRs are append-only — supersede, don't delete. Every claim about external dependency behavior\nmust cite specific evidence (documentation, tested behavior, or source code).\n\nThe template's `## Assumptions` ledger table is required in every new ADR. This requirement is\nenforced at land and by the `architecture_review` gate. For each load-bearing assumption whose\nBasis is not `verified`, record the approval exactly as `APPROVED by operator YYYY-MM-DD`.\n\n**Lightweight mode (Medium tier):** Apply the same structural prerequisite and reuse check. Do not\nskip an ADR merely because the feature is medium-sized, but do not create one merely because a\ncategory label, feature size, or importance is present.\n\n**GATE: If a proposed change makes an uncovered structural decision above, architecture-review\nMUST create an ADR before implementation proceeds. An architecture review that creates or omits an\nADR without first applying the structural prerequisite and governing-ADR reuse check is incomplete.**\n\n### 7b. ADR Approval Lifecycle\n\nADRs follow a three-phase lifecycle. No ADR becomes authoritative without human approval.\nTerminal ADR declarations use only `Status: APPROVED` or `Status: SUPERSEDED by \u003Cadr-filename-stem>`.\n\n**Phase 1: DRAFT**\n- Architecture-review creates the ADR with `Status: DRAFT` in the frontmatter\n- DRAFT ADRs are written to `.docs\u002Fdecisions\u002F` as `adr-YYYY-MM-DD-\u003Ckebab-slug>.md` (see §7)\n- DRAFT ADRs cannot be cited as justification in `build_review`, as-built review, or\n  implementation decisions — they are proposals, not decisions\n\n**Phase 2: REVIEW**\n- All DRAFT ADRs created during architecture-review are presented to the user for approval\n  via `review_artifacts` (clear screen, one at a time)\n- When an ADR contains a Mermaid diagram and a `mermaid_renderer` is configured\n  (`~\u002F.ai-conductor\u002Fconfig.yml`), `review_artifacts` renders it to a visual so the user\n  approves what they can see; with no renderer it falls back to the raw Markdown (never blocks)\n- The user approves, rejects (launches interactive Claude to revise), or requests changes\n- On approval, status is updated to `Status: APPROVED` and the ADR becomes authoritative\n- On rejection, the ADR is revised in-place and re-presented until approved\n\n**Phase 3: AUTHORITATIVE**\n- Only `Status: APPROVED` ADRs are binding on downstream work\n- `build_review`, the as-built review, and `\u002Ffinish` may cite APPROVED ADRs\n- If a subsequent feature conflicts with an APPROVED ADR, the conflict must be resolved by\n  either superseding the ADR (new ADR with `Supersedes: \u003Cold>`) or changing the implementation\n- Superseded ADRs get `Status: SUPERSEDED` and a `Superseded by:` reference\n\n**HARD GATE: No feature proceeds past architecture-review with DRAFT ADRs. All ADRs created\nduring the review must reach APPROVED status before `\u002Fstories` can begin.**\n\n### 8. Output\n\nWrite the review to `.docs\u002Fdecisions\u002Farchitecture-review-YYYY-MM-DD-\u003Cfeature>.md`:\n\n```markdown\n# Architecture Review: [Feature Name]\n**Date:** YYYY-MM-DD\n**Inputs reviewed:** [PRD functional requirements, or explore output for the technical track]\n**Verdict:** APPROVED | APPROVED WITH CONDITIONS | BLOCKED\n\n## Feasibility\n## Complexity\n## Alignment\n## Domain Integrity\n## Wiring Surface (required for Medium\u002FLarge tier — see below; omit for Small)\n## Risks\n## ADRs Created\n## Conditions (if APPROVED WITH CONDITIONS)\n## Blocking Issues (if BLOCKED)\n```\n\n**Wiring Surface (design-time, Medium\u002FLarge tier only):** For each new production surface\nthe feature introduces (exported function\u002Fmodule, hook script, config key, emitted event,\nscheduled job, CLI subcommand, etc.), state at design time where\u002Fhow it will be called from\nin production — e.g. \"handled by the existing `POST \u002Forders` route,\" \"registered in the\nCLI's command table,\" \"consumed by the existing event subscriber in `src\u002Fx.ts`.\" This is a design-time commitment, not a code citation — no `file:line` is\nrequired yet since the code doesn't exist. It informs the review's feasibility and overlap\nanalysis; it is not a per-task plan contract.\n\nThis is **DESIGN-TIME ONLY**. It does not affect, duplicate, or substitute for the §12\nAs-Built Compliance Gate's production reachability sweep, which independently verifies the\n*shipped* code against real `file:line` callers after implementation. Leave §12 untouched —\nthe two checks run at different phases against different evidence (a stated intent here vs.\nan observed caller there).\n\nNot required for **Small** tier features (the DECIDE-time review is skipped for Small per the\nLightweight Mode section above; §12 still runs at SHIP).\n\n**Early overlap scan (Medium\u002FLarge tier):** Before `\u002Fplan` runs, run `ai-conductor overlap-scan\n--files \u003CWiring Surface candidate paths>` over the paths named in `## Wiring Surface` above.\nSurface the rendered report to the author alongside the review output. This is **advisory\nonly** — it never blocks the verdict or the review — it exists to flag unmerged dependent\nwork touching the same files before `\u002Fplan` locks in a task breakdown that could collide\nwith it.\n\n### 9. Verdict Enforcement\n\n**APPROVED** — Proceed to `\u002Fstories`.\n\n**APPROVED WITH CONDITIONS** — Proceed; conditions tracked in the plan. `build_review` and as-built review check conditions. Unmet conditions at `\u002Ffinish` are blocking.\n\n**BLOCKED** — Pipeline HALTS. Present to the user: what is violated, resolution options with trade-offs, and which ADRs are in conflict. The user must explicitly approve a resolution. Do not auto-resolve. Capture the resolution as a new ADR only when resolving it makes or changes a structural decision; resolve non-structural blockers without an ADR. Re-run the review.\n\n### 10. Recurring Review (Pipeline Batch Boundaries)\n\nAt pipeline batch boundaries, perform a lightweight architecture check:\n\n- Has the implementation drifted from the approved plan?\n- Have new structural patterns been introduced without an ADR?\n- Are domain boundaries being respected in the actual code?\n- Are architecture diagrams still accurate after this batch's changes?\n- Escalation: non-blocking findings that appear in 2+ consecutive reviews become blocking\n\nIf drift is detected at a batch boundary:\n1. For drift that makes or changes a structural decision, write a new ADR documenting what changed and why (or that it was unintentional); otherwise record the drift without creating an ADR\n2. If the drift violates a prior ADR: BLOCK — human must decide whether to update the ADR\n   or revert the code\n\n### 11. Signal Review Requirement\n\nBefore exiting, decide whether the conductor should prompt the user to review\nthe architecture report and ADRs. Review mode for this step is **conditional** —\nauto-approved unless you write a marker file.\n\nWrite `.pipeline\u002Freview-required-architecture_review` (any content; the file's\nexistence is the signal) if ANY of the following is true:\n\n- Verdict is **APPROVED WITH CONDITIONS** or **BLOCKED**\n- Any new ADR was drafted (DRAFT ADRs must be approved before they become authoritative)\n- Any existing ADR was superseded\n- Any risk with Impact=High was entered in the Risk Register\n- Batch-boundary review found drift from the approved plan\n\nIf the verdict is a clean **APPROVED** with zero new\u002Fsuperseded ADRs and no\nHigh-impact risks, do NOT write the marker — the conductor auto-approves and\nmoves to the next step.\n\n```bash\n# Example: write the marker when review flagged issues\nmkdir -p .pipeline\necho \"verdict: APPROVED_WITH_CONDITIONS, new ADRs: 2\" > .pipeline\u002Freview-required-architecture_review\n```\n\n### 12. As-Built Compliance Gate (`--as-built` mode)\n\nInvoked at **SHIP** as `\u002Farchitecture-review --as-built`. It runs for **every feature**, including\nSmall features and features whose DECIDE-time review was skipped. It does **no** new design or\nfeasibility\u002Fcomplexity assessment.\n\n**Managed as-built review.** When the engine dispatches `--as-built`, it supplies the bounded,\nversioned input projection, check policy, and terminal native structured-result shape. Treat those\nas the complete machine contract: judge the supplied evidence and return one terminal structured\nverdict that conforms to the supplied shape. Do not recreate engine input collection, substitute a\nMarkdown report for that verdict, write a managed verdict artifact, alter ADRs or decisions, or\nchoose a gate route. The engine validates, persists, renders, and routes the result.\n\n**Standalone as-built review.** When a human invokes `--as-built` outside the managed engine step,\npresent a human-readable advisory judgment from the available architecture, source, and history\nevidence. It is not current managed gate evidence. Do not write managed verdict artifacts,\noperator-decision stores, or routing state; the human or engine owns any follow-up action.\n\n**Per-check policy:** Read the supplied `AS-BUILT CHECK POLICY` before reviewing. Apply every\ncheck marked `on`, do not infer obligations from a check marked `off`, and record each off check\nwith its supplied reason. By default, `reachability` and `planGap` apply at every tier;\n`adrCompliance` applies only when APPROVED ADRs exist; and `diagramDrift` applies only when\ndiagrams exist. Operator configuration can disable any check for a tier. Missing ADRs or diagrams\ntherefore disable only their respective check — never this SHIP gate.\n\n**Relationship to BUILD-time judgement:** BUILD no longer judges reachability ([ADR](..\u002F..\u002F.docs\u002Fdecisions\u002Fadr-2026-08-14-retire-build-review-wiring-rubric.md));\nthis SHIP sweep is unchanged and never relies on BUILD proof as authority.\n\n**Scope (only this):**\n- For `adrCompliance`, load only the **APPROVED** ADRs (`.docs\u002Fdecisions\u002F`, `Status: APPROVED`).\n  DRAFT\u002FSUPERSEDED ADRs are not authoritative and are not gated against (per §7b). For\n  `diagramDrift`, compare the shipped code with the approved architecture diagrams\n  (`.docs\u002Farchitecture\u002F`).\n- For each enabled check, compare the shipped source with its governing evidence: new structural\n  patterns without an ADR, domain-boundary violations, or diagram drift are relevant only when the\n  corresponding check is on.\n- **Production reachability sweep (green-but-unwired guard).** For each primitive this\n  feature's diff introduces or materially changes — exported functions\u002Fmodules, hook scripts,\n  config keys, emitted events, ADR-promised log lines — trace ONE invocation path from a real\n  production entry point (a public API or route, CLI command dispatch, a job or worker, an event\n  consumer, a framework hook, or the project's equivalent) and cite the caller as `file:line`. Test files, fixtures, and the\n  primitive's own module do not count as callers, except for the narrow same-file composition\n  case below.\n  - **Narrow same-file composition exception.** Independently verify the complete **root-to-caller-to-export** chain in the current shipped source: a configured production\n    entry point reaches the defining module through non-test edges; an actual production caller in\n    that module references the exact changed export. Derive that caller from current source rather\n    than from a plan declaration. Cite the root\u002Fmodule chain and caller-to-export reference as `file:line`.\n    A same-file exception passes only with an exact caller-to-export reference and a production-entry-point root chain.\n    An own-module caller alone, module reachability alone, or a name\u002Ftext match alone does not count.\n    This exception never permits a dead helper, a test-only path, a shadowed binding, or an\n    unavailable\u002Fambiguous reachability analysis to pass.\n  - **Current-source authority.** A persisted BUILD `same-file-composition` proof is corroborating context only, never authority for this SHIP review. Re-resolve the root-to-caller-to-export\n    chain against current shipped source at the reviewed HEAD. A stale BUILD proof does not count or pass the exception; neither does a missing current-source hop or changed caller\u002Fexport.\n  - **No production caller exists** → this is a **BLOCKED** violation (\"unreachable rung\"), same\n    severity as an ADR violation: shipped-tested-green code nothing invokes is not shipped\n    behavior. Name the primitive and what was searched.\n    In the structured verdict, record it as a `reachability` entry with an empty `callerChain`\n    (`[]`); the engine admits an empty chain only under a `BLOCKED` verdict.\n    Classify it per the table under **Verdict meanings**. Never cite this section as the\n    governing reference.\n  - **Statically reachable but not yet observed running** (e.g. a new log line no production log\n    shows yet) → record it under Drift Notes as `UNEXERCISED: \u003Cprimitive> — signature: \u003Cthe\n    greppable line\u002Fevent that will prove it live>`. Not blocking; the signature tells a later\n    observer exactly what proves the behavior live in production.\n- **Plan-gap check.** When the shipped code faithfully implements the approved design but that\n  design is itself the limit that prevents an outcome the sealed story criteria require, issue\n  `PLAN_GAP`. Record the affected outcome and whether it was delivered; do not send unplanned work\n  back to BUILD.\n  - **Story criteria belong to `\u002Fprd-audit`.** `\u002Fprd-audit`, in the same validation group, grades\n    every story criterion and owns criterion-level findings. Issue `PLAN_GAP` here only when an\n    APPROVED ADR or approved diagram is the limit; a shortfall that names only a story or a desired\n    outcome is not an as-built finding. Never record a story, criterion, or desired outcome as a\n    BLOCKED finding's governing reference.\n  - **Outcome authority: the sealed story criteria.** The approved, sealed acceptance criteria under\n    `.docs\u002Fstories\u002F` are this feature's acceptance contract and the only authority for what outcome\n    was stated. `.docs\u002Fintake\u002F` is an idea capture that is **superseded** once stories are approved;\n    never grade the shipped code against it. Where intake and the stories disagree, the stories win:\n    a deliberate narrowing recorded in an amended, resealed story is the decision, not a plan gap.\n- **Exhaustive sweep per judged decision (one pass, every site).** For each ADR decision, diagram\n  element, or reachability primitive you judge, enumerate EVERY violating site in the reviewed diff\n  in this verdict — one BLOCKED finding per site, or one finding whose summary lists every site as\n  `file:line`. Never stop at the first violation of a decision: a decision with nine violating\n  sites reported one per lap costs nine laps. Brief each delegated subagent to return all sites,\n  not an example.\n  - **Re-review laps.** When the supplied context shows prior as-built findings, judge (a) whether\n    each prior finding is resolved, and (b) the code changed since the judged lap. Do not raise a\n    first-time finding against code unchanged since a prior lap unless that lap could not have seen\n    it (for example, the check was off or the evidence did not exist then); say why in the finding.\n- **Delegated evidence gathering.** The window that matters is the reviewer's own: it holds the\n  verdict. Keep it for judgement and push the reading into subagents through the host's facility\n  (Claude Code: the Agent tool; Codex: `collaboration.spawn_agent` \u002F `collaboration.wait_agent`),\n  the same way §\"Provider-native delegation\" already allows:\n  - One subagent per enabled check cluster: the APPROVED-ADR set (one per ADR when several apply),\n    the diagram set, the changed-primitive reachability sweep (split by module when the diff is\n    wide), and the plan-gap check against the sealed stories.\n  - Each subagent returns a **digest**, not a transcript: the governing clause quoted verbatim with\n    its path, the shipped code quoted verbatim with `file:line`, the caller chain for\n    reachability, and a candidate disposition with confidence. Cap a digest at roughly two thousand\n    words; anything larger is the subagent forwarding its reads instead of doing them.\n  - The reviewer grades from the digests, re-reads only the lines it needs to settle a disagreement,\n    and owns every verdict. A subagent never writes the report, the verdict, or an ADR.\n  - **Model tiers.** The reviewer stays on this skill's pinned tier; do not trade it down to pay for\n    fan-out. Reading and extraction subagents run on the host's mid tier\n    (Claude Code `model=\"sonnet\"`; Codex uses its configured default). Step a subagent up to the reviewer's\n    tier only when its task is adjudication — an adversarial re-check of one candidate BLOCKED\n    finding before it is recorded.\n  - Subagents inherit the context budget above. A subagent that cannot finish within it reports\n    what it covered and what it did not; the reviewer records the uncovered surface as unverified\n    rather than silently passing it.\n- **Validator discipline (MUST — copy verbatim into every subagent brief).** Both rules below are\n  operator rules on the reviewer and on every subagent it delegates to. Include them **verbatim** in\n  each subagent brief; a subagent that never received them is not bound by them.\n  1. **Read-only evidence.** The validator and every subagent it delegates to MUST NOT execute\n     tests, typecheck, lint, build, the integrity script, or any command that runs project code —\n     including `vitest`, `npm test`\u002F`npm run`, `npx`, `node -e` probes over project modules, and\n     bash test scripts. Evidence is what the source and committed artifacts say: `file:line`, test\n     names read from test source, source-control evidence, and `Scope:` trailers. Reachability is\n     proved by citing the caller chain in the source, never by running it. If a check cannot be\n     judged without running code, grade it from the evidence available and say so in the rationale;\n     never run it. Nothing is written, staged, or committed.\n  2. **Never yield with delegated work outstanding.** The validator MUST NOT end its turn while any\n     subagent it spawned has not returned. Collect every digest before grading; if a subagent is\n     slow, wait for it — do not summarize partial results and do not report progress in place of a\n     verdict.\n- Do NOT re-run §2\u002F§3\u002F§5 (feasibility\u002Fcomplexity\u002Fdomain pre-checks) — those belong to the DECIDE\n  pass. This is a code-vs-approved-design pattern match plus the reachability sweep above,\n  deliberately cheap.\n\n**Verdict meanings**\n- **APPROVED** — shipped code matches the approved architecture. Proceed to finish.\n- **APPROVED WITH DRIFT NOTES** — minor, non-violating drift (e.g. a diagram is now slightly stale,\n  a pattern was extended consistently). Record the drift; proceed. Note it for a follow-up ADR only\n  when it makes or changes a structural decision; otherwise no ADR is needed, and it does not block.\n- **PLAN_GAP** — the shipped code faithfully implements the approved design, but the design is the\n  limit preventing an outcome the sealed story criteria require. Record whether the outcome was\n  delivered; an undelivered outcome HALTs for a human. Never turn this finding into unplanned BUILD work.\n- **BLOCKED** — an enabled check found an architectural violation, such as an APPROVED-ADR\n  violation or an unreachable production rung. Each finding's class decides who resolves it:\n  `REMEDIABLE` findings route back to BUILD as bounded repairs against their cited plan task or ADR\n  decision; `DESIGN` findings HALT for a human, who must fix the code to comply, or for an ADR\n  violation supersede the ADR with a new, human-APPROVED ADR\n  (`Supersedes: \u003Cold>`, old → `Status: SUPERSEDED`). **Never silently downgrade** an APPROVED ADR\n  or auto-resolve the violation. After resolution, re-run the as-built gate.\n\nClassify each BLOCKED finding — `REMEDIABLE` (the approved design already requires bounded BUILD\nwork) or `DESIGN` (a human architectural decision is required) — with its typed governing reference:\n\n| Finding | Class | Governing reference |\n|---|---|---|\n| Unreachable rung; a plan task introduced the primitive | `REMEDIABLE` | `task \u003Cid>` of that plan task |\n| Unreachable rung; no plan task or approved entry point covers it | `DESIGN` | the APPROVED ADR decision it conflicts with |\n| Code diverges from an APPROVED ADR decision the plan already requires | `REMEDIABLE` | `\u003Cadr-stem> D\u003Cn>` |\n| Complying needs a changed or new architectural decision | `DESIGN` | `\u003Cadr-stem> D\u003Cn>` |\n| Story criterion or desired outcome unmet | none | out of scope; `\u002Fprd-audit` owns it |\n\nWrite a plan-task reference as `task \u003Cid>` exactly, not `plan task \u003Cid>` or `Task \u003Cid>`.\n\n## Verification\n\n- [ ] Every PRD functional requirement (product) or technical-intent item (technical) assessed for feasibility\n- [ ] Complexity rated for the proposed design\n- [ ] Alignment checked against .docs\u002Fdecisions\u002F and CLAUDE.md\n- [ ] Domain integrity pre-checked\n- [ ] Risk register populated\n- [ ] **Medium\u002FLarge tier:** `## Wiring Surface` section present, naming where each new\n      production surface will be called from — BLOCKS approval if missing (not required\n      for Small; design-time only, does not affect §12 as-built reachability sweep)\n- [ ] ADR created only for each uncovered structural decision; existing governing ADRs cited and reused\n- [ ] Review written to .docs\u002Fdecisions\u002F\n- [ ] Verdict issued (APPROVED \u002F CONDITIONS \u002F BLOCKED)\n- [ ] Architecture diagrams reviewed for accuracy against current implementation\n- [ ] BLOCKED verdicts halt pipeline and require human resolution\n- [ ] `.pipeline\u002Freview-required-architecture_review` marker written IF\n      verdict ≠ clean APPROVED, or any ADR was drafted\u002Fsuperseded, or any\n      High-impact risk was registered (skip only on truly clean APPROVED)\n- [ ] **As-built mode:** BLOCKED on any enabled APPROVED-ADR violation; resolved by code fix or\n      human-approved superseding ADR (never silent downgrade)\n","## Purpose\n\nReviews the design through an architectural lens BEFORE stories are written and before any code.\nCatches technical infeasibility, hidden complexity, architectural drift, and domain violations\nearly — when they're cheap to fix. This is where the *how* is resolved (so the PRD stays\nproduct-only) and captured as APPROVED ADRs.\n\nRead the `Scope boundary:` from `.docs\u002Ftrack\u002F\u003Cslug>.md` as binding; preserve the confirmed narrow\u002Fcomprehensive breadth outcome; do not permit a materially broader expansion beyond it unless the operator confirms before it enters the artifact.\n\n**Run after `\u002Fprd` (product track) or `\u002Fexplore` (technical track), and BEFORE `\u002Fstories`** (adr-2026-06-29-architecture-before-stories-convergent-kickback).\nThe review's input is the PRD's functional requirements (product) or the explore output + technical\nintent (technical) — stories and the plan do not exist yet at this point.\n\nAlso invocable at pipeline batch boundaries to verify implementation stays architecturally sound.\n\n**Correctness gate:** an ADR is the most load-bearing artifact in the flow — everything downstream\nbuilds on it. Apply the `\u002Fverify-claims` protocol before writing any APPROVED ADR: state each\ntechnical claim with a grounded confidence % and its basis (verified vs inferred), surface every\nassumption the design rests on, and HARD-BLOCK (operator approval interactive, HALT if autonomous)\non any unconfirmed assumption that would change the decision. Do not record a decision as APPROVED\nwhile it rests on an unconfirmed load-bearing assumption.\n\n### Provider-native delegation\n\nWhen this review delegates exploration or analysis, use the selected host's available subagent facility.\nPreserve the scope limits, evidence, ADR output, and veto\u002Fgate behavior regardless of host.\n**Claude delegation:** Claude uses the Agent tool; any Claude model choice is confined to\nthat facility. A Codex-selected run uses its available subagent facility and configured Codex\nprovider policy, without translating Claude model names.\n\n### Full vs amendment mode (convergence — adr-2026-06-29-architecture-before-stories-convergent-kickback)\n\n- **Full pass** — the pre-stories run above: full feasibility\u002Falignment, produces APPROVED ADRs.\n- **Amendment pass** — when a later step (`stories` or `conflict-check`) re-opens architecture with a\n  specific **structural** gap, address ONLY that gap; do not re-derive the design from scratch. This\n  is what makes the loop converge instead of oscillate.\n\nOnly a genuine structural gap (a missing component\u002Fseam\u002Fboundary) may re-open architecture — never a\nstory-phrasing nit or a coverage gap. The conductor caps re-openings and HALTs for a human on excess.\n\n**Accepted-artifact amendment:** When this review concludes that an accepted DECIDE assertion is\nfalsified, amend that non-story artifact during the DECIDE pass; do not instruct a later phase to\nmake the change. If it is already on the base branch, add this note beside the original assertion:\n\n```markdown\n> **Amended YYYY-MM-DD by #NNN:** \u003Cwhat the assertion now says, and why>\n```\n\nFor every non-story artifact, the note is additive only when the artifact is already on the base\nbranch: add the note; the original assertion remains preserved; never rewrite or delete it, and\ncreate no separate record. Story artifacts under `.docs\u002Fstories\u002F` are the exception: replace\nsuperseded assertions in place without an amendment record. The amended artifact is then part of\nthe spec-branch baseline before BUILD begins.\n\nAn accepted DECIDE artifact absent from the base branch is a draft: revise it in place, remove\nsuperseded text, and add no amendment note or revision log.\n\n### Lightweight Mode (Medium Complexity Tier)\n\nWhen the feature is classified as **Medium** by `\u002Fconduct`'s complexity assessment, run only:\n- **Section 2: Technical Feasibility** — full check\n- **Section 4: Architectural Alignment** — full check\n\nSkip:\n- Section 3 (Complexity Assessment) — already done by `\u002Fconduct`\n- Section 5 (Domain Integrity Pre-Check) — handled by TDD domain reviewer per-cycle\n- Section 7 (mandatory ADR creation) — only create ADRs for genuinely novel architectural decisions\n\n**Explore agent limits for Medium tier:** Max 2 agents with non-overlapping scopes:\n- Agent 1: the PRD\u002Fspec (`.docs\u002Fspecs\u002F`) — its FRs are the review input (stories\u002Fplan don't exist yet)\n- Agent 2: relevant source files for the feature area\n- Do NOT dispatch agents solely to read `.memory\u002F`; this active workflow reads relevant entries\n  directly when it needs them\n- Do NOT dispatch a third agent for decisions\u002FADRs (read `.docs\u002Fdecisions\u002F` directly if needed)\n\nFor **Small** features, the DECIDE-time architecture review is skipped by `\u002Fconduct`. This does\nnot skip the §12 as-built compliance gate at SHIP.\nFor **Large** features, run the full review (all sections).\n\n## Practices\n\n### 1. Load Architecture Context\n\nRead in order of authority (higher overrides lower):\n\n1. `.docs\u002Fdecisions\u002F` — ADRs are the authoritative architecture reference\n2. `.docs\u002Farchitecture\u002F` — C4 diagrams (system context, containers, components, ERD, sequences)\n3. `CLAUDE.md` — Project conventions and constraints\n4. `.memory\u002Fdecisions\u002F` — Prior architectural decisions\n5. Existing code structure — `config\u002Froutes.rb`, model relationships, directory layout\n\n**Approved decisions first; convention over precedent:** Applicable APPROVED decisions override\nobserved patterns. Existing code that conflicts with a documented decision is tech debt and must\nbe rejected as precedent. Never downgrade a finding because \"the codebase already does it this\nway.\"\n\n**Focused local pattern basis (when applicable):** When a concrete local precedent matters to a\nfeature concern that approved decisions do not already settle, record it in the review's ordinary\nprose. Keep the basis bounded to that concern and include:\n\n- the precedent's role;\n- the material semantic traits the new work should preserve;\n- why that precedent applies to this concern;\n- the variation that remains allowed; and\n- path and stable-symbol hints that help BUILD rediscover an equivalent on its current HEAD.\n\nHints are rediscovery seeds, not authoring-time snapshots: never anchor this basis to line numbers\nor require the original exemplar to remain at a fixed coordinate. BUILD must resolve the traits\nagainst its checkout at implementation time. A selected pattern does not establish a project-wide\nconvention or configuration rule, and it does not replace the separate exact-replication\n`Pattern-source` \u002F `Rename-map` contract.\n\nWhen no suitable precedent can be verified, record that verified no-fit in the ordinary review\nprose rather than inventing an exemplar. When the in-scope approach requires departing from an\notherwise applicable pattern, record the operator-authorized bounded departure, its reason, and\nits boundary before handing the approach to BUILD. Do not add this optional basis when no local\nprecedent affects the approach.\n\n### 2. Technical Feasibility\n\nFor each PRD functional requirement (product track) or each part of the explore output's technical\nintent (technical track), assess the proposed design:\n\n| Check | Question | Flag If |\n|---|---|---|\n| **Stack compatibility** | Can this be built with the current stack? | Requires new gems\u002Fpackages, external services, or infrastructure changes |\n| **Prerequisites** | What must exist before this can start? | Migrations, config changes, external account setup needed |\n| **Integration surface** | What other systems\u002Fmodules does this touch? | Crosses 3+ module boundaries or hits external APIs |\n| **Data implications** | Schema changes, migrations, data backfills? | Large table migrations, breaking schema changes, data loss risk |\n| **Performance risk** | Will this create N+1s, unbounded queries, heavy computation? | List endpoints without pagination, missing indexes on query paths |\n| **Worktree isolation** | Can this run in parallel worktrees without conflicts? | New Docker services, ports, databases, or shared state without `.env` boundary pattern |\n\n### 3. Complexity Assessment\n\n| Level | Criteria | Action |\n|---|---|---|\n| **Low** | 1 model, 1 endpoint, no external deps | Proceed |\n| **Medium** | 2–3 models, cross-model logic, background jobs | Proceed with boundary attention |\n| **High** | 4+ models, external APIs, complex state machines | Consider splitting |\n| **Spike** | Unknown tech, unclear requirements, novel patterns | Time-box spike before planning |\n\n### 3a. Split a Large Design Before Stories\n\nEstimate the plan's task count here, from the approved design, before `\u002Fstories` runs. When the\nestimate approaches the plan's scope ceiling (20+ tasks; `\u002Fplan` §6 refuses 30+ at land without a\nscope exception), propose splitting the design into sequential specs and get the operator's\ndecision now. Splitting after stories and plan exist forces a full restructuring pass: stories,\nplan, coverage, coherence mapping, and waivers all have to be re-cut.\n\nA proposed split states:\n\n- **The specs, in order.** The first ships the foundation; each later spec is blocked by the one\n  before it, and every spec inherits the original intake's blocking edges.\n- **A default-off flag** that keeps the partially delivered behavior dark. Only the last spec turns\n  it on, so no intermediate merge changes production behavior.\n- **Reachability per spec.** Each spec ships only primitives that have a production caller inside\n  that same spec; otherwise the as-built review (§12) blocks them as unreachable. Move a\n  constructor, writer, or helper to the spec that first calls it.\n- **Where deferred outcomes live.** Outcomes delivered by a later spec are waived in the coherence\n  mapping, each naming the later spec as its home. Leave the counterpart empty; do not invent a\n  placeholder id such as `none`. The draft stories and plan slices for later specs travel with\n  their follow-up intakes.\n\nThe ADR records the whole design once, with the split and the flag among its decisions; each spec\nthen plans only its own slice. If the operator declines the split, record that decision. A plan\nabove the ceiling then needs a `**Scope-exception:**` with that decision as its rationale.\n\n### 4. Architectural Alignment\n\nCheck the proposed design against documented architecture:\n\n**Domain boundaries:**\n- Does the design respect existing module\u002Fdomain boundaries?\n- Does it introduce coupling between domains that should be independent?\n- Are database queries staying within their domain, or reaching across to other domains' tables?\n\n**Pattern consistency:**\n- Does the implementation approach match existing patterns (service objects, concerns, etc.)?\n- If it establishes a new structural pattern, is there an ADR justifying the departure?\n\n**State management:**\n- Can invalid states be represented in the proposed data model?\n- Are state transitions explicit (enum\u002Fstate machine) or implicit (boolean flags)?\n- Does the proposal use `is_*` boolean flags where an enum would prevent invalid combinations?\n\n**Diagram accuracy:**\n- Do architecture diagrams in `.docs\u002Farchitecture\u002F` reflect the current architecture?\n- If new containers, services, or external integrations have been added, are diagrams updated?\n- Reference diagrams when assessing domain boundaries and coupling.\n\n**Worktree isolation:**\n- Does the new infrastructure use the `.env` \u002F `.env.local` boundary pattern?\n- Are new services added to shared infrastructure (Docker) or per-worktree?\n- If new ports or databases are introduced, are they parameterized via environment variables?\n- Would two worktrees running simultaneously conflict on any resource (port, DB name, file path, queue name)?\n\n**Security boundaries:**\n- Are new endpoints authenticated and authorized?\n- Does the data model expose sensitive fields that should be filtered?\n- Are there new user inputs that need validation at the boundary?\n\n**Production DI defaults:**\n- Verify that production dependency injection defaults use persistent stores (PostgreSQL,\n  Redis, filesystem) — not in-memory implementations\n- Flag any `InMemory*`, `Fake*`, or `Stub*` class registered as a production default\n- **BLOCKED if production DI defaults use in-memory stores for stateful data** — this means\n  data loss on restart and test\u002Fprod divergence when acceptance tests override DI\n\n### 5. Domain Integrity Pre-Check\n\nBefore stories and the plan are written, check the proposed design for domain modeling issues:\n\n| Principle | Check | Veto If |\n|---|---|---|\n| **No primitive obsession** | Design uses domain types, not raw strings\u002Fints | IDs, statuses, money, or email stored as primitives |\n| **Parse, don't validate** | Validation at construction, trusted types throughout | Design validates same field in multiple places |\n| **Invalid states unrepresentable** | Type system prevents impossible combinations | Booleans where enums should exist, nullable fields that must be present |\n| **Semantic types** | Types answer \"what IS this?\" not \"what is this LIKE?\" | `NonEmptyString` instead of `UserName` |\n| **Exhaustive matching** | No catch-all defaults for domain states | `else` \u002F `default` on status\u002Ftype switches |\n\n### 6. Risk Register\n\n```markdown\n| Risk | Type | Likelihood | Impact | Mitigation |\n|---|---|---|---|---|\n| Concurrent moves corrupt positions | Data | Medium | High | Row-level locking in transaction |\n```\n\nRisk types: **Technical**, **Integration**, **Data**, **Performance**, **Security**, **Knowledge**\n\n### 7. ADR Creation — Structural Prerequisite and Decision Categories\n\nA new ADR is warranted only for a real structural decision. Structural change is a necessary\nprerequisite: decision categories never independently require an ADR. First determine whether the\nproposal establishes or revises one of these durable architectural shapes:\n\n- a system boundary, including a bounded context or deployment boundary;\n- component or service decomposition, including merging services or assigning cross-module ownership;\n- an integration pattern, including an external API seam, anti-corruption layer, or asynchronous callback boundary;\n- state or data architecture, including a persistence model, event-store boundary, or durable state-transition design; or\n- foundational technology, including a runtime, framework, database, messaging, queuing, or caching platform.\n\nUse the categories only after that structural prerequisite is met, to make the decision explicit\nand reviewable. Importance, breadth, workflow policy, prompt wording, and ordinary implementation detail\nare not sufficient ADR triggers. A small change may still warrant an ADR when it makes one\nof the structural decisions above; a broad or important change does not when it does not.\n\nBefore drafting, read `.docs\u002Fdecisions\u002F` for an APPROVED ADR that already governs the structural\ndecision. Reuse an existing governing ADR rather than duplicate it. Cite and apply it when it\ncovers the proposal; draft a new ADR only for an uncovered structural decision, or supersede the\nexisting ADR when the structural decision itself changes.\n\n**ADR format:** Use `templates\u002Fadr.md.template` (relative to this skill's own directory). Name each ADR\n`.docs\u002Fdecisions\u002Fadr-YYYY-MM-DD-\u003Ckebab-slug>.md` — date plus a short descriptive slug — and title it\n`# ADR: \u003Ctitle>` (the heading carries **no** number). **Never use a sequential number, in the\nfilename or the heading:**\n\n- ❌ WRONG: `adr-0001-ci-fix.md` with heading `# ADR-0001: …`\n- ✅ RIGHT: `adr-2026-07-20-ci-fix.md` with heading `# ADR: …`\n\nSequential numbers collide when parallel worktrees each grab \"the next number\"; the date+slug never\ncollides and IS the ADR's identifier — cite the **filename stem** (never a number) when superseding\nor referencing one. If two ADRs land on the same date, the slug disambiguates. This applies to newly\ncreated ADRs only — existing numbered ADRs keep their names (append-only). (A deterministic gate to\nreject number-named ADRs is tracked in intake #705.)\nADRs are append-only — supersede, don't delete. Every claim about external dependency behavior\nmust cite specific evidence (documentation, tested behavior, or source code).\n\nThe template's `## Assumptions` ledger table is required in every new ADR. This requirement is\nenforced at land and by the `architecture_review` gate. For each load-bearing assumption whose\nBasis is not `verified`, record the approval exactly as `APPROVED by operator YYYY-MM-DD`.\n\n**Lightweight mode (Medium tier):** Apply the same structural prerequisite and reuse check. Do not\nskip an ADR merely because the feature is medium-sized, but do not create one merely because a\ncategory label, feature size, or importance is present.\n\n**GATE: If a proposed change makes an uncovered structural decision above, architecture-review\nMUST create an ADR before implementation proceeds. An architecture review that creates or omits an\nADR without first applying the structural prerequisite and governing-ADR reuse check is incomplete.**\n\n### 7b. ADR Approval Lifecycle\n\nADRs follow a three-phase lifecycle. No ADR becomes authoritative without human approval.\nTerminal ADR declarations use only `Status: APPROVED` or `Status: SUPERSEDED by \u003Cadr-filename-stem>`.\n\n**Phase 1: DRAFT**\n- Architecture-review creates the ADR with `Status: DRAFT` in the frontmatter\n- DRAFT ADRs are written to `.docs\u002Fdecisions\u002F` as `adr-YYYY-MM-DD-\u003Ckebab-slug>.md` (see §7)\n- DRAFT ADRs cannot be cited as justification in `build_review`, as-built review, or\n  implementation decisions — they are proposals, not decisions\n\n**Phase 2: REVIEW**\n- All DRAFT ADRs created during architecture-review are presented to the user for approval\n  via `review_artifacts` (clear screen, one at a time)\n- When an ADR contains a Mermaid diagram and a `mermaid_renderer` is configured\n  (`~\u002F.ai-conductor\u002Fconfig.yml`), `review_artifacts` renders it to a visual so the user\n  approves what they can see; with no renderer it falls back to the raw Markdown (never blocks)\n- The user approves, rejects (launches interactive Claude to revise), or requests changes\n- On approval, status is updated to `Status: APPROVED` and the ADR becomes authoritative\n- On rejection, the ADR is revised in-place and re-presented until approved\n\n**Phase 3: AUTHORITATIVE**\n- Only `Status: APPROVED` ADRs are binding on downstream work\n- `build_review`, the as-built review, and `\u002Ffinish` may cite APPROVED ADRs\n- If a subsequent feature conflicts with an APPROVED ADR, the conflict must be resolved by\n  either superseding the ADR (new ADR with `Supersedes: \u003Cold>`) or changing the implementation\n- Superseded ADRs get `Status: SUPERSEDED` and a `Superseded by:` reference\n\n**HARD GATE: No feature proceeds past architecture-review with DRAFT ADRs. All ADRs created\nduring the review must reach APPROVED status before `\u002Fstories` can begin.**\n\n### 8. Output\n\nWrite the review to `.docs\u002Fdecisions\u002Farchitecture-review-YYYY-MM-DD-\u003Cfeature>.md`:\n\n```markdown\n# Architecture Review: [Feature Name]\n**Date:** YYYY-MM-DD\n**Inputs reviewed:** [PRD functional requirements, or explore output for the technical track]\n**Verdict:** APPROVED | APPROVED WITH CONDITIONS | BLOCKED\n\n## Feasibility\n## Complexity\n## Alignment\n## Domain Integrity\n## Wiring Surface (required for Medium\u002FLarge tier — see below; omit for Small)\n## Risks\n## ADRs Created\n## Conditions (if APPROVED WITH CONDITIONS)\n## Blocking Issues (if BLOCKED)\n```\n\n**Wiring Surface (design-time, Medium\u002FLarge tier only):** For each new production surface\nthe feature introduces (exported function\u002Fmodule, hook script, config key, emitted event,\nscheduled job, CLI subcommand, etc.), state at design time where\u002Fhow it will be called from\nin production — e.g. \"handled by the existing `POST \u002Forders` route,\" \"registered in the\nCLI's command table,\" \"consumed by the existing event subscriber in `src\u002Fx.ts`.\" This is a design-time commitment, not a code citation — no `file:line` is\nrequired yet since the code doesn't exist. It informs the review's feasibility and overlap\nanalysis; it is not a per-task plan contract.\n\nThis is **DESIGN-TIME ONLY**. It does not affect, duplicate, or substitute for the §12\nAs-Built Compliance Gate's production reachability sweep, which independently verifies the\n*shipped* code against real `file:line` callers after implementation. Leave §12 untouched —\nthe two checks run at different phases against different evidence (a stated intent here vs.\nan observed caller there).\n\nNot required for **Small** tier features (the DECIDE-time review is skipped for Small per the\nLightweight Mode section above; §12 still runs at SHIP).\n\n**Early overlap scan (Medium\u002FLarge tier):** Before `\u002Fplan` runs, run `ai-conductor overlap-scan\n--files \u003CWiring Surface candidate paths>` over the paths named in `## Wiring Surface` above.\nSurface the rendered report to the author alongside the review output. This is **advisory\nonly** — it never blocks the verdict or the review — it exists to flag unmerged dependent\nwork touching the same files before `\u002Fplan` locks in a task breakdown that could collide\nwith it.\n\n### 9. Verdict Enforcement\n\n**APPROVED** — Proceed to `\u002Fstories`.\n\n**APPROVED WITH CONDITIONS** — Proceed; conditions tracked in the plan. `build_review` and as-built review check conditions. Unmet conditions at `\u002Ffinish` are blocking.\n\n**BLOCKED** — Pipeline HALTS. Present to the user: what is violated, resolution options with trade-offs, and which ADRs are in conflict. The user must explicitly approve a resolution. Do not auto-resolve. Capture the resolution as a new ADR only when resolving it makes or changes a structural decision; resolve non-structural blockers without an ADR. Re-run the review.\n\n### 10. Recurring Review (Pipeline Batch Boundaries)\n\nAt pipeline batch boundaries, perform a lightweight architecture check:\n\n- Has the implementation drifted from the approved plan?\n- Have new structural patterns been introduced without an ADR?\n- Are domain boundaries being respected in the actual code?\n- Are architecture diagrams still accurate after this batch's changes?\n- Escalation: non-blocking findings that appear in 2+ consecutive reviews become blocking\n\nIf drift is detected at a batch boundary:\n1. For drift that makes or changes a structural decision, write a new ADR documenting what changed and why (or that it was unintentional); otherwise record the drift without creating an ADR\n2. If the drift violates a prior ADR: BLOCK — human must decide whether to update the ADR\n   or revert the code\n\n### 11. Signal Review Requirement\n\nBefore exiting, decide whether the conductor should prompt the user to review\nthe architecture report and ADRs. Review mode for this step is **conditional** —\nauto-approved unless you write a marker file.\n\nWrite `.pipeline\u002Freview-required-architecture_review` (any content; the file's\nexistence is the signal) if ANY of the following is true:\n\n- Verdict is **APPROVED WITH CONDITIONS** or **BLOCKED**\n- Any new ADR was drafted (DRAFT ADRs must be approved before they become authoritative)\n- Any existing ADR was superseded\n- Any risk with Impact=High was entered in the Risk Register\n- Batch-boundary review found drift from the approved plan\n\nIf the verdict is a clean **APPROVED** with zero new\u002Fsuperseded ADRs and no\nHigh-impact risks, do NOT write the marker — the conductor auto-approves and\nmoves to the next step.\n\n```bash\n# Example: write the marker when review flagged issues\nmkdir -p .pipeline\necho \"verdict: APPROVED_WITH_CONDITIONS, new ADRs: 2\" > .pipeline\u002Freview-required-architecture_review\n```\n\n### 12. As-Built Compliance Gate (`--as-built` mode)\n\nInvoked at **SHIP** as `\u002Farchitecture-review --as-built`. It runs for **every feature**, including\nSmall features and features whose DECIDE-time review was skipped. It does **no** new design or\nfeasibility\u002Fcomplexity assessment.\n\n**Managed as-built review.** When the engine dispatches `--as-built`, it supplies the bounded,\nversioned input projection, check policy, and terminal native structured-result shape. Treat those\nas the complete machine contract: judge the supplied evidence and return one terminal structured\nverdict that conforms to the supplied shape. Do not recreate engine input collection, substitute a\nMarkdown report for that verdict, write a managed verdict artifact, alter ADRs or decisions, or\nchoose a gate route. The engine validates, persists, renders, and routes the result.\n\n**Standalone as-built review.** When a human invokes `--as-built` outside the managed engine step,\npresent a human-readable advisory judgment from the available architecture, source, and history\nevidence. It is not current managed gate evidence. Do not write managed verdict artifacts,\noperator-decision stores, or routing state; the human or engine owns any follow-up action.\n\n**Per-check policy:** Read the supplied `AS-BUILT CHECK POLICY` before reviewing. Apply every\ncheck marked `on`, do not infer obligations from a check marked `off`, and record each off check\nwith its supplied reason. By default, `reachability` and `planGap` apply at every tier;\n`adrCompliance` applies only when APPROVED ADRs exist; and `diagramDrift` applies only when\ndiagrams exist. Operator configuration can disable any check for a tier. Missing ADRs or diagrams\ntherefore disable only their respective check — never this SHIP gate.\n\n**Relationship to BUILD-time judgement:** BUILD no longer judges reachability ([ADR](..\u002F..\u002F.docs\u002Fdecisions\u002Fadr-2026-08-14-retire-build-review-wiring-rubric.md));\nthis SHIP sweep is unchanged and never relies on BUILD proof as authority.\n\n**Scope (only this):**\n- For `adrCompliance`, load only the **APPROVED** ADRs (`.docs\u002Fdecisions\u002F`, `Status: APPROVED`).\n  DRAFT\u002FSUPERSEDED ADRs are not authoritative and are not gated against (per §7b). For\n  `diagramDrift`, compare the shipped code with the approved architecture diagrams\n  (`.docs\u002Farchitecture\u002F`).\n- For each enabled check, compare the shipped source with its governing evidence: new structural\n  patterns without an ADR, domain-boundary violations, or diagram drift are relevant only when the\n  corresponding check is on.\n- **Production reachability sweep (green-but-unwired guard).** For each primitive this\n  feature's diff introduces or materially changes — exported functions\u002Fmodules, hook scripts,\n  config keys, emitted events, ADR-promised log lines — trace ONE invocation path from a real\n  production entry point (a public API or route, CLI command dispatch, a job or worker, an event\n  consumer, a framework hook, or the project's equivalent) and cite the caller as `file:line`. Test files, fixtures, and the\n  primitive's own module do not count as callers, except for the narrow same-file composition\n  case below.\n  - **Narrow same-file composition exception.** Independently verify the complete **root-to-caller-to-export** chain in the current shipped source: a configured production\n    entry point reaches the defining module through non-test edges; an actual production caller in\n    that module references the exact changed export. Derive that caller from current source rather\n    than from a plan declaration. Cite the root\u002Fmodule chain and caller-to-export reference as `file:line`.\n    A same-file exception passes only with an exact caller-to-export reference and a production-entry-point root chain.\n    An own-module caller alone, module reachability alone, or a name\u002Ftext match alone does not count.\n    This exception never permits a dead helper, a test-only path, a shadowed binding, or an\n    unavailable\u002Fambiguous reachability analysis to pass.\n  - **Current-source authority.** A persisted BUILD `same-file-composition` proof is corroborating context only, never authority for this SHIP review. Re-resolve the root-to-caller-to-export\n    chain against current shipped source at the reviewed HEAD. A stale BUILD proof does not count or pass the exception; neither does a missing current-source hop or changed caller\u002Fexport.\n  - **No production caller exists** → this is a **BLOCKED** violation (\"unreachable rung\"), same\n    severity as an ADR violation: shipped-tested-green code nothing invokes is not shipped\n    behavior. Name the primitive and what was searched.\n    In the structured verdict, record it as a `reachability` entry with an empty `callerChain`\n    (`[]`); the engine admits an empty chain only under a `BLOCKED` verdict.\n    Classify it per the table under **Verdict meanings**. Never cite this section as the\n    governing reference.\n  - **Statically reachable but not yet observed running** (e.g. a new log line no production log\n    shows yet) → record it under Drift Notes as `UNEXERCISED: \u003Cprimitive> — signature: \u003Cthe\n    greppable line\u002Fevent that will prove it live>`. Not blocking; the signature tells a later\n    observer exactly what proves the behavior live in production.\n- **Plan-gap check.** When the shipped code faithfully implements the approved design but that\n  design is itself the limit that prevents an outcome the sealed story criteria require, issue\n  `PLAN_GAP`. Record the affected outcome and whether it was delivered; do not send unplanned work\n  back to BUILD.\n  - **Story criteria belong to `\u002Fprd-audit`.** `\u002Fprd-audit`, in the same validation group, grades\n    every story criterion and owns criterion-level findings. Issue `PLAN_GAP` here only when an\n    APPROVED ADR or approved diagram is the limit; a shortfall that names only a story or a desired\n    outcome is not an as-built finding. Never record a story, criterion, or desired outcome as a\n    BLOCKED finding's governing reference.\n  - **Outcome authority: the sealed story criteria.** The approved, sealed acceptance criteria under\n    `.docs\u002Fstories\u002F` are this feature's acceptance contract and the only authority for what outcome\n    was stated. `.docs\u002Fintake\u002F` is an idea capture that is **superseded** once stories are approved;\n    never grade the shipped code against it. Where intake and the stories disagree, the stories win:\n    a deliberate narrowing recorded in an amended, resealed story is the decision, not a plan gap.\n- **Exhaustive sweep per judged decision (one pass, every site).** For each ADR decision, diagram\n  element, or reachability primitive you judge, enumerate EVERY violating site in the reviewed diff\n  in this verdict — one BLOCKED finding per site, or one finding whose summary lists every site as\n  `file:line`. Never stop at the first violation of a decision: a decision with nine violating\n  sites reported one per lap costs nine laps. Brief each delegated subagent to return all sites,\n  not an example.\n  - **Re-review laps.** When the supplied context shows prior as-built findings, judge (a) whether\n    each prior finding is resolved, and (b) the code changed since the judged lap. Do not raise a\n    first-time finding against code unchanged since a prior lap unless that lap could not have seen\n    it (for example, the check was off or the evidence did not exist then); say why in the finding.\n- **Delegated evidence gathering.** The window that matters is the reviewer's own: it holds the\n  verdict. Keep it for judgement and push the reading into subagents through the host's facility\n  (Claude Code: the Agent tool; Codex: `collaboration.spawn_agent` \u002F `collaboration.wait_agent`),\n  the same way §\"Provider-native delegation\" already allows:\n  - One subagent per enabled check cluster: the APPROVED-ADR set (one per ADR when several apply),\n    the diagram set, the changed-primitive reachability sweep (split by module when the diff is\n    wide), and the plan-gap check against the sealed stories.\n  - Each subagent returns a **digest**, not a transcript: the governing clause quoted verbatim with\n    its path, the shipped code quoted verbatim with `file:line`, the caller chain for\n    reachability, and a candidate disposition with confidence. Cap a digest at roughly two thousand\n    words; anything larger is the subagent forwarding its reads instead of doing them.\n  - The reviewer grades from the digests, re-reads only the lines it needs to settle a disagreement,\n    and owns every verdict. A subagent never writes the report, the verdict, or an ADR.\n  - **Model tiers.** The reviewer stays on this skill's pinned tier; do not trade it down to pay for\n    fan-out. Reading and extraction subagents run on the host's mid tier\n    (Claude Code `model=\"sonnet\"`; Codex uses its configured default). Step a subagent up to the reviewer's\n    tier only when its task is adjudication — an adversarial re-check of one candidate BLOCKED\n    finding before it is recorded.\n  - Subagents inherit the context budget above. A subagent that cannot finish within it reports\n    what it covered and what it did not; the reviewer records the uncovered surface as unverified\n    rather than silently passing it.\n- **Validator discipline (MUST — copy verbatim into every subagent brief).** Both rules below are\n  operator rules on the reviewer and on every subagent it delegates to. Include them **verbatim** in\n  each subagent brief; a subagent that never received them is not bound by them.\n  1. **Read-only evidence.** The validator and every subagent it delegates to MUST NOT execute\n     tests, typecheck, lint, build, the integrity script, or any command that runs project code —\n     including `vitest`, `npm test`\u002F`npm run`, `npx`, `node -e` probes over project modules, and\n     bash test scripts. Evidence is what the source and committed artifacts say: `file:line`, test\n     names read from test source, source-control evidence, and `Scope:` trailers. Reachability is\n     proved by citing the caller chain in the source, never by running it. If a check cannot be\n     judged without running code, grade it from the evidence available and say so in the rationale;\n     never run it. Nothing is written, staged, or committed.\n  2. **Never yield with delegated work outstanding.** The validator MUST NOT end its turn while any\n     subagent it spawned has not returned. Collect every digest before grading; if a subagent is\n     slow, wait for it — do not summarize partial results and do not report progress in place of a\n     verdict.\n- Do NOT re-run §2\u002F§3\u002F§5 (feasibility\u002Fcomplexity\u002Fdomain pre-checks) — those belong to the DECIDE\n  pass. This is a code-vs-approved-design pattern match plus the reachability sweep above,\n  deliberately cheap.\n\n**Verdict meanings**\n- **APPROVED** — shipped code matches the approved architecture. Proceed to finish.\n- **APPROVED WITH DRIFT NOTES** — minor, non-violating drift (e.g. a diagram is now slightly stale,\n  a pattern was extended consistently). Record the drift; proceed. Note it for a follow-up ADR only\n  when it makes or changes a structural decision; otherwise no ADR is needed, and it does not block.\n- **PLAN_GAP** — the shipped code faithfully implements the approved design, but the design is the\n  limit preventing an outcome the sealed story criteria require. Record whether the outcome was\n  delivered; an undelivered outcome HALTs for a human. Never turn this finding into unplanned BUILD work.\n- **BLOCKED** — an enabled check found an architectural violation, such as an APPROVED-ADR\n  violation or an unreachable production rung. Each finding's class decides who resolves it:\n  `REMEDIABLE` findings route back to BUILD as bounded repairs against their cited plan task or ADR\n  decision; `DESIGN` findings HALT for a human, who must fix the code to comply, or for an ADR\n  violation supersede the ADR with a new, human-APPROVED ADR\n  (`Supersedes: \u003Cold>`, old → `Status: SUPERSEDED`). **Never silently downgrade** an APPROVED ADR\n  or auto-resolve the violation. After resolution, re-run the as-built gate.\n\nClassify each BLOCKED finding — `REMEDIABLE` (the approved design already requires bounded BUILD\nwork) or `DESIGN` (a human architectural decision is required) — with its typed governing reference:\n\n| Finding | Class | Governing reference |\n|---|---|---|\n| Unreachable rung; a plan task introduced the primitive | `REMEDIABLE` | `task \u003Cid>` of that plan task |\n| Unreachable rung; no plan task or approved entry point covers it | `DESIGN` | the APPROVED ADR decision it conflicts with |\n| Code diverges from an APPROVED ADR decision the plan already requires | `REMEDIABLE` | `\u003Cadr-stem> D\u003Cn>` |\n| Complying needs a changed or new architectural decision | `DESIGN` | `\u003Cadr-stem> D\u003Cn>` |\n| Story criterion or desired outcome unmet | none | out of scope; `\u002Fprd-audit` owns it |\n\nWrite a plan-task reference as `task \u003Cid>` exactly, not `plan task \u003Cid>` or `Task \u003Cid>`.\n\n## Verification\n\n- [ ] Every PRD functional requirement (product) or technical-intent item (technical) assessed for feasibility\n- [ ] Complexity rated for the proposed design\n- [ ] Alignment checked against .docs\u002Fdecisions\u002F and CLAUDE.md\n- [ ] Domain integrity pre-checked\n- [ ] Risk register populated\n- [ ] **Medium\u002FLarge tier:** `## Wiring Surface` section present, naming where each new\n      production surface will be called from — BLOCKS approval if missing (not required\n      for Small; design-time only, does not affect §12 as-built reachability sweep)\n- [ ] ADR created only for each uncovered structural decision; existing governing ADRs cited and reused\n- [ ] Review written to .docs\u002Fdecisions\u002F\n- [ ] Verdict issued (APPROVED \u002F CONDITIONS \u002F BLOCKED)\n- [ ] Architecture diagrams reviewed for accuracy against current implementation\n- [ ] BLOCKED verdicts halt pipeline and require human resolution\n- [ ] `.pipeline\u002Freview-required-architecture_review` marker written IF\n      verdict ≠ clean APPROVED, or any ADR was drafted\u002Fsuperseded, or any\n      High-impact risk was registered (skip only on truly clean APPROVED)\n- [ ] **As-built mode:** BLOCKED on any enabled APPROVED-ADR violation; resolved by code fix or\n      human-approved superseding ADR (never silent downgrade)\n",{"name":5,"model":28,"phase":37,"requires":44,"standalone":46,"description":7,"enforcement":23,"implicit_invocation":47},[45],"verify-claims",true,"required","main","60310a111655e2d63b87223befba464932465487","skills\u002Farchitecture-review",2,"https:\u002F\u002Fgithub.com\u002Fjstoup111\u002Fai-conductor","https:\u002F\u002Fgithub.com\u002Fjstoup111","2026-11-14 14:59:43",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":46},[57,60,63],{"tool":58,"command":59},"npx","npx skills add jstoup111\u002Fai-conductor --skill architecture-review",{"tool":61,"command":62},"bunx","bunx skills add jstoup111\u002Fai-conductor --skill architecture-review",{"tool":64,"command":65},"pnpm","pnpm dlx skills add jstoup111\u002Fai-conductor --skill architecture-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjstoup111\u002Fai-conductor\u002Fblob\u002Fmain\u002Fskills\u002Farchitecture-review\u002FSKILL.md",[68],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"templates\u002Fadr.md.template","OTHER","其他",34,"https:\u002F\u002Fgithub.com\u002Fjstoup111\u002Fai-conductor\u002Fblob\u002Fmain\u002Fskills\u002Farchitecture-review\u002Ftemplates\u002Fadr.md.template",[75,93,118,139,158,173],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":39},"01M70YKSA2H7Q9WSRD1ECEGY20","build-review-dependency-hygiene","Judge whether a feature diff adds unnecessary, insufficiently pinned, or license-incompatible dependencies.","https:\u002F\u002Fgithub.com\u002Fjstoup111\u002Fai-conductor\u002Fblob\u002Fmain\u002Fskills\u002Fbuild-review-dependency-hygiene\u002FSKILL.md",[],[82,83,84,85,86,20,87,88,89,90,91,92,23],"build","dependency hygiene","dependency","hygiene","build review dependency hygiene","feature","diff","dependencies","license","true","judge",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":39},"01M6K3EQQ6ADH3G2RMYK6XE26E","writing-system-tests","Use BEFORE implementing any feature that has stories in .docs\u002Fstories\u002F — generates failing acceptance specs from acceptance criteria as the RED phase of TDD. Generates HTTP\u002Frequest-level acceptance tests for headless\u002FAPI projects, end-to-end UI tests for projects with a frontend, using the project's own test framework and directory conventions.","https:\u002F\u002Fgithub.com\u002Fjstoup111\u002Fai-conductor\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-system-tests\u002FSKILL.md",[],[100,101,102,103,104,105,106,107,108,109,110,111,31,112,113,114,115,23,116,117],"writing","system","tests","writing system tests","projects","headless","project","end","implementing","frontend","acceptance","api","directory","ui","framework","failing","phase","request",{"skillNo":119,"name":45,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":39},"01M6K3EHR0QQ1QY1S9RC6D1WTD","Use only when an active workflow is about to rely on a nontrivial factual claim or assumption for a spec, plan, ADR, finding, or code decision. Do not invoke for casual questions, status reports, restatements, or trivially verifiable mechanics.","https:\u002F\u002Fgithub.com\u002Fjstoup111\u002Fai-conductor\u002Fblob\u002Fmain\u002Fskills\u002Fverify-claims\u002FSKILL.md",[],[124,31,125,126,127,128,129,130,91,131,35,132,133,33,134,135,30,136,137,138,24,23,22],"verify claims","verify","do","adr","for","decision","claim","mechanics","use","workflow","reports","plan","questions","about","spec",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":39},"01M6K3ED4NF5DJA2Y35MH2JCRC","tdd","Use when implementing any feature or bugfix. Five-step cycle: RED → DOMAIN → GREEN → DOMAIN → COMMIT. Enforces test-first development with domain integrity review at every phase boundary.","https:\u002F\u002Fgithub.com\u002Fjstoup111\u002Fai-conductor\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",[],[141,146,147,148,108,149,20,150,151,152,153,87,154,91,132,155,156,157,22,116],"green","cycle","structural","commit","at","bugfix","integrity","domain","development","with","test","test-first",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":39},"01M6K3E6PEXBXYY2K8TSRTN1JT","stories","Use only within active engineer\u002Fconduct DECIDE after architecture approval, when a committed `.docs\u002Fstories` acceptance artifact is required. Do not invoke for general user-story examples, requirements discussion, or direct implementation requests.","https:\u002F\u002Fgithub.com\u002Fjstoup111\u002Fai-conductor\u002Fblob\u002Fmain\u002Fskills\u002Fstories\u002FSKILL.md",[],[160,165,126,128,37,166,167,91,35,132,110,168,19,169,31,170,125,171,30,172,24,23,22],"conduct","engineer","general","requirements","examples","artifact","requests","implementation",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":39},"01M6K3E1HE7267YKFJQ3YFCGW5","stack-land","Use when an operator needs to land reviewed manual changes on the correct closed child of a stacked feature. Operator-invoked only: inspect ownership, propose the safe child with evidence, and require confirmation before opening the landing.","https:\u002F\u002Fgithub.com\u002Fjstoup111\u002Fai-conductor\u002Fblob\u002Fmain\u002Fskills\u002Fstack-land\u002FSKILL.md",[],[180,181,182,155,31,183,184,185,125,87,186,187,188,189,190,91,191,35,132,192,22,193],"stack","land","stack land","evidence","child","changes","inspect","manual","correct","landing","safe","operator","confirmation","advisory"]