anvil-dev-framework 0.1.6

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 (190) hide show
  1. package/README.md +719 -0
  2. package/VERSION +1 -0
  3. package/docs/ANVIL-REPO-IMPLEMENTATION-PLAN.md +441 -0
  4. package/docs/FIRST-SKILL-TUTORIAL.md +408 -0
  5. package/docs/INSTALLATION-RETRO-NOTES.md +458 -0
  6. package/docs/INSTALLATION.md +984 -0
  7. package/docs/anvil-hud.md +469 -0
  8. package/docs/anvil-init.md +255 -0
  9. package/docs/anvil-state.md +210 -0
  10. package/docs/boris-cherny-ralph-wiggum-insights.md +608 -0
  11. package/docs/command-reference.md +2022 -0
  12. package/docs/hooks-tts.md +368 -0
  13. package/docs/implementation-guide.md +810 -0
  14. package/docs/linear-github-integration.md +247 -0
  15. package/docs/local-issues.md +677 -0
  16. package/docs/patterns/README.md +419 -0
  17. package/docs/planning-responsibilities.md +139 -0
  18. package/docs/session-workflow.md +573 -0
  19. package/docs/simplification-plan-template.md +297 -0
  20. package/docs/simplification-principles.md +129 -0
  21. package/docs/specifications/CCS-RALPH-INTEGRATION-DESIGN.md +633 -0
  22. package/docs/specifications/CCS-RESEARCH-REPORT.md +169 -0
  23. package/docs/specifications/PLAN-ANV-verification-ralph-wiggum.md +403 -0
  24. package/docs/specifications/PLAN-parallel-tracks-anvil-memory-ccs.md +494 -0
  25. package/docs/specifications/SPEC-ANV-VRW/component-01-verify.md +208 -0
  26. package/docs/specifications/SPEC-ANV-VRW/component-02-stop-gate.md +226 -0
  27. package/docs/specifications/SPEC-ANV-VRW/component-03-posttooluse.md +209 -0
  28. package/docs/specifications/SPEC-ANV-VRW/component-04-ralph-wiggum.md +604 -0
  29. package/docs/specifications/SPEC-ANV-VRW/component-05-atomic-actions.md +311 -0
  30. package/docs/specifications/SPEC-ANV-VRW/component-06-verify-subagent.md +264 -0
  31. package/docs/specifications/SPEC-ANV-VRW/component-07-claude-md.md +363 -0
  32. package/docs/specifications/SPEC-ANV-VRW/index.md +182 -0
  33. package/docs/specifications/SPEC-ANV-anvil-memory.md +573 -0
  34. package/docs/specifications/SPEC-ANV-context-checkpoints.md +781 -0
  35. package/docs/specifications/SPEC-ANV-verification-ralph-wiggum.md +789 -0
  36. package/docs/sync.md +122 -0
  37. package/global/CLAUDE.md +140 -0
  38. package/global/agents/verify-app.md +164 -0
  39. package/global/commands/anvil-settings.md +527 -0
  40. package/global/commands/anvil-sync.md +121 -0
  41. package/global/commands/change.md +197 -0
  42. package/global/commands/clarify.md +252 -0
  43. package/global/commands/cleanup.md +292 -0
  44. package/global/commands/commit-push-pr.md +207 -0
  45. package/global/commands/decay-review.md +127 -0
  46. package/global/commands/discover.md +158 -0
  47. package/global/commands/doc-coverage.md +122 -0
  48. package/global/commands/evidence.md +307 -0
  49. package/global/commands/explore.md +121 -0
  50. package/global/commands/force-exit.md +135 -0
  51. package/global/commands/handoff.md +191 -0
  52. package/global/commands/healthcheck.md +302 -0
  53. package/global/commands/hud.md +84 -0
  54. package/global/commands/insights.md +319 -0
  55. package/global/commands/linear-setup.md +184 -0
  56. package/global/commands/lint-fix.md +198 -0
  57. package/global/commands/orient.md +510 -0
  58. package/global/commands/plan.md +228 -0
  59. package/global/commands/ralph.md +346 -0
  60. package/global/commands/ready.md +182 -0
  61. package/global/commands/release.md +305 -0
  62. package/global/commands/retro.md +96 -0
  63. package/global/commands/shard.md +166 -0
  64. package/global/commands/spec.md +227 -0
  65. package/global/commands/sprint.md +184 -0
  66. package/global/commands/tasks.md +228 -0
  67. package/global/commands/test-and-commit.md +151 -0
  68. package/global/commands/validate.md +132 -0
  69. package/global/commands/verify.md +251 -0
  70. package/global/commands/weekly-review.md +156 -0
  71. package/global/hooks/__pycache__/ralph_context_monitor.cpython-314.pyc +0 -0
  72. package/global/hooks/__pycache__/statusline_agent_sync.cpython-314.pyc +0 -0
  73. package/global/hooks/anvil_memory_observe.ts +322 -0
  74. package/global/hooks/anvil_memory_session.ts +166 -0
  75. package/global/hooks/anvil_memory_stop.ts +187 -0
  76. package/global/hooks/parse_transcript.py +116 -0
  77. package/global/hooks/post_merge_cleanup.sh +132 -0
  78. package/global/hooks/post_tool_format.sh +215 -0
  79. package/global/hooks/ralph_context_monitor.py +240 -0
  80. package/global/hooks/ralph_stop.sh +502 -0
  81. package/global/hooks/statusline.sh +1110 -0
  82. package/global/hooks/statusline_agent_sync.py +224 -0
  83. package/global/hooks/stop_gate.sh +250 -0
  84. package/global/lib/.claude/anvil-state.json +21 -0
  85. package/global/lib/__pycache__/agent_registry.cpython-314.pyc +0 -0
  86. package/global/lib/__pycache__/claim_service.cpython-314.pyc +0 -0
  87. package/global/lib/__pycache__/coderabbit_service.cpython-314.pyc +0 -0
  88. package/global/lib/__pycache__/config_service.cpython-314.pyc +0 -0
  89. package/global/lib/__pycache__/coordination_service.cpython-314.pyc +0 -0
  90. package/global/lib/__pycache__/doc_coverage_service.cpython-314.pyc +0 -0
  91. package/global/lib/__pycache__/gate_logger.cpython-314.pyc +0 -0
  92. package/global/lib/__pycache__/github_service.cpython-314.pyc +0 -0
  93. package/global/lib/__pycache__/hygiene_service.cpython-314.pyc +0 -0
  94. package/global/lib/__pycache__/issue_models.cpython-314.pyc +0 -0
  95. package/global/lib/__pycache__/issue_provider.cpython-314.pyc +0 -0
  96. package/global/lib/__pycache__/linear_data_service.cpython-314.pyc +0 -0
  97. package/global/lib/__pycache__/linear_provider.cpython-314.pyc +0 -0
  98. package/global/lib/__pycache__/local_provider.cpython-314.pyc +0 -0
  99. package/global/lib/__pycache__/quality_service.cpython-314.pyc +0 -0
  100. package/global/lib/__pycache__/ralph_state.cpython-314.pyc +0 -0
  101. package/global/lib/__pycache__/state_manager.cpython-314.pyc +0 -0
  102. package/global/lib/__pycache__/transcript_parser.cpython-314.pyc +0 -0
  103. package/global/lib/__pycache__/verification_runner.cpython-314.pyc +0 -0
  104. package/global/lib/__pycache__/verify_iteration.cpython-314.pyc +0 -0
  105. package/global/lib/__pycache__/verify_subagent.cpython-314.pyc +0 -0
  106. package/global/lib/agent_registry.py +995 -0
  107. package/global/lib/anvil-state.sh +435 -0
  108. package/global/lib/claim_service.py +515 -0
  109. package/global/lib/coderabbit_service.py +314 -0
  110. package/global/lib/config_service.py +423 -0
  111. package/global/lib/coordination_service.py +331 -0
  112. package/global/lib/doc_coverage_service.py +1305 -0
  113. package/global/lib/gate_logger.py +316 -0
  114. package/global/lib/github_service.py +310 -0
  115. package/global/lib/handoff_generator.py +775 -0
  116. package/global/lib/hygiene_service.py +712 -0
  117. package/global/lib/issue_models.py +257 -0
  118. package/global/lib/issue_provider.py +339 -0
  119. package/global/lib/linear_data_service.py +210 -0
  120. package/global/lib/linear_provider.py +987 -0
  121. package/global/lib/linear_provider.py.backup +671 -0
  122. package/global/lib/local_provider.py +486 -0
  123. package/global/lib/orient_fast.py +457 -0
  124. package/global/lib/quality_service.py +470 -0
  125. package/global/lib/ralph_prompt_generator.py +563 -0
  126. package/global/lib/ralph_state.py +1202 -0
  127. package/global/lib/state_manager.py +417 -0
  128. package/global/lib/transcript_parser.py +597 -0
  129. package/global/lib/verification_runner.py +557 -0
  130. package/global/lib/verify_iteration.py +490 -0
  131. package/global/lib/verify_subagent.py +250 -0
  132. package/global/skills/README.md +155 -0
  133. package/global/skills/quality-gates/SKILL.md +252 -0
  134. package/global/skills/skill-template/SKILL.md +109 -0
  135. package/global/skills/testing-strategies/SKILL.md +337 -0
  136. package/global/templates/CHANGE-template.md +105 -0
  137. package/global/templates/HANDOFF-template.md +63 -0
  138. package/global/templates/PLAN-template.md +111 -0
  139. package/global/templates/SPEC-template.md +93 -0
  140. package/global/templates/ralph/PROMPT.md.template +89 -0
  141. package/global/templates/ralph/fix_plan.md.template +31 -0
  142. package/global/templates/ralph/progress.txt.template +23 -0
  143. package/global/tests/__pycache__/test_doc_coverage.cpython-314.pyc +0 -0
  144. package/global/tests/test_doc_coverage.py +520 -0
  145. package/global/tests/test_issue_models.py +299 -0
  146. package/global/tests/test_local_provider.py +323 -0
  147. package/global/tools/README.md +178 -0
  148. package/global/tools/__pycache__/anvil-hud.cpython-314.pyc +0 -0
  149. package/global/tools/anvil-hud.py +3622 -0
  150. package/global/tools/anvil-hud.py.bak +3318 -0
  151. package/global/tools/anvil-issue.py +432 -0
  152. package/global/tools/anvil-memory/CLAUDE.md +49 -0
  153. package/global/tools/anvil-memory/README.md +42 -0
  154. package/global/tools/anvil-memory/bun.lock +25 -0
  155. package/global/tools/anvil-memory/bunfig.toml +9 -0
  156. package/global/tools/anvil-memory/package.json +23 -0
  157. package/global/tools/anvil-memory/src/__tests__/ccs/context-monitor.test.ts +535 -0
  158. package/global/tools/anvil-memory/src/__tests__/ccs/edge-cases.test.ts +645 -0
  159. package/global/tools/anvil-memory/src/__tests__/ccs/fixtures.ts +363 -0
  160. package/global/tools/anvil-memory/src/__tests__/ccs/index.ts +8 -0
  161. package/global/tools/anvil-memory/src/__tests__/ccs/integration.test.ts +417 -0
  162. package/global/tools/anvil-memory/src/__tests__/ccs/prompt-generator.test.ts +571 -0
  163. package/global/tools/anvil-memory/src/__tests__/ccs/ralph-stop.test.ts +440 -0
  164. package/global/tools/anvil-memory/src/__tests__/ccs/test-utils.ts +252 -0
  165. package/global/tools/anvil-memory/src/__tests__/commands.test.ts +657 -0
  166. package/global/tools/anvil-memory/src/__tests__/db.test.ts +641 -0
  167. package/global/tools/anvil-memory/src/__tests__/hooks.test.ts +272 -0
  168. package/global/tools/anvil-memory/src/__tests__/performance.test.ts +427 -0
  169. package/global/tools/anvil-memory/src/__tests__/test-utils.ts +113 -0
  170. package/global/tools/anvil-memory/src/commands/checkpoint.ts +197 -0
  171. package/global/tools/anvil-memory/src/commands/get.ts +115 -0
  172. package/global/tools/anvil-memory/src/commands/init.ts +94 -0
  173. package/global/tools/anvil-memory/src/commands/observe.ts +163 -0
  174. package/global/tools/anvil-memory/src/commands/search.ts +112 -0
  175. package/global/tools/anvil-memory/src/db.ts +638 -0
  176. package/global/tools/anvil-memory/src/index.ts +205 -0
  177. package/global/tools/anvil-memory/src/types.ts +122 -0
  178. package/global/tools/anvil-memory/tsconfig.json +29 -0
  179. package/global/tools/ralph-loop.sh +359 -0
  180. package/package.json +45 -0
  181. package/scripts/anvil +822 -0
  182. package/scripts/extract_patterns.py +222 -0
  183. package/scripts/init-project.sh +541 -0
  184. package/scripts/install.sh +229 -0
  185. package/scripts/postinstall.js +41 -0
  186. package/scripts/rollback.sh +188 -0
  187. package/scripts/sync.sh +623 -0
  188. package/scripts/test-statusline.sh +248 -0
  189. package/scripts/update_claude_md.py +224 -0
  190. package/scripts/verify.sh +255 -0
