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.
- package/README.md +719 -0
- package/VERSION +1 -0
- package/docs/ANVIL-REPO-IMPLEMENTATION-PLAN.md +441 -0
- package/docs/FIRST-SKILL-TUTORIAL.md +408 -0
- package/docs/INSTALLATION-RETRO-NOTES.md +458 -0
- package/docs/INSTALLATION.md +984 -0
- package/docs/anvil-hud.md +469 -0
- package/docs/anvil-init.md +255 -0
- package/docs/anvil-state.md +210 -0
- package/docs/boris-cherny-ralph-wiggum-insights.md +608 -0
- package/docs/command-reference.md +2022 -0
- package/docs/hooks-tts.md +368 -0
- package/docs/implementation-guide.md +810 -0
- package/docs/linear-github-integration.md +247 -0
- package/docs/local-issues.md +677 -0
- package/docs/patterns/README.md +419 -0
- package/docs/planning-responsibilities.md +139 -0
- package/docs/session-workflow.md +573 -0
- package/docs/simplification-plan-template.md +297 -0
- package/docs/simplification-principles.md +129 -0
- package/docs/specifications/CCS-RALPH-INTEGRATION-DESIGN.md +633 -0
- package/docs/specifications/CCS-RESEARCH-REPORT.md +169 -0
- package/docs/specifications/PLAN-ANV-verification-ralph-wiggum.md +403 -0
- package/docs/specifications/PLAN-parallel-tracks-anvil-memory-ccs.md +494 -0
- package/docs/specifications/SPEC-ANV-VRW/component-01-verify.md +208 -0
- package/docs/specifications/SPEC-ANV-VRW/component-02-stop-gate.md +226 -0
- package/docs/specifications/SPEC-ANV-VRW/component-03-posttooluse.md +209 -0
- package/docs/specifications/SPEC-ANV-VRW/component-04-ralph-wiggum.md +604 -0
- package/docs/specifications/SPEC-ANV-VRW/component-05-atomic-actions.md +311 -0
- package/docs/specifications/SPEC-ANV-VRW/component-06-verify-subagent.md +264 -0
- package/docs/specifications/SPEC-ANV-VRW/component-07-claude-md.md +363 -0
- package/docs/specifications/SPEC-ANV-VRW/index.md +182 -0
- package/docs/specifications/SPEC-ANV-anvil-memory.md +573 -0
- package/docs/specifications/SPEC-ANV-context-checkpoints.md +781 -0
- package/docs/specifications/SPEC-ANV-verification-ralph-wiggum.md +789 -0
- package/docs/sync.md +122 -0
- package/global/CLAUDE.md +140 -0
- package/global/agents/verify-app.md +164 -0
- package/global/commands/anvil-settings.md +527 -0
- package/global/commands/anvil-sync.md +121 -0
- package/global/commands/change.md +197 -0
- package/global/commands/clarify.md +252 -0
- package/global/commands/cleanup.md +292 -0
- package/global/commands/commit-push-pr.md +207 -0
- package/global/commands/decay-review.md +127 -0
- package/global/commands/discover.md +158 -0
- package/global/commands/doc-coverage.md +122 -0
- package/global/commands/evidence.md +307 -0
- package/global/commands/explore.md +121 -0
- package/global/commands/force-exit.md +135 -0
- package/global/commands/handoff.md +191 -0
- package/global/commands/healthcheck.md +302 -0
- package/global/commands/hud.md +84 -0
- package/global/commands/insights.md +319 -0
- package/global/commands/linear-setup.md +184 -0
- package/global/commands/lint-fix.md +198 -0
- package/global/commands/orient.md +510 -0
- package/global/commands/plan.md +228 -0
- package/global/commands/ralph.md +346 -0
- package/global/commands/ready.md +182 -0
- package/global/commands/release.md +305 -0
- package/global/commands/retro.md +96 -0
- package/global/commands/shard.md +166 -0
- package/global/commands/spec.md +227 -0
- package/global/commands/sprint.md +184 -0
- package/global/commands/tasks.md +228 -0
- package/global/commands/test-and-commit.md +151 -0
- package/global/commands/validate.md +132 -0
- package/global/commands/verify.md +251 -0
- package/global/commands/weekly-review.md +156 -0
- package/global/hooks/__pycache__/ralph_context_monitor.cpython-314.pyc +0 -0
- package/global/hooks/__pycache__/statusline_agent_sync.cpython-314.pyc +0 -0
- package/global/hooks/anvil_memory_observe.ts +322 -0
- package/global/hooks/anvil_memory_session.ts +166 -0
- package/global/hooks/anvil_memory_stop.ts +187 -0
- package/global/hooks/parse_transcript.py +116 -0
- package/global/hooks/post_merge_cleanup.sh +132 -0
- package/global/hooks/post_tool_format.sh +215 -0
- package/global/hooks/ralph_context_monitor.py +240 -0
- package/global/hooks/ralph_stop.sh +502 -0
- package/global/hooks/statusline.sh +1110 -0
- package/global/hooks/statusline_agent_sync.py +224 -0
- package/global/hooks/stop_gate.sh +250 -0
- package/global/lib/.claude/anvil-state.json +21 -0
- package/global/lib/__pycache__/agent_registry.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/claim_service.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/coderabbit_service.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/config_service.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/coordination_service.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/doc_coverage_service.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/gate_logger.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/github_service.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/hygiene_service.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/issue_models.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/issue_provider.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/linear_data_service.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/linear_provider.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/local_provider.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/quality_service.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/ralph_state.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/state_manager.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/transcript_parser.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/verification_runner.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/verify_iteration.cpython-314.pyc +0 -0
- package/global/lib/__pycache__/verify_subagent.cpython-314.pyc +0 -0
- package/global/lib/agent_registry.py +995 -0
- package/global/lib/anvil-state.sh +435 -0
- package/global/lib/claim_service.py +515 -0
- package/global/lib/coderabbit_service.py +314 -0
- package/global/lib/config_service.py +423 -0
- package/global/lib/coordination_service.py +331 -0
- package/global/lib/doc_coverage_service.py +1305 -0
- package/global/lib/gate_logger.py +316 -0
- package/global/lib/github_service.py +310 -0
- package/global/lib/handoff_generator.py +775 -0
- package/global/lib/hygiene_service.py +712 -0
- package/global/lib/issue_models.py +257 -0
- package/global/lib/issue_provider.py +339 -0
- package/global/lib/linear_data_service.py +210 -0
- package/global/lib/linear_provider.py +987 -0
- package/global/lib/linear_provider.py.backup +671 -0
- package/global/lib/local_provider.py +486 -0
- package/global/lib/orient_fast.py +457 -0
- package/global/lib/quality_service.py +470 -0
- package/global/lib/ralph_prompt_generator.py +563 -0
- package/global/lib/ralph_state.py +1202 -0
- package/global/lib/state_manager.py +417 -0
- package/global/lib/transcript_parser.py +597 -0
- package/global/lib/verification_runner.py +557 -0
- package/global/lib/verify_iteration.py +490 -0
- package/global/lib/verify_subagent.py +250 -0
- package/global/skills/README.md +155 -0
- package/global/skills/quality-gates/SKILL.md +252 -0
- package/global/skills/skill-template/SKILL.md +109 -0
- package/global/skills/testing-strategies/SKILL.md +337 -0
- package/global/templates/CHANGE-template.md +105 -0
- package/global/templates/HANDOFF-template.md +63 -0
- package/global/templates/PLAN-template.md +111 -0
- package/global/templates/SPEC-template.md +93 -0
- package/global/templates/ralph/PROMPT.md.template +89 -0
- package/global/templates/ralph/fix_plan.md.template +31 -0
- package/global/templates/ralph/progress.txt.template +23 -0
- package/global/tests/__pycache__/test_doc_coverage.cpython-314.pyc +0 -0
- package/global/tests/test_doc_coverage.py +520 -0
- package/global/tests/test_issue_models.py +299 -0
- package/global/tests/test_local_provider.py +323 -0
- package/global/tools/README.md +178 -0
- package/global/tools/__pycache__/anvil-hud.cpython-314.pyc +0 -0
- package/global/tools/anvil-hud.py +3622 -0
- package/global/tools/anvil-hud.py.bak +3318 -0
- package/global/tools/anvil-issue.py +432 -0
- package/global/tools/anvil-memory/CLAUDE.md +49 -0
- package/global/tools/anvil-memory/README.md +42 -0
- package/global/tools/anvil-memory/bun.lock +25 -0
- package/global/tools/anvil-memory/bunfig.toml +9 -0
- package/global/tools/anvil-memory/package.json +23 -0
- package/global/tools/anvil-memory/src/__tests__/ccs/context-monitor.test.ts +535 -0
- package/global/tools/anvil-memory/src/__tests__/ccs/edge-cases.test.ts +645 -0
- package/global/tools/anvil-memory/src/__tests__/ccs/fixtures.ts +363 -0
- package/global/tools/anvil-memory/src/__tests__/ccs/index.ts +8 -0
- package/global/tools/anvil-memory/src/__tests__/ccs/integration.test.ts +417 -0
- package/global/tools/anvil-memory/src/__tests__/ccs/prompt-generator.test.ts +571 -0
- package/global/tools/anvil-memory/src/__tests__/ccs/ralph-stop.test.ts +440 -0
- package/global/tools/anvil-memory/src/__tests__/ccs/test-utils.ts +252 -0
- package/global/tools/anvil-memory/src/__tests__/commands.test.ts +657 -0
- package/global/tools/anvil-memory/src/__tests__/db.test.ts +641 -0
- package/global/tools/anvil-memory/src/__tests__/hooks.test.ts +272 -0
- package/global/tools/anvil-memory/src/__tests__/performance.test.ts +427 -0
- package/global/tools/anvil-memory/src/__tests__/test-utils.ts +113 -0
- package/global/tools/anvil-memory/src/commands/checkpoint.ts +197 -0
- package/global/tools/anvil-memory/src/commands/get.ts +115 -0
- package/global/tools/anvil-memory/src/commands/init.ts +94 -0
- package/global/tools/anvil-memory/src/commands/observe.ts +163 -0
- package/global/tools/anvil-memory/src/commands/search.ts +112 -0
- package/global/tools/anvil-memory/src/db.ts +638 -0
- package/global/tools/anvil-memory/src/index.ts +205 -0
- package/global/tools/anvil-memory/src/types.ts +122 -0
- package/global/tools/anvil-memory/tsconfig.json +29 -0
- package/global/tools/ralph-loop.sh +359 -0
- package/package.json +45 -0
- package/scripts/anvil +822 -0
- package/scripts/extract_patterns.py +222 -0
- package/scripts/init-project.sh +541 -0
- package/scripts/install.sh +229 -0
- package/scripts/postinstall.js +41 -0
- package/scripts/rollback.sh +188 -0
- package/scripts/sync.sh +623 -0
- package/scripts/test-statusline.sh +248 -0
- package/scripts/update_claude_md.py +224 -0
- package/scripts/verify.sh +255 -0
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
# Anvil Session Workflow
|
|
2
|
+
|
|
3
|
+
> What to do from the moment you start coding to when you stop.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Quick Reference](#quick-reference)
|
|
10
|
+
- [Step-by-Step](#step-by-step)
|
|
11
|
+
- [1. Start Your Session](#1-start-your-session-2-min)
|
|
12
|
+
- [2. Pick What to Work On](#2-pick-what-to-work-on-1-min)
|
|
13
|
+
- [3. Validate Environment](#3-validate-environment-30-sec)
|
|
14
|
+
- [4. Do the Work](#4-do-the-work)
|
|
15
|
+
- [5. During Work](#5-during-work)
|
|
16
|
+
- [6. Before Creating PR](#6-before-creating-pr-1-min)
|
|
17
|
+
- [7. End Your Session](#7-end-your-session-2-min)
|
|
18
|
+
- [Common Scenarios](#common-scenarios)
|
|
19
|
+
- [What NOT to Do](#what-not-to-do)
|
|
20
|
+
- [Time Budget](#time-budget)
|
|
21
|
+
- [Commands Reference](#commands-reference)
|
|
22
|
+
- [Session Commands](#session-commands)
|
|
23
|
+
- [Workflow Commands](#workflow-commands)
|
|
24
|
+
- [Quality Commands](#quality-commands)
|
|
25
|
+
- [Multi-Agent Commands](#multi-agent-commands)
|
|
26
|
+
- [Maintenance Commands](#maintenance-commands)
|
|
27
|
+
- [Power Mode Commands (Ralph Wiggum)](#power-mode-commands-ralph-wiggum)
|
|
28
|
+
- [Setup Commands](#setup-commands)
|
|
29
|
+
- [Issue Providers](#issue-providers)
|
|
30
|
+
- [Ralph Wiggum Mode (Special Scenarios)](#ralph-wiggum-mode-special-scenarios)
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Quick Reference
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
START SESSION
|
|
38
|
+
│
|
|
39
|
+
▼
|
|
40
|
+
/orient ──────────────► Check handoffs, git state, in-progress work
|
|
41
|
+
│
|
|
42
|
+
▼
|
|
43
|
+
/ready ───────────────► See unblocked issues from your team
|
|
44
|
+
│
|
|
45
|
+
▼
|
|
46
|
+
/sprint ──────────────► Decide what to work on (await selection)
|
|
47
|
+
│
|
|
48
|
+
▼
|
|
49
|
+
/validate ────────────► Verify environment is clean before changes
|
|
50
|
+
│
|
|
51
|
+
▼
|
|
52
|
+
┌───────────────────────────────────────────────────────────────┐
|
|
53
|
+
│ DO THE WORK │
|
|
54
|
+
│ │
|
|
55
|
+
│ New Feature? Brownfield? Quick Task? │
|
|
56
|
+
│ ───────────── ──────────── ──────────── │
|
|
57
|
+
│ /explore first /change first Just do it │
|
|
58
|
+
│ /spec if complex Light proposal │
|
|
59
|
+
│ /plan if multi-day │
|
|
60
|
+
│ /shard if large spec │
|
|
61
|
+
│ /tasks for Linear │
|
|
62
|
+
│ │
|
|
63
|
+
│ DURING WORK: │
|
|
64
|
+
│ • Read existing code before writing │
|
|
65
|
+
│ • /discover if you find unrelated issues │
|
|
66
|
+
│ • Stop if stuck >5 min, ask for help │
|
|
67
|
+
│ │
|
|
68
|
+
└───────────────────────────────────────────────────────────────┘
|
|
69
|
+
│
|
|
70
|
+
▼
|
|
71
|
+
/evidence ────────────► Run tests, lint, typecheck — capture proof
|
|
72
|
+
│
|
|
73
|
+
▼
|
|
74
|
+
Create PR ────────────► Include evidence in PR description
|
|
75
|
+
│
|
|
76
|
+
▼
|
|
77
|
+
/handoff ─────────────► Document where you left off
|
|
78
|
+
│
|
|
79
|
+
▼
|
|
80
|
+
END SESSION
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Step-by-Step
|
|
86
|
+
|
|
87
|
+
### 1. Start Your Session (2 min)
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
You: /orient
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Claude will:
|
|
94
|
+
- Check for recent handoff (what you did last time)
|
|
95
|
+
- Show git state (branch, uncommitted changes)
|
|
96
|
+
- List in-progress work from Linear
|
|
97
|
+
- Show ready work (unblocked tasks)
|
|
98
|
+
|
|
99
|
+
**Wait for this info before doing anything.**
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### 2. Pick What to Work On (1 min)
|
|
104
|
+
|
|
105
|
+
**Option A: Just see what's available**
|
|
106
|
+
```
|
|
107
|
+
You: /ready
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Claude shows unblocked Todo/Backlog issues from your configured team, sorted by priority. Includes agent conflict detection for multi-agent environments (warns if another agent is working on an issue).
|
|
111
|
+
|
|
112
|
+
**Option B: Get prioritization help (recommended)**
|
|
113
|
+
```
|
|
114
|
+
You: /sprint
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Claude applies `/ready`'s logic internally, then adds:
|
|
118
|
+
- In Progress, In Review, and Blocked issues for full context
|
|
119
|
+
- Top 3 recommendations with reasoning
|
|
120
|
+
- Agent conflict awareness (prefers available issues in recommendations)
|
|
121
|
+
|
|
122
|
+
**Priority heuristics**:
|
|
123
|
+
1. Things blocking other work (unblock them = high value)
|
|
124
|
+
2. PRs with feedback (quick to finish)
|
|
125
|
+
3. In-progress work (momentum)
|
|
126
|
+
4. High priority ready work (P0/P1) — available over conflicting
|
|
127
|
+
|
|
128
|
+
**You decide.** Tell Claude: "Let's work on ENG-123"
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### 3. Validate Environment (30 sec)
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
You: /validate
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Claude checks:
|
|
139
|
+
- Git status clean? (no uncommitted changes)
|
|
140
|
+
- On feature branch? (not main)
|
|
141
|
+
- Tests passing?
|
|
142
|
+
- Types passing?
|
|
143
|
+
|
|
144
|
+
**If anything fails → fix it before proceeding.**
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
### 4. Do the Work
|
|
149
|
+
|
|
150
|
+
#### For New Features:
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
You: /explore
|
|
154
|
+
```
|
|
155
|
+
Claude investigates existing code, patterns, related files.
|
|
156
|
+
**Wait for exploration report before writing code.**
|
|
157
|
+
|
|
158
|
+
If it's complex (multi-day, unclear):
|
|
159
|
+
```
|
|
160
|
+
You: /spec
|
|
161
|
+
```
|
|
162
|
+
Claude creates formal specification. You approve before continuing.
|
|
163
|
+
|
|
164
|
+
If the spec is large (>500 lines):
|
|
165
|
+
```
|
|
166
|
+
You: /shard
|
|
167
|
+
```
|
|
168
|
+
Claude breaks spec into focused, independent pieces for parallel work.
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
You: /plan
|
|
172
|
+
```
|
|
173
|
+
Claude breaks it into phases. You approve before continuing.
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
You: /tasks
|
|
177
|
+
```
|
|
178
|
+
Claude creates Linear **sub-issues** from the plan, nested under the parent feature issue.
|
|
179
|
+
|
|
180
|
+
Then implement.
|
|
181
|
+
|
|
182
|
+
#### For Brownfield Changes (modifying existing features):
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
You: /change
|
|
186
|
+
```
|
|
187
|
+
Claude creates a lightweight change proposal analyzing impact on existing code.
|
|
188
|
+
|
|
189
|
+
Then implement.
|
|
190
|
+
|
|
191
|
+
#### For Bug Fixes:
|
|
192
|
+
|
|
193
|
+
1. Reproduce the bug
|
|
194
|
+
2. Diagnose (check logs, add debugging)
|
|
195
|
+
3. Fix
|
|
196
|
+
4. Test the fix
|
|
197
|
+
5. Verify related code isn't affected
|
|
198
|
+
|
|
199
|
+
#### For Quick Tasks:
|
|
200
|
+
|
|
201
|
+
Just do it. Not everything needs ceremony.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
### 5. During Work
|
|
206
|
+
|
|
207
|
+
**Always:**
|
|
208
|
+
- Read existing code before writing new code
|
|
209
|
+
- Follow patterns you see in the codebase
|
|
210
|
+
- Check `.claude/examples/` for conventions
|
|
211
|
+
|
|
212
|
+
**If you find unrelated issues:**
|
|
213
|
+
```
|
|
214
|
+
You: /discover [brief title]
|
|
215
|
+
```
|
|
216
|
+
Claude files a Linear issue immediately. Stay focused on current task.
|
|
217
|
+
|
|
218
|
+
**If stuck more than 5 minutes:**
|
|
219
|
+
Stop. Explain what you've tried. Ask for guidance.
|
|
220
|
+
|
|
221
|
+
**Confidence check:**
|
|
222
|
+
- 8-10: Proceed
|
|
223
|
+
- 5-7: Note your uncertainty, proceed carefully
|
|
224
|
+
- 1-4: **STOP.** Ask for help.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
### 6. Before Creating PR (1 min)
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
You: /evidence
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Claude runs and captures output of:
|
|
235
|
+
- Lint
|
|
236
|
+
- Type check
|
|
237
|
+
- Tests
|
|
238
|
+
- Git status (files changed)
|
|
239
|
+
- Code review (if enabled via `/anvil-settings`)
|
|
240
|
+
|
|
241
|
+
Copy this evidence into your PR description.
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
### 7. End Your Session (2 min)
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
You: /handoff
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Claude creates a handoff document with:
|
|
252
|
+
- What you completed
|
|
253
|
+
- What's in progress
|
|
254
|
+
- What to do next
|
|
255
|
+
- Important context
|
|
256
|
+
|
|
257
|
+
**This is how future-you (or Claude) knows where you left off.**
|
|
258
|
+
|
|
259
|
+
Optional session analysis:
|
|
260
|
+
```
|
|
261
|
+
You: /healthcheck
|
|
262
|
+
```
|
|
263
|
+
Claude analyzes your session for hook failures, tool errors, and framework issues.
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Common Scenarios
|
|
268
|
+
|
|
269
|
+
### "I just want to fix a small bug"
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
/orient → See context
|
|
273
|
+
/validate → Check environment
|
|
274
|
+
[fix the bug]
|
|
275
|
+
[run tests]
|
|
276
|
+
/evidence → Capture proof
|
|
277
|
+
[create PR]
|
|
278
|
+
/handoff → Document
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### "I'm starting a new feature"
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
/orient → See context
|
|
285
|
+
/ready → See unblocked work
|
|
286
|
+
/sprint → Pick task
|
|
287
|
+
/validate → Check environment
|
|
288
|
+
/explore → Investigate first
|
|
289
|
+
/spec → Write specification (if complex)
|
|
290
|
+
/shard → Break into pieces (if spec is large)
|
|
291
|
+
/plan → Break into phases
|
|
292
|
+
/tasks → Create Linear issues
|
|
293
|
+
[implement]
|
|
294
|
+
/evidence → Capture proof
|
|
295
|
+
[create PR]
|
|
296
|
+
/handoff → Document
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### "I'm modifying existing code"
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
/orient → See context
|
|
303
|
+
/sprint → Confirm priority
|
|
304
|
+
/validate → Check environment
|
|
305
|
+
/change → Create change proposal
|
|
306
|
+
[implement]
|
|
307
|
+
/evidence → Capture proof
|
|
308
|
+
[create PR]
|
|
309
|
+
/handoff → Document
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### "I'm continuing from yesterday"
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
/orient → Read yesterday's handoff
|
|
316
|
+
/sprint → Confirm priority (or continue)
|
|
317
|
+
/validate → Check environment
|
|
318
|
+
[continue work]
|
|
319
|
+
/evidence → When done
|
|
320
|
+
/handoff → End of day
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### "I found a bug while working on something else"
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
/discover Fix login redirect on mobile
|
|
327
|
+
```
|
|
328
|
+
Then keep working on your original task.
|
|
329
|
+
|
|
330
|
+
### "I'm running multiple Claude agents"
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
/hud → Launch dashboard in separate terminal
|
|
334
|
+
```
|
|
335
|
+
Monitor all agents' context, cost, and work in real-time.
|
|
336
|
+
|
|
337
|
+
### "It's Friday / end of sprint"
|
|
338
|
+
|
|
339
|
+
```
|
|
340
|
+
/weekly-review → Generate analytics and recommendations
|
|
341
|
+
/decay-review → Archive old issues/specs
|
|
342
|
+
/release → Version and tag (if releasing)
|
|
343
|
+
/insights → Synthesize learnings from retros
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### "I want to run Claude overnight" (Ralph Wiggum Mode)
|
|
347
|
+
|
|
348
|
+
> **Important**: Ralph is a specialized power tool for specific scenarios, NOT a replacement for the standard workflow. See [When to Use Ralph](#ralph-wiggum-mode-special-scenarios) below.
|
|
349
|
+
|
|
350
|
+
```
|
|
351
|
+
/ralph start "Migrate all tests from Jest to Vitest" --max-iterations 50
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Claude will:
|
|
355
|
+
1. Break task into atomic TODO items
|
|
356
|
+
2. Create PROMPT.md, fix_plan.md, progress.txt
|
|
357
|
+
3. Start autonomous loop
|
|
358
|
+
4. Execute ONE item per iteration
|
|
359
|
+
5. Update progress.txt each iteration
|
|
360
|
+
6. Stop when complete or circuit breaker triggers
|
|
361
|
+
|
|
362
|
+
Monitor progress:
|
|
363
|
+
```
|
|
364
|
+
/ralph status → See current iteration and progress
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Stop early:
|
|
368
|
+
```
|
|
369
|
+
/ralph stop → Gracefully terminate with summary
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## What NOT to Do
|
|
375
|
+
|
|
376
|
+
| Don't | Instead |
|
|
377
|
+
|-------|---------|
|
|
378
|
+
| Start coding immediately | Run `/orient` first |
|
|
379
|
+
| Work on main branch | Create feature branch |
|
|
380
|
+
| Skip `/validate` | Always validate before changes |
|
|
381
|
+
| Write code before reading existing code | Explore first |
|
|
382
|
+
| Try to fix everything you find | `/discover` and stay focused |
|
|
383
|
+
| End session without handoff | Always `/handoff` |
|
|
384
|
+
| Push without evidence | Always `/evidence` first |
|
|
385
|
+
| Query wrong issue source | Run `/linear-setup` or use local issues |
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## Time Budget
|
|
390
|
+
|
|
391
|
+
| Activity | Time |
|
|
392
|
+
|----------|------|
|
|
393
|
+
| /orient (fast-path) | ~1 sec |
|
|
394
|
+
| /ready + /sprint | 1-2 min |
|
|
395
|
+
| /validate | 30 sec |
|
|
396
|
+
| /explore (if needed) | 5-10 min |
|
|
397
|
+
| Actual work | Most of your time |
|
|
398
|
+
| /evidence | 1 min |
|
|
399
|
+
| /handoff | 2 min |
|
|
400
|
+
|
|
401
|
+
**Overhead: ~5-10 minutes per session** for dramatically better continuity and quality.
|
|
402
|
+
|
|
403
|
+
> **Tip**: Run `python3 global/lib/orient_fast.py` for 10-20x faster orientation startup.
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## Commands Reference
|
|
408
|
+
|
|
409
|
+
### Session Commands
|
|
410
|
+
|
|
411
|
+
| Command | When | What It Does |
|
|
412
|
+
|---------|------|--------------|
|
|
413
|
+
| `/orient` | Session start | Shows context, handoffs, git state, ready work |
|
|
414
|
+
| `/ready` | After orient | Shows unblocked issues sorted by priority |
|
|
415
|
+
| `/sprint` | After ready | Suggests top priorities for the session |
|
|
416
|
+
| `/validate` | Before any code | Checks environment is clean |
|
|
417
|
+
| `/handoff` | Session end | Documents state for next time |
|
|
418
|
+
|
|
419
|
+
### Workflow Commands
|
|
420
|
+
|
|
421
|
+
| Command | When | What It Does |
|
|
422
|
+
|---------|------|--------------|
|
|
423
|
+
| `/explore` | New features | Discovery and investigation |
|
|
424
|
+
| `/spec` | Complex features | Creates formal specification |
|
|
425
|
+
| `/shard` | Large specs | Breaks spec into focused pieces |
|
|
426
|
+
| `/plan` | After spec | Creates implementation phases |
|
|
427
|
+
| `/tasks` | After plan | Creates Linear sub-issues |
|
|
428
|
+
| `/change` | Brownfield work | Lightweight change proposal |
|
|
429
|
+
| `/discover` | Find unrelated issue | Files it immediately in Linear |
|
|
430
|
+
|
|
431
|
+
### Quality Commands
|
|
432
|
+
|
|
433
|
+
| Command | When | What It Does |
|
|
434
|
+
|---------|------|--------------|
|
|
435
|
+
| `/evidence` | Before PR | Captures lint, types, tests, git status |
|
|
436
|
+
| `/healthcheck` | Session end | Analyzes session for issues |
|
|
437
|
+
| `/retro` | After completion | Captures learnings |
|
|
438
|
+
|
|
439
|
+
### Multi-Agent Commands
|
|
440
|
+
|
|
441
|
+
| Command | When | What It Does |
|
|
442
|
+
|---------|------|--------------|
|
|
443
|
+
| `/hud` | Multi-agent work | Launches terminal dashboard |
|
|
444
|
+
|
|
445
|
+
### Maintenance Commands
|
|
446
|
+
|
|
447
|
+
| Command | When | What It Does |
|
|
448
|
+
|---------|------|--------------|
|
|
449
|
+
| `/release` | End of sprint | Versions changelog, creates git tag |
|
|
450
|
+
| `/weekly-review` | Friday | Generates analytics and recommendations |
|
|
451
|
+
| `/decay-review` | Weekly | Archives old issues, specs, handoffs |
|
|
452
|
+
| `/insights` | Weekly | Synthesizes patterns from retros |
|
|
453
|
+
|
|
454
|
+
### Power Mode Commands (Ralph Wiggum)
|
|
455
|
+
|
|
456
|
+
| Command | When | What It Does |
|
|
457
|
+
|---------|------|--------------|
|
|
458
|
+
| `/ralph start` | Large refactoring, overnight runs | Initializes autonomous execution loop |
|
|
459
|
+
| `/ralph status` | During autonomous execution | Shows iteration count and progress |
|
|
460
|
+
| `/ralph stop` | Early termination | Gracefully stops with summary |
|
|
461
|
+
|
|
462
|
+
> **Note**: Ralph is a specialized tool for specific scenarios. See [Ralph Wiggum Mode](#ralph-wiggum-mode-special-scenarios).
|
|
463
|
+
|
|
464
|
+
### Setup Commands
|
|
465
|
+
|
|
466
|
+
| Command | When | What It Does |
|
|
467
|
+
|---------|------|--------------|
|
|
468
|
+
| `/linear-setup` | First use | Configures Linear team for project |
|
|
469
|
+
| `/anvil-settings` | Configuration | Manages framework settings |
|
|
470
|
+
| `/anvil-sync` | Updates | Syncs framework updates to project |
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
## Issue Providers
|
|
475
|
+
|
|
476
|
+
Anvil supports two issue tracking providers that work interchangeably with all workflow commands.
|
|
477
|
+
|
|
478
|
+
### Automatic Provider Detection
|
|
479
|
+
|
|
480
|
+
Anvil automatically selects the issue provider based on your project configuration:
|
|
481
|
+
|
|
482
|
+
| Configuration | Provider | Storage |
|
|
483
|
+
|---------------|----------|---------|
|
|
484
|
+
| `.claude/linear.yaml` exists | Linear | Linear API |
|
|
485
|
+
| No Linear config | Local | `~/.anvil/issues/index.json` |
|
|
486
|
+
|
|
487
|
+
### Linear Integration
|
|
488
|
+
|
|
489
|
+
For teams using Linear:
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
/linear-setup # Configure team and project
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
Once configured, all commands (`/orient`, `/ready`, `/sprint`, `/tasks`, `/discover`) query and create issues in Linear.
|
|
496
|
+
|
|
497
|
+
### Local Issues
|
|
498
|
+
|
|
499
|
+
For offline work, personal projects, or teams without Linear:
|
|
500
|
+
|
|
501
|
+
```bash
|
|
502
|
+
anvil-issue create --title "Add feature X" # Create issue
|
|
503
|
+
anvil-issue list --status todo # View issues
|
|
504
|
+
anvil-issue move LOCAL-001 --to in-progress # Update status
|
|
505
|
+
anvil-issue ready # See prioritized work
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
All workflow commands work identically with local issues:
|
|
509
|
+
- `/orient` shows local issues in "Ready Work" section
|
|
510
|
+
- `/ready` calculates ready work from local storage
|
|
511
|
+
- `/sprint` prioritizes local issues
|
|
512
|
+
- `/tasks` creates local issues from plans
|
|
513
|
+
- `/discover` files discoveries as local issues
|
|
514
|
+
|
|
515
|
+
### Switching Providers
|
|
516
|
+
|
|
517
|
+
**To use Linear**: Run `/linear-setup` to create `.claude/linear.yaml`
|
|
518
|
+
|
|
519
|
+
**To use Local**: Remove or rename `.claude/linear.yaml`
|
|
520
|
+
|
|
521
|
+
**See Also**: [Local Issue Tracking Guide](local-issues.md) | [Command Reference](command-reference.md#local-issue-cli)
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## Ralph Wiggum Mode (Special Scenarios)
|
|
526
|
+
|
|
527
|
+
Ralph Wiggum is a **specialized power tool** for autonomous, long-running AI execution. It is NOT part of the standard daily workflow.
|
|
528
|
+
|
|
529
|
+
### When to Use Ralph
|
|
530
|
+
|
|
531
|
+
| Good For | Not Good For |
|
|
532
|
+
|----------|--------------|
|
|
533
|
+
| ✅ Large-scale refactoring with clear completion criteria | ❌ Exploratory work |
|
|
534
|
+
| ✅ Framework migrations (Jest→Vitest, CJS→ESM) | ❌ Ambiguous requirements |
|
|
535
|
+
| ✅ TDD with clear failing tests to pass | ❌ Security-sensitive code |
|
|
536
|
+
| ✅ Greenfield projects with detailed specs | ❌ Architecture decisions |
|
|
537
|
+
| ✅ Test coverage expansion | ❌ Quick fixes (overkill) |
|
|
538
|
+
| ✅ Overnight/unattended execution | ❌ Interactive debugging |
|
|
539
|
+
|
|
540
|
+
### Cost Awareness
|
|
541
|
+
|
|
542
|
+
| Scenario | Estimated Cost |
|
|
543
|
+
|----------|----------------|
|
|
544
|
+
| 10 iterations, small codebase | $5-15 |
|
|
545
|
+
| 50 iterations, medium codebase | $50-100+ |
|
|
546
|
+
| 100+ iterations, large codebase | $200+ |
|
|
547
|
+
|
|
548
|
+
**Start small**: Use `--max-iterations 10` to understand costs before overnight runs.
|
|
549
|
+
|
|
550
|
+
### Decision Guide
|
|
551
|
+
|
|
552
|
+
```
|
|
553
|
+
Is this task...
|
|
554
|
+
├── Quick fix or bug? → Use standard workflow
|
|
555
|
+
├── Exploratory / unclear? → Use standard workflow
|
|
556
|
+
├── Needs human decisions? → Use standard workflow
|
|
557
|
+
├── Large with clear spec? → Consider Ralph
|
|
558
|
+
├── Migration / refactoring? → Consider Ralph
|
|
559
|
+
└── Overnight / unattended? → Ralph is ideal
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
### Safety Features
|
|
563
|
+
|
|
564
|
+
Ralph includes automatic circuit breakers:
|
|
565
|
+
- **No-change detection**: Stops after 3 iterations with no file changes
|
|
566
|
+
- **Error detection**: Stops after 5 repeated identical errors
|
|
567
|
+
- **Max iterations**: Configurable limit (default: 50)
|
|
568
|
+
- **Fatal signal**: Immediate stop on `<fatal>...</fatal>` output
|
|
569
|
+
- **Git checkpoints**: Auto-commits before each restart
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
*Print this. Keep it next to your keyboard. After a week, you won't need it.*
|