Architect Plan for Dispatch
Take a fully-scoped project (post-interrogation) and produce a complete,
dependency-aware execution plan that a human reviews and hands to Claude
Dispatch. The plan must be detailed enough that each Dispatch worker can execute
its task with zero follow-up questions, and structured to minimize total token
burn across all workers.
When to Activate
Manual triggers:
- "Architect this"
- "Plan for dispatch"
- "Architect-plan-for-dispatch"
- "Design this for dispatch"
- "Build me a dispatch plan"
- "Break this down for dispatch"
Auto-detect triggers:
- User has completed an interrogate session and the scoped project is complex
(multi-file, multi-domain, or multi-step)
- User describes a project and mentions "dispatch", "workers", "parallel", or
"hand off"
- User wants to build something large and mentions planning before executing
Do NOT activate when:
- The task is small enough for a single Claude session (under ~30 minutes of work)
- The user says "just build it" or "skip planning"
- The user is mid-execution on an already-planned task
Prerequisites
This skill assumes the interrogate skill has already run, or the user has
provided a complete project scope including: goal, constraints, audience,
format, and assumptions. If the scope is incomplete, trigger interrogate first
and return here after.
Required context:
- A configured GitHub repo (default:
ryankolean org, user specifies repo name)
- A clear project scope (from interrogate or user-provided brief)
Phase 1: Repo Analysis and Code Report
Before designing anything, understand what exists. Pull and analyze the full
repository.
What to Analyze
- Structure: Directory tree, file organization patterns, module boundaries
- Dependencies: Package manifests (package.json, requirements.txt, go.mod,
Cargo.toml, etc.), version constraints, dependency graph
- Existing patterns: Code conventions, architecture style, naming, error
handling, test patterns, state management
- Configuration: Environment setup, build tooling, CI/CD, deployment config
- Documentation: README, inline docs, API docs, architectural decision
records
- Tech stack: Languages, frameworks, libraries, database, infrastructure
- Test coverage: Test structure, coverage gaps, testing frameworks in use
- Entry points: Main files, route definitions, API surface, CLI commands
Code Report Output
Generate a code report and commit it to the repo at:
.claude/dispatch/reports/code-report-<SHORT_HASH>.md
Where <SHORT_HASH> is the first 8 characters of the current HEAD commit hash.
Code report template:
# Code Report
**Repo:** <owner>/<repo>
**Commit:** <full_hash>
**Generated:** <ISO-8601 timestamp>
**Branch:** <branch_name>
## Tech Stack
- **Languages:** [list with versions]
- **Frameworks:** [list with versions]
- **Database:** [type and version if detectable]
- **Build tooling:** [bundler, compiler, task runner]
- **Test framework:** [framework and runner]
- **CI/CD:** [platform and config location]
## Architecture Overview
[2-5 sentences describing the overall architecture pattern, data flow, and
module boundaries. Reference specific directories.]
## Directory Structure
[Abbreviated tree showing top 2-3 levels with annotations for what each
major directory contains.]
## Key Patterns Observed
- **Code style:** [conventions, linting, formatting]
- **Error handling:** [pattern used]
- **State management:** [approach]
- **API design:** [REST/GraphQL/RPC, versioning]
- **Authentication:** [if present]
## Dependencies of Note
[List only dependencies that are architecturally significant — ORMs, state
libraries, auth packages, build tools. Skip utilities.]
## Test Coverage Assessment
- **Test structure:** [where tests live, naming convention]
- **Coverage gaps:** [areas with no or minimal testing]
- **Test types present:** [unit, integration, e2e, snapshot]
## Risks and Technical Debt
[Anything that could impact the planned work — outdated dependencies, missing
types, inconsistent patterns, known issues in README/issues.]
If a previous code report exists at a different commit hash, note the delta:
what changed between that report and this one. This enables historical diffing
across planning sessions.
Phase 2: Architecture and Design
With the code report complete, design the solution. This phase produces the
high-level design decisions before breaking into tasks.
Design Deliverables
For each project, produce:
Approach statement: 2-3 sentences on the chosen approach and why
alternatives were rejected.
Component map: Which parts of the system are affected. For each:
- What exists today (from code report)
- What changes
- Why
Data flow: How data moves through the new/modified system. Include
inputs, transformations, storage, and outputs.
Interface contracts: API signatures, function signatures, type
definitions, or schema changes that downstream tasks will depend on. Define
these FIRST so parallel workers share the same contracts.
Risk register: Identify the top 3-5 risks and mitigations.
Token Efficiency Principles
Every design decision should consider Dispatch token cost:
- Define shared contracts early. Interface definitions, types, and schemas
go in a dedicated task that runs first. All downstream tasks reference these
contracts rather than re-deriving them.
- Minimize context per worker. Each task should include ONLY the context
that worker needs — not the full project background. Reference specific files
and line ranges, not "the codebase."
- Prefer small, focused tasks. A worker that touches 1-3 files burns fewer
tokens than one that needs to understand 15 files. Decompose aggressively.
- Front-load decisions. Every ambiguity left in a task prompt causes the
worker to reason about alternatives, burning tokens. Make decisions in the
plan, not in the worker.
- Use file manifests as blinders. When a task lists exactly which files to
read and write, the worker skips scanning the full repo.
Phase 3: Task Decomposition
Break the design into discrete, dispatchable tasks. Each task is a unit of
work for one Dispatch worker.
Task Structure
Every task in the plan MUST include ALL of the following fields:
### Task <N>: <Descriptive Name>
**Execution group:** <group_letter> (A = runs first, B = after A completes, etc.)
**Depends on:** <task numbers, or "none" for parallel-ready tasks>
**Estimated tokens:** <number> (input + output estimate for the worker)
**Recommended model:** <model_tier>
**Risk level:** low | medium | high
#### Instructions
[Precise, complete instructions. The worker should be able to execute this with
zero follow-up questions. Include:
- Exactly what to build/change
- Which files to read for context (specific paths)
- Which files to create or modify (specific paths)
- Code patterns to follow (reference existing code)
- Edge cases to handle
- What NOT to do]
#### Acceptance Criteria
- [ ] [Specific, testable criterion]
- [ ] [Specific, testable criterion]
- [ ] [Each criterion should be verifiable by reading the output]
#### File Manifest
| Action | Path | Notes |
|--------|------|-------|
| READ | src/auth/middleware.ts | Existing auth pattern to follow |
| CREATE | src/payments/handler.ts | New payment handler |
| MODIFY | src/routes/index.ts | Add payment routes |
#### Risk Flags
[If risk level is medium or high, explain what could go wrong and what the
human should review before merging this task's output.]
Execution Groups
Tasks are organized into execution groups that define parallelism:
- Group A: Foundation tasks with no dependencies. Run in parallel.
Examples: shared types, interface contracts, config scaffolding.
- Group B: Tasks that depend on Group A outputs. Run in parallel with
each other once A completes.
- Group C+: Subsequent dependency layers. Continue the pattern.
- Group FINAL: Integration, testing, and verification tasks that run
after all other groups complete.
Within each group, all tasks are parallel-safe. Between groups, there is a
hard dependency barrier.
Model Tiering Defaults
Recommend a model for each task based on complexity. These are defaults — the
user can override per task or globally.
| Tier |
Default Model |
Use When |
| Speed |
Haiku (or fastest available) |
File scaffolding, boilerplate generation, simple config changes, type definitions, straightforward CRUD |
| Balanced |
Sonnet (or mid-tier available) |
Feature implementation, moderate refactors, test writing, API integration, documentation |
| Power |
Opus (or most capable available) |
Complex architecture decisions, security-critical code, multi-file refactors with subtle dependencies, performance optimization |
When new models are released, re-evaluate these tiers based on published
benchmarks and cost-per-token. The principle is: use the cheapest model that
can reliably complete the task on the first attempt. A retry costs more than
using a slightly more expensive model upfront.
User override format: If the user specifies model preferences, honor them.
Accept overrides at two levels:
- Global: "Use Sonnet for everything" — applies to all tasks
- Per-task: "Use Opus for task 3" — applies to that task only
Phase 4: Plan Assembly and Commit
Plan File Structure
Assemble the full plan as a single markdown file and commit to:
.claude/dispatch/plans/<YYYY-MM-DD>-<slug>.md
Where <slug> is a kebab-case name derived from the project goal
(e.g., 2026-04-01-auth-system-refactor.md).
Full plan template:
# Dispatch Plan: <Project Name>
**Created:** <ISO-8601 timestamp>
**Repo:** <owner>/<repo>
**Branch:** <branch_name>
**Base commit:** <full_hash>
**Code report:** .claude/dispatch/reports/code-report-<short_hash>.md
## Project Summary
[2-3 sentences from the interrogate brief. What we're building and why.]
## Scope
**In scope:**
- [Explicit list of what this plan covers]
**Out of scope:**
- [Explicit list of what this plan does NOT cover]
## Design Decisions
[From Phase 2 — approach statement, key decisions, and why alternatives
were rejected. Keep this brief but sufficient for a human reviewer to
understand the rationale.]
## Execution Overview
| Group | Tasks | Parallelism | Estimated Total Tokens |
|-------|-------|-------------|----------------------|
| A | 1, 2, 3 | All parallel | ~X,XXX |
| B | 4, 5 | All parallel (after A) | ~X,XXX |
| FINAL | 6 | Sequential | ~X,XXX |
| **Total** | **6 tasks** | | **~XX,XXX** |
## Model Budget
| Model | Task Count | Est. Tokens | Est. Relative Cost |
|-------|-----------|-------------|-------------------|
| Haiku | X | X,XXX | $ |
| Sonnet | X | X,XXX | $$ |
| Opus | X | X,XXX | $$$ |
## Tasks
[All tasks from Phase 3, in execution group order]
---
## Handoff Instructions
To execute this plan with Claude Dispatch:
1. Review all tasks above. Edit any instructions, acceptance criteria, or
model assignments as needed.
2. For each execution group (A, B, C, ..., FINAL), dispatch all tasks in
that group to Dispatch workers.
3. Wait for the group to complete before starting the next group.
4. After Group FINAL completes, review the integration task output and
run the full acceptance criteria checklist.
### Dispatch Commands
For each task, provide Dispatch with:
- The task instructions (copy the Instructions section)
- The file manifest (so the worker knows its scope)
- The acceptance criteria (so the worker can self-verify)
- The recommended model (or your override)
### Risk Summary
| Task | Risk | Mitigation |
|------|------|-----------|
| [task #] | [risk description] | [what to check] |
Commit Convention
Commit the plan and code report with the message:
chore(dispatch): add plan — <project-slug>
Plan: .claude/dispatch/plans/<filename>.md
Code report: .claude/dispatch/reports/code-report-<hash>.md
If running in Claude.ai (no git access), output both files for the user to
commit manually or via Claude Code.
Rules
Never skip the code report. Even for greenfield projects, analyze the
repo to understand existing conventions, CI/CD, and tooling. A greenfield
project in an existing repo still has context.
Every task must be self-contained. A Dispatch worker receives ONLY its
task section. It cannot see other tasks, the design decisions, or the
project summary. Write instructions accordingly — include all necessary
context within the task itself.
Front-load interface contracts. If multiple tasks share types, schemas,
or API contracts, create a Group A task that defines them. Never let two
parallel workers independently invent the same interface.
Be specific about file paths. "Update the auth module" is not a task
instruction. "Modify src/auth/middleware.ts to add rate limiting using the
pattern in src/auth/csrf.ts" is.
Estimate tokens conservatively. Round up. A task that runs 20% over
budget is cheaper than a retry. Include both input tokens (files the worker
must read) and output tokens (code the worker must write).
Never include secrets, API keys, or credentials in plan files. Reference
environment variable names instead.
When in doubt, make a smaller task. Two focused tasks that each succeed
on the first attempt cost less than one large task that needs a retry.
Include rollback guidance for high-risk tasks. If a task modifies
critical infrastructure, production config, or security boundaries, the
task's risk flags should include how to revert.
Honor the user's model overrides. If the user specifies model preferences
globally or per-task, apply them. Offer your tiering recommendation but
don't override their choice.
Adapt model recommendations to current offerings. When you are aware of
new models (through search, user mention, or updated knowledge), update
the tiering recommendations. The tiers are based on capability and cost,
not fixed model names.
Cross-Surface Behavior
In Claude Code (has git access):
- Clone/pull the repo directly
- Generate the code report from live code analysis
- Commit both plan and code report to the repo
- Display a summary in the terminal
In Claude.ai (no git access):
- User provides the repo name; skill uses GitHub API (via web search/fetch)
to analyze public repo structure and key files
- For private repos, user uploads key files or provides context
- Output both the code report and plan as downloadable markdown files
- Provide the user with commit instructions and file paths
Chaining
- interrogate → architect-plan-for-dispatch: Interrogate scopes the
project, then this skill designs and plans the execution
- architect-plan-for-dispatch → [Claude Dispatch]: Human reviews the plan,
then provides it to Dispatch workers for execution
- architect-plan-for-dispatch → architect-plan-for-dispatch: Re-run on the
same repo at a later commit to generate an updated code report and diff
against the previous plan
1---2name: architect-plan-for-dispatch3description: Full-discovery planning skill that analyzes a GitHub repo, designs a complete implementation plan, and produces a structured markdown execution file for Claude Dispatch. Chains after interrogate. Activates when the user says "architect this", "plan for dispatch", "architect-plan-for-dispatch", "design this for dispatch", or when a large body of work needs thorough planning before handing off to Dispatch workers. Covers greenfield builds, refactors, migrations, infrastructure, documentation, and any complex multi-task project.4---56# Architect Plan for Dispatch78Take a fully-scoped project (post-interrogation) and produce a complete,9dependency-aware execution plan that a human reviews and hands to Claude10Dispatch. The plan must be detailed enough that each Dispatch worker can execute11its task with zero follow-up questions, and structured to minimize total token12burn across all workers.1314## When to Activate1516**Manual triggers:**17- "Architect this"18- "Plan for dispatch"19- "Architect-plan-for-dispatch"20- "Design this for dispatch"21- "Build me a dispatch plan"22- "Break this down for dispatch"2324**Auto-detect triggers:**25- User has completed an interrogate session and the scoped project is complex26 (multi-file, multi-domain, or multi-step)27- User describes a project and mentions "dispatch", "workers", "parallel", or28 "hand off"29- User wants to build something large and mentions planning before executing3031**Do NOT activate** when:32- The task is small enough for a single Claude session (under ~30 minutes of work)33- The user says "just build it" or "skip planning"34- The user is mid-execution on an already-planned task3536## Prerequisites3738This skill assumes the interrogate skill has already run, or the user has39provided a complete project scope including: goal, constraints, audience,40format, and assumptions. If the scope is incomplete, trigger interrogate first41and return here after.4243Required context:44- A configured GitHub repo (default: `ryankolean` org, user specifies repo name)45- A clear project scope (from interrogate or user-provided brief)4647## Phase 1: Repo Analysis and Code Report4849Before designing anything, understand what exists. Pull and analyze the full50repository.5152### What to Analyze53541. **Structure:** Directory tree, file organization patterns, module boundaries552. **Dependencies:** Package manifests (package.json, requirements.txt, go.mod,56 Cargo.toml, etc.), version constraints, dependency graph573. **Existing patterns:** Code conventions, architecture style, naming, error58 handling, test patterns, state management594. **Configuration:** Environment setup, build tooling, CI/CD, deployment config605. **Documentation:** README, inline docs, API docs, architectural decision61 records626. **Tech stack:** Languages, frameworks, libraries, database, infrastructure637. **Test coverage:** Test structure, coverage gaps, testing frameworks in use648. **Entry points:** Main files, route definitions, API surface, CLI commands6566### Code Report Output6768Generate a code report and commit it to the repo at:6970```71.claude/dispatch/reports/code-report-<SHORT_HASH>.md72```7374Where `<SHORT_HASH>` is the first 8 characters of the current HEAD commit hash.7576**Code report template:**7778```markdown79# Code Report80**Repo:** <owner>/<repo>81**Commit:** <full_hash>82**Generated:** <ISO-8601 timestamp>83**Branch:** <branch_name>8485## Tech Stack86- **Languages:** [list with versions]87- **Frameworks:** [list with versions]88- **Database:** [type and version if detectable]89- **Build tooling:** [bundler, compiler, task runner]90- **Test framework:** [framework and runner]91- **CI/CD:** [platform and config location]9293## Architecture Overview94[2-5 sentences describing the overall architecture pattern, data flow, and95module boundaries. Reference specific directories.]9697## Directory Structure98[Abbreviated tree showing top 2-3 levels with annotations for what each99major directory contains.]100101## Key Patterns Observed102- **Code style:** [conventions, linting, formatting]103- **Error handling:** [pattern used]104- **State management:** [approach]105- **API design:** [REST/GraphQL/RPC, versioning]106- **Authentication:** [if present]107108## Dependencies of Note109[List only dependencies that are architecturally significant — ORMs, state110libraries, auth packages, build tools. Skip utilities.]111112## Test Coverage Assessment113- **Test structure:** [where tests live, naming convention]114- **Coverage gaps:** [areas with no or minimal testing]115- **Test types present:** [unit, integration, e2e, snapshot]116117## Risks and Technical Debt118[Anything that could impact the planned work — outdated dependencies, missing119types, inconsistent patterns, known issues in README/issues.]120```121122If a previous code report exists at a different commit hash, note the delta:123what changed between that report and this one. This enables historical diffing124across planning sessions.125126## Phase 2: Architecture and Design127128With the code report complete, design the solution. This phase produces the129high-level design decisions before breaking into tasks.130131### Design Deliverables132133For each project, produce:1341351. **Approach statement:** 2-3 sentences on the chosen approach and why136 alternatives were rejected.1371382. **Component map:** Which parts of the system are affected. For each:139 - What exists today (from code report)140 - What changes141 - Why1421433. **Data flow:** How data moves through the new/modified system. Include144 inputs, transformations, storage, and outputs.1451464. **Interface contracts:** API signatures, function signatures, type147 definitions, or schema changes that downstream tasks will depend on. Define148 these FIRST so parallel workers share the same contracts.1491505. **Risk register:** Identify the top 3-5 risks and mitigations.151152### Token Efficiency Principles153154Every design decision should consider Dispatch token cost:155156- **Define shared contracts early.** Interface definitions, types, and schemas157 go in a dedicated task that runs first. All downstream tasks reference these158 contracts rather than re-deriving them.159- **Minimize context per worker.** Each task should include ONLY the context160 that worker needs — not the full project background. Reference specific files161 and line ranges, not "the codebase."162- **Prefer small, focused tasks.** A worker that touches 1-3 files burns fewer163 tokens than one that needs to understand 15 files. Decompose aggressively.164- **Front-load decisions.** Every ambiguity left in a task prompt causes the165 worker to reason about alternatives, burning tokens. Make decisions in the166 plan, not in the worker.167- **Use file manifests as blinders.** When a task lists exactly which files to168 read and write, the worker skips scanning the full repo.169170## Phase 3: Task Decomposition171172Break the design into discrete, dispatchable tasks. Each task is a unit of173work for one Dispatch worker.174175### Task Structure176177Every task in the plan MUST include ALL of the following fields:178179```markdown180### Task <N>: <Descriptive Name>181182**Execution group:** <group_letter> (A = runs first, B = after A completes, etc.)183**Depends on:** <task numbers, or "none" for parallel-ready tasks>184**Estimated tokens:** <number> (input + output estimate for the worker)185**Recommended model:** <model_tier>186**Risk level:** low | medium | high187188#### Instructions189[Precise, complete instructions. The worker should be able to execute this with190zero follow-up questions. Include:191- Exactly what to build/change192- Which files to read for context (specific paths)193- Which files to create or modify (specific paths)194- Code patterns to follow (reference existing code)195- Edge cases to handle196- What NOT to do]197198#### Acceptance Criteria199- [ ] [Specific, testable criterion]200- [ ] [Specific, testable criterion]201- [ ] [Each criterion should be verifiable by reading the output]202203#### File Manifest204| Action | Path | Notes |205|--------|------|-------|206| READ | src/auth/middleware.ts | Existing auth pattern to follow |207| CREATE | src/payments/handler.ts | New payment handler |208| MODIFY | src/routes/index.ts | Add payment routes |209210#### Risk Flags211[If risk level is medium or high, explain what could go wrong and what the212human should review before merging this task's output.]213```214215### Execution Groups216217Tasks are organized into execution groups that define parallelism:218219- **Group A:** Foundation tasks with no dependencies. Run in parallel.220 Examples: shared types, interface contracts, config scaffolding.221- **Group B:** Tasks that depend on Group A outputs. Run in parallel with222 each other once A completes.223- **Group C+:** Subsequent dependency layers. Continue the pattern.224- **Group FINAL:** Integration, testing, and verification tasks that run225 after all other groups complete.226227Within each group, all tasks are parallel-safe. Between groups, there is a228hard dependency barrier.229230### Model Tiering Defaults231232Recommend a model for each task based on complexity. These are defaults — the233user can override per task or globally.234235| Tier | Default Model | Use When |236|------|--------------|----------|237| **Speed** | Haiku (or fastest available) | File scaffolding, boilerplate generation, simple config changes, type definitions, straightforward CRUD |238| **Balanced** | Sonnet (or mid-tier available) | Feature implementation, moderate refactors, test writing, API integration, documentation |239| **Power** | Opus (or most capable available) | Complex architecture decisions, security-critical code, multi-file refactors with subtle dependencies, performance optimization |240241When new models are released, re-evaluate these tiers based on published242benchmarks and cost-per-token. The principle is: use the cheapest model that243can reliably complete the task on the first attempt. A retry costs more than244using a slightly more expensive model upfront.245246**User override format:** If the user specifies model preferences, honor them.247Accept overrides at two levels:248- **Global:** "Use Sonnet for everything" — applies to all tasks249- **Per-task:** "Use Opus for task 3" — applies to that task only250251## Phase 4: Plan Assembly and Commit252253### Plan File Structure254255Assemble the full plan as a single markdown file and commit to:256257```258.claude/dispatch/plans/<YYYY-MM-DD>-<slug>.md259```260261Where `<slug>` is a kebab-case name derived from the project goal262(e.g., `2026-04-01-auth-system-refactor.md`).263264**Full plan template:**265266```markdown267# Dispatch Plan: <Project Name>268269**Created:** <ISO-8601 timestamp>270**Repo:** <owner>/<repo>271**Branch:** <branch_name>272**Base commit:** <full_hash>273**Code report:** .claude/dispatch/reports/code-report-<short_hash>.md274275## Project Summary276[2-3 sentences from the interrogate brief. What we're building and why.]277278## Scope279**In scope:**280- [Explicit list of what this plan covers]281282**Out of scope:**283- [Explicit list of what this plan does NOT cover]284285## Design Decisions286[From Phase 2 — approach statement, key decisions, and why alternatives287were rejected. Keep this brief but sufficient for a human reviewer to288understand the rationale.]289290## Execution Overview291292| Group | Tasks | Parallelism | Estimated Total Tokens |293|-------|-------|-------------|----------------------|294| A | 1, 2, 3 | All parallel | ~X,XXX |295| B | 4, 5 | All parallel (after A) | ~X,XXX |296| FINAL | 6 | Sequential | ~X,XXX |297| **Total** | **6 tasks** | | **~XX,XXX** |298299## Model Budget300301| Model | Task Count | Est. Tokens | Est. Relative Cost |302|-------|-----------|-------------|-------------------|303| Haiku | X | X,XXX | $ |304| Sonnet | X | X,XXX | $$ |305| Opus | X | X,XXX | $$$ |306307## Tasks308309[All tasks from Phase 3, in execution group order]310311---312313## Handoff Instructions314315To execute this plan with Claude Dispatch:3163171. Review all tasks above. Edit any instructions, acceptance criteria, or318 model assignments as needed.3192. For each execution group (A, B, C, ..., FINAL), dispatch all tasks in320 that group to Dispatch workers.3213. Wait for the group to complete before starting the next group.3224. After Group FINAL completes, review the integration task output and323 run the full acceptance criteria checklist.324325### Dispatch Commands326327For each task, provide Dispatch with:328- The task instructions (copy the Instructions section)329- The file manifest (so the worker knows its scope)330- The acceptance criteria (so the worker can self-verify)331- The recommended model (or your override)332333### Risk Summary334335| Task | Risk | Mitigation |336|------|------|-----------|337| [task #] | [risk description] | [what to check] |338```339340### Commit Convention341342Commit the plan and code report with the message:343344```345chore(dispatch): add plan — <project-slug>346347Plan: .claude/dispatch/plans/<filename>.md348Code report: .claude/dispatch/reports/code-report-<hash>.md349```350351If running in Claude.ai (no git access), output both files for the user to352commit manually or via Claude Code.353354## Rules3553561. **Never skip the code report.** Even for greenfield projects, analyze the357 repo to understand existing conventions, CI/CD, and tooling. A greenfield358 project in an existing repo still has context.3593602. **Every task must be self-contained.** A Dispatch worker receives ONLY its361 task section. It cannot see other tasks, the design decisions, or the362 project summary. Write instructions accordingly — include all necessary363 context within the task itself.3643653. **Front-load interface contracts.** If multiple tasks share types, schemas,366 or API contracts, create a Group A task that defines them. Never let two367 parallel workers independently invent the same interface.3683694. **Be specific about file paths.** "Update the auth module" is not a task370 instruction. "Modify `src/auth/middleware.ts` to add rate limiting using the371 pattern in `src/auth/csrf.ts`" is.3723735. **Estimate tokens conservatively.** Round up. A task that runs 20% over374 budget is cheaper than a retry. Include both input tokens (files the worker375 must read) and output tokens (code the worker must write).3763776. **Never include secrets, API keys, or credentials in plan files.** Reference378 environment variable names instead.3793807. **When in doubt, make a smaller task.** Two focused tasks that each succeed381 on the first attempt cost less than one large task that needs a retry.3823838. **Include rollback guidance for high-risk tasks.** If a task modifies384 critical infrastructure, production config, or security boundaries, the385 task's risk flags should include how to revert.3863879. **Honor the user's model overrides.** If the user specifies model preferences388 globally or per-task, apply them. Offer your tiering recommendation but389 don't override their choice.39039110. **Adapt model recommendations to current offerings.** When you are aware of392 new models (through search, user mention, or updated knowledge), update393 the tiering recommendations. The tiers are based on capability and cost,394 not fixed model names.395396## Cross-Surface Behavior397398**In Claude Code (has git access):**399- Clone/pull the repo directly400- Generate the code report from live code analysis401- Commit both plan and code report to the repo402- Display a summary in the terminal403404**In Claude.ai (no git access):**405- User provides the repo name; skill uses GitHub API (via web search/fetch)406 to analyze public repo structure and key files407- For private repos, user uploads key files or provides context408- Output both the code report and plan as downloadable markdown files409- Provide the user with commit instructions and file paths410411## Chaining412413- **interrogate → architect-plan-for-dispatch:** Interrogate scopes the414 project, then this skill designs and plans the execution415- **architect-plan-for-dispatch → [Claude Dispatch]:** Human reviews the plan,416 then provides it to Dispatch workers for execution417- **architect-plan-for-dispatch → architect-plan-for-dispatch:** Re-run on the418 same repo at a later commit to generate an updated code report and diff419 against the previous plan