cc-codeconductor 1.5.0 → 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.
Files changed (155) hide show
  1. package/README.md +24 -11
  2. package/dist/core/runner/runner-target.d.ts +4 -4
  3. package/dist/domain/product/entities.d.ts +1 -1
  4. package/dist/index.js +1714 -795
  5. package/dist/library.js +62 -7
  6. package/dist/validation/schemas.d.ts +210 -43
  7. package/docs/generated/cli.md +8 -0
  8. package/package.json +1 -1
  9. package/presets/agy/skills/openspec/SKILL.md +39 -11
  10. package/presets/agy/workflows/cc-api-contract.md +4 -5
  11. package/presets/agy/workflows/cc-backlog.md +4 -5
  12. package/presets/agy/workflows/cc-clarify.md +4 -5
  13. package/presets/agy/workflows/cc-council.md +6 -7
  14. package/presets/agy/workflows/cc-db-migration.md +4 -5
  15. package/presets/agy/workflows/cc-explore.md +4 -5
  16. package/presets/agy/workflows/cc-feature.md +4 -5
  17. package/presets/agy/workflows/cc-fix.md +4 -5
  18. package/presets/agy/workflows/cc-handoff.md +8 -5
  19. package/presets/agy/workflows/cc-iterative.md +4 -5
  20. package/presets/agy/workflows/cc-odd.md +4 -3
  21. package/presets/agy/workflows/cc-openspec.md +5 -6
  22. package/presets/agy/workflows/cc-pagespeed.md +4 -5
  23. package/presets/agy/workflows/cc-prototype.md +4 -5
  24. package/presets/agy/workflows/cc-refactor.md +4 -5
  25. package/presets/agy/workflows/cc-review.md +4 -5
  26. package/presets/agy/workflows/cc-scorecard.md +4 -5
  27. package/presets/agy/workflows/cc-security.md +4 -5
  28. package/presets/agy/workflows/cc-spec-mutation.md +4 -5
  29. package/presets/agy/workflows/cc-tdd-cycle.md +4 -5
  30. package/presets/agy/workflows/cc-test-plan.md +4 -5
  31. package/presets/agy/workflows/cc-triage.md +4 -5
  32. package/presets/claude/CLAUDE.md +6 -5
  33. package/presets/claude/commands/cc/api-contract.md +4 -5
  34. package/presets/claude/commands/cc/backlog.md +4 -5
  35. package/presets/claude/commands/cc/clarify.md +4 -5
  36. package/presets/claude/commands/cc/council.md +6 -7
  37. package/presets/claude/commands/cc/db-migration.md +4 -5
  38. package/presets/claude/commands/cc/explore.md +4 -5
  39. package/presets/claude/commands/cc/feature.md +4 -5
  40. package/presets/claude/commands/cc/fix.md +4 -5
  41. package/presets/claude/commands/cc/handoff.md +8 -5
  42. package/presets/claude/commands/cc/iterative.md +4 -5
  43. package/presets/claude/commands/cc/odd.md +4 -3
  44. package/presets/claude/commands/cc/openspec.md +43 -8
  45. package/presets/claude/commands/cc/pagespeed.md +4 -5
  46. package/presets/claude/commands/cc/prototype.md +4 -5
  47. package/presets/claude/commands/cc/refactor.md +4 -5
  48. package/presets/claude/commands/cc/review.md +4 -5
  49. package/presets/claude/commands/cc/scorecard.md +4 -5
  50. package/presets/claude/commands/cc/security.md +4 -5
  51. package/presets/claude/commands/cc/spec-mutation.md +4 -5
  52. package/presets/claude/commands/cc/tdd-cycle.md +4 -5
  53. package/presets/claude/commands/cc/test-plan.md +4 -5
  54. package/presets/claude/commands/cc/triage.md +4 -5
  55. package/presets/claude/settings.json +32 -78
  56. package/presets/claude/skills/openspec/SKILL.md +39 -11
  57. package/presets/codex/config.toml +2 -0
  58. package/presets/codex/skills/cc-api-contract/SKILL.md +4 -5
  59. package/presets/codex/skills/cc-backlog/SKILL.md +4 -5
  60. package/presets/codex/skills/cc-clarify/SKILL.md +4 -5
  61. package/presets/codex/skills/cc-council/SKILL.md +12 -7
  62. package/presets/codex/skills/cc-db-migration/SKILL.md +4 -5
  63. package/presets/codex/skills/cc-explore/SKILL.md +4 -5
  64. package/presets/codex/skills/cc-feature/SKILL.md +4 -5
  65. package/presets/codex/skills/cc-fix/SKILL.md +4 -5
  66. package/presets/codex/skills/cc-handoff/SKILL.md +8 -5
  67. package/presets/codex/skills/cc-iterative/SKILL.md +4 -5
  68. package/presets/codex/skills/cc-odd/SKILL.md +4 -3
  69. package/presets/codex/skills/cc-openspec/SKILL.md +31 -7
  70. package/presets/codex/skills/cc-pagespeed/SKILL.md +4 -5
  71. package/presets/codex/skills/cc-prototype/SKILL.md +4 -5
  72. package/presets/codex/skills/cc-refactor/SKILL.md +4 -5
  73. package/presets/codex/skills/cc-review/SKILL.md +4 -5
  74. package/presets/codex/skills/cc-scorecard/SKILL.md +4 -5
  75. package/presets/codex/skills/cc-security/SKILL.md +4 -5
  76. package/presets/codex/skills/cc-spec-mutation/SKILL.md +4 -5
  77. package/presets/codex/skills/cc-tdd-cycle/SKILL.md +4 -5
  78. package/presets/codex/skills/cc-test-plan/SKILL.md +4 -5
  79. package/presets/codex/skills/cc-triage/SKILL.md +4 -5
  80. package/presets/codex/skills/openspec/SKILL.md +39 -11
  81. package/presets/cursor/commands/cc/api-contract.md +4 -5
  82. package/presets/cursor/commands/cc/backlog.md +4 -5
  83. package/presets/cursor/commands/cc/clarify.md +4 -5
  84. package/presets/cursor/commands/cc/council.md +6 -7
  85. package/presets/cursor/commands/cc/db-migration.md +4 -5
  86. package/presets/cursor/commands/cc/explore.md +4 -5
  87. package/presets/cursor/commands/cc/feature.md +4 -5
  88. package/presets/cursor/commands/cc/fix.md +4 -5
  89. package/presets/cursor/commands/cc/handoff.md +8 -5
  90. package/presets/cursor/commands/cc/iterative.md +4 -5
  91. package/presets/cursor/commands/cc/odd.md +4 -3
  92. package/presets/cursor/commands/cc/openspec.md +25 -7
  93. package/presets/cursor/commands/cc/pagespeed.md +4 -5
  94. package/presets/cursor/commands/cc/prototype.md +4 -5
  95. package/presets/cursor/commands/cc/refactor.md +4 -5
  96. package/presets/cursor/commands/cc/review.md +4 -5
  97. package/presets/cursor/commands/cc/scorecard.md +4 -5
  98. package/presets/cursor/commands/cc/security.md +4 -5
  99. package/presets/cursor/commands/cc/spec-mutation.md +4 -5
  100. package/presets/cursor/commands/cc/tdd-cycle.md +4 -5
  101. package/presets/cursor/commands/cc/test-plan.md +4 -5
  102. package/presets/cursor/commands/cc/triage.md +4 -5
  103. package/presets/cursor/skills/openspec/SKILL.md +39 -11
  104. package/presets/gemini/commands/cc/api-contract.toml +4 -5
  105. package/presets/gemini/commands/cc/backlog.toml +4 -5
  106. package/presets/gemini/commands/cc/clarify.toml +4 -5
  107. package/presets/gemini/commands/cc/council.toml +6 -7
  108. package/presets/gemini/commands/cc/db-migration.toml +4 -5
  109. package/presets/gemini/commands/cc/explore.toml +4 -5
  110. package/presets/gemini/commands/cc/feature.toml +4 -5
  111. package/presets/gemini/commands/cc/fix.toml +4 -5
  112. package/presets/gemini/commands/cc/handoff.toml +8 -5
  113. package/presets/gemini/commands/cc/iterative.toml +4 -5
  114. package/presets/gemini/commands/cc/odd.toml +4 -3
  115. package/presets/gemini/commands/cc/openspec.toml +25 -7
  116. package/presets/gemini/commands/cc/pagespeed.toml +4 -5
  117. package/presets/gemini/commands/cc/prototype.toml +4 -5
  118. package/presets/gemini/commands/cc/refactor.toml +4 -5
  119. package/presets/gemini/commands/cc/review.toml +4 -5
  120. package/presets/gemini/commands/cc/scorecard.toml +4 -5
  121. package/presets/gemini/commands/cc/security.toml +4 -5
  122. package/presets/gemini/commands/cc/spec-mutation.toml +4 -5
  123. package/presets/gemini/commands/cc/tdd-cycle.toml +4 -5
  124. package/presets/gemini/commands/cc/test-plan.toml +4 -5
  125. package/presets/gemini/commands/cc/triage.toml +4 -5
  126. package/presets/muse/AGENTS.md +46 -0
  127. package/presets/muse/hooks.json +30 -0
  128. package/presets/opencode/commands/cc-api-contract.md +4 -5
  129. package/presets/opencode/commands/cc-backlog.md +4 -5
  130. package/presets/opencode/commands/cc-clarify.md +4 -5
  131. package/presets/opencode/commands/cc-council.md +6 -7
  132. package/presets/opencode/commands/cc-db-migration.md +4 -5
  133. package/presets/opencode/commands/cc-explore.md +4 -5
  134. package/presets/opencode/commands/cc-feature.md +4 -5
  135. package/presets/opencode/commands/cc-fix.md +4 -5
  136. package/presets/opencode/commands/cc-handoff.md +8 -5
  137. package/presets/opencode/commands/cc-iterative.md +4 -5
  138. package/presets/opencode/commands/cc-odd.md +4 -3
  139. package/presets/opencode/commands/cc-openspec.md +10 -9
  140. package/presets/opencode/commands/cc-pagespeed.md +4 -5
  141. package/presets/opencode/commands/cc-prototype.md +4 -5
  142. package/presets/opencode/commands/cc-refactor.md +4 -5
  143. package/presets/opencode/commands/cc-review.md +4 -5
  144. package/presets/opencode/commands/cc-scorecard.md +4 -5
  145. package/presets/opencode/commands/cc-security.md +4 -5
  146. package/presets/opencode/commands/cc-spec-mutation.md +4 -5
  147. package/presets/opencode/commands/cc-tdd-cycle.md +4 -5
  148. package/presets/opencode/commands/cc-test-plan.md +4 -5
  149. package/presets/opencode/commands/cc-triage.md +4 -5
  150. package/presets/opencode/skills/openspec/SKILL.md +39 -11
  151. package/src/presets/manifests/codex.yml +3 -0
  152. package/src/presets/manifests/muse.yml +18 -0
  153. package/src/presets/models/muse.yml +4 -0
  154. package/src/presets/models/roles.yml +40 -28
  155. package/src/presets/targets/muse.yml +12 -0
