@cluesmith/codev 1.6.2 → 2.0.0-rc.10
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/bin/porch.js +12 -0
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +25 -14
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/index.d.ts +1 -0
- package/dist/agent-farm/commands/index.d.ts.map +1 -1
- package/dist/agent-farm/commands/index.js +1 -0
- package/dist/agent-farm/commands/index.js.map +1 -1
- package/dist/agent-farm/commands/kickoff.d.ts +20 -0
- package/dist/agent-farm/commands/kickoff.d.ts.map +1 -0
- package/dist/agent-farm/commands/kickoff.js +273 -0
- package/dist/agent-farm/commands/kickoff.js.map +1 -0
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +30 -96
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/start.d.ts.map +1 -1
- package/dist/agent-farm/commands/start.js +8 -50
- package/dist/agent-farm/commands/start.js.map +1 -1
- package/dist/agent-farm/servers/dashboard-server.js +0 -14
- package/dist/agent-farm/servers/dashboard-server.js.map +1 -1
- package/dist/agent-farm/state.d.ts +0 -10
- package/dist/agent-farm/state.d.ts.map +1 -1
- package/dist/agent-farm/state.js +0 -24
- package/dist/agent-farm/state.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +17 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +17 -1
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +2 -1
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +17 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/porch/checks.d.ts +29 -0
- package/dist/commands/porch/checks.d.ts.map +1 -0
- package/dist/commands/porch/checks.js +141 -0
- package/dist/commands/porch/checks.js.map +1 -0
- package/dist/commands/porch/claude.d.ts +29 -0
- package/dist/commands/porch/claude.d.ts.map +1 -0
- package/dist/commands/porch/claude.js +79 -0
- package/dist/commands/porch/claude.js.map +1 -0
- package/dist/commands/porch/index.d.ts +38 -0
- package/dist/commands/porch/index.d.ts.map +1 -0
- package/dist/commands/porch/index.js +524 -0
- package/dist/commands/porch/index.js.map +1 -0
- package/dist/commands/porch/plan.d.ts +60 -0
- package/dist/commands/porch/plan.d.ts.map +1 -0
- package/dist/commands/porch/plan.js +162 -0
- package/dist/commands/porch/plan.js.map +1 -0
- package/dist/commands/porch/prompts.d.ts +19 -0
- package/dist/commands/porch/prompts.d.ts.map +1 -0
- package/dist/commands/porch/prompts.js +259 -0
- package/dist/commands/porch/prompts.js.map +1 -0
- package/dist/commands/porch/protocol.d.ts +57 -0
- package/dist/commands/porch/protocol.d.ts.map +1 -0
- package/dist/commands/porch/protocol.js +250 -0
- package/dist/commands/porch/protocol.js.map +1 -0
- package/dist/commands/porch/repl.d.ts +33 -0
- package/dist/commands/porch/repl.d.ts.map +1 -0
- package/dist/commands/porch/repl.js +206 -0
- package/dist/commands/porch/repl.js.map +1 -0
- package/dist/commands/porch/run.d.ts +15 -0
- package/dist/commands/porch/run.d.ts.map +1 -0
- package/dist/commands/porch/run.js +551 -0
- package/dist/commands/porch/run.js.map +1 -0
- package/dist/commands/porch/signals.d.ts +35 -0
- package/dist/commands/porch/signals.d.ts.map +1 -0
- package/dist/commands/porch/signals.js +76 -0
- package/dist/commands/porch/signals.js.map +1 -0
- package/dist/commands/porch/state.d.ts +40 -0
- package/dist/commands/porch/state.d.ts.map +1 -0
- package/dist/commands/porch/state.js +153 -0
- package/dist/commands/porch/state.js.map +1 -0
- package/dist/commands/porch/types.d.ts +124 -0
- package/dist/commands/porch/types.d.ts.map +1 -0
- package/dist/commands/porch/types.js +8 -0
- package/dist/commands/porch/types.js.map +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +19 -0
- package/dist/commands/update.js.map +1 -1
- package/dist/lib/scaffold.d.ts +24 -0
- package/dist/lib/scaffold.d.ts.map +1 -1
- package/dist/lib/scaffold.js +78 -0
- package/dist/lib/scaffold.js.map +1 -1
- package/package.json +6 -2
- package/skeleton/porch/prompts/defend.md +103 -0
- package/skeleton/porch/prompts/diagnose.md +70 -0
- package/skeleton/porch/prompts/evaluate.md +132 -0
- package/skeleton/porch/prompts/fix.md +59 -0
- package/skeleton/porch/prompts/implement.md +79 -0
- package/skeleton/porch/prompts/plan.md +74 -0
- package/skeleton/porch/prompts/pr.md +84 -0
- package/skeleton/porch/prompts/review.md +179 -0
- package/skeleton/porch/prompts/specify.md +53 -0
- package/skeleton/porch/prompts/test.md +63 -0
- package/skeleton/porch/prompts/understand.md +61 -0
- package/skeleton/porch/prompts/verify.md +58 -0
- package/skeleton/protocols/bugfix/protocol.json +127 -0
- package/skeleton/protocols/protocol-schema.json +237 -0
- package/skeleton/protocols/spider/prompts/defend.md +215 -0
- package/skeleton/protocols/spider/prompts/evaluate.md +241 -0
- package/skeleton/protocols/spider/prompts/implement.md +149 -0
- package/skeleton/protocols/spider/prompts/plan.md +214 -0
- package/skeleton/protocols/spider/prompts/review.md +217 -0
- package/skeleton/protocols/spider/prompts/specify.md +174 -0
- package/skeleton/protocols/spider/protocol.json +136 -0
- package/skeleton/protocols/spider/templates/plan.md +14 -0
- package/skeleton/protocols/tick/protocol.json +151 -0
- package/skeleton/roles/architect.md +40 -48
- package/skeleton/roles/builder.md +152 -29
- package/templates/dashboard/index.html +0 -27
- package/templates/dashboard/js/utils.js +0 -86
- package/dist/agent-farm/commands/rename.d.ts +0 -13
- package/dist/agent-farm/commands/rename.d.ts.map +0 -1
- package/dist/agent-farm/commands/rename.js +0 -33
- package/dist/agent-farm/commands/rename.js.map +0 -1
- package/templates/dashboard/css/activity.css +0 -151
- package/templates/dashboard/js/activity.js +0 -112
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# Review Phase Prompt
|
|
2
|
+
|
|
3
|
+
You are the **Reviewer** hat in a Ralph-SPIDER loop.
|
|
4
|
+
|
|
5
|
+
## Your Mission
|
|
6
|
+
|
|
7
|
+
Create the final deliverables: PR and review document. This is the capstone of the SPIDER protocol.
|
|
8
|
+
|
|
9
|
+
## Input Context
|
|
10
|
+
|
|
11
|
+
Read these files at the START:
|
|
12
|
+
1. `codev/specs/{project-id}-*.md` - What was requested
|
|
13
|
+
2. `codev/plans/{project-id}-*.md` - How it was built
|
|
14
|
+
3. `codev/status/{project-id}-*.md` - Journey and decisions
|
|
15
|
+
4. All implementation commits (git log)
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
### 1. Create Review Document
|
|
20
|
+
|
|
21
|
+
Create `codev/reviews/{project-id}-{name}.md` with:
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
# Review: {Project Name}
|
|
25
|
+
|
|
26
|
+
## Metadata
|
|
27
|
+
- **ID**: {project-id}
|
|
28
|
+
- **Spec**: `codev/specs/{project-id}-{name}.md`
|
|
29
|
+
- **Plan**: `codev/plans/{project-id}-{name}.md`
|
|
30
|
+
- **Protocol**: ralph-spider
|
|
31
|
+
- **Completed**: {date}
|
|
32
|
+
|
|
33
|
+
## Summary
|
|
34
|
+
|
|
35
|
+
One paragraph summarizing what was built and why.
|
|
36
|
+
|
|
37
|
+
## Implementation Notes
|
|
38
|
+
|
|
39
|
+
### What Went Well
|
|
40
|
+
- Point 1
|
|
41
|
+
- Point 2
|
|
42
|
+
|
|
43
|
+
### Challenges Faced
|
|
44
|
+
- Challenge 1: How it was resolved
|
|
45
|
+
- Challenge 2: How it was resolved
|
|
46
|
+
|
|
47
|
+
### Deviations from Plan
|
|
48
|
+
- Deviation 1: Why it was necessary
|
|
49
|
+
- (or "None - implementation followed plan exactly")
|
|
50
|
+
|
|
51
|
+
## Test Coverage
|
|
52
|
+
|
|
53
|
+
| Category | Count | Passing |
|
|
54
|
+
|----------|-------|---------|
|
|
55
|
+
| Unit tests | X | X |
|
|
56
|
+
| Integration | X | X |
|
|
57
|
+
| Total | X | X |
|
|
58
|
+
|
|
59
|
+
## Files Changed
|
|
60
|
+
|
|
61
|
+
| File | Change Type | Lines Changed |
|
|
62
|
+
|------|-------------|---------------|
|
|
63
|
+
| src/file.ts | Modified | +50, -10 |
|
|
64
|
+
| src/new.ts | Added | +100 |
|
|
65
|
+
| tests/file.test.ts | Added | +75 |
|
|
66
|
+
|
|
67
|
+
## Acceptance Criteria Status
|
|
68
|
+
|
|
69
|
+
| Criterion | Status |
|
|
70
|
+
|-----------|--------|
|
|
71
|
+
| AC1: Description | PASS |
|
|
72
|
+
| AC2: Description | PASS |
|
|
73
|
+
|
|
74
|
+
## Lessons Learned
|
|
75
|
+
|
|
76
|
+
### Technical Insights
|
|
77
|
+
1. Insight about the codebase or technology
|
|
78
|
+
2. Pattern that worked well
|
|
79
|
+
|
|
80
|
+
### Process Insights
|
|
81
|
+
1. What worked well in the SPIDER process
|
|
82
|
+
2. What could be improved
|
|
83
|
+
|
|
84
|
+
## Recommendations
|
|
85
|
+
|
|
86
|
+
- Recommendation for future work
|
|
87
|
+
- Follow-up items (if any)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 2. Create Pull Request
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Ensure all changes are committed
|
|
94
|
+
git status
|
|
95
|
+
|
|
96
|
+
# Create PR with structured description
|
|
97
|
+
gh pr create \
|
|
98
|
+
--title "[Spec {id}] {Feature name}" \
|
|
99
|
+
--body "$(cat <<'EOF'
|
|
100
|
+
## Summary
|
|
101
|
+
|
|
102
|
+
{One paragraph summary}
|
|
103
|
+
|
|
104
|
+
## Changes
|
|
105
|
+
|
|
106
|
+
- Change 1
|
|
107
|
+
- Change 2
|
|
108
|
+
- Change 3
|
|
109
|
+
|
|
110
|
+
## Test Plan
|
|
111
|
+
|
|
112
|
+
- [ ] All tests pass
|
|
113
|
+
- [ ] Manual testing completed
|
|
114
|
+
- [ ] Code reviewed
|
|
115
|
+
|
|
116
|
+
## Spec Reference
|
|
117
|
+
|
|
118
|
+
- Spec: `codev/specs/{id}-{name}.md`
|
|
119
|
+
- Plan: `codev/plans/{id}-{name}.md`
|
|
120
|
+
- Review: `codev/reviews/{id}-{name}.md`
|
|
121
|
+
EOF
|
|
122
|
+
)"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### 3. Final Verification
|
|
126
|
+
|
|
127
|
+
Before creating PR:
|
|
128
|
+
- [ ] All tests pass (`npm test`)
|
|
129
|
+
- [ ] Build passes (`npm run build`)
|
|
130
|
+
- [ ] No uncommitted changes
|
|
131
|
+
- [ ] Review document is complete
|
|
132
|
+
- [ ] All acceptance criteria documented as PASS
|
|
133
|
+
|
|
134
|
+
### 4. Signal Completion
|
|
135
|
+
|
|
136
|
+
When PR is created:
|
|
137
|
+
1. Update status file: `current_state: complete`
|
|
138
|
+
2. Output: `<signal>REVIEW_COMPLETE</signal>`
|
|
139
|
+
3. Output the PR URL for human review
|
|
140
|
+
|
|
141
|
+
## Commit the Review
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
git add codev/reviews/{id}-*.md
|
|
145
|
+
git commit -m "[Spec {id}] Add review document"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Quality Checklist
|
|
149
|
+
|
|
150
|
+
Before signaling completion:
|
|
151
|
+
- [ ] Review document captures all lessons learned
|
|
152
|
+
- [ ] PR description is clear and complete
|
|
153
|
+
- [ ] All commits have meaningful messages
|
|
154
|
+
- [ ] No debug code or TODO comments remain
|
|
155
|
+
- [ ] Documentation is updated (if needed)
|
|
156
|
+
|
|
157
|
+
## Constraints
|
|
158
|
+
|
|
159
|
+
- **Honest assessment** - Document what actually happened
|
|
160
|
+
- **No new code** - Review phase is documentation only
|
|
161
|
+
- **Capture lessons** - Future iterations benefit from insights
|
|
162
|
+
- **Clean PR** - Ready for human review and merge
|
|
163
|
+
|
|
164
|
+
## Output Format
|
|
165
|
+
|
|
166
|
+
When complete, output:
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
<signal>REVIEW_COMPLETE</signal>
|
|
170
|
+
|
|
171
|
+
PR Created: {PR_URL}
|
|
172
|
+
|
|
173
|
+
Summary:
|
|
174
|
+
- {number} files changed
|
|
175
|
+
- {number} tests added
|
|
176
|
+
- All acceptance criteria met
|
|
177
|
+
|
|
178
|
+
Ready for human review and merge.
|
|
179
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Specify Phase Prompt
|
|
2
|
+
|
|
3
|
+
You are the **Spec Writer** hat in a Ralph-SPIDER loop.
|
|
4
|
+
|
|
5
|
+
## Your Mission
|
|
6
|
+
|
|
7
|
+
Write a detailed specification for the assigned project. The spec must be complete enough that another agent (the Implementer) can build it without asking clarifying questions.
|
|
8
|
+
|
|
9
|
+
## Input Context
|
|
10
|
+
|
|
11
|
+
Read these files to understand the task:
|
|
12
|
+
1. `codev/status/{project-id}-*.md` - Current project state and any notes
|
|
13
|
+
2. `codev/projectlist.md` - Project entry with initial description
|
|
14
|
+
3. Any existing context files mentioned in the project entry
|
|
15
|
+
|
|
16
|
+
## Output Requirements
|
|
17
|
+
|
|
18
|
+
Create `codev/specs/{project-id}-{name}.md` with:
|
|
19
|
+
|
|
20
|
+
### Required Sections
|
|
21
|
+
|
|
22
|
+
1. **Metadata** - ID, status, created date, protocol
|
|
23
|
+
2. **Executive Summary** - One paragraph explaining what this feature does
|
|
24
|
+
3. **Problem Statement** - What problem does this solve?
|
|
25
|
+
4. **Desired State** - What does success look like?
|
|
26
|
+
5. **Success Criteria** - Testable acceptance criteria (checkboxes)
|
|
27
|
+
6. **Constraints** - Technical and business constraints
|
|
28
|
+
7. **Solution Approach** - High-level technical approach
|
|
29
|
+
8. **Test Scenarios** - How will this be tested?
|
|
30
|
+
9. **Open Questions** - Any unresolved questions (should be minimal)
|
|
31
|
+
|
|
32
|
+
### Quality Checklist
|
|
33
|
+
|
|
34
|
+
Before completing, verify:
|
|
35
|
+
- [ ] All acceptance criteria are testable (can be verified programmatically)
|
|
36
|
+
- [ ] No implementation details in spec (that's for the plan)
|
|
37
|
+
- [ ] No ambiguous requirements ("should be fast" → "response time < 200ms")
|
|
38
|
+
- [ ] Edge cases considered
|
|
39
|
+
- [ ] Error scenarios documented
|
|
40
|
+
|
|
41
|
+
## Completion Signal
|
|
42
|
+
|
|
43
|
+
When spec is complete:
|
|
44
|
+
1. Commit the spec file: `git add codev/specs/{id}-*.md && git commit -m "[Spec {id}] Initial specification"`
|
|
45
|
+
2. Update status file: Set `current_state: specify:review`
|
|
46
|
+
3. Output: `<signal>SPEC_READY_FOR_REVIEW</signal>`
|
|
47
|
+
|
|
48
|
+
## Constraints
|
|
49
|
+
|
|
50
|
+
- DO NOT start implementation
|
|
51
|
+
- DO NOT write the plan
|
|
52
|
+
- DO NOT make assumptions - if something is unclear, document it in Open Questions
|
|
53
|
+
- Keep spec focused and concise (aim for 200-500 lines)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Test Phase Prompt (BUGFIX)
|
|
2
|
+
|
|
3
|
+
You are in the Test phase of BUGFIX protocol.
|
|
4
|
+
|
|
5
|
+
## Your Mission
|
|
6
|
+
|
|
7
|
+
Add a test that would have caught this bug, then verify all tests pass.
|
|
8
|
+
|
|
9
|
+
## Input Context
|
|
10
|
+
|
|
11
|
+
1. `codev/status/{project-id}-*.md` - Bug details and fix
|
|
12
|
+
2. GitHub issue for reproduction steps
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
### 1. Write Regression Test
|
|
17
|
+
|
|
18
|
+
Create a test that:
|
|
19
|
+
- Reproduces the original bug scenario
|
|
20
|
+
- Verifies the fix works
|
|
21
|
+
- Would fail if the bug was reintroduced
|
|
22
|
+
|
|
23
|
+
Test name should be descriptive:
|
|
24
|
+
```typescript
|
|
25
|
+
it('should handle [scenario] without [bug behavior]', () => {
|
|
26
|
+
// Test implementation
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 2. Run All Tests
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm test
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If tests fail:
|
|
37
|
+
- Output: `<signal>TESTS_FAIL</signal>`
|
|
38
|
+
- Include which tests failed
|
|
39
|
+
|
|
40
|
+
### 3. Verify Coverage
|
|
41
|
+
|
|
42
|
+
Ensure:
|
|
43
|
+
- [ ] New test covers the bug scenario
|
|
44
|
+
- [ ] Existing tests still pass
|
|
45
|
+
- [ ] No flaky tests introduced
|
|
46
|
+
|
|
47
|
+
### 4. Commit Test
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git add <test-files>
|
|
51
|
+
git commit -m "test: add regression test for #{issue-number}"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 5. Signal Completion
|
|
55
|
+
|
|
56
|
+
When all tests pass:
|
|
57
|
+
- Output: `<signal>TESTS_PASS</signal>`
|
|
58
|
+
|
|
59
|
+
## Constraints
|
|
60
|
+
|
|
61
|
+
- Test MUST cover the specific bug scenario
|
|
62
|
+
- Keep test focused and minimal
|
|
63
|
+
- DO NOT add unrelated tests
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Understand Phase Prompt (TICK)
|
|
2
|
+
|
|
3
|
+
You are working in a TICK protocol - fast autonomous implementation for amendments.
|
|
4
|
+
|
|
5
|
+
## Your Mission
|
|
6
|
+
|
|
7
|
+
Understand the existing spec and what amendment is being requested. TICK is for small changes to existing, integrated features.
|
|
8
|
+
|
|
9
|
+
## Input Context
|
|
10
|
+
|
|
11
|
+
Read these files:
|
|
12
|
+
1. `codev/specs/{project-id}-*.md` - The existing spec (being amended)
|
|
13
|
+
2. `codev/plans/{project-id}-*.md` - The existing plan
|
|
14
|
+
3. `codev/status/{project-id}-*.md` - Current state and amendment description
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
### 1. Identify the Amendment
|
|
19
|
+
|
|
20
|
+
From the status file, understand:
|
|
21
|
+
- What change is being requested?
|
|
22
|
+
- What's the scope? (Should be < 300 LOC)
|
|
23
|
+
- What existing code will be affected?
|
|
24
|
+
|
|
25
|
+
### 2. Verify TICK is Appropriate
|
|
26
|
+
|
|
27
|
+
TICK is appropriate when:
|
|
28
|
+
- [ ] Feature already has an integrated spec
|
|
29
|
+
- [ ] Change is small (< 300 LOC)
|
|
30
|
+
- [ ] Requirements are clear
|
|
31
|
+
- [ ] No architectural changes needed
|
|
32
|
+
|
|
33
|
+
If NOT appropriate, signal: `<signal>NEEDS_SPIDER</signal>`
|
|
34
|
+
|
|
35
|
+
### 3. Document Understanding
|
|
36
|
+
|
|
37
|
+
Update status file with:
|
|
38
|
+
```markdown
|
|
39
|
+
## Amendment Understanding
|
|
40
|
+
|
|
41
|
+
**Existing Spec**: {spec-id}
|
|
42
|
+
**Amendment Request**: {description}
|
|
43
|
+
**Scope**: {estimated LOC}
|
|
44
|
+
**Files to Change**:
|
|
45
|
+
- file1.ts
|
|
46
|
+
- file2.ts
|
|
47
|
+
|
|
48
|
+
**Approach**: {brief description of how to implement}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 4. Signal Completion
|
|
52
|
+
|
|
53
|
+
When understanding is complete:
|
|
54
|
+
1. Update status file
|
|
55
|
+
2. Output: `<signal>UNDERSTOOD</signal>`
|
|
56
|
+
|
|
57
|
+
## Constraints
|
|
58
|
+
|
|
59
|
+
- DO NOT start implementing
|
|
60
|
+
- DO NOT create new spec files (amend existing)
|
|
61
|
+
- Keep scope small - if > 300 LOC, recommend SPIDER instead
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Verify Phase Prompt (TICK)
|
|
2
|
+
|
|
3
|
+
You are in the Verify phase of TICK protocol.
|
|
4
|
+
|
|
5
|
+
## Your Mission
|
|
6
|
+
|
|
7
|
+
Verify that the amendment implementation is complete and correct. Run tests and build to ensure nothing is broken.
|
|
8
|
+
|
|
9
|
+
## Input Context
|
|
10
|
+
|
|
11
|
+
Read these files:
|
|
12
|
+
1. `codev/specs/{project-id}-*.md` - Spec with amendment
|
|
13
|
+
2. `codev/status/{project-id}-*.md` - Implementation notes
|
|
14
|
+
|
|
15
|
+
## Workflow
|
|
16
|
+
|
|
17
|
+
### 1. Run Build
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm run build
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If build fails:
|
|
24
|
+
- Output: `<signal>VERIFICATION_FAILED</signal>`
|
|
25
|
+
- Include error details in output
|
|
26
|
+
|
|
27
|
+
### 2. Run Tests
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm test
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If tests fail:
|
|
34
|
+
- Output: `<signal>VERIFICATION_FAILED</signal>`
|
|
35
|
+
- Include which tests failed
|
|
36
|
+
|
|
37
|
+
### 3. Quick Manual Check
|
|
38
|
+
|
|
39
|
+
Verify:
|
|
40
|
+
- [ ] Amendment matches the request
|
|
41
|
+
- [ ] No unintended side effects
|
|
42
|
+
- [ ] Code follows project conventions
|
|
43
|
+
|
|
44
|
+
### 4. Signal Completion
|
|
45
|
+
|
|
46
|
+
When all checks pass:
|
|
47
|
+
1. Update status file with verification results
|
|
48
|
+
2. Output: `<signal>VERIFIED</signal>`
|
|
49
|
+
|
|
50
|
+
## Backpressure
|
|
51
|
+
|
|
52
|
+
Both build AND tests must pass before VERIFIED can be signaled. This is non-negotiable.
|
|
53
|
+
|
|
54
|
+
## Constraints
|
|
55
|
+
|
|
56
|
+
- DO NOT add new features
|
|
57
|
+
- DO NOT refactor unrelated code
|
|
58
|
+
- Keep verification focused on the amendment
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../protocol-schema.json",
|
|
3
|
+
"name": "bugfix",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Lightweight protocol for minor bugfixes using GitHub Issues",
|
|
6
|
+
"phases": [
|
|
7
|
+
{
|
|
8
|
+
"id": "investigate",
|
|
9
|
+
"name": "Investigate",
|
|
10
|
+
"description": "Understand the bug and its root cause",
|
|
11
|
+
"type": "once",
|
|
12
|
+
"steps": [
|
|
13
|
+
"read_issue",
|
|
14
|
+
"reproduce_bug",
|
|
15
|
+
"identify_root_cause",
|
|
16
|
+
"assess_complexity"
|
|
17
|
+
],
|
|
18
|
+
"transition": {
|
|
19
|
+
"on_complete": "fix",
|
|
20
|
+
"on_too_complex": "escalate"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "fix",
|
|
25
|
+
"name": "Fix",
|
|
26
|
+
"description": "Implement the bug fix",
|
|
27
|
+
"type": "once",
|
|
28
|
+
"steps": [
|
|
29
|
+
"implement_fix",
|
|
30
|
+
"add_tests",
|
|
31
|
+
"verify_fix",
|
|
32
|
+
"commit"
|
|
33
|
+
],
|
|
34
|
+
"checks": {
|
|
35
|
+
"build": {
|
|
36
|
+
"command": "npm run build",
|
|
37
|
+
"on_fail": "retry",
|
|
38
|
+
"max_retries": 2
|
|
39
|
+
},
|
|
40
|
+
"tests": {
|
|
41
|
+
"command": "npm test",
|
|
42
|
+
"on_fail": "retry",
|
|
43
|
+
"max_retries": 2
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"transition": {
|
|
47
|
+
"on_complete": "pr"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "pr",
|
|
52
|
+
"name": "Create PR",
|
|
53
|
+
"description": "Create pull request for the fix",
|
|
54
|
+
"type": "once",
|
|
55
|
+
"steps": [
|
|
56
|
+
"create_pr",
|
|
57
|
+
"link_issue",
|
|
58
|
+
"request_review"
|
|
59
|
+
],
|
|
60
|
+
"consultation": {
|
|
61
|
+
"on": "review",
|
|
62
|
+
"models": ["gemini", "codex"],
|
|
63
|
+
"type": "impl-review",
|
|
64
|
+
"parallel": true,
|
|
65
|
+
"max_rounds": 1
|
|
66
|
+
},
|
|
67
|
+
"transition": {
|
|
68
|
+
"on_complete": "review"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "review",
|
|
73
|
+
"name": "Review",
|
|
74
|
+
"description": "Address review feedback",
|
|
75
|
+
"type": "once",
|
|
76
|
+
"steps": [
|
|
77
|
+
"address_feedback",
|
|
78
|
+
"update_pr"
|
|
79
|
+
],
|
|
80
|
+
"transition": {
|
|
81
|
+
"on_complete": "merge"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "merge",
|
|
86
|
+
"name": "Merge",
|
|
87
|
+
"description": "Merge the fix and close the issue",
|
|
88
|
+
"type": "once",
|
|
89
|
+
"steps": [
|
|
90
|
+
"merge_pr",
|
|
91
|
+
"verify_main",
|
|
92
|
+
"close_issue"
|
|
93
|
+
],
|
|
94
|
+
"gate": {
|
|
95
|
+
"name": "merge-approval",
|
|
96
|
+
"description": "Architect approves merge",
|
|
97
|
+
"requires": ["review_complete", "tests_pass"],
|
|
98
|
+
"next": null
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"signals": {
|
|
103
|
+
"PHASE_COMPLETE": {
|
|
104
|
+
"description": "Signal current phase is complete",
|
|
105
|
+
"transitions_to": "next_phase"
|
|
106
|
+
},
|
|
107
|
+
"TOO_COMPLEX": {
|
|
108
|
+
"description": "Bug is too complex for BUGFIX, escalate to SPIDER",
|
|
109
|
+
"transitions_to": "escalate"
|
|
110
|
+
},
|
|
111
|
+
"BLOCKED": {
|
|
112
|
+
"description": "Signal fix is blocked",
|
|
113
|
+
"requires": "reason"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"defaults": {
|
|
117
|
+
"consultation": {
|
|
118
|
+
"enabled": true,
|
|
119
|
+
"models": ["gemini", "codex"],
|
|
120
|
+
"parallel": true
|
|
121
|
+
},
|
|
122
|
+
"checks": {
|
|
123
|
+
"build": "npm run build",
|
|
124
|
+
"test": "npm test"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|