@brunosps00/dev-workflow 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +118 -0
  3. package/README.md +17 -6
  4. package/lib/constants.js +24 -20
  5. package/lib/init.js +34 -0
  6. package/lib/instruction-health.js +38 -0
  7. package/lib/post-update.js +2 -1
  8. package/lib/validate.js +3 -1
  9. package/package.json +1 -1
  10. package/scaffold/config/routing.json +61 -23
  11. package/scaffold/en/agent-instructions.md +31 -135
  12. package/scaffold/en/commands/dw-analyze-project.md +2 -0
  13. package/scaffold/en/commands/dw-autopilot.md +22 -243
  14. package/scaffold/en/commands/dw-bugfix.md +9 -35
  15. package/scaffold/en/commands/dw-claude-run.md +29 -45
  16. package/scaffold/en/commands/dw-codex-run.md +30 -45
  17. package/scaffold/en/commands/dw-context-budget.md +6 -14
  18. package/scaffold/en/commands/dw-copilot-run.md +29 -41
  19. package/scaffold/en/commands/dw-generate-pr.md +2 -2
  20. package/scaffold/en/commands/dw-goal.md +11 -5
  21. package/scaffold/en/commands/dw-harness-audit.md +2 -0
  22. package/scaffold/en/commands/dw-help.md +8 -4
  23. package/scaffold/en/commands/dw-pause.md +1 -0
  24. package/scaffold/en/commands/dw-plan.md +14 -7
  25. package/scaffold/en/commands/dw-qa.md +2 -0
  26. package/scaffold/en/commands/dw-report.md +169 -0
  27. package/scaffold/en/commands/dw-resume.md +5 -11
  28. package/scaffold/en/commands/dw-review.md +4 -3
  29. package/scaffold/en/commands/dw-run.md +19 -165
  30. package/scaffold/en/commands/dw-skill-health.md +7 -0
  31. package/scaffold/en/commands/dw-update.md +18 -4
  32. package/scaffold/en/commands/dw-worktree.md +100 -0
  33. package/scaffold/en/references/command-routing.md +53 -0
  34. package/scaffold/en/references/execution-contract.md +55 -0
  35. package/scaffold/en/templates/frontend-quality-template.md +43 -0
  36. package/scaffold/en/templates/task-template.md +20 -40
  37. package/scaffold/en/templates/tasks-template.md +9 -6
  38. package/scaffold/en/templates/techspec-template.md +4 -0
  39. package/scaffold/pt-br/agent-instructions.md +31 -135
  40. package/scaffold/pt-br/commands/dw-analyze-project.md +2 -0
  41. package/scaffold/pt-br/commands/dw-autopilot.md +22 -243
  42. package/scaffold/pt-br/commands/dw-bugfix.md +9 -35
  43. package/scaffold/pt-br/commands/dw-claude-run.md +29 -46
  44. package/scaffold/pt-br/commands/dw-codex-run.md +30 -45
  45. package/scaffold/pt-br/commands/dw-context-budget.md +6 -14
  46. package/scaffold/pt-br/commands/dw-copilot-run.md +29 -43
  47. package/scaffold/pt-br/commands/dw-generate-pr.md +2 -2
  48. package/scaffold/pt-br/commands/dw-goal.md +11 -5
  49. package/scaffold/pt-br/commands/dw-harness-audit.md +2 -0
  50. package/scaffold/pt-br/commands/dw-help.md +8 -4
  51. package/scaffold/pt-br/commands/dw-pause.md +1 -0
  52. package/scaffold/pt-br/commands/dw-plan.md +14 -7
  53. package/scaffold/pt-br/commands/dw-qa.md +2 -0
  54. package/scaffold/pt-br/commands/dw-report.md +169 -0
  55. package/scaffold/pt-br/commands/dw-resume.md +7 -11
  56. package/scaffold/pt-br/commands/dw-review.md +4 -3
  57. package/scaffold/pt-br/commands/dw-run.md +19 -165
  58. package/scaffold/pt-br/commands/dw-skill-health.md +7 -0
  59. package/scaffold/pt-br/commands/dw-update.md +18 -4
  60. package/scaffold/pt-br/commands/dw-worktree.md +100 -0
  61. package/scaffold/pt-br/references/command-routing.md +53 -0
  62. package/scaffold/pt-br/references/execution-contract.md +55 -0
  63. package/scaffold/pt-br/templates/frontend-quality-template.md +43 -0
  64. package/scaffold/pt-br/templates/task-template.md +20 -40
  65. package/scaffold/pt-br/templates/tasks-template.md +9 -6
  66. package/scaffold/pt-br/templates/techspec-template.md +4 -0
  67. package/scaffold/scripts/hooks/git-guardrails.mjs +1 -0
  68. package/scaffold/scripts/lib/workflow-contract.mjs +101 -0
  69. package/scaffold/scripts/lib/worktree-gc.mjs +460 -0
  70. package/scaffold/skill-registry.json +23 -23
  71. package/scaffold/skills/dw-cli-run/SKILL.md +33 -208
  72. package/scaffold/skills/dw-cli-run/references/dispatch-tuning.md +14 -72
  73. package/scaffold/skills/dw-codebase-intel/SKILL.md +5 -39
  74. package/scaffold/skills/dw-codebase-intel/agents/intel-updater.md +1 -1
  75. package/scaffold/skills/dw-codebase-intel/references/agents-detail.md +7 -0
  76. package/scaffold/skills/dw-codebase-intel/references/files-in-dw-intel-detail.md +16 -0
  77. package/scaffold/skills/dw-codebase-intel/references/how-dw-intel-reads-this-detail.md +12 -0
  78. package/scaffold/skills/dw-codebase-intel/references/how-to-compose-the-typical-flow-detail.md +11 -0
  79. package/scaffold/skills/dw-council/SKILL.md +2 -17
  80. package/scaffold/skills/dw-council/references/integration-with-other-dw-commands-detail.md +7 -0
  81. package/scaffold/skills/dw-council/references/phase-2-tensions-and-rebuttals-detail.md +15 -0
  82. package/scaffold/skills/dw-domain-modeling/SKILL.md +1 -1
  83. package/scaffold/skills/dw-execute-phase/SKILL.md +12 -32
  84. package/scaffold/skills/dw-execute-phase/agents/executor.md +15 -252
  85. package/scaffold/skills/dw-execute-phase/agents/plan-checker.md +4 -207
  86. package/scaffold/skills/dw-execute-phase/references/atomic-commits.md +8 -18
  87. package/scaffold/skills/dw-execute-phase/references/de-sloppify-pass-optional-cleanup-task-detail.md +12 -0
  88. package/scaffold/skills/dw-execute-phase/references/deviation-rules-during-execution-detail.md +8 -0
  89. package/scaffold/skills/dw-execute-phase/references/how-the-two-agents-compose-detail.md +7 -0
  90. package/scaffold/skills/dw-execute-phase/references/plan-verification.md +9 -155
  91. package/scaffold/skills/dw-execute-phase/references/wave-coordination.md +6 -97
  92. package/scaffold/skills/dw-git-discipline/SKILL.md +2 -2
  93. package/scaffold/skills/dw-grilling/SKILL.md +1 -1
  94. package/scaffold/skills/dw-incident-response/SKILL.md +1 -64
  95. package/scaffold/skills/dw-incident-response/references/the-five-phases-detail.md +66 -0
  96. package/scaffold/skills/dw-llm-eval/SKILL.md +5 -53
  97. package/scaffold/skills/dw-llm-eval/references/agent-tool-use-evaluation-detail.md +23 -0
  98. package/scaffold/skills/dw-llm-eval/references/anti-patterns-will-block-in-dw-review-code-only-detail.md +9 -0
  99. package/scaffold/skills/dw-llm-eval/references/consistency-run-to-run-stability-detail.md +10 -0
  100. package/scaffold/skills/dw-llm-eval/references/integration-with-dev-workflow-commands-detail.md +6 -0
  101. package/scaffold/skills/dw-llm-eval/references/the-oracle-ladder-detail.md +15 -0
  102. package/scaffold/skills/dw-memory/SKILL.md +4 -50
  103. package/scaffold/skills/dw-memory/references/context-budget.md +8 -56
  104. package/scaffold/skills/dw-memory/references/promotion-decision-test-detail.md +30 -0
  105. package/scaffold/skills/dw-minimalism/SKILL.md +4 -5
  106. package/scaffold/skills/dw-review-rigor/SKILL.md +1 -54
  107. package/scaffold/skills/dw-review-rigor/references/the-five-rules-detail.md +56 -0
  108. package/scaffold/skills/dw-simplification/SKILL.md +2 -55
  109. package/scaffold/skills/dw-simplification/references/pattern-recognition-detail.md +11 -0
  110. package/scaffold/skills/dw-simplification/references/the-five-rules-detail.md +48 -0
  111. package/scaffold/skills/dw-source-grounding/SKILL.md +1 -56
  112. package/scaffold/skills/dw-source-grounding/references/the-protocol-detect-fetch-implement-cite-detail.md +58 -0
  113. package/scaffold/skills/dw-testing-discipline/SKILL.md +25 -177
  114. package/scaffold/skills/dw-testing-discipline/references/agent-guardrails.md +9 -167
  115. package/scaffold/skills/dw-testing-discipline/references/core-rules.md +3 -3
  116. package/scaffold/skills/dw-testing-discipline/references/mutation-testing.md +19 -0
  117. package/scaffold/skills/dw-testing-discipline/references/patterns.md +3 -12
  118. package/scaffold/skills/dw-ui-discipline/SKILL.md +2 -59
  119. package/scaffold/skills/dw-ui-discipline/references/frontend-engineering.md +46 -0
  120. package/scaffold/skills/dw-ui-discipline/references/the-four-grounding-questions-detail.md +61 -0
  121. package/scaffold/skills/dw-verify/SKILL.md +26 -148
  122. package/scaffold/skills/dw-verify/references/verification-discovery-and-attribution.md +2 -2
  123. package/scaffold/skills/humanizer/SKILL.md +2 -1
  124. package/scaffold/skills/security-review/SKILL.md +3 -183
  125. package/scaffold/skills/security-review/references/do-not-flag-detail.md +49 -0
  126. package/scaffold/skills/security-review/references/quick-patterns-reference-detail.md +56 -0
  127. package/scaffold/skills/security-review/references/review-process-detail.md +84 -0
  128. package/scaffold/skills/vercel-react-best-practices/SKILL.md +1 -90
  129. package/scaffold/skills/vercel-react-best-practices/references/quick-reference-detail.md +92 -0