@@ -11,11 +11,10 @@ Clarify request: $ARGUMENTS
11
11
 
12
12
  Command: `clarify` (fixed for this workflow — do not infer from user text)
13
13
 
14
- 1. Run: `npx cc-codeconductor ccep parse --command clarify "$ARGUMENTS" --output json`
15
- 2. Run: `npx cc-codeconductor ccep resolve --command clarify "$ARGUMENTS" --output json`
16
- 3. Run: `npx cc-codeconductor ccep profile clarify --output json`
17
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command clarify --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
18
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
14
+ 1. Run: `npx cc-codeconductor ccep profile clarify --output json` to get the phases and their roles.
15
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command clarify --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
16
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command clarify --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.
19
18
 
20
19
  ---
21
20
 
@@ -11,11 +11,10 @@ Task request: $ARGUMENTS
11
11
  Command: `council` (fixed for this workflow — do not infer from user text)
12
12
  command: council
13
13
 
14
- 1. Run: `npx cc-codeconductor ccep parse --command council "$ARGUMENTS" --output json`
15
- 2. Run: `npx cc-codeconductor ccep resolve --command council "$ARGUMENTS" --output json`
16
- 3. Run: `npx cc-codeconductor ccep profile council --output json`
17
- 4. 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.
18
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
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.
19
18
 
