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
@@ -0,0 +1,677 @@
1
+ # Local Issue Tracking
2
+
3
+ > File-based issue tracking for projects without Linear integration.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ The Anvil Framework includes a complete local issue tracking system that works without any external dependencies. This allows you to use all Anvil workflow commands (`/orient`, `/ready`, `/sprint`, `/tasks`) even if you don't use Linear.
10
+
11
+ **Key Features:**
12
+ - File-based JSON storage in `~/.anvil/issues/`
13
+ - Full CLI for creating, updating, and managing issues
14
+ - Same workflow patterns as Linear integration
15
+ - Agent assignment for multi-agent coordination
16
+ - Priority and status management
17
+ - Statistics and ready-work calculation
18
+
19
+ ---
20
+
21
+ ## Quick Start
22
+
23
+ ### Create Your First Issue
24
+
25
+ ```bash
26
+ # Create a simple issue
27
+ anvil-issue create --title "Implement user authentication"
28
+
29
+ # Create with priority and labels
30
+ anvil-issue create --title "Fix login bug" --priority high --labels "bug,auth"
31
+
32
+ # Create a sub-issue
33
+ anvil-issue create --title "Phase 1: Database setup" --parent LOCAL-001
34
+ ```
35
+
36
+ ### View Issues
37
+
38
+ ```bash
39
+ # List all issues
40
+ anvil-issue list
41
+
42
+ # Filter by status
43
+ anvil-issue list --status todo
44
+ anvil-issue list --status in-progress
45
+
46
+ # Show issue details
47
+ anvil-issue show LOCAL-001
48
+
49
+ # Show ready work (prioritized)
50
+ anvil-issue ready
51
+ ```
52
+
53
+ ### Update Issues
54
+
55
+ ```bash
56
+ # Change status
57
+ anvil-issue move LOCAL-001 --to in-progress
58
+ anvil-issue move LOCAL-001 --to done
59
+
60
+ # Update details
61
+ anvil-issue update LOCAL-001 --title "New title" --priority urgent
62
+
63
+ # Assign to agent
64
+ anvil-issue assign LOCAL-001 --agent swift-falcon-a3f2
65
+ ```
66
+
67
+ ---
68
+
69
+ ## CLI Reference
70
+
71
+ ### Commands Overview
72
+
73
+ | Command | Description |
74
+ |---------|-------------|
75
+ | `list` | List issues (optionally filtered by status) |
76
+ | `create` | Create a new issue |
77
+ | `show` | Show issue details |
78
+ | `update` | Update an existing issue |
79
+ | `move` | Change issue status |
80
+ | `assign` | Assign issue to an agent |
81
+ | `stats` | Show issue statistics |
82
+ | `ready` | Show issues ready to work on |
83
+ | `delete` | Delete an issue |
84
+
85
+ ### list
86
+
87
+ List issues with optional filtering.
88
+
89
+ ```bash
90
+ anvil-issue list [OPTIONS]
91
+ ```
92
+
93
+ | Option | Description |
94
+ |--------|-------------|
95
+ | `--status`, `-s` | Filter by status (backlog, todo, in-progress, in-review, done, cancelled) |
96
+ | `--limit`, `-n` | Maximum issues to show (default: 50) |
97
+
98
+ **Examples:**
99
+ ```bash
100
+ anvil-issue list
101
+ anvil-issue list --status todo
102
+ anvil-issue list --status in-progress --limit 10
103
+ ```
104
+
105
+ ### create
106
+
107
+ Create a new issue.
108
+
109
+ ```bash
110
+ anvil-issue create --title "TITLE" [OPTIONS]
111
+ ```
112
+
113
+ | Option | Description |
114
+ |--------|-------------|
115
+ | `--title`, `-t` | Issue title (required) |
116
+ | `--description`, `-d` | Issue description |
117
+ | `--priority`, `-p` | Priority: urgent/p0, high/p1, medium/p2, low/p3, none/p4 |
118
+ | `--labels`, `-l` | Comma-separated labels |
119
+ | `--parent` | Parent issue identifier (creates sub-issue) |
120
+
121
+ **Examples:**
122
+ ```bash
123
+ anvil-issue create --title "Add dark mode"
124
+ anvil-issue create --title "Critical bug" --priority urgent --labels "bug,critical"
125
+ anvil-issue create --title "Phase 1: Setup" --parent LOCAL-001
126
+ ```
127
+
128
+ ### show
129
+
130
+ Show detailed issue information.
131
+
132
+ ```bash
133
+ anvil-issue show IDENTIFIER
134
+ ```
135
+
136
+ **Example:**
137
+ ```bash
138
+ anvil-issue show LOCAL-001
139
+ ```
140
+
141
+ **Output:**
142
+ ```
143
+ LOCAL-001: Implement user authentication
144
+ --------------------------------------------------
145
+ Status: In Progress
146
+ Priority: P1 (High)
147
+
148
+ Description:
149
+ Add OAuth2 authentication with Google and GitHub providers.
150
+
151
+ Labels: feature, auth
152
+ Assigned: swift-falcon-a3f2
153
+ Parent: LOCAL-000
154
+
155
+ Created: 2026-01-04 09:30
156
+ Updated: 2026-01-04 10:15
157
+ ```
158
+
159
+ ### update
160
+
161
+ Update an existing issue.
162
+
163
+ ```bash
164
+ anvil-issue update IDENTIFIER [OPTIONS]
165
+ ```
166
+
167
+ | Option | Description |
168
+ |--------|-------------|
169
+ | `--title`, `-t` | New title |
170
+ | `--description`, `-d` | New description |
171
+ | `--priority`, `-p` | New priority |
172
+ | `--labels`, `-l` | New labels (comma-separated) |
173
+
174
+ **Example:**
175
+ ```bash
176
+ anvil-issue update LOCAL-001 --title "Updated title" --priority high
177
+ ```
178
+
179
+ ### move
180
+
181
+ Change issue status.
182
+
183
+ ```bash
184
+ anvil-issue move IDENTIFIER --to STATUS
185
+ ```
186
+
187
+ | Status | Description |
188
+ |--------|-------------|
189
+ | `backlog` | Not yet prioritized |
190
+ | `todo` | Ready to start |
191
+ | `in-progress` | Currently being worked on |
192
+ | `in-review` | PR created, awaiting review |
193
+ | `done` | Completed |
194
+ | `cancelled` | No longer needed |
195
+
196
+ **Examples:**
197
+ ```bash
198
+ anvil-issue move LOCAL-001 --to in-progress
199
+ anvil-issue move LOCAL-001 --to done
200
+ ```
201
+
202
+ ### assign
203
+
204
+ Assign or unassign an agent.
205
+
206
+ ```bash
207
+ anvil-issue assign IDENTIFIER [OPTIONS]
208
+ ```
209
+
210
+ | Option | Description |
211
+ |--------|-------------|
212
+ | `--agent`, `-a` | Agent ID to assign |
213
+ | `--unassign`, `-u` | Remove assignment |
214
+
215
+ **Examples:**
216
+ ```bash
217
+ anvil-issue assign LOCAL-001 --agent swift-falcon-a3f2
218
+ anvil-issue assign LOCAL-001 --unassign
219
+ ```
220
+
221
+ ### stats
222
+
223
+ Show issue statistics.
224
+
225
+ ```bash
226
+ anvil-issue stats
227
+ ```
228
+
229
+ **Output:**
230
+ ```
231
+ === Issue Statistics ===
232
+
233
+ Total Issues: 15
234
+ Assigned: 3
235
+ Unassigned: 12
236
+
237
+ --- By Status ---
238
+ Backlog 5
239
+ Todo 4
240
+ In Progress 2
241
+ In Review 1
242
+ Done 3
243
+
244
+ --- By Priority ---
245
+ P0 1
246
+ P1 3
247
+ P2 8
248
+ P3 3
249
+ ```
250
+
251
+ ### ready
252
+
253
+ Show issues ready to work on, sorted by priority.
254
+
255
+ ```bash
256
+ anvil-issue ready [OPTIONS]
257
+ ```
258
+
259
+ | Option | Description |
260
+ |--------|-------------|
261
+ | `--limit`, `-n` | Maximum issues (default: 10) |
262
+
263
+ **Example:**
264
+ ```bash
265
+ anvil-issue ready --limit 5
266
+ ```
267
+
268
+ ### delete
269
+
270
+ Delete an issue.
271
+
272
+ ```bash
273
+ anvil-issue delete IDENTIFIER [OPTIONS]
274
+ ```
275
+
276
+ | Option | Description |
277
+ |--------|-------------|
278
+ | `--hard` | Permanently delete (default: soft delete/cancel) |
279
+
280
+ **Examples:**
281
+ ```bash
282
+ anvil-issue delete LOCAL-001 # Marks as cancelled
283
+ anvil-issue delete LOCAL-001 --hard # Permanently removes
284
+ ```
285
+
286
+ ---
287
+
288
+ ## Status Workflow
289
+
290
+ Issues follow a standard workflow:
291
+
292
+ ```
293
+ ┌─────────┐
294
+ │ Backlog │ Not yet prioritized
295
+ └────┬────┘
296
+
297
+ ┌────▼────┐
298
+ │ Todo │ Ready to start
299
+ └────┬────┘
300
+
301
+ ┌────▼─────────┐
302
+ │ In Progress │ Being worked on
303
+ └────┬─────────┘
304
+
305
+ ┌────▼────────┐
306
+ │ In Review │ PR awaiting review
307
+ └────┬────────┘
308
+
309
+ ┌────▼────┐
310
+ │ Done │ Completed
311
+ └─────────┘
312
+ ```
313
+
314
+ Use `anvil-issue move` to transition between states.
315
+
316
+ ---
317
+
318
+ ## Priority Levels
319
+
320
+ | Priority | Code | Description |
321
+ |----------|------|-------------|
322
+ | Urgent | P0 | Drop everything, fix now |
323
+ | High | P1 | Next up after current task |
324
+ | Medium | P2 | This sprint (default) |
325
+ | Low | P3 | Backlog |
326
+ | None | P4 | No priority set |
327
+
328
+ The `ready` command sorts by priority (P0 first) then by age (oldest first).
329
+
330
+ ---
331
+
332
+ ## Storage Structure
333
+
334
+ Issues are stored in `~/.anvil/issues/`:
335
+
336
+ ```
337
+ ~/.anvil/issues/
338
+ └── index.json # All issues with metadata
339
+ ```
340
+
341
+ The index file contains:
342
+ - Version marker
343
+ - Identifier prefix (default: "LOCAL")
344
+ - Next ID counter
345
+ - All issues as JSON objects
346
+
347
+ **Example index.json:**
348
+ ```json
349
+ {
350
+ "version": "1.0",
351
+ "prefix": "LOCAL",
352
+ "next_id": 5,
353
+ "issues": {
354
+ "LOCAL-001": {
355
+ "id": "uuid-here",
356
+ "title": "Implement auth",
357
+ "status": "in_progress",
358
+ "priority": 1,
359
+ "labels": ["feature"],
360
+ "assigned_agent": "swift-falcon",
361
+ "created_at": "2026-01-04T09:30:00Z",
362
+ "updated_at": "2026-01-04T10:15:00Z"
363
+ }
364
+ }
365
+ }
366
+ ```
367
+
368
+ ---
369
+
370
+ ## Integration with Anvil Commands
371
+
372
+ ### /orient
373
+
374
+ When no Linear configuration exists (`.claude/linear.yaml`), `/orient` automatically uses the local provider:
375
+
376
+ ```markdown
377
+ ## Session Orientation
378
+
379
+ **Issue Provider**: local
380
+
381
+ **Ready Work** (top 5):
382
+ 1. LOCAL-001: Fix auth bug (P0)
383
+ 2. LOCAL-003: Add logging (P1)
384
+ ...
385
+ ```
386
+
387
+ ### /ready
388
+
389
+ Calculates ready work from local issues:
390
+
391
+ ```bash
392
+ /ready
393
+ ```
394
+
395
+ Shows issues in Todo status, sorted by priority and age.
396
+
397
+ ### /sprint
398
+
399
+ Works identically with local issues, showing state summary and suggesting focus items.
400
+
401
+ ### /tasks
402
+
403
+ When creating tasks from a plan, issues are created locally:
404
+
405
+ ```bash
406
+ /tasks
407
+ # Creates LOCAL-XXX issues for each phase
408
+ ```
409
+
410
+ ### /discover
411
+
412
+ Files discovered work as local issues:
413
+
414
+ ```bash
415
+ /discover "Found missing error handling"
416
+ # Creates LOCAL-XXX with 'discovered' label
417
+ ```
418
+
419
+ ---
420
+
421
+ ## Multi-Agent Coordination
422
+
423
+ ### Agent Assignment
424
+
425
+ Assign issues to prevent conflicts:
426
+
427
+ ```bash
428
+ # Agent claims an issue
429
+ anvil-issue assign LOCAL-001 --agent swift-falcon-a3f2
430
+
431
+ # View agent's issues
432
+ anvil-issue list | grep "swift-falcon"
433
+ ```
434
+
435
+ ### HUD Integration
436
+
437
+ The HUD Kanban panel displays local issues:
438
+
439
+ ```bash
440
+ uv run global/tools/anvil-hud.py
441
+ ```
442
+
443
+ The Kanban shows:
444
+ - TODO column: Issues in `todo` status
445
+ - IN PROGRESS: Issues in `in_progress` or `in_review`
446
+ - DONE: Completed issues
447
+
448
+ ---
449
+
450
+ ## Provider Detection
451
+
452
+ Anvil automatically detects which provider to use:
453
+
454
+ 1. **If `.claude/linear.yaml` exists** → Uses Linear
455
+ 2. **Otherwise** → Uses local JSON storage
456
+
457
+ You can check the active provider:
458
+
459
+ ```python
460
+ from issue_provider import get_provider_name
461
+
462
+ provider = get_provider_name()
463
+ # Returns "linear:ANV" or "local"
464
+ ```
465
+
466
+ ---
467
+
468
+ ## Python API
469
+
470
+ For programmatic access:
471
+
472
+ ```python
473
+ from local_provider import LocalJsonProvider
474
+ from issue_models import Issue, IssueStatus, Priority
475
+
476
+ # Initialize provider
477
+ provider = LocalJsonProvider()
478
+
479
+ # Create issue
480
+ issue = provider.create_issue(
481
+ title="New feature",
482
+ description="Details here",
483
+ priority=Priority.HIGH,
484
+ labels=["feature"]
485
+ )
486
+
487
+ # List issues
488
+ todos = provider.list_issues(status=IssueStatus.TODO)
489
+
490
+ # Update issue
491
+ provider.update_issue(
492
+ identifier="LOCAL-001",
493
+ status=IssueStatus.IN_PROGRESS
494
+ )
495
+
496
+ # Assign to agent
497
+ provider.assign_to_agent("LOCAL-001", "agent-id")
498
+
499
+ # Get ready work
500
+ ready = provider.get_ready_issues()
501
+
502
+ # Get statistics
503
+ stats = provider.get_statistics()
504
+ ```
505
+
506
+ ### Issue Model
507
+
508
+ ```python
509
+ @dataclass
510
+ class Issue:
511
+ id: str # Internal UUID
512
+ identifier: str # Human-readable (LOCAL-001)
513
+ title: str
514
+ description: str = ""
515
+ status: IssueStatus = IssueStatus.TODO
516
+ priority: Priority = Priority.MEDIUM
517
+ parent_id: Optional[str] = None
518
+ labels: list[str] = []
519
+ assigned_agent: Optional[str] = None
520
+ created_at: datetime
521
+ updated_at: datetime
522
+ completed_at: Optional[datetime] = None
523
+ estimate: Optional[str] = None
524
+ provider: str = "local"
525
+ ```
526
+
527
+ ### Status Enum
528
+
529
+ ```python
530
+ class IssueStatus(Enum):
531
+ BACKLOG = "backlog"
532
+ TODO = "todo"
533
+ IN_PROGRESS = "in_progress"
534
+ IN_REVIEW = "in_review"
535
+ DONE = "done"
536
+ CANCELLED = "cancelled"
537
+ ```
538
+
539
+ ### Priority Enum
540
+
541
+ ```python
542
+ class Priority(Enum):
543
+ URGENT = 0 # P0
544
+ HIGH = 1 # P1
545
+ MEDIUM = 2 # P2
546
+ LOW = 3 # P3
547
+ NONE = 4 # P4
548
+ ```
549
+
550
+ ---
551
+
552
+ ## Migration
553
+
554
+ ### From Linear to Local
555
+
556
+ Export from Linear and import locally:
557
+
558
+ ```python
559
+ # In Python
560
+ from linear_provider import LinearProvider
561
+ from local_provider import LocalJsonProvider
562
+
563
+ linear = LinearProvider(team_key="ANV", team_id="uuid")
564
+ local = LocalJsonProvider()
565
+
566
+ # Export from Linear
567
+ issues = linear.list_issues(limit=100)
568
+
569
+ # Import to local
570
+ local.import_issues(issues)
571
+ ```
572
+
573
+ ### From Local to Linear
574
+
575
+ Export as JSON for manual import:
576
+
577
+ ```python
578
+ from local_provider import LocalJsonProvider
579
+ import json
580
+
581
+ provider = LocalJsonProvider()
582
+ issues = provider.export_issues()
583
+
584
+ with open("issues-export.json", "w") as f:
585
+ json.dump(issues, f, indent=2)
586
+ ```
587
+
588
+ ---
589
+
590
+ ## Best Practices
591
+
592
+ ### Issue Titles
593
+
594
+ - Start with verb: "Add", "Fix", "Update", "Remove"
595
+ - Be specific: "Fix login timeout" not "Fix bug"
596
+ - Include scope: "Add dark mode to settings page"
597
+
598
+ ### Using Labels
599
+
600
+ Common labels:
601
+ - `bug` - Something broken
602
+ - `feature` - New functionality
603
+ - `chore` - Maintenance task
604
+ - `discovered` - Found during other work
605
+ - `blocked` - Cannot proceed
606
+
607
+ ### Sub-Issues
608
+
609
+ For large features, create sub-issues:
610
+
611
+ ```bash
612
+ # Parent issue
613
+ anvil-issue create --title "User Authentication" --priority high
614
+
615
+ # Sub-issues
616
+ anvil-issue create --title "Phase 1: Database schema" --parent LOCAL-001
617
+ anvil-issue create --title "Phase 2: API endpoints" --parent LOCAL-001
618
+ anvil-issue create --title "Phase 3: UI components" --parent LOCAL-001
619
+ ```
620
+
621
+ ### Regular Cleanup
622
+
623
+ Periodically clean up completed issues:
624
+
625
+ ```bash
626
+ # View statistics
627
+ anvil-issue stats
628
+
629
+ # Delete old completed issues
630
+ anvil-issue delete LOCAL-XXX --hard
631
+ ```
632
+
633
+ ---
634
+
635
+ ## Troubleshooting
636
+
637
+ ### "Issue not found"
638
+
639
+ Check the identifier is correct (case-insensitive):
640
+
641
+ ```bash
642
+ anvil-issue show local-001 # Works
643
+ anvil-issue show LOCAL-001 # Works
644
+ ```
645
+
646
+ ### Storage Issues
647
+
648
+ If the index file is corrupted:
649
+
650
+ ```bash
651
+ # Backup and recreate
652
+ mv ~/.anvil/issues/index.json ~/.anvil/issues/index.json.bak
653
+
654
+ # Provider will create fresh index on next operation
655
+ anvil-issue list
656
+ ```
657
+
658
+ ### Provider Not Detected
659
+
660
+ Ensure you're in a project directory:
661
+
662
+ ```bash
663
+ cd /path/to/your/project
664
+ anvil-issue list
665
+ ```
666
+
667
+ ---
668
+
669
+ ## Related Documentation
670
+
671
+ - [Command Reference](command-reference.md) - All Anvil commands
672
+ - [Session Workflow](session-workflow.md) - Daily workflow patterns
673
+ - [Multi-Agent Protocol](../docs/multi-agent-protocol.md) - Agent coordination
674
+
675
+ ---
676
+
677
+ *For Linear integration setup, see [/linear-setup](command-reference.md#linear-setup).*