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,297 @@
|
|
|
1
|
+
# Anvil Simplification Plan Template
|
|
2
|
+
|
|
3
|
+
> Template for auditing and simplifying Anvil installations that have accumulated complexity.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Pre-Audit Checklist
|
|
8
|
+
|
|
9
|
+
Before simplifying, gather baseline metrics:
|
|
10
|
+
|
|
11
|
+
- [ ] Count total sub-agents
|
|
12
|
+
- [ ] Count total skills
|
|
13
|
+
- [ ] Count total commands
|
|
14
|
+
- [ ] Check retro utilization (retros written in last 30 days)
|
|
15
|
+
- [ ] Check session management usage
|
|
16
|
+
- [ ] Review comms.md last activity date
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Phase 1: Remove Unused Infrastructure
|
|
21
|
+
|
|
22
|
+
**Estimated effort:** 30 minutes
|
|
23
|
+
**Risk:** Low
|
|
24
|
+
|
|
25
|
+
### 1.1 Session Management
|
|
26
|
+
|
|
27
|
+
Check for session-*.md files. If session management isn't actively used:
|
|
28
|
+
|
|
29
|
+
- [ ] Archive session-start.md
|
|
30
|
+
- [ ] Archive session-end.md
|
|
31
|
+
- [ ] Archive session-current.md
|
|
32
|
+
- [ ] Archive session-help.md
|
|
33
|
+
- [ ] Archive session-list.md
|
|
34
|
+
- [ ] Archive session-update.md
|
|
35
|
+
|
|
36
|
+
**Action:** Move to `commands/archived/`
|
|
37
|
+
|
|
38
|
+
### 1.2 Coordination Files
|
|
39
|
+
|
|
40
|
+
If not running parallel agents:
|
|
41
|
+
|
|
42
|
+
- [ ] Archive comms.md
|
|
43
|
+
- [ ] Archive comms.template.md
|
|
44
|
+
|
|
45
|
+
### 1.3 Heavy Orchestration
|
|
46
|
+
|
|
47
|
+
If scrum master or similar heavy orchestration isn't used:
|
|
48
|
+
|
|
49
|
+
- [ ] Archive scrum-master.md or equivalent
|
|
50
|
+
- [ ] Create lightweight replacement (see `/sprint` command)
|
|
51
|
+
|
|
52
|
+
### 1.4 Create Simple Handoff
|
|
53
|
+
|
|
54
|
+
If handoff doesn't exist or is overly complex:
|
|
55
|
+
|
|
56
|
+
- [ ] Create/update `/handoff` command
|
|
57
|
+
- [ ] Create `.claude/handoffs/` directory
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Phase 2: Sub-Agent Consolidation
|
|
62
|
+
|
|
63
|
+
**Estimated effort:** 2-3 hours
|
|
64
|
+
**Risk:** Medium
|
|
65
|
+
|
|
66
|
+
### 2.1 Audit Sub-Agents
|
|
67
|
+
|
|
68
|
+
For each sub-agent, evaluate:
|
|
69
|
+
|
|
70
|
+
| Sub-Agent | Used? | Value? | Alternative |
|
|
71
|
+
|-----------|-------|--------|-------------|
|
|
72
|
+
| [name] | Y/N | H/M/L | Skill / Delete |
|
|
73
|
+
|
|
74
|
+
### 2.2 Decision Criteria
|
|
75
|
+
|
|
76
|
+
**KEEP** a sub-agent if:
|
|
77
|
+
- Task benefits from adversarial/fresh perspective (security review)
|
|
78
|
+
- Task has bounded scope with specific methodology (debugging)
|
|
79
|
+
- Context isolation is genuinely valuable
|
|
80
|
+
|
|
81
|
+
**CONVERT to skill** if:
|
|
82
|
+
- It's mainly a checklist or methodology
|
|
83
|
+
- Same context as main work is fine
|
|
84
|
+
- Doesn't need "fresh eyes"
|
|
85
|
+
|
|
86
|
+
**DELETE** if:
|
|
87
|
+
- Redundant with other sub-agents
|
|
88
|
+
- One-off use case (do manually when needed)
|
|
89
|
+
- Not actually used
|
|
90
|
+
|
|
91
|
+
### 2.3 Recommended Keeps (Typical)
|
|
92
|
+
|
|
93
|
+
- `security-code-reviewer` — Adversarial review benefits from fresh perspective
|
|
94
|
+
- `cross-layer-debugger` — Bounded methodology, context isolation helps
|
|
95
|
+
|
|
96
|
+
### 2.4 Conversion Template
|
|
97
|
+
|
|
98
|
+
When converting sub-agent to skill:
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
## [Process Name] (from [sub-agent-name])
|
|
102
|
+
|
|
103
|
+
### When to Apply
|
|
104
|
+
- [Trigger condition 1]
|
|
105
|
+
- [Trigger condition 2]
|
|
106
|
+
|
|
107
|
+
### Process
|
|
108
|
+
1. [Step 1]
|
|
109
|
+
2. [Step 2]
|
|
110
|
+
3. [Step 3]
|
|
111
|
+
|
|
112
|
+
### Checklist
|
|
113
|
+
- [ ] [Verification 1]
|
|
114
|
+
- [ ] [Verification 2]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Phase 3: Simplify Planning & Orchestration
|
|
120
|
+
|
|
121
|
+
**Estimated effort:** 1.5 hours
|
|
122
|
+
**Risk:** Low
|
|
123
|
+
|
|
124
|
+
### 3.1 Clarify Planning Responsibilities
|
|
125
|
+
|
|
126
|
+
| Function | Tool | When |
|
|
127
|
+
|----------|------|------|
|
|
128
|
+
| Task breakdown | Claude Code native `/plan` | During implementation |
|
|
129
|
+
| Work prioritization | `/sprint` command | Start of session |
|
|
130
|
+
| Learning synthesis | `/insights` command | End of session / weekly |
|
|
131
|
+
|
|
132
|
+
### 3.2 Create Lightweight /sprint Command
|
|
133
|
+
|
|
134
|
+
Replace heavy scrum master with:
|
|
135
|
+
|
|
136
|
+
```markdown
|
|
137
|
+
# /sprint - Session Planning
|
|
138
|
+
|
|
139
|
+
Query Linear state and suggest priorities.
|
|
140
|
+
|
|
141
|
+
## Process
|
|
142
|
+
1. Query blocked, in-progress, in-review, todo issues
|
|
143
|
+
2. Present state summary table
|
|
144
|
+
3. Suggest top 3 priorities (blocked first, then age)
|
|
145
|
+
4. Show blockers requiring attention
|
|
146
|
+
|
|
147
|
+
## What This Is NOT
|
|
148
|
+
- No WSJF calculations
|
|
149
|
+
- No agent routing
|
|
150
|
+
- No dependency graphs
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Phase 4: Fix Retrospective System
|
|
156
|
+
|
|
157
|
+
**Estimated effort:** 1.5 hours
|
|
158
|
+
**Risk:** Low
|
|
159
|
+
|
|
160
|
+
### 4.1 Simplify Retro Format
|
|
161
|
+
|
|
162
|
+
Replace YAML frontmatter with narrative:
|
|
163
|
+
|
|
164
|
+
```markdown
|
|
165
|
+
# [ISSUE-ID]: [Brief Title]
|
|
166
|
+
|
|
167
|
+
**Outcome:** success | partial | failed
|
|
168
|
+
**Date:** YYYY-MM-DD
|
|
169
|
+
|
|
170
|
+
## What Happened
|
|
171
|
+
[Narrative - what you tried, what worked, what didn't]
|
|
172
|
+
|
|
173
|
+
## Learnings
|
|
174
|
+
- [Concrete thing learned]
|
|
175
|
+
|
|
176
|
+
## For Next Time
|
|
177
|
+
- [Specific actionable improvement]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### 4.2 Create /insights Command
|
|
181
|
+
|
|
182
|
+
For periodic synthesis instead of per-retro structure:
|
|
183
|
+
|
|
184
|
+
- Read retros from last 2 weeks
|
|
185
|
+
- Identify patterns (3+ occurrences)
|
|
186
|
+
- Categorize (process, tooling, knowledge, codebase)
|
|
187
|
+
- Output actionable insights
|
|
188
|
+
|
|
189
|
+
### 4.3 Archive Complex Scripts
|
|
190
|
+
|
|
191
|
+
- Archive aggregate_retros.py if replaced by /insights
|
|
192
|
+
- Archive structured INSIGHTS.md (regenerate from command)
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Phase 5: Add Quality Gates Guidance
|
|
197
|
+
|
|
198
|
+
**Estimated effort:** 1 hour
|
|
199
|
+
**Risk:** Low
|
|
200
|
+
|
|
201
|
+
### 5.1 Create Quality Gates Skill
|
|
202
|
+
|
|
203
|
+
Framework-agnostic patterns for:
|
|
204
|
+
- Pre-commit (fast, staged files)
|
|
205
|
+
- Pre-push (thorough, changed files)
|
|
206
|
+
- CI (comprehensive, full suite)
|
|
207
|
+
|
|
208
|
+
### 5.2 Project-Specific Implementation
|
|
209
|
+
|
|
210
|
+
Quality gates skill provides patterns. Projects implement:
|
|
211
|
+
- Git hooks tooling (husky, pre-commit, etc.)
|
|
212
|
+
- CI configuration
|
|
213
|
+
- Project CONTRIBUTING.md docs
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Phase 6: Enhance Generalist Prompt
|
|
218
|
+
|
|
219
|
+
**Estimated effort:** 30 minutes
|
|
220
|
+
**Risk:** Low
|
|
221
|
+
|
|
222
|
+
### 6.1 Add Anti-Patterns Section
|
|
223
|
+
|
|
224
|
+
```markdown
|
|
225
|
+
## Anti-Patterns to Avoid
|
|
226
|
+
|
|
227
|
+
Before implementing, verify you're NOT doing:
|
|
228
|
+
|
|
229
|
+
- [ ] Premature abstraction (Rule of Three)
|
|
230
|
+
- [ ] Adding files without need (prefer editing)
|
|
231
|
+
- [ ] Over-engineering (simplest solution)
|
|
232
|
+
- [ ] Ignoring existing patterns (check first)
|
|
233
|
+
- [ ] Large PRs (break into chunks)
|
|
234
|
+
- [ ] Skipping exploration (always EXPLORE first)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### 6.2 Add Confidence Checkpoints
|
|
238
|
+
|
|
239
|
+
```markdown
|
|
240
|
+
## Confidence Checkpoints
|
|
241
|
+
|
|
242
|
+
Rate confidence at each stage (1-10):
|
|
243
|
+
|
|
244
|
+
| Confidence | Action |
|
|
245
|
+
|------------|--------|
|
|
246
|
+
| 8-10 | Proceed |
|
|
247
|
+
| 5-7 | Document uncertainty, proceed cautiously |
|
|
248
|
+
| 1-4 | STOP. Explain. Ask for guidance. |
|
|
249
|
+
|
|
250
|
+
After 2 failed attempts: Stop. Reassess. Escalate.
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Validation Checklist
|
|
256
|
+
|
|
257
|
+
After implementation:
|
|
258
|
+
|
|
259
|
+
### Structure
|
|
260
|
+
- [ ] Sub-agents: ≤ 2 (security + debugging typical)
|
|
261
|
+
- [ ] Commands: Core workflow only (no unused)
|
|
262
|
+
- [ ] Session management: Archived if unused
|
|
263
|
+
- [ ] Orchestration: Lightweight or removed
|
|
264
|
+
|
|
265
|
+
### Skills
|
|
266
|
+
- [ ] Converted sub-agent methodology added
|
|
267
|
+
- [ ] Quality gates skill exists
|
|
268
|
+
- [ ] No orphan references to deleted sub-agents
|
|
269
|
+
|
|
270
|
+
### Documentation
|
|
271
|
+
- [ ] SKILLS-INVENTORY.md updated
|
|
272
|
+
- [ ] Command references current
|
|
273
|
+
- [ ] Archived items clearly marked
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Success Metrics
|
|
278
|
+
|
|
279
|
+
### Quantitative
|
|
280
|
+
- Sub-agents reduced to 2 or fewer
|
|
281
|
+
- Command files reduced by ~50-70%
|
|
282
|
+
- Retro utilization improved (target: 1+/week)
|
|
283
|
+
|
|
284
|
+
### Qualitative
|
|
285
|
+
- Framework matches actual usage pattern
|
|
286
|
+
- Lower cognitive overhead
|
|
287
|
+
- Retros actually get written
|
|
288
|
+
- Skills contain actionable methodology
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## Notes
|
|
293
|
+
|
|
294
|
+
- Archive rather than delete when uncertain
|
|
295
|
+
- Framework stays project-agnostic
|
|
296
|
+
- Project-specific tooling belongs in projects
|
|
297
|
+
- Run real task after simplification to validate
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Anvil Simplification Principles
|
|
2
|
+
|
|
3
|
+
> Guidance for maintaining framework simplicity based on research and practical experience.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Research Foundation
|
|
8
|
+
|
|
9
|
+
Based on Google/MIT multi-agent research (December 2025, "Towards a Science of Scaling Agent Systems"):
|
|
10
|
+
|
|
11
|
+
| Metric | Single Agent | Multi-Agent |
|
|
12
|
+
|--------|--------------|-------------|
|
|
13
|
+
| Tasks per 1000 tokens | 67 | 14-21 |
|
|
14
|
+
| Sequential task performance | baseline | -39% to -70% |
|
|
15
|
+
| Error amplification | 1x | 4.4x - 17.2x |
|
|
16
|
+
|
|
17
|
+
**Key finding**: Once single-agent success exceeds 45%, adding agents produces diminishing or negative returns.
|
|
18
|
+
|
|
19
|
+
**Implication**: Coding is sequential. A single enhanced agent outperforms multi-agent coordination.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Core Architecture Principles
|
|
24
|
+
|
|
25
|
+
### 1. Single Agent, Enhanced Context
|
|
26
|
+
|
|
27
|
+
**Do**: Enhance one agent with skills (just-in-time knowledge loading)
|
|
28
|
+
**Don't**: Create multiple specialized agents that coordinate
|
|
29
|
+
|
|
30
|
+
The generalist agent with on-demand skills is the pattern. Sub-agents should be rare exceptions for truly adversarial tasks (security review, debugging from fresh perspective).
|
|
31
|
+
|
|
32
|
+
### 2. Commands Over Agents
|
|
33
|
+
|
|
34
|
+
**Do**: Create commands that structure workflow phases
|
|
35
|
+
**Don't**: Create agents that spawn other agents
|
|
36
|
+
|
|
37
|
+
Commands are instructions the human triggers. They guide behavior without adding coordination overhead.
|
|
38
|
+
|
|
39
|
+
### 3. Skills Over Sub-Agents
|
|
40
|
+
|
|
41
|
+
When you think you need a sub-agent, ask: "Could this be a skill instead?"
|
|
42
|
+
|
|
43
|
+
| Sub-Agent Need | Skill Alternative |
|
|
44
|
+
|----------------|-------------------|
|
|
45
|
+
| API designer | API design patterns skill |
|
|
46
|
+
| Test writer | Testing strategies skill |
|
|
47
|
+
| Code reviewer | Code review checklist in skill |
|
|
48
|
+
| Documentation | Documentation standards skill |
|
|
49
|
+
|
|
50
|
+
**Exception criteria for sub-agents**:
|
|
51
|
+
- Task benefits from adversarial/fresh perspective (security review)
|
|
52
|
+
- Task has bounded scope with specific methodology (cross-layer debugging)
|
|
53
|
+
- Context isolation is genuinely valuable
|
|
54
|
+
|
|
55
|
+
### 4. Minimal Orchestration
|
|
56
|
+
|
|
57
|
+
**Do**: Let the human orchestrate (select task, approve work)
|
|
58
|
+
**Don't**: Build automated orchestration layers
|
|
59
|
+
|
|
60
|
+
Session management, scrum master agents, and coordination protocols add complexity without proportional benefit for single-developer workflows.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## What Belongs in Anvil vs. Projects
|
|
65
|
+
|
|
66
|
+
### Framework (Anvil)
|
|
67
|
+
- Command definitions and workflows
|
|
68
|
+
- Skill templates
|
|
69
|
+
- Quality gate patterns
|
|
70
|
+
- Documentation standards
|
|
71
|
+
|
|
72
|
+
### Project-Specific
|
|
73
|
+
- Project constitution (constraints, patterns)
|
|
74
|
+
- Product context
|
|
75
|
+
- Project-specific examples
|
|
76
|
+
- Applied skills with project context
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Anti-Patterns to Avoid
|
|
81
|
+
|
|
82
|
+
### 1. Premature Abstraction
|
|
83
|
+
Wait for the Rule of Three before abstracting. Three instances of similar code/patterns before creating a shared abstraction.
|
|
84
|
+
|
|
85
|
+
### 2. Sub-Agent Proliferation
|
|
86
|
+
More agents ≠ better outcomes. Each sub-agent adds:
|
|
87
|
+
- Context switching cost
|
|
88
|
+
- Coordination overhead
|
|
89
|
+
- Error amplification risk
|
|
90
|
+
|
|
91
|
+
### 3. Over-Structured Retrospectives
|
|
92
|
+
Complex YAML frontmatter and rigid structures create friction → retros don't get written.
|
|
93
|
+
|
|
94
|
+
**Better**: Narrative-first format, periodic synthesis.
|
|
95
|
+
|
|
96
|
+
### 4. Unused Infrastructure
|
|
97
|
+
If a feature isn't being used (e.g., session management with 0 active sessions), remove it. Dead code and dead processes add cognitive overhead.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Decision Framework
|
|
102
|
+
|
|
103
|
+
When considering adding complexity, ask:
|
|
104
|
+
|
|
105
|
+
1. **Is this solving a real problem?** (Not hypothetical future needs)
|
|
106
|
+
2. **Is the simplest solution insufficient?** (Could a checklist work instead of automation?)
|
|
107
|
+
3. **Will this be used regularly?** (If weekly or less, maybe don't automate)
|
|
108
|
+
4. **Does this match the actual usage pattern?** (Single developer? Don't build for teams)
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Recommended Simplification Checklist
|
|
113
|
+
|
|
114
|
+
When inheriting or auditing an Anvil installation:
|
|
115
|
+
|
|
116
|
+
- [ ] Count active sub-agents — should be 0-2
|
|
117
|
+
- [ ] Check session management — if unused, archive it
|
|
118
|
+
- [ ] Review skills — are they being triggered? Remove unused ones
|
|
119
|
+
- [ ] Check retrospective utilization — simplify format if low adoption
|
|
120
|
+
- [ ] Verify command usage — archive unused commands
|
|
121
|
+
- [ ] Audit orchestration layers — remove coordination without value
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## References
|
|
126
|
+
|
|
127
|
+
- Google/MIT: "Towards a Science of Scaling Agent Systems" (Dec 2025)
|
|
128
|
+
- Anthropic: Claude prompting best practices
|
|
129
|
+
- Anvil command reference: `docs/command-reference.md`
|