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,458 @@
|
|
|
1
|
+
# Anvil Installation Retrospective Notes
|
|
2
|
+
|
|
3
|
+
> Running notes during installation. Will be used to update the Anvil repo's INSTALLATION.md after completion.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Phase 0: Backup & Prerequisites
|
|
8
|
+
|
|
9
|
+
**Date**: 2025-12-17
|
|
10
|
+
|
|
11
|
+
### What Worked Well
|
|
12
|
+
- Backup script worked cleanly
|
|
13
|
+
- All quality gate tools were already installed (may not be typical)
|
|
14
|
+
- Linear MCP verification was straightforward
|
|
15
|
+
|
|
16
|
+
### Issues Encountered
|
|
17
|
+
- None
|
|
18
|
+
|
|
19
|
+
### Changes for Updated Installation Plan
|
|
20
|
+
1. **Team name discovery**: The installation plan assumes user knows their Linear team name. Added step to list teams first (`Linear:list_teams`) before verifying connection. User's team was "MyTeam" not "baby-gift-garden" (that's a project name, not team).
|
|
21
|
+
|
|
22
|
+
2. **Prerequisite installation timing**: Current plan lists `brew install` commands but doesn't handle the case where tools are already installed. Consider adding version checks with "already installed" messaging.
|
|
23
|
+
|
|
24
|
+
3. **Backup verification**: Should add a step to verify backup contents (file count, size) not just that directory was created.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Phase 1: Global Installation
|
|
29
|
+
|
|
30
|
+
**Date**: 2025-12-17
|
|
31
|
+
|
|
32
|
+
### What Worked Well
|
|
33
|
+
- Directory creation was idempotent (mkdir -p handles existing dirs)
|
|
34
|
+
- Commands were already installed from earlier partial attempt — verified with diff
|
|
35
|
+
- Template installation was clean (no conflicts with existing templates)
|
|
36
|
+
- Existing skills preserved alongside new skill-template
|
|
37
|
+
|
|
38
|
+
### Issues Encountered
|
|
39
|
+
1. **cp -n confusion**: Used `cp -n` (no clobber) for commands, but all showed "not overwritten" which looked like failure. Actually the files were already identical from earlier run.
|
|
40
|
+
2. **Grep verification failed misleadingly**: Initial grep-based verification said files were "different versions" but diff showed they were identical. Grep patterns were too specific.
|
|
41
|
+
|
|
42
|
+
### Changes for Updated Installation Plan
|
|
43
|
+
1. **Better idempotency messaging**: Instead of `cp -n`, use a proper check-then-copy approach
|
|
44
|
+
2. **Add verification step to plan**: After each install section, include verification
|
|
45
|
+
3. **Note about existing commands**: Plan should mention users may have existing commands and explain merge strategy
|
|
46
|
+
4. **Simpler verification**: Use `diff -q` not grep patterns
|
|
47
|
+
5. **Show what's NEW vs what EXISTS**: Installation output should clearly distinguish "newly installed" vs "already present"
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Phase 2: Project Installation
|
|
52
|
+
|
|
53
|
+
**Date**: 2025-12-17
|
|
54
|
+
|
|
55
|
+
### What Worked Well
|
|
56
|
+
- Directory creation was straightforward
|
|
57
|
+
- Existing hooks were more advanced than Anvil's — correctly kept them
|
|
58
|
+
- Convention examples copied cleanly
|
|
59
|
+
- product.md and constitution.md creation was guided by existing README
|
|
60
|
+
|
|
61
|
+
### Issues Encountered
|
|
62
|
+
1. **CLAUDE.md confusion**: Project's CLAUDE.md was actually a design extension config, not project context. Had to look at README.md instead.
|
|
63
|
+
2. **Existing hooks decision**: Plan didn't address what to do when project already has more advanced hooks than Anvil provides.
|
|
64
|
+
|
|
65
|
+
### Changes for Updated Installation Plan
|
|
66
|
+
1. **Hooks merge strategy**: Add explicit guidance: "If your project already has hooks, compare functionality. Keep whichever is more complete. Anvil hooks are minimal starting points."
|
|
67
|
+
|
|
68
|
+
2. **product.md guidance**: Add prompts/questions to help users fill in product.md:
|
|
69
|
+
- What does this project do in one sentence?
|
|
70
|
+
- Who are the primary users?
|
|
71
|
+
- What tech stack and why?
|
|
72
|
+
- What are you working on now vs later?
|
|
73
|
+
|
|
74
|
+
3. **constitution.md should be project-specific**: Current template is generic. Consider making it more of a questionnaire:
|
|
75
|
+
- What security rules are absolute?
|
|
76
|
+
- What code quality rules matter most?
|
|
77
|
+
- What will you never do?
|
|
78
|
+
|
|
79
|
+
4. **Check for existing docs**: Add step to look for README, existing CLAUDE.md, or other docs to inform product.md creation.
|
|
80
|
+
|
|
81
|
+
5. **Convention examples note**: Add reminder that these are STARTING POINTS and should be customized to match actual project patterns.
|
|
82
|
+
|
|
83
|
+
6. **Add coordination.md to Phase 2**: This file was created AFTER Phase 2 when we realized parallel coordination was still needed. Installation plan should include:
|
|
84
|
+
- Copy `project/coordination.md` to `.claude/coordination.md`
|
|
85
|
+
- Explain when it's needed (multiple terminals)
|
|
86
|
+
- Explain what it's NOT for (agent roles)
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Phase 3: Agent → Skill Conversion
|
|
91
|
+
|
|
92
|
+
**Date**: 2025-12-17
|
|
93
|
+
|
|
94
|
+
### What Worked Well
|
|
95
|
+
- Skills already existed! Previous work had extracted domain knowledge from agents into 21 skills
|
|
96
|
+
- Sub-agents were already decoupled from specialist agents (15 preserved)
|
|
97
|
+
- Archive approach preserved all original files for reference
|
|
98
|
+
- Rewrite of generalist was straightforward — mostly removing coordination, keeping skill triggers
|
|
99
|
+
|
|
100
|
+
### Issues Encountered
|
|
101
|
+
1. **"Conversion" was mostly archiving**: The real work (skill extraction) had already been done. This phase was really "remove multi-agent coordination."
|
|
102
|
+
2. **Redundant command**: `explore-plan-code-test.md` duplicated generalist workflow — archived it.
|
|
103
|
+
|
|
104
|
+
### Changes for Updated Installation Plan
|
|
105
|
+
1. **Rename Phase 3**: Should be "Architecture Transition" not "Agent → Skill Conversion"
|
|
106
|
+
- For fresh installs: "Create Your First Skill"
|
|
107
|
+
- For migrations: "Archive Multi-Agent System"
|
|
108
|
+
|
|
109
|
+
2. **Add pre-check**: Before this phase, check if skills already exist. If yes, phase is mostly archiving.
|
|
110
|
+
|
|
111
|
+
3. **Make archive optional**: Some users may want to delete rather than archive old agents.
|
|
112
|
+
|
|
113
|
+
4. **Clarify what's preserved**:
|
|
114
|
+
- Skills = domain knowledge (KEEP)
|
|
115
|
+
- Sub-agents = focused task execution (KEEP)
|
|
116
|
+
- Specialist agents = coordination overhead (ARCHIVE)
|
|
117
|
+
- Coordination files (comms.md, session-*) = (ARCHIVE)
|
|
118
|
+
|
|
119
|
+
5. **For fresh installs**: This phase should be "Skill Creation Tutorial" instead:
|
|
120
|
+
- When to create a skill vs use sub-agent
|
|
121
|
+
- Skill template walkthrough
|
|
122
|
+
- Example: creating first project-specific skill
|
|
123
|
+
|
|
124
|
+
6. **IMPORTANT: Don't conflate role-based agents with parallel coordination**
|
|
125
|
+
- Role-based agents (Backend, Frontend) = coordination overhead we removed
|
|
126
|
+
- Parallel instance coordination = still needed for multiple terminals
|
|
127
|
+
- Created `coordination.md` as lightweight replacement for `comms.md`
|
|
128
|
+
- Tracks: active sessions, files being worked on, interface contracts, activity log
|
|
129
|
+
- Does NOT track: agent roles, module ownership by role
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Phase 4: Quality Gates Setup
|
|
134
|
+
|
|
135
|
+
**Date**: 2025-12-17
|
|
136
|
+
|
|
137
|
+
### What Worked Well
|
|
138
|
+
- CodeRabbit config installed cleanly
|
|
139
|
+
- Pre-commit installation and activation was straightforward
|
|
140
|
+
- Existing CI workflows were already comprehensive — no additions needed
|
|
141
|
+
- Pre-commit auto-fixed trailing whitespace issues
|
|
142
|
+
|
|
143
|
+
### Issues Encountered
|
|
144
|
+
1. **Pre-commit deprecated stage names**: The template used `stages: [commit]` which is deprecated. Had to run `pre-commit migrate-config` to fix. Updated Anvil template to use `stages: [pre-commit]`.
|
|
145
|
+
|
|
146
|
+
2. **Semgrep rule errors**: Original rules had multiple issues:
|
|
147
|
+
- Path patterns needed anchoring (`/src/**` not `src/**`)
|
|
148
|
+
- `as any` pattern was invalid TypeScript for semgrep
|
|
149
|
+
- `floating-promise` rule was too broad (14,000+ false positives)
|
|
150
|
+
|
|
151
|
+
3. **JSON check fails on tsconfig**: Pre-commit's `check-json` hook fails on TypeScript config files because they use JSONC (JSON with Comments). This is expected behavior.
|
|
152
|
+
|
|
153
|
+
### Changes for Updated Installation Plan
|
|
154
|
+
1. **Pre-commit template already fixed**: Use `stages: [pre-commit]` not `stages: [commit]`
|
|
155
|
+
|
|
156
|
+
2. **Semgrep rules simplified**: Reduced from 187 lines to 99 lines. Focus on high-value rules:
|
|
157
|
+
- console.log detection
|
|
158
|
+
- hardcoded secrets
|
|
159
|
+
- any type annotation (not `as any`)
|
|
160
|
+
- SQL template injection
|
|
161
|
+
- Promise .then() without .catch()
|
|
162
|
+
- dangerouslySetInnerHTML
|
|
163
|
+
|
|
164
|
+
3. **Add note about JSONC**: Installation plan should mention that check-json will fail on tsconfig files — this is expected. Options:
|
|
165
|
+
- Exclude tsconfig files from check-json
|
|
166
|
+
- Accept the warnings
|
|
167
|
+
- Use a JSONC-aware checker
|
|
168
|
+
|
|
169
|
+
4. **Semgrep rule testing**: Add step to test semgrep rules after installation:
|
|
170
|
+
```bash
|
|
171
|
+
semgrep scan --config .semgrep/rules/ src/ --max-target-bytes 1000000
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
5. **CI workflow note**: If project already has CI, don't blindly overwrite. Check existing workflows first.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Phase 5: Validation & Testing
|
|
179
|
+
|
|
180
|
+
**Date**: 2025-12-17
|
|
181
|
+
|
|
182
|
+
### What Worked Well
|
|
183
|
+
- All 14 commands present and accessible
|
|
184
|
+
- All 4 templates present
|
|
185
|
+
- Project structure complete (specs, changes, handoffs, examples, skills, agents)
|
|
186
|
+
- Skills (21) and sub-agents (15) preserved from original system
|
|
187
|
+
- Linear integration working (connected, statuses accessible)
|
|
188
|
+
- Hooks all present and configured
|
|
189
|
+
- TypeScript passes, ESLint passes (warnings only)
|
|
190
|
+
|
|
191
|
+
### Issues Encountered
|
|
192
|
+
1. **Build fails**: Pre-existing project issue (missing SuperAdminSettingsPage import). Not related to Anvil installation.
|
|
193
|
+
|
|
194
|
+
2. **ESLint warnings**: 1015 warnings in project — these are pre-existing, not from installation.
|
|
195
|
+
|
|
196
|
+
### Changes for Updated Installation Plan
|
|
197
|
+
1. **Add validation checklist**: Installation plan should include the verification steps run in Phase 5:
|
|
198
|
+
- Commands accessible (14)
|
|
199
|
+
- Templates present (4)
|
|
200
|
+
- Project directories created
|
|
201
|
+
- Skills inventory populated
|
|
202
|
+
- Linear connection verified
|
|
203
|
+
- Hooks configured
|
|
204
|
+
- Quality gates functional
|
|
205
|
+
|
|
206
|
+
2. **Note about pre-existing issues**: Validation may surface pre-existing project issues (build failures, lint warnings). These are not Anvil problems.
|
|
207
|
+
|
|
208
|
+
3. **Add "Quick Test" section**: Simple commands to verify installation:
|
|
209
|
+
```bash
|
|
210
|
+
# Global commands
|
|
211
|
+
ls ~/.claude/commands/*.md | wc -l # Should be 14+
|
|
212
|
+
|
|
213
|
+
# Templates
|
|
214
|
+
ls ~/.claude/templates/*-template.md | wc -l # Should be 4
|
|
215
|
+
|
|
216
|
+
# Project structure
|
|
217
|
+
ls .claude/{specs,changes,handoffs,examples,skills} 2>/dev/null
|
|
218
|
+
|
|
219
|
+
# Quality gates
|
|
220
|
+
pre-commit run --all-files
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## General Observations
|
|
226
|
+
|
|
227
|
+
### CRITICAL: Role-Based Agents vs Parallel Coordination
|
|
228
|
+
|
|
229
|
+
**This is the most important learning from the installation.**
|
|
230
|
+
|
|
231
|
+
During Phase 3, we archived the multi-agent system including `comms.md`. This was almost a significant mistake. We conflated two separate concerns:
|
|
232
|
+
|
|
233
|
+
#### Concern 1: Role-Based Agent Specialization (REMOVE)
|
|
234
|
+
The original system had specialist agents:
|
|
235
|
+
- Backend agent (agent-backend-001 through agent-backend-010)
|
|
236
|
+
- Frontend agent (agent-frontend-001 through agent-frontend-010)
|
|
237
|
+
- Core agent, Infra agent, Generalist agent
|
|
238
|
+
|
|
239
|
+
**Problems with this approach:**
|
|
240
|
+
- Overhead deciding "is this a backend or frontend task?"
|
|
241
|
+
- Module ownership created artificial boundaries
|
|
242
|
+
- Role assignment added complexity without proportional value
|
|
243
|
+
- Single developer doesn't benefit from role specialization
|
|
244
|
+
- Research showed single generalist + skills outperforms multi-agent
|
|
245
|
+
|
|
246
|
+
**What we removed:**
|
|
247
|
+
- Specialist agent definitions (backend.md, frontend.md, core.md, infra.md)
|
|
248
|
+
- Role-based agent ID pools
|
|
249
|
+
- Module ownership by role
|
|
250
|
+
- Role-specific workflows
|
|
251
|
+
|
|
252
|
+
#### Concern 2: Parallel Instance Coordination (KEEP)
|
|
253
|
+
Claude Code users often run multiple terminals simultaneously:
|
|
254
|
+
- Terminal A working on feature X
|
|
255
|
+
- Terminal B working on feature Y
|
|
256
|
+
- Terminal C doing a refactor
|
|
257
|
+
|
|
258
|
+
**Problems without coordination:**
|
|
259
|
+
- Two terminals modify the same file → merge conflicts
|
|
260
|
+
- Terminal A creates an API, Terminal B doesn't know → duplicate work
|
|
261
|
+
- No record of what each instance accomplished → lost context
|
|
262
|
+
- No way to prevent overlapping work claims
|
|
263
|
+
|
|
264
|
+
**This is NOT about roles. This is about multiple instances of the SAME generalist agent.**
|
|
265
|
+
|
|
266
|
+
#### The Solution: coordination.md
|
|
267
|
+
|
|
268
|
+
We created a NEW file `.claude/coordination.md` that handles parallel coordination WITHOUT role complexity:
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
# Session Coordination
|
|
272
|
+
|
|
273
|
+
## Active Sessions
|
|
274
|
+
| Session ID | Started | Working On | Status |
|
|
275
|
+
|------------|---------|------------|--------|
|
|
276
|
+
| session-001 | 14:30 | ENG-123: Button component | active |
|
|
277
|
+
|
|
278
|
+
## Current Work (file-level conflict prevention)
|
|
279
|
+
| Session ID | Files/Areas | Issue |
|
|
280
|
+
|------------|-------------|-------|
|
|
281
|
+
| session-001 | src/components/Button.tsx | ENG-123 |
|
|
282
|
+
|
|
283
|
+
## Interface Contracts (new APIs being created)
|
|
284
|
+
[contracts posted here before implementation]
|
|
285
|
+
|
|
286
|
+
## Session Log (activity record)
|
|
287
|
+
[append-only log of significant events]
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**Key differences from comms.md:**
|
|
291
|
+
|
|
292
|
+
| Old (comms.md) | New (coordination.md) |
|
|
293
|
+
|----------------|----------------------|
|
|
294
|
+
| Role-based agent registry | Session-based (any instance) |
|
|
295
|
+
| Agent ID pools per role (001-010) | Simple session IDs |
|
|
296
|
+
| Module ownership by role | File-level conflict tracking |
|
|
297
|
+
| Role-specific workflows | Same workflow for all |
|
|
298
|
+
| ~200+ lines | ~70 lines |
|
|
299
|
+
|
|
300
|
+
#### Why This Matters for Anvil
|
|
301
|
+
|
|
302
|
+
**The installation plan MUST clearly distinguish:**
|
|
303
|
+
|
|
304
|
+
1. **Single-agent architecture** = Use ONE generalist agent definition, not specialists
|
|
305
|
+
- This is the "single agent + skills" model
|
|
306
|
+
- Skills provide domain expertise on-demand
|
|
307
|
+
- Sub-agents handle focused tasks
|
|
308
|
+
- No role-based coordination overhead
|
|
309
|
+
|
|
310
|
+
2. **Parallel coordination** = Still needed when running multiple terminals
|
|
311
|
+
- coordination.md handles this
|
|
312
|
+
- Lightweight, role-agnostic
|
|
313
|
+
- Tracks sessions, files, contracts, activity
|
|
314
|
+
- Prevents conflicts without adding role complexity
|
|
315
|
+
|
|
316
|
+
**Without this distinction, users will either:**
|
|
317
|
+
- Remove coordination entirely → conflicts when running parallel instances
|
|
318
|
+
- Keep role-based agents → unnecessary complexity for solo devs
|
|
319
|
+
|
|
320
|
+
#### Implementation Requirements for Anvil Repo
|
|
321
|
+
|
|
322
|
+
1. **Add coordination.md template** to `project/` directory
|
|
323
|
+
2. **Add coordination section** to generalist agent template
|
|
324
|
+
3. **Document in installation plan**:
|
|
325
|
+
- "If you ever run multiple Claude Code terminals simultaneously, you need coordination.md"
|
|
326
|
+
- "This is NOT about agent roles — it's about parallel instances"
|
|
327
|
+
4. **Update README** to explain the distinction
|
|
328
|
+
5. **Add to daily workflow**:
|
|
329
|
+
- Session start: Check coordination.md, register session
|
|
330
|
+
- Session end: Update coordination.md, log completion
|
|
331
|
+
|
|
332
|
+
#### Example Scenario
|
|
333
|
+
|
|
334
|
+
**Without coordination.md:**
|
|
335
|
+
```
|
|
336
|
+
You: "Work on the login page" (Terminal A)
|
|
337
|
+
You: "Fix the auth bug" (Terminal B)
|
|
338
|
+
Both terminals: Modify src/services/auth.ts simultaneously
|
|
339
|
+
Result: Merge conflict, wasted work, confusion
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**With coordination.md:**
|
|
343
|
+
```
|
|
344
|
+
Terminal A: Checks coordination.md, registers session-001, claims src/pages/Login.tsx
|
|
345
|
+
Terminal B: Checks coordination.md, sees Terminal A is in auth area
|
|
346
|
+
Terminal B: Either waits, picks different work, or coordinates via the file
|
|
347
|
+
Result: No conflicts, clear record of who did what
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
#### Key Quotes to Remember
|
|
351
|
+
|
|
352
|
+
> "Role-based agents add overhead. Parallel coordination prevents conflicts. These are not the same thing."
|
|
353
|
+
|
|
354
|
+
> "A single generalist with 21 skills beats 5 specialists arguing about boundaries."
|
|
355
|
+
|
|
356
|
+
> "You don't need a Backend Agent and a Frontend Agent. You need to know if another terminal is editing the same file."
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## Final Recommendations for Repo Update
|
|
361
|
+
|
|
362
|
+
> Completed after Phase 5
|
|
363
|
+
|
|
364
|
+
### High Priority Changes
|
|
365
|
+
|
|
366
|
+
1. **Add coordination.md template** — Essential for parallel instance coordination
|
|
367
|
+
- Location: `project/coordination.md`
|
|
368
|
+
- Status: ✅ DONE during installation
|
|
369
|
+
|
|
370
|
+
2. **Fix pre-commit stage names** — Use `pre-commit` not deprecated `commit`
|
|
371
|
+
- Status: ✅ DONE during installation
|
|
372
|
+
|
|
373
|
+
3. **Simplify Semgrep rules** — Remove false-positive-prone rules
|
|
374
|
+
- Reduced from 187 to 99 lines
|
|
375
|
+
- Status: ✅ DONE during installation
|
|
376
|
+
|
|
377
|
+
4. **Document role-based vs parallel coordination distinction**
|
|
378
|
+
- This is the most important learning
|
|
379
|
+
- Status: ✅ Documented in retro notes (General Observations section)
|
|
380
|
+
|
|
381
|
+
5. **Rename Phase 3** — "Architecture Transition" not "Agent → Skill Conversion"
|
|
382
|
+
- For fresh installs: "Create Your First Skill"
|
|
383
|
+
- For migrations: "Archive Multi-Agent System"
|
|
384
|
+
|
|
385
|
+
### Medium Priority Changes
|
|
386
|
+
|
|
387
|
+
1. **Add product.md prompts** — Questions to help users fill in their product.md
|
|
388
|
+
2. **Add constitution.md questionnaire** — Help users define their non-negotiables
|
|
389
|
+
3. **Better idempotency messaging** — Show "already installed" vs "newly installed"
|
|
390
|
+
4. **Add Linear team discovery step** — Users may not know their team name
|
|
391
|
+
5. **Exclude tsconfig from JSON check** — They use JSONC with comments
|
|
392
|
+
|
|
393
|
+
### Nice to Have
|
|
394
|
+
|
|
395
|
+
1. **Installation script** — Single command to run all phases
|
|
396
|
+
2. **Verification script** — Automated Phase 5 checks
|
|
397
|
+
3. **Rollback script** — Restore from backup if needed
|
|
398
|
+
|
|
399
|
+
### Phase 3 Replacement Decision
|
|
400
|
+
|
|
401
|
+
For the public Anvil repo:
|
|
402
|
+
|
|
403
|
+
- [ ] Move current Phase 3 to "Appendix: Migration Guide"
|
|
404
|
+
- [x] Replace with "Create Your First Skill" tutorial for fresh installs
|
|
405
|
+
- [ ] Keep migration guide for teams coming from multi-agent systems
|
|
406
|
+
|
|
407
|
+
**Recommended approach**: Split into two paths:
|
|
408
|
+
1. **Fresh Install Path**: Phases 0-2, then "Create Your First Skill"
|
|
409
|
+
2. **Migration Path**: Phases 0-2, then "Archive Multi-Agent System", then existing Phase 3
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## Installation Time Summary
|
|
414
|
+
|
|
415
|
+
| Phase | Planned | Actual | Notes |
|
|
416
|
+
|-------|---------|--------|-------|
|
|
417
|
+
| 0: Backup & Prerequisites | 30 min | 15 min | Tools already installed |
|
|
418
|
+
| 1: Global Installation | 30 min | 20 min | Commands already present from earlier attempt |
|
|
419
|
+
| 2: Project Installation | 1 hour | 30 min | Hooks already configured |
|
|
420
|
+
| 3: Agent → Skill Conversion | 2-3 hours | 45 min | Skills already extracted |
|
|
421
|
+
| 4: Quality Gates Setup | 1 hour | 40 min | CI already existed |
|
|
422
|
+
| 5: Validation & Testing | 1-2 hours | 30 min | Straightforward verification |
|
|
423
|
+
| **Total** | **6-8 hours** | **~3 hours** | Migration from existing setup |
|
|
424
|
+
|
|
425
|
+
**Note**: Actual time was shorter because this was a migration from an existing multi-agent system, not a fresh install. Skills were already extracted, hooks were already configured, CI was already in place.
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## Post-Installation Findings
|
|
431
|
+
|
|
432
|
+
### Linear CLI vs Linear MCP
|
|
433
|
+
|
|
434
|
+
**Issue discovered during `/orient` test:**
|
|
435
|
+
|
|
436
|
+
The `/orient` command said "Query Linear MCP" but Claude Code in terminal tried to use a Linear CLI script. The CLI call failed because:
|
|
437
|
+
1. Wrong subcommand: `list` instead of `list-issues`
|
|
438
|
+
2. Wrong flag: `--state` instead of `--status`
|
|
439
|
+
|
|
440
|
+
**Root cause**: Commands need explicit CLI syntax for Claude Code, not just "Query Linear MCP".
|
|
441
|
+
|
|
442
|
+
**Fix applied to orient.md** (both global and Anvil repo):
|
|
443
|
+
```bash
|
|
444
|
+
# Correct syntax
|
|
445
|
+
python3 ~/.claude/skills/linear-skill/scripts/linear.py list-issues --status "In Progress" --limit 10
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
**Lesson for Anvil**: Commands should provide explicit bash examples for any tool integrations, because:
|
|
449
|
+
- Claude.ai uses MCP tools
|
|
450
|
+
- Claude Code uses CLI/bash directly
|
|
451
|
+
- Without explicit syntax, Claude Code will guess (often incorrectly)
|
|
452
|
+
|
|
453
|
+
**Commands to review for similar issues**:
|
|
454
|
+
- `/ready` - May also reference Linear
|
|
455
|
+
- `/tasks` - Creates Linear issues
|
|
456
|
+
- Any other commands that integrate with external tools
|
|
457
|
+
|
|
458
|
+
**Design principle**: Anvil commands should be "context-aware" - providing both MCP instructions AND explicit CLI syntax where applicable.
|