@@ -1,32 +1,51 @@
1
1
  {
2
- "_note": "Dispatch routing for the CLI runners (/dw-claude-run, /dw-codex-run) via the dw-cli-run skill. Maps a task's Conventional-Commit type to a tier, and a tier to a concrete model + effort per brand. Seeded once on init and NEVER overwritten on update — model availability differs per account, so this file is yours to edit. Verify the model ids against `claude --help` / `codex --help` before trusting them; the shipped values are conservative defaults, not a guarantee that your account has access.",
2
+ "_note": "Model candidates for planning task execution by complexity. Preserve approved task assignments. Seeded on init and never overwritten on update. Verify provider/account availability and CLI capabilities before approval; model documentation is not proof of account access.",
3
3
  "schema_version": "1.0",
4
-
5
4
  "brands": {
6
- "claude": { "detect": "claude --version" },
7
- "codex": { "detect": "codex --version" }
5
+ "claude": {
6
+ "detect": "claude --version"
7
+ },
8
+ "codex": {
9
+ "detect": "codex --version"
10
+ }
8
11
  },
9
-
10
12
  "tiers": {
11
13
  "light": {
12
14
  "_use": "mechanical, low-ambiguity work; the answer is obvious and the diff is small",
13
- "claude": { "model": "haiku", "effort": "low" },
14
- "codex": { "model": "gpt-5.4-mini", "effort": "low" }
15
+ "claude": {
16
+ "model": "haiku",
17
+ "effort": "low"
18
+ },
19
+ "codex": {
20
+ "model": "gpt-5.6-luna",
21
+ "effort": "low"
22
+ }
15
23
  },
16
24
  "standard": {
17
25
  "_use": "normal feature and fix work",
18
- "claude": { "model": "sonnet", "effort": "medium" },
19
- "codex": { "model": "gpt-5.3-codex", "effort": "medium" }
26
+ "claude": {
27
+ "model": "sonnet",
28
+ "effort": "medium"
29
+ },
30
+ "codex": {
31
+ "model": "gpt-5.6-sol",
32
+ "effort": "medium"
33
+ }
20
34
  },
21
35
  "heavy": {
22
36
  "_use": "architectural, security-sensitive, or wide-blast-radius work",
23
- "claude": { "model": "opus", "effort": "high" },
24
- "codex": { "model": "gpt-5.5", "effort": "high" }
37
+ "claude": {
38
+ "model": "opus",
39
+ "effort": "high"
40
+ },
41
+ "codex": {
42
+ "model": "gpt-6-astra",
43
+ "effort": "high"
44
+ }
25
45
  }
26
46
  },
27
-
28
47
  "by_commit_type": {
29
- "_note": "The task's type is already declared in tasks.md and in the atomic commit subject — no new inference needed.",
48
+ "_note": "Legacy fallback hint only. Approved task complexity/assignment takes precedence.",
30
49
  "chore": "light",
31
50
  "docs": "light",
32
51
  "style": "light",
@@ -38,23 +57,42 @@
38
57
  "refactor": "standard",
39
58
  "perf": "heavy"
40
59
  },
41
-
42
60
  "escalate_on_surface": {
43
61
  "_note": "If the task's fence touches any of these, override the type-derived tier upward. Match against file paths and the task title.",
44
62
  "tier": "heavy",
45
- "patterns": ["auth", "session", "token", "credential", "migration", "payment", "billing", "invoice", "tenant", "crypto", "permission"]
63
+ "patterns": [
64
+ "auth",
65
+ "session",
66
+ "token",
67
+ "credential",
68
+ "migration",
69
+ "payment",
70
+ "billing",
71
+ "invoice",
72
+ "tenant",
73
+ "crypto",
74
+ "permission"
75
+ ]
46
76
  },
47
-
48
77
  "validation": {
49
- "_note": "The worker never signs off on its own exam. Cross-brand is the default because a second vendor fails differently.",
50
- "cross_brand": "preferred",
51
- "degrade": "When only one brand is installed, validate in a SEPARATE dispatch at a different tier — never reuse the executing session.",
52
- "acceptance_score": 9
78
+ "cross_brand": "when-planned",
79
+ "degrade": "Use approved independent review assignments; do not switch providers or tiers silently.",
80
+ "acceptance": "Required checks and task acceptance criteria pass; no blocking findings. Scores are diagnostic only."
53
81
  },
54
-
55
82
  "defaults": {
56
- "_note": "Applied to every dispatch unless the prompt names a capability that needs otherwise.",
57
- "no_mcp": true,
83
+ "_note": "Preserve effective permissions and user configuration; enable only approved capabilities where selective configuration is supported.",
84
+ "no_mcp": false,
58
85
  "read_only_skips_worktree": true
86
+ },
87
+ "sources": {
88
+ "checked_at": "2026-09-09",
89
+ "codex": [
90
+ "https://developers.openai.com/api/docs/models/gpt-5.6-luna",
91
+ "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
92
+ "https://developers.openai.com/api/docs/guides/latest-model"
93
+ ],
94
+ "claude": [
95
+ "https://code.claude.com/docs/en/model-config"
96
+ ]
59
97
  }
60
98
  }
