@zigrivers/scaffold 2.38.1 → 2.44.2

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 (201) hide show
  1. package/README.md +10 -7
  2. package/dist/cli/commands/build.js +4 -4
  3. package/dist/cli/commands/build.js.map +1 -1
  4. package/dist/cli/commands/check.test.js +11 -8
  5. package/dist/cli/commands/check.test.js.map +1 -1
  6. package/dist/cli/commands/complete.d.ts.map +1 -1
  7. package/dist/cli/commands/complete.js +2 -1
  8. package/dist/cli/commands/complete.js.map +1 -1
  9. package/dist/cli/commands/complete.test.js +4 -1
  10. package/dist/cli/commands/complete.test.js.map +1 -1
  11. package/dist/cli/commands/dashboard.js +4 -4
  12. package/dist/cli/commands/dashboard.js.map +1 -1
  13. package/dist/cli/commands/knowledge.js +2 -2
  14. package/dist/cli/commands/knowledge.js.map +1 -1
  15. package/dist/cli/commands/knowledge.test.js +5 -12
  16. package/dist/cli/commands/knowledge.test.js.map +1 -1
  17. package/dist/cli/commands/list.d.ts +1 -1
  18. package/dist/cli/commands/list.d.ts.map +1 -1
  19. package/dist/cli/commands/list.js +84 -3
  20. package/dist/cli/commands/list.js.map +1 -1
  21. package/dist/cli/commands/list.test.js +82 -0
  22. package/dist/cli/commands/list.test.js.map +1 -1
  23. package/dist/cli/commands/next.test.js +4 -1
  24. package/dist/cli/commands/next.test.js.map +1 -1
  25. package/dist/cli/commands/reset.d.ts.map +1 -1
  26. package/dist/cli/commands/reset.js +5 -2
  27. package/dist/cli/commands/reset.js.map +1 -1
  28. package/dist/cli/commands/reset.test.js +4 -1
  29. package/dist/cli/commands/reset.test.js.map +1 -1
  30. package/dist/cli/commands/rework.d.ts.map +1 -1
  31. package/dist/cli/commands/rework.js +3 -2
  32. package/dist/cli/commands/rework.js.map +1 -1
  33. package/dist/cli/commands/run.d.ts.map +1 -1
  34. package/dist/cli/commands/run.js +28 -13
  35. package/dist/cli/commands/run.js.map +1 -1
  36. package/dist/cli/commands/run.test.js +1 -1
  37. package/dist/cli/commands/run.test.js.map +1 -1
  38. package/dist/cli/commands/skip.d.ts.map +1 -1
  39. package/dist/cli/commands/skip.js +2 -1
  40. package/dist/cli/commands/skip.js.map +1 -1
  41. package/dist/cli/commands/skip.test.js +4 -1
  42. package/dist/cli/commands/skip.test.js.map +1 -1
  43. package/dist/cli/commands/status.d.ts.map +1 -1
  44. package/dist/cli/commands/status.js +88 -4
  45. package/dist/cli/commands/status.js.map +1 -1
  46. package/dist/cli/commands/version.d.ts.map +1 -1
  47. package/dist/cli/commands/version.js +19 -3
  48. package/dist/cli/commands/version.js.map +1 -1
  49. package/dist/cli/commands/version.test.js +41 -0
  50. package/dist/cli/commands/version.test.js.map +1 -1
  51. package/dist/cli/output/context.test.js +14 -13
  52. package/dist/cli/output/context.test.js.map +1 -1
  53. package/dist/cli/output/interactive.js +4 -4
  54. package/dist/cli/output/json.d.ts +1 -0
  55. package/dist/cli/output/json.d.ts.map +1 -1
  56. package/dist/cli/output/json.js +14 -1
  57. package/dist/cli/output/json.js.map +1 -1
  58. package/dist/config/loader.d.ts.map +1 -1
  59. package/dist/config/loader.js +10 -3
  60. package/dist/config/loader.js.map +1 -1
  61. package/dist/config/loader.test.js +28 -0
  62. package/dist/config/loader.test.js.map +1 -1
  63. package/dist/core/assembly/engine.d.ts.map +1 -1
  64. package/dist/core/assembly/engine.js +6 -1
  65. package/dist/core/assembly/engine.js.map +1 -1
  66. package/dist/e2e/init.test.js +3 -0
  67. package/dist/e2e/init.test.js.map +1 -1
  68. package/dist/index.js +2 -1
  69. package/dist/index.js.map +1 -1
  70. package/dist/project/adopt.test.js +3 -0
  71. package/dist/project/adopt.test.js.map +1 -1
  72. package/dist/project/claude-md.d.ts.map +1 -1
  73. package/dist/project/claude-md.js +2 -1
  74. package/dist/project/claude-md.js.map +1 -1
  75. package/dist/project/detector.js +3 -3
  76. package/dist/project/detector.js.map +1 -1
  77. package/dist/project/signals.d.ts +1 -0
  78. package/dist/project/signals.d.ts.map +1 -1
  79. package/dist/state/decision-logger.d.ts.map +1 -1
  80. package/dist/state/decision-logger.js +7 -4
  81. package/dist/state/decision-logger.js.map +1 -1
  82. package/dist/state/lock-manager.js +1 -1
  83. package/dist/state/lock-manager.js.map +1 -1
  84. package/dist/state/lock-manager.test.js +27 -3
  85. package/dist/state/lock-manager.test.js.map +1 -1
  86. package/dist/state/state-manager.d.ts.map +1 -1
  87. package/dist/state/state-manager.js +6 -0
  88. package/dist/state/state-manager.js.map +1 -1
  89. package/dist/state/state-manager.test.js +7 -0
  90. package/dist/state/state-manager.test.js.map +1 -1
  91. package/dist/types/assembly.d.ts +2 -0
  92. package/dist/types/assembly.d.ts.map +1 -1
  93. package/dist/utils/eligible.d.ts +8 -0
  94. package/dist/utils/eligible.d.ts.map +1 -0
  95. package/dist/utils/eligible.js +36 -0
  96. package/dist/utils/eligible.js.map +1 -0
  97. package/dist/validation/config-validator.test.js +15 -13
  98. package/dist/validation/config-validator.test.js.map +1 -1
  99. package/dist/validation/index.test.js +1 -1
  100. package/dist/wizard/wizard.d.ts.map +1 -1
  101. package/dist/wizard/wizard.js +1 -0
  102. package/dist/wizard/wizard.js.map +1 -1
  103. package/dist/wizard/wizard.test.js +2 -0
  104. package/dist/wizard/wizard.test.js.map +1 -1
  105. package/knowledge/core/automated-review-tooling.md +4 -4
  106. package/knowledge/core/eval-craft.md +44 -0
  107. package/knowledge/core/multi-model-review-dispatch.md +8 -0
  108. package/knowledge/core/system-architecture.md +39 -0
  109. package/knowledge/core/task-decomposition.md +53 -0
  110. package/knowledge/core/testing-strategy.md +160 -0
  111. package/knowledge/finalization/implementation-playbook.md +24 -7
  112. package/knowledge/product/prd-craft.md +41 -0
  113. package/knowledge/review/review-adr.md +1 -1
  114. package/knowledge/review/review-api-design.md +1 -1
  115. package/knowledge/review/review-database-design.md +1 -1
  116. package/knowledge/review/review-domain-modeling.md +1 -1
  117. package/knowledge/review/review-implementation-tasks.md +1 -1
  118. package/knowledge/review/review-methodology.md +1 -1
  119. package/knowledge/review/review-operations.md +1 -1
  120. package/knowledge/review/review-prd.md +1 -1
  121. package/knowledge/review/review-security.md +1 -1
  122. package/knowledge/review/review-system-architecture.md +1 -1
  123. package/knowledge/review/review-testing-strategy.md +1 -1
  124. package/knowledge/review/review-user-stories.md +1 -1
  125. package/knowledge/review/review-ux-specification.md +1 -1
  126. package/knowledge/review/review-vision.md +1 -1
  127. package/knowledge/tools/post-implementation-review-methodology.md +107 -0
  128. package/knowledge/validation/critical-path-analysis.md +13 -0
  129. package/knowledge/validation/implementability-review.md +14 -0
  130. package/package.json +2 -1
  131. package/pipeline/architecture/review-architecture.md +8 -5
  132. package/pipeline/architecture/system-architecture.md +9 -3
  133. package/pipeline/build/multi-agent-resume.md +21 -7
  134. package/pipeline/build/multi-agent-start.md +22 -7
  135. package/pipeline/build/new-enhancement.md +20 -12
  136. package/pipeline/build/quick-task.md +18 -11
  137. package/pipeline/build/single-agent-resume.md +20 -6
  138. package/pipeline/build/single-agent-start.md +24 -8
  139. package/pipeline/consolidation/claude-md-optimization.md +8 -4
  140. package/pipeline/consolidation/workflow-audit.md +9 -5
  141. package/pipeline/decisions/adrs.md +7 -3
  142. package/pipeline/decisions/review-adrs.md +8 -5
  143. package/pipeline/environment/ai-memory-setup.md +6 -2
  144. package/pipeline/environment/automated-pr-review.md +79 -12
  145. package/pipeline/environment/design-system.md +9 -6
  146. package/pipeline/environment/dev-env-setup.md +8 -5
  147. package/pipeline/environment/git-workflow.md +16 -13
  148. package/pipeline/finalization/apply-fixes-and-freeze.md +10 -5
  149. package/pipeline/finalization/developer-onboarding-guide.md +10 -3
  150. package/pipeline/finalization/implementation-playbook.md +13 -4
  151. package/pipeline/foundation/beads.md +8 -5
  152. package/pipeline/foundation/coding-standards.md +13 -10
  153. package/pipeline/foundation/project-structure.md +16 -13
  154. package/pipeline/foundation/tdd.md +9 -4
  155. package/pipeline/foundation/tech-stack.md +7 -5
  156. package/pipeline/integration/add-e2e-testing.md +12 -8
  157. package/pipeline/modeling/domain-modeling.md +9 -7
  158. package/pipeline/modeling/review-domain-modeling.md +8 -6
  159. package/pipeline/parity/platform-parity-review.md +9 -6
  160. package/pipeline/planning/implementation-plan-review.md +10 -7
  161. package/pipeline/planning/implementation-plan.md +41 -9
  162. package/pipeline/pre/create-prd.md +7 -4
  163. package/pipeline/pre/innovate-prd.md +12 -8
  164. package/pipeline/pre/innovate-user-stories.md +10 -7
  165. package/pipeline/pre/review-prd.md +12 -10
  166. package/pipeline/pre/review-user-stories.md +12 -9
  167. package/pipeline/pre/user-stories.md +7 -4
  168. package/pipeline/quality/create-evals.md +6 -3
  169. package/pipeline/quality/operations.md +7 -3
  170. package/pipeline/quality/review-operations.md +12 -5
  171. package/pipeline/quality/review-security.md +11 -6
  172. package/pipeline/quality/review-testing.md +11 -6
  173. package/pipeline/quality/security.md +6 -2
  174. package/pipeline/quality/story-tests.md +14 -9
  175. package/pipeline/specification/api-contracts.md +9 -3
  176. package/pipeline/specification/database-schema.md +8 -2
  177. package/pipeline/specification/review-api.md +10 -4
  178. package/pipeline/specification/review-database.md +8 -3
  179. package/pipeline/specification/review-ux.md +9 -3
  180. package/pipeline/specification/ux-spec.md +9 -4
  181. package/pipeline/validation/critical-path-walkthrough.md +10 -5
  182. package/pipeline/validation/cross-phase-consistency.md +9 -4
  183. package/pipeline/validation/decision-completeness.md +8 -3
  184. package/pipeline/validation/dependency-graph-validation.md +8 -3
  185. package/pipeline/validation/implementability-dry-run.md +9 -5
  186. package/pipeline/validation/scope-creep-check.md +11 -6
  187. package/pipeline/validation/traceability-matrix.md +10 -5
  188. package/pipeline/vision/create-vision.md +7 -4
  189. package/pipeline/vision/innovate-vision.md +11 -8
  190. package/pipeline/vision/review-vision.md +15 -12
  191. package/skills/multi-model-dispatch/SKILL.md +6 -5
  192. package/skills/scaffold-runner/SKILL.md +47 -3
  193. package/tools/dashboard.md +53 -0
  194. package/tools/post-implementation-review.md +655 -0
  195. package/tools/prompt-pipeline.md +160 -0
  196. package/tools/release.md +435 -0
  197. package/tools/review-pr.md +229 -0
  198. package/tools/session-analyzer.md +299 -0
  199. package/tools/update.md +113 -0
  200. package/tools/version-bump.md +290 -0
  201. package/tools/version.md +82 -0