20
19
  ---
21
20
 
@@ -63,7 +62,7 @@ implementer must:
63
62
  1. Write the minimal code required to pass the tests.
64
63
  2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
65
64
  3. NOT refactor adjacent code, change existing styles, or build speculative features.
66
- 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.
67
66
 
68
67
  ---
69
68
 
@@ -75,7 +74,7 @@ The council will evaluate the diff against the 6 axes (Architecture, Security, P
75
74
 
76
75
  If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
77
76
  - The Review Report status is **BLOCKED**.
78
- - 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).
79
78
 
80
79
  If APPROVED (no CRITICAL findings):
81
80
  - Deliver the final Council Verdict and the diff summary.
@@ -12,11 +12,10 @@ Migration request: $ARGUMENTS
12
12
 
13
13
  Command: `db-migration` (fixed for this workflow — do not infer from user text)
14
14
 
15
- 1. Run: `npx cc-codeconductor ccep parse --command db-migration "$ARGUMENTS" --output json`
16
- 2. Run: `npx cc-codeconductor ccep resolve --command db-migration "$ARGUMENTS" --output json`
17
- 3. Run: `npx cc-codeconductor ccep profile db-migration --output json`
18
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command db-migration --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
19
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
15
+ 1. Run: `npx cc-codeconductor ccep profile db-migration --output json` to get the phases and their roles.
16
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command db-migration --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
17
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command db-migration --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
18
+ 4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
20
19
  Canonical delivery order is test-before-implement whenever both phases apply.