@@ -1,154 +1,50 @@
1
1
  <!-- dev-workflow:start -->
2
- # dev-workflow — AI Agent Instructions
3
-
4
- This project uses [`@brunosps00/dev-workflow`](https://www.npmjs.com/package/@brunosps00/dev-workflow) (`dw-*` commands) for structured AI-driven development. The commands compose into a PRD → TechSpec → Tasks → Implement → Review → Commit → PR pipeline with hard gates for security, constitution compliance, and verification.
5
-
6
- **The whole point of this file:** when the user states an intent that matches the Trigger Map below, run the matching `dw-*` command **without asking permission first** — unless the change is genuinely trivial (see Escape Hatches).
7
-
8
- ## Auto-Sizing Matrix
9
-
10
- Before picking a command from the Trigger Map, gauge the change's actual scope. The same intent ("fix this", "add this") can mean very different amounts of work; the matrix names four sizes and routes each to a different entry point. **Pick the smallest one that fits — under-routing wastes ceremony, over-routing hides scope.**
11
-
12
- | Size | What it looks like | Route to |
13
- |------|---------------------|----------|
14
- | **Small** | ≤3 files, no migration, no new endpoint, can be summarized in one sentence. Examples: typo, log message, single-line config, dependency bump, version pin. | Just do it inline. No `dw-*` command. |
15
- | **Medium** | Clear feature or bug, <10 numbered tasks expected, single component or single service, no architectural decisions. Examples: add a form field with validation, fix a regression in a known module, wire a new API endpoint into an existing handler. | `/dw-bugfix` (for bugs) or `/dw-plan` (for features) — straight, not via `/dw-autopilot`. |
16
- | **Large** | Multi-component feature, ≥10 tasks expected, touches multiple modules, has user-visible UX surface AND backend. Examples: add a new entity end-to-end (model + migration + API + UI), introduce a third-party integration, redesign a flow. | `/dw-autopilot "<wish>"` — first invocation plans and stops; second invocation resumes via `/dw-goal` for Run → Review → QA/Fix → Review, then Commit → PR. |
17
- | **Complex** | New domain, ambiguous requirements, architectural decision required, regulatory or compliance surface, or scope that spans multiple PRDs. Examples: introduce event sourcing, rebuild auth, multi-tenancy, a new product line. | `/dw-opportunities` first if the idea is not yet known; otherwise `/dw-brainstorm "<idea>"` (auto-dispatches research/council modes), then `/dw-plan --council` so the techspec stage runs the multi-advisor debate. |
18
-
19
- **Safety valve:** if you start in Small or Medium but the work reveals it's actually Large (the inline listing exceeds 5 steps, or `/dw-bugfix` triggers its `Step 5.0` valve), STOP and escalate. There is no flag to bypass. Escalation is the correct outcome.
20
-
21
- **Adapted from** [`tech-leads-club/agent-skills/tlc-spec-driven`](https://github.com/tech-leads-club/agent-skills/tree/main/packages/skills-catalog/skills/(development)/tlc-spec-driven) (CC-BY-4.0). The four-size matrix is theirs; the mapping to `dw-*` commands is dev-workflow-specific.
22
-
23
- ## Trigger Map
24
-
25
- | User intent (literal or paraphrased) | Auto-trigger |
26
- |--------------------------------------|--------------|
27
- | "Implement X" / "Build Y" / "Add feature Z" / "I need ..." / "Create ..." | `/dw-autopilot "X"` |
28
- | "Autopilot this PRD" / "Take this PRD to PR" / continue a bugfix escalation autonomously | `/dw-autopilot --from-prd <slug>` (existing PRD at `.dw/spec/<slug>/`) |
29
- | "Resume autopilot" / "continue after plan" / `autopilot-state.json` has `status: plan_complete` | `/dw-autopilot` (or `/dw-goal --from-autopilot <slug>` if the user specifically asks for the goal step) |
30
- | Pasted error / "X is broken" / "Bug in Y" / failing test screenshot | `/dw-bugfix "X"` |
31
- | "Plan this feature" / "Write a PRD + techspec + tasks" | `/dw-plan "X"` |
32
- | "Write a PRD for X" / "Spec out Y" | `/dw-plan prd "X"` |
33
- | "Design the architecture" / "Make the techspec" | `/dw-plan techspec` |
34
- | "Break this into tasks" | `/dw-plan tasks` |
35
- | "Run this task" (with task ID) | `/dw-run <ID>` |
36
- | "Run all pending tasks" / "Execute the plan" | `/dw-run` |
37
- | "Run this as a goal" / "durable goal" / "long-running objective" | `/dw-goal "<objective>"` |
38
- | "Continue where I left off" | `/dw-run --resume` |
39
- | "Pause work" / "End the session" / "Save where we are" | `/dw-pause` |
40
- | "Resume" / "Where did we stop?" / "Pick up where we left off" | `/dw-resume` |
41
- | "QA this feature" / "Run the test plan" | `/dw-qa` |
42
- | "Fix the QA bugs" | `/dw-qa --fix` |
43
- | "Evaluate the AI feature" / "Test the RAG / classifier" | `/dw-qa --ai` |
44
- | "Walk me through this feature" / "UAT this with me" / "Let's do a manual run-through" | `/dw-qa --uat` |
45
- | "Review this bugfix" / "Code-review fix `<slug>`" | `/dw-review --bugfix <slug>` |
46
- | "QA this bugfix" / "Validate fix `<slug>`" | `/dw-qa --bugfix <slug>` |
47
- | "Review my PR" / "Check code quality" / "Is this ready to ship?" | `/dw-review` |
48
- | "Just the PRD coverage check" | `/dw-review --coverage-only` |
49
- | "Just the code quality review" | `/dw-review --code-only` |
50
- | "Time to commit" / changes are validated and ready | `/dw-commit` |
51
- | "Open a PR" / "Ship this" | `/dw-generate-pr` |
52
- | "Suggest new ideas" / "What should we build next?" / "Find opportunities" / "Roadmap ideas" | `/dw-opportunities` |
53
- | "What security improvements should we consider?" / "Find security opportunities" | `/dw-opportunities "security"` |
54
- | "Brainstorm X" / "Explore this idea" / "Research X" | `/dw-brainstorm "X"` (auto-dispatches grill / prototype / council / research / onepager based on signals) |
55
- | "Code-health audit" / "Find tech debt" / "Refactor opportunities" / "Smells in X" | `/dw-refactor "X"` |
56
- | "Where is X?" / "What uses Y?" / "How is Z structured?" | `/dw-intel "<question>"` |
57
- | "Rebuild the codebase index" / "Refresh intel" | `/dw-intel --build` |
58
- | "Context is heavy" / "Audit token usage" / "Why is the agent slow?" | `/dw-context-budget` |
59
- | "Check dev-workflow install" / "Are agents/wrappers healthy?" | `/dw-harness-audit` |
60
- | "Audit skills" / "Skills feel duplicated or bloated" | `/dw-skill-health` |
61
- | "Redesign this UI" / "Audit and ship a new design" | `/dw-redesign-ui "<target>"` |
62
- | "Audit dependencies" / "Are we behind on packages?" | `/dw-secure-audit --plan` |
63
- | "Scan for vulnerabilities" / "Security check" | `/dw-secure-audit` |
64
- | "Analyze this project" / "Generate rules" | `/dw-analyze-project` |
65
- | "Open a new project" / "Bootstrap a stack" | `/dw-new-project` |
66
- | "Dockerize this" / "Add docker-compose" | `/dw-dockerize` |
67
- | "Functional doc" / "Map screens and flows" | `/dw-functional-doc` |
68
- | "Install Azure skills" / "Setup Microsoft docs MCP" / "Add Azure expertise" / "I'm going to work on Azure" | `/dw-install-azure-skills` |
69
- | "Install AWS skills" / "Setup AWS MCP" / "Add AWS expertise" / "I'm going to work on AWS" | `/dw-install-aws-skills` |
2
+ # dev-workflow — Agent instructions
70
3
 
71
- **Priority:** when in doubt between two commands, `/dw-autopilot` is the safest default for any non-trivial feature request. If a planned autopilot has already stopped with `status: plan_complete`, resume it instead of starting a new plan; the execution phase is owned by `/dw-goal`.
4
+ Use the smallest workflow that satisfies the user's intent and risk. Continue authorized work through implementation, relevant verification, and correction of failures. User instructions and existing authorization take precedence over workflow defaults; platform permissions still apply.
72
5
 
73
- ## Hard Gates (the commands enforce these — don't bypass)
6
+ ## Routing
74
7
 
75
- - **`.dw/constitution.md`**: principles with `severity: high` or `critical` block PRs / techspecs without an ADR justifying the deviation. Missing constitution? Commands auto-install defaults at `severity: info` (non-blocking) and continue — never blocks on absence.
76
- - **`.dw/spec/<prd>/tasks-validation.md`**: auto-generated at the end of `/dw-plan tasks`. Any FAIL dimension blocks user approval until resolved or explicitly overridden.
77
- - **Verification**: `/dw-generate-pr` requires a fresh `dw-verify` PASS (tests + lint + build) after the last edit.
78
- - **Security**: TS / Python / C# / Rust projects must pass `/dw-secure-audit` (OWASP + Semgrep + gitleaks + Trivy + lockfile audit) before the PR opens.
8
+ | Intent and scope | Action |
9
+ |---|---|
10
+ | Explanation, code lookup, or exploration | Inspect relevant sources and answer directly. |
11
+ | Small, clear, low-risk edit | Implement directly and verify proportionally. |
12
+ | Bug requiring investigation | `/dw-bugfix`; a known small fix can stay inline. |
13
+ | Feature needing specification | `/dw-plan`; for an end-to-end implementation request, continue after task approval. |
14
+ | Multi-component implementation through validation | `/dw-autopilot`; approve the task/execution plan, then continue in the same invocation. |
15
+ | Unresolved product or architecture decisions | `/dw-brainstorm`, then `/dw-plan` when aligned. Use council only when multiple perspectives help the decision. |
16
+ | Execute approved tasks | `/dw-run`; `/dw-goal` for durable execution. |
17
+ | Resume existing work | `/dw-resume` or `/dw-run --resume`; reuse saved decisions and evidence. |
18
+ | Review / QA / commit / PR explicitly requested | `/dw-review` / `/dw-qa` / `/dw-commit` / `/dw-generate-pr`. |
79
19
 
80
- ## Escape Hatches — do NOT auto-trigger
20
+ Do not start a second pipeline inside an active workflow. A request only to plan or investigate ends with the requested artifact. Increased file count or effort is not itself a reason to stop: reorganize within approved scope and ask only about material new scope, conflicting requirements, or missing decisions.
81
21
 
82
- When any of these apply, answer directly and do **not** invoke a `dw-*` command:
22
+ For specialized commands consult `.dw/references/command-routing.md` or `/dw-help`. Do not load the full catalog for routine work.
83
23
 
84
- - One-line typo, rename, import sort, comment fix.
85
- - Pure exploration: "how does this work?", "show me X", "explain Y".
86
- - Aesthetic preference: "I prefer this style" — apply, don't run a pipeline.
87
- - User explicitly says "do this directly" / "skip autopilot" / "no need for a PRD" — honor it.
88
- - The conversation is already inside a `dw-*` flow (you're already executing tasks; don't start a new pipeline).
24
+ ## Planning and delegation
89
25
 
90
- ## Zoom-out pattern (for unfamiliar code areas)
26
+ During task breakdown, propose local or cross-tool development and a model, effort, and agent assignment for each task based on ambiguity, dependencies, risk, and scope. Read `.dw/references/execution-contract.md` at this stage and when executing/resuming the plan. Approval covers these assignments and declared fallbacks for the run.
91
27
 
92
- When you land in an area of the codebase you don't know and orientation costs more than the task itself, **don't dive into files first** — ask `dw-code-explorer` to produce a map. Give it the project's domain glossary (`.dw/rules/index.md`) and tell it: "zoom out one level — show me the relevant modules, their public surfaces, who calls them, and the data flow between them, using domain glossary vocabulary." Get the lay of the land, then dive. This avoids the trap of reading the deepest file first and reconstructing the architecture from leaves upward.
28
+ Claude can delegate implementation through `/dw-codex-run`; Codex can use `/dw-claude-run`. The parent owns review, corrections, and continuation. Local agents inherit the session model unless the approved task overrides it. Delegate bounded independent work when it improves quality or time; keep tightly coupled or small work local. At most 3 workers per workstream, and never concurrent writers in the same worktree.
93
29
 
94
- Adapted from [`mattpocock/skills/zoom-out`](https://github.com/mattpocock/skills/tree/main/zoom-out) (MIT).
30
+ Read relevant files first. Use `.dw/intel/` or a code-explorer for broad or unfamiliar flows when useful, checking index claims against current source. Load skill entrypoints only for matching tasks, and references only for the selected mode. Subagents receive a compact packet and return evidence and decisions, not full logs.
95
31
 
96
- ## Subagent Dispatch Discipline
32
+ ## Completion and boundaries
97
33
 
98
- Project agents are installed in `.claude/agents/`, `.opencode/agent/`, `.agents/agents/`, and `.github/agents/` when supported. Claude Code and OpenCode can use native subagents. Copilot receives custom agents. Codex should treat `.agents/agents/` as delegable profiles when subagents are available, or as a manual prompt pack otherwise.
34
+ An approved implementation plan continues through implementation, review, QA where applicable, and fixes. Do not stop merely because the first implementation is ready or an external runner returned. Reuse decisions already resolved in the conversation. Preserve partial work and durable checkpoints on interruption.
99
35
 
100
- Use a subagent when:
36
+ A ready delivery meets acceptance criteria, has no unresolved blocking finding, and has valid verification evidence. Evidence stays valid while its inputs, environment, and scope remain equivalent; a new message does not invalidate it. Follow `dw-verify` at delivery gates. Do not add tests for low-impact edits just to satisfy a template.
101
37
 
102
- - The task will generate verbose output: logs, tests, broad grep, QA evidence, browser traces, or research notes.
103
- - The task is read-only, parallelizable, and has a clear boundary.
104
- - The task has a compact return value: findings, map, changed files, verification result, or blockers.
105
- - You need an independent review: security, silent failure, language-specific correctness, or PR readiness.
38
+ Merge, push, publication, and destructive operations require applicable authorization; do not ask again when already authorized. Prepare and validate the concrete result before requesting a missing final authorization. A worktree isolates Git changes, not operating-system permissions.
106
39
 
107
- Do not use a subagent when:
40
+ ## Project contracts
108
41
 
109
- - The task needs frequent user dialogue.
110
- - Planning, implementation, and testing share too much live context.
111
- - The change is small enough to do inline.
112
- - The subagent would need the full parent transcript to avoid guessing.
113
- - The delegated task would itself need to spawn other subagents.
114
-
115
- Limits:
42
+ - Respect `.dw/constitution.md`; high/critical deviations need the defined ADR process. Missing constitution does not block: use non-blocking defaults.
43
+ - Approved task plans need valid dependencies and `tasks-validation.md`; repair internal inconsistencies before asking for approval.
44
+ - Complete project-required checks. Security and PR gates remain applicable; secrets and unresolved blocking findings cannot be hidden by a score or a green build.
45
+ - Formal task execution retains scoped atomic commits and requirement traceability. Direct small edits do not imply a commit or PR request.
116
46
 
117
- - Run at most 3 subagents concurrently per workstream.
118
- - Default output should stay near the registry budget, usually 900-1200 words.
119
- - Subagents summarize logs; they return failing lines, paths, commands, decisions, and risks, not full transcripts.
120
- - The parent is the only final synthesizer.
121
- - The parent passes an input packet, not raw conversation history. Use `/dw-subtask-start`, `/dw-subtask-complete`, and `/dw-subtask-resume` for local handoffs.
122
-
123
- Claude-only: prefer named subagents for isolated research, review, build, and QA work. Use forks only when the subtask genuinely needs the parent context.
124
-
125
- Agent routing:
126
-
127
- - Use `dw-code-explorer` before planning or debugging unfamiliar areas.
128
- - Use `dw-build-fixer` only after an actual build/typecheck/lint failure.
129
- - Use `dw-code-reviewer`, `dw-security-reviewer`, and `dw-silent-failure-hunter` during `/dw-review`.
130
- - Use language-specific agents when their module is installed and the diff matches the language.
47
+ ## Customization
131
48
 
132
- ## Skill Loading Discipline
133
-
134
- Skills are compact protocols first. Read the `SKILL.md` entrypoint, then load files under `references/`, `assets/`, `rules/`, or `scripts/` only when the trigger, task, or output requires that deeper material. If a skill feels duplicated, too broad, or expensive for the current task, run `/dw-skill-health`.
135
-
136
- ## Workflow Reference
137
-
138
- ```
139
- /dw-autopilot "wish" ────► First invocation plans: PRD → TechSpec → Tasks → STOP
140
- /dw-autopilot ────► Second invocation resumes: /dw-goal → Commit → PR
141
-
142
- --- OR step-by-step ---
143
-
144
- /dw-brainstorm ─► /dw-plan ─► /dw-goal ─► /dw-commit ─► /dw-generate-pr
145
- ```
146
-
147
- Full command list and contextual help: `/dw-help`.
148
-
149
- ## Editing this section
150
-
151
- This block lives between `<!-- dev-workflow:start -->` and `<!-- dev-workflow:end -->` markers. Anything you write **outside** these markers in `CLAUDE.md` / `AGENTS.md` is preserved on every `dev-workflow update`. Anything **inside** is refreshed from the package — your edits inside the block will be overwritten.
152
-
153
- To customize the trigger map permanently, copy the block content to outside the markers (or to a separate file like `.dw/agent-instructions-custom.md`) and edit there.
49
+ This managed block lives between `<!-- dev-workflow:start -->` and `<!-- dev-workflow:end -->` markers and is refreshed on update. Put project-specific instructions outside the markers; do not duplicate the entire block. Configuration and explicit project overrides remain authoritative for their scope.
154
50
  <!-- dev-workflow:end -->
@@ -344,6 +344,8 @@ Document the traced flows with file paths at each step. This reveals the actual
344
344
 
345
345
  ### Step 5: Detect Anti-patterns
346
346
 
347
+ For a frontend module, read `dw-ui-discipline/references/frontend-engineering.md` from the installed skills location. Use `.dw/templates/frontend-quality-template.md` to include observed controls, gaps and adoption proposals in that module's `.dw/rules/<module>.md`. Inspect actual scripts/configuration and CI; record unexecuted checks explicitly. Preserve existing policy and distinguish it from recommendations. This documentation-only command does not install tools, change source/configuration or enable new CI gates.
348
+
347
349
  Look for common issues:
348
350
 
349
351
  | Anti-pattern | Detection method | Severity |
@@ -1,257 +1,36 @@
1
1
  <system_instructions>
2
- You are the full pipeline orchestrator. This command receives a user's wish and drives the PRD-to-PR workflow in two invocations:
2
+ # Continuous implementation orchestrator
3
3
 
4
- 1. **Planning invocation:** research/brainstorm when needed, PRD, TechSpec, Tasks, then STOP.
5
- 2. **Execution invocation:** resume from `autopilot-state.json`, run `/dw-goal --from-autopilot <prd-slug>`, then commit and PR gate.
4
+ `/dw-autopilot "<wish>"` plans and carries approved work through implementation and validation. `/dw-autopilot --from-prd <slug>` starts from `.dw/spec/<slug>/prd.md`; missing PRD blocks with its path. `/dw-autopilot` without a wish resumes saved state. Do not impose a second invocation after task approval. A user request only to plan or an active platform Plan mode still ends at the planning artifact.
6
5
 
7
- <critical>The first invocation MUST stop after the planning artifacts are complete. Do not run implementation, QA, review, commit, or PR in the first invocation.</critical>
8
- <critical>The second invocation MUST resume from the saved state and delegate Run → Review → QA/Fix → Review to `/dw-goal --from-autopilot <prd-slug>`.</critical>
9
- <critical>Each step that invokes a `/dw-*` command MUST follow the complete instructions from `.dw/commands/`. Read and execute the full command, not a summarized version.</critical>
6
+ ## Planning
10
7
 
11
- ## When to Use
12
- - Use when you want to go from an idea to a PR with minimal manual intervention but a hard planning stop.
13
- - Use for complete features that require planning, execution, quality gates, and PR readiness.
14
- - Do NOT use for small, well-scoped one-off tasks; use `/dw-run` with an existing plan.
15
- - Do NOT use for surgical bug fixes; use `/dw-bugfix`.
16
- - Do NOT use when the user wants manual control between every phase; use individual commands.
8
+ 1. Inspect relevant source/rules and existing decisions. Use `.dw/intel/` when useful; research only unknown technologies/domains/integrations. Brainstorm only unresolved choices, not a mandatory three-option interview.
9
+ 2. Invoke `/dw-plan` or its relevant stages to produce PRD, TechSpec, tasks and tasks-validation.md. Reuse answered decisions and aligned handoffs. Ask material uncovered questions with the available interview tool; do not re-ask discovered facts.
10
+ 3. At task breakdown present local/cross-tool development, concrete model/effort and relevant agents by task complexity. Follow `.dw/references/execution-contract.md`, write/validate execution-plan.json, and obtain approval of the same task/assignment matrix. Existing stage approvals remain honored; do not repeat them.
11
+ 4. Save `autopilot-state.json` with `status: plan_complete`, `current_step: goal`, planning artifacts, approved assignments path and `next_command: /dw-goal --from-autopilot <slug>`. In an implementation request continue immediately to execution. In a planning-only request report the plan and preserve this resume point.
17
12
 
18
- ## Pipeline Position
19
- **Predecessor:** user wish | **Successor:** `/dw-goal`, `/dw-commit`, `/dw-generate-pr`
13
+ ## Execution and delivery
20
14
 
21
- ## Complementary Skills / Commands
15
+ Arm `/dw-report` once (idempotent, skipped when `DW_REPORT_AUTO=off`). Invoke `/dw-goal --from-autopilot <slug>` to own `/dw-run` → full `/dw-review` → applicable `/dw-qa` → `/dw-qa --fix` for Open bugs → post-QA review when edits or new findings invalidate the prior review. Do not substitute coverage-only review for the full review. External runners return to the parent for corrections and continuation; they do not end the goal.
22
16
 
23
- | Skill or command | Trigger |
24
- |------------------|---------|
25
- | `dw-memory` | ALWAYS — preserve decisions across planning, goal execution, QA, review, and PR. |
26
- | `dw-verify` | ALWAYS — invoked by gates and downstream commands before approval/commit/PR claims. |
27
- | `/dw-goal` | ALWAYS on the second invocation — durable execution-quality objective. |
17
+ Use `dw-memory` for durable decisions and `dw-verify` for valid evidence. Security Gate remains mandatory where applicable: `/dw-secure-audit` produces `.dw/secure-audit/audit-summary.md`; missing/invalid evidence is regenerated and blocking findings are fixed. SECRET findings always block (no ADR escape). Reuse a valid scan instead of repeating it solely at another checkpoint.
28
18
 
29
- ## Input Variables
19
+ The goal completes only with acceptance criteria met, required review/QA artifacts and valid checks, and no unresolved blocking finding. For escalated `prd-bugfix-*`, find the originating `.dw/bugfixes/*/escalated.md`, produce missing SUMMARY.md from evidence, and close the index.
30
20
 
31
- | Variable | Description | Example |
32
- |----------|-------------|---------|
33
- | `{{WISH}}` | Description of what the user wants to build in default mode. | `"push notification preferences"` |
34
- | `{{PRD_SLUG}}` | Existing PRD slug when `--from-prd` is used. | `prd-bugfix-stripe-webhook-retry` |
35
- | `{{MODE}}` | Optional invocation flag. | `--from-prd <slug>` |
21
+ Inspect scoped task commits and remaining bookkeeping; `/dw-commit` handles an authorized final commit when needed. Do not create empty commits or demand an extra commit for already committed work. Prepare the validated branch/worktree and delivery summary. Merge, push and PR publication proceed only within existing authorization. If final authorization is absent, present the concrete result and request only that action; do not re-ask permission already granted.
36
22
 
37
- ## Invocation Modes
23
+ ## Durable state
38
24
 
39
- | Invocation | Behavior |
40
- |------------|----------|
41
- | `/dw-autopilot "<wish>"` | Planning invocation from scratch. Runs Codebase Intelligence → optional Research → Brainstorm → PRD → TechSpec → Tasks, writes state, then stops. |
42
- | `/dw-autopilot --from-prd <slug>` | Planning invocation from an existing PRD. Starts at PRD approval, then TechSpec → Tasks, writes state, then stops. |
43
- | `/dw-autopilot` on a PRD with `autopilot-state.json status=plan_complete` | Execution invocation. Runs `/dw-goal --from-autopilot <slug>`, then commit and PR gate. |
25
+ Preserve `autopilot-state.json` fields: mode, wish, prd_path, from_prd_slug, current_step, completed_steps, skipped_steps, skip_reasons, gates_passed, step_artifacts, goal_slug, next_command, started_at, last_updated. Add `execution_plan` and `execution_state` paths. Record evidence, not merely file existence, before marking a step complete.
44
26
 
45
- ## Required Pause Points
46
-
47
- Autopilot pauses at:
48
-
49
- 1. **PRD approval** before TechSpec.
50
- 2. **Tasks approval** before marking planning complete.
51
- 3. **Mandatory planning stop** after Tasks are approved and state is saved.
52
- 4. **PR gate** after the execution goal and commit complete.
53
-
54
- Between these points, execute automatically while still respecting blocking questions required by the underlying command.
55
-
56
- ## Session Resumption
57
-
58
- If this command is re-invoked on the same PRD:
59
-
60
- <critical>Read `.dw/spec/<prd-slug>/autopilot-state.json` first. If `status` is `plan_complete`, do not repeat planning. Start the execution invocation by formally invoking `/dw-goal --from-autopilot <prd-slug>`.</critical>
61
-
62
- State meanings:
63
-
64
- | Status | Action |
65
- |--------|--------|
66
- | missing state | Start normal planning invocation. |
67
- | `planning` | Resume from `current_step`, respecting completed/skipped steps. |
68
- | `plan_complete` | Start execution invocation via `/dw-goal --from-autopilot <prd-slug>`. |
69
- | `goal_active` | Continue `/dw-goal resume` or `/dw-goal --from-autopilot <prd-slug>` according to `.dw/goals/autopilot-<prd-slug>/status.json`. |
70
- | `goal_complete` | Continue to commit and PR gate. |
71
- | `completed` | Report already completed and show PR/commit summary if available. |
72
-
73
- ## Planning Invocation
74
-
75
- ### Step 0: Resolve Invocation Mode
76
-
77
- 1. If `--from-prd <slug>` is present:
78
- - Resolve to `.dw/spec/<slug>/`.
79
- - Verify `prd.md` exists; otherwise STOP with: `--from-prd target .dw/spec/<slug>/prd.md not found. Run /dw-plan prd or fix the slug.`
80
- - Create or update `autopilot-state.json` with `mode: "from-prd"`, `status: "planning"`, `skipped_steps: [1,2,3,4]`, and `skip_reasons["1-4"] = "from-prd-mode"`.
81
- - Jump to PRD approval using the existing PRD.
82
- 2. Otherwise:
83
- - Create or update `autopilot-state.json` with `mode: "autopilot"`, `status: "planning"`, original wish, and `current_step: 1`.
84
-
85
- ### Step 1: Codebase Intelligence
86
-
87
- <critical>If `.dw/intel/` exists, query it via `/dw-intel` before planning. Fall back to `.dw/rules/` and direct grep if absent.</critical>
88
-
89
- - Identify tech stack, existing patterns, related features, and project constraints.
90
- - If `.dw/intel/` is absent, suggest `/dw-intel --build` for richer future context, but continue with `.dw/rules/` and direct inspection.
91
-
92
- ### Step 2: Research (Conditional)
93
-
94
- Run `/dw-brainstorm --research` when the feature involves new technology, unknown domain, external APIs, regulation, or high-impact architecture. Otherwise skip and record the reason in `skip_reasons`.
95
-
96
- ### Step 3: Brainstorm (Interactive)
97
-
98
- Run `/dw-brainstorm` with accumulated context. Present three directions and wait for the user to choose one before continuing.
99
-
100
- ### Step 4: PRD
101
-
102
- Run `/dw-plan prd` using brainstorm/research findings.
103
-
104
- <critical>The PRD stage must use the structured interview tool when available. If unavailable, ask the required questions in chat and record the fallback. The user must answer; do not infer answers.</critical>
105
-
106
- After `prd.md` exists, present PRD summary and wait for explicit approval. If the user requests edits, update and re-present.
107
-
108
- ### Step 5: TechSpec
109
-
110
- Run `/dw-plan techspec` from the approved PRD.
111
-
112
- <critical>The TechSpec stage must use the structured interview tool when available. If unavailable, ask the required questions in chat and record the fallback. The user must answer; do not infer answers.</critical>
113
-
114
- After `techspec.md` exists, present TechSpec summary and wait for explicit approval.
115
-
116
- ### Step 6: Tasks
117
-
118
- Run `/dw-plan tasks` from PRD + TechSpec. Verify:
119
- - `tasks.md` exists.
120
- - per-task files exist.
121
- - `tasks-validation.md` exists and passes or has an explicit user override.
122
-
123
- ### Step 7: Tasks Approval and Mandatory Stop
124
-
125
- Present task summary, dependencies, and total effort. Wait for explicit approval.
126
-
127
- After approval:
128
-
129
- 1. Save `.dw/spec/<prd-slug>/autopilot-state.json` with:
130
-
131
- ```json
132
- {
133
- "status": "plan_complete",
134
- "current_step": "goal",
135
- "next_command": "/dw-goal --from-autopilot <prd-slug>"
136
- }
137
- ```
138
-
139
- 2. Include `completed_steps` for all completed planning steps and `step_artifacts` for `prd.md`, `techspec.md`, `tasks.md`, per-task files, and `tasks-validation.md`.
140
- 3. STOP and tell the user the planning phase is complete. Do not run implementation in this invocation.
141
-
142
- ## Execution Invocation
143
-
144
- ### Step 8: Durable Execution Goal
145
-
146
- When `autopilot-state.json status=plan_complete`, formally invoke:
147
-
148
- ```text
149
- /dw-goal --from-autopilot <prd-slug>
150
- ```
151
-
152
- The goal owns this sequence:
153
-
154
- 1. `/dw-run <prd-path>`
155
- 2. `/dw-review <prd-path>` (full review: coverage, quality, conventions, constitution, verify)
156
- 3. `/dw-qa <prd-path>`
157
- 4. `/dw-qa --fix <prd-path>` if QA found Open bugs
158
- 5. `/dw-review <prd-path>` again after QA/fixes
159
- 6. **Security Gate** — the post-QA `/dw-review` (step 5) triggers `/dw-secure-audit`, producing a fresh `.dw/secure-audit/audit-summary.md`. This step **ensures** that verdict is APPROVED: if it is missing/stale/REJECTED, run `/dw-secure-audit <prd-path>` standalone, then loop back to `/dw-bugfix` per finding and re-check. SECRET findings always block (no ADR escape). Do not force a second full scan when a fresh APPROVED summary already exists.
160
-
161
- <critical>Do not substitute `/dw-review --coverage-only` for the goal reviews. The autopilot quality goal requires full `/dw-review` before QA and after QA fixes.</critical>
162
-
163
- After `/dw-goal` completes, verify `.dw/goals/autopilot-<prd-slug>/status.json` has `status: "complete"`, then set `autopilot-state.json status: "goal_complete"`.
164
-
165
- ### Step 9: Bugfix Loop Close (Conditional)
166
-
167
- If `mode == "from-prd"` and the PRD slug matches `prd-bugfix-*`, close the bugfix index before commit:
168
- - Find `.dw/bugfixes/*/escalated.md` that references the PRD slug.
169
- - If `SUMMARY.md` is missing, write it from available PRD, TechSpec, QA, and diff evidence using `.dw/templates/bugfix-summary-template.md`.
170
- - Never fabricate verification evidence.
171
- - Record artifacts in `autopilot-state.json`.
172
-
173
- ### Step 10: Pre-Commit Audit
174
-
175
- Before `/dw-commit`, verify:
176
- - `.dw/goals/autopilot-<prd-slug>/status.json` is complete.
177
- - `<prd-path>/QA/review-consolidated.md` exists from the final post-QA review.
178
- - `<prd-path>/QA/qa-report.md` and `<prd-path>/QA/bugs.md` exist.
179
- - **Security Gate passed:** `.dw/secure-audit/audit-summary.md` exists, is fresh (post-last-edit), and status is APPROVED. If missing/stale/REJECTED → STOP (do not commit).
180
- - `autopilot-state.json` records planning artifacts and the completed goal.
181
-
182
- If anything is missing, STOP and re-run the missing formal command. Do not commit partial work.
183
-
184
- ### Step 11: Commit
185
-
186
- Run `/dw-commit` automatically. Do not wait for approval after the goal is complete.
187
-
188
- ### Step 12: Pull Request Gate
189
-
190
- Ask: **"Commits completed. Do you want to generate the Pull Request?"**
191
-
192
- - YES: run `/dw-generate-pr`.
193
- - NO: report that commits are ready and PR can be generated later.
194
-
195
- Mark `autopilot-state.json status: "completed"` after commit, and include PR link if generated.
196
-
197
- ## State Persistence
198
-
199
- `autopilot-state.json` must include:
200
-
201
- ```json
202
- {
203
- "mode": "autopilot",
204
- "status": "planning",
205
- "wish": "original user description",
206
- "prd_path": ".dw/spec/prd-name",
207
- "from_prd_slug": null,
208
- "current_step": 1,
209
- "completed_steps": [],
210
- "skipped_steps": [],
211
- "skip_reasons": {},
212
- "gates_passed": [],
213
- "step_artifacts": {},
214
- "goal_slug": null,
215
- "next_command": null,
216
- "started_at": "2026-05-20T00:00:00Z",
217
- "last_updated": "2026-05-20T00:00:00Z"
218
- }
219
- ```
220
-
221
- Update state after each completed or skipped step. A step is complete only after required artifacts exist.
222
-
223
- ## Progress Format
224
-
225
- Report progress after each step:
226
-
227
- ```text
228
- === AUTOPILOT =====================================
229
- OK [1] Codebase Intelligence
230
- OK [2] Research (skipped — known domain)
231
- OK [3] Brainstorm
232
- OK [4] PRD
233
- OK [5] TechSpec
234
- OK [6] Tasks
235
- STOP [PLAN COMPLETE] Next: /dw-goal --from-autopilot prd-name
236
- ===================================================
237
- ```
238
-
239
- During execution invocation:
240
-
241
- ```text
242
- === AUTOPILOT =====================================
243
- OK [PLAN] Already complete
244
- RUN [GOAL] /dw-goal --from-autopilot prd-name
245
- NEXT [COMMIT] after goal status=complete
246
- ===================================================
247
- ```
248
-
249
- ## Anti-patterns
250
-
251
- - Do not continue into implementation during the first invocation.
252
- - Do not skip `/dw-goal` during the second invocation.
253
- - Do not replace full `/dw-review` with a narrower review in the execution goal.
254
- - Do not mark state complete from manual validation alone.
255
- - Do not re-run planning when `status=plan_complete`; resume the goal.
27
+ | status | Resume action |
28
+ |---|---|
29
+ | missing / planning | Continue only unfinished planning; preserve resolved decisions. |
30
+ | plan_complete | Execute approved plan through `/dw-goal --from-autopilot <slug>` when implementation is requested. |
31
+ | goal_active | `/dw-goal resume` using saved task/executor state. |
32
+ | goal_complete | Prepare delivery and remaining authorized commit/publication actions. |
33
+ | completed | Report validated delivery and links/branch; publication may still be pending authorization. |
256
34
 
35
+ Update state after each checkpoint. Report current task, evidence and remaining work compactly. Preserve checkpoints on user pause or actual blocker; fix recoverable in-scope failures and continue.
257
36
  </system_instructions>