package/README.md ADDED
@@ -0,0 +1,719 @@
1
+ ```
2
+ ___ _ ___ _____ _
3
+ / \ | \ | \ \ / /_ _| |
4
+ / /_\ \ | \| |\ \ / / | || | v0.1.6.0 (alpha)
5
+ / _____ \| |\ | \ V / | || |___
6
+ /_/ \_\_| \_| \_/ |___|_____|
7
+
8
+ ══════════════════════════════════════════════════════════
9
+ Where raw specs are forged into production code.
10
+ ══════════════════════════════════════════════════════════
11
+ ```
12
+
13
+ # Anvil Development Framework <sup>v0.1.6.0</sup>
14
+
15
+ > **A structured AI development system for solo builders who demand production-quality output.**
16
+
17
+ Anvil is a comprehensive framework for AI-assisted software development that combines phase-gated workflows, persistent memory systems, and automated quality gates to transform how you build software with AI coding assistants.
18
+
19
+ ---
20
+
21
+ ## πŸ“¦ Latest Changes in v0.1.6.0
22
+
23
+ *Released: 2026-01-07*
24
+
25
+ - **Ralph Wiggum Autonomous Execution** β€” Long-running unattended AI execution mode
26
+ - `/ralph start` β€” Initialize autonomous loop with task breakdown
27
+ - Circuit breaker safety (stops stuck loops automatically)
28
+ - Progress tracking to prevent repeated mistakes
29
+ - Git checkpointing before each restart
30
+ - **PostToolUse Formatting Hook** β€” Auto-format files after Edit/Write operations
31
+ - **Usage Guidelines** β€” Clear guidance on when Ralph is appropriate vs standard workflow
32
+
33
+ See [CHANGELOG.md](CHANGELOG.md) for complete history.
34
+
35
+ > **Note**: Version numbers were reset in January 2026 from `1.x` to `0.1.x` to accurately reflect alpha status. See [Versioning Strategy](#versioning-strategy) for details.
36
+
37
+ ---
38
+
39
+ ## πŸ”₯ The Problem
40
+
41
+ AI coding assistants are powerful but chaotic:
42
+
43
+ ```
44
+ ❌ Context lost between sessions
45
+ ❌ No memory of what was decided or why
46
+ ❌ Agents run off in wrong directions
47
+ ❌ Quality varies wildly
48
+ ❌ No structured workflow
49
+ ❌ Duplicate work, missed patterns
50
+ ❌ "It works on my machine" PRs
51
+ ```
52
+
53
+ ## βš’οΈ The Anvil Solution
54
+
55
+ ```
56
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
57
+ β”‚ β”‚
58
+ β”‚ πŸ“‹ SPECS 🧠 MEMORY 🚦 GATES πŸ”„ FLOW β”‚
59
+ β”‚ ──────── ──────── ─────── ────── β”‚
60
+ β”‚ What to build What happened Quality checks How to work β”‚
61
+ β”‚ β”‚
62
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
63
+ β”‚ β”‚ β”‚ β”‚
64
+ β”‚ β”‚ EXPLORE β†’ SPECIFY β†’ PLAN β†’ TASKS β†’ IMPLEMENT β†’ VERIFY β†’ βœ“ β”‚ β”‚
65
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
66
+ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
67
+ β”‚ β”‚ Human gates at each phase β”‚ β”‚
68
+ β”‚ β”‚ β”‚ β”‚
69
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
70
+ β”‚ β”‚
71
+ β”‚ βœ… Context preserved across sessions β”‚
72
+ β”‚ βœ… Structured specs prevent scope creep β”‚
73
+ β”‚ βœ… Phase gates catch problems early β”‚
74
+ β”‚ βœ… Evidence-based PR completion β”‚
75
+ β”‚ βœ… Memory that actually persists β”‚
76
+ β”‚ β”‚
77
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
78
+ ```
79
+
80
+ ---
81
+
82
+ ## 🎯 When to Use Anvil
83
+
84
+ **Anvil is for you if:**
85
+ - Solo developer or small team (1-3 people)
86
+ - Building production software with AI assistance
87
+ - Want structured workflows, not just chat
88
+ - Value quality gates and evidence-based PRs
89
+ - Need context to persist across sessions
90
+
91
+ **Anvil is NOT for:**
92
+ - Large teams with existing robust processes
93
+ - Quick prototypes / throwaway code
94
+ - Those who prefer unstructured AI interaction
95
+
96
+ **Architecture Philosophy:**
97
+ - **Single generalist agent** with on-demand skills (not multi-agent)
98
+ - **Skills** = Domain knowledge loaded when needed
99
+ - **Sub-agents** = Focused multi-step workflows
100
+ - **Coordination** = For parallel Claude terminals, not agent roles
101
+
102
+ ---
103
+
104
+ ## πŸ“Š Architecture Overview
105
+
106
+ ```
107
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
108
+ β”‚ ANVIL ARCHITECTURE β”‚
109
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
110
+ β”‚ β”‚
111
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
112
+ β”‚ β”‚ SINGLE GENERALIST AGENT β”‚ β”‚
113
+ β”‚ β”‚ β”‚ β”‚
114
+ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
115
+ β”‚ β”‚ β”‚ Skills β”‚ β”‚ Sub-Agents β”‚ β”‚ Context β”‚ β”‚ β”‚
116
+ β”‚ β”‚ β”‚ (on-demand) β”‚ β”‚ (read-only) β”‚ β”‚ (tiers) β”‚ β”‚ β”‚
117
+ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
118
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
119
+ β”‚ β”‚ β”‚
120
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
121
+ β”‚ β”‚ MEMORY SYSTEM β”‚ β”‚
122
+ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
123
+ β”‚ β”‚ β”‚ Spec β”‚ β”‚ Task β”‚ β”‚ Session β”‚ β”‚ Handoff β”‚ β”‚Conventionβ”‚ β”‚ β”‚
124
+ β”‚ β”‚ β”‚ Memory β”‚ β”‚ Memory β”‚ β”‚ Memory β”‚ β”‚ Memory β”‚ β”‚ Memory β”‚ β”‚ β”‚
125
+ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
126
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
127
+ β”‚ β”‚ β”‚
128
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
129
+ β”‚ β”‚ QUALITY GATES β”‚ β”‚
130
+ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
131
+ β”‚ β”‚ β”‚Pre-Work β”‚ β”‚ During β”‚ β”‚ Pre-PR β”‚ β”‚ Post-PR β”‚ β”‚ β”‚
132
+ β”‚ β”‚ β”‚ Gate β”‚ β”‚ Gate β”‚ β”‚ Gate β”‚ β”‚ Gate β”‚ β”‚ β”‚
133
+ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
134
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
135
+ β”‚ β”‚
136
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
137
+ ```
138
+
139
+ ---
140
+
141
+ ## πŸš€ Quick Start
142
+
143
+ ### Installation
144
+
145
+ **Option 1: Bun (Recommended for Claude Code users)**
146
+ ```bash
147
+ bun install -g anvil-dev-framework
148
+ anvil init
149
+ ```
150
+
151
+ **Option 2: npm**
152
+ ```bash
153
+ npm install -g anvil-dev-framework
154
+ anvil init
155
+ ```
156
+
157
+ **Option 3: Homebrew (macOS)**
158
+ ```bash
159
+ brew tap alexandercahiz/anvil
160
+ brew install anvil
161
+ anvil init
162
+ ```
163
+
164
+ **Option 4: From Source**
165
+ ```bash
166
+ git clone https://github.com/alexandercahiz/anvil-dev-framework.git
167
+ cd anvil-dev-framework
168
+ ./scripts/install.sh # Auto-configures PATH
169
+ anvil init
170
+ ```
171
+
172
+ See [docs/INSTALLATION.md](docs/INSTALLATION.md) for complete installation guide.
173
+
174
+ **Templates available:**
175
+ ```bash
176
+ anvil init # Generic project
177
+ anvil init --template saas # SaaS project
178
+ anvil init --template api-python # Python API project
179
+ anvil init --with-linear # With Linear integration
180
+ anvil init --dry-run # Preview changes
181
+ ```
182
+
183
+ See [docs/anvil-init.md](docs/anvil-init.md) for complete `anvil init` documentation.
184
+
185
+ ### Keeping Updated
186
+
187
+ After making changes to the framework, sync to your projects:
188
+
189
+ ```bash
190
+ # Sync global config
191
+ ./scripts/sync.sh --global
192
+
193
+ # Sync a specific project
194
+ ./scripts/sync.sh --project /path/to/your/project
195
+
196
+ # Preview changes first
197
+ ./scripts/sync.sh --project . --dry-run
198
+
199
+ # Or use the Claude Code command
200
+ /anvil-sync target:both
201
+ ```
202
+
203
+ See [docs/sync.md](docs/sync.md) for complete sync documentation.
204
+
205
+ ### First Skill
206
+
207
+ After installation, create your first skill:
208
+ See [docs/FIRST-SKILL-TUTORIAL.md](docs/FIRST-SKILL-TUTORIAL.md)
209
+
210
+ ### Daily Workflow
211
+
212
+ ```
213
+ /orient β†’ /sprint β†’ /validate β†’ [work] β†’ /evidence β†’ /handoff
214
+ ```
215
+
216
+ **For new features, add:**
217
+ ```
218
+ /explore β†’ /spec β†’ /plan β†’ /tasks β†’ [implement]
219
+ ```
220
+
221
+ See [Session Workflow Guide](docs/session-workflow.md) for the complete step-by-step walkthrough.
222
+
223
+ ---
224
+
225
+ ## πŸ“ Framework Structure
226
+
227
+ ```
228
+ anvil-dev-framework/
229
+ β”‚
230
+ β”œβ”€β”€ global/ # β†’ Installs to ~/.claude/
231
+ β”‚ β”œβ”€β”€ CLAUDE.md # Personal defaults & preferences
232
+ β”‚ β”œβ”€β”€ standards/ # Universal coding standards
233
+ β”‚ β”‚ β”œβ”€β”€ typescript.md
234
+ β”‚ β”‚ β”œβ”€β”€ react.md
235
+ β”‚ β”‚ β”œβ”€β”€ testing.md
236
+ β”‚ β”‚ └── security.md
237
+ β”‚ β”œβ”€β”€ templates/ # Reusable spec templates
238
+ β”‚ β”‚ β”œβ”€β”€ feature-spec.md
239
+ β”‚ β”‚ β”œβ”€β”€ bug-fix-spec.md
240
+ β”‚ β”‚ └── refactor-spec.md
241
+ β”‚ β”œβ”€β”€ commands/ # Global slash commands
242
+ β”‚ β”‚ β”œβ”€β”€ orient.md
243
+ β”‚ β”‚ β”œβ”€β”€ ready.md
244
+ β”‚ β”‚ β”œβ”€β”€ validate.md
245
+ β”‚ β”‚ β”œβ”€β”€ evidence.md
246
+ β”‚ β”‚ β”œβ”€β”€ shard.md
247
+ β”‚ β”‚ └── decay-review.md
248
+ β”‚ β”œβ”€β”€ skills/ # Claude Code skills
249
+ β”‚ └── analytics/ # Metrics & reports
250
+ β”‚
251
+ β”œβ”€β”€ project/ # β†’ Installs to .claude/
252
+ β”‚ β”œβ”€β”€ CLAUDE.md.template # Project context (customize)
253
+ β”‚ β”œβ”€β”€ constitution.md.template # Non-negotiable principles
254
+ β”‚ β”œβ”€β”€ product.md.template # Mission & roadmap
255
+ β”‚ β”œβ”€β”€ commands/ # Project-specific commands
256
+ β”‚ β”‚ β”œβ”€β”€ explore.md
257
+ β”‚ β”‚ β”œβ”€β”€ spec.md
258
+ β”‚ β”‚ β”œβ”€β”€ plan.md
259
+ β”‚ β”‚ β”œβ”€β”€ tasks.md
260
+ β”‚ β”‚ β”œβ”€β”€ discover.md
261
+ β”‚ β”‚ β”œβ”€β”€ change.md
262
+ β”‚ β”‚ └── handoff.md
263
+ β”‚ β”œβ”€β”€ specs/ # Specifications
264
+ β”‚ β”‚ β”œβ”€β”€ current/
265
+ β”‚ β”‚ └── archive/
266
+ β”‚ β”œβ”€β”€ changes/ # Brownfield change proposals
267
+ β”‚ β”œβ”€β”€ handoffs/ # Session continuity docs
268
+ β”‚ └── examples/ # Convention examples
269
+ β”‚
270
+ β”œβ”€β”€ quality-gates/ # β†’ Installs to project root
271
+ β”‚ β”œβ”€β”€ .coderabbit.yaml # AI code review config
272
+ β”‚ β”œβ”€β”€ .semgrep/ # SAST rules
273
+ β”‚ β”œβ”€β”€ .pre-commit-config.yaml # Pre-commit hooks
274
+ β”‚ └── .github/workflows/ci.yaml # CI pipeline
275
+ β”‚
276
+ β”œβ”€β”€ docs/ # Documentation
277
+ β”‚ β”œβ”€β”€ research/ # Research reports
278
+ β”‚ β”‚ └── v5-research-report.md
279
+ β”‚ β”œβ”€β”€ patterns/ # Pattern explanations
280
+ β”‚ β”œβ”€β”€ implementation-guide.md # Step-by-step setup
281
+ β”‚ └── command-reference.md # All commands documented
282
+ β”‚
283
+ β”œβ”€β”€ scripts/ # Automation
284
+ β”‚ β”œβ”€β”€ install.sh # Fresh install to ~/.claude/
285
+ β”‚ β”œβ”€β”€ init-project.sh # Initialize in project
286
+ β”‚ β”œβ”€β”€ sync.sh # Sync framework updates
287
+ β”‚ └── rollback.sh # Rollback changes
288
+ β”‚
289
+ └── examples/ # Reference implementations
290
+ └── baby-gift-garden/
291
+ ```
292
+
293
+ ---
294
+
295
+ ## 🧠 Core Concepts
296
+
297
+ ### 1. Phase-Gated Workflow
298
+
299
+ Every feature flows through structured phases with human checkpoints:
300
+
301
+ ```
302
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
303
+ β”‚ EXPLORE │───▢│ SPECIFY │───▢│ PLAN │───▢│ TASKS β”‚
304
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
305
+ β”‚ /explore β”‚ β”‚ /spec β”‚ β”‚ /plan β”‚ β”‚ /tasks β”‚
306
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
307
+ β”‚ β”‚ β”‚
308
+ β–Ό β–Ό β–Ό
309
+ [APPROVE] [APPROVE] [IMPLEMENT]
310
+ β”‚ β”‚ β”‚
311
+ β”‚ β”‚ β–Ό
312
+ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
313
+ β”‚ β”‚ β”‚ VERIFY β”‚
314
+ β”‚ β”‚ β”‚ β”‚
315
+ β”‚ β”‚ β”‚/evidence β”‚
316
+ β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
317
+ β”‚ β”‚ β”‚
318
+ β”‚ β”‚ β–Ό
319
+ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
320
+ β”‚ β”‚ β”‚ ARCHIVE β”‚
321
+ β”‚ β”‚ β”‚ β”‚
322
+ β”‚ β”‚ β”‚ Done! β”‚
323
+ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
324
+ ```
325
+
326
+ ### 2. Five-Layer Memory System
327
+
328
+ ```
329
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
330
+ β”‚ MEMORY ARCHITECTURE β”‚
331
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
332
+ β”‚ β”‚
333
+ β”‚ Layer 1: SPECIFICATION MEMORY β”‚
334
+ β”‚ ───────────────────────────── β”‚
335
+ β”‚ Location: .claude/specs/ β”‚
336
+ β”‚ Purpose: What SHOULD be built β”‚
337
+ β”‚ Decay: Archive when feature complete β”‚
338
+ β”‚ β”‚
339
+ β”‚ Layer 2: TASK MEMORY β”‚
340
+ β”‚ ──────────────────── β”‚
341
+ β”‚ Location: Linear (via MCP or CLI) β”‚
342
+ β”‚ Purpose: What needs to be DONE β”‚
343
+ β”‚ Decay: Archive closed >30 days β”‚
344
+ β”‚ β”‚
345
+ β”‚ Layer 3: SESSION MEMORY β”‚
346
+ β”‚ ─────────────────────── β”‚
347
+ β”‚ Location: Claude-Mem observations β”‚
348
+ β”‚ Purpose: What HAPPENED in past sessions β”‚
349
+ β”‚ Decay: Auto-compress to ~500 tokens/observation β”‚
350
+ β”‚ β”‚
351
+ β”‚ Layer 4: HANDOFF MEMORY β”‚
352
+ β”‚ ────────────────────── β”‚
353
+ β”‚ Location: .claude/handoffs/ β”‚
354
+ β”‚ Purpose: Where we LEFT OFF β”‚
355
+ β”‚ Decay: Keep last 5-7, archive older β”‚
356
+ β”‚ β”‚
357
+ β”‚ Layer 5: CONVENTION MEMORY β”‚
358
+ β”‚ ───────────────────────── β”‚
359
+ β”‚ Location: CLAUDE.md + Skills β”‚
360
+ β”‚ Purpose: HOW to build β”‚
361
+ β”‚ Decay: Rarely (evolve instead) β”‚
362
+ β”‚ β”‚
363
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
364
+ ```
365
+
366
+ ### 3. Three-Tier Context Hierarchy
367
+
368
+ ```
369
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
370
+ β”‚ CONTEXT HIERARCHY β”‚
371
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
372
+ β”‚ β”‚
373
+ β”‚ TIER 1: GLOBAL (~/.claude/) β”‚
374
+ β”‚ ─────────────────────────── β”‚
375
+ β”‚ β€’ Personal preferences β”‚
376
+ β”‚ β€’ Universal standards β”‚
377
+ β”‚ β€’ Reusable templates β”‚
378
+ β”‚ Lifetime: Permanent β”‚
379
+ β”‚ β”‚
380
+ β”‚ TIER 2: PROJECT (.claude/) β”‚
381
+ β”‚ ────────────────────────── β”‚
382
+ β”‚ β€’ Project-specific CLAUDE.md β”‚
383
+ β”‚ β€’ Constitution (non-negotiables) β”‚
384
+ β”‚ β€’ Product definition β”‚
385
+ β”‚ Lifetime: Project duration β”‚
386
+ β”‚ β”‚
387
+ β”‚ TIER 3: FEATURE (.claude/specs/) β”‚
388
+ β”‚ ───────────────────────────────── β”‚
389
+ β”‚ β€’ Feature specifications β”‚
390
+ β”‚ β€’ Implementation plans β”‚
391
+ β”‚ β€’ Change proposals β”‚
392
+ β”‚ Lifetime: Feature duration β†’ archive β”‚
393
+ β”‚ β”‚
394
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
395
+ ```
396
+
397
+ ### 4. Quality Gate System
398
+
399
+ ```
400
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
401
+ β”‚ QUALITY GATES β”‚
402
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
403
+ β”‚ β”‚
404
+ β”‚ PRE-WORK GATE (/validate) β”‚
405
+ β”‚ ───────────────────────── β”‚
406
+ β”‚ βœ“ Git status clean β”‚
407
+ β”‚ βœ“ On feature branch (not main) β”‚
408
+ β”‚ βœ“ Dependencies installed (npm ci) β”‚
409
+ β”‚ βœ“ Tests passing (baseline) β”‚
410
+ β”‚ βœ“ Types passing (no errors) β”‚
411
+ β”‚ β”‚
412
+ β”‚ DURING-WORK GATE β”‚
413
+ β”‚ ──────────────── β”‚
414
+ β”‚ βœ“ Read before write (cite files) β”‚
415
+ β”‚ βœ“ Follow conventions (check examples) β”‚
416
+ β”‚ βœ“ File discovered work immediately β”‚
417
+ β”‚ βœ“ Update Linear status β”‚
418
+ β”‚ β”‚
419
+ β”‚ PRE-PR GATE (/evidence) β”‚
420
+ β”‚ ─────────────────────── β”‚
421
+ β”‚ βœ“ Lint passes (full output) β”‚
422
+ β”‚ βœ“ Types pass (full output) β”‚
423
+ β”‚ βœ“ Tests pass (full output) β”‚
424
+ β”‚ βœ“ Only expected files changed β”‚
425
+ β”‚ βœ“ Evidence captured in PR β”‚
426
+ β”‚ β”‚
427
+ β”‚ POST-PR GATE β”‚
428
+ β”‚ ──────────── β”‚
429
+ β”‚ βœ“ CodeRabbit review β”‚
430
+ β”‚ βœ“ Semgrep security scan β”‚
431
+ β”‚ βœ“ Human review β”‚
432
+ β”‚ βœ“ CI pipeline passes β”‚
433
+ β”‚ β”‚
434
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
435
+ ```
436
+
437
+ ---
438
+
439
+ ## πŸ“‹ Command Reference
440
+
441
+ ### Session Commands
442
+
443
+ | Command | Purpose | When to Use |
444
+ |---------|---------|-------------|
445
+ | `/orient` | Session startup orientation | Start of every session |
446
+ | `/ready` | Calculate ready work (no blockers) | Before selecting a task |
447
+ | `/handoff` | Generate session continuity doc | End of every session |
448
+
449
+ ### Workflow Commands
450
+
451
+ | Command | Purpose | When to Use |
452
+ |---------|---------|-------------|
453
+ | `/explore` | Discovery phase | Before any new feature |
454
+ | `/spec` | Generate specification | After exploration approved |
455
+ | `/plan` | Create implementation plan | After spec approved |
456
+ | `/tasks` | Break plan into Linear issues | After plan approved |
457
+ | `/change` | Create brownfield change proposal | Modifying existing features |
458
+
459
+ ### Quality Commands
460
+
461
+ | Command | Purpose | When to Use |
462
+ |---------|---------|-------------|
463
+ | `/validate` | Environment validation | Before any code changes |
464
+ | `/evidence` | Capture quality gate proof | Before creating PR |
465
+ | `/discover` | File discovered work | During implementation |
466
+
467
+ ### Maintenance Commands
468
+
469
+ | Command | Purpose | When to Use |
470
+ |---------|---------|-------------|
471
+ | `/anvil-sync` | Sync framework updates | After pulling framework changes |
472
+ | `/shard` | Break large specs into pieces | When specs exceed 2000 tokens |
473
+ | `/decay-review` | Archive old issues/handoffs | Weekly maintenance |
474
+ | `/weekly-review` | Generate analytics report | Weekly review |
475
+
476
+ ### Power Mode Commands
477
+
478
+ | Command | Purpose | When to Use |
479
+ |---------|---------|-------------|
480
+ | `/ralph start` | Initialize autonomous execution | Large refactoring, overnight runs |
481
+ | `/ralph status` | Check iteration progress | Monitor unattended execution |
482
+ | `/ralph stop` | Gracefully terminate loop | End autonomous session early |
483
+
484
+ > **Note**: Ralph Wiggum mode is a specialized power tool for specific scenarios (large refactoring, framework migrations, TDD with clear specs). It is NOT part of the standard daily workflow. See [When to Use Ralph](#when-to-use-ralph-wiggum-mode) below.
485
+
486
+ ---
487
+
488
+ ## πŸ€– When to Use Ralph Wiggum Mode
489
+
490
+ Ralph Wiggum is a **specialized power tool** for autonomous, long-running AI execution β€” NOT a replacement for the standard workflow.
491
+
492
+ ### Standard Workflow (Daily Use)
493
+ ```
494
+ /orient β†’ /sprint β†’ /validate β†’ [work] β†’ /evidence β†’ /handoff
495
+ ```
496
+
497
+ This remains your **default approach** for all normal development work.
498
+
499
+ ### Ralph Mode (Special Scenarios Only)
500
+
501
+ ```
502
+ /ralph start "Migrate all tests from Jest to Vitest" --max-iterations 50
503
+ ```
504
+
505
+ | Good For | Not Good For |
506
+ |----------|--------------|
507
+ | βœ… Large-scale refactoring with clear completion criteria | ❌ Exploratory work (figuring things out) |
508
+ | βœ… Framework migrations (Jestβ†’Vitest, CJSβ†’ESM) | ❌ Ambiguous requirements |
509
+ | βœ… TDD with clear failing tests to pass | ❌ Security-sensitive code |
510
+ | βœ… Greenfield projects with detailed specs | ❌ Architecture decisions needing judgment |
511
+ | βœ… Test coverage expansion across many files | ❌ Quick fixes (overkill) |
512
+ | βœ… Overnight/unattended execution (8+ hours) | ❌ Interactive debugging |
513
+
514
+ ### Cost Awareness
515
+
516
+ | Scenario | Estimated Cost |
517
+ |----------|----------------|
518
+ | 10 iterations, small codebase | $5-15 |
519
+ | 50 iterations, medium codebase | $50-100+ |
520
+ | 100+ iterations, large codebase | $200+ |
521
+
522
+ **Recommendation**: Start with `--max-iterations 10` to understand costs before running overnight.
523
+
524
+ ### Decision Flowchart
525
+
526
+ ```
527
+ Is this task...
528
+ β”œβ”€β”€ Quick fix or bug? β†’ Standard workflow
529
+ β”œβ”€β”€ Exploratory / unclear? β†’ Standard workflow
530
+ β”œβ”€β”€ Needs human decisions? β†’ Standard workflow
531
+ β”œβ”€β”€ Large with clear spec? β†’ Consider Ralph
532
+ β”œβ”€β”€ Migration / refactoring? β†’ Consider Ralph
533
+ └── Overnight / unattended? β†’ Ralph is ideal
534
+ ```
535
+
536
+ ---
537
+
538
+ ## πŸ”¬ Research Foundation
539
+
540
+ Anvil is built on extensive research across 15+ systems with 200k+ combined GitHub stars:
541
+
542
+ | Source | Key Pattern Extracted |
543
+ |--------|----------------------|
544
+ | **Factory Droid** | 6 structural guardrails (58.8% Terminal-Bench vs 43.2% baseline) |
545
+ | **Beads** (4.2k ⭐) | Task memory patterns, ready work calculation |
546
+ | **BMAD** (25.2k ⭐) | Document sharding, phase gates |
547
+ | **SpecKit** (55.6k ⭐) | Constitution pattern, structured specs |
548
+ | **OpenSpec** (12k ⭐) | Brownfield change tracking, Gherkin scenarios |
549
+ | **Agent OS** (2.7k ⭐) | Three-tier context hierarchy |
550
+ | **Claude-Mem** | Session compression, semantic search |
551
+ | **Prompt Coach** | Prompt analytics, time-lost calculations |
552
+
553
+ ### Key Research Findings
554
+
555
+ 1. **Agent design matters more than model choice** β€” Droid achieved 58.8% vs Claude Code's 43.2% on Terminal-Bench using the same model
556
+ 2. **Single agent with skills beats multi-agent** β€” Coordination overhead typically 40-60% of cycles
557
+ 3. **Phase gates prevent disasters** β€” Universal across all production systems studied
558
+ 4. **Identity claims hurt performance** β€” "Idiot" persona outperformed "Genius" by 2.2% on MMLU
559
+
560
+ See [docs/research/v5-research-report.md](docs/research/v5-research-report.md) for the complete analysis.
561
+
562
+ ---
563
+
564
+ ## πŸ’° Cost Structure
565
+
566
+ | Component | Cost | Purpose |
567
+ |-----------|------|---------|
568
+ | Claude Code Max | $200/mo | AI coding assistant |
569
+ | CodeRabbit | $25/mo | AI code review |
570
+ | Semgrep OSS | Free | Security scanning |
571
+ | Trivy | Free | Vulnerability scanning |
572
+ | Gitleaks | Free | Secrets detection |
573
+ | Pre-commit | Free | Git hooks |
574
+ | **Total** | **$225/mo** | |
575
+
576
+ ---
577
+
578
+ ## πŸ“ˆ Success Metrics
579
+
580
+ ### Leading Indicators (Weekly)
581
+
582
+ | Metric | Target |
583
+ |--------|--------|
584
+ | Orientation time | < 2 minutes |
585
+ | Ready work accuracy | > 95% |
586
+ | Phase gate compliance | 100% |
587
+ | Handoff coverage | 100% |
588
+
589
+ ### Lagging Indicators (Monthly)
590
+
591
+ | Metric | Target |
592
+ |--------|--------|
593
+ | First-pass PR approval | > 70% |
594
+ | Clarification rate | < 15% |
595
+ | Security findings per PR | < 2 high |
596
+ | Discovery completion | > 80% within 2 weeks |
597
+
598
+ ---
599
+
600
+ ## πŸ—ΊοΈ Roadmap
601
+
602
+ ### Versioning Strategy
603
+
604
+ Anvil uses **four-part versioning**: `MILESTONE.MAJOR.MINOR.PATCH`
605
+
606
+ | Component | Meaning |
607
+ |-----------|---------|
608
+ | **MILESTONE** | 0 = Alpha (pre-1.0), 1 = Production-ready |
609
+ | **MAJOR** | Significant feature sets or breaking changes |
610
+ | **MINOR** | New features |
611
+ | **PATCH** | Bug fixes |
612
+
613
+ ---
614
+
615
+ ### Road to 1.0.0.0 (Production-Ready)
616
+
617
+ | Requirement | Status | Notes |
618
+ |-------------|--------|-------|
619
+ | HUD/TUI fully implemented | βœ… Complete | Multi-agent terminal dashboard with 6 panels |
620
+ | External user testing | ⏳ Not Started | Beta testers outside core team |
621
+ | One-command installation | βœ… Complete | `anvil init` with templates |
622
+ | All core commands documented | βœ… Complete | 13 commands with examples |
623
+ | No known critical bugs | πŸ”„ Ongoing | Continuous improvement |
624
+ | Cross-platform testing | ⏳ Not Started | macOS, Linux, WSL |
625
+ | Monetization/licensing defined | ⏳ Not Started | Pricing and distribution model |
626
+
627
+ ---
628
+
629
+ ### In Progress (v0.1.5.0)
630
+ - [x] HUD v2 Multi-Agent Command Center (ANV-78)
631
+ - [x] HUD Kanban Panel (ANV-76)
632
+ - [x] Provider Pattern for issue tracking (Linear + Local)
633
+ - [x] Local JSON issue tracker for non-Linear users
634
+ - [x] Cost Tracker, Context Health, Task Status panels
635
+ - [x] Quality Gates, Coordination panels
636
+ - [x] GitHub/CI and CodeRabbit integration
637
+ - [x] HUD Configuration system
638
+ - [x] Documentation for Local Issue Tracking System (ANV-109)
639
+ - [ ] Unified `/orient`, `/sprint`, `/ready` commands
640
+
641
+ ### Completed Milestones
642
+
643
+ #### v0.1.4.0 (Current)
644
+ - [x] Statusline configuration (full/minimal/off variants)
645
+ - [x] `/release` command for version coordination
646
+ - [x] Enhanced `/evidence` and `/handoff` commands
647
+ - [x] Code review config integration
648
+
649
+ #### v0.1.3.0
650
+ - [x] Framework Healthcheck System (ANV-17)
651
+
652
+ #### v0.1.2.0
653
+ - [x] Use-case based templates (`saas`, `api-python`, `generic`)
654
+ - [x] Next.js + Supabase + Vercel template
655
+ - [x] FastAPI + PostgreSQL + pytest template
656
+
657
+ #### v0.1.1.0
658
+ - [x] CLI tool (`anvil init` command)
659
+ - [x] Project initialization with templates
660
+ - [x] Granular hook control (`--no-tts`, `--no-memory`)
661
+ - [x] Linear sub-issue support
662
+
663
+ #### v0.1.0.0
664
+ - [x] Core framework structure
665
+ - [x] Phase-gated workflow commands
666
+ - [x] Memory system architecture
667
+ - [x] Quality gate configurations
668
+ - [x] Documentation
669
+
670
+ ---
671
+
672
+ ### Future (Post-1.0)
673
+ - [ ] Additional templates (mobile, Rails, Go)
674
+ - [ ] VS Code extension
675
+ - [ ] Dashboard for metrics
676
+ - [ ] Team collaboration features
677
+
678
+ ---
679
+
680
+ ## πŸ“š Documentation
681
+
682
+ | Document | Description |
683
+ |----------|-------------|
684
+ | [Session Workflow](docs/session-workflow.md) | **START HERE** β€” Daily coding workflow |
685
+ | [Local Issue Tracking](docs/local-issues.md) | File-based issues without Linear |
686
+ | [Sync Guide](docs/sync.md) | Keep projects updated with framework changes |
687
+ | [Installation Guide](docs/INSTALLATION.md) | Initial framework setup |
688
+ | [Implementation Guide](docs/implementation-guide.md) | How to set up Anvil |
689
+ | [Command Reference](docs/command-reference.md) | All commands detailed |
690
+ | [Planning Responsibilities](docs/planning-responsibilities.md) | Who decides what |
691
+ | [Simplification Principles](docs/simplification-principles.md) | Framework simplicity guidance |
692
+ | [Simplification Plan Template](docs/simplification-plan-template.md) | Audit and simplify checklist |
693
+ | [Research Report](docs/research/v5-research-report.md) | Full research analysis |
694
+ | [Pattern Catalog](docs/patterns/) | Pattern explanations |
695
+
696
+ ---
697
+
698
+ ## βš–οΈ License
699
+
700
+ **Proprietary** β€” All rights reserved.
701
+
702
+ This framework is not open source. Contact for licensing inquiries.
703
+
704
+ ---
705
+
706
+ ## 🀝 Contact
707
+
708
+ For licensing, questions, or collaboration:
709
+
710
+ - **Author**: Alex Cahiz
711
+ - **Project**: Anvil Development Framework
712
+
713
+ ---
714
+
715
+ ```
716
+ ══════════════════════════════════════════════════════════
717
+ Built with πŸ”₯ for developers who refuse to compromise.
718
+ ══════════════════════════════════════════════════════════
719
+ ```