cc-codeconductor 1.5.1 → 1.6.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.
- package/README.md +9 -9
- package/dist/core/runner/runner-target.d.ts +4 -4
- package/dist/core/verification/rdd-receipt.d.ts +19 -0
- package/dist/core/verification/verification-runner.d.ts +16 -0
- package/dist/index.js +1377 -635
- package/dist/library.js +52 -14
- package/dist/validation/schemas.d.ts +27 -22
- package/package.json +2 -1
- package/presets/agy/skills/cc-feature/SKILL.md +17 -16
- package/presets/agy/skills/cc-fix/SKILL.md +28 -34
- package/presets/agy/skills/openspec/SKILL.md +39 -11
- package/presets/agy/workflows/cc-council.md +4 -2
- package/presets/claude/commands/cc/council.md +2 -83
- package/presets/claude/commands/cc/openspec.md +20 -1
- package/presets/claude/skills/openspec/SKILL.md +39 -11
- package/presets/codex/skills/cc-council/SKILL.md +2 -93
- package/presets/codex/skills/cc-openspec/SKILL.md +20 -1
- package/presets/codex/skills/openspec/SKILL.md +39 -11
- package/presets/cursor/commands/cc/council.md +2 -83
- package/presets/cursor/commands/cc/openspec.md +20 -1
- package/presets/cursor/skills/openspec/SKILL.md +39 -11
- package/presets/gemini/commands/cc/council.toml +2 -83
- package/presets/gemini/commands/cc/openspec.toml +20 -1
- package/presets/muse/AGENTS.md +46 -0
- package/presets/muse/hooks.json +30 -0
- package/presets/opencode/commands/cc-council.md +2 -83
- package/presets/opencode/commands/cc-openspec.md +5 -3
- package/presets/opencode/skills/openspec/SKILL.md +39 -11
- package/src/presets/manifests/muse.yml +18 -0
- package/src/presets/models/muse.yml +4 -0
- package/src/presets/models/roles.yml +14 -0
- package/src/presets/targets/muse.yml +12 -0
|
@@ -2,89 +2,8 @@
|
|
|
2
2
|
description: Council-driven workflow with CCEP-1 bootstrap
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Task request: $ARGUMENTS
|
|
5
|
+
<!-- GENERATED redirect to presets/agy/workflows/cc-council.md by scripts/inject-ccep-bootstrap.ts — DO NOT EDIT. -->
|
|
8
6
|
|
|
9
7
|
## Step 0 — CCEP Bootstrap
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
command: council
|
|
13
|
-
|
|
14
|
-
1. Run: `npx cc-codeconductor ccep profile council --output json` to get the phases and their roles.
|
|
15
|
-
2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command council --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
|
|
16
|
-
3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command council --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
17
|
-
4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Step 1 — Wayfinding (repo-explorer)
|
|
22
|
-
|
|
23
|
-
If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
|
|
24
|
-
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
|
|
25
|
-
to map impact radius before deliberation. Do not write code in this step.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Step 2 — Deliberation & Specification (SDD)
|
|
30
|
-
|
|
31
|
-
Invoke the `council` skill to analyze the request before writing any code. The council must act as a steering committee involving `task-coach` (Product), `architect`, and `devil`.
|
|
32
|
-
|
|
33
|
-
The council must:
|
|
34
|
-
1. Clarify the prompt and define the absolute minimum scope (Simplicity Gate).
|
|
35
|
-
2. Explicitly document all assumptions and run the Grilling protocol on each one (Think Before Coding).
|
|
36
|
-
3. Draft a Task Card & Technical Plan (The Specification).
|
|
37
|
-
|
|
38
|
-
**STOP here.** Unresolved grilling questions populate `questionsForUser` in the
|
|
39
|
-
CCEP-1 `planner-output`; `ccep evaluate` (ConfirmationGate) halts until a human
|
|
40
|
-
answers. Show the agreed Task Card & Technical Plan and wait for confirmation
|
|
41
|
-
before continuing.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Step 3 — Test Definition (TDD)
|
|
46
|
-
|
|
47
|
-
Invoke `tester` with the approved Task Card & Technical Plan.
|
|
48
|
-
|
|
49
|
-
tester must:
|
|
50
|
-
1. Write failing tests based on the Acceptance Criteria defined in the Task Card.
|
|
51
|
-
2. Confirm the tests fail as expected (Red state).
|
|
52
|
-
|
|
53
|
-
**Goal-Driven Execution (Karpathy)**: Do not proceed until verifiable tests are written and fail for the correct reasons.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## Step 4 — Surgical Implementation
|
|
58
|
-
|
|
59
|
-
Invoke `implementer` with the failing tests and the Technical Plan.
|
|
60
|
-
|
|
61
|
-
implementer must:
|
|
62
|
-
1. Write the minimal code required to pass the tests.
|
|
63
|
-
2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
|
|
64
|
-
3. NOT refactor adjacent code, change existing styles, or build speculative features.
|
|
65
|
-
4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state).
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Step 5 — Multi-Perspective Council Review
|
|
70
|
-
|
|
71
|
-
Invoke the `council` skill on the generated diff to perform the final review phase.
|
|
72
|
-
|
|
73
|
-
The council will evaluate the diff against the 6 axes (Architecture, Security, Product, Delivery, DataOps, Devil).
|
|
74
|
-
|
|
75
|
-
If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
|
|
76
|
-
- The Review Report status is **BLOCKED**.
|
|
77
|
-
- Return to Step 4 with the feedback.
|
|
78
|
-
|
|
79
|
-
If APPROVED (no CRITICAL findings):
|
|
80
|
-
- Deliver the final Council Verdict and the diff summary.
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Completion
|
|
85
|
-
|
|
86
|
-
Deliver the complete Council Verdict. The feature is only complete when tests pass and the council explicitly approves the implementation according to the specification.
|
|
87
|
-
|
|
88
|
-
## Next
|
|
89
|
-
|
|
90
|
-
Approved: merge. Blocked: return the findings to `/cc:fix` or `/cc:feature`.
|
|
9
|
+
command: council. Read `presets/agy/workflows/cc-council.md`, then `ccep profile council` + `ccep compile --command council --view prompt`.
|
|
@@ -146,6 +146,13 @@ Show:
|
|
|
146
146
|
|
|
147
147
|
Update BACKLOG item status to `PLANNED` (CLI does this automatically).
|
|
148
148
|
|
|
149
|
+
`plan` is planning-only: it writes TaskCards plus proposal/design/tasks/specs
|
|
150
|
+
and stops. Before Step 4, review the plan in this order — proposal → delta
|
|
151
|
+
specs → tasks — and confirm: intent is right, no scope creep, every FR is
|
|
152
|
+
testable with a scenario that exercises it, edge/error cases are covered, and
|
|
153
|
+
each task traces to an FR/SC. Fix the Markdown directly or ask for revisions.
|
|
154
|
+
Do not `start` any card until the plan reads correctly.
|
|
155
|
+
|
|
149
156
|
---
|
|
150
157
|
|
|
151
158
|
## Drive card status (CLI)
|
|
@@ -156,10 +163,12 @@ Do not edit `.codeconductor/openspec-state.json` by hand.
|
|
|
156
163
|
npx cc-codeconductor openspec start <cardId>
|
|
157
164
|
npx cc-codeconductor openspec done <cardId>
|
|
158
165
|
npx cc-codeconductor openspec block <cardId> --reason "waiting on design"
|
|
166
|
+
npx cc-codeconductor openspec sync <itemId>
|
|
167
|
+
npx cc-codeconductor openspec verify <itemId>
|
|
159
168
|
npx cc-codeconductor openspec archive <itemId>
|
|
160
169
|
```
|
|
161
170
|
|
|
162
|
-
`start` moves the card `pending → doing` and the item `PLANNED → IN_PROGRESS`. `done` marks the card complete, updates Progress, and moves the item to `REVIEW` when every card is done and review is required. `archive` requires all cards done (and review evidence when Global review is required) and moves `openspec/changes/<slug>` to `archive/`.
|
|
171
|
+
`start` moves the card `pending → doing` and the item `PLANNED → IN_PROGRESS`. `done` marks the card complete, updates Progress, and moves the item to `REVIEW` when every card is done and review is required. `sync` merges delta specs into `openspec/specs/` without closing the item (optional before archive). `verify` is the advisory pre-archive checklist: exit 0 with `archiveReady` plus Completeness/Correctness/Coherence issues. `archive` requires all cards done (and review evidence when Global review is required), re-checks planning artifacts and analyze CRITICALs, warns on unchecked `tasks.md` boxes, then moves `openspec/changes/<slug>` to `archive/`.
|
|
163
172
|
|
|
164
173
|
---
|
|
165
174
|
|
|
@@ -196,6 +205,14 @@ After each phase:
|
|
|
196
205
|
|
|
197
206
|
Implementer: create a Git worktree before editing (`git worktree add ../<branch>-session <branch>`).
|
|
198
207
|
|
|
208
|
+
Discover is read-only: `repo-explorer` never writes code. The implementer ticks
|
|
209
|
+
`tasks.md` boxes (`- [ ]` → `- [x]`) as each FR lands — only `x`/`X` counts as
|
|
210
|
+
done. If implementation reveals a design problem, pause and reconcile the
|
|
211
|
+
planning artifacts first (any direction: a later artifact may force revising an
|
|
212
|
+
earlier one). Planning artifacts only in that step — never code — and confirm
|
|
213
|
+
each edit. If the item's intent changed rather than its details, open a fresh
|
|
214
|
+
item with `/cc:backlog` instead of warping this one.
|
|
215
|
+
|
|
199
216
|
---
|
|
200
217
|
|
|
201
218
|
## Step 5 — Review gate
|
|
@@ -221,6 +238,8 @@ If **approved**: proceed to Step 6.
|
|
|
221
238
|
|
|
222
239
|
## Step 6 — Scorecard and update backlog
|
|
223
240
|
|
|
241
|
+
First run the advisory pre-archive check (`npx cc-codeconductor openspec verify <BC-id> --output json`): confirm `archiveReady` and clear any Completeness/Correctness/Coherence issues. Optionally run `openspec sync <BC-id>` to merge delta specs into `openspec/specs/` without closing the item. Then:
|
|
242
|
+
|
|
224
243
|
1. `npx cc-codeconductor scorecard create --task <BC-id> --from-diff`
|
|
225
244
|
2. Complete criteria; `scorecard record` with verdict and optional cost/tokens
|
|
226
245
|
3. Set item `Progress: 100%`, `Status: DONE` if PASS
|
|
@@ -16,7 +16,7 @@ gates, not a reference doc. Specs describe WHAT; `design.md` describes HOW.
|
|
|
16
16
|
|
|
17
17
|
## When to Use
|
|
18
18
|
|
|
19
|
-
- `/cc-openspec` or `openspec
|
|
19
|
+
- `/cc-openspec` or `openspec plan` / `next` / `done` / `sync` / `verify` / `archive`
|
|
20
20
|
- An item is `READY` or later and must move through the state machine
|
|
21
21
|
|
|
22
22
|
**NOT** for creating `BACKLOG.md` (use skill `backlog`) or for stack-specific
|
|
@@ -26,22 +26,43 @@ coding rules.
|
|
|
26
26
|
|
|
27
27
|
Local CLI is `bun run dev`. Published package is `npx cc-codeconductor`.
|
|
28
28
|
|
|
29
|
-
1. `openspec validate` — must pass before delivery.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
1. `openspec validate` — must pass before delivery. If you reached this
|
|
30
|
+
workflow on your own (the user did not ask for OpenSpec) and there is no
|
|
31
|
+
`BACKLOG.md` / `openspec/` root, answer normally instead — never scaffold
|
|
32
|
+
one as a side effect.
|
|
33
|
+
2. `openspec plan BC-xxx` if the item is not yet `PLANNED`. Planning only: it
|
|
34
|
+
writes TaskCards plus proposal/design/tasks/specs under
|
|
35
|
+
`openspec/changes/<slug>/` and stops. Never implement in this step.
|
|
36
|
+
3. Review the plan before `start`: read proposal → delta specs → tasks, in that
|
|
37
|
+
order, and confirm intent, scope, testable FR/SC, and edge-case scenarios.
|
|
38
|
+
Fix the Markdown directly or ask for revisions — code comes later.
|
|
39
|
+
4. `openspec analyze --output json` — CRITICAL findings exit 1. Do not implement.
|
|
40
|
+
5. Phases: discover (`repo-explorer`) → design (`architect`) → test (`tester`) →
|
|
33
41
|
implement (`implementer`) → review (`reviewer`). If Global `TDD required: yes`,
|
|
34
|
-
test runs before implement.
|
|
35
|
-
|
|
36
|
-
evidence JSON is rejected.
|
|
37
|
-
|
|
38
|
-
7.
|
|
39
|
-
|
|
42
|
+
test runs before implement. Discover is read-only: it never writes code.
|
|
43
|
+
6. `openspec done` on test/implement requires `captureTddSuiteEvidence`. Handmade
|
|
44
|
+
evidence JSON is rejected. The implementer ticks `tasks.md` boxes
|
|
45
|
+
(`- [ ]` → `- [x]`) as each FR lands; only `x`/`X` counts as done.
|
|
46
|
+
7. When implementation reveals a design problem, pause and reconcile the planning
|
|
47
|
+
artifacts first — in any direction (a later artifact may force revising an
|
|
48
|
+
earlier one). Planning artifacts only in that step, never code; confirm each
|
|
49
|
+
edit. If the item's intent changed rather than its details, open a fresh item
|
|
50
|
+
with `/cc-backlog` (`/cc:backlog`) instead of warping this one.
|
|
51
|
+
8. `openspec verify --output json` — advisory pre-archive checklist
|
|
52
|
+
(`archiveReady` plus Completeness/Correctness/Coherence issues). Optional:
|
|
53
|
+
`openspec sync` merges delta specs into `openspec/specs/` without closing.
|
|
54
|
+
9. `scorecard create --task BC-xxx --from-diff` then record a verdict.
|
|
55
|
+
10. `openspec archive` only after human review when `Review required: yes` and
|
|
56
|
+
the scorecard is PASS. Archive re-checks planning artifacts and analyze
|
|
57
|
+
CRITICALs, and warns on unchecked `tasks.md` boxes.
|
|
40
58
|
|
|
41
59
|
Status machine: `TODO` → `READY` → `PLANNED` → `IN_PROGRESS` → `REVIEW` → `DONE`
|
|
42
60
|
→ Archive. `BLOCKED` returns to `READY`. Reviewer rejection: `REVIEW` →
|
|
43
61
|
`IN_PROGRESS`.
|
|
44
62
|
|
|
63
|
+
`openspec status --output json` also reports artifact presence, `tasks.md`
|
|
64
|
+
checkbox progress, and `nextSteps` for the next CLI call.
|
|
65
|
+
|
|
45
66
|
## Web interface scope
|
|
46
67
|
|
|
47
68
|
When the task concerns web layout, component states, feedback, motion, or a
|
|
@@ -70,17 +91,24 @@ delivery read-only and record unavailable visual or emulator evidence as pending
|
|
|
70
91
|
| I'll add tests after green | Global TDD required means tester before implementer. |
|
|
71
92
|
| I'll write the evidence JSON myself | Handmade TDD JSON is rejected. Use the verification runner. |
|
|
72
93
|
| The item is small; skip analyze | `openspec analyze` CRITICAL still stops implement. |
|
|
94
|
+
| The plan is generated; skip reading it | Read proposal → specs → tasks before `start`. Generated is not reviewed. |
|
|
95
|
+
| I'll fix the spec after shipping | Reconcile planning artifacts before continuing to implement. |
|
|
73
96
|
|
|
74
97
|
## Red Flags
|
|
75
98
|
|
|
76
99
|
- Implementing while analyze reports CRITICAL
|
|
100
|
+
- Starting cards before reading the generated plan
|
|
77
101
|
- Archive without a PASS scorecard when review is required
|
|
102
|
+
- Archive while `openspec verify` reports CRITICAL
|
|
78
103
|
- Acceptance like "improve UX" with no measurable check
|
|
79
104
|
|
|
80
105
|
## Verification
|
|
81
106
|
|
|
82
107
|
- [ ] `openspec validate` exit 0
|
|
108
|
+
- [ ] Plan reviewed (proposal → specs → tasks) before `start`
|
|
83
109
|
- [ ] `openspec analyze --output json` has no CRITICAL
|
|
84
110
|
- [ ] TDD evidence from the runner when TDD is required
|
|
111
|
+
- [ ] `tasks.md` boxes ticked as FRs land
|
|
112
|
+
- [ ] `openspec verify --output json` checked before archive
|
|
85
113
|
- [ ] `scorecard create --from-diff` recorded
|
|
86
114
|
- [ ] Suite check (optional): `bun run dev scorecard suite-run --suite workflow-gates`
|
|
@@ -3,99 +3,8 @@ name: cc-council
|
|
|
3
3
|
description: Council-driven workflow with CCEP-1 bootstrap
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Invoke as `$cc-council`. The user request follows the skill mention.
|
|
9
|
-
|
|
10
|
-
## Council context budget
|
|
11
|
-
|
|
12
|
-
Use GPT-6.1 Sol with medium reasoning effort. Give each necessary council role
|
|
13
|
-
the same short evidence summary and relevant diff. Reuse those findings in the
|
|
14
|
-
verdict; avoid spawning roles for questions already answered by evidence.
|
|
15
|
-
|
|
16
|
-
# Council-Driven Workflow
|
|
17
|
-
|
|
18
|
-
Task request: $ARGUMENTS
|
|
6
|
+
<!-- GENERATED redirect to presets/agy/workflows/cc-council.md by scripts/render-agent-commands.ts — DO NOT EDIT. -->
|
|
19
7
|
|
|
20
8
|
## Step 0 — CCEP Bootstrap
|
|
21
9
|
|
|
22
|
-
|
|
23
|
-
command: council
|
|
24
|
-
|
|
25
|
-
1. Run: `npx cc-codeconductor ccep profile council --output json` to get the phases and their roles.
|
|
26
|
-
2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command council --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
|
|
27
|
-
3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command council --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
28
|
-
4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Step 1 — Wayfinding (repo-explorer)
|
|
33
|
-
|
|
34
|
-
If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
|
|
35
|
-
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
|
|
36
|
-
to map impact radius before deliberation. Do not write code in this step.
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Step 2 — Deliberation & Specification (SDD)
|
|
41
|
-
|
|
42
|
-
Invoke the `council` skill to analyze the request before writing any code. The council must act as a steering committee involving `task-coach` (Product), `architect`, and `devil`.
|
|
43
|
-
|
|
44
|
-
The council must:
|
|
45
|
-
1. Clarify the prompt and define the absolute minimum scope (Simplicity Gate).
|
|
46
|
-
2. Explicitly document all assumptions and run the Grilling protocol on each one (Think Before Coding).
|
|
47
|
-
3. Draft a Task Card & Technical Plan (The Specification).
|
|
48
|
-
|
|
49
|
-
**STOP here.** Unresolved grilling questions populate `questionsForUser` in the
|
|
50
|
-
CCEP-1 `planner-output`; `ccep evaluate` (ConfirmationGate) halts until a human
|
|
51
|
-
answers. Show the agreed Task Card & Technical Plan and wait for confirmation
|
|
52
|
-
before continuing.
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Step 3 — Test Definition (TDD)
|
|
57
|
-
|
|
58
|
-
Invoke `tester` with the approved Task Card & Technical Plan.
|
|
59
|
-
|
|
60
|
-
tester must:
|
|
61
|
-
1. Write failing tests based on the Acceptance Criteria defined in the Task Card.
|
|
62
|
-
2. Confirm the tests fail as expected (Red state).
|
|
63
|
-
|
|
64
|
-
**Goal-Driven Execution (Karpathy)**: Do not proceed until verifiable tests are written and fail for the correct reasons.
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Step 4 — Surgical Implementation
|
|
69
|
-
|
|
70
|
-
Invoke `implementer` with the failing tests and the Technical Plan.
|
|
71
|
-
|
|
72
|
-
implementer must:
|
|
73
|
-
1. Write the minimal code required to pass the tests.
|
|
74
|
-
2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
|
|
75
|
-
3. NOT refactor adjacent code, change existing styles, or build speculative features.
|
|
76
|
-
4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state).
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Step 5 — Multi-Perspective Council Review
|
|
81
|
-
|
|
82
|
-
Invoke the `council` skill on the generated diff to perform the final review phase.
|
|
83
|
-
|
|
84
|
-
The council will evaluate the diff against the 6 axes (Architecture, Security, Product, Delivery, DataOps, Devil).
|
|
85
|
-
|
|
86
|
-
If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
|
|
87
|
-
- The Review Report status is **BLOCKED**.
|
|
88
|
-
- Return to Step 4 with the feedback.
|
|
89
|
-
|
|
90
|
-
If APPROVED (no CRITICAL findings):
|
|
91
|
-
- Deliver the final Council Verdict and the diff summary.
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Completion
|
|
96
|
-
|
|
97
|
-
Deliver the complete Council Verdict. The feature is only complete when tests pass and the council explicitly approves the implementation according to the specification.
|
|
98
|
-
|
|
99
|
-
## Next
|
|
100
|
-
|
|
101
|
-
Approved: merge. Blocked: return the findings to `$cc-fix` or `$cc-feature`.
|
|
10
|
+
command: council. Read `presets/agy/workflows/cc-council.md`, then `ccep profile council` + `ccep compile --command council --view prompt`.
|
|
@@ -128,6 +128,13 @@ Show:
|
|
|
128
128
|
|
|
129
129
|
Update BACKLOG item status to `PLANNED` (CLI does this automatically).
|
|
130
130
|
|
|
131
|
+
`plan` is planning-only: it writes TaskCards plus proposal/design/tasks/specs
|
|
132
|
+
and stops. Before Step 5, review the plan in this order — proposal → delta
|
|
133
|
+
specs → tasks — and confirm: intent is right, no scope creep, every FR is
|
|
134
|
+
testable with a scenario that exercises it, edge/error cases are covered, and
|
|
135
|
+
each task traces to an FR/SC. Fix the Markdown directly or ask for revisions.
|
|
136
|
+
Do not `start` any card until the plan reads correctly.
|
|
137
|
+
|
|
131
138
|
---
|
|
132
139
|
|
|
133
140
|
## Drive card status (CLI)
|
|
@@ -138,10 +145,12 @@ Do not edit `.codeconductor/openspec-state.json` by hand.
|
|
|
138
145
|
npx cc-codeconductor openspec start <cardId>
|
|
139
146
|
npx cc-codeconductor openspec done <cardId>
|
|
140
147
|
npx cc-codeconductor openspec block <cardId> --reason "waiting on design"
|
|
148
|
+
npx cc-codeconductor openspec sync <itemId>
|
|
149
|
+
npx cc-codeconductor openspec verify <itemId>
|
|
141
150
|
npx cc-codeconductor openspec archive <itemId>
|
|
142
151
|
```
|
|
143
152
|
|
|
144
|
-
`start` moves the card `pending → doing` and the item `PLANNED → IN_PROGRESS`. `done` marks the card complete, updates Progress, and moves the item to `REVIEW` when every card is done and review is required. `archive` requires all cards done (and review evidence when Global review is required) and moves `openspec/changes/<slug>` to `archive/`.
|
|
153
|
+
`start` moves the card `pending → doing` and the item `PLANNED → IN_PROGRESS`. `done` marks the card complete, updates Progress, and moves the item to `REVIEW` when every card is done and review is required. `sync` merges delta specs into `openspec/specs/` without closing the item (optional before archive). `verify` is the advisory pre-archive checklist: exit 0 with `archiveReady` plus Completeness/Correctness/Coherence issues. `archive` requires all cards done (and review evidence when Global review is required), re-checks planning artifacts and analyze CRITICALs, warns on unchecked `tasks.md` boxes, then moves `openspec/changes/<slug>` to `archive/`.
|
|
145
154
|
|
|
146
155
|
For test and implementation cards, `done` also requires a current RDD-backed
|
|
147
156
|
RED or GREEN receipt respectively. Do not reuse evidence after candidate files
|
|
@@ -182,6 +191,14 @@ After each phase:
|
|
|
182
191
|
|
|
183
192
|
Implementer: create a Git worktree before editing (`git worktree add ../<branch>-session <branch>`).
|
|
184
193
|
|
|
194
|
+
Discover is read-only: `repo-explorer` never writes code. The implementer ticks
|
|
195
|
+
`tasks.md` boxes (`- [ ]` → `- [x]`) as each FR lands — only `x`/`X` counts as
|
|
196
|
+
done. If implementation reveals a design problem, pause and reconcile the
|
|
197
|
+
planning artifacts first (any direction: a later artifact may force revising an
|
|
198
|
+
earlier one). Planning artifacts only in that step — never code — and confirm
|
|
199
|
+
each edit. If the item's intent changed rather than its details, open a fresh
|
|
200
|
+
item with `$cc-backlog` instead of warping this one.
|
|
201
|
+
|
|
185
202
|
---
|
|
186
203
|
|
|
187
204
|
## Step 6 — Review gate
|
|
@@ -207,6 +224,8 @@ If **approved**: proceed to Step 6.
|
|
|
207
224
|
|
|
208
225
|
## Step 7 — Scorecard and update backlog
|
|
209
226
|
|
|
227
|
+
First run the advisory pre-archive check (`npx cc-codeconductor openspec verify <BC-id> --output json`): confirm `archiveReady` and clear any Completeness/Correctness/Coherence issues. Optionally run `openspec sync <BC-id>` to merge delta specs into `openspec/specs/` without closing the item. Then:
|
|
228
|
+
|
|
210
229
|
1. `npx cc-codeconductor scorecard create --task <BC-id> --from-diff`
|
|
211
230
|
2. Complete criteria; `scorecard record` with verdict and optional cost/tokens
|
|
212
231
|
3. Set item `Progress: 100%`, `Status: DONE` if PASS
|
|
@@ -16,7 +16,7 @@ gates, not a reference doc. Specs describe WHAT; `design.md` describes HOW.
|
|
|
16
16
|
|
|
17
17
|
## When to Use
|
|
18
18
|
|
|
19
|
-
- `/cc-openspec` or `openspec
|
|
19
|
+
- `/cc-openspec` or `openspec plan` / `next` / `done` / `sync` / `verify` / `archive`
|
|
20
20
|
- An item is `READY` or later and must move through the state machine
|
|
21
21
|
|
|
22
22
|
**NOT** for creating `BACKLOG.md` (use skill `backlog`) or for stack-specific
|
|
@@ -26,22 +26,43 @@ coding rules.
|
|
|
26
26
|
|
|
27
27
|
Local CLI is `bun run dev`. Published package is `npx cc-codeconductor`.
|
|
28
28
|
|
|
29
|
-
1. `openspec validate` — must pass before delivery.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
1. `openspec validate` — must pass before delivery. If you reached this
|
|
30
|
+
workflow on your own (the user did not ask for OpenSpec) and there is no
|
|
31
|
+
`BACKLOG.md` / `openspec/` root, answer normally instead — never scaffold
|
|
32
|
+
one as a side effect.
|
|
33
|
+
2. `openspec plan BC-xxx` if the item is not yet `PLANNED`. Planning only: it
|
|
34
|
+
writes TaskCards plus proposal/design/tasks/specs under
|
|
35
|
+
`openspec/changes/<slug>/` and stops. Never implement in this step.
|
|
36
|
+
3. Review the plan before `start`: read proposal → delta specs → tasks, in that
|
|
37
|
+
order, and confirm intent, scope, testable FR/SC, and edge-case scenarios.
|
|
38
|
+
Fix the Markdown directly or ask for revisions — code comes later.
|
|
39
|
+
4. `openspec analyze --output json` — CRITICAL findings exit 1. Do not implement.
|
|
40
|
+
5. Phases: discover (`repo-explorer`) → design (`architect`) → test (`tester`) →
|
|
33
41
|
implement (`implementer`) → review (`reviewer`). If Global `TDD required: yes`,
|
|
34
|
-
test runs before implement.
|
|
35
|
-
|
|
36
|
-
evidence JSON is rejected.
|
|
37
|
-
|
|
38
|
-
7.
|
|
39
|
-
|
|
42
|
+
test runs before implement. Discover is read-only: it never writes code.
|
|
43
|
+
6. `openspec done` on test/implement requires `captureTddSuiteEvidence`. Handmade
|
|
44
|
+
evidence JSON is rejected. The implementer ticks `tasks.md` boxes
|
|
45
|
+
(`- [ ]` → `- [x]`) as each FR lands; only `x`/`X` counts as done.
|
|
46
|
+
7. When implementation reveals a design problem, pause and reconcile the planning
|
|
47
|
+
artifacts first — in any direction (a later artifact may force revising an
|
|
48
|
+
earlier one). Planning artifacts only in that step, never code; confirm each
|
|
49
|
+
edit. If the item's intent changed rather than its details, open a fresh item
|
|
50
|
+
with `/cc-backlog` (`/cc:backlog`) instead of warping this one.
|
|
51
|
+
8. `openspec verify --output json` — advisory pre-archive checklist
|
|
52
|
+
(`archiveReady` plus Completeness/Correctness/Coherence issues). Optional:
|
|
53
|
+
`openspec sync` merges delta specs into `openspec/specs/` without closing.
|
|
54
|
+
9. `scorecard create --task BC-xxx --from-diff` then record a verdict.
|
|
55
|
+
10. `openspec archive` only after human review when `Review required: yes` and
|
|
56
|
+
the scorecard is PASS. Archive re-checks planning artifacts and analyze
|
|
57
|
+
CRITICALs, and warns on unchecked `tasks.md` boxes.
|
|
40
58
|
|
|
41
59
|
Status machine: `TODO` → `READY` → `PLANNED` → `IN_PROGRESS` → `REVIEW` → `DONE`
|
|
42
60
|
→ Archive. `BLOCKED` returns to `READY`. Reviewer rejection: `REVIEW` →
|
|
43
61
|
`IN_PROGRESS`.
|
|
44
62
|
|
|
63
|
+
`openspec status --output json` also reports artifact presence, `tasks.md`
|
|
64
|
+
checkbox progress, and `nextSteps` for the next CLI call.
|
|
65
|
+
|
|
45
66
|
## Web interface scope
|
|
46
67
|
|
|
47
68
|
When the task concerns web layout, component states, feedback, motion, or a
|
|
@@ -70,17 +91,24 @@ delivery read-only and record unavailable visual or emulator evidence as pending
|
|
|
70
91
|
| I'll add tests after green | Global TDD required means tester before implementer. |
|
|
71
92
|
| I'll write the evidence JSON myself | Handmade TDD JSON is rejected. Use the verification runner. |
|
|
72
93
|
| The item is small; skip analyze | `openspec analyze` CRITICAL still stops implement. |
|
|
94
|
+
| The plan is generated; skip reading it | Read proposal → specs → tasks before `start`. Generated is not reviewed. |
|
|
95
|
+
| I'll fix the spec after shipping | Reconcile planning artifacts before continuing to implement. |
|
|
73
96
|
|
|
74
97
|
## Red Flags
|
|
75
98
|
|
|
76
99
|
- Implementing while analyze reports CRITICAL
|
|
100
|
+
- Starting cards before reading the generated plan
|
|
77
101
|
- Archive without a PASS scorecard when review is required
|
|
102
|
+
- Archive while `openspec verify` reports CRITICAL
|
|
78
103
|
- Acceptance like "improve UX" with no measurable check
|
|
79
104
|
|
|
80
105
|
## Verification
|
|
81
106
|
|
|
82
107
|
- [ ] `openspec validate` exit 0
|
|
108
|
+
- [ ] Plan reviewed (proposal → specs → tasks) before `start`
|
|
83
109
|
- [ ] `openspec analyze --output json` has no CRITICAL
|
|
84
110
|
- [ ] TDD evidence from the runner when TDD is required
|
|
111
|
+
- [ ] `tasks.md` boxes ticked as FRs land
|
|
112
|
+
- [ ] `openspec verify --output json` checked before archive
|
|
85
113
|
- [ ] `scorecard create --from-diff` recorded
|
|
86
114
|
- [ ] Suite check (optional): `bun run dev scorecard suite-run --suite workflow-gates`
|
|
@@ -2,89 +2,8 @@
|
|
|
2
2
|
description: Council-driven workflow with CCEP-1 bootstrap
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Task request: $ARGUMENTS
|
|
5
|
+
<!-- GENERATED redirect to presets/agy/workflows/cc-council.md by scripts/inject-ccep-bootstrap.ts — DO NOT EDIT. -->
|
|
8
6
|
|
|
9
7
|
## Step 0 — CCEP Bootstrap
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
command: council
|
|
13
|
-
|
|
14
|
-
1. Run: `npx cc-codeconductor ccep profile council --output json` to get the phases and their roles.
|
|
15
|
-
2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command council --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
|
|
16
|
-
3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command council --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
17
|
-
4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Step 1 — Wayfinding (repo-explorer)
|
|
22
|
-
|
|
23
|
-
If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
|
|
24
|
-
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
|
|
25
|
-
to map impact radius before deliberation. Do not write code in this step.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Step 2 — Deliberation & Specification (SDD)
|
|
30
|
-
|
|
31
|
-
Invoke the `council` skill to analyze the request before writing any code. The council must act as a steering committee involving `task-coach` (Product), `architect`, and `devil`.
|
|
32
|
-
|
|
33
|
-
The council must:
|
|
34
|
-
1. Clarify the prompt and define the absolute minimum scope (Simplicity Gate).
|
|
35
|
-
2. Explicitly document all assumptions and run the Grilling protocol on each one (Think Before Coding).
|
|
36
|
-
3. Draft a Task Card & Technical Plan (The Specification).
|
|
37
|
-
|
|
38
|
-
**STOP here.** Unresolved grilling questions populate `questionsForUser` in the
|
|
39
|
-
CCEP-1 `planner-output`; `ccep evaluate` (ConfirmationGate) halts until a human
|
|
40
|
-
answers. Show the agreed Task Card & Technical Plan and wait for confirmation
|
|
41
|
-
before continuing.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Step 3 — Test Definition (TDD)
|
|
46
|
-
|
|
47
|
-
Invoke `tester` with the approved Task Card & Technical Plan.
|
|
48
|
-
|
|
49
|
-
tester must:
|
|
50
|
-
1. Write failing tests based on the Acceptance Criteria defined in the Task Card.
|
|
51
|
-
2. Confirm the tests fail as expected (Red state).
|
|
52
|
-
|
|
53
|
-
**Goal-Driven Execution (Karpathy)**: Do not proceed until verifiable tests are written and fail for the correct reasons.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## Step 4 — Surgical Implementation
|
|
58
|
-
|
|
59
|
-
Invoke `implementer` with the failing tests and the Technical Plan.
|
|
60
|
-
|
|
61
|
-
implementer must:
|
|
62
|
-
1. Write the minimal code required to pass the tests.
|
|
63
|
-
2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
|
|
64
|
-
3. NOT refactor adjacent code, change existing styles, or build speculative features.
|
|
65
|
-
4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state).
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Step 5 — Multi-Perspective Council Review
|
|
70
|
-
|
|
71
|
-
Invoke the `council` skill on the generated diff to perform the final review phase.
|
|
72
|
-
|
|
73
|
-
The council will evaluate the diff against the 6 axes (Architecture, Security, Product, Delivery, DataOps, Devil).
|
|
74
|
-
|
|
75
|
-
If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
|
|
76
|
-
- The Review Report status is **BLOCKED**.
|
|
77
|
-
- Return to Step 4 with the feedback.
|
|
78
|
-
|
|
79
|
-
If APPROVED (no CRITICAL findings):
|
|
80
|
-
- Deliver the final Council Verdict and the diff summary.
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Completion
|
|
85
|
-
|
|
86
|
-
Deliver the complete Council Verdict. The feature is only complete when tests pass and the council explicitly approves the implementation according to the specification.
|
|
87
|
-
|
|
88
|
-
## Next
|
|
89
|
-
|
|
90
|
-
Approved: merge. Blocked: return the findings to `/cc:fix` or `/cc:feature`.
|
|
9
|
+
command: council. Read `presets/agy/workflows/cc-council.md`, then `ccep profile council` + `ccep compile --command council --view prompt`.
|
|
@@ -119,6 +119,13 @@ Show:
|
|
|
119
119
|
|
|
120
120
|
Update BACKLOG item status to `PLANNED` (CLI does this automatically).
|
|
121
121
|
|
|
122
|
+
`plan` is planning-only: it writes TaskCards plus proposal/design/tasks/specs
|
|
123
|
+
and stops. Before Step 5, review the plan in this order — proposal → delta
|
|
124
|
+
specs → tasks — and confirm: intent is right, no scope creep, every FR is
|
|
125
|
+
testable with a scenario that exercises it, edge/error cases are covered, and
|
|
126
|
+
each task traces to an FR/SC. Fix the Markdown directly or ask for revisions.
|
|
127
|
+
Do not `start` any card until the plan reads correctly.
|
|
128
|
+
|
|
122
129
|
---
|
|
123
130
|
|
|
124
131
|
## Drive card status (CLI)
|
|
@@ -129,10 +136,12 @@ Do not edit `.codeconductor/openspec-state.json` by hand.
|
|
|
129
136
|
npx cc-codeconductor openspec start <cardId>
|
|
130
137
|
npx cc-codeconductor openspec done <cardId>
|
|
131
138
|
npx cc-codeconductor openspec block <cardId> --reason "waiting on design"
|
|
139
|
+
npx cc-codeconductor openspec sync <itemId>
|
|
140
|
+
npx cc-codeconductor openspec verify <itemId>
|
|
132
141
|
npx cc-codeconductor openspec archive <itemId>
|
|
133
142
|
```
|
|
134
143
|
|
|
135
|
-
`start` moves the card `pending → doing` and the item `PLANNED → IN_PROGRESS`. `done` marks the card complete, updates Progress, and moves the item to `REVIEW` when every card is done and review is required. `archive` requires all cards done (and review evidence when Global review is required) and moves `openspec/changes/<slug>` to `archive/`.
|
|
144
|
+
`start` moves the card `pending → doing` and the item `PLANNED → IN_PROGRESS`. `done` marks the card complete, updates Progress, and moves the item to `REVIEW` when every card is done and review is required. `sync` merges delta specs into `openspec/specs/` without closing the item (optional before archive). `verify` is the advisory pre-archive checklist: exit 0 with `archiveReady` plus Completeness/Correctness/Coherence issues. `archive` requires all cards done (and review evidence when Global review is required), re-checks planning artifacts and analyze CRITICALs, warns on unchecked `tasks.md` boxes, then moves `openspec/changes/<slug>` to `archive/`.
|
|
136
145
|
|
|
137
146
|
For test and implementation cards, `done` also requires a current RDD-backed
|
|
138
147
|
RED or GREEN receipt respectively. Do not reuse evidence after candidate files
|
|
@@ -173,6 +182,14 @@ After each phase:
|
|
|
173
182
|
|
|
174
183
|
Implementer: create a Git worktree before editing (`git worktree add ../<branch>-session <branch>`).
|
|
175
184
|
|
|
185
|
+
Discover is read-only: `repo-explorer` never writes code. The implementer ticks
|
|
186
|
+
`tasks.md` boxes (`- [ ]` → `- [x]`) as each FR lands — only `x`/`X` counts as
|
|
187
|
+
done. If implementation reveals a design problem, pause and reconcile the
|
|
188
|
+
planning artifacts first (any direction: a later artifact may force revising an
|
|
189
|
+
earlier one). Planning artifacts only in that step — never code — and confirm
|
|
190
|
+
each edit. If the item's intent changed rather than its details, open a fresh
|
|
191
|
+
item with `/cc:backlog` instead of warping this one.
|
|
192
|
+
|
|
176
193
|
---
|
|
177
194
|
|
|
178
195
|
## Step 6 — Review gate
|
|
@@ -198,6 +215,8 @@ If **approved**: proceed to Step 6.
|
|
|
198
215
|
|
|
199
216
|
## Step 7 — Scorecard and update backlog
|
|
200
217
|
|
|
218
|
+
First run the advisory pre-archive check (`npx cc-codeconductor openspec verify <BC-id> --output json`): confirm `archiveReady` and clear any Completeness/Correctness/Coherence issues. Optionally run `openspec sync <BC-id>` to merge delta specs into `openspec/specs/` without closing the item. Then:
|
|
219
|
+
|
|
201
220
|
1. `npx cc-codeconductor scorecard create --task <BC-id> --from-diff`
|
|
202
221
|
2. Complete criteria; `scorecard record` with verdict and optional cost/tokens
|
|
203
222
|
3. Set item `Progress: 100%`, `Status: DONE` if PASS
|