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
|
@@ -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`
|
|
@@ -1,90 +1,9 @@
|
|
|
1
1
|
description = "Council-driven workflow with CCEP-1 bootstrap"
|
|
2
2
|
|
|
3
3
|
prompt = """
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Task request: {{args}}
|
|
4
|
+
<!-- GENERATED redirect to presets/agy/workflows/cc-council.md by scripts/render-agent-commands.ts — DO NOT EDIT. -->
|
|
7
5
|
|
|
8
6
|
## Step 0 — CCEP Bootstrap
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
command: council
|
|
12
|
-
|
|
13
|
-
1. Run: `npx cc-codeconductor ccep profile council --output json` to get the phases and their roles.
|
|
14
|
-
2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command council --phase <phase-id> "{{args}}" --view prompt --output json`
|
|
15
|
-
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.
|
|
16
|
-
4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `{{args}}` to planners.
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Step 1 — Wayfinding (repo-explorer)
|
|
21
|
-
|
|
22
|
-
If `graphify-out/graph.json` exists, run `graphify query "{{args}}"` (and
|
|
23
|
-
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
|
|
24
|
-
to map impact radius before deliberation. Do not write code in this step.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Step 2 — Deliberation & Specification (SDD)
|
|
29
|
-
|
|
30
|
-
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`.
|
|
31
|
-
|
|
32
|
-
The council must:
|
|
33
|
-
1. Clarify the prompt and define the absolute minimum scope (Simplicity Gate).
|
|
34
|
-
2. Explicitly document all assumptions and run the Grilling protocol on each one (Think Before Coding).
|
|
35
|
-
3. Draft a Task Card & Technical Plan (The Specification).
|
|
36
|
-
|
|
37
|
-
**STOP here.** Unresolved grilling questions populate `questionsForUser` in the
|
|
38
|
-
CCEP-1 `planner-output`; `ccep evaluate` (ConfirmationGate) halts until a human
|
|
39
|
-
answers. Show the agreed Task Card & Technical Plan and wait for confirmation
|
|
40
|
-
before continuing.
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Step 3 — Test Definition (TDD)
|
|
45
|
-
|
|
46
|
-
Invoke `tester` with the approved Task Card & Technical Plan.
|
|
47
|
-
|
|
48
|
-
tester must:
|
|
49
|
-
1. Write failing tests based on the Acceptance Criteria defined in the Task Card.
|
|
50
|
-
2. Confirm the tests fail as expected (Red state).
|
|
51
|
-
|
|
52
|
-
**Goal-Driven Execution (Karpathy)**: Do not proceed until verifiable tests are written and fail for the correct reasons.
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Step 4 — Surgical Implementation
|
|
57
|
-
|
|
58
|
-
Invoke `implementer` with the failing tests and the Technical Plan.
|
|
59
|
-
|
|
60
|
-
implementer must:
|
|
61
|
-
1. Write the minimal code required to pass the tests.
|
|
62
|
-
2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
|
|
63
|
-
3. NOT refactor adjacent code, change existing styles, or build speculative features.
|
|
64
|
-
4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state).
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Step 5 — Multi-Perspective Council Review
|
|
69
|
-
|
|
70
|
-
Invoke the `council` skill on the generated diff to perform the final review phase.
|
|
71
|
-
|
|
72
|
-
The council will evaluate the diff against the 6 axes (Architecture, Security, Product, Delivery, DataOps, Devil).
|
|
73
|
-
|
|
74
|
-
If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
|
|
75
|
-
- The Review Report status is **BLOCKED**.
|
|
76
|
-
- Return to Step 4 with the feedback.
|
|
77
|
-
|
|
78
|
-
If APPROVED (no CRITICAL findings):
|
|
79
|
-
- Deliver the final Council Verdict and the diff summary.
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## Completion
|
|
84
|
-
|
|
85
|
-
Deliver the complete Council Verdict. The feature is only complete when tests pass and the council explicitly approves the implementation according to the specification.
|
|
86
|
-
|
|
87
|
-
## Next
|
|
88
|
-
|
|
89
|
-
Approved: merge. Blocked: return the findings to `/cc:fix` or `/cc:feature`.
|
|
8
|
+
command: council. Read `presets/agy/workflows/cc-council.md`, then `ccep profile council` + `ccep compile --command council --view prompt`.
|
|
90
9
|
"""
|
|
@@ -116,6 +116,13 @@ Show:
|
|
|
116
116
|
|
|
117
117
|
Update BACKLOG item status to `PLANNED` (CLI does this automatically).
|
|
118
118
|
|
|
119
|
+
`plan` is planning-only: it writes TaskCards plus proposal/design/tasks/specs
|
|
120
|
+
and stops. Before Step 5, review the plan in this order — proposal → delta
|
|
121
|
+
specs → tasks — and confirm: intent is right, no scope creep, every FR is
|
|
122
|
+
testable with a scenario that exercises it, edge/error cases are covered, and
|
|
123
|
+
each task traces to an FR/SC. Fix the Markdown directly or ask for revisions.
|
|
124
|
+
Do not `start` any card until the plan reads correctly.
|
|
125
|
+
|
|
119
126
|
---
|
|
120
127
|
|
|
121
128
|
## Drive card status (CLI)
|
|
@@ -126,10 +133,12 @@ Do not edit `.codeconductor/openspec-state.json` by hand.
|
|
|
126
133
|
npx cc-codeconductor openspec start <cardId>
|
|
127
134
|
npx cc-codeconductor openspec done <cardId>
|
|
128
135
|
npx cc-codeconductor openspec block <cardId> --reason "waiting on design"
|
|
136
|
+
npx cc-codeconductor openspec sync <itemId>
|
|
137
|
+
npx cc-codeconductor openspec verify <itemId>
|
|
129
138
|
npx cc-codeconductor openspec archive <itemId>
|
|
130
139
|
```
|
|
131
140
|
|
|
132
|
-
`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/`.
|
|
141
|
+
`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/`.
|
|
133
142
|
|
|
134
143
|
For test and implementation cards, `done` also requires a current RDD-backed
|
|
135
144
|
RED or GREEN receipt respectively. Do not reuse evidence after candidate files
|
|
@@ -170,6 +179,14 @@ After each phase:
|
|
|
170
179
|
|
|
171
180
|
Implementer: create a Git worktree before editing (`git worktree add ../<branch>-session <branch>`).
|
|
172
181
|
|
|
182
|
+
Discover is read-only: `repo-explorer` never writes code. The implementer ticks
|
|
183
|
+
`tasks.md` boxes (`- [ ]` → `- [x]`) as each FR lands — only `x`/`X` counts as
|
|
184
|
+
done. If implementation reveals a design problem, pause and reconcile the
|
|
185
|
+
planning artifacts first (any direction: a later artifact may force revising an
|
|
186
|
+
earlier one). Planning artifacts only in that step — never code — and confirm
|
|
187
|
+
each edit. If the item's intent changed rather than its details, open a fresh
|
|
188
|
+
item with `/cc:backlog` instead of warping this one.
|
|
189
|
+
|
|
173
190
|
---
|
|
174
191
|
|
|
175
192
|
## Step 6 — Review gate
|
|
@@ -195,6 +212,8 @@ If **approved**: proceed to Step 6.
|
|
|
195
212
|
|
|
196
213
|
## Step 7 — Scorecard and update backlog
|
|
197
214
|
|
|
215
|
+
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:
|
|
216
|
+
|
|
198
217
|
1. `npx cc-codeconductor scorecard create --task <BC-id> --from-diff`
|
|
199
218
|
2. Complete criteria; `scorecard record` with verdict and optional cost/tokens
|
|
200
219
|
3. Set item `Progress: 100%`, `Status: DONE` if PASS
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!-- CODECONDUCTOR:BEGIN managed -->
|
|
2
|
+
|
|
3
|
+
# CodeConductor — Muse Preset
|
|
4
|
+
|
|
5
|
+
This file configures CodeConductor for **Muse** (Meta's coding-agent CLI,
|
|
6
|
+
binary `muse`). It lives at the project root (`AGENTS.md`) so Muse's
|
|
7
|
+
context-file loader picks it up automatically.
|
|
8
|
+
|
|
9
|
+
## Behavioral Discipline
|
|
10
|
+
|
|
11
|
+
1. **Think Before Coding** — state assumptions; ask if uncertain; present
|
|
12
|
+
alternatives instead of picking silently.
|
|
13
|
+
2. **Simplicity First** — minimum code that solves the problem; no
|
|
14
|
+
speculative abstractions.
|
|
15
|
+
3. **Surgical Changes** — touch only what the task requires; match existing
|
|
16
|
+
style; remove only what your own change made unused.
|
|
17
|
+
4. **Goal-Driven Execution** — turn the task into a verifiable goal with a
|
|
18
|
+
success check; loop until it passes.
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
CodeConductor ships its workflows as Muse skills under `.agents/skills/`,
|
|
23
|
+
invoked as `/cc:<name>` (e.g. `/cc:feature`, `/cc:review`). Run `/cc:ask
|
|
24
|
+
"<problem>"` when unsure which one applies — it recommends exactly one and
|
|
25
|
+
stops; it does not start the workflow.
|
|
26
|
+
|
|
27
|
+
Skills live under `.agents/skills/` (Muse discovers skills there natively,
|
|
28
|
+
per its own docs). Read `.agents/skills/using-cc-skills/SKILL.md` first —
|
|
29
|
+
it maps intent to the right slash command.
|
|
30
|
+
|
|
31
|
+
Where a step says "adopt the `X` role", read the matching skill under
|
|
32
|
+
`.agents/skills/` and act as that role for the rest of the step.
|
|
33
|
+
|
|
34
|
+
## What never changes
|
|
35
|
+
|
|
36
|
+
- Do not invoke the Implementer without an accepted Technical Plan.
|
|
37
|
+
- Do not skip the Reviewer step for medium- or high-risk changes.
|
|
38
|
+
- Do not store secrets in any file loaded by Muse.
|
|
39
|
+
|
|
40
|
+
## Receipt integrity
|
|
41
|
+
|
|
42
|
+
- For any implementation, test, review, handoff, or delivery decision, capture or verify the current RDD receipt with `bun run dev rdd`.
|
|
43
|
+
- A receipt is valid only for its exact candidate. If code, tests, contracts, or runner configuration changed, repeat the affected verification.
|
|
44
|
+
- TDD and Mutation Testing retain their existing gates; RDD verifies that their observed evidence still belongs to the current candidate.
|
|
45
|
+
|
|
46
|
+
<!-- CODECONDUCTOR:END managed -->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"safety-gate": {
|
|
3
|
+
"enabled": true,
|
|
4
|
+
"PreToolUse": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": ".*",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "node -e \"const fs=require('fs');const c=['.muse/hooks/invoke-hook.cjs'];const p=c.find(f=>fs.existsSync(f));if(p){require(require('path').resolve(p));}else{process.exit(0);}\" pre-tool --format=muse"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"code-formatter": {
|
|
17
|
+
"enabled": true,
|
|
18
|
+
"PostToolUse": [
|
|
19
|
+
{
|
|
20
|
+
"matcher": ".*",
|
|
21
|
+
"hooks": [
|
|
22
|
+
{
|
|
23
|
+
"type": "command",
|
|
24
|
+
"command": "node -e \"const fs=require('fs');const c=['.muse/hooks/invoke-hook.cjs'];const p=c.find(f=>fs.existsSync(f));if(p){require(require('path').resolve(p));}else{process.exit(0);}\" post-tool --format=muse"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -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`.
|
|
@@ -80,7 +80,9 @@ Use `$ARGUMENTS` BC-id or `npx cc-codeconductor openspec status` for next READY
|
|
|
80
80
|
|
|
81
81
|
Run `npx cc-codeconductor openspec plan <BC-id>`. Show TaskCards and `openspec/changes/` path.
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
`plan` is planning-only: it writes TaskCards plus proposal/design/tasks/specs and stops. Before Step 4, review the plan in order — proposal → delta specs → tasks — and confirm intent, scope, testable FR/SC, and edge-case scenarios. Do not `start` any card until the plan reads correctly.
|
|
84
|
+
|
|
85
|
+
Drive status with CLI (do not edit openspec-state.json): `openspec start <cardId>`, `openspec done <cardId>`, `openspec block <cardId> --reason "…"`, `openspec sync <itemId>` (merge specs without closing, optional), `openspec verify <itemId>` (advisory pre-archive checklist), `openspec archive <itemId>` (re-checks artifacts and analyze CRITICALs).
|
|
84
86
|
|
|
85
87
|
---
|
|
86
88
|
|
|
@@ -94,7 +96,7 @@ For each pending card: `npx cc-codeconductor openspec next`, then invoke the lis
|
|
|
94
96
|
- implement → `implementer`
|
|
95
97
|
- review → `reviewer`
|
|
96
98
|
|
|
97
|
-
Run each phase as a subagent with isolated context. Implementer uses a git worktree.
|
|
99
|
+
Run each phase as a subagent with isolated context. Implementer uses a git worktree. Discover is read-only (never writes code); implementer ticks `tasks.md` boxes (`- [ ]` → `- [x]`, only `x`/`X` counts). If implementation reveals a design problem, pause and reconcile planning artifacts first (any direction, planning-only, confirm each edit); if the intent changed, open a fresh item with `/cc-backlog`.
|
|
98
100
|
|
|
99
101
|
---
|
|
100
102
|
|
|
@@ -106,6 +108,6 @@ Reviewer approves or rejects against acceptance criteria. Reject → `IN_PROGRES
|
|
|
106
108
|
|
|
107
109
|
## Step 6 — Update
|
|
108
110
|
|
|
109
|
-
Mark DONE with `openspec archive <itemId>` (all cards must be done), then run `openspec scan`.
|
|
111
|
+
First `openspec verify <itemId> --output json` (advisory: confirm `archiveReady`). Mark DONE with `openspec archive <itemId>` (all cards must be done), then run `openspec scan`.
|
|
110
112
|
|
|
111
113
|
Apply skill `openspec` for format and state rules.
|
|
@@ -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`
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
target: muse
|
|
2
|
+
entries:
|
|
3
|
+
- src: muse/AGENTS.md
|
|
4
|
+
dest: AGENTS.md
|
|
5
|
+
strategy: merge-managed
|
|
6
|
+
globalStrategy: skip
|
|
7
|
+
template: true
|
|
8
|
+
- src: opencode/skills
|
|
9
|
+
dest: .agents/skills
|
|
10
|
+
strategy: overwrite
|
|
11
|
+
- src: muse/hooks.json
|
|
12
|
+
dest: .muse/hooks.json
|
|
13
|
+
strategy: overwrite
|
|
14
|
+
globalStrategy: skip
|
|
15
|
+
- src: shared/invoke-hook.cjs
|
|
16
|
+
dest: .muse/hooks/invoke-hook.cjs
|
|
17
|
+
strategy: overwrite
|
|
18
|
+
globalStrategy: skip
|
|
@@ -16,6 +16,7 @@ agents:
|
|
|
16
16
|
architect:
|
|
17
17
|
claude: claude-sonnet-5-5
|
|
18
18
|
pi: claude-opus-5
|
|
19
|
+
muse: muse-spark-1.3
|
|
19
20
|
opencode: opencode-go/deepseek-v4.1-flash
|
|
20
21
|
codex: gpt-6.1-sol
|
|
21
22
|
gemini: gemini-3.1-pro-preview
|
|
@@ -25,6 +26,7 @@ agents:
|
|
|
25
26
|
implementer:
|
|
26
27
|
claude: claude-sonnet-5-5
|
|
27
28
|
pi: claude-sonnet-5
|
|
29
|
+
muse: muse-spark-1.3
|
|
28
30
|
opencode: opencode-go/mimo-v2.6-flash
|
|
29
31
|
codex: gpt-6.1-sol
|
|
30
32
|
gemini: gemini-3.7-flash
|
|
@@ -34,6 +36,7 @@ agents:
|
|
|
34
36
|
tester:
|
|
35
37
|
claude: claude-sonnet-5-5
|
|
36
38
|
pi: claude-sonnet-5
|
|
39
|
+
muse: muse-spark-1.3
|
|
37
40
|
opencode: opencode-go/mimo-v2.6-flash
|
|
38
41
|
codex: gpt-6.1-sol
|
|
39
42
|
gemini: gemini-3.7-flash
|
|
@@ -43,6 +46,7 @@ agents:
|
|
|
43
46
|
orchestrator:
|
|
44
47
|
claude: claude-sonnet-5-5
|
|
45
48
|
pi: claude-sonnet-5
|
|
49
|
+
muse: muse-spark-1.3
|
|
46
50
|
opencode: opencode-go/deepseek-v4.1-flash
|
|
47
51
|
codex: gpt-6.1-sol
|
|
48
52
|
gemini: gemini-3.7-flash
|
|
@@ -52,6 +56,7 @@ agents:
|
|
|
52
56
|
reviewer:
|
|
53
57
|
claude: claude-sonnet-5-5
|
|
54
58
|
pi: claude-opus-5
|
|
59
|
+
muse: muse-spark-1.3
|
|
55
60
|
opencode: opencode-go/deepseek-v4.1-flash
|
|
56
61
|
codex: gpt-6.1-sol
|
|
57
62
|
gemini: gemini-3.1-pro-preview
|
|
@@ -61,6 +66,7 @@ agents:
|
|
|
61
66
|
docs:
|
|
62
67
|
claude: claude-sonnet-5-5
|
|
63
68
|
pi: claude-haiku-4-5-20251001
|
|
69
|
+
muse: muse-spark-1.3
|
|
64
70
|
opencode: opencode-go/muse-spark-1.3-contributor
|
|
65
71
|
codex: gpt-6.1-sol
|
|
66
72
|
gemini: gemini-3.7-flash
|
|
@@ -70,6 +76,7 @@ agents:
|
|
|
70
76
|
task-coach:
|
|
71
77
|
claude: claude-haiku-4-5-20251001
|
|
72
78
|
pi: claude-haiku-4-5-20251001
|
|
79
|
+
muse: muse-spark-1.3
|
|
73
80
|
opencode: opencode-go/glm-5.3-flash
|
|
74
81
|
codex: gpt-6.1-sol
|
|
75
82
|
gemini: gemini-3.7-flash
|
|
@@ -79,6 +86,7 @@ agents:
|
|
|
79
86
|
repo-explorer:
|
|
80
87
|
claude: claude-haiku-4-5-20251001
|
|
81
88
|
pi: claude-haiku-4-5-20251001
|
|
89
|
+
muse: muse-spark-1.3
|
|
82
90
|
opencode: opencode-go/glm-5.3-flash
|
|
83
91
|
codex: gpt-6.1-sol
|
|
84
92
|
gemini: gemini-3.7-flash
|
|
@@ -88,6 +96,7 @@ agents:
|
|
|
88
96
|
goal-planner:
|
|
89
97
|
claude: claude-haiku-4-5-20251001
|
|
90
98
|
pi: claude-haiku-4-5-20251001
|
|
99
|
+
muse: muse-spark-1.3
|
|
91
100
|
opencode: opencode-go/deepseek-v4.1-flash
|
|
92
101
|
codex: gpt-6.1-sol
|
|
93
102
|
gemini: gemini-3.7-flash
|
|
@@ -97,6 +106,7 @@ agents:
|
|
|
97
106
|
complexity-auditor:
|
|
98
107
|
claude: claude-sonnet-5-5
|
|
99
108
|
pi: claude-sonnet-5
|
|
109
|
+
muse: muse-spark-1.3
|
|
100
110
|
opencode: opencode-go/glm-5.3-flash
|
|
101
111
|
codex: gpt-6.1-sol
|
|
102
112
|
gemini: gemini-3.7-flash
|
|
@@ -106,6 +116,7 @@ agents:
|
|
|
106
116
|
security-reviewer:
|
|
107
117
|
claude: claude-sonnet-5-5
|
|
108
118
|
pi: claude-opus-5
|
|
119
|
+
muse: muse-spark-1.3
|
|
109
120
|
opencode: opencode-go/glm-5.3-flash
|
|
110
121
|
codex: gpt-6.1-sol
|
|
111
122
|
gemini: gemini-3.1-pro-preview
|
|
@@ -115,6 +126,7 @@ agents:
|
|
|
115
126
|
contract-builder:
|
|
116
127
|
claude: claude-sonnet-5-5
|
|
117
128
|
pi: claude-opus-5
|
|
129
|
+
muse: muse-spark-1.3
|
|
118
130
|
opencode: opencode-go/deepseek-v4.1-flash
|
|
119
131
|
codex: gpt-6.1-sol
|
|
120
132
|
gemini: gemini-3.1-pro-preview
|
|
@@ -124,6 +136,7 @@ agents:
|
|
|
124
136
|
planner:
|
|
125
137
|
claude: claude-haiku-4-5-20251001
|
|
126
138
|
pi: claude-haiku-4-5-20251001
|
|
139
|
+
muse: muse-spark-1.3
|
|
127
140
|
opencode: opencode-go/deepseek-v4.1-flash
|
|
128
141
|
codex: gpt-6.1-sol
|
|
129
142
|
gemini: gemini-3.7-flash
|
|
@@ -133,6 +146,7 @@ agents:
|
|
|
133
146
|
devil:
|
|
134
147
|
claude: claude-sonnet-5-5
|
|
135
148
|
pi: claude-opus-5
|
|
149
|
+
muse: muse-spark-1.3
|
|
136
150
|
opencode: opencode-go/glm-5.3-flash
|
|
137
151
|
codex: gpt-6.1-sol
|
|
138
152
|
gemini: gemini-3.1-pro-preview
|