@@ -39,12 +39,12 @@ scannability.
39
39
  - (mvp) No verbatim repetition of content from other docs (reference instead)
40
40
  - (mvp) Consistent terminology throughout (task vs. ticket, etc.)
41
41
  - (mvp) Key Commands table matches actual Makefile/package.json commands
42
- - Critical patterns are prominent (TDD, never push to main, keep working,
42
+ - (mvp) Critical patterns are prominent (TDD, never push to main, keep working,
43
43
  verify before commit, worktrees for parallel). If Beads: every commit needs task ID.
44
44
  - (deep) CLAUDE.md is <= 200 lines or critical patterns appear in the first 50 lines
45
45
  - (deep) Workflow scenarios cover error cases (test failures, merge conflicts, CI failures,
46
46
  crashed sessions, blocked tasks)
47
- - Tracking comment added: <!-- scaffold:claude-md-optimization v1 YYYY-MM-DD -->
47
+ - (mvp) Tracking comment added: <!-- scaffold:claude-md-optimization v1 YYYY-MM-DD -->
48
48
 
49
49
  ## Methodology Scaling
50
50
  - **deep**: Full four-phase analysis (redundancy, consistency, gap, priority audits)
@@ -52,8 +52,12 @@ scannability.
52
52
  patterns verified present and prominent.
53
53
  - **mvp**: Quick pass to remove obvious duplicates and ensure workflow section is
54
54
  complete. Fix any command inconsistencies. Skip detailed audit.
55
- - **custom:depth(1-5)**: Depth 1-2: dedup + workflow check. Depth 3: add
56
- consistency pass. Depth 4: add gap analysis. Depth 5: full four-phase audit.
55
+ - **custom:depth(1-5)**:
56
+ - Depth 1: remove duplicated instructions within CLAUDE.md.
57
+ - Depth 2: dedup plus workflow section completeness check.
58
+ - Depth 3: add terminology consistency pass across all sections.
59
+ - Depth 4: add gap analysis (missing patterns, stale command references).
60
+ - Depth 5: full four-phase audit (redundancy, consistency, gap, priority).
57
61
 
58
62
  ## Mode Detection
59
63
  Always operates in update mode (CLAUDE.md always exists by this point). Check
@@ -8,7 +8,7 @@ dependencies: [claude-md-optimization]
8
8
  outputs: [CLAUDE.md, docs/git-workflow.md]
9
9
  conditional: null
10
10
  reads: [operations]
11
- knowledge-base: [cross-phase-consistency]
11
+ knowledge-base: [cross-phase-consistency, claude-md-patterns, git-workflow-patterns]
12
12
  ---
13
13
 
14
14
  ## Purpose
@@ -45,8 +45,8 @@ inconsistent command formats. Fix all issues found.
45
45
  - (deep) Worktree cleanup between tasks documented (cannot checkout main)
46
46
  - (deep) Agent crash recovery documented
47
47
  - (deep) No document contradicts the canonical workflow
48
- - Tracking comment matches format: `<!-- scaffold:workflow-audit v1 YYYY-MM-DD -->`
49
- - Tracking comment added: <!-- scaffold:workflow-audit v1 YYYY-MM-DD -->
48
+ - (mvp) CLAUDE.md is the source of truth for workflow. All other documents must align with CLAUDE.md, not override it.
49
+ - (mvp) Tracking comment matches format: `<!-- scaffold:workflow-audit v1 YYYY-MM-DD -->`
50
50
 
51
51
  ## Methodology Scaling
52
52
  - **deep**: Full six-phase audit (inventory, completeness check with all
@@ -54,8 +54,12 @@ inconsistent command formats. Fix all issues found.
54
54
  Every workflow step verified in every document.
55
55
  - **mvp**: Quick consistency check of commit format, branch naming, and PR
56
56
  workflow across CLAUDE.md and git-workflow.md. Fix obvious contradictions.
57
- - **custom:depth(1-5)**: Depth 1-2: CLAUDE.md workflow check only. Depth 3: add
58
- cross-doc consistency. Depth 4: add gap analysis. Depth 5: full six-phase audit.
57
+ - **custom:depth(1-5)**:
58
+ - Depth 1: CLAUDE.md workflow section completeness check only.
59
+ - Depth 2: CLAUDE.md workflow check plus commit format and branch naming verification.
60
+ - Depth 3: add cross-doc consistency (git-workflow.md, coding-standards.md alignment).
61
+ - Depth 4: add gap analysis (missing steps, stale references, Makefile target verification).
62
+ - Depth 5: full six-phase audit (inventory, completeness, consistency, gap analysis, recommendations, execution).
59
63
 
60
64
  ## Mode Detection
61
65
  Always operates in update mode (all documents exist by this point). Check for
@@ -28,7 +28,7 @@ ADR category — tech stack decisions are documented here.
28
28
  ## Quality Criteria
29
29
  - (mvp) ADRs exist for: language, framework, database, ORM, deployment target, API style, authentication, and any decision referenced in system-architecture.md
30
30
  - (deep) Each ADR documents alternatives considered with pros/cons
31
- - (mvp) Decisions trace to PRD requirements or domain model constraints
31
+ - (mvp) Decisions map to PRD requirements or domain model constraints
32
32
  - (mvp) No ADR contradicts another without explicit acknowledgment
33
33
  - (deep) Technology selections include team expertise and maintenance considerations
34
34
  - (deep) Decision dependencies documented — if ADR-002 depends on ADR-001's outcome, the dependency is explicit
@@ -39,8 +39,12 @@ ADR category — tech stack decisions are documented here.
39
39
  related ADRs. Supersession tracking.
40
40
  - **mvp**: Core technology choices only (language, framework, database, hosting).
41
41
  Brief rationale. Single-paragraph ADRs.
42
- - **custom:depth(1-5)**: Depth 1-2: core tech choices. Depth 3: add pattern
43
- and integration decisions. Depth 4-5: full evaluation with risk assessment.
42
+ - **custom:depth(1-5)**:
43
+ - Depth 1: core tech choices only (language, framework, database) with single-paragraph rationale.
44
+ - Depth 2: core tech choices plus hosting and ORM with brief rationale.
45
+ - Depth 3: add pattern and integration decisions with 2+ alternatives per decision.
46
+ - Depth 4: full evaluation with 3+ alternatives, risk assessment, and decision dependency tracking.
47
+ - Depth 5: full evaluation with cross-references between related ADRs, supersession tracking, and team expertise considerations.
44
48
 
45
49
  ## Mode Detection
46
50
  If docs/adrs/ exists, operate in update mode: review existing ADRs against
@@ -32,20 +32,23 @@ independent review validation.
32
32
 
33
33
  ## Quality Criteria
34
34
  - (mvp) All ADR-specific review passes executed
35
- - (mvp) Every finding categorized P0-P3 with specific ADR number, section, and issue
35
+ - (mvp) Every finding categorized P0-P3 with specific ADR number, section, and issue. Severity definitions: P0 = Breaks downstream work. P1 = Prevents quality milestone. P2 = Known tech debt. P3 = Polish.
36
36
  - (deep) Missing decisions identified and documented
37
37
  - (mvp) Contradictions resolved
38
38
  - (mvp) Downstream readiness confirmed (architecture phase can proceed)
39
- - (depth 4+) Multi-model findings synthesized with consensus/disagreement analysis
39
+ - (depth 4+) Multi-model findings synthesized: Consensus (all models agree), Majority (2+ models agree), or Divergent (models disagree — present to user for decision)
40
40
 
41
41
  ## Methodology Scaling
42
42
  - **deep**: All review passes. Full findings report. Fixes applied and
43
43
  re-validated. Multi-model review dispatched to Codex and Gemini if available,
44
44
  with graceful fallback to Claude-only enhanced review.
45
45
  - **mvp**: Quick consistency check for contradictions only.
46
- - **custom:depth(1-5)**: Depth 1-3: scale number of review passes with depth.
47
- Depth 4: full review + one external model (if CLI available). Depth 5:
48
- full review + multi-model with reconciliation.
46
+ - **custom:depth(1-5)**:
47
+ - Depth 1: single pass contradiction check only.
48
+ - Depth 2: two passes — contradiction check + missing rationale scan.
49
+ - Depth 3: four passes — contradiction check, missing rationale, implied-but-unrecorded decisions, and unresolved trade-offs.
50
+ - Depth 4: all passes + one external model (if CLI available).
51
+ - Depth 5: all passes + multi-model with reconciliation.
49
52
 
50
53
  ## Mode Detection
51
54
  Re-review mode if previous review exists. Check which findings were addressed.
@@ -50,8 +50,12 @@ to prevent API hallucination. Users choose which tiers to enable.
50
50
  Tier 3 configured with appropriate library doc server.
51
51
  - **mvp**: Tier 1 only (modular rules). Quick extraction of essential conventions
52
52
  into 2-3 rule files. Skip Tier 2 and 3. Minimal CLAUDE.md optimization.
53
- - **custom:depth(1-5)**: Depth 1-2: Tier 1 basics (2-3 rule files). Depth 3:
54
- full Tier 1 + offer Tier 2. Depth 4-5: all tiers with comprehensive setup.
53
+ - **custom:depth(1-5)**:
54
+ - Depth 1: Tier 1 basics 2 rule files for core conventions.
55
+ - Depth 2: Tier 1 with 3-4 rule files covering code and workflow conventions.
56
+ - Depth 3: full Tier 1 extraction from all project docs + offer Tier 2 (persistent memory).
57
+ - Depth 4: all three tiers with MCP memory server and lifecycle hooks configured.
58
+ - Depth 5: all tiers with comprehensive setup, library doc server for all project dependencies, and CLAUDE.md optimization.
55
59
 
56
60
  ## Mode Detection
57
61
  Check if `.claude/rules/` directory or docs/ai-memory-setup.md exists first. If
@@ -5,7 +5,7 @@ summary: "Configures automated code review — using Codex and/or Gemini CLIs fo
5
5
  phase: "environment"
6
6
  order: 340
7
7
  dependencies: [git-workflow]
8
- outputs: [AGENTS.md, docs/review-standards.md]
8
+ outputs: [AGENTS.md, docs/review-standards.md, scripts/cli-pr-review.sh, scripts/await-pr-review.sh]
9
9
  reads: [tdd]
10
10
  conditional: "if-needed"
11
11
  knowledge-base: [review-methodology, automated-review-tooling]
@@ -29,16 +29,17 @@ entire review-fix loop locally.
29
29
  - scripts/cli-pr-review.sh (local CLI mode) — dual-model review with reconciliation
30
30
  - scripts/await-pr-review.sh (external bot mode) — polling script with JSON output
31
31
  - docs/git-workflow.md updated with review loop integration
32
- - CLAUDE.md updated with agent-driven review workflow
32
+ - CLAUDE.md updated with agent-driven review workflow and review-pr hook
33
33
 
34
34
  ## Quality Criteria
35
- - External reviewer configured and verified (AGENTS.md created)
36
- - Review standards document matches project coding conventions
37
- - Await script handles all exit conditions (approved, findings, cap, skip, timeout)
38
- - CLAUDE.md workflow documents the agent-driven loop
39
- - No GitHub Actions workflows created (zero Actions minutes)
40
- - No ANTHROPIC_API_KEY secret required
41
- - Legacy GitHub Actions workflows detected and cleanup offered
35
+ - (mvp) External reviewer configured and verified (AGENTS.md created)
36
+ - (mvp) Review standards document matches project coding conventions
37
+ - (deep) Await script handles all exit conditions (approved, findings, cap, skip, timeout)
38
+ - (mvp) CLAUDE.md workflow documents the agent-driven loop
39
+ - (mvp) No GitHub Actions workflows created (zero Actions minutes)
40
+ - (mvp) No ANTHROPIC_API_KEY secret required
41
+ - (mvp) Post-PR-creation hook configured in settings to remind agents to run review-pr
42
+ - (deep) Legacy GitHub Actions workflows detected and cleanup offered
42
43
  - (deep) Dual-model review enabled when both CLIs available
43
44
 
44
45
  ## Methodology Scaling
@@ -46,9 +47,12 @@ entire review-fix loop locally.
46
47
  review-standards.md, AGENTS.md, and comprehensive CLAUDE.md workflow.
47
48
  Falls back to external bot review if no CLIs available.
48
49
  - **mvp**: Step is disabled. Local self-review from git-workflow suffices.
49
- - **custom:depth(1-5)**: Depth 1-2: disabled. Depth 3: basic review-standards.md
50
- + single-CLI review. Depth 4: add dual-model review. Depth 5: full suite
51
- with all options and legacy cleanup.
50
+ - **custom:depth(1-5)**:
51
+ - Depth 1: disabled — local self-review from git-workflow suffices.
52
+ - Depth 2: disabled same as depth 1.
53
+ - Depth 3: basic review-standards.md + single-CLI review (whichever CLI is available).
54
+ - Depth 4: add dual-model review when both CLIs available, AGENTS.md with project-specific rules.
55
+ - Depth 5: full suite with dual-model review, legacy Actions cleanup, and comprehensive CLAUDE.md workflow integration.
52
56
 
53
57
  ## Conditional Evaluation
54
58
  Enable when: project uses GitHub for version control, team size > 1 or CI/CD is
@@ -74,3 +78,66 @@ Check if AGENTS.md exists first. If it exists, check for scaffold tracking comme
74
78
  - **Conflict resolution**: if review criteria changed in coding-standards.md,
75
79
  update AGENTS.md review rules to match; if both CLI reviewers are now
76
80
  available, offer to enable dual-model review
81
+
82
+ ## Instructions
83
+
84
+ ### Configure Review Enforcement Hook
85
+
86
+ Add a Claude Code hook to the project's `.claude/settings.json` that fires after
87
+ every `gh pr create` command. This injects a mandatory reminder into the agent's
88
+ context at exactly the moment it needs to run reviews — preventing context decay
89
+ from causing missed review channels.
90
+
91
+ Add this to `.claude/settings.json`:
92
+
93
+ ```json
94
+ {
95
+ "hooks": {
96
+ "PostToolUse": [
97
+ {
98
+ "matcher": "Bash",
99
+ "hooks": [
100
+ {
101
+ "type": "command",
102
+ "command": "if echo \"$CC_BASH_COMMAND\" | grep -q 'gh pr create'; then echo '\\n⚠️ MANDATORY: Run all 3 code review channels before proceeding to the next task:\\n\\n 1. Codex CLI:\\n Auth: codex login status 2>/dev/null\\n Run: codex exec --skip-git-repo-check -s read-only --ephemeral \"REVIEW_PROMPT\" 2>/dev/null\\n\\n 2. Gemini CLI:\\n Auth: NO_BROWSER=true gemini -p \"respond with ok\" -o json 2>&1\\n Run: NO_BROWSER=true gemini -p \"REVIEW_PROMPT\" --output-format json --approval-mode yolo 2>/dev/null\\n\\n 3. Superpowers code-reviewer:\\n Dispatch superpowers:code-reviewer subagent with BASE_SHA and HEAD_SHA\\n\\nIf auth fails: tell user to run ! codex login or ! gemini -p \"hello\"\\nFix all P0/P1/P2 findings before moving on. Do NOT skip any channel.\\nFull instructions: scaffold run review-pr'; fi"
103
+ }
104
+ ]
105
+ }
106
+ ]
107
+ }
108
+ }
109
+ ```
110
+
111
+ **Why a hook instead of just instructions?** Agents in long implementation sessions
112
+ suffer from context decay — instructions from hundreds of messages ago are
113
+ effectively invisible by the time the agent creates its third PR. The hook injects
114
+ the reminder at exactly the right moment, every time, regardless of context length.
115
+
116
+ **Why inline commands instead of just a slash command reference?** The hook must work
117
+ regardless of how scaffold is installed (plugin vs CLI vs user commands). Including
118
+ the actual CLI invocations ensures the agent can execute reviews even if the
119
+ `/scaffold:review-pr` slash command isn't available in the current namespace.
120
+
121
+ ### Add Review Workflow to CLAUDE.md
122
+
123
+ Add the following to the project's CLAUDE.md in the Code Review section:
124
+
125
+ ```markdown
126
+ ## Code Review
127
+
128
+ After creating a PR, run `/scaffold:review-pr <PR#>` to execute all three review
129
+ channels (Codex CLI, Gemini CLI, Superpowers code-reviewer). Fix P0/P1/P2 findings
130
+ before moving to the next task. A post-hook on `gh pr create` will remind you.
131
+
132
+ | Command | Purpose |
133
+ |---------|---------|
134
+ | `/scaffold:review-pr <PR#>` | Run all 3 review channels on a PR |
135
+ | `scripts/cli-pr-review.sh <PR#>` | Run dual-model CLI review only |
136
+ ```
137
+
138
+ ### Configure AGENTS.md, Review Standards, and CLI Scripts
139
+
140
+ Follow the existing instructions for creating AGENTS.md, docs/review-standards.md,
141
+ and review scripts based on the project's coding standards and test requirements.
142
+ These provide the review context that `/scaffold:review-pr` uses when dispatching
143
+ to each channel.
@@ -5,7 +5,7 @@ summary: "Creates a visual language — color palette (WCAG-compliant), typograp
5
5
  phase: "environment"
6
6
  order: 320
7
7
  dependencies: [dev-env-setup]
8
- outputs: [docs/design-system.md]
8
+ outputs: [docs/design-system.md, tailwind.config.js, docs/coding-standards.md]
9
9
  reads: [create-prd]
10
10
  conditional: "if-needed"
11
11
  knowledge-base: [design-system-tokens]
@@ -35,12 +35,12 @@ professional UI without requiring design expertise from the user.
35
35
  ## Quality Criteria
36
36
  - (mvp) All colors meet WCAG AA contrast requirements
37
37
  - (mvp) Typography scale uses a consistent modular ratio; body text >= 16px; line height >= 1.5 for body text
38
- - (mvp) Spacing uses a consistent base unit (e.g., 4px increments)
38
+ - (mvp) Spacing uses a consistent system with a defined base unit (e.g., 4px for custom systems, Tailwind spacing scale, or Material Design grid)
39
39
  - (deep) Component patterns cover buttons, forms, cards, feedback, navigation, data display
40
40
  - (mvp) Theme configuration files actually work (verified by running dev server)
41
41
  - (deep) Both light and dark mode token values provided (if dark mode requested)
42
42
  - (deep) Responsive breakpoints defined (mobile, tablet, desktop)
43
- - No arbitrary hex values or pixel values in component examples (all use tokens)
43
+ - (mvp) No arbitrary hex values or pixel values in component examples (all use tokens)
44
44
 
45
45
  ## Methodology Scaling
46
46
  - **deep**: Full design system with all component categories, dark mode support,
@@ -48,9 +48,12 @@ professional UI without requiring design expertise from the user.
48
48
  page demonstrating all patterns. 15-20 pages.
49
49
  - **mvp**: Color palette, typography, spacing scale, and button/form/card patterns.
50
50
  No dark mode. Basic theme config. 3-5 pages.
51
- - **custom:depth(1-5)**: Depth 1-2: colors + typography + buttons. Depth 3: add
52
- forms, cards, spacing. Depth 4: add navigation, data display, layout. Depth 5:
53
- full suite with dark mode and accessibility.
51
+ - **custom:depth(1-5)**:
52
+ - Depth 1: color palette and typography scale only.
53
+ - Depth 2: colors, typography, and button patterns.
54
+ - Depth 3: add forms, cards, and spacing scale.
55
+ - Depth 4: add navigation, data display, layout system, and responsive breakpoints.
56
+ - Depth 5: full suite with dark mode, accessibility audit, and animation guidelines.
54
57
 
55
58
  ## Conditional Evaluation
56
59
  Enable when: tech-stack.md includes a frontend framework (React, Vue, Angular, Svelte,
@@ -35,9 +35,9 @@ by the entire workflow.
35
35
  - (mvp) Dev server starts with a single command and supports live/hot reloading
36
36
  - (deep) Local database setup is scripted (if applicable)
37
37
  - (deep) .env.example documents all variables with comments
38
- - Key Commands table in CLAUDE.md matches actual Makefile/package.json commands
38
+ - (mvp) Key Commands table in CLAUDE.md matches actual Makefile/package.json commands
39
39
  - (mvp) Lint and test commands exist and are runnable
40
- - Verification checklist passes (install, dev server, browser, live reload, tests, db)
40
+ - (deep) Verification checklist passes (install, dev server, browser, live reload, tests, db)
41
41
  - (mvp) Setup process works for first-time clone (max 5 steps)
42
42
  - (mvp) Makefile/package.json includes at minimum: dev, test, lint targets
43
43
 
@@ -47,9 +47,12 @@ by the entire workflow.
47
47
  troubleshooting section. Complete Key Commands table.
48
48
  - **mvp**: Dev server with live reload, basic lint and test commands, .env.example.
49
49
  Minimal docs. Key Commands table with essentials only.
50
- - **custom:depth(1-5)**: Depth 1-2: dev server + test command. Depth 3: add
51
- database and env vars. Depth 4: add troubleshooting. Depth 5: full docs with
52
- multi-platform support.
50
+ - **custom:depth(1-5)**:
51
+ - Depth 1: dev server with live reload and a single test command.
52
+ - Depth 2: dev server, test command, and basic lint command.
53
+ - Depth 3: add database setup, .env.example, and environment variable management.
54
+ - Depth 4: add troubleshooting section and watch mode tests.
55
+ - Depth 5: full docs with multi-platform support (Mac, Linux, WSL), Docker Compose, and seed data strategy.
53
56
 
54
57
  ## Mode Detection
55
58
  Update mode if docs/dev-setup.md exists. In update mode: preserve port assignments,
@@ -5,7 +5,7 @@ summary: "Sets up your branching strategy, commit message format, PR workflow, C
5
5
  phase: "environment"
6
6
  order: 330
7
7
  dependencies: [dev-env-setup]
8
- outputs: [docs/git-workflow.md]
8
+ outputs: [docs/git-workflow.md, scripts/setup-agent-worktree.sh, .github/workflows/ci.yml, .github/pull_request_template.md]
9
9
  conditional: null
10
10
  knowledge-base: [dev-environment, git-workflow-patterns]
11
11
  ---
@@ -33,16 +33,16 @@ parallel agents, CI pipeline, branch protection, and conflict prevention rules.
33
33
  Worktree Awareness, and Code Review sections
34
34
 
35
35
  ## Quality Criteria
36
- - Branch naming format is consistent (Beads: bd-<task-id>/<desc>. Non-Beads: <type>/<desc>)
37
- - Commit format is consistent (Beads: [BD-<id>] type(scope): desc. Non-Beads: type(scope): desc)
38
- - PR workflow includes all 8 sub-steps (commit, AI review, rebase, push, create,
36
+ - (mvp) Branch naming format is consistent (Beads: bd-<task-id>/<desc>. Non-Beads: <type>/<desc>)
37
+ - (mvp) Commit format is consistent (Beads: [BD-<id>] type(scope): desc. Non-Beads: type(scope): desc)
38
+ - (deep) PR workflow includes all 8 sub-steps (commit, AI review, rebase, push, create,
39
39
  auto-merge with --delete-branch, watch CI, confirm merge)
40
- - Worktree script creates permanent worktrees with workspace branches
41
- - If Beads: BD_ACTOR environment variable documented for agent identity
42
- - CI workflow job name matches branch protection context
43
- - Branch cleanup documented for both single-agent and worktree-agent variants
44
- - Agent crash recovery procedure documented
45
- - Conflict prevention rule: don't parallelize tasks touching same files
40
+ - (deep) Worktree script creates permanent worktrees with workspace branches
41
+ - (deep) If Beads: BD_ACTOR environment variable documented for agent identity
42
+ - (deep) CI workflow job name matches branch protection context
43
+ - (mvp) Branch cleanup documented for both single-agent and worktree-agent variants
44
+ - (deep) Agent crash recovery procedure documented
45
+ - (mvp) Conflict prevention rule: don't parallelize tasks touching same files
46
46
  - (mvp) CI workflow YAML is valid and references commands from Key Commands table
47
47
 
48
48
  ## Methodology Scaling
@@ -51,9 +51,12 @@ parallel agents, CI pipeline, branch protection, and conflict prevention rules.
51
51
  cleanup, and comprehensive CLAUDE.md updates.
52
52
  - **mvp**: Branching strategy, commit format, basic PR workflow, CI config.
53
53
  Skip worktree script and crash recovery. Minimal CLAUDE.md updates.
54
- - **custom:depth(1-5)**: Depth 1-2: branching + commits + CI. Depth 3: add PR
55
- workflow and branch protection. Depth 4: add worktrees and crash recovery.
56
- Depth 5: full suite with all sections.
54
+ - **custom:depth(1-5)**:
55
+ - Depth 1: branching strategy, commit format, and CI config.
56
+ - Depth 2: add basic PR workflow and PR template.
57
+ - Depth 3: add branch protection rules and full 8-step PR workflow.
58
+ - Depth 4: add worktree script, agent crash recovery, and conflict prevention rules.
59
+ - Depth 5: full suite with batch branch cleanup, multi-agent coordination, and comprehensive CLAUDE.md updates.
57
60
 
58
61
  ## Mode Detection
59
62
  Update mode if docs/git-workflow.md exists. In update mode: never rename CI jobs
@@ -26,16 +26,21 @@ issue is discovered during implementation.
26
26
  - Freeze marker added to each document (tracking comment)
27
27
 
28
28
  ## Quality Criteria
29
- - (mvp) All P0 and P1 validation findings addressed
30
- - (deep) P2 findings addressed or explicitly deferred with rationale
31
- - Fix log documents what changed and why
29
+ - (mvp) All P0 and P1 validation findings resolved: fixed in source document or explicitly deferred with documented rationale
30
+ - (deep) P2 findings fixed in source document or explicitly deferred with documented rationale
31
+ - (mvp) Fix log documents what changed and why
32
32
  - (deep) Cross-phase-consistency validation re-run after fixes yields no new P0 or P1 findings
33
- - Every frozen document contains a tracking comment matching `<!-- scaffold:step-name vN YYYY-MM-DD -->`
33
+ - (mvp) Every frozen document contains a tracking comment matching `<!-- scaffold:step-name vN YYYY-MM-DD -->`
34
34
 
35
35
  ## Methodology Scaling
36
36
  - **deep**: All findings addressed. Full fix log. Final consistency check.
37
37
  - **mvp**: P0 findings only. Brief fix log.
38
- - **custom:depth(1-5)**: Depth 1-2: address P0 findings only with brief fix log. Depth 3: address P0-P1 findings with detailed fix log and deferred rationale. Depth 4: address P0-P2 with full deferred rationale and re-validation passes. Depth 5: all findings addressed, final consistency re-check, and freeze verification audit.
38
+ - **custom:depth(1-5)**:
39
+ - Depth 1: address P0 findings only with minimal fix log.
40
+ - Depth 2: address P0 findings with brief fix log and freeze markers on updated documents.
41
+ - Depth 3: address P0-P1 findings with detailed fix log and deferred rationale.
42
+ - Depth 4: address P0-P2 with full deferred rationale and re-validation passes.
43
+ - Depth 5: all findings addressed, final consistency re-check, and freeze verification audit.
39
44
 
40
45
  ## Mode Detection
41
46
  Check if `docs/validation/fix-log.md` already exists.
@@ -25,9 +25,11 @@ before their first task.
25
25
 
26
26
  ## Quality Criteria
27
27
  - (mvp) Contains sections for: project purpose, architecture overview (with component diagram reference), top 3 coding patterns with examples, and a file/doc lookup table
28
- - (mvp) Guide includes clone instructions, dependency install command, dev server start command, and test run command; every ADR referenced by number with one-sentence summary
28
+ - (mvp) Guide includes: clone instructions, dependency install command, dev server start command, and test run command
29
+ - (deep) Every ADR referenced by number with one-sentence summary
29
30
  - (deep) Key architectural decisions are summarized (with pointers to ADRs)
30
- - (mvp) Development workflow is clear (branch, code, test, PR)
31
+ - (mvp) Development workflow section documents: branch creation command, commit message format, test command, and PR creation command
32
+ - (mvp) Guide explicitly states relationship to implementation-playbook: what the guide covers vs what the playbook covers
31
33
 
32
34
  ## Methodology Scaling
33
35
  - **deep**: Comprehensive guide. Architecture walkthrough, key pattern explanations,
@@ -35,7 +37,12 @@ before their first task.
35
37
  - **mvp**: Quick-start guide with: clone command, dependency install, dev server
36
38
  start, test run command. Skip architecture overview, key patterns, and
37
39
  troubleshooting sections.
38
- - **custom:depth(1-5)**: Depth 1-2: quick start with setup and test commands only. Depth 3: add architecture overview, key patterns, and common tasks. Depth 4: add troubleshooting section, entry points documentation, and development workflow detail. Depth 5: full guide with architecture walkthrough, decision rationale, and team-specific onboarding paths.
40
+ - **custom:depth(1-5)**:
41
+ - Depth 1: clone command and dependency install only.
42
+ - Depth 2: quick start with setup, dev server start, and test run commands.
43
+ - Depth 3: add architecture overview, key patterns, and common tasks.
44
+ - Depth 4: add troubleshooting section, entry points documentation, and development workflow detail.
45
+ - Depth 5: full guide with architecture walkthrough, decision rationale, and team-specific onboarding paths.
39
46
 
40
47
  ## Mode Detection
41
48
  Check if `docs/onboarding-guide.md` already exists.
@@ -6,7 +6,7 @@ phase: "finalization"
6
6
  order: 1430
7
7
  dependencies: [developer-onboarding-guide]
8
8
  outputs: [docs/implementation-playbook.md]
9
- reads: [story-tests, create-evals, implementation-plan, database-schema, api-contracts, ux-spec, design-system, system-architecture, tdd, coding-standards, security, operations]
9
+ reads: [story-tests, create-evals, implementation-plan, database-schema, api-contracts, ux-spec, design-system, system-architecture, tdd, coding-standards, security, operations, domain-modeling, adrs, create-prd, project-structure]
10
10
  conditional: null
11
11
  knowledge-base: [implementation-playbook]
12
12
  ---
@@ -19,7 +19,7 @@ format between agents, and success criteria.
19
19
 
20
20
  ## Inputs
21
21
  - docs/implementation-plan.md (required) — tasks to sequence
22
- - docs/system-architecture.md (required) — architecture context
22
+ - docs/system-architecture.md (required at deep; optional — not available in MVP) — architecture context
23
23
  - docs/tdd-standards.md (required) — testing requirements
24
24
  - tests/acceptance/ (required if exists) — test skeletons agents implement during TDD
25
25
  - docs/story-tests-map.md (required if exists) — story-to-test mapping for progress tracking
@@ -34,6 +34,8 @@ format between agents, and success criteria.
34
34
  - docs/security-review.md (optional) — for security control task context
35
35
  - docs/operations-runbook.md (optional) — for deployment task context
36
36
  - docs/onboarding-guide.md (optional — not available in MVP) — agents should read for project context before playbook
37
+ - docs/vision.md (optional) — strategic direction and product vision
38
+ - docs/tech-stack.md (required) — technology choices that determine quality gate commands and build tooling
37
39
  - All other frozen artifacts
38
40
 
39
41
  ## Expected Outputs
@@ -47,7 +49,9 @@ format between agents, and success criteria.
47
49
  - (mvp) Success criteria per task (how to know it's done)
48
50
  - (deep) Handoff format between agents (what to communicate when passing work)
49
51
  - (mvp) Quality gates are defined (what must pass before a task is complete)
50
- - Quality gates include `make eval` (or equivalent) as a required check
52
+ - (deep) Test skeleton discovery: playbook instructs agents to check docs/story-tests-map.md before writing new tests
53
+ - (mvp) Dependency-failure recovery: playbook documents what to do when a task's upstream dependency is blocked
54
+ - (deep) Quality gates include `make eval` (or equivalent) as a required check when eval tests exist
51
55
  - (deep) Agent workflow references test skeleton implementation from tests/acceptance/
52
56
  - (deep) Handoff format includes at minimum: implementation summary, assumptions made, known limitations, gotchas, and files modified
53
57
 
@@ -59,7 +63,12 @@ format between agents, and success criteria.
59
63
  reference, commit format, and quality gate commands from CLAUDE.md. Skip
60
64
  per-task context blocks, wave assignments, and inter-agent handoff format.
61
65
  Reference docs/coding-standards.md and docs/tdd-standards.md directly.
62
- - **custom:depth(1-5)**: Depth 1-2: task execution order, basic coding conventions reference, commit format, and quality gate commands. Depth 3: add per-task context requirements, wave assignments, and quality gates per wave. Depth 4: add inter-agent communication protocol, handoff format, and error recovery procedures. Depth 5: full playbook with rollback procedures, eval integration, and per-task minimum context blocks.
66
+ - **custom:depth(1-5)**:
67
+ - Depth 1: task execution order and commit format only.
68
+ - Depth 2: add basic coding conventions reference and quality gate commands.
69
+ - Depth 3: add per-task context requirements, wave assignments, and quality gates per wave.
70
+ - Depth 4: add inter-agent communication protocol, handoff format, and error recovery procedures.
71
+ - Depth 5: full playbook with rollback procedures, eval integration, and per-task minimum context blocks.
63
72
 
64
73
  ## Mode Detection
65
74
  Check if `docs/implementation-playbook.md` already exists.
@@ -33,8 +33,8 @@ and autonomous behavior guidelines.
33
33
  - (mvp) tasks/lessons.md exists with Patterns, Anti-Patterns, and Common Gotchas sections
34
34
  - (mvp) CLAUDE.md contains Core Principles with all four tenets (Simplicity, No Laziness, TDD, Prove It)
35
35
  - (mvp) CLAUDE.md contains Beads command reference table
36
- - CLAUDE.md contains commit-message convention requiring Beads task IDs
37
- - Bootstrap commit uses `[BD-0]` convention
36
+ - (mvp) CLAUDE.md contains commit-message convention requiring Beads task IDs
37
+ - (mvp) Bootstrap commit uses `[BD-0]` convention
38
38
  - (deep) Cross-doc consistency verified against git-workflow.md and coding-standards.md
39
39
 
40
40
  ## Methodology Scaling
@@ -43,9 +43,12 @@ and autonomous behavior guidelines.
43
43
  existing git-workflow.md and coding-standards.md.
44
44
  - **mvp**: Initialize Beads, create tasks/lessons.md, add minimal CLAUDE.md
45
45
  sections (Core Principles + Beads commands). Skip cross-doc checks.
46
- - **custom:depth(1-5)**: Depth 1-2: MVP Beads init + minimal CLAUDE.md. Depth 3:
47
- add full command table and priority docs. Depth 4-5: full setup with cross-doc
48
- consistency and detailed autonomous behavior rules.
46
+ - **custom:depth(1-5)**:
47
+ - Depth 1: Initialize Beads + create tasks/lessons.md. Minimal CLAUDE.md with Core Principles only.
48
+ - Depth 2: Depth 1 + add Beads command reference table to CLAUDE.md.
49
+ - Depth 3: Add full command table, priority level documentation, and autonomous behavior rules.
50
+ - Depth 4: Full setup with cross-doc consistency checks against git-workflow.md and coding-standards.md.
51
+ - Depth 5: Full setup + detailed autonomous behavior rules + commit-message convention enforcement.
49
52
 
50
53
  ## Conditional Evaluation
51
54
  Enable when: project uses Beads task tracking methodology (user selects Beads during
@@ -31,14 +31,14 @@ self-review checklist.
31
31
  alongside the standards doc
32
32
 
33
33
  ## Quality Criteria
34
- - Every standard references the specific tech stack, not generic principles
35
- - Includes runnable code examples showing the RIGHT way for the stack
36
- - Commit message format is [BD-<id>] type(scope): description
37
- - AI-specific coding rules section addresses common AI mistakes (dead code,
34
+ - (mvp) Every standard references the specific tech stack, not generic principles
35
+ - (deep) Includes >= 2 runnable code examples per section showing the RIGHT way for the stack
36
+ - (mvp) Commit message format documented: if project uses Beads task tracking: [BD-<id>] type(scope): description; otherwise: type(scope): description following conventional commits
37
+ - (mvp) AI-specific coding rules section addresses common AI mistakes (dead code,
38
38
  duplication, magic numbers, premature abstraction, unnecessary features)
39
- - Linter/formatter configs created and referenced from the document
40
- - Every standard has a corresponding linter rule, code review checklist item, or test pattern that enforces it
41
- - Every code review checklist item is a binary yes/no question
39
+ - (mvp) Linter/formatter configs created and referenced from the document
40
+ - (mvp) Every standard has a corresponding linter rule, formatter rule, code review checklist item, or test pattern that enforces it (where applicable tools exist)
41
+ - (deep) Every code review checklist item is a binary yes/no question
42
42
  - (mvp) Linter/formatter config files are valid (lint command runs without config errors)
43
43
 
44
44
  ## Methodology Scaling
@@ -47,9 +47,12 @@ self-review checklist.
47
47
  linter/formatter configuration with custom rules. 15-20 pages.
48
48
  - **mvp**: Core naming conventions, commit format, import ordering, error handling
49
49
  approach, and AI-specific rules. Basic linter config. 3-5 pages.
50
- - **custom:depth(1-5)**: Depth 1-2: MVP conventions. Depth 3: add security and
51
- database patterns. Depth 4: add API design and logging. Depth 5: full suite
52
- with all sections and custom linter rules.
50
+ - **custom:depth(1-5)**:
51
+ - Depth 1: Core naming conventions, commit format, and import ordering. 1-2 pages.
52
+ - Depth 2: Depth 1 + error handling approach and AI-specific rules. Basic linter config. 3-5 pages.
53
+ - Depth 3: Add security and database access patterns. 5-8 pages.
54
+ - Depth 4: Add API design and logging conventions. 8-12 pages.
55
+ - Depth 5: Full suite with all sections, custom linter rules, and code review checklist. 15-20 pages.
53
56
 
54
57
  ## Mode Detection
55
58
  Update mode if docs/coding-standards.md exists. In update mode: preserve naming
@@ -33,17 +33,17 @@ with a Quick Reference section for file placement.
33
33
  - CLAUDE.md updated with Project Structure Quick Reference section
34
34
 
35
35
  ## Quality Criteria
36
- - Module organization strategy chosen and justified (feature-based, layer-based, or hybrid)
37
- - File placement table covers all file types (routes, services, models, types, utils, tests)
38
- - High-contention files identified with merge-conflict mitigation strategies
39
- - Shared utilities rule enforced (2+ features before promoting to shared)
40
- - Import conventions defined with ordering rules
41
- - Test file location aligns with tdd-standards.md (if it exists)
42
- - .gitignore covers all generated files for the tech stack
43
- - Structure follows the chosen framework's conventions
44
- - CLAUDE.md contains Project Structure Quick Reference section with file placement table
36
+ - (mvp) Module organization strategy chosen and justified (feature-based, layer-based, or hybrid)
37
+ - (mvp) File placement table covers all file types (routes, services, models, types, utils, tests)
38
+ - (deep) High-contention files identified with merge-conflict mitigation strategies
39
+ - (mvp) Shared utilities rule enforced (2+ features before promoting to shared)
40
+ - (mvp) Import conventions defined with ordering rules
41
+ - (mvp) Test file location aligns with tdd-standards.md (if it exists)
42
+ - (mvp) .gitignore covers all generated files for the tech stack
43
+ - (mvp) Structure follows the chosen framework's conventions
44
+ - (mvp) CLAUDE.md contains Project Structure Quick Reference section with file placement table
45
45
  - (mvp) All documented directories exist on disk with .gitkeep placeholder files
46
- - CLAUDE.md Project Structure Quick Reference matches the directory tree in docs/project-structure.md
46
+ - (mvp) CLAUDE.md Project Structure Quick Reference matches the directory tree in docs/project-structure.md
47
47
 
48
48
  ## Methodology Scaling
49
49
  - **deep**: Comprehensive structure with high-contention analysis, shared code
@@ -51,9 +51,12 @@ with a Quick Reference section for file placement.
51
51
  screenshots, and generated vs. committed file inventory.
52
52
  - **mvp**: Directory tree with annotations, basic file placement table, .gitignore.
53
53
  Skip shared code strategy and high-contention analysis.
54
- - **custom:depth(1-5)**: Depth 1-2: tree + placement table. Depth 3: add shared
55
- code rules. Depth 4: add contention analysis. Depth 5: full suite with barrel
56
- policy and import aliases.
54
+ - **custom:depth(1-5)**:
55
+ - Depth 1: Directory tree with purpose annotations and .gitignore. Minimal.
56
+ - Depth 2: Depth 1 + file placement table covering all file types.
57
+ - Depth 3: Add shared code strategy (2+ features before promoting to shared).
58
+ - Depth 4: Add high-contention file analysis with merge-conflict mitigation strategies.
59
+ - Depth 5: Full suite with barrel file policy, import path aliases, and generated vs. committed file inventory.
57
60
 
58
61
  ## Mode Detection
59
62
  Update mode if docs/project-structure.md exists. In update mode: never delete
@@ -30,10 +30,10 @@ actual test framework and assertion library.
30
30
  - docs/tdd-standards.md — testing approach with coverage goals and patterns
31
31
 
32
32
  ## Quality Criteria
33
- - (mvp) Test pyramid defined with coverage targets per layer
33
+ - (mvp) Test pyramid (or equivalent testing model for non-layered architectures) defined with coverage targets per layer (defined per layer, e.g., 80% unit, 50% integration)
34
34
  - (mvp) Testing patterns specified for each layer (unit, integration, e2e)
35
- - (mvp) Quality gates defined (what must pass before merge)
36
- - Edge cases from domain invariants are test scenarios
35
+ - (mvp) Quality gates defined: list of commands to run before merge, with expected pass criteria for each
36
+ - (mvp) Edge cases from domain invariants are test scenarios
37
37
  - (deep) Performance testing approach for critical paths
38
38
  - (deep) Contract testing strategy documented for service boundaries
39
39
 
@@ -42,7 +42,12 @@ actual test framework and assertion library.
42
42
  test patterns per architecture pattern. Performance benchmarks. CI integration.
43
43
  Test data strategy. Mutation testing approach.
44
44
  - **mvp**: Test pyramid overview. Key testing patterns. What must pass before deploy.
45
- - **custom:depth(1-5)**: Depth 1-2: test pyramid overview with key patterns and example test for each layer. Depth 3: add per-layer test patterns, coverage targets, CI integration, and test data strategy. Depth 4: add performance benchmarks, mutation testing approach, and cross-module integration patterns. Depth 5: full suite with contract testing, visual regression strategy, and automated quality gate calibration.
45
+ - **custom:depth(1-5)**:
46
+ - Depth 1: Test pyramid overview with key patterns. What must pass before deploy.
47
+ - Depth 2: Depth 1 + example test for each layer using the project's actual test framework.
48
+ - Depth 3: Add per-layer test patterns, coverage targets, CI integration, and test data strategy.
49
+ - Depth 4: Add performance benchmarks, mutation testing approach, and cross-module integration patterns.
50
+ - Depth 5: Full suite with contract testing, visual regression strategy, and automated quality gate calibration.
46
51
 
47
52
  ## Mode Detection
48
53
  Check for docs/tdd-standards.md. If it exists, operate in update mode: read