Claude Skill

subagents-orchestration-guide

Guides subagent coordination through implementation workflows. Use when orchestrating multiple agents, managing workflow phases, or determining autonomous execution mode.

LLM Mart · 0 points · 15 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download shinpr-claude-code-workflows-skills_subagents-orchestration-guide-bd41561.zip · 19 KB
Part of shinpr/claude-code-workflows — 189 skills

Install

skills CLI npx skills add https://github.com/shinpr/claude-code-workflows/tree/main/skills/subagents-orchestration-guide
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install shinpr-claude-code-workflows@llmmart
Git git clone https://github.com/shinpr/claude-code-workflows.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole shinpr/claude-code-workflows collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Subagents Orchestration Guide

Role: The Orchestrator

Explicit User Instruction: The user explicitly instructs and authorizes every subagent call named in the invoked recipe. Execute each applicable call when its prerequisites are met.

The orchestrator owns workflow decisions, routing, progress management, user interaction, the investigation and validation needed for those decisions, and explicitly assigned mechanical operations, using any available tool. Named specialists own explicitly assigned investigation and semantic deliverable creation or modification; invoke them before producing or changing code, tests, configuration, documents, task files, or other artifacts.

Workflow Subagent Context — Mandatory

This workflow's specialists are already self-contained through their agent definitions, loaded skills, and referenced artifacts. The smallest valid Agent prompt is the most reliable: the complete prompt is the exhaustive set of canonical field: value entries declared by the specialist's input contract. Preserve each value's meaning from its authoritative source and apply the canonical serialization declared for that field. This output discipline supersedes general-purpose prompt self-containment because added context competes with the specialist's loaded process and can prevent coherent completion.

This section governs the orchestrator's Agent prompt. Each specialist's agent definition owns its input acceptance and resolves its operational inputs. The orchestrator supplies the canonical contract entries unchanged.

First Action Rule

When receiving a new full-cycle task, retain the user's complete wording in the orchestrator and invoke requirement-analyzer with the Requirement Evidence Handoff below. Compare its scope evidence, cost evidence, and questions against that retained wording to judge requirement convergence and Structural Scale in the orchestrator. Dedicated design recipes use their own codebase-scoped bootstrap.

Requirement Evidence Handoff: pass requirements as the shortest verbatim user wording of the problem or desired user-visible or operational outcome, using an orchestrator working summary only when no such wording exists; pass context as the shortest user reason needed to interpret that outcome plus an environmental constraint only when it is essential. Keep the remaining requirement detail in the orchestrator for comparison after the result returns. The handoff supplies an evidence target; the retained wording supplies product requirements and exclusions. Classify evaluation requests, speculative ideas, and prescribed mechanisms from that retained wording rather than from the returned evidence, because a classification produced by an analyzer is inference presented in the same object as observation.

Build and judge the convergence record in the orchestrator with the requirement-convergence skill. Run its hearing protocol at the requirements stop point. Re-invoke requirement-analyzer only when an answer changes the repository analysis target or scope evidence; otherwise update the convergence and Structural Scale judgment directly.

Small Evidence Gate

Classify Small when scopeEvidence.executionRoute.status is evident, that route remains inside one responsibility, and every costEvidence.unknowns or questions item is proven invariant to boundaries, persistence/shared contracts, and potentially durable choices. Positive route evidence identifies the supported route; an empty alternatives list supplies supporting context. When confirmed requirements remain unresolved at this gate, invoke codebase-analyzer before assigning Structural Scale. Its result supports Small when analysisScope and currentPath establish one repository-supported route inside one responsibility and every candidateDecisionPoints, unknowns, and limitations item is proven classification-invariant. Other observed boundaries and outcomes route Medium or Large. Reuse that result as the Medium design analysis when the confirmed requirements remain unchanged. For Large, treat it as routing evidence, create and approve the PRD, then run the design analysis against the approved prd_path. ADR qualification occurs after codebase-analyzer returns credible technical options and the scope is confirmed.

Requirement Change Detection During Flow

After an analysis result returns, compare each user-facing or operational responsibility it exposes against the confirmed scope. When either leaving that responsibility as it is or changing it would alter the confirmed outcome or an exclusion, return it through the requirements gate before dependent design work; a technical choice about how to satisfy the confirmed scope continues through the design owners instead.

Treat a proposed change to the confirmed outcome, desired-future requirements, or non-goals as a requirement change. When evidence shows those value boundaries cannot all remain true, stop at the requirements gate and ask the user which boundary changes. A technical design or implementation correction that preserves them is not a requirement change, including removal of a technical choice that works but is no longer necessary; passage through an earlier phase does not establish that its means remain necessary. Update each affected technical artifact and resume from the earliest affected technical gate while preserving outputs that remain valid.

Orchestration Principles

Outcome Stewardship

The orchestrator steers the workflow toward the smallest sufficient set of deliverables and changes that achieves the confirmed outcome while satisfying binding constraints and required verification. Evaluate specialist proposals against that boundary before routing work.

Preserve specialist evidence ownership and approved artifacts as semantic sources so the workflow converges on the confirmed MVP; orchestrator-authored investigation targets, restatements, or follow-on instructions bias evidence and create unreviewed scope.

Delegation Boundary: What vs How

Pass the governing requirement source and the specialist's expected action. Investigation specialists discover affected paths and responsibility boundaries; artifact and execution specialists receive the confirmed paths or scope they must act on. Each specialist determines its execution method from repository evidence and applicable artifacts.

Decision precedence for routing:

  1. User instructions (explicit requests or constraints)
  2. Task files and design artifacts (Design Doc, PRD, work plan)
  3. Objective repo state (git status, file system, project configuration)
  4. Specialist judgment

Scope source classification:

  • An explicit restriction in the user instruction or confirmed outcome, desired-future requirements, or non-goals is a hard boundary. A technical artifact is the primary implementation baseline, but its How is corrected through the affected technical artifacts when repository evidence invalidates it without changing those value boundaries.
  • Target paths and task-file file lists are investigation starting points and expected evidence unless their governing source explicitly makes them exclusive.
  • Changes to adjacent files proceed when repository evidence shows they are required by the same confirmed outcome, responsibility, contract, or consistency rule.
  • Unrelated improvements remain outside the active change. A proposed change to the confirmed outcome, desired-future requirements, or non-goals returns to the requirements gate. Authorization for an irreversible external action returns to the authority gate. Technical design, contract, and implementation changes that preserve the confirmed value boundaries proceed through their affected technical artifacts.

Before routing specialist output, validate each claim that controls the next workflow decision against the highest applicable source above. Route according to that source; specialist judgment governs decisions left unresolved by items 1-3.

Specialist Result Acceptance

Each specialist's agent definition owns its canonical result shape. As receiver, the orchestrator chooses the next action from the result's semantic content, governing sources, produced artifacts, and repository state. Semantically equivalent labels, omitted optional fields, and absent transition labels remain acceptable when those sources support the next action. Resolve operational gaps through inspection or repository-local reversible judgment and continue unaffected work.

Continue incomplete implementation while repository evidence supplies an action that advances the confirmed outcome. When current authority and evidence cannot advance required implementation, finish with an incomplete report containing the remaining work and observed evidence. Treat a proof-only limitation differently: perform recovery available within the current authority and scope, run every available check, retain the complete limitation result, establish the recipe's normal reversible task boundary, and continue remaining tasks. Retry retained limitations before final verification and report only those that remain. Claim only the proof actually observed. User interaction is reserved for choosing a change to confirmed value boundaries or authorizing an irreversible external action.

Review Resolution

Apply references/review-resolution.md to actionable deliverable-review findings. The orchestrator decides dispositions, validates results, and routes work; the named specialist produces or changes deliverables.

Task Assignment with Responsibility Separation

Specialist Responsibility
task-executor Implement scoped work and tests, and confirm added tests pass; leave whole-repository quality assurance to the quality-fixer.
quality-fixer Run overall checks, fix quality failures, and return pass only after completing those fixes.

For frontend work, substitute task-executor-frontend and quality-fixer-frontend; in fullstack work, select them by task layer.

Constraints Between Subagents

Workflow coordination is flat: the orchestrator issues every specialist call and receives every result. Specialist definitions keep Agent outside their tool sets.

Explicit Stop Points

Apply these approval stops when producing or materially revising an artifact in the current workflow. At each stop the user approves an action — completing the current phase, or authorizing implementation — rather than ratifying the artifact's technical content. Authority over required outcomes and explicit constraints comes from the user's own wording in the convergence record, not from passing a stop. A user instruction to proceed to a later phase accepts the preceding phases and authorizes entry into that phase; continue from that entry point rather than rechecking earlier review or approval records. In particular, a build instruction with an existing Work Plan grants batch approval for task materialization and implementation.

Before presenting an artifact at an approval stop, read its current version and base the presentation on that content. At the Design stop, also read the current PRD when present and state the confirmed user-visible outcome from it or the confirmed requirement context alongside major internal responsibility, contract, or refactoring changes, so the user can judge whether to proceed.

Phase Stop Point User Action Required
Requirements After requirement-analyzer completes Answer the requirement-convergence hearing, confirm the recorded requirements match their intent, then approve proceeding
PRD After document-reviewer completes PRD review Approve completing the PRD phase and proceeding
UI Spec After document-reviewer completes an applicable UI Spec review Approve completing the UI Spec phase and proceeding
ADR batch After document-reviewer reviews the complete qualifying batch Approve completing the ADR batch phase and proceeding
Design After design-sync completes consistency verification Approve completing the design phase and proceeding
Work Plan After work plan review (document-reviewer, doc_type WorkPlan; Medium/Large) completes Batch approval: authorize implementation within this outcome