21
20
 
22
21
  ---
@@ -11,11 +11,10 @@ Explore request: $ARGUMENTS
11
11
 
12
12
  Command: `explore` (fixed for this workflow — do not infer from user text)
13
13
 
14
- 1. Run: `npx cc-codeconductor ccep parse --command explore "$ARGUMENTS" --output json`
15
- 2. Run: `npx cc-codeconductor ccep resolve --command explore "$ARGUMENTS" --output json`
16
- 3. Run: `npx cc-codeconductor ccep profile explore --output json`
17
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command explore --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
18
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
14
+ 1. Run: `npx cc-codeconductor ccep profile explore --output json` to get the phases and their roles.
15
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command explore --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
16
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command explore --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.
19
18
 
20
19
  ---
21
20
 
@@ -36,11 +36,10 @@ unavailable visual or emulator checks remain pending rather than claimed complet
36
36
 
37
37
  Command: `feature` (fixed for this workflow — do not infer from user text)
38
38
 
39
- 1. Run: `npx cc-codeconductor ccep parse --command feature "$ARGUMENTS" --output json`
40
- 2. Run: `npx cc-codeconductor ccep resolve --command feature "$ARGUMENTS" --output json`
41
- 3. Run: `npx cc-codeconductor ccep profile feature --output json`
42
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command feature --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
43
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
39
+ 1. Run: `npx cc-codeconductor ccep profile feature --output json` to get the phases and their roles.
40
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command feature --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
41
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command feature --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
42
+ 4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
44
43
  Canonical delivery order is test-before-implement whenever both phases apply.
45
44
 
46
45
  ---
@@ -44,11 +44,10 @@ unavailable visual or emulator checks remain pending rather than claimed complet
44
44
 
