@cluesmith/codev 3.0.0-rc.9 → 3.0.1

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.
Files changed (169) hide show
  1. package/LICENSE +201 -0
  2. package/{dashboard/dist/assets/index-Bs8I7N2s.css → dashboard-dist/assets/index-BWYZtvwm.css} +1 -1
  3. package/dashboard-dist/assets/index-Dn9zmcKp.js +195 -0
  4. package/dashboard-dist/assets/index-Dn9zmcKp.js.map +1 -0
  5. package/{dashboard/dist → dashboard-dist}/index.html +2 -2
  6. package/dist/agent-farm/cli.d.ts.map +1 -1
  7. package/dist/agent-farm/cli.js +1 -2
  8. package/dist/agent-farm/cli.js.map +1 -1
  9. package/dist/agent-farm/commands/bench.d.ts +1 -1
  10. package/dist/agent-farm/commands/bench.js +1 -1
  11. package/dist/agent-farm/commands/spawn-roles.d.ts +7 -3
  12. package/dist/agent-farm/commands/spawn-roles.d.ts.map +1 -1
  13. package/dist/agent-farm/commands/spawn-roles.js +47 -27
  14. package/dist/agent-farm/commands/spawn-roles.js.map +1 -1
  15. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  16. package/dist/agent-farm/commands/spawn.js +51 -33
  17. package/dist/agent-farm/commands/spawn.js.map +1 -1
  18. package/dist/agent-farm/commands/status.js +5 -1
  19. package/dist/agent-farm/commands/status.js.map +1 -1
  20. package/dist/agent-farm/lib/tower-client.d.ts +6 -230
  21. package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
  22. package/dist/agent-farm/lib/tower-client.js +6 -293
  23. package/dist/agent-farm/lib/tower-client.js.map +1 -1
  24. package/dist/agent-farm/servers/overview.d.ts +2 -1
  25. package/dist/agent-farm/servers/overview.d.ts.map +1 -1
  26. package/dist/agent-farm/servers/overview.js +36 -5
  27. package/dist/agent-farm/servers/overview.js.map +1 -1
  28. package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
  29. package/dist/agent-farm/servers/tower-instances.js +3 -2
  30. package/dist/agent-farm/servers/tower-instances.js.map +1 -1
  31. package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
  32. package/dist/agent-farm/servers/tower-routes.js +10 -0
  33. package/dist/agent-farm/servers/tower-routes.js.map +1 -1
  34. package/dist/agent-farm/servers/tower-server.js +1 -1
  35. package/dist/cli.js +2 -2
  36. package/dist/cli.js.map +1 -1
  37. package/dist/commands/consult/index.d.ts +31 -1
  38. package/dist/commands/consult/index.d.ts.map +1 -1
  39. package/dist/commands/consult/index.js +106 -19
  40. package/dist/commands/consult/index.js.map +1 -1
  41. package/dist/commands/porch/artifacts.d.ts +11 -1
  42. package/dist/commands/porch/artifacts.d.ts.map +1 -1
  43. package/dist/commands/porch/artifacts.js +12 -2
  44. package/dist/commands/porch/artifacts.js.map +1 -1
  45. package/dist/commands/porch/index.d.ts +5 -1
  46. package/dist/commands/porch/index.d.ts.map +1 -1
  47. package/dist/commands/porch/index.js +178 -27
  48. package/dist/commands/porch/index.js.map +1 -1
  49. package/dist/commands/porch/next.d.ts.map +1 -1
  50. package/dist/commands/porch/next.js +54 -28
  51. package/dist/commands/porch/next.js.map +1 -1
  52. package/dist/commands/porch/state.d.ts +24 -2
  53. package/dist/commands/porch/state.d.ts.map +1 -1
  54. package/dist/commands/porch/state.js +65 -10
  55. package/dist/commands/porch/state.js.map +1 -1
  56. package/dist/commands/porch/types.d.ts +8 -0
  57. package/dist/commands/porch/types.d.ts.map +1 -1
  58. package/dist/lib/forge-contracts.d.ts +3 -0
  59. package/dist/lib/forge-contracts.d.ts.map +1 -1
  60. package/dist/lib/forge-contracts.js.map +1 -1
  61. package/dist/lib/team-github.d.ts +47 -0
  62. package/dist/lib/team-github.d.ts.map +1 -1
  63. package/dist/lib/team-github.js +111 -2
  64. package/dist/lib/team-github.js.map +1 -1
  65. package/dist/terminal/ws-protocol.d.ts +10 -8
  66. package/dist/terminal/ws-protocol.d.ts.map +1 -1
  67. package/dist/terminal/ws-protocol.js +3 -0
  68. package/dist/terminal/ws-protocol.js.map +1 -1
  69. package/package.json +27 -25
  70. package/scripts/forge/gitea/auth-status.sh +0 -0
  71. package/scripts/forge/gitea/issue-comment.sh +0 -0
  72. package/scripts/forge/gitea/issue-list.sh +0 -0
  73. package/scripts/forge/gitea/issue-view.sh +0 -0
  74. package/scripts/forge/gitea/pr-exists.sh +4 -1
  75. package/scripts/forge/gitea/pr-list.sh +0 -0
  76. package/scripts/forge/gitea/pr-merge.sh +0 -0
  77. package/scripts/forge/gitea/pr-view.sh +0 -0
  78. package/scripts/forge/gitea/recently-closed.sh +0 -0
  79. package/scripts/forge/gitea/recently-merged.sh +0 -0
  80. package/scripts/forge/gitea/repo-archive.sh +0 -0
  81. package/scripts/forge/gitea/user-identity.sh +0 -0
  82. package/scripts/forge/github/auth-status.sh +0 -0
  83. package/scripts/forge/github/issue-comment.sh +0 -0
  84. package/scripts/forge/github/issue-list.sh +2 -2
  85. package/scripts/forge/github/issue-view.sh +0 -0
  86. package/scripts/forge/github/on-it-timestamps.sh +0 -0
  87. package/scripts/forge/github/pr-diff.sh +0 -0
  88. package/scripts/forge/github/pr-exists.sh +3 -1
  89. package/scripts/forge/github/pr-list.sh +0 -0
  90. package/scripts/forge/github/pr-merge.sh +0 -0
  91. package/scripts/forge/github/pr-search.sh +0 -0
  92. package/scripts/forge/github/pr-view.sh +0 -0
  93. package/scripts/forge/github/recently-closed.sh +0 -0
  94. package/scripts/forge/github/recently-merged.sh +0 -0
  95. package/scripts/forge/github/repo-archive.sh +0 -0
  96. package/scripts/forge/github/team-activity.sh +0 -0
  97. package/scripts/forge/github/user-identity.sh +0 -0
  98. package/scripts/forge/gitlab/auth-status.sh +0 -0
  99. package/scripts/forge/gitlab/issue-comment.sh +0 -0
  100. package/scripts/forge/gitlab/issue-list.sh +0 -0
  101. package/scripts/forge/gitlab/issue-view.sh +0 -0
  102. package/scripts/forge/gitlab/pr-diff.sh +0 -0
  103. package/scripts/forge/gitlab/pr-exists.sh +3 -1
  104. package/scripts/forge/gitlab/pr-list.sh +0 -0
  105. package/scripts/forge/gitlab/pr-merge.sh +0 -0
  106. package/scripts/forge/gitlab/pr-search.sh +0 -0
  107. package/scripts/forge/gitlab/pr-view.sh +0 -0
  108. package/scripts/forge/gitlab/recently-closed.sh +0 -0
  109. package/scripts/forge/gitlab/recently-merged.sh +0 -0
  110. package/scripts/forge/gitlab/repo-archive.sh +0 -0
  111. package/scripts/forge/gitlab/user-identity.sh +0 -0
  112. package/scripts/postinstall.mjs +51 -0
  113. package/skeleton/.claude/skills/afx/SKILL.md +1 -3
  114. package/skeleton/.claude/skills/consult/SKILL.md +1 -1
  115. package/skeleton/.claude/skills/porch/SKILL.md +2 -2
  116. package/skeleton/protocol-schema.json +2 -2
  117. package/skeleton/protocols/air/prompts/pr.md +15 -3
  118. package/skeleton/protocols/air/protocol.md +0 -1
  119. package/skeleton/protocols/aspir/builder-prompt.md +23 -1
  120. package/skeleton/protocols/aspir/prompts/review.md +11 -0
  121. package/skeleton/protocols/aspir/protocol.json +8 -0
  122. package/skeleton/protocols/aspir/templates/plan.md +0 -20
  123. package/skeleton/protocols/aspir/templates/spec.md +0 -28
  124. package/skeleton/protocols/bugfix/builder-prompt.md +1 -1
  125. package/skeleton/protocols/bugfix/prompts/pr.md +15 -3
  126. package/skeleton/protocols/experiment/builder-prompt.md +15 -0
  127. package/skeleton/protocols/experiment/protocol.md +1 -6
  128. package/skeleton/protocols/maintain/builder-prompt.md +12 -11
  129. package/skeleton/protocols/maintain/prompts/maintain.md +88 -0
  130. package/skeleton/protocols/maintain/prompts/review.md +84 -0
  131. package/skeleton/protocols/maintain/protocol.json +14 -68
  132. package/skeleton/protocols/maintain/protocol.md +110 -408
  133. package/skeleton/protocols/maintain/templates/maintenance-run.md +18 -49
  134. package/skeleton/protocols/protocol-schema.json +1 -1
  135. package/skeleton/protocols/research/builder-prompt.md +85 -0
  136. package/skeleton/protocols/research/protocol.json +118 -0
  137. package/skeleton/protocols/research/protocol.md +169 -0
  138. package/skeleton/protocols/spike/protocol.md +1 -1
  139. package/skeleton/protocols/spir/builder-prompt.md +24 -1
  140. package/skeleton/protocols/spir/prompts/review.md +11 -0
  141. package/skeleton/protocols/spir/protocol.json +8 -0
  142. package/skeleton/protocols/spir/templates/plan.md +0 -20
  143. package/skeleton/protocols/spir/templates/spec.md +0 -28
  144. package/skeleton/resources/commands/agent-farm.md +2 -2
  145. package/skeleton/resources/commands/consult.md +15 -6
  146. package/skeleton/resources/commands/overview.md +0 -1
  147. package/skeleton/roles/architect.md +1 -1
  148. package/skeleton/roles/builder.md +11 -3
  149. package/skeleton/templates/AGENTS.md +3 -1
  150. package/skeleton/templates/CLAUDE.md +3 -1
  151. package/skeleton/templates/cheatsheet.md +2 -2
  152. package/dashboard/dist/assets/index-DleIqu7L.js +0 -194
  153. package/dashboard/dist/assets/index-DleIqu7L.js.map +0 -1
  154. package/skeleton/porch/prompts/understand.md +0 -61
  155. package/skeleton/porch/prompts/verify.md +0 -58
  156. package/skeleton/protocols/maintain/prompts/audit.md +0 -111
  157. package/skeleton/protocols/maintain/prompts/clean.md +0 -91
  158. package/skeleton/protocols/maintain/prompts/sync.md +0 -113
  159. package/skeleton/protocols/maintain/prompts/verify.md +0 -110
  160. package/skeleton/protocols/tick/builder-prompt.md +0 -65
  161. package/skeleton/protocols/tick/consult-types/impl-review.md +0 -72
  162. package/skeleton/protocols/tick/consult-types/plan-review.md +0 -59
  163. package/skeleton/protocols/tick/consult-types/pr-review.md +0 -72
  164. package/skeleton/protocols/tick/consult-types/spec-review.md +0 -55
  165. package/skeleton/protocols/tick/protocol.json +0 -151
  166. package/skeleton/protocols/tick/protocol.md +0 -277
  167. package/skeleton/protocols/tick/templates/plan.md +0 -67
  168. package/skeleton/protocols/tick/templates/review.md +0 -89
  169. package/skeleton/protocols/tick/templates/spec.md +0 -61
