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
package/docs/sync.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Anvil Sync
|
|
2
|
+
|
|
3
|
+
Keep your projects and global config up-to-date with the latest Anvil framework.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# From the anvil-dev-framework directory:
|
|
9
|
+
|
|
10
|
+
# Sync global config (~/.claude/)
|
|
11
|
+
./scripts/sync.sh --global
|
|
12
|
+
|
|
13
|
+
# Sync a specific project
|
|
14
|
+
./scripts/sync.sh --project /path/to/myproject
|
|
15
|
+
|
|
16
|
+
# Sync both
|
|
17
|
+
./scripts/sync.sh --global --project /path/to/myproject
|
|
18
|
+
|
|
19
|
+
# Preview changes without applying
|
|
20
|
+
./scripts/sync.sh --project . --dry-run
|
|
21
|
+
|
|
22
|
+
# Force overwrite protected files
|
|
23
|
+
./scripts/sync.sh --project . --force
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Setting Up Easy Access
|
|
27
|
+
|
|
28
|
+
Add to your `~/.zshrc` or `~/.bashrc`:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Anvil framework location
|
|
32
|
+
export ANVIL_HOME="$HOME/Projects/anvil-dev-framework"
|
|
33
|
+
|
|
34
|
+
# Anvil sync alias
|
|
35
|
+
alias anvil-sync="$ANVIL_HOME/scripts/sync.sh"
|
|
36
|
+
|
|
37
|
+
# Quick sync current project
|
|
38
|
+
alias anvil-sync-here="$ANVIL_HOME/scripts/sync.sh --project ."
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Then reload: `source ~/.zshrc`
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
anvil-sync [OPTIONS]
|
|
47
|
+
|
|
48
|
+
Targets:
|
|
49
|
+
--global Sync to ~/.claude/ (global config)
|
|
50
|
+
--project PATH Sync to a specific project
|
|
51
|
+
--all Sync global + all registered projects
|
|
52
|
+
|
|
53
|
+
Options:
|
|
54
|
+
--force, -f Overwrite protected files
|
|
55
|
+
--dry-run, -n Preview changes without applying
|
|
56
|
+
--verbose, -v Show detailed output
|
|
57
|
+
--help, -h Show help message
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## What Gets Synced
|
|
61
|
+
|
|
62
|
+
### Always Updated
|
|
63
|
+
| Directory/File | Description |
|
|
64
|
+
|----------------|-------------|
|
|
65
|
+
| `hooks/` | All hook scripts |
|
|
66
|
+
| `examples/` | Reference templates |
|
|
67
|
+
| `agents/` | Sub-agent definitions |
|
|
68
|
+
| `retros/templates/` | Retro templates |
|
|
69
|
+
| `commands/` | Slash commands |
|
|
70
|
+
|
|
71
|
+
### Protected Files (require `--force`)
|
|
72
|
+
| File | Reason |
|
|
73
|
+
|------|--------|
|
|
74
|
+
| `CLAUDE.md` | Project-specific AI instructions |
|
|
75
|
+
| `product.md` | Product definition |
|
|
76
|
+
| `constitution.md` | Project principles |
|
|
77
|
+
| `settings.local.json` | Local permissions |
|
|
78
|
+
| `coordination.md` | Team coordination |
|
|
79
|
+
|
|
80
|
+
## Claude Code Integration
|
|
81
|
+
|
|
82
|
+
Use the `/anvil-sync` command within Claude Code:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
/anvil-sync # Sync current project
|
|
86
|
+
/anvil-sync target:global # Sync global config
|
|
87
|
+
/anvil-sync target:both # Sync both
|
|
88
|
+
/anvil-sync dry-run:true # Preview changes
|
|
89
|
+
/anvil-sync force:true # Overwrite protected files
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Version Tracking
|
|
93
|
+
|
|
94
|
+
After sync, a `.anvil-version` file is created/updated:
|
|
95
|
+
- `~/.claude/.anvil-version` - Global config version
|
|
96
|
+
- `project/.claude/.anvil-version` - Project version
|
|
97
|
+
|
|
98
|
+
Check versions:
|
|
99
|
+
```bash
|
|
100
|
+
cat ~/.claude/.anvil-version
|
|
101
|
+
cat .claude/.anvil-version
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Troubleshooting
|
|
105
|
+
|
|
106
|
+
### "Could not find Anvil installation"
|
|
107
|
+
Set the `ANVIL_HOME` environment variable:
|
|
108
|
+
```bash
|
|
109
|
+
export ANVIL_HOME="$HOME/Projects/anvil-dev-framework"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Hooks not working after sync
|
|
113
|
+
1. Check `settings.local.json` hook paths
|
|
114
|
+
2. Ensure `uv` is installed: `pip install uv`
|
|
115
|
+
3. Verify hook permissions: `chmod +x .claude/hooks/*.py`
|
|
116
|
+
|
|
117
|
+
### Want to reset a customized file
|
|
118
|
+
Use `--force` flag, but backup first:
|
|
119
|
+
```bash
|
|
120
|
+
cp .claude/CLAUDE.md .claude/CLAUDE.md.backup
|
|
121
|
+
./scripts/sync.sh --project . --force
|
|
122
|
+
```
|
package/global/CLAUDE.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Global Claude Configuration
|
|
2
|
+
|
|
3
|
+
> Personal defaults and preferences that apply across all projects.
|
|
4
|
+
|
|
5
|
+
This file is loaded by Claude Code for every project. Keep it focused on universal preferences, not project-specific details.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Identity
|
|
10
|
+
|
|
11
|
+
- **Name**: [Your name]
|
|
12
|
+
- **Role**: Solo developer / Technical founder / etc.
|
|
13
|
+
- **Timezone**: [Your timezone]
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Communication Preferences
|
|
18
|
+
|
|
19
|
+
### Response Style
|
|
20
|
+
- Be direct and concise
|
|
21
|
+
- Skip preambles and unnecessary caveats
|
|
22
|
+
- When uncertain, say so clearly
|
|
23
|
+
- Challenge my assumptions when they seem wrong
|
|
24
|
+
|
|
25
|
+
### Code Style
|
|
26
|
+
- Prefer readability over cleverness
|
|
27
|
+
- Include comments for non-obvious logic
|
|
28
|
+
- Follow existing patterns in the codebase
|
|
29
|
+
- Suggest improvements, don't just implement requests
|
|
30
|
+
|
|
31
|
+
### When I Say...
|
|
32
|
+
- "LGTM" → Proceed with the approach
|
|
33
|
+
- "Try it" → Implement and show results
|
|
34
|
+
- "Think about it" → Analyze but don't implement yet
|
|
35
|
+
- "Ship it" → Finalize and prepare for merge
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Session Protocols
|
|
40
|
+
|
|
41
|
+
### Session Start
|
|
42
|
+
1. Run `/orient` to check for handoffs
|
|
43
|
+
2. Run `/ready` to see available work
|
|
44
|
+
3. Run `/validate` before any changes
|
|
45
|
+
4. Wait for direction before proceeding
|
|
46
|
+
|
|
47
|
+
### During Work
|
|
48
|
+
- File discovered work immediately with `/discover`
|
|
49
|
+
- Update Linear status at phase transitions
|
|
50
|
+
- Stop and report if stuck for >5 minutes
|
|
51
|
+
- Cite file paths and line numbers as evidence
|
|
52
|
+
|
|
53
|
+
### Session End
|
|
54
|
+
- Run `/evidence` before PR creation
|
|
55
|
+
- Run `/handoff` to preserve context
|
|
56
|
+
- Ensure Linear issues reflect true state
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Quality Standards
|
|
61
|
+
|
|
62
|
+
### Before Any Code Change
|
|
63
|
+
- [ ] Git status is clean
|
|
64
|
+
- [ ] On feature branch (not main)
|
|
65
|
+
- [ ] Dependencies installed (`npm ci`)
|
|
66
|
+
- [ ] Tests passing (baseline)
|
|
67
|
+
- [ ] Types passing (baseline)
|
|
68
|
+
|
|
69
|
+
### Before PR Creation
|
|
70
|
+
- [ ] Lint passes (capture output)
|
|
71
|
+
- [ ] Types pass (capture output)
|
|
72
|
+
- [ ] Tests pass (capture output)
|
|
73
|
+
- [ ] Only expected files changed
|
|
74
|
+
- [ ] Evidence included in PR
|
|
75
|
+
|
|
76
|
+
### Code Principles
|
|
77
|
+
1. Read existing code before writing new code
|
|
78
|
+
2. Never speculate about code you haven't opened
|
|
79
|
+
3. Prefer simple solutions over clever abstractions
|
|
80
|
+
4. Match existing patterns in the codebase
|
|
81
|
+
5. Test edge cases, not just happy paths
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Tool Preferences
|
|
86
|
+
|
|
87
|
+
### Task Tracking
|
|
88
|
+
- Primary: Linear
|
|
89
|
+
- Status flow: Backlog → Todo → In Progress → In Review → Done
|
|
90
|
+
- Always set "blocked by" relationships
|
|
91
|
+
- File discovered work immediately
|
|
92
|
+
|
|
93
|
+
### Version Control
|
|
94
|
+
- Branching: `feature/[issue-key]-[slug]`
|
|
95
|
+
- Commits: Conventional commits (feat:, fix:, chore:, etc.)
|
|
96
|
+
- PRs: Include evidence block, link to Linear issue
|
|
97
|
+
|
|
98
|
+
### Code Quality
|
|
99
|
+
- Linting: ESLint with project config
|
|
100
|
+
- Formatting: Prettier with project config
|
|
101
|
+
- Types: Strict TypeScript
|
|
102
|
+
- Testing: Vitest / Jest per project
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Escalation Criteria
|
|
107
|
+
|
|
108
|
+
### Stop and Ask When:
|
|
109
|
+
- Requirements are ambiguous
|
|
110
|
+
- Multiple valid approaches exist
|
|
111
|
+
- Change affects security or authentication
|
|
112
|
+
- Scope seems to be expanding
|
|
113
|
+
- You've tried the same fix 3+ times
|
|
114
|
+
|
|
115
|
+
### Never Do Without Asking:
|
|
116
|
+
- Delete files or data
|
|
117
|
+
- Modify environment variables
|
|
118
|
+
- Change authentication logic
|
|
119
|
+
- Update dependencies to major versions
|
|
120
|
+
- Merge to main branch
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Learning Preferences
|
|
125
|
+
|
|
126
|
+
### When I Make Mistakes
|
|
127
|
+
- Point them out directly
|
|
128
|
+
- Explain why it's a mistake
|
|
129
|
+
- Suggest the correct approach
|
|
130
|
+
- Don't apologize excessively
|
|
131
|
+
|
|
132
|
+
### When You Make Mistakes
|
|
133
|
+
- Acknowledge clearly
|
|
134
|
+
- Explain what went wrong
|
|
135
|
+
- Fix without over-explaining
|
|
136
|
+
- Learn and don't repeat
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
*This file should be customized to your personal preferences. Project-specific settings go in the project's `.claude/CLAUDE.md`.*
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# verify-app - Verification Subagent
|
|
2
|
+
|
|
3
|
+
> Specialized subagent for running project verification checks.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Isolates verification context (test output, lint errors, type check results) from the main session to prevent context pollution.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
- Before committing code
|
|
12
|
+
- Before creating PRs
|
|
13
|
+
- During stop hook verification
|
|
14
|
+
- In Ralph Wiggum mode iteration checks
|
|
15
|
+
|
|
16
|
+
## Configuration
|
|
17
|
+
|
|
18
|
+
This agent is invoked via the Task tool:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
Task(
|
|
22
|
+
subagent_type="verify-app",
|
|
23
|
+
prompt="Run full verification suite and report results as JSON",
|
|
24
|
+
model="haiku"
|
|
25
|
+
)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Available Tools
|
|
29
|
+
|
|
30
|
+
| Tool | Purpose |
|
|
31
|
+
|------|---------|
|
|
32
|
+
| Bash | Run test/lint/type commands |
|
|
33
|
+
| Read | Read config files |
|
|
34
|
+
| Glob | Find project files |
|
|
35
|
+
|
|
36
|
+
## Expected Behavior
|
|
37
|
+
|
|
38
|
+
The agent will:
|
|
39
|
+
1. Detect the project type (npm, python, cargo, go)
|
|
40
|
+
2. Run the test suite
|
|
41
|
+
3. Run the linter
|
|
42
|
+
4. Run the type checker
|
|
43
|
+
5. Return structured JSON results
|
|
44
|
+
|
|
45
|
+
## Output Format
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"overall": "pass",
|
|
50
|
+
"tests": {
|
|
51
|
+
"passed": true,
|
|
52
|
+
"count": 47,
|
|
53
|
+
"duration_ms": 3200,
|
|
54
|
+
"failures": []
|
|
55
|
+
},
|
|
56
|
+
"lint": {
|
|
57
|
+
"passed": true,
|
|
58
|
+
"errors": 0,
|
|
59
|
+
"warnings": 3
|
|
60
|
+
},
|
|
61
|
+
"types": {
|
|
62
|
+
"passed": true,
|
|
63
|
+
"errors": 0
|
|
64
|
+
},
|
|
65
|
+
"summary": "All 47 tests passed. Lint clean. Types clean."
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Failure Output
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"overall": "fail",
|
|
74
|
+
"tests": {
|
|
75
|
+
"passed": false,
|
|
76
|
+
"count": 47,
|
|
77
|
+
"failures": [
|
|
78
|
+
{
|
|
79
|
+
"file": "src/auth/login.test.ts",
|
|
80
|
+
"line": 45,
|
|
81
|
+
"message": "Expected 200, got 401"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"lint": {
|
|
86
|
+
"passed": true,
|
|
87
|
+
"errors": 0
|
|
88
|
+
},
|
|
89
|
+
"types": {
|
|
90
|
+
"passed": true,
|
|
91
|
+
"errors": 0
|
|
92
|
+
},
|
|
93
|
+
"summary": "1 test failure. See failures array for details."
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Prompt
|
|
98
|
+
|
|
99
|
+
The agent uses this specialized prompt:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
You are a verification agent. Your sole purpose is to run project checks and report results.
|
|
103
|
+
|
|
104
|
+
## Your Task
|
|
105
|
+
1. Detect project type from package.json, pyproject.toml, Cargo.toml, or go.mod
|
|
106
|
+
2. Run the test suite
|
|
107
|
+
3. Run the linter
|
|
108
|
+
4. Run the type checker
|
|
109
|
+
5. Report results in JSON format
|
|
110
|
+
|
|
111
|
+
## Commands by Project Type
|
|
112
|
+
|
|
113
|
+
### Node.js (package.json)
|
|
114
|
+
- Tests: npm test
|
|
115
|
+
- Lint: npm run lint
|
|
116
|
+
- Types: npm run typecheck
|
|
117
|
+
|
|
118
|
+
### Python (pyproject.toml)
|
|
119
|
+
- Tests: pytest
|
|
120
|
+
- Lint: ruff check .
|
|
121
|
+
- Types: mypy .
|
|
122
|
+
|
|
123
|
+
### Rust (Cargo.toml)
|
|
124
|
+
- Tests: cargo test
|
|
125
|
+
- Lint: cargo clippy
|
|
126
|
+
- Types: (included in clippy)
|
|
127
|
+
|
|
128
|
+
### Go (go.mod)
|
|
129
|
+
- Tests: go test ./...
|
|
130
|
+
- Lint: golangci-lint run
|
|
131
|
+
- Types: (included in build)
|
|
132
|
+
|
|
133
|
+
## Rules
|
|
134
|
+
- Run ALL checks, even if one fails
|
|
135
|
+
- Capture full error output for failures
|
|
136
|
+
- Include file and line numbers when available
|
|
137
|
+
- Never attempt to fix issues, only report
|
|
138
|
+
- Always output valid JSON
|
|
139
|
+
|
|
140
|
+
## Output Format
|
|
141
|
+
Always respond with ONLY a JSON object:
|
|
142
|
+
{
|
|
143
|
+
"overall": "pass" | "fail",
|
|
144
|
+
"tests": { "passed": bool, "count": int, "failures": array },
|
|
145
|
+
"lint": { "passed": bool, "errors": int, "warnings": int },
|
|
146
|
+
"types": { "passed": bool, "errors": int },
|
|
147
|
+
"summary": "one-line human summary"
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Benefits
|
|
152
|
+
|
|
153
|
+
| Benefit | Description |
|
|
154
|
+
|---------|-------------|
|
|
155
|
+
| Context isolation | Test output doesn't pollute main session |
|
|
156
|
+
| Fast execution | Uses haiku model for quick checks |
|
|
157
|
+
| Structured output | JSON format for easy parsing |
|
|
158
|
+
| Comprehensive | Runs all checks, not just one |
|
|
159
|
+
|
|
160
|
+
## Integration Points
|
|
161
|
+
|
|
162
|
+
- Used by: `/test-and-commit`, stop hooks, Ralph mode
|
|
163
|
+
- Invoked via: Task tool with `subagent_type="verify-app"`
|
|
164
|
+
- Returns: Structured JSON for programmatic handling
|