45
45
  Command: `fix` (fixed for this workflow — do not infer from user text)
46
46
 
47
- 1. Run: `npx cc-codeconductor ccep parse --command fix "$ARGUMENTS" --output json`
48
- 2. Run: `npx cc-codeconductor ccep resolve --command fix "$ARGUMENTS" --output json`
49
- 3. Run: `npx cc-codeconductor ccep profile fix --output json`
50
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command fix --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
51
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
47
+ 1. Run: `npx cc-codeconductor ccep profile fix --output json` to get the phases and their roles.
48
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command fix --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
49
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command fix --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
50
+ 4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
52
51
  Canonical delivery order is test-before-implement whenever both phases apply.
53
52
 
54
53
  ---
@@ -11,11 +11,10 @@ Handoff request: $ARGUMENTS
11
11
 
12
12
  Command: `handoff` (fixed for this workflow — do not infer from user text)
13
13
 
14
- 1. Run: `npx cc-codeconductor ccep parse --command handoff "$ARGUMENTS" --output json`
15
- 2. Run: `npx cc-codeconductor ccep resolve --command handoff "$ARGUMENTS" --output json`
16
- 3. Run: `npx cc-codeconductor ccep profile handoff --output json`
17
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command handoff --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
18
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
14
+ 1. Run: `npx cc-codeconductor ccep profile handoff --output json` to get the phases and their roles.
15
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command handoff --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
16
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command handoff --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.
19
18
 
20
19
  ---
21
20
 
@@ -38,6 +37,10 @@ one-sentence justification.
38
37
  Link the Delivery Ledger and verification evidence when they exist; do not
39
38
  repeat the original request or transcript. Do not edit source or tests.
40
39
 
40
+ If a Delivery Ledger exists, run `npx cc-codeconductor odd handoff --id <ledger-id> --output json`
41
+ and use its `handoff` envelope as the source for these fields. Secret redaction
42
+ still applies.
43
+
41
44
  ---
42
45
 
43
46
  ## Completion
@@ -14,11 +14,10 @@ Iterative request: $ARGUMENTS
14
14
 
15
15
  Command: `iterative` (fixed for this workflow — do not infer from user text)
16
16
 
17
- 1. Run: `npx cc-codeconductor ccep parse --command iterative "$ARGUMENTS" --output json`
18
- 2. Run: `npx cc-codeconductor ccep resolve --command iterative "$ARGUMENTS" --output json`
19
- 3. Run: `npx cc-codeconductor ccep profile iterative --output json`
20
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command iterative --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
21
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
17
+ 1. Run: `npx cc-codeconductor ccep profile iterative --output json` to get the phases and their roles.
18
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command iterative --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
19
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command iterative --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
20
+ 4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
22
21
  Canonical delivery order is test-before-implement whenever both phases apply.
23
22
 
24
23
  ---
@@ -7,9 +7,10 @@ description: Create or resume an opt-in Delivery Ledger for substantial authoriz
7
7
  ## Step 0 — CCEP Bootstrap
8
8
 
9
9
  ```bash
10
- bun run dev ccep parse --command odd "$ARGUMENTS"
11
- bun run dev ccep resolve --command odd "$ARGUMENTS"
12
- bun run dev ccep profile --command odd
10
+ bun run dev ccep profile odd --output json
11
+ bun run dev ccep compile --command odd --phase <phase-id> "$ARGUMENTS" --view prompt --output json
13
12
  ```
14
13
 
14
+ Pass each subagent only the compiled `prompt` for its phase.
15
+
15
16
  Create a ledger only after authorization and tracked coordination. Read-only and small work do not create state.
@@ -10,6 +10,23 @@ Scope: $ARGUMENTS
10
10
 
11
11
  Orchestrate FIFO delivery from `BACKLOG.md`. CodeConductor owns planning; agents execute one TaskCard per phase with the installed preset model for each role.
12
12
 