@@ -1,61 +0,0 @@
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_SPIR</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 SPIR instead
@@ -1,58 +0,0 @@
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
@@ -1,111 +0,0 @@
1
- # AUDIT Phase Prompt
2
-
3
- You are executing the **AUDIT** phase of the MAINTAIN protocol.
4
-
5
- ## Your Goal
6
-
7
- Analyze the codebase to identify dead code, unused dependencies, and stale documentation.
8
-
9
- ## Context
10
-
11
- - **Current State**: {{current_state}}
12
-
13
- ## Process
14
-
15
- ### 1. Determine Base Commit
16
-
17
- Find the last maintenance run:
18
- ```bash
19
- ls codev/maintain/
20
- ```
21
-
22
- If previous runs exist, note the base commit to focus on changes since then.
23
-
24
- ### 2. Scan for Dead Code
25
-
26
- Run static analysis tools:
27
-
28
- ```bash
29
- # TypeScript/JavaScript
30
- npx ts-prune 2>/dev/null || echo "ts-prune not available"
31
- npx depcheck 2>/dev/null || echo "depcheck not available"
32
-
33
- # Check for unused exports
34
- grep -r "export " --include="*.ts" --include="*.tsx" | head -50
35
- ```
36
-
37
- ### 3. Scan for Unused Dependencies
38
-
39
- Check package.json for unused dependencies:
40
- ```bash
41
- cat package.json | grep -A100 '"dependencies"' | head -50
42
- ```
43
-
44
- Cross-reference with actual imports in the codebase.
45
-
46
- ### 4. Scan for Stale Documentation
47
-
48
- Check for references to deleted files/functions:
49
- ```bash
50
- # Recent changes
51
- git log --oneline -20
52
-
53
- # Check if arch.md references exist
54
- grep -E "src/|packages/" codev/resources/arch.md | head -20
55
- ```
56
-
57
- ### 5. Create Audit Report
58
-
59
- Create a maintenance run file: `codev/maintain/NNN.md`
60
-
61
- Document:
62
- - Dead code identified (with file paths)
63
- - Unused dependencies
64
- - Stale documentation references
65
- - Recommended actions
66
-
67
- Use the template structure:
68
- ```markdown
69
- # Maintenance Run NNN
70
-
71
- **Date**: YYYY-MM-DD
72
- **Base Commit**: <commit-hash>
73
-
74
- ## Dead Code Identified
75
-
76
- | File | Item | Reason |
77
- |------|------|--------|
78
- | path/to/file.ts | unusedFunction() | Not imported anywhere |
79
-
80
- ## Unused Dependencies
81
-
82
- | Package | Reason |
83
- |---------|--------|
84
- | some-pkg | Not imported |
85
-
86
- ## Stale Documentation
87
-
88
- | Document | Issue |
89
- |----------|-------|
90
- | arch.md | References deleted module |
91
-
92
- ## Recommended Actions
93
-
94
- 1. Remove X
95
- 2. Update Y
96
- 3. ...
97
- ```
98
-
99
- ## Signals
100
-
101
- When audit report is complete:
102
-
103
- ```
104
- <signal>PHASE_COMPLETE</signal>
105
- ```
106
-
107
- If blocked:
108
-
109
- ```
110
- <signal>BLOCKED:reason</signal>
111
- ```
@@ -1,91 +0,0 @@
1
- # CLEAN Phase Prompt
2
-
3
- You are executing the **CLEAN** phase of the MAINTAIN protocol.
4
-
5
- ## Your Goal
6
-
7
- Remove the dead code and unused dependencies identified in the audit phase.
8
-
9
- ## Context
10
-
11
- - **Current State**: {{current_state}}
12
-
13
- ## Prerequisites
14
-
15
- Read the audit report from the previous phase:
16
- ```bash
17
- ls -la codev/maintain/
18
- cat codev/maintain/*.md | tail -100
19
- ```
20
-
21
- ## Process
22
-
23
- ### 1. Remove Dead Code
24
-
25
- For each item identified in the audit:
26
-
27
- 1. Verify it's truly unused (double-check with grep)
28
- 2. Use `git rm` for tracked files
29
- 3. For untracked files, move to `.trash/` before deleting
30
-
31
- **CRITICAL**: Use soft deletion first:
32
- ```bash
33
- mkdir -p codev/maintain/.trash/$(date +%Y-%m-%d)
34
- mv path/to/file codev/maintain/.trash/$(date +%Y-%m-%d)/
35
- ```
36
-
37
- ### 2. Remove Unused Dependencies
38
-
39
- ```bash
40
- # Remove from package.json
41
- npm uninstall <package-name>
42
- ```
43
-
44
- ### 3. Verify Build After Each Removal
45
-
46
- After each significant removal:
47
- ```bash
48
- npm run build
49
- npm test -- --exclude='**/e2e/**'
50
- ```
51
-
52
- If build fails, revert the change and investigate.
53
-
54
- ### 4. Commit Changes
55
-
56
- Make atomic commits for each logical change:
57
- ```bash
58
- git add <specific-files>
59
- git commit -m "[Maintain] Remove unused X"
60
- ```
61
-
62
- **NEVER use `git add -A` or `git add .`**
63
-
64
- ## Important Rules
65
-
66
- 1. **One removal at a time** - Don't batch unrelated changes
67
- 2. **Verify after each removal** - Build must pass
68
- 3. **Document what was removed** - Update the maintenance run file
69
- 4. **Soft delete first** - Move to .trash/ before permanent deletion
70
- 5. **Check for side effects** - Grep for references before removing
71
-
72
- ## Output
73
-
74
- Update the maintenance run file with:
75
- - What was removed
76
- - Build/test status after removal
77
- - Any issues encountered
78
-
79
- ## Signals
80
-
81
- When all dead code is removed and build passes:
82
-
83
- ```
84
- <signal>PHASE_COMPLETE</signal>
85
- ```
86
-
87
- If blocked:
88
-
89
- ```
90
- <signal>BLOCKED:reason</signal>
91
- ```
@@ -1,113 +0,0 @@
1
- # SYNC Phase Prompt
2
-
3
- You are executing the **SYNC** phase of the MAINTAIN protocol.
4
-
5
- ## Your Goal
6
-
7
- Update documentation to match the current state of the codebase.
8
-
9
- ## Context
10
-
11
- - **Current State**: {{current_state}}
12
-
13
- ## Process
14
-
15
- ### 1. Update arch.md
16
-
17
- Read the current architecture doc and compare with actual codebase:
18
-
19
- ```bash
20
- cat codev/resources/arch.md
21
- ls -la packages/ src/ 2>/dev/null
22
- ```
23
-
24
- Update:
25
- - Directory structure (if changed)
26
- - Component descriptions
27
- - Key files and their purposes
28
- - Remove references to deleted code
29
- - Add new utilities/components
30
-
31
- **arch.md must explain HOW things work, not just WHAT they are.**
32
-
33
- ### 2. Generate/Update lessons-learned.md
34
-
35
- Scan review documents for lessons:
36
-
37
- ```bash
38
- ls codev/reviews/
39
- ```
40
-
41
- Extract actionable lessons:
42
- - Testing practices
43
- - Architecture decisions
44
- - Process improvements
45
- - Patterns to follow/avoid
46
-
47
- Format:
48
- ```markdown
49
- ## [Topic]
50
- - [From NNN] Lesson description
51
- ```
52
-
53
- ### 3. Sync CLAUDE.md with AGENTS.md
54
-
55
- Compare the two files:
56
- ```bash
57
- diff CLAUDE.md AGENTS.md | head -50
58
- ```
59
-
60
- They must be identical. Update the stale one to match.
61
-
62
- ### 4. Prune Documentation
63
-
64
- Check document sizes:
65
- ```bash
66
- wc -l CLAUDE.md AGENTS.md README.md
67
- ```
68
-
69
- Target ~400 lines for CLAUDE.md/README.md (guideline, not mandate).
70
-
71
- For any content removed, document:
72
- - WHAT was removed
73
- - WHY it was removed (OBSOLETE, DUPLICATIVE, MOVED, VERBOSE)
74
- - WHERE it moved (if applicable)
75
-
76
- ### 5. Commit Documentation Changes
77
-
78
- ```bash
79
- git add codev/resources/arch.md codev/resources/lessons-learned.md
80
- git commit -m "[Maintain] Update arch.md and lessons-learned.md"
81
-
82
- git add CLAUDE.md AGENTS.md
83
- git commit -m "[Maintain] Sync CLAUDE.md with AGENTS.md"
84
- ```
85
-
86
- ## Important Rules
87
-
88
- 1. **Never invent structure** - Only document what exists
89
- 2. **Verify file paths** - Check that referenced files exist
90
- 3. **Keep it current** - Remove obsolete references
91
- 4. **Preserve important content** - Don't delete patterns/best practices
92
- 5. **Document deletions** - Every removal needs justification
93
-
94
- ## Output
95
-
96
- Update the maintenance run file with:
97
- - Documents updated
98
- - What was added/removed/changed
99
- - Any issues encountered
100
-
101
- ## Signals
102
-
103
- When documentation is synchronized:
104
-
105
- ```
106
- <signal>PHASE_COMPLETE</signal>
107
- ```
108
-
109
- If blocked:
110
-
111
- ```
112
- <signal>BLOCKED:reason</signal>
113
- ```
@@ -1,110 +0,0 @@
1
- # VERIFY Phase Prompt
2
-
3
- You are executing the **VERIFY** phase of the MAINTAIN protocol.
4
-
5
- ## Your Goal
6
-
7
- Run final validation and prepare for PR creation.
8
-
9
- ## Context
10
-
11
- - **Current State**: {{current_state}}
12
-
13
- ## Process
14
-
15
- ### 1. Run Full Test Suite
16
-
17
- ```bash
18
- npm run build
19
- npm test
20
- ```
21
-
22
- Both must pass. If either fails, go back and fix the issue.
23
-
24
- ### 2. Run Linting
25
-
26
- ```bash
27
- npm run lint 2>/dev/null || echo "No lint script"
28
- ```
29
-
30
- Fix any linting errors.
31
-
32
- ### 3. Verify Documentation Links
33
-
34
- Check that documentation references resolve:
35
- ```bash
36
- # Check arch.md file references
37
- grep -oE 'src/[^ ]+|packages/[^ ]+' codev/resources/arch.md | while read f; do
38
- [ -e "$f" ] || echo "Missing: $f"
39
- done
40
- ```
41
-
42
- ### 4. Update Maintenance Run Summary
43
-
44
- Finalize the maintenance run file with:
45
-
46
- ```markdown
47
- ## Summary
48
-
49
- - **Dead code removed**: X files, Y functions
50
- - **Dependencies removed**: Z packages
51
- - **Documentation updated**: arch.md, lessons-learned.md
52
- - **All tests passing**: Yes/No
53
- - **Build status**: Success/Failure
54
-
55
- ## Next Maintenance
56
-
57
- Recommended focus areas for next run:
58
- - ...
59
- ```
60
-
61
- ### 5. Create PR
62
-
63
- ```bash
64
- git push origin HEAD
65
-
66
- gh pr create --title "[Maintain] Codebase maintenance run NNN" --body "$(cat <<'EOF'
67
- ## Summary
68
-
69
- - Dead code removal
70
- - Documentation sync
71
- - Dependency cleanup
72
-
73
- ## Changes
74
-
75
- [List key changes]
76
-
77
- ## Verification
78
-
79
- - [x] Build passes
80
- - [x] Tests pass
81
- - [x] Documentation updated
82
- EOF
83
- )"
84
- ```
85
-
86
- ## Validation Checklist
87
-
88
- Before signaling complete:
89
-
90
- - [ ] All tests pass
91
- - [ ] Build succeeds
92
- - [ ] No import/module errors
93
- - [ ] Documentation links resolve
94
- - [ ] Linter passes (if configured)
95
- - [ ] Maintenance run file is complete
96
- - [ ] PR is created
97
-
98
- ## Signals
99
-
100
- When validation passes and PR is ready:
101
-
102
- ```
103
- <signal>PHASE_COMPLETE</signal>
104
- ```
105
-
106
- If blocked:
107
-
108
- ```
109
- <signal>BLOCKED:reason</signal>
110
- ```
@@ -1,65 +0,0 @@
1
- # {{protocol_name}} Builder ({{mode}} mode)
2
-
3
- You are implementing {{input_description}}.
4
-
5
- {{#if mode_soft}}
6
- ## Mode: SOFT
7
- You are running in SOFT mode. This means:
8
- - You follow the TICK protocol yourself (no porch orchestration)
9
- - The architect monitors your work and verifies you're adhering to the protocol
10
- - Run consultations manually when the protocol calls for them
11
- - You have flexibility in execution, but must stay compliant with the protocol
12
- {{/if}}
13
-
14
- {{#if mode_strict}}
15
- ## Mode: STRICT
16
- You are running in STRICT mode. This means:
17
- - Porch orchestrates your work
18
- - Run: `porch next` to get your next tasks
19
- - Follow porch signals and gate approvals
20
-
21
- ### ABSOLUTE RESTRICTIONS (STRICT MODE)
22
- - **NEVER edit `status.yaml` directly** — only porch commands may modify project state
23
- - **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
24
- - **NEVER skip the 3-way review** — always follow porch next → porch done cycle
25
- {{/if}}
26
-
27
- ## Protocol
28
- Follow the TICK protocol: `codev/protocols/tick/protocol.md`
29
-
30
- TICK is for amendments to existing SPIR specifications. You will:
31
- 1. Identify the target spec to amend
32
- 2. Update the spec with the amendment
33
- 3. Update the plan
34
- 4. Implement the changes
35
- 5. Defend with tests
36
- 6. Create review
37
-
38
- {{#if spec}}
39
- ## Target Spec
40
- The spec to amend is at: `{{spec.path}}`
41
- {{/if}}
42
-
43
- {{#if plan}}
44
- ## Target Plan
45
- The plan to amend is at: `{{plan.path}}`
46
- {{/if}}
47
-
48
- {{#if task}}
49
- ## Amendment Description
50
- {{task_text}}
51
- {{/if}}
52
-
53
- ## Handling Flaky Tests
54
-
55
- If you encounter **pre-existing flaky tests** (intermittent failures unrelated to your changes):
56
- 1. **DO NOT** edit `status.yaml` to bypass checks
57
- 2. **DO NOT** skip porch checks or use any workaround to avoid the failure
58
- 3. **DO** mark the test as skipped with a clear annotation (e.g., `it.skip('...') // FLAKY: skipped pending investigation`)
59
- 4. **DO** document each skipped flaky test in your review under a `## Flaky Tests` section
60
- 5. Commit the skip and continue with your work
61
-
62
- ## Getting Started
63
- 1. Read the TICK protocol thoroughly
64
- 2. Identify what needs to change in the existing spec
65
- 3. Follow the amendment workflow
@@ -1,72 +0,0 @@
1
- # Implementation Review Prompt
2
-
3
- ## Context
4
- You are reviewing implementation work during the Implement phase. A builder has completed a plan phase and needs feedback before proceeding. Your job is to verify the implementation matches the spec and plan.
5
-
6
- ## CRITICAL: Verify Before Flagging
7
-
8
- Before requesting changes for missing configuration, incorrect patterns, or framework issues:
9
- 1. **Check `package.json`** for actual dependency versions — framework conventions change between major versions
10
- 2. **Read the actual config files** (or confirm their deliberate absence) before flagging missing configs
11
- 3. **Do not assume** your training data reflects the version in use — verify against project files
12
- 4. If "Previous Iteration Context" is provided, read it carefully before re-raising concerns that were already disputed
13
-
14
- ## Focus Areas
15
-
16
- 1. **Spec Adherence**
17
- - Does the implementation fulfill the spec requirements for this phase?
18
- - Are acceptance criteria met?
19
-
20
- 2. **Code Quality**
21
- - Is the code readable and maintainable?
22
- - Are there obvious bugs or issues?
23
- - Are error cases handled appropriately?
24
-
25
- 3. **Test Coverage**
26
- - Are the tests adequate for this phase?
27
- - Do tests cover the main paths AND edge cases?
28
-
29
- 4. **Plan Alignment**
30
- - Does the implementation follow the plan?
31
- - Are there plan items skipped or partially completed?
32
-
33
- 5. **UX Verification** (if spec has UX requirements)
34
- - Does the actual user experience match what the spec describes?
35
- - If spec says "async" or "non-blocking", is it actually async?
36
-
37
- ## Verdict Format
38
-
39
- After your review, provide your verdict in exactly this format:
40
-
41
- ```
42
- ---
43
- VERDICT: [APPROVE | REQUEST_CHANGES | COMMENT]
44
- SUMMARY: [One-line summary of your assessment]
45
- CONFIDENCE: [HIGH | MEDIUM | LOW]
46
- ---
47
- KEY_ISSUES:
48
- - [Issue 1 or "None"]
49
- - [Issue 2]
50
- ...
51
- ```
52
-
53
- **Verdict meanings:**
54
- - `APPROVE`: Phase is complete, builder can proceed
55
- - `REQUEST_CHANGES`: Issues that must be fixed before proceeding
56
- - `COMMENT`: Minor suggestions, can proceed but note feedback
57
-
58
- ## Scoping (Multi-Phase Plans)
59
-
60
- When the implementation plan has multiple phases (e.g., scaffolding, landing, media_rtl):
61
- - **ONLY review work belonging to the current plan phase**
62
- - The query will specify which phase you are reviewing
63
- - Do NOT request changes for functionality scheduled in later phases
64
- - Do NOT flag missing features that are out of scope for this phase
65
- - If unsure whether something belongs to this phase, check the plan file
66
-
67
- ## Notes
68
-
69
- - This is a phase-level review, not the final PR review
70
- - Focus on "does this phase work" not "is the whole feature done"
71
- - If referencing line numbers, use `file:line` format
72
- - The builder needs actionable feedback to continue