cc-codeconductor 1.5.1 → 1.6.0

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.
@@ -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 next` / `plan` / `done` / `archive`
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
- 2. `openspec plan BC-xxx` if the item is not yet `PLANNED`.
31
- 3. `openspec analyze --output json` — CRITICAL findings exit 1. Do not implement.
32
- 4. Phases: discover (`repo-explorer`) → design (`architect`) → test (`tester`) →
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
- 5. `openspec done` on test/implement requires `captureTddSuiteEvidence`. Handmade
36
- evidence JSON is rejected.
37
- 6. `scorecard create --task BC-xxx --from-diff` then record a verdict.
38
- 7. `openspec archive` only after human review when `Review required: yes` and
39
- the scorecard is PASS.
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`
@@ -62,7 +62,7 @@ implementer must:
62
62
  1. Write the minimal code required to pass the tests.
63
63
  2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
64
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).
65
+ 4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state), at most 3 iterations -- then stop and report the failing tests instead of looping.
66
66
 
67
67
  ---
68
68
 
@@ -74,7 +74,7 @@ The council will evaluate the diff against the 6 axes (Architecture, Security, P
74
74
 
75
75
  If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
76
76
  - The Review Report status is **BLOCKED**.
77
- - Return to Step 4 with the feedback.
77
+ - Return to Step 4 with the feedback (at most 3 review rounds in total -- then deliver the BLOCKED verdict with the unresolved findings instead of looping).
78
78
 
79
79
  If APPROVED (no CRITICAL findings):
80
80
  - Deliver the final Council Verdict and the diff summary.
@@ -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
@@ -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 next` / `plan` / `done` / `archive`
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
- 2. `openspec plan BC-xxx` if the item is not yet `PLANNED`.
31
- 3. `openspec analyze --output json` — CRITICAL findings exit 1. Do not implement.
32
- 4. Phases: discover (`repo-explorer`) → design (`architect`) → test (`tester`) →
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
- 5. `openspec done` on test/implement requires `captureTddSuiteEvidence`. Handmade
36
- evidence JSON is rejected.
37
- 6. `scorecard create --task BC-xxx --from-diff` then record a verdict.
38
- 7. `openspec archive` only after human review when `Review required: yes` and
39
- the scorecard is PASS.
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`
@@ -61,7 +61,7 @@ implementer must:
61
61
  1. Write the minimal code required to pass the tests.
62
62
  2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
63
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).
64
+ 4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state), at most 3 iterations -- then stop and report the failing tests instead of looping.
65
65
 
66
66
  ---
67
67
 
@@ -73,7 +73,7 @@ The council will evaluate the diff against the 6 axes (Architecture, Security, P
73
73
 
74
74
  If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
75
75
  - The Review Report status is **BLOCKED**.
76
- - Return to Step 4 with the feedback.
76
+ - Return to Step 4 with the feedback (at most 3 review rounds in total -- then deliver the BLOCKED verdict with the unresolved findings instead of looping).
77
77
 
78
78
  If APPROVED (no CRITICAL findings):
79
79
  - Deliver the final Council Verdict and the diff summary.
@@ -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
+ }
@@ -62,7 +62,7 @@ implementer must:
62
62
  1. Write the minimal code required to pass the tests.
63
63
  2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
64
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).
65
+ 4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state), at most 3 iterations -- then stop and report the failing tests instead of looping.
66
66
 
67
67
  ---
68
68
 
@@ -74,7 +74,7 @@ The council will evaluate the diff against the 6 axes (Architecture, Security, P
74
74
 
75
75
  If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
76
76
  - The Review Report status is **BLOCKED**.
77
- - Return to Step 4 with the feedback.
77
+ - Return to Step 4 with the feedback (at most 3 review rounds in total -- then deliver the BLOCKED verdict with the unresolved findings instead of looping).
78
78
 
79
79
  If APPROVED (no CRITICAL findings):
80
80
  - Deliver the final Council Verdict and the diff summary.
@@ -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
- Drive status with CLI (do not edit openspec-state.json): `openspec start <cardId>`, `openspec done <cardId>`, `openspec block <cardId> --reason "…"`, `openspec archive <itemId>`.
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 next` / `plan` / `done` / `archive`
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
- 2. `openspec plan BC-xxx` if the item is not yet `PLANNED`.
31
- 3. `openspec analyze --output json` — CRITICAL findings exit 1. Do not implement.
32
- 4. Phases: discover (`repo-explorer`) → design (`architect`) → test (`tester`) →
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
- 5. `openspec done` on test/implement requires `captureTddSuiteEvidence`. Handmade
36
- evidence JSON is rejected.
37
- 6. `scorecard create --task BC-xxx --from-diff` then record a verdict.
38
- 7. `openspec archive` only after human review when `Review required: yes` and
39
- the scorecard is PASS.
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
@@ -0,0 +1,4 @@
1
+ # Model configuration for Muse preset
2
+ # Agent models and tool-name mappings live in roles.yml; loadModelConfig()
3
+ # merges this file with it. See roles.yml for the shared table.
4
+ target: muse