13
+ ## Model and context budget
14
+
15
+ Use Claude Sonnet 5.5 for documentation, validation, design, tests,
16
+ implementation, and review. Use the lighter role model for simple discovery
17
+ and routing. Keep each phase on its assigned role and pass only
18
+ the current TaskCard, relevant file paths, acceptance criteria, and a short
19
+ summary of the preceding phase. Avoid replaying the full transcript or reading
20
+ the same large files in every phase.
21
+
22
+ If design or implementation is blocked by a specific business rule that Sonnet
23
+ cannot resolve from the available evidence, invoke the `architect` subagent once
24
+ with `model: opus`. Give it the exact question, relevant constraints,
25
+ and affected files. Ask for a brief decision and rationale, then continue the
26
+ remaining work on Sonnet 5.5. Do not switch the main session to Opus or use it
27
+ for routine documentation, validation, code generation, or review. This is a
28
+ routing goal, not a measured 90% usage guarantee.
29
+
13
30
  ---
14
31
 
15
32
  ## Web interface scope
@@ -46,7 +63,7 @@ A **tracer bullet** is a vertical slice of work: one `BC-NNN` backlog item that
46
63
 
47
64
  ---
48
65
 
49
- ## Step 0 — Validate (mandatory gate)
66
+ ## Step 0a — Validate (mandatory gate)
50
67
 
51
68
  Run:
52
69
 
@@ -66,11 +83,10 @@ If validation fails:
66
83
 
67
84
  Command: `openspec` (fixed for this workflow — do not infer from user text)
68
85
 
69
- 1. Run: `npx cc-codeconductor ccep parse --command openspec "$ARGUMENTS" --output json`
70
- 2. Run: `npx cc-codeconductor ccep resolve --command openspec "$ARGUMENTS" --output json`
71
- 3. Run: `npx cc-codeconductor ccep profile openspec --output json`
72
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command openspec --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
73
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
86
+ 1. Run: `npx cc-codeconductor ccep profile openspec --output json` to get the phases and their roles.
87
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command openspec --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
88
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command openspec --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
89
+ 4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
74
90
  Canonical delivery order is test-before-implement whenever both phases apply.
75
91
 
76
92
  ---
@@ -130,6 +146,13 @@ Show:
130
146
 
131
147
  Update BACKLOG item status to `PLANNED` (CLI does this automatically).
132
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
+
133
156
  ---
134
157
 
135
158
  ## Drive card status (CLI)
@@ -140,10 +163,12 @@ Do not edit `.codeconductor/openspec-state.json` by hand.
140
163
  npx cc-codeconductor openspec start <cardId>
141
164
  npx cc-codeconductor openspec done <cardId>
142
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>
143
168
  npx cc-codeconductor openspec archive <itemId>
144
169
  ```
145
170
 
146
- `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/`.
147
172
 
148
173
  ---
149
174
 
@@ -161,7 +186,7 @@ For each pending TaskCard, run:
161
186
  npx cc-codeconductor openspec next
162
187
  ```
163
188
 
164
- Invoke the agent named on the card with **isolated** context (`/clear` between phases unless continuation is required):
189
+ Invoke the agent named on the card as a subagent with **isolated** context (subagents already start fresh; do not `/clear` the main session between phases):
165
190
 
166
191
  | Phase | Agent | Role |
167
192
  |-------|-------|------|
@@ -180,6 +205,14 @@ After each phase:
180
205
 
181
206
  Implementer: create a Git worktree before editing (`git worktree add ../<branch>-session <branch>`).
182
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
+
183
216
  ---
184
217
 
185
218
  ## Step 5 — Review gate
@@ -205,6 +238,8 @@ If **approved**: proceed to Step 6.
205
238
 
206
239
  ## Step 6 — Scorecard and update backlog
207
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
+
208
243
  1. `npx cc-codeconductor scorecard create --task <BC-id> --from-diff`
209
244
  2. Complete criteria; `scorecard record` with verdict and optional cost/tokens
210
245
  3. Set item `Progress: 100%`, `Status: DONE` if PASS