After applicable implementation authorization: Confirmed Small requirements or Medium/Large batch approval start autonomous execution, which continues until completion or an escalation condition is reached.

Scale Determination and Document Requirements

Scale Structural condition PRD ADR batch Design Doc Work Plan
Small One outcome has one evident repository-supported implementation inside one responsibility and no unresolved durable choice Update when applicable None None None
Medium One outcome coordinates across a boundary or requires investigation of a potentially durable choice Update when applicable When one or more decision points pass both filters Required Required
Large Independently valuable outcomes require separate design decisions Required When one or more decision points pass both filters Required Required

File count supports the judgment but does not determine it. A qualifying durable decision sets the floor at Medium. Apply the Choice filter before the Durability filter after repository option evidence exists.

How to Call Subagents

Execution Method

Each subagent invocation is a fresh Agent tool call, isolating each phase's context; a SendMessage resume reuses the prior agent's context and breaks that isolation. Each call uses:

  • subagent_type: Agent name (e.g., "task-executor")
  • description: Concise task description (3-5 words)
  • prompt: Values serialized in the active workflow's input contract

Orchestrator Execution Boundary

Tool choice does not define responsibility: the orchestrator may use any available tool for its owned work, while named specialists perform semantic deliverable creation or modification; the orchestrator writes only for mechanical operations explicitly assigned by the active workflow.

Prompt Construction Rule

The active workflow's input contract is already optimized to provide the specialist with the context for its owned result. The orchestrator preserves that optimization by passing its named fields in their declared forms; the prompt consists of those fields and values, while artifact paths and unchanged specialist outputs carry their own semantics.

Handling Requirement Changes

Use create mode for initial documents. For requirement-driven revisions, invoke the owning document specialist in update mode and add history:

  • work-planner: update only before execution
  • technical-designer / prd-creator: update affected documents, then invoke document-reviewer
  • document-reviewer: run before user approval after PRD/ADR/Design Doc changes and after Work Plan changes; Small changes have no Work Plan

Basic Flow: Planning and Implementation

Planning flow (per scale)

Scale Planning flow
Large requirement-analyzer → PRD → PRD review → codebase-analyzer → conditional external/UI analysis and UI Spec → optional ADR batch/review/approval → Design Doc → code-verifier/Review Resolution → document-reviewer → design-sync → acceptance-test-generator → work-planner → work plan review → task-decomposer
Medium requirement-analyzer → codebase-analyzer → conditional external/UI analysis and UI Spec → optional ADR batch/review/approval → Design Doc → code-verifier/Review Resolution → document-reviewer → design-sync → acceptance-test-generator → work-planner → work plan review → task-decomposer
Small requirement-analyzer → conditional codebase-analyzer when the Small evidence gate is unresolved → direct task execution (no Work Plan)

The requirement-convergence and external-resource hearings run in the orchestrator. In an implementation workflow, confirmation at the Requirements stop authorizes the confirmed Small direct scope. Medium/Large implementation begins after Work Plan batch approval.

Rules:

  • When documentation-criteria requires a UI Spec, complete it before ADR qualification and Design Doc creation
  • An ADR batch is optional; the Design Doc is mandatory for Medium/Large work even when ADRs exist
  • When the Small evidence gate is unresolved, invoke codebase-analyzer with confirmed requirements to resolve routing. Reuse that result for unchanged Medium scope. For Large, create and approve the PRD first, then invoke codebase-analyzer for design with only prd_path; the pre-scale result remains routing evidence because the approved PRD becomes the governing design source. For Medium already established by positive boundary evidence, invoke once with confirmed requirements
  • When a UI Spec applies, invoke ui-analyzer with that same governing-source choice plus existing ui_spec_path, decision-relevant prototype_path, and selected external_resource_refs or []; invoke ui-spec-designer with confirmed_requirement_context as the approved PRD path exactly or, only when none exists, the unchanged confirmed convergence record, plus the complete unchanged ui_analysis, applicable unchanged codebase_analysis, optional prototype_path, and external_resource_refs or []. A prototype does not state how far it is meant to be followed — one team hands over a rendering to implement as is, another a rough sketch of intent — so when a prototype_path is present, pass prototype_reference_strength to ui-spec-designer: binding when implementation follows the prototype's rendering, reference when only what the UI Spec records reaches implementation. Resolve it from what the user already stated about the prototype, and ask only when neither reading is supported
  • Before ADR qualification, use the governing source plus reuse and invalidations to remove questions that already have one sufficient approach. Apply documentation-criteria Choice then Durability filters only to the remaining candidateDecisionPoints. When non-empty, invoke each owning technical-designer with document_to_create: ADRBatch, confirmed_requirement_context as the approved PRD path exactly or, only when none exists, the unchanged confirmed convergence record, ordered confirmed decision_points unchanged, and the corresponding candidateDecisionPoints objects unchanged as decision_materials; add an approved ui_spec_path only when it constrains a frontend decision. Run owner batches serially, review all returned paths once with doc_type: ADRBatch, and obtain one user approval. After approval, set every approved ADR to Accepted and verify the status updates. For corrections, group findings by ADR path and invoke update mode once per path before re-reviewing the complete batch. An empty result proceeds directly to the Design Doc
  • Invoke the Design Doc owner with document_to_create: DesignDoc, confirmed_requirement_context as the approved PRD path exactly or, only when none exists, the unchanged confirmed convergence record, structural_scale, unchanged codebase_analysis, optional unchanged ui_analysis, and accepted adr_paths; frontend/fullstack invocations add only their named UI or layer artifact paths
  • Resolve code-verifier discrepancies through Review Resolution before invoking document-reviewer; pass the exact HC-04 inputs rather than a narrative evidence bundle
  • An applied unverified discrepancy returns through a fresh owning technical-designer update invocation. Capability probing is reserved for the designer's review-triggered gate, with that fresh designer as the sole correction specialist
  • Fullstack layer sequencing is defined only in references/monorepo-flow.md
  • design-sync is required whenever multiple Design Docs exist
  • When creating or materially updating a Medium/Large Work Plan, run document-reviewer (doc_type WorkPlan) and Review Resolution through correction re-review, its parent requirement or authority exits, and convergence before presenting the plan for batch approval. Existing-plan build entry follows the phase acceptance rule in Explicit Stop Points.

Start the applicable Structural Scale flow at the user-requested phase. Before reporting completion, verify the artifacts and results required by every applicable phase from that entry point through completion, and complete any missing work within those phases. Return to an earlier phase when a material change invalidates its outcome, using Handling Requirement Changes.

Autonomous Execution Mode

Pre-Execution Gate

Verify commit capability before autonomous mode. Let task-executor and quality-fixer recover available test or quality tooling and retain an exact proof limitation for the remainder; escalate a known authority-bound prerequisite before entry.

Confirmed Small requirements or Medium/Large batch approval authorize task-executor implementation and quality-fixer corrections until completion or escalation.

Autonomous Execution Summary

For Medium/Large, after batch approval, including an existing-plan build instruction, autonomously execute the following processes through completion or an escalation condition:

graph TD
    START[Batch approval] --> TD[task-decomposer]
    TD --> CYCLE[Per-task 4-step cycle, including commit]
    CYCLE -->|remaining tasks| CYCLE
    CYCLE -->|all tasks complete| REVIEW[Initial reviewer set or evidence-required reruns]
    CYCLE -->|recoverable or structurally incomplete result| CYCLE
    CYCLE -->|value-boundary choice or irreversible authorization| USER[Escalate or re-analyze]
    REVIEW -->|passed| REPORT[Completion report]
    REVIEW -->|actionable findings| RR[Review Resolution]
    RR -->|apply| FIX[owning author or executor + applicable verification]
    FIX --> REVIEW
    RR -->|all decline| REPORT

For Small, execute one direct-scope 4-step cycle. Complete after pass, or retry a retained verification_incomplete result once and complete with its exact repeated limitation. Small has no task decomposition, document-dependent post-implementation review, or task-file cleanup.

Post-Implementation Review Status Routing (Medium/Large)

Reviewer Complete: empty finding set Enter Review Resolution Blocked
code-reviewer verdict is pass verdict is needs-improvement or needs-redesign verdict is blocked → Apply Specialist Result Acceptance
security-reviewer status is pass status is needs_revision status is blocked → Apply Specialist Result Acceptance

Reviewer findings are candidates. Create correction work only from the Review Resolution apply set. A reviewer pass records phase passage: it grants no user-held execution authority and does not establish that the reviewed means remain necessary.

Fix-cycle handoff: Apply Review Resolution and invoke each correction owner it selects. For an author-owned technical-artifact correction, invoke the layer-appropriate technical designer in update mode, run the artifact's existing document-reviewer and applicable design-sync gates, then re-run the originating reviewer. For an executor-owned correction, invoke the layer-appropriate executor with its original task_file or direct-scope fields plus correction_findings as the complete apply finding objects verbatim with only their dispositions added, then branch on the executor result through the per-task cycle's step 2, including its conditional integration-test-reviewer path, and run the applicable quality gate. When both owners are required, Review Resolution's author-first re-evaluation controls the order. Carry prior_feedback only to a reviewer or verifier being rechecked. Post-implementation corrections stay uncommitted through this cycle: the reviewers read the current working tree, so run the applicable quality gate and re-run the originating reviewer on the uncommitted changes, and commit the applied corrections once through Commit Boundary Check after the complete review set reaches Review Resolution convergence.

Re-run rule: After an applied post-implementation correction, re-run only the reviewer that owns a corrected finding from its latest result. Retain every passed reviewer result, including after another reviewer's correction. Pass the previous complete result, dispositions, and correction diff or paths to the rerun. After Specialist Result Acceptance recovers a blocked review prerequisite, re-run that reviewer. Review Resolution convergence governs acceptance and preserves resolved declines.

