@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,59 +0,0 @@
1
- # Plan Review Prompt
2
-
3
- ## Context
4
- You are reviewing an implementation plan during the Plan phase. The spec has been approved - now you must evaluate whether the plan adequately describes HOW to implement it.
5
-
6
- ## Focus Areas
7
-
8
- 1. **Spec Coverage**
9
- - Does the plan address all requirements in the spec?
10
- - Are there spec requirements not covered by any phase?
11
- - Are there phases that go beyond the spec scope?
12
-
13
- 2. **Phase Breakdown**
14
- - Are phases appropriately sized (not too large or too small)?
15
- - Is the sequence logical (dependencies respected)?
16
- - Can each phase be completed and committed independently?
17
-
18
- 3. **Technical Approach**
19
- - Is the implementation approach sound?
20
- - Are the right files/modules being modified?
21
- - Are there obvious better approaches being missed?
22
-
23
- 4. **Testability**
24
- - Does each phase have clear test criteria?
25
- - Will the Defend step (writing tests) be feasible?
26
- - Are edge cases from the spec addressable?
27
-
28
- 5. **Risk Assessment**
29
- - Are there potential blockers not addressed?
30
- - Are dependencies on other systems identified?
31
- - Is the plan realistic given constraints?
32
-
33
- ## Verdict Format
34
-
35
- After your review, provide your verdict in exactly this format:
36
-
37
- ```
38
- ---
39
- VERDICT: [APPROVE | REQUEST_CHANGES | COMMENT]
40
- SUMMARY: [One-line summary of your assessment]
41
- CONFIDENCE: [HIGH | MEDIUM | LOW]
42
- ---
43
- KEY_ISSUES:
44
- - [Issue 1 or "None"]
45
- - [Issue 2]
46
- ...
47
- ```
48
-
49
- **Verdict meanings:**
50
- - `APPROVE`: Plan is ready for human review
51
- - `REQUEST_CHANGES`: Significant issues with approach or coverage
52
- - `COMMENT`: Minor suggestions, plan is workable but could improve
53
-
54
- ## Notes
55
-
56
- - The spec has already been approved - don't re-litigate spec decisions
57
- - Focus on the quality of the plan as a guide for builders
58
- - Consider: Would a builder be able to follow this plan successfully?
59
- - If referencing existing code, verify file paths seem accurate
@@ -1,72 +0,0 @@
1
- # PR Ready Review Prompt
2
-
3
- ## Context
4
- You are performing a final self-check during the Review phase. The builder has completed all implementation phases and is about to create a PR. This is the last check before the work goes to the architect for integration review.
5
-
6
- ## Focus Areas
7
-
8
- 1. **Completeness**
9
- - Are all spec requirements implemented?
10
- - Are all plan phases complete?
11
- - Is the review document written (`codev/reviews/XXXX-name.md`)?
12
- - Are all commits properly formatted (`[Spec XXXX][Phase]`)?
13
-
14
- 2. **Test Status**
15
- - Do all tests pass?
16
- - Is test coverage adequate for the changes?
17
- - Are there any skipped or flaky tests?
18
-
19
- 3. **Code Cleanliness**
20
- - Is there any debug code left in?
21
- - Are there any TODO comments that should be resolved?
22
- - Are there any `// REVIEW:` comments that weren't addressed?
23
- - Is the code properly formatted?
24
-
25
- 4. **Documentation**
26
- - Are inline comments clear where needed?
27
- - Is the review document comprehensive?
28
- - Are any new APIs documented?
29
-
30
- 5. **PR Readiness**
31
- - Is the branch up to date with main?
32
- - Are commits atomic and well-described?
33
- - Is the change diff reasonable in size?
34
-
35
- ## Verdict Format
36
-
37
- After your review, provide your verdict in exactly this format:
38
-
39
- ```
40
- ---
41
- VERDICT: [APPROVE | REQUEST_CHANGES | COMMENT]
42
- SUMMARY: [One-line summary of your assessment]
43
- CONFIDENCE: [HIGH | MEDIUM | LOW]
44
- ---
45
- KEY_ISSUES:
46
- - [Issue 1 or "None"]
47
- - [Issue 2]
48
- ...
49
-
50
- PR_SUMMARY: |
51
- ## Summary
52
- [2-3 sentences describing what this PR does]
53
-
54
- ## Key Changes
55
- - [Change 1]
56
- - [Change 2]
57
-
58
- ## Test Plan
59
- - [How to test]
60
- ```
61
-
62
- **Verdict meanings:**
63
- - `APPROVE`: Ready to create PR
64
- - `REQUEST_CHANGES`: Issues to fix before PR creation
65
- - `COMMENT`: Minor items, can create PR but note feedback
66
-
67
- ## Notes
68
-
69
- - This is the builder's final self-review before hand-off
70
- - The PR_SUMMARY in your output can be used as the PR description
71
- - Focus on "is this ready for someone else to review" not "is this perfect"
72
- - Any issues found here are cheaper to fix than during integration review
@@ -1,55 +0,0 @@
1
- # Specification Review Prompt
2
-
3
- ## Context
4
- You are reviewing a feature specification during the Specify phase. Your role is to ensure the spec is complete, correct, and feasible before it moves to human approval.
5
-
6
- ## Focus Areas
7
-
8
- 1. **Completeness**
9
- - Are all requirements clearly stated?
10
- - Are success criteria defined?
11
- - Are edge cases considered?
12
- - Is scope well-bounded (not too broad or vague)?
13
-
14
- 2. **Correctness**
15
- - Do requirements make sense technically?
16
- - Are there contradictions?
17
- - Is the problem statement accurate?
18
-
19
- 3. **Feasibility**
20
- - Can this be implemented with available tools/constraints?
21
- - Are there obvious technical blockers?
22
- - Is the scope realistic for a single spec?
23
-
24
- 4. **Clarity**
25
- - Would a builder understand what to build?
26
- - Are acceptance criteria testable?
27
- - Is terminology consistent?
28
-
29
- ## Verdict Format
30
-
31
- After your review, provide your verdict in exactly this format:
32
-
33
- ```
34
- ---
35
- VERDICT: [APPROVE | REQUEST_CHANGES | COMMENT]
36
- SUMMARY: [One-line summary of your assessment]
37
- CONFIDENCE: [HIGH | MEDIUM | LOW]
38
- ---
39
- KEY_ISSUES:
40
- - [Issue 1 or "None"]
41
- - [Issue 2]
42
- ...
43
- ```
44
-
45
- **Verdict meanings:**
46
- - `APPROVE`: Spec is ready for human review
47
- - `REQUEST_CHANGES`: Significant issues must be fixed before proceeding
48
- - `COMMENT`: Minor suggestions, can proceed but consider feedback
49
-
50
- ## Notes
51
-
52
- - You are NOT reviewing code - you are reviewing the specification document
53
- - Focus on WHAT is being built, not HOW it will be implemented (that's for plan review)
54
- - Be constructive - identify issues AND suggest solutions
55
- - If the spec references other specs, note if context seems missing
@@ -1,151 +0,0 @@
1
- {
2
- "$schema": "../../protocol-schema.json",
3
- "name": "tick",
4
- "version": "1.1.0",
5
- "description": "Amendment workflow for existing SPIR specifications",
6
- "input": {
7
- "type": "spec",
8
- "required": false
9
- },
10
- "phases": [
11
- {
12
- "id": "identify",
13
- "name": "Identify Target",
14
- "description": "Find the existing spec to amend",
15
- "type": "once",
16
- "steps": [
17
- "analyze_requirements",
18
- "find_target_spec",
19
- "verify_spec_integrated",
20
- "determine_tick_number"
21
- ],
22
- "transition": {
23
- "on_complete": "amend_spec"
24
- }
25
- },
26
- {
27
- "id": "amend_spec",
28
- "name": "Amend Specification",
29
- "description": "Update the existing specification",
30
- "type": "once",
31
- "steps": [
32
- "analyze_changes_needed",
33
- "update_spec_sections",
34
- "add_amendment_entry",
35
- "commit_spec_changes"
36
- ],
37
- "transition": {
38
- "on_complete": "amend_plan"
39
- }
40
- },
41
- {
42
- "id": "amend_plan",
43
- "name": "Amend Plan",
44
- "description": "Update the existing plan",
45
- "type": "once",
46
- "steps": [
47
- "update_plan_phases",
48
- "add_amendment_history",
49
- "commit_plan_changes"
50
- ],
51
- "transition": {
52
- "on_complete": "implement"
53
- }
54
- },
55
- {
56
- "id": "implement",
57
- "name": "Implement",
58
- "description": "Implement the amendment",
59
- "type": "once",
60
- "steps": [
61
- "implement_changes",
62
- "self_review",
63
- "commit"
64
- ],
65
- "checks": {
66
- "build": {
67
- "command": "npm run build",
68
- "on_fail": "retry",
69
- "max_retries": 2
70
- }
71
- },
72
- "transition": {
73
- "on_complete": "defend"
74
- }
75
- },
76
- {
77
- "id": "defend",
78
- "name": "Defend",
79
- "description": "Test the amendment",
80
- "type": "once",
81
- "steps": [
82
- "write_tests",
83
- "run_tests",
84
- "fix_failures"
85
- ],
86
- "checks": {
87
- "tests": {
88
- "command": "npm test",
89
- "on_fail": "implement",
90
- "max_retries": 1
91
- }
92
- },
93
- "transition": {
94
- "on_complete": "evaluate"
95
- }
96
- },
97
- {
98
- "id": "evaluate",
99
- "name": "Evaluate",
100
- "description": "Verify amendment meets requirements",
101
- "type": "once",
102
- "steps": [
103
- "verify_requirements",
104
- "check_regressions"
105
- ],
106
- "transition": {
107
- "on_complete": "review"
108
- }
109
- },
110
- {
111
- "id": "review",
112
- "name": "Review",
113
- "description": "Create review document and PR",
114
- "type": "once",
115
- "steps": [
116
- "create_tick_review",
117
- "create_pr"
118
- ],
119
- "consultation": {
120
- "on": "review",
121
- "models": ["gemini", "codex"],
122
- "type": "impl",
123
- "parallel": true,
124
- "max_rounds": 1
125
- },
126
- "gate": "pr"
127
- }
128
- ],
129
- "signals": {
130
- "PHASE_COMPLETE": {
131
- "description": "Signal current phase is complete",
132
- "transitions_to": "next_phase"
133
- },
134
- "BLOCKED": {
135
- "description": "Signal implementation is blocked",
136
- "requires": "reason"
137
- }
138
- },
139
- "defaults": {
140
- "mode": "strict",
141
- "consultation": {
142
- "enabled": true,
143
- "models": ["gemini", "codex"],
144
- "parallel": true
145
- },
146
- "checks": {
147
- "build": "npm run build",
148
- "test": "npm test"
149
- }
150
- }
151
- }
@@ -1,277 +0,0 @@
1
- # TICK Protocol
2
- **T**ask **I**dentification, **C**oding, **K**ickout
3
-
4
- ## Overview
5
-
6
- TICK is an **amendment workflow** for existing SPIR specifications. Rather than creating new standalone specs, TICK modifies existing spec and plan documents in-place, tracking changes in an "Amendments" section.
7
-
8
- **Core Principle**: TICK is for *refining* existing specs. SPIR is for *creating* new specs.
9
-
10
- **Key Insight**: TICKs are not small SPIRs - they're amendments to existing SPIRs. This eliminates the "TICK vs SPIR" decision problem and keeps related work together.
11
-
12
- ## When to Use TICK
13
-
14
- ### Use TICK when:
15
- - Making **amendments to an existing SPIR spec** that is already `integrated`
16
- - Small scope (< 300 lines of new/changed code)
17
- - Requirements are clear and well-defined
18
- - No fundamental architecture changes
19
- - Examples:
20
- - Adding a feature to an existing system (e.g., "add password reset to user auth")
21
- - Bug fixes that extend existing functionality
22
- - Configuration changes with logic
23
- - Utility function additions to existing modules
24
- - Refactoring within an existing feature
25
-
26
- ### Use SPIR instead when:
27
- - Creating a **new feature from scratch** (no existing spec to amend)
28
- - Major architecture changes (scope too large for amendment)
29
- - Unclear requirements needing exploration
30
- - > 300 lines of code
31
- - Multiple stakeholders need alignment
32
-
33
- ### Cannot Use TICK when:
34
- - No relevant SPIR spec exists (create a new SPIR spec instead)
35
- - Target spec is not yet `integrated` (complete the SPIR cycle first)
36
-
37
- ## Amendment Workflow
38
-
39
- ### Phase 1: Identify Target Spec
40
-
41
- **Input**: User describes the amendment needed
42
-
43
- **Agent Actions**:
44
- 1. Analyze the amendment requirements
45
- 2. Search for the relevant existing spec to amend
46
- 3. Verify the spec exists and is `integrated`
47
- 4. Load current spec and plan documents
48
- 5. Determine next TICK number (count existing TICK entries + 1)
49
-
50
- **Example**:
51
- ```
52
- User: "Use TICK to add password reset to the auth system"
53
- Agent finds: specs/2-user-authentication.md (status: integrated)
54
- Agent determines: Next TICK is TICK-001 (first amendment)
55
- ```
56
-
57
- ### Phase 2: Specification Amendment (Autonomous)
58
-
59
- **Agent Actions**:
60
- 1. Analyze what needs to change in the spec
61
- 2. Update relevant sections of `specs/NNN-name.md`:
62
- - Problem Statement (if scope expands)
63
- - Success Criteria (if new criteria added)
64
- - Solution Approaches (if design changes)
65
- - Any other section that needs updating
66
- 3. Add entry to "Amendments" section at bottom:
67
- ```markdown
68
- ### TICK-001: [Title] (YYYY-MM-DD)
69
-
70
- **Summary**: [One-line description]
71
-
72
- **Problem Addressed**:
73
- [Why this amendment was needed]
74
-
75
- **Spec Changes**:
76
- - [Section]: [What changed]
77
-
78
- **Plan Changes**:
79
- - [Phase/steps]: [What was added/modified]
80
-
81
- **Review**: See `reviews/NNN-name-tick-001.md`
82
- ```
83
- 4. **COMMIT**: `[TICK NNN-NNN] Spec: [description]`
84
-
85
- ### Phase 3: Planning Amendment (Autonomous)
86
-
87
- **Agent Actions**:
88
- 1. Update `plans/NNN-name.md` with new implementation steps
89
- 2. Add/modify phases as needed
90
- 3. Add entry to "Amendment History" section at bottom:
91
- ```markdown
92
- ### TICK-001: [Title] (YYYY-MM-DD)
93
-
94
- **Changes**:
95
- - [Phase added]: [Description]
96
- - [Implementation steps]: [What was updated]
97
-
98
- **Review**: See `reviews/NNN-name-tick-001.md`
99
- ```
100
- 4. **COMMIT**: `[TICK NNN-NNN] Plan: [description]`
101
-
102
- ### Phase 4: Implementation (Autonomous)
103
-
104
- **Agent Actions**:
105
- 1. Execute implementation steps from the plan
106
- 2. Write code following fail-fast principles
107
- 3. Test functionality
108
- 4. **COMMIT**: `[TICK NNN-NNN] Impl: [description]`
109
-
110
- ### Phase 5: Review (User Checkpoint)
111
-
112
- **Agent Actions**:
113
- 1. Create review document: `reviews/NNN-name-tick-NNN.md`
114
- - What was amended and why
115
- - Changes made to spec and plan
116
- - Implementation challenges
117
- - Lessons learned
118
- 2. **Multi-Agent Consultation** (MANDATORY):
119
- - Consult GPT-5 AND Gemini Pro
120
- - Focus: Code quality, missed issues, improvements
121
- - Update review with consultation feedback
122
- 3. **Update Architecture Documentation** (if applicable)
123
- 4. **COMMIT**: `[TICK NNN-NNN] Review: [description]`
124
- 5. **PRESENT TO USER**: Show summary with consultation insights
125
-
126
- **User Actions**:
127
- - Review completed work
128
- - Provide feedback
129
- - Request changes OR approve
130
-
131
- **If Changes Requested**:
132
- - Agent makes changes
133
- - Commits: `[TICK NNN-NNN] Fixes: [description]`
134
- - Updates review document
135
- - Repeats until user approval
136
-
137
- ## File Naming Convention
138
-
139
- TICK amendments modify existing files and create new review files:
140
-
141
- | File Type | Pattern | Example |
142
- |-----------|---------|---------|
143
- | Spec (modified) | `specs/NNN-name.md` | `specs/2-user-authentication.md` |
144
- | Plan (modified) | `plans/NNN-name.md` | `plans/2-user-authentication.md` |
145
- | Review (new) | `reviews/NNN-name-tick-NNN.md` | `reviews/2-user-authentication-tick-001.md` |
146
-
147
- **Note**: Spec and plan files are modified in-place. Only the review file is new.
148
-
149
- ## Git Commit Strategy
150
-
151
- **TICK commits reference the parent spec and TICK number**:
152
-
153
- ```
154
- [TICK 2-001] Spec: Add password reset feature
155
- [TICK 2-001] Plan: Add password reset implementation
156
- [TICK 2-001] Impl: Add password reset feature
157
- [TICK 2-001] Review: Password reset implementation
158
- [TICK 2-001] Fixes: Address review feedback
159
- ```
160
-
161
- The format `[TICK <parent>-<tick>]` identifies:
162
- - `<parent>`: Parent spec number (e.g., 2)
163
- - `<tick>`: TICK amendment number (e.g., 001, 002, 003)
164
-
165
- ## Key Differences from SPIR
166
-
167
- | Aspect | SPIR | TICK |
168
- |--------|--------|------|
169
- | Purpose | Create new features | Amend existing features |
170
- | File creation | Creates new spec/plan/review | Modifies spec/plan, creates review |
171
- | Sequential numbering | Gets new number (1, 2) | Uses parent's number (2-001) |
172
- | Scope | Any size | < 300 lines typically |
173
- | Prerequisites | None | Existing integrated spec required |
174
- | User checkpoints | Multiple (spec, plan, phases) | Two (start, end) |
175
- | Multi-agent consultation | Throughout | End only (review) |
176
-
177
- ## Protocol Selection Guide
178
-
179
- ```
180
- Is there an existing spec to amend?
181
- ├── NO → Use SPIR (create new spec)
182
- └── YES → Is it integrated?
183
- ├── NO → Complete SPIR cycle first
184
- └── YES → Is the change small (<300 LOC)?
185
- ├── YES → Use TICK (amend existing spec)
186
- └── NO → Use SPIR (scope too large)
187
- ```
188
-
189
- **Mental Model**:
190
- - SPIR = Create new feature from scratch
191
- - TICK = Refine/extend existing feature
192
-
193
- ## Example TICK Workflow
194
-
195
- **User**: "Add password reset to the user authentication system"
196
-
197
- **Agent**:
198
- 1. **Identify**: Finds `specs/2-user-authentication.md` (integrated)
199
- 2. **Amend Spec** (30 seconds):
200
- - Updates Success Criteria with password reset requirements
201
- - Adds TICK-001 entry to Amendments section
202
- - Commit: `[TICK 2-001] Spec: Add password reset feature`
203
- 3. **Amend Plan** (30 seconds):
204
- - Adds Phase 4: Password Reset Email Service
205
- - Adds TICK-001 entry to Amendment History
206
- - Commit: `[TICK 2-001] Plan: Add password reset implementation`
207
- 4. **Implement** (2 minutes):
208
- - Creates password reset endpoint
209
- - Implements email service
210
- - Tests functionality
211
- - Commit: `[TICK 2-001] Impl: Add password reset feature`
212
- 5. **Review** (1 minute):
213
- - Creates `reviews/2-user-authentication-tick-001.md`
214
- - Runs 3-way consultation (Gemini, Codex, Claude)
215
- - Commit: `[TICK 2-001] Review: Password reset implementation`
216
- - Shows user the completed work
217
-
218
- **Total Time**: ~4 minutes for simple amendment
219
-
220
- ## Multiple TICKs per Spec
221
-
222
- A single spec can have multiple TICK amendments over its lifetime:
223
-
224
- ```markdown
225
- ## Amendments
226
-
227
- ### TICK-003: Add MFA support (2025-03-15)
228
- ...
229
-
230
- ### TICK-002: Add session timeout (2025-02-01)
231
- ...
232
-
233
- ### TICK-001: Add password reset (2025-01-15)
234
- ...
235
- ```
236
-
237
- TICKs are listed in reverse chronological order (newest first). Each TICK builds on the previous state of the spec.
238
-
239
- ## Migration from Standalone TICK
240
-
241
- Existing standalone TICK projects (created before this protocol change) are grandfathered in. No migration required.
242
-
243
- **Optional Migration** (if desired):
244
- 1. Identify the "parent spec" the TICK logically extends
245
- 2. Move TICK content into an amendment entry in the parent spec
246
- 3. Archive the standalone files with a note: "Migrated to spec NNN as TICK-NNN"
247
- 4. Update the GitHub Issue to reflect the change
248
-
249
- ## Benefits
250
-
251
- 1. **Single source of truth**: Spec file shows complete feature evolution
252
- 2. **Clear history**: Amendments section documents all changes chronologically
253
- 3. **Reduced fragmentation**: Related work stays together
254
- 4. **Simpler mental model**: "New vs amendment" is clearer than "SPIR vs TICK"
255
- 5. **Preserved context**: Looking at a spec shows all refinements
256
-
257
- ## Limitations
258
-
259
- 1. **Requires existing spec**: Cannot use TICK for greenfield work
260
- 2. **Spec can grow large**: Many TICKs add content (consider: >5 TICKs suggests need for new spec)
261
- 3. **Merge conflicts**: Multiple TICKs on same spec may conflict
262
- 4. **No course correction**: Can't adjust mid-implementation
263
-
264
- ## Best Practices
265
-
266
- 1. **Verify spec is integrated**: Never TICK a spec that isn't complete
267
- 2. **Keep TICKs small**: If scope grows, consider new SPIR spec
268
- 3. **Clear summaries**: Amendment entries should be self-explanatory
269
- 4. **Test before review**: Always test functionality before presenting
270
- 5. **Honest documentation**: Document all deviations in review
271
-
272
- ## Templates
273
-
274
- TICK uses the standard SPIR templates with amendments sections:
275
- - Spec template: `codev/protocols/spir/templates/spec.md` (includes Amendments section)
276
- - Plan template: `codev/protocols/spir/templates/plan.md` (includes Amendment History section)
277
- - Review template: `codev/protocols/tick/templates/review.md` (TICK-specific)
@@ -1,67 +0,0 @@
1
- # TICK Plan: [Title]
2
-
3
- ## Metadata
4
- - **ID**: ####-[short-name]
5
- - **Protocol**: TICK
6
- - **Specification**: [Link to spec file]
7
- - **Created**: [YYYY-MM-DD]
8
- - **Status**: autonomous
9
-
10
- ## Implementation Approach
11
- [Brief description of chosen approach from specification]
12
-
13
- ## Implementation Steps
14
-
15
- ### Step 1: [Action]
16
- **Files**: [list files to create/modify]
17
- **Changes**: [what to do]
18
-
19
- ### Step 2: [Action]
20
- **Files**: [list files to create/modify]
21
- **Changes**: [what to do]
22
-
23
- ### Step 3: [Action]
24
- **Files**: [list files to create/modify]
25
- **Changes**: [what to do]
26
-
27
- [Add more steps as needed - keep sequential]
28
-
29
- ## Files to Create/Modify
30
-
31
- ### New Files
32
- - `path/to/file1.ts` - [purpose]
33
- - `path/to/file2.ts` - [purpose]
34
-
35
- ### Modified Files
36
- - `path/to/existing1.ts` - [what changes]
37
- - `path/to/existing2.ts` - [what changes]
38
-
39
- ## Testing Strategy
40
-
41
- ### Manual Testing
42
- 1. [Test scenario 1]
43
- 2. [Test scenario 2]
44
- 3. [Test scenario 3]
45
-
46
- ### Automated Tests (if applicable)
47
- - [Test file 1: what to test]
48
- - [Test file 2: what to test]
49
-
50
- ## Success Criteria
51
- - [ ] All steps completed
52
- - [ ] Manual tests pass
53
- - [ ] No breaking changes
54
- - [ ] Code committed
55
-
56
- ## Risks
57
- | Risk | If Occurs |
58
- |------|-----------|
59
- | [Risk 1] | [Fallback plan] |
60
- | [Risk 2] | [Fallback plan] |
61
-
62
- ## Dependencies
63
- - [Dependency 1]
64
- - [Dependency 2]
65
-
66
- ## Notes
67
- [Any implementation notes or considerations]