@@ -8,11 +8,10 @@ Produces a prioritized report in the current working directory.
8
8
 
9
9
  Command: `pagespeed` (fixed for this workflow — do not infer from user text)
10
10
 
11
- 1. Run: `npx cc-codeconductor ccep parse --command pagespeed "$ARGUMENTS" --output json`
12
- 2. Run: `npx cc-codeconductor ccep resolve --command pagespeed "$ARGUMENTS" --output json`
13
- 3. Run: `npx cc-codeconductor ccep profile pagespeed --output json`
14
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command pagespeed --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
15
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
11
+ 1. Run: `npx cc-codeconductor ccep profile pagespeed --output json` to get the phases and their roles.
12
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command pagespeed --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
13
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command pagespeed --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
14
+ 4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
16
15
 
17
16
  ---
18
17
 
@@ -11,11 +11,10 @@ Prototype request: $ARGUMENTS
11
11
 
12
12
  Command: `prototype` (fixed for this workflow — do not infer from user text)
13
13
 
14
- 1. Run: `npx cc-codeconductor ccep parse --command prototype "$ARGUMENTS" --output json`
15
- 2. Run: `npx cc-codeconductor ccep resolve --command prototype "$ARGUMENTS" --output json`
16
- 3. Run: `npx cc-codeconductor ccep profile prototype --output json`
17
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command prototype --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
18
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
14
+ 1. Run: `npx cc-codeconductor ccep profile prototype --output json` to get the phases and their roles.
15
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command prototype --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
16
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command prototype --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.
19
18
 
20
19
  ---
21
20
 
@@ -37,11 +37,10 @@ If coverage is insufficient:
37
37
 
38
38
  Command: `refactor` (fixed for this workflow — do not infer from user text)
39
39
 
40
- 1. Run: `npx cc-codeconductor ccep parse --command refactor "$ARGUMENTS" --output json`
41
- 2. Run: `npx cc-codeconductor ccep resolve --command refactor "$ARGUMENTS" --output json`
42
- 3. Run: `npx cc-codeconductor ccep profile refactor --output json`
43
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command refactor --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
44
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
40
+ 1. Run: `npx cc-codeconductor ccep profile refactor --output json` to get the phases and their roles.
41
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command refactor --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
42
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command refactor --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
43
+ 4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
45
44
 
46
45
  ---
47
46
 
@@ -43,11 +43,10 @@ unavailable visual or emulator checks remain pending rather than claimed complet
43
43
 
44
44
  Command: `review` (fixed for this workflow — do not infer from user text)
45
45
 
46
- 1. Run: `npx cc-codeconductor ccep parse --command review "$ARGUMENTS" --output json`
47
- 2. Run: `npx cc-codeconductor ccep resolve --command review "$ARGUMENTS" --output json`
48
- 3. Run: `npx cc-codeconductor ccep profile review --output json`
49
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command review --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
50
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
46
+ 1. Run: `npx cc-codeconductor ccep profile review --output json` to get the phases and their roles.
47
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command review --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
48
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command review --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
49
+ 4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
51
50
 
52
51
  ---
53
52
 
@@ -14,11 +14,10 @@ Scope: $ARGUMENTS
14
14
 
15
15
  Command: `scorecard` (fixed for this workflow — do not infer from user text)
16
16
 
17
- 1. Run: `npx cc-codeconductor ccep parse --command scorecard "$ARGUMENTS" --output json`
18
- 2. Run: `npx cc-codeconductor ccep resolve --command scorecard "$ARGUMENTS" --output json`
19
- 3. Run: `npx cc-codeconductor ccep profile scorecard --output json`
20
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command scorecard --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
21
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
17
+ 1. Run: `npx cc-codeconductor ccep profile scorecard --output json` to get the phases and their roles.
18
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command scorecard --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
19
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command scorecard --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
20
+ 4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
22
21
 
23
22
  ---
24
23
 
@@ -47,11 +47,10 @@ payloads, malware, or attack procedures.
47
47
 
