cc-codeconductor 0.2.9 → 0.2.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/README.md +105 -25
- package/dist/index.js +165 -27
- package/package.json +1 -1
- package/presets/agy/AGENTS.md +354 -0
- package/presets/agy/README.md +47 -0
- package/presets/agy/hooks.json +30 -0
- package/presets/agy/mcp_config.json +3 -0
- package/presets/agy/rules/commit-style.md +1 -0
- package/presets/agy/rules/graphify.md +14 -0
- package/presets/agy/scripts/post-tool.sh +25 -0
- package/presets/agy/scripts/pre-tool.sh +56 -0
- package/presets/agy/settings.json +8 -0
- package/presets/agy/skills/cc-api-contract/SKILL.md +71 -0
- package/presets/agy/skills/cc-db-migration/SKILL.md +70 -0
- package/presets/agy/skills/cc-feature/SKILL.md +115 -0
- package/presets/agy/skills/cc-fix/SKILL.md +124 -0
- package/presets/agy/skills/cc-pagespeed/SKILL.md +101 -0
- package/presets/agy/skills/cc-refactor/SKILL.md +149 -0
- package/presets/agy/skills/cc-review/SKILL.md +142 -0
- package/presets/agy/skills/cc-tdd-cycle/SKILL.md +226 -0
- package/presets/agy/skills/cc-test-plan/SKILL.md +145 -0
- package/presets/agy/skills/commit/SKILL.md +5 -0
- package/presets/agy/workflows/cc-api-contract.md +71 -0
- package/presets/agy/workflows/cc-db-migration.md +70 -0
- package/presets/agy/workflows/cc-feature.md +115 -0
- package/presets/agy/workflows/cc-fix.md +124 -0
- package/presets/agy/workflows/cc-pagespeed.md +101 -0
- package/presets/agy/workflows/cc-refactor.md +149 -0
- package/presets/agy/workflows/cc-review.md +142 -0
- package/presets/agy/workflows/cc-tdd-cycle.md +226 -0
- package/presets/agy/workflows/cc-test-plan.md +145 -0
- package/presets/agy/workflows/commit.md +1 -0
- package/presets/claude/CLAUDE.md +13 -3
- package/presets/claude/claude.json +6 -0
- package/presets/claude/commands/cc/pagespeed.md +103 -0
- package/presets/claude/settings.json +249 -2
- package/presets/claude/skills/conductor-setup/SKILL.md +125 -0
- package/presets/claude/skills/find-skills/SKILL.md +142 -0
- package/presets/claude/skills/multi-agent-orchestration/README.md +144 -0
- package/presets/claude/skills/multi-agent-orchestration/SKILL.md +579 -0
- package/presets/claude/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
- package/presets/claude/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
- package/presets/claude/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
- package/presets/claude/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
- package/presets/claude/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
- package/presets/claude/skills/pagespeed-insights/SKILL.md +443 -0
- package/presets/claude/skills/pagespeed-insights/reference.md +50 -0
- package/presets/claude/skills/pagespeed-perf/SKILL.md +279 -0
- package/presets/claude/skills/workflow-orchestration-patterns/SKILL.md +98 -0
- package/presets/claude/skills/workflow-orchestration-patterns/references/details.md +223 -0
- package/presets/codex/AGENTS.md +19 -14
- package/presets/codex/skills/conductor-setup/SKILL.md +125 -0
- package/presets/codex/skills/find-skills/SKILL.md +142 -0
- package/presets/codex/skills/multi-agent-orchestration/README.md +144 -0
- package/presets/codex/skills/multi-agent-orchestration/SKILL.md +579 -0
- package/presets/codex/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
- package/presets/codex/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
- package/presets/codex/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
- package/presets/codex/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
- package/presets/codex/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
- package/presets/codex/skills/pagespeed-insights/SKILL.md +443 -0
- package/presets/codex/skills/pagespeed-insights/reference.md +50 -0
- package/presets/codex/skills/pagespeed-perf/SKILL.md +279 -0
- package/presets/codex/skills/workflow-orchestration-patterns/SKILL.md +98 -0
- package/presets/codex/skills/workflow-orchestration-patterns/references/details.md +223 -0
- package/presets/opencode/README.md +11 -10
- package/presets/opencode/commands/cc-pagespeed.md +100 -0
- package/presets/opencode/skills/conductor-setup/SKILL.md +125 -0
- package/presets/opencode/skills/find-skills/SKILL.md +142 -0
- package/presets/opencode/skills/multi-agent-orchestration/README.md +144 -0
- package/presets/opencode/skills/multi-agent-orchestration/SKILL.md +579 -0
- package/presets/opencode/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
- package/presets/opencode/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
- package/presets/opencode/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
- package/presets/opencode/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
- package/presets/opencode/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
- package/presets/opencode/skills/pagespeed-insights/SKILL.md +443 -0
- package/presets/opencode/skills/pagespeed-insights/reference.md +50 -0
- package/presets/opencode/skills/pagespeed-perf/SKILL.md +279 -0
- package/presets/opencode/skills/workflow-orchestration-patterns/SKILL.md +98 -0
- package/presets/opencode/skills/workflow-orchestration-patterns/references/details.md +223 -0
- package/presets/seo-hotel/commands/cc-seo-audit.md +17 -9
- package/presets/seo-hotel/settings.json +225 -0
- package/presets/seo-hotel/skills/find-skills/SKILL.md +142 -0
- package/presets/seo-hotel/skills/pagespeed-insights/SKILL.md +443 -0
- package/presets/seo-hotel/skills/pagespeed-insights/reference.md +50 -0
- package/src/presets/manifests/agy.yml +36 -2
- package/src/presets/manifests/claude.yml +5 -0
- package/src/presets/manifests/opencode.yml +4 -0
- package/src/presets/models/agy.yml +16 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-tdd-cycle
|
|
3
|
+
description: >-
|
|
4
|
+
Run a structured Red-Green-Refactor TDD cycle — write a failing test first,
|
|
5
|
+
implement the minimum code to pass it, then refactor with the suite green.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# TDD Cycle — Red → Green → Refactor
|
|
9
|
+
|
|
10
|
+
Scope: $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
Describe what behavior you want to implement. Include:
|
|
13
|
+
|
|
14
|
+
- The function, method, or feature to implement
|
|
15
|
+
- The expected behavior (inputs and outputs, or acceptance criteria)
|
|
16
|
+
- Any known constraints or edge cases
|
|
17
|
+
- Relevant files or modules (if known)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Before you begin — mandatory pre-check
|
|
22
|
+
|
|
23
|
+
This command enforces strict TDD discipline. The three phases are sequential and
|
|
24
|
+
non-negotiable:
|
|
25
|
+
|
|
26
|
+
1. **RED** — a failing test exists before any implementation code is written
|
|
27
|
+
2. **GREEN** — the minimum implementation to make the test pass (no more)
|
|
28
|
+
3. **REFACTOR** — clean up the code while keeping all tests green
|
|
29
|
+
|
|
30
|
+
Do not write implementation code during RED. Do not refactor during GREEN.
|
|
31
|
+
Mixing phases invalidates the cycle.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Phase 1 — RED (Tester role)
|
|
36
|
+
|
|
37
|
+
Adopt the **Tester** role as defined in `CLAUDE.md`.
|
|
38
|
+
|
|
39
|
+
### 1a — Scope clarification
|
|
40
|
+
|
|
41
|
+
Before writing any test, confirm:
|
|
42
|
+
|
|
43
|
+
- What is the unit of behavior being tested? (function, method, endpoint, domain
|
|
44
|
+
rule)
|
|
45
|
+
- What are the inputs and expected outputs?
|
|
46
|
+
- What are the failure cases?
|
|
47
|
+
|
|
48
|
+
If the scope is ambiguous, ask one clarifying question and wait for the answer.
|
|
49
|
+
|
|
50
|
+
### 1b — Write the failing test
|
|
51
|
+
|
|
52
|
+
Write a test that:
|
|
53
|
+
|
|
54
|
+
- Targets exactly the behavior described in the scope
|
|
55
|
+
- Fails for the right reason (not a compile error, not a missing dependency —
|
|
56
|
+
the logic does not exist yet)
|
|
57
|
+
- Has a name that describes the behavior: `given_X_when_Y_then_Z` or equivalent
|
|
58
|
+
in the project's test naming convention
|
|
59
|
+
- Covers at minimum: one happy path, one edge case, one failure case
|
|
60
|
+
|
|
61
|
+
Do not write the implementation. Do not make the test pass by any means other
|
|
62
|
+
than the implementation that will follow in Phase 2.
|
|
63
|
+
|
|
64
|
+
### 1c — Run the test suite and confirm RED
|
|
65
|
+
|
|
66
|
+
Run the test suite. The new test must fail. Existing tests must pass.
|
|
67
|
+
|
|
68
|
+
If the new test passes without implementation, the test is wrong. Fix the test
|
|
69
|
+
before continuing.
|
|
70
|
+
|
|
71
|
+
**RED Phase Report:**
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
## RED Phase Report
|
|
75
|
+
|
|
76
|
+
**Test file**: [path/to/test/file]
|
|
77
|
+
**Tests written**:
|
|
78
|
+
- [test name] — [what it verifies]
|
|
79
|
+
|
|
80
|
+
**Suite result**: [X passing, Y failing]
|
|
81
|
+
**New test status**: FAIL ✓
|
|
82
|
+
**Failure reason**: [quoted error or assertion message]
|
|
83
|
+
**Existing tests**: [all passing | N failing — list]
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**STOP. Show the RED Phase Report. Do not proceed to GREEN without
|
|
87
|
+
confirmation.**
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Phase 2 — GREEN (Implementer role)
|
|
92
|
+
|
|
93
|
+
Adopt the **Implementer** role as defined in `CLAUDE.md`.
|
|
94
|
+
|
|
95
|
+
### 2a — Read the failing test before writing any code
|
|
96
|
+
|
|
97
|
+
Understand exactly what the test asserts. Write only the code that satisfies
|
|
98
|
+
that assertion. Nothing more.
|
|
99
|
+
|
|
100
|
+
### 2b — Implement the minimum
|
|
101
|
+
|
|
102
|
+
Rules for GREEN phase:
|
|
103
|
+
|
|
104
|
+
- Write the smallest amount of code that makes the failing test pass
|
|
105
|
+
- Do not add features not tested
|
|
106
|
+
- Do not clean up or restructure existing code — that is Refactor's job
|
|
107
|
+
- Do not add new tests — that is another RED cycle
|
|
108
|
+
- Hardcoding a return value is acceptable if it makes the test pass (the
|
|
109
|
+
Refactor phase will generalize it)
|
|
110
|
+
|
|
111
|
+
### 2c — Run the test suite and confirm GREEN
|
|
112
|
+
|
|
113
|
+
Run the test suite. The new test must pass. All previously passing tests must
|
|
114
|
+
still pass.
|
|
115
|
+
|
|
116
|
+
If any previously passing test now fails, you introduced a regression. Fix it
|
|
117
|
+
before continuing.
|
|
118
|
+
|
|
119
|
+
**GREEN Phase Report:**
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
## GREEN Phase Report
|
|
123
|
+
|
|
124
|
+
**Files changed**:
|
|
125
|
+
- [path/to/file] — [what was added, one sentence]
|
|
126
|
+
|
|
127
|
+
**Implementation approach**: [one sentence — what the code does]
|
|
128
|
+
**Suite result**: [X passing, Y failing]
|
|
129
|
+
**New test status**: PASS ✓
|
|
130
|
+
**Regressions**: [none | list failing tests]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**STOP. Show the GREEN Phase Report. Do not proceed to REFACTOR without
|
|
134
|
+
confirmation.**
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Phase 3 — REFACTOR (Implementer role, then Reviewer role)
|
|
139
|
+
|
|
140
|
+
Adopt the **Implementer** role as defined in `CLAUDE.md`.
|
|
141
|
+
|
|
142
|
+
### 3a — Assess what needs cleaning
|
|
143
|
+
|
|
144
|
+
Before touching any code, identify:
|
|
145
|
+
|
|
146
|
+
- Duplication introduced during GREEN
|
|
147
|
+
- Names that do not clearly express intent
|
|
148
|
+
- Abstractions that belong in a separate function or module
|
|
149
|
+
- Logic that is hardcoded and should be generalized
|
|
150
|
+
|
|
151
|
+
Do not invent improvements. Only address what is directly in the implementation
|
|
152
|
+
written in Phase 2.
|
|
153
|
+
|
|
154
|
+
### 3b — Refactor
|
|
155
|
+
|
|
156
|
+
Rules for REFACTOR phase:
|
|
157
|
+
|
|
158
|
+
- All tests must remain GREEN throughout — run the suite after each change
|
|
159
|
+
- Do not add new behavior
|
|
160
|
+
- Do not add new tests (if you discover untested behavior, note it for a new RED
|
|
161
|
+
cycle)
|
|
162
|
+
- Do not change function signatures unless the original was clearly wrong
|
|
163
|
+
|
|
164
|
+
### 3c — Run the test suite and confirm GREEN after refactor
|
|
165
|
+
|
|
166
|
+
The full suite must pass. If any test fails during refactor, undo the last
|
|
167
|
+
change and investigate.
|
|
168
|
+
|
|
169
|
+
### 3d — Review (Reviewer role)
|
|
170
|
+
|
|
171
|
+
Adopt the **Reviewer** role as defined in `CLAUDE.md`.
|
|
172
|
+
|
|
173
|
+
Review only the refactored code against these axes:
|
|
174
|
+
|
|
175
|
+
| Axis | What to check |
|
|
176
|
+
| ------------- | --------------------------------------------------------------- |
|
|
177
|
+
| Scope | Did the refactor change any behavior? |
|
|
178
|
+
| Correctness | Does the logic still satisfy the original test intent? |
|
|
179
|
+
| Architecture | Does the code follow existing project patterns? |
|
|
180
|
+
| Test coverage | Are all written tests still meaningful (not trivially passing)? |
|
|
181
|
+
|
|
182
|
+
Produce a Review Report. CRITICAL findings block completion.
|
|
183
|
+
|
|
184
|
+
**REFACTOR Phase Report:**
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
## REFACTOR Phase Report
|
|
188
|
+
|
|
189
|
+
**Changes made**:
|
|
190
|
+
- [path/to/file] — [what was cleaned up]
|
|
191
|
+
|
|
192
|
+
**Suite result**: [X passing, Y failing]
|
|
193
|
+
**Behavioral changes**: none (refactor only)
|
|
194
|
+
|
|
195
|
+
### Review findings
|
|
196
|
+
**CRITICAL**: (none) | [list]
|
|
197
|
+
**WARNING**: (none) | [list]
|
|
198
|
+
**SUGGESTION**: (none) | [list]
|
|
199
|
+
|
|
200
|
+
**Verdict**: approved | approved with warnings | blocked
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Completion
|
|
206
|
+
|
|
207
|
+
The TDD cycle is complete when:
|
|
208
|
+
|
|
209
|
+
- RED: at least one failing test was written and confirmed failing
|
|
210
|
+
- GREEN: the minimum implementation makes the test pass
|
|
211
|
+
- REFACTOR: the code is clean, all tests pass, no CRITICAL review findings
|
|
212
|
+
|
|
213
|
+
**Final Summary:**
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
## TDD Cycle Summary
|
|
217
|
+
|
|
218
|
+
**Behavior implemented**: [one sentence]
|
|
219
|
+
**Tests written**: [count] — [list test names]
|
|
220
|
+
**Files changed**: [list]
|
|
221
|
+
**Suite result**: [X passing, Y failing]
|
|
222
|
+
**Cycle status**: complete | blocked (reason)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
If the behavior requires additional test cases, start a new `/cc:tdd-cycle` with
|
|
226
|
+
the next scenario. One cycle = one behavior.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-test-plan
|
|
3
|
+
description:
|
|
4
|
+
Generate a structured test plan for a feature or module — covers unit,
|
|
5
|
+
integration, contract, and edge cases without writing any implementation code.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Test Plan Workflow
|
|
9
|
+
|
|
10
|
+
Scope: $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
Specify what to plan tests for. Examples:
|
|
13
|
+
|
|
14
|
+
- A feature name: `user authentication`
|
|
15
|
+
- A module or file path: `src/orders/OrderService.kt`
|
|
16
|
+
- A Task Card title: `Add paginated product listing endpoint`
|
|
17
|
+
- A PR or branch: `feature/payment-retry`
|
|
18
|
+
|
|
19
|
+
If $ARGUMENTS is empty, describe the scope in your next message before invoking
|
|
20
|
+
`tester`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Step 1 — Scope confirmation
|
|
25
|
+
|
|
26
|
+
Before invoking `tester`, confirm the scope is well-defined.
|
|
27
|
+
|
|
28
|
+
A valid scope includes:
|
|
29
|
+
|
|
30
|
+
- The behavior or module under test
|
|
31
|
+
- The acceptance criteria or expected behavior (from the Task Card if available)
|
|
32
|
+
- Known edge cases or failure modes
|
|
33
|
+
|
|
34
|
+
If the scope is vague (e.g., "test the whole service"), ask one clarifying
|
|
35
|
+
question and wait for the answer.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Step 2 — Test plan generation (tester)
|
|
40
|
+
|
|
41
|
+
Invoke `tester` in planning mode — produce a test plan document, not test code.
|
|
42
|
+
The plan will be used as input when tests are actually written.
|
|
43
|
+
|
|
44
|
+
tester must produce a Test Plan covering the following layers:
|
|
45
|
+
|
|
46
|
+
**Unit tests**
|
|
47
|
+
|
|
48
|
+
- Individual functions or methods in isolation
|
|
49
|
+
- One test per behavior, not per method
|
|
50
|
+
- Input/output contracts, null handling, type coercion
|
|
51
|
+
|
|
52
|
+
**Integration tests**
|
|
53
|
+
|
|
54
|
+
- Interactions between two or more components
|
|
55
|
+
- Database read/write cycles (if applicable)
|
|
56
|
+
- External service boundaries (mocked or stubbed)
|
|
57
|
+
|
|
58
|
+
**Contract tests**
|
|
59
|
+
|
|
60
|
+
- API endpoint contracts: request shape, response shape, status codes
|
|
61
|
+
- Event schema contracts (if event-driven components are in scope)
|
|
62
|
+
|
|
63
|
+
**Edge cases**
|
|
64
|
+
|
|
65
|
+
- Empty inputs, boundary values, max/min limits
|
|
66
|
+
- Concurrent access (if shared state is involved)
|
|
67
|
+
- Failure paths: what happens when a dependency is unavailable
|
|
68
|
+
|
|
69
|
+
**Regression cases**
|
|
70
|
+
|
|
71
|
+
- Known past bugs that must not recur (include reference if available)
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Step 3 — Test Plan format
|
|
76
|
+
|
|
77
|
+
tester produces the plan in this format:
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
## Test Plan — [Scope Name]
|
|
81
|
+
|
|
82
|
+
### Scope
|
|
83
|
+
|
|
84
|
+
[What is being tested and why]
|
|
85
|
+
|
|
86
|
+
### Unit Tests
|
|
87
|
+
|
|
88
|
+
| Test ID | Target | Scenario | Expected Result |
|
|
89
|
+
| ------- | ------ | -------- | --------------- |
|
|
90
|
+
| U-001 | ... | ... | ... |
|
|
91
|
+
|
|
92
|
+
### Integration Tests
|
|
93
|
+
|
|
94
|
+
| Test ID | Components | Scenario | Expected Result |
|
|
95
|
+
| ------- | ---------- | -------- | --------------- |
|
|
96
|
+
| I-001 | ... | ... | ... |
|
|
97
|
+
|
|
98
|
+
### Contract Tests
|
|
99
|
+
|
|
100
|
+
| Test ID | Endpoint/Event | Property | Expected Value |
|
|
101
|
+
| ------- | -------------- | -------- | -------------- |
|
|
102
|
+
| C-001 | ... | ... | ... |
|
|
103
|
+
|
|
104
|
+
### Edge Cases
|
|
105
|
+
|
|
106
|
+
| Test ID | Input/Condition | Expected Behavior |
|
|
107
|
+
| ------- | --------------- | ----------------- |
|
|
108
|
+
| E-001 | ... | ... |
|
|
109
|
+
|
|
110
|
+
### Regression Cases
|
|
111
|
+
|
|
112
|
+
| Test ID | Reference | Scenario | Must Not Happen |
|
|
113
|
+
| ------- | --------- | -------- | --------------- |
|
|
114
|
+
| R-001 | ... | ... | ... |
|
|
115
|
+
|
|
116
|
+
### Coverage Targets
|
|
117
|
+
|
|
118
|
+
- Minimum unit coverage: [%] (or "all acceptance criteria covered")
|
|
119
|
+
- Integration scenarios: [count]
|
|
120
|
+
- Contract validations: [count]
|
|
121
|
+
|
|
122
|
+
### Out of Scope
|
|
123
|
+
|
|
124
|
+
[What this test plan explicitly does not cover and why]
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Step 4 — Human review
|
|
130
|
+
|
|
131
|
+
Show the Test Plan to the human before any tests are written.
|
|
132
|
+
|
|
133
|
+
The Test Plan is an artifact for review and approval. Writing test code is a
|
|
134
|
+
separate action — invoke `/cc:feature` or add a test task to the board to
|
|
135
|
+
implement from this plan.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Completion
|
|
140
|
+
|
|
141
|
+
Deliver the complete Test Plan document. Save it as
|
|
142
|
+
`docs/test-plans/[scope-slug].md` if the human requests persistence.
|
|
143
|
+
|
|
144
|
+
This command produces a plan, not test files. No production code and no test
|
|
145
|
+
code is written during this command.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-api-contract
|
|
3
|
+
description:
|
|
4
|
+
Run the API contract workflow for request/response shape changes,
|
|
5
|
+
compatibility constraints, contract tests, documentation, and review.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# API Contract Workflow
|
|
9
|
+
|
|
10
|
+
API contract request: $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
## Step 1 — Task Card validation (task-coach)
|
|
13
|
+
|
|
14
|
+
Invoke `task-coach` with the request above.
|
|
15
|
+
|
|
16
|
+
The Task Card must classify the task as `feature` or `refactor` with `high`
|
|
17
|
+
risk unless the human provides a narrower validated risk. It must include:
|
|
18
|
+
|
|
19
|
+
- affected endpoint, command, or public interface
|
|
20
|
+
- request and response examples
|
|
21
|
+
- backward compatibility and versioning impact
|
|
22
|
+
- consumers that must remain compatible
|
|
23
|
+
- contract tests and documentation acceptance criteria
|
|
24
|
+
|
|
25
|
+
**STOP here. Show the Task Card and wait for human confirmation.**
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Step 2 — Technical Plan (architect)
|
|
30
|
+
|
|
31
|
+
Invoke `architect` with the approved Task Card.
|
|
32
|
+
|
|
33
|
+
architect must define the API contract, compatibility strategy, validation
|
|
34
|
+
rules, docs/OpenAPI impact, and migration path for consumers.
|
|
35
|
+
|
|
36
|
+
**STOP here. Show the Technical Plan and wait for explicit human approval.**
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Step 3 — Implementation (implementer)
|
|
41
|
+
|
|
42
|
+
Invoke `implementer` with the approved plan.
|
|
43
|
+
|
|
44
|
+
implementer must apply the minimal diff, preserve compatible behavior unless a
|
|
45
|
+
breaking change was explicitly approved, and update only the files named in the
|
|
46
|
+
plan.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Step 4 — Contract tests (tester)
|
|
51
|
+
|
|
52
|
+
Invoke `tester`.
|
|
53
|
+
|
|
54
|
+
tester must add or update contract tests covering request shape, response shape,
|
|
55
|
+
status/error behavior, and backward compatibility constraints.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Step 5 — Review (reviewer)
|
|
60
|
+
|
|
61
|
+
Invoke `reviewer`.
|
|
62
|
+
|
|
63
|
+
reviewer must block on missing contract tests, undocumented breaking changes,
|
|
64
|
+
or docs/OpenAPI drift.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Completion
|
|
69
|
+
|
|
70
|
+
Report the final Task Card, Technical Plan, implementation summary, test report,
|
|
71
|
+
review report, docs updated, compatibility impact, and residual risks.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-db-migration
|
|
3
|
+
description:
|
|
4
|
+
Run the database migration workflow for schema/data changes, operational
|
|
5
|
+
sequencing, tests, and review.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Database Migration Workflow
|
|
9
|
+
|
|
10
|
+
Migration request: $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
## Step 1 — Task Card validation (task-coach)
|
|
13
|
+
|
|
14
|
+
Invoke `task-coach` with the request above.
|
|
15
|
+
|
|
16
|
+
The Task Card must classify the task as `high` risk and include:
|
|
17
|
+
|
|
18
|
+
- tables, collections, models, or migration files in scope
|
|
19
|
+
- data backfill or data cleanup requirements
|
|
20
|
+
- deployment ordering and compatibility window
|
|
21
|
+
- rollback or forward-fix strategy
|
|
22
|
+
- lock risk, data risk, and verification commands
|
|
23
|
+
|
|
24
|
+
**STOP here. Show the Task Card and wait for human confirmation.**
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Step 2 — Migration Plan (architect)
|
|
29
|
+
|
|
30
|
+
Invoke `architect` with the approved Task Card.
|
|
31
|
+
|
|
32
|
+
architect must define the schema/data plan, operational sequencing,
|
|
33
|
+
compatibility strategy, rollback/forward-fix notes, and test approach.
|
|
34
|
+
|
|
35
|
+
**STOP here. Show the Technical Plan and wait for explicit human approval.**
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Step 3 — Implementation (implementer)
|
|
40
|
+
|
|
41
|
+
Invoke `implementer` with the approved plan.
|
|
42
|
+
|
|
43
|
+
implementer must keep model and migration changes together, avoid unrelated
|
|
44
|
+
refactors, and preserve the deployment order specified by architect.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Step 4 — Migration tests (tester)
|
|
49
|
+
|
|
50
|
+
Invoke `tester`.
|
|
51
|
+
|
|
52
|
+
tester must cover migration-sensitive behavior where the stack supports it,
|
|
53
|
+
including happy path, existing-data edge cases, and rollback/forward-fix notes
|
|
54
|
+
when automated rollback tests are not practical.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Step 5 — Review (reviewer)
|
|
59
|
+
|
|
60
|
+
Invoke `reviewer`.
|
|
61
|
+
|
|
62
|
+
reviewer must block on missing migration tests, missing data-risk notes,
|
|
63
|
+
undocumented deployment sequencing, or model/migration drift.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Completion
|
|
68
|
+
|
|
69
|
+
Report migration files changed, model files changed, tests run, lock risk, data
|
|
70
|
+
risk, operational sequencing, rollback/forward-fix notes, and residual risk.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-feature
|
|
3
|
+
description:
|
|
4
|
+
Run the full feature workflow — task validation, technical design,
|
|
5
|
+
implementation, testing, review, and documentation.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Feature Workflow
|
|
9
|
+
|
|
10
|
+
Feature request: $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
## Step 1 — Task Card validation (task-coach)
|
|
13
|
+
|
|
14
|
+
Invoke `task-coach` with the feature description above.
|
|
15
|
+
|
|
16
|
+
task-coach must produce a complete Task Card before any other agent runs. The
|
|
17
|
+
Task Card is ready when it contains: title, type, risk classification, scope,
|
|
18
|
+
context, acceptance criteria, and constraints.
|
|
19
|
+
|
|
20
|
+
If any field is missing or ambiguous, task-coach must ask one clarifying
|
|
21
|
+
question at a time and wait for the answer. Do not proceed with an incomplete
|
|
22
|
+
Task Card.
|
|
23
|
+
|
|
24
|
+
**STOP here. Show the completed Task Card and wait for human confirmation before
|
|
25
|
+
continuing.**
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Step 2 — Technical Plan (architect)
|
|
30
|
+
|
|
31
|
+
Invoke `architect` with the validated Task Card from Step 1.
|
|
32
|
+
|
|
33
|
+
architect must produce a Technical Plan that covers:
|
|
34
|
+
|
|
35
|
+
- Chosen approach and rationale
|
|
36
|
+
- Affected files and modules
|
|
37
|
+
- Data model changes (if any)
|
|
38
|
+
- API contract changes (if any)
|
|
39
|
+
- Identified risks and mitigations
|
|
40
|
+
- Open questions that require a human decision
|
|
41
|
+
|
|
42
|
+
**STOP here. Show the Technical Plan and wait for explicit human approval. Do
|
|
43
|
+
not invoke implementer until the plan is approved.**
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Step 3 — Implementation (implementer)
|
|
48
|
+
|
|
49
|
+
Invoke `implementer` with the approved Technical Plan and the Task Card.
|
|
50
|
+
Implementer creates a Git Worktree before touching any file; all edits happen inside it.
|
|
51
|
+
|
|
52
|
+
implementer must:
|
|
53
|
+
|
|
54
|
+
1. Read the Technical Plan before touching any file
|
|
55
|
+
2. Apply the minimal diff — only what the plan specifies
|
|
56
|
+
3. Run the project test suite after implementation
|
|
57
|
+
4. Produce an Implementation Summary: what changed, which files, how to verify
|
|
58
|
+
locally
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Step 4 — Test coverage (tester)
|
|
63
|
+
|
|
64
|
+
Invoke `tester` with the Implementation Summary and the Task Card.
|
|
65
|
+
|
|
66
|
+
tester must:
|
|
67
|
+
|
|
68
|
+
1. Write or extend tests to cover the new behavior
|
|
69
|
+
2. Ensure all acceptance criteria from the Task Card have at least one test
|
|
70
|
+
3. Run the full test suite and confirm it passes
|
|
71
|
+
4. Produce a Coverage Summary: test files added or modified, cases covered
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Step 5 — Code review (reviewer)
|
|
76
|
+
|
|
77
|
+
Invoke `reviewer` with the complete diff and the Task Card.
|
|
78
|
+
|
|
79
|
+
reviewer must produce a Review Report with findings categorized as:
|
|
80
|
+
|
|
81
|
+
- CRITICAL — must be fixed before merge
|
|
82
|
+
- WARNING — must be resolved before merge
|
|
83
|
+
- SUGGESTION — optional improvement
|
|
84
|
+
|
|
85
|
+
If any CRITICAL findings exist, **STOP and report them**. Do not proceed until
|
|
86
|
+
they are resolved and re-reviewed.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Step 6 — Documentation (docs)
|
|
91
|
+
|
|
92
|
+
Invoke `docs` only if any of the following changed:
|
|
93
|
+
|
|
94
|
+
- A public API endpoint was added or modified
|
|
95
|
+
- A public interface or module was introduced
|
|
96
|
+
- Behavior visible to end users changed
|
|
97
|
+
|
|
98
|
+
docs must update: README (if applicable), OpenAPI spec (if applicable),
|
|
99
|
+
CHANGELOG (always), ADR (if an architectural decision was made).
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Completion
|
|
104
|
+
|
|
105
|
+
Report the following to the human:
|
|
106
|
+
|
|
107
|
+
- Task Card (final)
|
|
108
|
+
- Technical Plan (approved)
|
|
109
|
+
- Implementation Summary
|
|
110
|
+
- Coverage Summary
|
|
111
|
+
- Review Report (all findings resolved)
|
|
112
|
+
- List of documentation files updated (if any)
|
|
113
|
+
|
|
114
|
+
The feature is complete only when: all tests pass, no CRITICAL review findings
|
|
115
|
+
remain, and documentation reflects the implemented behavior.
|