Conditions for Stopping Autonomous Execution

Trigger Action
Evidence shows the confirmed outcome, desired-future requirements, and non-goals cannot all remain true without a user choice Apply Requirement Change Detection and ask which value boundary changes.
An irreversible external action requires authorization Request authorization at the authority gate.
A subagent result uses a semantically equivalent label, omits a non-decision field, or leaves the next action implicit Derive the next action from its semantic content, governing sources, produced artifacts, and repository state.
Required implementation remains incomplete Continue while repository evidence supplies an advancing action; otherwise finish with an incomplete report and the observed evidence.
A subagent reports an environment or execution prerequisite Recover it within current authority when practical, complete available checks, retain the proof limitation, and continue. Retry it before final verification and include it in the final report only if it remains.
A requirement changes Apply Requirement Change Detection above. After task-decomposer starts, invalidate affected tasks; restart document design only when the requirement change invalidates an approved requirement, contract, data flow, verification strategy, or task boundary.
The user stops or interrupts Stop autonomous execution.

Task Execution Cycle

Commit Boundary Check

Immediately before a workflow commit:

  1. Use repository state at the commit boundary as the primary evidence and account for every actual change by mapping it to the confirmed outcome, a governing source, or a necessary dependency, test, generated artifact, or adjacent maintenance change. target_paths and task Target Files are investigation starting points; a change with this evidence proceeds independently of its initial path membership.
  2. Every required change is ready for the task commit, accidental changes introduced during the task are removed, and existing worktree changes unrelated to the confirmed outcome remain intact.
  3. Commit the resulting change set. When repository evidence shows a change would alter the confirmed outcome, desired-future requirements, or non-goals, apply Requirement Change Detection before committing it.

For a verification_incomplete commit, append one trailer pair per retained limitation:

Verification-Limitation: <reason>
Verification-Affected: <affected check or command>

Derive the values from the quality-fixer result. Keep the complete result in orchestration state for the current run; the trailers preserve the minimum retry input after continuation.

Per-task cycle:

  1. Execute: record the current HEAD as diffBase, then invoke task-executor with task_file: [path] when one exists; for Small, invoke it with direct_scope as the confirmed outcome and exclusions, governing_sources, target_paths, and observable_verification
  2. Branch on executor result:
    • status: escalation_needed or blocked → Apply Specialist Result Acceptance
    • requiresTestReview is true → Identify the changed integration/E2E test files in the current changes and invoke integration-test-reviewer with them as changedTestFiles, plus diffBase, optional taskFile, prompt-only claims, and mutationEvidence
      • pass → Proceed to step 3
      • blocked → Apply Specialist Result Acceptance
      • needs_revision → Pass qualityIssues objects unchanged into Review Resolution. On correction re-review, derive the next transition only from prior_feedback_reconciliation; return to step 1 for rerouted corrections and proceed to step 3 only at convergence
    • Otherwise → Proceed to step 3
  3. Quality-fix: invoke quality-fixer with task_file when available; otherwise copy the executor's direct_scope, governing_sources, and observable_verification inputs unchanged, including correction_findings when supplied. Add upstream mutationEvidence and qualityCommand from the caller first or task otherwise
    • stub_detected → Return to step 1 with quality-fixer's incompleteImplementations array unchanged as the canonical incompleteImplementations field
    • blocked → Apply Specialist Result Acceptance
    • verification_incomplete → Retain the complete result for final retry and proceed to step 4
    • pass → Proceed to step 4
  4. Commit: apply Commit Boundary Check, then compose the message from changeSummary and execute git commit with Bash after pass or verification_incomplete; append the verification trailers for the latter

Before post-implementation verifiers, collect retained verification limitations from orchestration state and the verification trailers on task-boundary commits created by the workflow, then re-invoke the applicable quality-fixer once for each limitation using the same task inputs and its affected check or command. When the retry returns pass, remove that limitation from retained state. Route newly discovered incomplete implementation through the normal cycle, and retain a repeated verification_incomplete result for the final report. Commit any fixes produced by this retry through the same task cycle, then continue post-implementation verification.

Handoff Contracts

HC-01: requirement-analyzer → orchestrator and codebase-analyzer

  • Invoke with the Requirement Evidence Handoff. The orchestrator compares the returned scopeEvidence, costEvidence, and questions against its retained user wording to judge convergence and Structural Scale. Small requires the positive scopeEvidence.executionRoute gate above; named route evidence proves Small eligibility, while empty boundary or question arrays supply supporting context.
  • Keeping the analyzer input independent of orchestrator-selected paths and technical questions preserves the objective repository evidence required for scope and option convergence.

HC-01b: convergence record → document owner

  • Pass the orchestrator-judged convergence record to whichever agent owns the persisting document.
  • prd-creator (when a PRD is created or updated): persists outcome to Success Criteria and user-authored nonGoals to Future / Out of Scope; the PRD contains confirmed requirements and boundaries while evaluation requests, speculative ideas, and unselected mechanisms remain only in pre-confirmation convergence context
  • technical-designer / technical-designer-frontend: persists the same to the Design Doc's Requirement Convergence when no PRD exists, and always records the fields left weak-but-explicit there
  • Pass the record unchanged; a field's readiness label travels with it

HC-02: codebase-analyzer → technical-designer

  • For an ADR batch, pass the confirmed decision_points unchanged and copy their corresponding decisionMaterials.candidateDecisionPoints objects unchanged as decision_materials.
  • For a Design Doc, pass the codebase-analyzer JSON unchanged as codebase_analysis; accepted artifact paths and unchanged evidence keep the Design Doc traceable to reviewed sources rather than an orchestrator-authored shadow interpretation. Use these fields as follows:
  • Required downstream uses:
    • focusAreas → canonical disposition-target list for the Fact Disposition Table
    • simplifications, decisionMaterials.reuse, and invalidations → reduce implementation surface and eliminate invalid approaches when their evidence and conditions apply
    • decisionMaterials.candidateDecisionPoints → orchestrator first resolves them against the governing source, simplifications, reuse, and invalidations, then applies ADR Choice and Durability filters
    • decisionMaterials.verification → required proof boundaries
    • dataModel, dataTransformationPipelines, qualityAssurance → Existing Codebase Analysis / Verification Strategy / Quality Assurance sections

HC-03: technical-designer → code-verifier

  • Pass the Design Doc path with doc_type: design-doc.

HC-03b: applied design-evidence finding → technical-designer

  • Invoke the owning designer as a fresh update call with the existing Design Doc path and complete correction_findings objects copied verbatim with only their apply dispositions added.
  • The existing artifact carries approved requirements, accepted decisions, prior evidence, and unaffected design context. Keep the handoff limited to the artifact path and unchanged applied findings.
  • The designer applies its review-triggered self-verification gate, updates the artifact or returns the exact unresolved premise, and the orchestrator reruns the originating verifier or reviewer.

HC-04: code-verifier + codebase-analyzer → document-reviewer

  • Keep verifier discrepancies unchanged so correction and review remain traceable to observed evidence rather than orchestrator-authored design instructions.
  • Apply Review Resolution and rerun verification after every applied correction, passing the previous complete verifier result, dispositions, and correction diff or paths as prior_feedback. Form the single verification_evidence object defined by the Review Resolution reference.
  • Pass these exact keys: review_context: creation, verification_evidence, the same codebase_analysis JSON previously given to the designer, optional ui_analysis, original user requirements as requirements_verbatim, and the same confirmed_requirement_context supplied at the owning designer invocation.
  • Transition after every remaining verifier item has a resolved disposition. The reviewer validates the resulting design, Fact Disposition coverage, and effective requirements; the orchestrator retains verifier-disposition ownership.

HC-05: code-verifier → next-layer technical-designer (fullstack only)

  • Defined only for multi-layer fullstack flow in references/monorepo-flow.md
  • Pass: prior-layer Design Doc path plus prior_layer_verification
  • Treat discrepancies[] as the known issues to address or escalate. Keep every claim absent from the verifier output classified as unverified.

technical-designer → work-planner

Pass the Design Doc path. Work-planner maps governing sections and ACs to implementation tasks. An uncovered selected obligation is a planning omission to correct; the Work Plan does not turn missing coverage or missing design content into a user-confirmation item.

HC-06: acceptance-test-generator → work-planner

  • Invoke acceptance-test-generator with design_docs as the applicable Design Doc path list, optional ui_spec, and the same confirmed_requirement_context used for design.
  • When it returns value_input_required, ask once for each listed missing fact, preserve the answer verbatim as test_value_context, and reinvoke. The generator applies supplied facts, retains every remaining value as unknown, chooses from the available requirement and repository evidence, and continues to its normal completed result.
  • Verify each non-null generatedFiles.<lane> path exists. When a lane is null, confirm from the Design Doc that no accepted proof obligation requires that boundary, and return an uncovered obligation to the generator for completion.
  • Pass only existing generated paths as work-planner testSkeletons; each skeleton carries the lane and boundary information needed for placement.
  • Route an unexpected integration generation failure as incomplete generator work. A validated null E2E lane is complete.

References

  • references/monorepo-flow.md: Fullstack (monorepo) orchestration flow
  • references/review-resolution.md: Finding adjudication and correction-loop contract