48
48
  Command: `security` (fixed for this workflow — do not infer from user text)
49
49
 
50
- 1. Run: `npx cc-codeconductor ccep parse --command security "$ARGUMENTS" --output json`
51
- 2. Run: `npx cc-codeconductor ccep resolve --command security "$ARGUMENTS" --output json`
52
- 3. Run: `npx cc-codeconductor ccep profile security --output json`
53
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command security --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
54
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
50
+ 1. Run: `npx cc-codeconductor ccep profile security --output json` to get the phases and their roles.
51
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command security --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
52
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command security --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
53
+ 4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
55
54
  Canonical delivery order is test-before-implement whenever both phases apply.
56
55
 
57
56
  ---
@@ -22,11 +22,10 @@ Describe what behavior you want to implement. Include:
22
22
 
23
23
  Command: `spec-mutation` (fixed for this workflow — do not infer from user text)
24
24
 
25
- 1. Run: `npx cc-codeconductor ccep parse --command spec-mutation "$ARGUMENTS" --output json`
26
- 2. Run: `npx cc-codeconductor ccep resolve --command spec-mutation "$ARGUMENTS" --output json`
27
- 3. Run: `npx cc-codeconductor ccep profile spec-mutation --output json`
28
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command spec-mutation --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
29
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
25
+ 1. Run: `npx cc-codeconductor ccep profile spec-mutation --output json` to get the phases and their roles.
26
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command spec-mutation --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
27
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command spec-mutation --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.
30
29
  Canonical delivery order is test-before-implement whenever both phases apply.
31
30
 
32
31
  ---
@@ -22,11 +22,10 @@ Describe what behavior you want to implement. Include:
22
22
 
23
23
  Command: `tdd-cycle` (fixed for this workflow — do not infer from user text)
24
24
 
25
- 1. Run: `npx cc-codeconductor ccep parse --command tdd-cycle "$ARGUMENTS" --output json`
26
- 2. Run: `npx cc-codeconductor ccep resolve --command tdd-cycle "$ARGUMENTS" --output json`
27
- 3. Run: `npx cc-codeconductor ccep profile tdd-cycle --output json`
28
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command tdd-cycle --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
29
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
25
+ 1. Run: `npx cc-codeconductor ccep profile tdd-cycle --output json` to get the phases and their roles.
26
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command tdd-cycle --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
27
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command tdd-cycle --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.
30
29
  Canonical delivery order is test-before-implement whenever both phases apply.
31
30
 
32
31
  ---
@@ -24,11 +24,10 @@ proceeding.
24
24
 
25
25
  Command: `test-plan` (fixed for this workflow — do not infer from user text)
26
26
 
27
- 1. Run: `npx cc-codeconductor ccep parse --command test-plan "$ARGUMENTS" --output json`
28
- 2. Run: `npx cc-codeconductor ccep resolve --command test-plan "$ARGUMENTS" --output json`
29
- 3. Run: `npx cc-codeconductor ccep profile test-plan --output json`
30
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command test-plan --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
31
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
27
+ 1. Run: `npx cc-codeconductor ccep profile test-plan --output json` to get the phases and their roles.
28
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command test-plan --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
29
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command test-plan --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
30
+ 4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
32
31
 
33
32
  ---
34
33
 
@@ -11,11 +11,10 @@ Triage request: $ARGUMENTS
11
11
 
12
12
  Command: `triage` (fixed for this workflow — do not infer from user text)
13
13
 
14
- 1. Run: `npx cc-codeconductor ccep parse --command triage "$ARGUMENTS" --output json`
15
- 2. Run: `npx cc-codeconductor ccep resolve --command triage "$ARGUMENTS" --output json`
16
- 3. Run: `npx cc-codeconductor ccep profile triage --output json`
17
- 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command triage --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
18
- 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
14
+ 1. Run: `npx cc-codeconductor ccep profile triage --output json` to get the phases and their roles.
15
+ 2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command triage --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
16
+ 3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command triage --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.
19
18
 
20
19
  ---
21
20