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,469 @@
|
|
|
1
|
+
# Anvil HUD
|
|
2
|
+
|
|
3
|
+
> Multi-agent command center for monitoring Claude Code sessions in real-time.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
The Anvil HUD (Heads-Up Display) is a terminal dashboard that provides real-time visibility into all active Claude Code agents across your projects. It shows agent status, context usage, costs, task progress, and quality gate status—all in one place.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
13
|
+
│ ANVIL HUD │
|
|
14
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
15
|
+
│ ┌─ Agents ─────────────┐ ┌─ Kanban ──────────────────────────────────────┐│
|
|
16
|
+
│ │ swift-falcon-a3f2 │ │ TODO (3) IN PROGRESS (2) DONE (5) ││
|
|
17
|
+
│ │ ████████░░ 78% │ │ ┌──────────┐ ┌──────────────┐ ┌─────────┐ ││
|
|
18
|
+
│ │ ANV-180 | implement │ │ │ ANV-182 │ │▸ANV-180 │ │ ANV-175 │ ││
|
|
19
|
+
│ │ $2.34 | 14m ago │ │ │ ANV-183 │ │ ANV-181 │ │ ANV-174 │ ││
|
|
20
|
+
│ ├──────────────────────┤ │ │ ANV-184 │ │ │ │ ... │ ││
|
|
21
|
+
│ │ calm-raven-7b2e │ │ └──────────┘ └─────────────┘ └─────────┘ ││
|
|
22
|
+
│ │ ████░░░░░░ 45% │ └────────────────────────────────────────────────┤
|
|
23
|
+
│ │ ANV-181 | explore │ ┌─ Quality ─────┐ ┌─ Costs ─────────────────────┐│
|
|
24
|
+
│ └──────────────────────┘ │ Lint: ✓ Pass │ │ Total: $4.78 ││
|
|
25
|
+
│ │ Types: ✓ Pass │ │ Agents: 2 active ││
|
|
26
|
+
│ │ Tests: ✓ Pass │ │ Avg context: 61% ││
|
|
27
|
+
│ └───────────────┘ └─────────────────────────────┘│
|
|
28
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
### Launch the HUD
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Start the dashboard
|
|
39
|
+
uv run global/tools/anvil-hud.py
|
|
40
|
+
|
|
41
|
+
# Start with demo data (for testing)
|
|
42
|
+
uv run global/tools/anvil-hud.py --demo
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Recommended Setup
|
|
46
|
+
|
|
47
|
+
Run the HUD in a split terminal pane alongside your Claude Code session:
|
|
48
|
+
|
|
49
|
+
**Warp Terminal**
|
|
50
|
+
1. Right-click → Split pane (or Cmd+D)
|
|
51
|
+
2. Run `uv run global/tools/anvil-hud.py`
|
|
52
|
+
|
|
53
|
+
**tmux**
|
|
54
|
+
```bash
|
|
55
|
+
tmux split-window -h
|
|
56
|
+
uv run global/tools/anvil-hud.py
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**iTerm2**
|
|
60
|
+
1. Cmd+D (vertical split)
|
|
61
|
+
2. Run the HUD command
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Display Modes
|
|
66
|
+
|
|
67
|
+
### Focused Mode (Default)
|
|
68
|
+
|
|
69
|
+
Shows one panel at a time with a tab bar for navigation. Best for:
|
|
70
|
+
- Quick status checks
|
|
71
|
+
- Single monitor setups
|
|
72
|
+
- When you need maximum panel space
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
76
|
+
│ [Agents] [Kanban] [Quality] [Costs] [Coord] │
|
|
77
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
78
|
+
│ │
|
|
79
|
+
│ Active Panel Content │
|
|
80
|
+
│ (full width display) │
|
|
81
|
+
│ │
|
|
82
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Full Mode
|
|
86
|
+
|
|
87
|
+
Shows all panels simultaneously. Best for:
|
|
88
|
+
- Multi-agent coordination
|
|
89
|
+
- Wide monitor setups
|
|
90
|
+
- Comprehensive overview
|
|
91
|
+
|
|
92
|
+
Toggle between modes with the `m` key.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Panels
|
|
97
|
+
|
|
98
|
+
### 1. Agents Panel
|
|
99
|
+
|
|
100
|
+
Displays all active Claude Code sessions with real-time status.
|
|
101
|
+
|
|
102
|
+
**Agent Card Information:**
|
|
103
|
+
|
|
104
|
+
| Field | Description |
|
|
105
|
+
|-------|-------------|
|
|
106
|
+
| Agent ID | Unique identifier (e.g., `swift-falcon-a3f2`) |
|
|
107
|
+
| Context Bar | Visual usage indicator with color coding |
|
|
108
|
+
| Issue | Current Linear/local issue being worked on |
|
|
109
|
+
| Phase | Workflow phase (orient, explore, spec, plan, implement, etc.) |
|
|
110
|
+
| Cost | Session cost (for API billing users) |
|
|
111
|
+
| Last Activity | Time since last tool use |
|
|
112
|
+
|
|
113
|
+
**Context Color Coding:**
|
|
114
|
+
|
|
115
|
+
| Color | Usage | Meaning |
|
|
116
|
+
|-------|-------|---------|
|
|
117
|
+
| Green | < 50% | Healthy |
|
|
118
|
+
| Yellow | 50-80% | Monitor |
|
|
119
|
+
| Red | > 80% | At risk of compaction |
|
|
120
|
+
|
|
121
|
+
**Detailed View** (press `d`):
|
|
122
|
+
- Shows recent tool timeline (last 5 tools)
|
|
123
|
+
- Tool execution durations
|
|
124
|
+
- Helps debug slow operations
|
|
125
|
+
|
|
126
|
+
### 2. Kanban Panel
|
|
127
|
+
|
|
128
|
+
Visual task board showing issues organized by status.
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
┌─ KANBAN BOARD ──────────────────────────────────────────────────┐
|
|
132
|
+
│ Navigation: h/l=columns j/k=issues c=claim m/M=move n=new │
|
|
133
|
+
│ │
|
|
134
|
+
│ TODO (3) IN PROGRESS (2) DONE (5) │
|
|
135
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
136
|
+
│ │ ANV-182 │ │▸ANV-180 🤖 │ │ ANV-175 │ │
|
|
137
|
+
│ │ ANV-183 │ │ ANV-181 │ │ ANV-174 │ │
|
|
138
|
+
│ │ ANV-184 │ │ │ │ ANV-173 │ │
|
|
139
|
+
│ └──────────────┘ └──────────────┘ │ ANV-172 │ │
|
|
140
|
+
│ │ ANV-171 │ │
|
|
141
|
+
│ └──────────────┘ │
|
|
142
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Columns:**
|
|
146
|
+
- **TODO** - Issues ready to start
|
|
147
|
+
- **IN PROGRESS** - Currently being worked on
|
|
148
|
+
- **DONE** - Completed issues
|
|
149
|
+
|
|
150
|
+
**Issue Indicators:**
|
|
151
|
+
- `!` - High priority (P0/P1)
|
|
152
|
+
- `🤖` - Assigned to an agent
|
|
153
|
+
|
|
154
|
+
**Kanban Keybindings:**
|
|
155
|
+
|
|
156
|
+
| Key | Action |
|
|
157
|
+
|-----|--------|
|
|
158
|
+
| `h`/`l` | Move between columns |
|
|
159
|
+
| `j`/`k` | Move between issues |
|
|
160
|
+
| `c` | Claim selected issue |
|
|
161
|
+
| `m` | Move issue right (TODO → IN PROGRESS → DONE) |
|
|
162
|
+
| `M` | Move issue left |
|
|
163
|
+
| `n` | Create new issue |
|
|
164
|
+
| `Enter` | View issue details |
|
|
165
|
+
|
|
166
|
+
### 3. Quality Panel
|
|
167
|
+
|
|
168
|
+
Real-time quality gate status for the current project.
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
┌─ QUALITY GATES ─────────────────────────────────────────────────┐
|
|
172
|
+
│ │
|
|
173
|
+
│ Lint ✓ Pass (0 errors, 2 warnings) │
|
|
174
|
+
│ Types ✓ Pass (no errors) │
|
|
175
|
+
│ Tests ✓ Pass (47 passed, 0 failed) │
|
|
176
|
+
│ Security ✓ Pass (0 vulnerabilities) │
|
|
177
|
+
│ │
|
|
178
|
+
│ Last run: 2 minutes ago │
|
|
179
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Gates Tracked:**
|
|
183
|
+
- **Lint** - ESLint/Ruff output
|
|
184
|
+
- **Types** - TypeScript/mypy type checking
|
|
185
|
+
- **Tests** - Vitest/pytest results
|
|
186
|
+
- **Security** - Semgrep/CodeRabbit findings
|
|
187
|
+
|
|
188
|
+
### 4. Costs Panel
|
|
189
|
+
|
|
190
|
+
Session cost tracking and attribution.
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
┌─ COSTS ─────────────────────────────────────────────────────────┐
|
|
194
|
+
│ │
|
|
195
|
+
│ Total Session Cost: $4.78 │
|
|
196
|
+
│ Active Agents: 2 │
|
|
197
|
+
│ Average Context: 61% │
|
|
198
|
+
│ │
|
|
199
|
+
│ By Agent: │
|
|
200
|
+
│ swift-falcon-a3f2 $2.34 (49%) │
|
|
201
|
+
│ calm-raven-7b2e $2.44 (51%) │
|
|
202
|
+
│ │
|
|
203
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Note**: Cost tracking is for API billing users. For Claude Pro/Max subscriptions, set `billing_model: subscription` to hide cost warnings.
|
|
207
|
+
|
|
208
|
+
### 5. Coordination Panel
|
|
209
|
+
|
|
210
|
+
Multi-agent coordination status.
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
┌─ COORDINATION ──────────────────────────────────────────────────┐
|
|
214
|
+
│ │
|
|
215
|
+
│ Active Agents: 2 │
|
|
216
|
+
│ Potential Conflicts: 0 │
|
|
217
|
+
│ │
|
|
218
|
+
│ File Locks: │
|
|
219
|
+
│ src/auth.ts swift-falcon (write) │
|
|
220
|
+
│ src/utils.ts calm-raven (read) │
|
|
221
|
+
│ │
|
|
222
|
+
│ Branch Status: │
|
|
223
|
+
│ feature/ANV-180 swift-falcon (active) │
|
|
224
|
+
│ feature/ANV-181 calm-raven (active) │
|
|
225
|
+
│ │
|
|
226
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Coordination Features:**
|
|
230
|
+
- Active agent tracking
|
|
231
|
+
- File lock detection
|
|
232
|
+
- Branch ownership
|
|
233
|
+
- Conflict warnings
|
|
234
|
+
|
|
235
|
+
### 6. GitHub/CI Panel
|
|
236
|
+
|
|
237
|
+
GitHub and CI pipeline status.
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
┌─ GITHUB/CI ─────────────────────────────────────────────────────┐
|
|
241
|
+
│ │
|
|
242
|
+
│ Open PRs: 2 │
|
|
243
|
+
│ #34 feat: statusline improvements ✓ Checks passing │
|
|
244
|
+
│ #35 fix: auth timeout ⏳ Running │
|
|
245
|
+
│ │
|
|
246
|
+
│ CodeRabbit: │
|
|
247
|
+
│ #34: 3 comments, 0 blocking │
|
|
248
|
+
│ #35: Review pending │
|
|
249
|
+
│ │
|
|
250
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Keybindings
|
|
256
|
+
|
|
257
|
+
### Global
|
|
258
|
+
|
|
259
|
+
| Key | Action |
|
|
260
|
+
|-----|--------|
|
|
261
|
+
| `q` | Quit HUD |
|
|
262
|
+
| `r` | Force refresh |
|
|
263
|
+
| `m` | Toggle Focused/Full mode |
|
|
264
|
+
| `d` | Toggle detailed view |
|
|
265
|
+
| `s` | Open settings panel |
|
|
266
|
+
| `?` | Show help overlay |
|
|
267
|
+
| `Esc` | Close any overlay |
|
|
268
|
+
|
|
269
|
+
### Navigation (Focused Mode)
|
|
270
|
+
|
|
271
|
+
| Key | Action |
|
|
272
|
+
|-----|--------|
|
|
273
|
+
| `1` | Switch to Agents panel |
|
|
274
|
+
| `2` | Switch to Kanban panel |
|
|
275
|
+
| `3` | Switch to Quality panel |
|
|
276
|
+
| `4` | Switch to Costs panel |
|
|
277
|
+
| `5` | Switch to Coordination panel |
|
|
278
|
+
| `Tab` | Next panel |
|
|
279
|
+
| `Shift+Tab` | Previous panel |
|
|
280
|
+
|
|
281
|
+
### Kanban Navigation
|
|
282
|
+
|
|
283
|
+
| Key | Action |
|
|
284
|
+
|-----|--------|
|
|
285
|
+
| `h`/`l` | Move between columns |
|
|
286
|
+
| `j`/`k` | Move between issues |
|
|
287
|
+
| `c` | Claim selected issue |
|
|
288
|
+
| `m` | Move issue right |
|
|
289
|
+
| `M` | Move issue left |
|
|
290
|
+
| `n` | Create new issue |
|
|
291
|
+
| `Enter` | View issue details |
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Configuration
|
|
296
|
+
|
|
297
|
+
Settings are stored in `~/.anvil/hud-config.yaml` (global) or `.anvil/hud-config.yaml` (per-project):
|
|
298
|
+
|
|
299
|
+
```yaml
|
|
300
|
+
# Billing model
|
|
301
|
+
budget:
|
|
302
|
+
billing_model: subscription # "api" or "subscription"
|
|
303
|
+
agent_warn_threshold: 5.0 # Warn at $5 (api only)
|
|
304
|
+
agent_crit_threshold: 10.0 # Critical at $10 (api only)
|
|
305
|
+
|
|
306
|
+
# Context thresholds
|
|
307
|
+
context:
|
|
308
|
+
warn_threshold_pct: 80 # Yellow at 80%
|
|
309
|
+
crit_threshold_pct: 90 # Red at 90%
|
|
310
|
+
|
|
311
|
+
# Display settings
|
|
312
|
+
hud:
|
|
313
|
+
default_mode: focused # "focused" or "full"
|
|
314
|
+
refresh_interval: 2 # Seconds between refreshes
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Environment Variables
|
|
318
|
+
|
|
319
|
+
| Variable | Description |
|
|
320
|
+
|----------|-------------|
|
|
321
|
+
| `ANVIL_BILLING_MODEL` | Set to `subscription` to hide cost alerts |
|
|
322
|
+
| `ANVIL_HUD_MODE` | Default display mode (`focused` or `full`) |
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## Setup Requirements
|
|
327
|
+
|
|
328
|
+
### Agent Registration
|
|
329
|
+
|
|
330
|
+
The HUD requires hooks to register agents. Add to your project's `.claude/settings.local.json`:
|
|
331
|
+
|
|
332
|
+
```json
|
|
333
|
+
{
|
|
334
|
+
"hooks": {
|
|
335
|
+
"session_start": [".claude/hooks/session_start.py --register-agent"],
|
|
336
|
+
"post_tool_use": [".claude/hooks/post_tool_use.py --update-agent"],
|
|
337
|
+
"stop": [".claude/hooks/stop.py --cleanup-agent"]
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Using --with-hooks
|
|
343
|
+
|
|
344
|
+
When initializing a new project with Anvil, use the `--with-hooks` flag to automatically set up HUD integration:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
./scripts/init-project.sh /path/to/project --with-hooks
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
This creates symlinks to the framework hooks that handle agent registration.
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## Issue Tracking Integration
|
|
355
|
+
|
|
356
|
+
The HUD works with both Linear and local issue tracking:
|
|
357
|
+
|
|
358
|
+
### With Linear
|
|
359
|
+
|
|
360
|
+
If `.claude/linear.yaml` exists, the Kanban panel shows issues from your Linear team:
|
|
361
|
+
|
|
362
|
+
```yaml
|
|
363
|
+
# .claude/linear.yaml
|
|
364
|
+
team_key: ANV
|
|
365
|
+
team_id: 1cd0d0ff-8ff2-4548-8edd-936c7c143332
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### With Local Issues
|
|
369
|
+
|
|
370
|
+
If no Linear configuration exists, the HUD uses local JSON storage:
|
|
371
|
+
|
|
372
|
+
```bash
|
|
373
|
+
# Create local issues via CLI
|
|
374
|
+
uv run global/tools/anvil-issue.py create --title "My task"
|
|
375
|
+
|
|
376
|
+
# Issues stored in ~/.anvil/issues/index.json
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
See [Local Issue Tracking](local-issues.md) for complete documentation.
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## Architecture
|
|
384
|
+
|
|
385
|
+
### File Structure
|
|
386
|
+
|
|
387
|
+
```
|
|
388
|
+
~/.anvil/
|
|
389
|
+
├── agents.json # Lightweight registry (all agents)
|
|
390
|
+
├── issues/
|
|
391
|
+
│ └── index.json # Local issue storage
|
|
392
|
+
├── state/
|
|
393
|
+
│ └── {agent-id}.json # Detailed state per agent
|
|
394
|
+
└── hud-config.yaml # HUD configuration
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### Data Flow
|
|
398
|
+
|
|
399
|
+
```
|
|
400
|
+
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
401
|
+
│ Claude Code │─────▶│ Agent Registry │◀─────│ Anvil HUD │
|
|
402
|
+
│ (with hooks) │ │ (agents.json) │ │ (dashboard) │
|
|
403
|
+
└─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
404
|
+
│ │
|
|
405
|
+
▼ ▼
|
|
406
|
+
┌─────────────────┐ ┌─────────────────┐
|
|
407
|
+
│ anvil-state │ │ Issue Provider │
|
|
408
|
+
│ (.claude/) │ │ (Linear/Local) │
|
|
409
|
+
└─────────────────┘ └─────────────────┘
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### Key Files
|
|
413
|
+
|
|
414
|
+
| File | Purpose |
|
|
415
|
+
|------|---------|
|
|
416
|
+
| `global/tools/anvil-hud.py` | Main HUD application |
|
|
417
|
+
| `global/lib/agent_registry.py` | Registry management API |
|
|
418
|
+
| `global/lib/issue_provider.py` | Issue provider abstraction |
|
|
419
|
+
| `global/lib/local_provider.py` | Local JSON issue storage |
|
|
420
|
+
| `global/lib/linear_provider.py` | Linear API adapter |
|
|
421
|
+
|
|
422
|
+
---
|
|
423
|
+
|
|
424
|
+
## Troubleshooting
|
|
425
|
+
|
|
426
|
+
### No agents showing
|
|
427
|
+
|
|
428
|
+
1. Verify hooks are configured in `.claude/settings.local.json`
|
|
429
|
+
2. Check that hooks have `--register-agent` flag
|
|
430
|
+
3. Ensure `~/.anvil/` directory exists and is writable
|
|
431
|
+
4. Start a Claude Code session and run a command
|
|
432
|
+
|
|
433
|
+
### Stale agents appearing
|
|
434
|
+
|
|
435
|
+
1. Agents auto-cleanup after 30 minutes of inactivity
|
|
436
|
+
2. Force refresh with `r` key
|
|
437
|
+
3. Check if stop hook has `--cleanup-agent` flag
|
|
438
|
+
4. Manually clear: `rm ~/.anvil/agents.json`
|
|
439
|
+
|
|
440
|
+
### Context not updating
|
|
441
|
+
|
|
442
|
+
1. Verify `post_tool_use` hook has `--update-agent` flag
|
|
443
|
+
2. Check that Claude Code is sending context_window data
|
|
444
|
+
3. Restart the HUD with `q` then relaunch
|
|
445
|
+
|
|
446
|
+
### Kanban not loading issues
|
|
447
|
+
|
|
448
|
+
1. Check if Linear is configured: `cat .claude/linear.yaml`
|
|
449
|
+
2. For local issues, verify: `ls ~/.anvil/issues/`
|
|
450
|
+
3. Check issue provider detection: run `/orient` and note provider
|
|
451
|
+
|
|
452
|
+
### Cost tracking shows $0
|
|
453
|
+
|
|
454
|
+
1. For subscription users, this is expected (costs not tracked)
|
|
455
|
+
2. For API users, ensure hooks are capturing cost data
|
|
456
|
+
3. Check `budget.billing_model` in config
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
## Related Documentation
|
|
461
|
+
|
|
462
|
+
- [Local Issue Tracking](local-issues.md) - CLI for local issues
|
|
463
|
+
- [Session Workflow](session-workflow.md) - Daily workflow patterns
|
|
464
|
+
- [Command Reference](command-reference.md) - All Anvil commands
|
|
465
|
+
- [Anvil Init](anvil-init.md) - Project initialization with hooks
|
|
466
|
+
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
*The HUD is designed for multi-agent visibility but works equally well for single-agent sessions.*
|