Files (claude-code-workflows)
  • references
    • monorepo-flow.md 9.6 KB
      # Fullstack (Monorepo) Flow
      
      This reference defines the orchestration flow for one feature spanning backend and frontend responsibilities.
      
      ## When This Flow Applies
      
      - The confirmed outcome requires backend and frontend implementation.
      - Separate Design Docs are needed for layer ownership and cross-layer verification.
      - The orchestrator is invoked through a fullstack implementation or build recipe.
      
      ## Design Phase
      
      ### Large Structural Scale Fullstack
      
      | Step | Owner | Purpose | Output |
      |------|-------|---------|--------|
      | 1 | requirement-analyzer + orchestrator | Scope/cost evidence followed by orchestrator convergence and Structural Scale judgment, then the requirements hearing **[Stop]** | Confirmed requirements + scale |
      | 2 | prd-creator | PRD for the complete feature | PRD |
      | 3 | document-reviewer | PRD review **[Stop]** | Approval |
      | 4 | codebase-analyzer | Repository decision material for the complete feature, including layer boundaries and cross-layer contracts | Analysis JSON |
      | 5 | orchestrator + ui-analyzer | Determine UI Spec applicability; collect external, prototype, and UI evidence only when applicable | UI analysis or none |
      | 6 | ui-spec-designer | Applicable UI Spec from PRD and UI evidence | UI Spec or none |
      | 7 | document-reviewer | Applicable UI Spec review **[Stop]** | Approval or skipped |
      | 8 | orchestrator + technical-designer(s) | Apply ADR filters and create one ADR per qualifying decision point | ADR paths or `[]` |
      | 9 | document-reviewer | Review the complete ADR batch **[Stop when non-empty]** | Batch approval |
      | 10 | technical-designer | Backend Design Doc with accepted ADR constraints | Backend Design Doc |
      | 11 | technical-designer-frontend | Frontend Design Doc with backend contracts, applicable UI Spec, and accepted ADR constraints | Frontend Design Doc |
      | 12 | code-verifier ×2 + orchestrator | Verify each Design Doc and apply Review Resolution | Resolved verification evidence |
      | 13 | document-reviewer ×2 | Review each Design Doc with resolved verification evidence | Reviews |
      | 14 | design-sync | Cross-layer consistency verification **[Stop when conflicts remain after Review Resolution]** | Sync status |
      | 15 | acceptance-test-generator | Integration/E2E skeletons selected from cross-layer contracts | Test skeletons |
      | 16 | work-planner | Work plan from both Design Docs | Work Plan |
      | 17 | document-reviewer | Work Plan review **[Stop: Batch approval]** | Approval |
      
      ### Medium Structural Scale Fullstack
      
      For Medium scale, execute Large steps 4-17 and carry the confirmed convergence record in place of a PRD; retain the conditional stops at steps 7 and 9 and the approval stops at steps 14 and 17.
      
      ## Analysis and Evidence Rules
      
      At each Agent invocation in this flow, build the prompt as a mechanical extraction: copy the named source values into the exact fields, apply only the declared serialization, then invoke immediately.
      
      Invoke codebase-analyzer once for the complete confirmed feature. It discovers backend/frontend responsibility boundaries and their cross-layer contracts; independent discovery keeps convergence grounded in repository evidence rather than the orchestrator's unverified implementation hypothesis.
      
      Apply the documentation-criteria UI Spec creation condition. Invoke ui-analyzer only when a UI Spec applies. External-resource and prototype inputs are then conditional: load external-resource-context when external evidence can change the current UI or verification decision, and ask for a prototype only when it resolves an approved UI decision or target ambiguity.
      
      Use these prompt shapes:
      
      ```text
      For either analyzer, pass exactly one governing source:
      prd_path: [approved PRD path]
      or
      requirements: [confirmed requirements verbatim]
      
      For UI analysis only, add an existing UI Spec, a decision-relevant prototype, and selected external references:
      ui_spec_path: [existing UI Spec path]
      prototype_path: [decision-relevant path]
      external_resource_refs: [selected references or []]
      
      UI Spec:
      confirmed_requirement_context: [approved PRD path exactly; otherwise unchanged convergence record]
      ui_analysis: [UI analyzer JSON]
      codebase_analysis: [applicable frontend codebase evidence]
      prototype_path: [decision-relevant path or absent]
      prototype_reference_strength: [binding | reference, present with a prototype_path]
      external_resource_refs: [selected references or []]
      ```
      
      ## ADR Qualification and Batch
      
      After scope and any applicable UI Spec approval, resolve candidate decision points from the codebase analysis against the governing source, applicable `simplifications`, `reuse`, and `invalidations`. Use applicable UI analysis as supporting or contradicting evidence, not as a source of technical options. Apply documentation-criteria Choice then Durability filters only to the remaining points.
      
      - Route layer-owned decision points to the matching technical designer.
      - Route cross-layer points to technical-designer.
      - Invoke each owner with `document_to_create: ADRBatch`, `confirmed_requirement_context`, its ordered confirmed `decision_points` unchanged, and the corresponding codebase-analysis `candidateDecisionPoints` objects unchanged as `decision_materials`; include an approved `ui_spec_path` only when it constrains a frontend decision.
      - Invoke technical-designer batches serially: cross-layer/backend first, frontend second. Each owner allocates numbers only after the preceding batch exists.
      - Collect every returned ADR path.
      - Invoke document-reviewer once with `doc_type: ADRBatch` and the complete `targets` array.
      - Route the reviewer verdict first: `pass` proceeds with `issues: []`; `needs_revision` applies Review Resolution, updates one ADR per owning-designer invocation serially, and repeats the complete batch review; `rejected` resolves the governing-source conflict before another review.
      - Obtain one user approval after a `pass` review, then set every approved ADR to `Accepted`.
      - An empty batch proceeds directly to both Design Docs.
      
      ## Layer Design Context
      
      Create each complete layer design from reviewed artifacts and unchanged evidence; this keeps both Design Docs traceable to approved sources instead of orchestrator-authored shadow designs.
      
      **Backend Design Doc**:
      
      ```text
      document_to_create: DesignDoc
      confirmed_requirement_context: [approved PRD path exactly; otherwise unchanged convergence record]
      structural_scale: [confirmed scale]
      adr_paths: [accepted paths or []]
      codebase_analysis: [complete analysis JSON unchanged]
      ```
      
      **Frontend Design Doc**:
      
      ```text
      document_to_create: DesignDoc
      confirmed_requirement_context: [approved PRD path exactly; otherwise unchanged convergence record]
      structural_scale: [confirmed scale]
      adr_paths: [accepted paths or []]
      ui_spec_path: [approved UI Spec; omit when absent]
      backend_design_doc: [path]
      codebase_analysis: [complete analysis JSON unchanged]
      ui_analysis: [complete UI analysis JSON unchanged; omit when absent]
      ```
      
      Apply `code:` and `ui:` prefixes to respective Fact Disposition IDs. The frontend Design Doc references backend contracts but does not treat unverified backend claims as proof.
      
      ## Verification Resolution
      
      Keep verifier observations unchanged so corrections remain traceable to observed evidence rather than orchestrator-authored design instructions. Invoke code-verifier once per Design Doc with `doc_type: design-doc`; apply Review Resolution independently, forward each `apply` discrepancy verbatim with only its disposition, and rerun the affected verifier with its previous complete result, dispositions, and correction diff or paths as `prior_feedback`. Build one `verification_evidence` object per Design Doc from the latest result. Invoke document-reviewer with `review_context: creation`, `verification_evidence`, the same unchanged `codebase_analysis` and optional unchanged `ui_analysis`, original requirements as `requirements_verbatim`, and `confirmed_requirement_context` in the exact form fixed by the orchestration guide.
      
      After both document reviews permit approval, invoke design-sync with `source_design` as the frontend Design Doc path because it consumes backend integration contracts. Apply Review Resolution to actionable conflicts before the design approval stop.
      
      ## Test Skeleton and Work Planning
      
      Pass both Design Doc paths as `design_docs`, the applicable `ui_spec`, and the same `confirmed_requirement_context` used for design to acceptance-test-generator. Follow parent HC-06 for `value_input_required` and its unknown-value continuation before planning. Empty optional lanes are valid when the accepted Design Doc proof obligations, candidate filtering, and generated result together show that no selected boundary belongs in that lane.
      
      Pass both Design Docs, the applicable UI Spec, applicable PRD, and generated skeleton paths to work-planner. Compose phases around shared backend/frontend verification points. The generated skeleton file is consumed by the earliest task where its declared boundary becomes executable.
      
      When creating or materially updating the Work Plan, review it with `doc_type: WorkPlan`, apply Review Resolution through work-planner, and stop for batch approval only after the review converges. Existing-plan build entry follows the parent guide's phase acceptance rule.
      
      ## Task Materialization and Execution
      
      task-decomposer follows the Work Plan and routes by executor lane:
      
      | Filename Pattern | Executor | Quality fixer |
      |------------------|----------|---------------|
      | `*-backend-task-*` | task-executor | quality-fixer |
      | `*-frontend-task-*` | task-executor-frontend | quality-fixer-frontend |
      
      When changed integration/E2E tests require review, invoke integration-test-reviewer after the executor and before the quality fixer. All other execution, Review Resolution, and stop rules follow the parent orchestration guide.
      
    • review-resolution.md 11.2 KB
      # Review Resolution
      
      Use this protocol when a deliverable reviewer or verifier returns findings that can route correction or progression. Correct evidenced defects while preserving confirmed requirements, exclusions, and compatibility obligations, using existing responsibilities. Accepted design decisions are the currently selected means: a correction may remove or narrow one while those boundaries remain true. Verification output used as evidence by a downstream specialist remains part of that specialist handoff.
      
      Preserve reviewer/verifier evidence ownership so each gate converges on the governing sources; orchestrator reinterpretation would create unreviewed requirements and make approval or reconciliation non-terminal.
      
      ## Verdict Gate
      
      Route a document-reviewer result in this order:
      
      - a `rejected` verdict first resolves its governing-source conflict through source precedence or the parent workflow's requirement or authority gate before another review, regardless of its issue set.
      - an empty actionable issue set completes the review; downstream consumers receive the reviewed artifact path and pre-existing governing evidence only.
      - a non-empty actionable issue set continues to section 1.
      
      After `rejected` precedence, issue evidence governs routing when `pass` or `needs_revision` differs from the issue set. A completed review creates no author correction or downstream semantic input.
      
      For verifier, design-sync, code-reviewer, security-reviewer, and integration-test-reviewer results, enter section 1 only for the status or findings that their caller contract routes to correction.
      
      Use the result producer's declared verification mode:
      
      - **Reconciliation reviewer**: document-reviewer, code-reviewer, security-reviewer, and integration-test-reviewer accept `prior_feedback` and return `prior_feedback_reconciliation` after correction.
      - **Bounded verifier**: code-verifier and design-sync accept the previous complete result, dispositions, and correction diff or paths as `prior_feedback`; code-verifier reruns with `unit_inventory` use full verification instead. Recheck the prior findings and inconsistencies directly introduced by the correction, and preserve unaffected evidence. A decline-only result is complete.
      
      ## 1. Assess Every Finding
      
      Before assigning a disposition, inspect the relevant parts of the current deliverable, cited repository evidence, and governing sources. Confirm the reported behavior, then establish the material effect of leaving it unchanged. A material effect changes the confirmed outcome, a binding constraint, downstream behavior, decisions, or required verification, or is an evidenced lifecycle cost whose frequency or magnitude is observable. For a discretionary response, compare that effect with the full cost of implementing, verifying, and retaining the response, including review attention.
      
      Order the candidate responses before recording a disposition: no change, then removal or narrowing, then reuse of existing behavior, then a repair that retains or adds a mechanism. A retaining or additive response names the required result the earlier candidates cannot deliver. This is a selection condition, not an obligation to enumerate alternatives for every finding.
      
      When a proposed correction remains within the agreed boundary above, select it from current evidence without expanding scope. When evidence shows the confirmed outcome cannot be achieved within existing responsibilities, leave Review Resolution and apply the parent workflow's existing design or requirement gate before changing them. When the confirmed outcome, desired-future requirements, and non-goals cannot all remain true and the user must choose which value boundary changes, apply the parent workflow's Requirement Change Detection. When correction requires authorization for an irreversible external action, apply the parent workflow's authority gate. These workflow exits are not finding dispositions; an optional expansion receives `decline`.
      
      The orchestrator records one disposition for every actionable finding:
      
      | Disposition | Use when |
      |---|---|
      | `apply` | Leaving the current deliverable unchanged would prevent the confirmed outcome, violate a binding requirement, design decision, or repository rule, leave required correctness or verification unsupported, or commit downstream work to added design surface whose total complexity lacks current evidence. Otherwise, apply only when the material effect exceeds the response cost. |
      | `decline` | No material effect is established; the finding is outside the agreed boundary above or the reviewer's declared artifact boundary, or reverses an exclusion; or the response cost equals or exceeds the material effect. |
      
      A confirmed security risk, implementation divergence, or governing-source contradiction receives `apply` when correction preserves the confirmed value boundaries; cost alone leaves that classification unchanged. Technical design, contract, or implementation changes are correction work rather than user decisions when those boundaries remain true.
      
      For each finding record:
      
      - stable finding ID;
      - disposition;
      - governing basis and concrete evidence;
      - the reason when `decline`.
      
      The disposition controls routing. For `apply`, forward the complete reviewer finding object exactly as returned, preserving every field and value, and add only the `apply` disposition. This verbatim transfer keeps correction grounded in reviewed evidence; an orchestrator-authored paraphrase or supplement would become an unreviewed requirement. The author or executor determines the correction from the governing sources and current repository evidence.
      
      Only findings with `apply`, and maintained `apply` findings under section 3, enter an author or executor handoff.
      
      ## 2. Revise and Reconsider
      
      Select the existing correction owner from the accepted state each finding requires:
      
      - use the owning document author when the implementation already satisfies the confirmed value boundaries and the technical artifact must change;
      - use the executor when the implementation must change to reach the accepted state.
      
      For a mixed set, complete author-owned corrections first and re-evaluate executor-owned findings against the corrected governing artifact. Pass complete `apply` finding objects verbatim with their dispositions to the selected owner. Invoke a document author as a fresh update call with the original target and those findings; the artifact supplies unaffected context. When an executor is used, preserve its original `task_file` or four direct-scope fields and add the findings as `correction_findings`; correction remains inside the original execution scope.
      
      For an applied Design Doc finding about an unverified decision-changing premise, the fresh technical-designer invocation applies its bounded self-verification gate. The finding carries the exact premise and required evidence; the designer selects existing evidence, a smaller design valid under every unresolved outcome, or a probe when all gate conditions hold. Rerun the originating verifier or reviewer after the update.
      
      For a reconciliation reviewer, reuse the initial reviewer inputs and add `prior_feedback` as an array of `{ id, disposition, reason?, evidence }`.
      
      The correction assessment covers exactly every received item. The reviewer completes that scope and then:
      
      - mark an applied item `resolved` when current evidence shows that the artifact satisfies the finding and preserves the changed boundary; otherwise mark that item `maintained`, citing current evidence;
      - mark a declined finding `withdrawn` when current evidence and governing sources no longer support it; otherwise mark that item `maintained`, citing current evidence;
      - emit exactly one `prior_feedback_reconciliation` entry for every received ID.
      
      Derive the correction re-review status or verdict only from these reconciliation entries. An independent factual verifier may repeat an observed discrepancy; the orchestrator assigns its disposition from governing evidence.
      
      For a bounded verifier, rerun after at least one correction is applied from its latest result or when the caller's re-run rule identifies a direct change to its declared boundary. Pass the previous complete result, dispositions, and correction diff or paths. The returned result replaces corrected items and carries unaffected evidence forward. Match materially identical findings by their claim or conflict and cited source and target evidence rather than a regenerated positional ID. A new finding enters routing only when its evidence links it causally to the correction.
      
      ## 3. Converge or Report
      
      Resolve correction re-review entries by their recorded `prior_disposition`:
      
      - `resolved` and `withdrawn` are complete;
      - `maintained` with `prior_disposition: apply` returns the original finding and the complete reconciliation entry verbatim through the same author or executor path, followed by another correction re-review;
      - `maintained` with `prior_disposition: decline` retains that decline and does not reopen the correction cycle.
      
      For a bounded verifier, a current finding with `apply` returns through the correction path, a current finding with a retained or newly assigned `decline` is complete, and an empty actionable result is complete.
      
      After the same `apply` finding remains material through two consecutive correction attempts, finish the correction cycle as incomplete and report the finding with its latest implementation and verification evidence. Apply the same terminal report to a required input or verification prerequisite that remains unavailable after in-scope recovery. Progress after every `apply` correction is complete and every other actionable finding has a `decline` disposition. The parent requirement and authority gates independently control their workflow stops.
      
      Handoffs contain this exact set:
      
      - the original review target identifier;
      - initial reviewer or verifier inputs unchanged when rechecking;
      - complete `apply` finding objects verbatim, with only their orchestrator dispositions added;
      - the complete reconciliation entry when a maintained `apply` finding returns to its author or executor;
      - declined IDs with reasons and evidence in `prior_feedback` when the next consumer accepts reviewer reconciliation;
      - for a bounded verifier, the previous complete result and correction diff or paths in the same `prior_feedback` handoff.
      
      An author handoff contains no other orchestrator-authored semantic content.
      
      The final user report lists every declined actionable finding with its ID, governing reason, and evidence.
      
      ## Resolved Verification Evidence
      
      After Review Resolution completes for code-verifier output, pass one `verification_evidence` object to the next document reviewer:
      
      - start from the latest verifier result after every applied correction and rerun;
      - preserve its `summary`, `inventoryCoverage`, and `limitations` unchanged;
      - preserve each remaining discrepancy unchanged and add its `disposition`, plus `dispositionReason` and `dispositionEvidence` for a decline;
      - include remaining discrepancies only after each carries a resolved `decline` disposition; applied corrections are represented by the latest verifier result.
      
      The document reviewer consumes this resolved evidence but does not own verifier-disposition convergence. Update and reverse-engineer flows may pass the current verifier result as `verification_evidence` before correction resolution when that result is the evidence being reviewed.
      
  • SKILL.md 36 KB
    ---
    name: subagents-orchestration-guide
    description: Guides subagent coordination through implementation workflows. Use when orchestrating multiple agents, managing workflow phases, or determining autonomous execution mode.
    ---
    
    # Subagents Orchestration Guide
    
    ## Role: The Orchestrator
    
    **Explicit User Instruction**: The user explicitly instructs and authorizes every subagent call named in the invoked recipe. Execute each applicable call when its prerequisites are met.
    
    The orchestrator owns workflow decisions, routing, progress management, user interaction, the investigation and validation needed for those decisions, and explicitly assigned mechanical operations, using any available tool. Named specialists own explicitly assigned investigation and semantic deliverable creation or modification; invoke them before producing or changing code, tests, configuration, documents, task files, or other artifacts.
    
    ### Workflow Subagent Context — Mandatory
    
    This workflow's specialists are already self-contained through their agent definitions, loaded skills, and referenced artifacts. The smallest valid Agent prompt is the most reliable: the complete prompt is the exhaustive set of canonical `field: value` entries declared by the specialist's input contract. Preserve each value's meaning from its authoritative source and apply the canonical serialization declared for that field. This output discipline supersedes general-purpose prompt self-containment because added context competes with the specialist's loaded process and can prevent coherent completion.
    
    This section governs the orchestrator's Agent prompt. Each specialist's agent definition owns its input acceptance and resolves its operational inputs. The orchestrator supplies the canonical contract entries unchanged.
    
    ### First Action Rule
    
    When receiving a new full-cycle task, retain the user's complete wording in the orchestrator and invoke requirement-analyzer with the Requirement Evidence Handoff below. Compare its scope evidence, cost evidence, and questions against that retained wording to judge requirement convergence and Structural Scale in the orchestrator. Dedicated design recipes use their own codebase-scoped bootstrap.
    
    **Requirement Evidence Handoff**: pass `requirements` as the shortest verbatim user wording of the problem or desired user-visible or operational outcome, using an orchestrator working summary only when no such wording exists; pass `context` as the shortest user reason needed to interpret that outcome plus an environmental constraint only when it is essential. Keep the remaining requirement detail in the orchestrator for comparison after the result returns. The handoff supplies an evidence target; the retained wording supplies product requirements and exclusions. Classify evaluation requests, speculative ideas, and prescribed mechanisms from that retained wording rather than from the returned evidence, because a classification produced by an analyzer is inference presented in the same object as observation.
    
    Build and judge the `convergence` record in the orchestrator with the requirement-convergence skill. Run its hearing protocol at the requirements stop point. Re-invoke requirement-analyzer only when an answer changes the repository analysis target or scope evidence; otherwise update the convergence and Structural Scale judgment directly.
    
    ### Small Evidence Gate
    
    Classify Small when `scopeEvidence.executionRoute.status` is `evident`, that route remains inside one responsibility, and every `costEvidence.unknowns` or `questions` item is proven invariant to boundaries, persistence/shared contracts, and potentially durable choices. Positive route evidence identifies the supported route; an empty alternatives list supplies supporting context. When confirmed requirements remain unresolved at this gate, invoke codebase-analyzer before assigning Structural Scale. Its result supports Small when `analysisScope` and `currentPath` establish one repository-supported route inside one responsibility and every `candidateDecisionPoints`, `unknowns`, and `limitations` item is proven classification-invariant. Other observed boundaries and outcomes route Medium or Large. Reuse that result as the Medium design analysis when the confirmed requirements remain unchanged. For Large, treat it as routing evidence, create and approve the PRD, then run the design analysis against the approved `prd_path`. ADR qualification occurs after codebase-analyzer returns credible technical options and the scope is confirmed.
    
    ### Requirement Change Detection During Flow
    
    After an analysis result returns, compare each user-facing or operational responsibility it exposes against the confirmed scope. When either leaving that responsibility as it is or changing it would alter the confirmed outcome or an exclusion, return it through the requirements gate before dependent design work; a technical choice about how to satisfy the confirmed scope continues through the design owners instead.
    
    Treat a proposed change to the confirmed outcome, desired-future requirements, or non-goals as a requirement change. When evidence shows those value boundaries cannot all remain true, stop at the requirements gate and ask the user which boundary changes. A technical design or implementation correction that preserves them is not a requirement change, including removal of a technical choice that works but is no longer necessary; passage through an earlier phase does not establish that its means remain necessary. Update each affected technical artifact and resume from the earliest affected technical gate while preserving outputs that remain valid.
    
    ## Orchestration Principles
    
    ### Outcome Stewardship
    
    The orchestrator steers the workflow toward the smallest sufficient set of deliverables and changes that achieves the confirmed outcome while satisfying binding constraints and required verification. Evaluate specialist proposals against that boundary before routing work.
    
    Preserve specialist evidence ownership and approved artifacts as semantic sources so the workflow converges on the confirmed MVP; orchestrator-authored investigation targets, restatements, or follow-on instructions bias evidence and create unreviewed scope.
    
    ### Delegation Boundary: What vs How
    
    Pass the governing requirement source and the specialist's expected action. Investigation specialists discover affected paths and responsibility boundaries; artifact and execution specialists receive the confirmed paths or scope they must act on. Each specialist determines its execution method from repository evidence and applicable artifacts.
    
    **Decision precedence for routing**:
    1. User instructions (explicit requests or constraints)
    2. Task files and design artifacts (Design Doc, PRD, work plan)
    3. Objective repo state (git status, file system, project configuration)
    4. Specialist judgment
    
    **Scope source classification**:
    - An explicit restriction in the user instruction or confirmed outcome, desired-future requirements, or non-goals is a hard boundary. A technical artifact is the primary implementation baseline, but its How is corrected through the affected technical artifacts when repository evidence invalidates it without changing those value boundaries.
    - Target paths and task-file file lists are investigation starting points and expected evidence unless their governing source explicitly makes them exclusive.
    - Changes to adjacent files proceed when repository evidence shows they are required by the same confirmed outcome, responsibility, contract, or consistency rule.
    - Unrelated improvements remain outside the active change. A proposed change to the confirmed outcome, desired-future requirements, or non-goals returns to the requirements gate. Authorization for an irreversible external action returns to the authority gate. Technical design, contract, and implementation changes that preserve the confirmed value boundaries proceed through their affected technical artifacts.
    
    Before routing specialist output, validate each claim that controls the next workflow decision against the highest applicable source above. Route according to that source; specialist judgment governs decisions left unresolved by items 1-3.
    
    ### Specialist Result Acceptance
    
    Each specialist's agent definition owns its canonical result shape. As receiver, the orchestrator chooses the next action from the result's semantic content, governing sources, produced artifacts, and repository state. Semantically equivalent labels, omitted optional fields, and absent transition labels remain acceptable when those sources support the next action. Resolve operational gaps through inspection or repository-local reversible judgment and continue unaffected work.
    
    Continue incomplete implementation while repository evidence supplies an action that advances the confirmed outcome. When current authority and evidence cannot advance required implementation, finish with an incomplete report containing the remaining work and observed evidence. Treat a proof-only limitation differently: perform recovery available within the current authority and scope, run every available check, retain the complete limitation result, establish the recipe's normal reversible task boundary, and continue remaining tasks. Retry retained limitations before final verification and report only those that remain. Claim only the proof actually observed. User interaction is reserved for choosing a change to confirmed value boundaries or authorizing an irreversible external action.
    
    ### Review Resolution
    
    Apply `references/review-resolution.md` to actionable deliverable-review findings. The orchestrator decides dispositions, validates results, and routes work; the named specialist produces or changes deliverables.
    
    ### Task Assignment with Responsibility Separation
    
    | Specialist | Responsibility |
    |---|---|
    | task-executor | Implement scoped work and tests, and confirm added tests pass; leave whole-repository quality assurance to the quality-fixer. |
    | quality-fixer | Run overall checks, fix quality failures, and return `pass` only after completing those fixes. |
    
    For frontend work, substitute task-executor-frontend and quality-fixer-frontend; in fullstack work, select them by task layer.
    
    ## Constraints Between Subagents
    
    Workflow coordination is flat: the orchestrator issues every specialist call and receives every result. Specialist definitions keep `Agent` outside their tool sets.
    
    ## Explicit Stop Points
    
    Apply these approval stops when producing or materially revising an artifact in the current workflow. At each stop the user approves an action — completing the current phase, or authorizing implementation — rather than ratifying the artifact's technical content. Authority over required outcomes and explicit constraints comes from the user's own wording in the convergence record, not from passing a stop. A user instruction to proceed to a later phase accepts the preceding phases and authorizes entry into that phase; continue from that entry point rather than rechecking earlier review or approval records. In particular, a build instruction with an existing Work Plan grants batch approval for task materialization and implementation.
    
    Before presenting an artifact at an approval stop, read its current version and base the presentation on that content. At the Design stop, also read the current PRD when present and state the confirmed user-visible outcome from it or the confirmed requirement context alongside major internal responsibility, contract, or refactoring changes, so the user can judge whether to proceed.
    
    | Phase | Stop Point | User Action Required |
    |-------|------------|---------------------|
    | Requirements | After requirement-analyzer completes | Answer the requirement-convergence hearing, confirm the recorded requirements match their intent, then approve proceeding |
    | PRD | After document-reviewer completes PRD review | Approve completing the PRD phase and proceeding |
    | UI Spec | After document-reviewer completes an applicable UI Spec review | Approve completing the UI Spec phase and proceeding |
    | ADR batch | After document-reviewer reviews the complete qualifying batch | Approve completing the ADR batch phase and proceeding |
    | Design | After design-sync completes consistency verification | Approve completing the design phase and proceeding |
    | Work Plan | After work plan review (document-reviewer, doc_type WorkPlan; Medium/Large) completes | Batch approval: authorize implementation within this outcome |
    
    **After applicable implementation authorization**: Confirmed Small requirements or Medium/Large batch approval start autonomous execution, which continues until completion or an escalation condition is reached.
    
    ## Scale Determination and Document Requirements
    
    | Scale | Structural condition | PRD | ADR batch | Design Doc | Work Plan |
    |-------|----------------------|-----|-----------|------------|-----------|
    | Small | One outcome has one evident repository-supported implementation inside one responsibility and no unresolved durable choice | Update when applicable | None | None | None |
    | Medium | One outcome coordinates across a boundary or requires investigation of a potentially durable choice | Update when applicable | When one or more decision points pass both filters | **Required** | **Required** |
    | Large | Independently valuable outcomes require separate design decisions | **Required** | When one or more decision points pass both filters | **Required** | **Required** |
    
    File count supports the judgment but does not determine it. A qualifying durable decision sets the floor at Medium. Apply the Choice filter before the Durability filter after repository option evidence exists.
    
    ## How to Call Subagents
    
    ### Execution Method
    Each subagent invocation is a **fresh Agent tool** call, isolating each phase's context; a SendMessage resume reuses the prior agent's context and breaks that isolation. Each call uses:
    - `subagent_type`: Agent name (e.g., "task-executor")
    - `description`: Concise task description (3-5 words)
    - `prompt`: Values serialized in the active workflow's input contract
    
    ### Orchestrator Execution Boundary
    
    Tool choice does not define responsibility: the orchestrator may use any available tool for its owned work, while named specialists perform semantic deliverable creation or modification; the orchestrator writes only for mechanical operations explicitly assigned by the active workflow.
    
    ### Prompt Construction Rule
    The active workflow's input contract is already optimized to provide the specialist with the context for its owned result. The orchestrator preserves that optimization by passing its named fields in their declared forms; the prompt consists of those fields and values, while artifact paths and unchanged specialist outputs carry their own semantics.
    
    ## Handling Requirement Changes
    
    Use create mode for initial documents. For requirement-driven revisions, invoke the owning document specialist in `update` mode and add history:
    
    - **work-planner**: update only before execution
    - **technical-designer / prd-creator**: update affected documents, then invoke document-reviewer
    - **document-reviewer**: run before user approval after PRD/ADR/Design Doc changes and after Work Plan changes; Small changes have no Work Plan
    
    ## Basic Flow: Planning and Implementation
    
    ### Planning flow (per scale)
    
    | Scale | Planning flow |
    |-------|---------------|
    | Large | requirement-analyzer → PRD → PRD review → codebase-analyzer → conditional external/UI analysis and UI Spec → optional ADR batch/review/approval → Design Doc → code-verifier/Review Resolution → document-reviewer → design-sync → acceptance-test-generator → work-planner → work plan review → task-decomposer |
    | Medium | requirement-analyzer → codebase-analyzer → conditional external/UI analysis and UI Spec → optional ADR batch/review/approval → Design Doc → code-verifier/Review Resolution → document-reviewer → design-sync → acceptance-test-generator → work-planner → work plan review → task-decomposer |
    | Small | requirement-analyzer → conditional codebase-analyzer when the Small evidence gate is unresolved → direct task execution (no Work Plan) |
    
    The requirement-convergence and external-resource hearings run in the orchestrator. In an implementation workflow, confirmation at the Requirements stop authorizes the confirmed Small direct scope. Medium/Large implementation begins after Work Plan batch approval.
    
    Rules:
    - When documentation-criteria requires a UI Spec, complete it before ADR qualification and Design Doc creation
    - An ADR batch is optional; the Design Doc is mandatory for Medium/Large work even when ADRs exist
    - When the Small evidence gate is unresolved, invoke codebase-analyzer with confirmed `requirements` to resolve routing. Reuse that result for unchanged Medium scope. For Large, create and approve the PRD first, then invoke codebase-analyzer for design with only `prd_path`; the pre-scale result remains routing evidence because the approved PRD becomes the governing design source. For Medium already established by positive boundary evidence, invoke once with confirmed `requirements`
    - When a UI Spec applies, invoke ui-analyzer with that same governing-source choice plus existing `ui_spec_path`, decision-relevant `prototype_path`, and selected `external_resource_refs` or `[]`; invoke ui-spec-designer with `confirmed_requirement_context` as the approved PRD path exactly or, only when none exists, the unchanged confirmed convergence record, plus the complete unchanged `ui_analysis`, applicable unchanged `codebase_analysis`, optional `prototype_path`, and `external_resource_refs` or `[]`. A prototype does not state how far it is meant to be followed — one team hands over a rendering to implement as is, another a rough sketch of intent — so when a `prototype_path` is present, pass `prototype_reference_strength` to ui-spec-designer: `binding` when implementation follows the prototype's rendering, `reference` when only what the UI Spec records reaches implementation. Resolve it from what the user already stated about the prototype, and ask only when neither reading is supported
    - Before ADR qualification, use the governing source plus `reuse` and `invalidations` to remove questions that already have one sufficient approach. Apply documentation-criteria Choice then Durability filters only to the remaining `candidateDecisionPoints`. When non-empty, invoke each owning technical-designer with `document_to_create: ADRBatch`, `confirmed_requirement_context` as the approved PRD path exactly or, only when none exists, the unchanged confirmed convergence record, ordered confirmed `decision_points` unchanged, and the corresponding `candidateDecisionPoints` objects unchanged as `decision_materials`; add an approved `ui_spec_path` only when it constrains a frontend decision. Run owner batches serially, review all returned paths once with `doc_type: ADRBatch`, and obtain one user approval. After approval, set every approved ADR to `Accepted` and verify the status updates. For corrections, group findings by ADR path and invoke update mode once per path before re-reviewing the complete batch. An empty result proceeds directly to the Design Doc
    - Invoke the Design Doc owner with `document_to_create: DesignDoc`, `confirmed_requirement_context` as the approved PRD path exactly or, only when none exists, the unchanged confirmed convergence record, `structural_scale`, unchanged `codebase_analysis`, optional unchanged `ui_analysis`, and accepted `adr_paths`; frontend/fullstack invocations add only their named UI or layer artifact paths
    - Resolve code-verifier discrepancies through Review Resolution before invoking document-reviewer; pass the exact HC-04 inputs rather than a narrative evidence bundle
    - An applied `unverified` discrepancy returns through a fresh owning technical-designer update invocation. Capability probing is reserved for the designer's review-triggered gate, with that fresh designer as the sole correction specialist
    - Fullstack layer sequencing is defined only in `references/monorepo-flow.md`
    - `design-sync` is required whenever multiple Design Docs exist
    - When creating or materially updating a Medium/Large Work Plan, run document-reviewer (doc_type WorkPlan) and Review Resolution through correction re-review, its parent requirement or authority exits, and convergence before presenting the plan for batch approval. Existing-plan build entry follows the phase acceptance rule in Explicit Stop Points.
    
    Start the applicable Structural Scale flow at the user-requested phase. Before reporting completion, verify the artifacts and results required by every applicable phase from that entry point through completion, and complete any missing work within those phases. Return to an earlier phase when a material change invalidates its outcome, using Handling Requirement Changes.
    
    ## Autonomous Execution Mode
    
    ### Pre-Execution Gate
    
    Verify commit capability before autonomous mode. Let task-executor and quality-fixer recover available test or quality tooling and retain an exact proof limitation for the remainder; escalate a known authority-bound prerequisite before entry.
    
    Confirmed Small requirements or Medium/Large batch approval authorize task-executor implementation and quality-fixer corrections until completion or escalation.
    
    ### Autonomous Execution Summary
    For Medium/Large, after batch approval, including an existing-plan build instruction, autonomously execute the following processes through completion or an escalation condition:
    
    ```mermaid
    graph TD
        START[Batch approval] --> TD[task-decomposer]
        TD --> CYCLE[Per-task 4-step cycle, including commit]
        CYCLE -->|remaining tasks| CYCLE
        CYCLE -->|all tasks complete| REVIEW[Initial reviewer set or evidence-required reruns]
        CYCLE -->|recoverable or structurally incomplete result| CYCLE
        CYCLE -->|value-boundary choice or irreversible authorization| USER[Escalate or re-analyze]
        REVIEW -->|passed| REPORT[Completion report]
        REVIEW -->|actionable findings| RR[Review Resolution]
        RR -->|apply| FIX[owning author or executor + applicable verification]
        FIX --> REVIEW
        RR -->|all decline| REPORT
    ```
    
    For Small, execute one direct-scope 4-step cycle. Complete after `pass`, or retry a retained `verification_incomplete` result once and complete with its exact repeated limitation. Small has no task decomposition, document-dependent post-implementation review, or task-file cleanup.
    
    ### Post-Implementation Review Status Routing (Medium/Large)
    
    | Reviewer | Complete: empty finding set | Enter Review Resolution | Blocked |
    |----------|---------------------------|-------------------------|---------|
    | code-reviewer | `verdict` is `pass` | `verdict` is `needs-improvement` or `needs-redesign` | `verdict` is `blocked` → Apply Specialist Result Acceptance |
    | security-reviewer | `status` is `pass` | `status` is `needs_revision` | `status` is `blocked` → Apply Specialist Result Acceptance |
    
    Reviewer findings are candidates. Create correction work only from the Review Resolution `apply` set. A reviewer `pass` records phase passage: it grants no user-held execution authority and does not establish that the reviewed means remain necessary.
    
    **Fix-cycle handoff**: Apply Review Resolution and invoke each correction owner it selects. For an author-owned technical-artifact correction, invoke the layer-appropriate technical designer in update mode, run the artifact's existing document-reviewer and applicable design-sync gates, then re-run the originating reviewer. For an executor-owned correction, invoke the layer-appropriate executor with its original `task_file` or direct-scope fields plus `correction_findings` as the complete `apply` finding objects verbatim with only their dispositions added, then branch on the executor result through the per-task cycle's step 2, including its conditional integration-test-reviewer path, and run the applicable quality gate. When both owners are required, Review Resolution's author-first re-evaluation controls the order. Carry `prior_feedback` only to a reviewer or verifier being rechecked. Post-implementation corrections stay uncommitted through this cycle: the reviewers read the current working tree, so run the applicable quality gate and re-run the originating reviewer on the uncommitted changes, and commit the applied corrections once through Commit Boundary Check after the complete review set reaches Review Resolution convergence.
    
    **Re-run rule**: After an applied post-implementation correction, re-run only the reviewer that owns a corrected finding from its latest result. Retain every passed reviewer result, including after another reviewer's correction. Pass the previous complete result, dispositions, and correction diff or paths to the rerun. After Specialist Result Acceptance recovers a blocked review prerequisite, re-run that reviewer. Review Resolution convergence governs acceptance and preserves resolved declines.
    
    ### Conditions for Stopping Autonomous Execution
    
    | Trigger | Action |
    |---|---|
    | Evidence shows the confirmed outcome, desired-future requirements, and non-goals cannot all remain true without a user choice | Apply Requirement Change Detection and ask which value boundary changes. |
    | An irreversible external action requires authorization | Request authorization at the authority gate. |
    | A subagent result uses a semantically equivalent label, omits a non-decision field, or leaves the next action implicit | Derive the next action from its semantic content, governing sources, produced artifacts, and repository state. |
    | Required implementation remains incomplete | Continue while repository evidence supplies an advancing action; otherwise finish with an incomplete report and the observed evidence. |
    | A subagent reports an environment or execution prerequisite | Recover it within current authority when practical, complete available checks, retain the proof limitation, and continue. Retry it before final verification and include it in the final report only if it remains. |
    | A requirement changes | Apply Requirement Change Detection above. After task-decomposer starts, invalidate affected tasks; restart document design only when the requirement change invalidates an approved requirement, contract, data flow, verification strategy, or task boundary. |
    | The user stops or interrupts | Stop autonomous execution. |
    
    ### Task Execution Cycle
    
    #### Commit Boundary Check
    
    Immediately before a workflow commit:
    1. Use repository state at the commit boundary as the primary evidence and account for every actual change by mapping it to the confirmed outcome, a governing source, or a necessary dependency, test, generated artifact, or adjacent maintenance change. `target_paths` and task Target Files are investigation starting points; a change with this evidence proceeds independently of its initial path membership.
    2. Every required change is ready for the task commit, accidental changes introduced during the task are removed, and existing worktree changes unrelated to the confirmed outcome remain intact.
    3. Commit the resulting change set. When repository evidence shows a change would alter the confirmed outcome, desired-future requirements, or non-goals, apply Requirement Change Detection before committing it.
    
    For a `verification_incomplete` commit, append one trailer pair per retained limitation:
    
    ```text
    Verification-Limitation: <reason>
    Verification-Affected: <affected check or command>
    ```
    
    Derive the values from the quality-fixer result. Keep the complete result in orchestration state for the current run; the trailers preserve the minimum retry input after continuation.
    
    **Per-task cycle**:
    1. **Execute**: record the current HEAD as `diffBase`, then invoke task-executor with `task_file: [path]` when one exists; for Small, invoke it with `direct_scope` as the confirmed outcome and exclusions, `governing_sources`, `target_paths`, and `observable_verification`
    2. **Branch on executor result**:
       - `status: escalation_needed` or `blocked` → Apply Specialist Result Acceptance
       - `requiresTestReview` is `true` → Identify the changed integration/E2E test files in the current changes and invoke integration-test-reviewer with them as `changedTestFiles`, plus `diffBase`, optional `taskFile`, prompt-only claims, and `mutationEvidence`
         - `pass` → Proceed to step 3
         - `blocked` → Apply Specialist Result Acceptance
         - `needs_revision` → Pass `qualityIssues` objects unchanged into Review Resolution. On correction re-review, derive the next transition only from `prior_feedback_reconciliation`; return to step 1 for rerouted corrections and proceed to step 3 only at convergence
       - Otherwise → Proceed to step 3
    3. **Quality-fix**: invoke quality-fixer with `task_file` when available; otherwise copy the executor's `direct_scope`, `governing_sources`, and `observable_verification` inputs unchanged, including `correction_findings` when supplied. Add upstream `mutationEvidence` and `qualityCommand` from the caller first or task otherwise
       - `stub_detected` → Return to step 1 with quality-fixer's `incompleteImplementations` array unchanged as the canonical `incompleteImplementations` field
       - `blocked` → Apply Specialist Result Acceptance
       - `verification_incomplete` → Retain the complete result for final retry and proceed to step 4
       - `pass` → Proceed to step 4
    4. **Commit**: apply Commit Boundary Check, then compose the message from `changeSummary` and execute git commit with Bash after `pass` or `verification_incomplete`; append the verification trailers for the latter
    
    Before post-implementation verifiers, collect retained verification limitations from orchestration state and the verification trailers on task-boundary commits created by the workflow, then re-invoke the applicable quality-fixer once for each limitation using the same task inputs and its affected check or command. When the retry returns `pass`, remove that limitation from retained state. Route newly discovered incomplete implementation through the normal cycle, and retain a repeated `verification_incomplete` result for the final report. Commit any fixes produced by this retry through the same task cycle, then continue post-implementation verification.
    
    ## Handoff Contracts
    
    ### HC-01: requirement-analyzer → orchestrator and codebase-analyzer
    - Invoke with the Requirement Evidence Handoff. The orchestrator compares the returned `scopeEvidence`, `costEvidence`, and `questions` against its retained user wording to judge convergence and Structural Scale. Small requires the positive `scopeEvidence.executionRoute` gate above; named route evidence proves Small eligibility, while empty boundary or question arrays supply supporting context.
    - Keeping the analyzer input independent of orchestrator-selected paths and technical questions preserves the objective repository evidence required for scope and option convergence.
    
    ### HC-01b: convergence record → document owner
    - Pass the orchestrator-judged `convergence` record to whichever agent owns the persisting document.
    - **prd-creator** (when a PRD is created or updated): persists `outcome` to `Success Criteria` and user-authored `nonGoals` to `Future / Out of Scope`; the PRD contains confirmed requirements and boundaries while evaluation requests, speculative ideas, and unselected mechanisms remain only in pre-confirmation convergence context
    - **technical-designer / technical-designer-frontend**: persists the same to the Design Doc's `Requirement Convergence` when no PRD exists, and always records the fields left `weak-but-explicit` there
    - Pass the record unchanged; a field's readiness label travels with it
    
    ### HC-02: codebase-analyzer → technical-designer
    - For an ADR batch, pass the confirmed `decision_points` unchanged and copy their corresponding `decisionMaterials.candidateDecisionPoints` objects unchanged as `decision_materials`.
    - For a Design Doc, pass the codebase-analyzer JSON unchanged as `codebase_analysis`; accepted artifact paths and unchanged evidence keep the Design Doc traceable to reviewed sources rather than an orchestrator-authored shadow interpretation. Use these fields as follows:
    - Required downstream uses:
      - `focusAreas` → canonical disposition-target list for the Fact Disposition Table
      - `simplifications`, `decisionMaterials.reuse`, and `invalidations` → reduce implementation surface and eliminate invalid approaches when their evidence and conditions apply
      - `decisionMaterials.candidateDecisionPoints` → orchestrator first resolves them against the governing source, `simplifications`, `reuse`, and `invalidations`, then applies ADR Choice and Durability filters
      - `decisionMaterials.verification` → required proof boundaries
      - `dataModel`, `dataTransformationPipelines`, `qualityAssurance` → Existing Codebase Analysis / Verification Strategy / Quality Assurance sections
    
    ### HC-03: technical-designer → code-verifier
    - Pass the Design Doc path with `doc_type: design-doc`.
    
    ### HC-03b: applied design-evidence finding → technical-designer
    - Invoke the owning designer as a fresh `update` call with the existing Design Doc path and complete `correction_findings` objects copied verbatim with only their `apply` dispositions added.
    - The existing artifact carries approved requirements, accepted decisions, prior evidence, and unaffected design context. Keep the handoff limited to the artifact path and unchanged applied findings.
    - The designer applies its review-triggered self-verification gate, updates the artifact or returns the exact unresolved premise, and the orchestrator reruns the originating verifier or reviewer.
    
    ### HC-04: code-verifier + codebase-analyzer → document-reviewer
    - Keep verifier discrepancies unchanged so correction and review remain traceable to observed evidence rather than orchestrator-authored design instructions.
    - Apply Review Resolution and rerun verification after every applied correction, passing the previous complete verifier result, dispositions, and correction diff or paths as `prior_feedback`. Form the single `verification_evidence` object defined by the Review Resolution reference.
    - Pass these exact keys: `review_context: creation`, `verification_evidence`, the same `codebase_analysis` JSON previously given to the designer, optional `ui_analysis`, original user requirements as `requirements_verbatim`, and the same `confirmed_requirement_context` supplied at the owning designer invocation.
    - Transition after every remaining verifier item has a resolved disposition. The reviewer validates the resulting design, Fact Disposition coverage, and effective requirements; the orchestrator retains verifier-disposition ownership.
    
    ### HC-05: code-verifier → next-layer technical-designer (fullstack only)
    - Defined only for multi-layer fullstack flow in `references/monorepo-flow.md`
    - Pass: prior-layer Design Doc path plus `prior_layer_verification`
    - Treat `discrepancies[]` as the known issues to address or escalate. Keep every claim absent from the verifier output classified as unverified.
    
    ### technical-designer → work-planner
    
    Pass the Design Doc path. Work-planner maps governing sections and ACs to implementation tasks. An uncovered selected obligation is a planning omission to correct; the Work Plan does not turn missing coverage or missing design content into a user-confirmation item.
    
    ### HC-06: acceptance-test-generator → work-planner
    
    - Invoke acceptance-test-generator with `design_docs` as the applicable Design Doc path list, optional `ui_spec`, and the same `confirmed_requirement_context` used for design.
    - When it returns `value_input_required`, ask once for each listed missing fact, preserve the answer verbatim as `test_value_context`, and reinvoke. The generator applies supplied facts, retains every remaining value as `unknown`, chooses from the available requirement and repository evidence, and continues to its normal completed result.
    - Verify each non-null `generatedFiles.<lane>` path exists. When a lane is `null`, confirm from the Design Doc that no accepted proof obligation requires that boundary, and return an uncovered obligation to the generator for completion.
    - Pass only existing generated paths as work-planner `testSkeletons`; each skeleton carries the lane and boundary information needed for placement.
    - Route an unexpected integration generation failure as incomplete generator work. A validated null E2E lane is complete.
    
    ## References
    
    - `references/monorepo-flow.md`: Fullstack (monorepo) orchestration flow
    - `references/review-resolution.md`: Finding adjudication and correction-loop contract
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related