cc-codeconductor 0.5.0 → 1.0.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 (174) hide show
  1. package/README.md +95 -95
  2. package/dist/cli/errors.d.ts +65 -0
  3. package/dist/core/compilation/compile-checker.d.ts +51 -0
  4. package/dist/core/config/codeconductor-config.d.ts +42 -0
  5. package/dist/core/config/config-loader.d.ts +11 -0
  6. package/dist/core/filesystem/credential-guard.d.ts +18 -0
  7. package/dist/core/goal/goal-planner.d.ts +8 -0
  8. package/dist/core/goal/goal-state.d.ts +15 -0
  9. package/dist/core/loop/git-stats.d.ts +13 -0
  10. package/dist/core/loop/loop-engine.d.ts +79 -0
  11. package/dist/core/memory/episodic-store.d.ts +6 -0
  12. package/dist/core/memory/operational-state.d.ts +6 -0
  13. package/dist/core/orchestrator/runtime-orchestrator.d.ts +25 -0
  14. package/dist/core/planner/product-planner.d.ts +18 -0
  15. package/dist/core/presets/package-paths.d.ts +4 -0
  16. package/dist/core/product-graph/graph-store.d.ts +11 -0
  17. package/dist/core/product-graph/paths.d.ts +18 -0
  18. package/dist/core/verification/verification-runner.d.ts +57 -0
  19. package/dist/domain/loop/loop-state.d.ts +74 -0
  20. package/dist/domain/product/entities.d.ts +11 -0
  21. package/dist/index.d.ts +15 -0
  22. package/dist/index.js +21820 -15579
  23. package/dist/library.js +2595 -0
  24. package/dist/utils/result.d.ts +36 -0
  25. package/dist/validation/schemas.d.ts +3660 -0
  26. package/package.json +15 -2
  27. package/policy.yml +12 -11
  28. package/presets/agy/AGENTS.md +11 -5
  29. package/presets/agy/gates/pre-commit/GATE.md +136 -0
  30. package/presets/agy/skills/cc-fix/SKILL.md +2 -2
  31. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +11 -0
  32. package/presets/agy/workflows/cc-api-contract.md +12 -0
  33. package/presets/agy/workflows/cc-ask.md +55 -0
  34. package/presets/agy/workflows/cc-clarify.md +33 -0
  35. package/presets/agy/workflows/cc-council.md +31 -7
  36. package/presets/agy/workflows/cc-db-migration.md +22 -9
  37. package/presets/agy/workflows/cc-explore.md +37 -0
  38. package/presets/agy/workflows/cc-feature.md +41 -19
  39. package/presets/agy/workflows/cc-fix.md +50 -23
  40. package/presets/agy/workflows/cc-handoff.md +42 -0
  41. package/presets/agy/workflows/cc-iterative.md +128 -0
  42. package/presets/agy/workflows/cc-openspec.md +13 -0
  43. package/presets/agy/workflows/cc-pagespeed.md +12 -0
  44. package/presets/agy/workflows/cc-prototype.md +39 -0
  45. package/presets/agy/workflows/cc-refactor.md +12 -0
  46. package/presets/agy/workflows/cc-review.md +12 -0
  47. package/presets/agy/workflows/cc-scorecard.md +12 -0
  48. package/presets/agy/workflows/cc-tdd-cycle.md +24 -0
  49. package/presets/agy/workflows/cc-test-plan.md +12 -0
  50. package/presets/agy/workflows/cc-triage.md +35 -0
  51. package/presets/claude/CLAUDE.md +64 -0
  52. package/presets/claude/commands/cc/api-contract.md +12 -0
  53. package/presets/claude/commands/cc/ask.md +55 -0
  54. package/presets/claude/commands/cc/clarify.md +32 -0
  55. package/presets/claude/commands/cc/council.md +87 -0
  56. package/presets/claude/commands/cc/db-migration.md +22 -9
  57. package/presets/claude/commands/cc/explore.md +36 -0
  58. package/presets/claude/commands/cc/feature.md +49 -22
  59. package/presets/claude/commands/cc/fix.md +74 -20
  60. package/presets/claude/commands/cc/handoff.md +44 -0
  61. package/presets/claude/commands/cc/iterative.md +132 -0
  62. package/presets/claude/commands/cc/openspec.md +25 -0
  63. package/presets/claude/commands/cc/pagespeed.md +12 -0
  64. package/presets/claude/commands/cc/prototype.md +38 -0
  65. package/presets/claude/commands/cc/refactor.md +152 -1
  66. package/presets/claude/commands/cc/review.md +78 -16
  67. package/presets/claude/commands/cc/scorecard.md +12 -0
  68. package/presets/claude/commands/cc/tdd-cycle.md +53 -3
  69. package/presets/claude/commands/cc/test-plan.md +12 -0
  70. package/presets/claude/commands/cc/triage.md +34 -0
  71. package/presets/claude/gates/pre-commit/GATE.md +136 -0
  72. package/presets/claude/settings.json +8 -46
  73. package/presets/codex/AGENTS.md +6 -6
  74. package/presets/codex/commands/cc-ask.md +55 -0
  75. package/presets/codex/gates/pre-commit/GATE.md +136 -0
  76. package/presets/cursor/AGENTS.md +6 -6
  77. package/presets/cursor/agents/business-agent.md +44 -0
  78. package/presets/cursor/agents/continuous-architect.md +37 -0
  79. package/presets/cursor/agents/docs.md +1 -0
  80. package/presets/cursor/agents/goal-planner.md +1 -1
  81. package/presets/cursor/agents/impact-analyst.md +43 -0
  82. package/presets/cursor/agents/orchestrator.md +6 -6
  83. package/presets/cursor/commands/cc/api-contract.md +12 -0
  84. package/presets/cursor/commands/cc/ask.md +55 -0
  85. package/presets/cursor/commands/cc/clarify.md +32 -0
  86. package/presets/cursor/commands/cc/council.md +87 -0
  87. package/presets/cursor/commands/cc/db-migration.md +22 -9
  88. package/presets/cursor/commands/cc/explore.md +36 -0
  89. package/presets/cursor/commands/cc/feature.md +41 -19
  90. package/presets/cursor/commands/cc/fix.md +47 -20
  91. package/presets/cursor/commands/cc/handoff.md +41 -0
  92. package/presets/cursor/commands/cc/iterative.md +133 -0
  93. package/presets/cursor/commands/cc/openspec.md +22 -7
  94. package/presets/cursor/commands/cc/pagespeed.md +12 -0
  95. package/presets/cursor/commands/cc/prototype.md +38 -0
  96. package/presets/cursor/commands/cc/refactor.md +12 -0
  97. package/presets/cursor/commands/cc/review.md +12 -0
  98. package/presets/cursor/commands/cc/scorecard.md +12 -0
  99. package/presets/cursor/commands/cc/tdd-cycle.md +24 -0
  100. package/presets/cursor/commands/cc/test-plan.md +12 -0
  101. package/presets/cursor/commands/cc/triage.md +34 -0
  102. package/presets/cursor/gates/pre-commit/GATE.md +136 -0
  103. package/presets/cursor/rules/orchestration.mdc +1 -1
  104. package/presets/opencode/agents/architect.md +22 -1
  105. package/presets/opencode/agents/complexity-auditor.md +16 -1
  106. package/presets/opencode/agents/contract-builder.md +17 -1
  107. package/presets/opencode/agents/devil.md +158 -0
  108. package/presets/opencode/agents/docs.md +19 -1
  109. package/presets/opencode/agents/goal-planner.md +32 -2
  110. package/presets/opencode/agents/implementer.md +32 -2
  111. package/presets/opencode/agents/orchestrator.md +79 -12
  112. package/presets/opencode/agents/planner.md +61 -0
  113. package/presets/opencode/agents/repo-explorer.md +16 -0
  114. package/presets/opencode/agents/reviewer.md +33 -3
  115. package/presets/opencode/agents/security-reviewer.md +31 -1
  116. package/presets/opencode/agents/task-coach.md +69 -1
  117. package/presets/opencode/agents/tester.md +18 -1
  118. package/presets/opencode/commands/cc-api-contract.md +12 -0
  119. package/presets/opencode/commands/cc-ask.md +55 -0
  120. package/presets/opencode/commands/cc-clarify.md +31 -0
  121. package/presets/opencode/commands/cc-council.md +87 -0
  122. package/presets/opencode/commands/cc-db-migration.md +22 -9
  123. package/presets/opencode/commands/cc-explore.md +35 -0
  124. package/presets/opencode/commands/cc-feature.md +41 -19
  125. package/presets/opencode/commands/cc-fix.md +50 -23
  126. package/presets/opencode/commands/cc-handoff.md +40 -0
  127. package/presets/opencode/commands/cc-iterative.md +127 -0
  128. package/presets/opencode/commands/cc-openspec.md +13 -0
  129. package/presets/opencode/commands/cc-pagespeed.md +12 -0
  130. package/presets/opencode/commands/cc-prototype.md +37 -0
  131. package/presets/opencode/commands/cc-refactor.md +12 -0
  132. package/presets/opencode/commands/cc-review.md +12 -0
  133. package/presets/opencode/commands/cc-scorecard.md +12 -0
  134. package/presets/opencode/commands/cc-tdd-cycle.md +24 -0
  135. package/presets/opencode/commands/cc-test-plan.md +12 -0
  136. package/presets/opencode/commands/cc-triage.md +33 -0
  137. package/presets/opencode/gates/pre-commit/GATE.md +136 -0
  138. package/presets/opencode/prompts/v0.1.0/DEPRECATED.md +11 -0
  139. package/presets/opencode/prompts/v0.2.0/DEPRECATED.md +11 -0
  140. package/presets/opencode/prompts/v0.3.0/DEPRECATED.md +11 -0
  141. package/presets/opencode/prompts/v0.4.0/DEPRECATED.md +11 -0
  142. package/presets/opencode/prompts/v0.5.0/goal-planner.md +1 -1
  143. package/presets/opencode/prompts/v0.5.0/orchestrator.md +6 -6
  144. package/presets/opencode/prompts/v0.6.0/implementer.md +35 -0
  145. package/presets/opencode/prompts/v0.6.0/planner.md +36 -0
  146. package/presets/opencode/prompts/v0.6.0/reviewer.md +40 -0
  147. package/presets/opencode/prompts/v1.0.0/README.md +47 -0
  148. package/presets/opencode/prompts/v1.0.0/architect.md +259 -0
  149. package/presets/opencode/prompts/v1.0.0/complexity-auditor.md +116 -0
  150. package/presets/opencode/prompts/v1.0.0/contract-builder.md +120 -0
  151. package/presets/opencode/prompts/v1.0.0/devil.md +169 -0
  152. package/presets/opencode/prompts/v1.0.0/docs.md +229 -0
  153. package/presets/opencode/prompts/v1.0.0/goal-planner.md +123 -0
  154. package/presets/opencode/prompts/v1.0.0/implementer.md +228 -0
  155. package/presets/opencode/prompts/v1.0.0/orchestrator.md +474 -0
  156. package/presets/opencode/prompts/v1.0.0/planner.md +72 -0
  157. package/presets/opencode/prompts/v1.0.0/repo-explorer.md +147 -0
  158. package/presets/opencode/prompts/v1.0.0/reviewer.md +295 -0
  159. package/presets/opencode/prompts/v1.0.0/security-reviewer.md +170 -0
  160. package/presets/opencode/prompts/v1.0.0/task-coach.md +235 -0
  161. package/presets/opencode/prompts/v1.0.0/tester.md +298 -0
  162. package/presets/seo-hotel/settings.json +0 -17
  163. package/src/presets/manifests/agy.yml +2 -2
  164. package/src/presets/manifests/claude.yml +2 -2
  165. package/src/presets/manifests/codex.yml +2 -2
  166. package/src/presets/manifests/cursor.yml +2 -2
  167. package/src/presets/manifests/gemini.yml +2 -2
  168. package/src/presets/manifests/opencode.yml +2 -2
  169. package/src/presets/models/agy.yml +93 -66
  170. package/src/presets/models/claude.yml +79 -53
  171. package/src/presets/models/codex.yml +79 -54
  172. package/src/presets/models/cursor.yml +72 -58
  173. package/src/presets/models/gemini.yml +79 -53
  174. package/src/presets/models/opencode.yml +72 -46
@@ -2,7 +2,7 @@
2
2
  name: cc-fix
3
3
  description:
4
4
  Run the bug fix workflow — risk-based routing through task validation,
5
- implementation, testing, and optional review.
5
+ testing, implementation, and optional review.
6
6
  ---
7
7
 
8
8
  # Bug Fix Workflow
@@ -19,7 +19,29 @@ Provide the following information in $ARGUMENTS:
19
19
 
20
20
  ---
21
21
 
22
- ## Step 1Task Card validation (task-coach)
22
+ ## Step 0CCEP Bootstrap
23
+
24
+ Command: `fix` (fixed for this workflow — do not infer from user text)
25
+
26
+ 1. Run: `npx cc-codeconductor ccep parse --command fix "$ARGUMENTS" --output json`
27
+ 2. Run: `npx cc-codeconductor ccep resolve --command fix "$ARGUMENTS" --output json`
28
+ 3. Run: `npx cc-codeconductor ccep profile fix --output json`
29
+ 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.
30
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
31
+ Canonical delivery order is test-before-implement whenever both phases apply.
32
+
33
+ ---
34
+
35
+ ## Step 1 — Wayfinding (repo-explorer)
36
+
37
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
38
+ `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
39
+ to map modules, conventions, and impact radius. Do not write code in this step.
40
+ Record a Repo Map artifact before intake.
41
+
42
+ ---
43
+
44
+ ## Step 2 — Task Card validation (task-coach)
23
45
 
24
46
  Invoke `task-coach` with the bug description above.
25
47
 
@@ -34,11 +56,16 @@ If reproduction steps are missing, task-coach must ask for them before
34
56
  classifying risk. A bug without a reproduction path cannot be classified
35
57
  reliably.
36
58
 
59
+ Capture evidence before tests: reproduction, logs or stack traces, and one
60
+ falsifiable hypothesis of the root cause. Do not patch without that evidence.
61
+ Redact secrets, tokens, and credential dumps from logs before they enter the
62
+ Task Card. Summarize stack traces; do not paste env files.
63
+
37
64
  **STOP here. Show the Task Card and wait for human confirmation.**
38
65
 
39
66
  ---
40
67
 
41
- ## Step 2 — Route by risk
68
+ ## Step 3 — Route by risk
42
69
 
43
70
  Read the risk field from the Task Card and follow the corresponding route.
44
71
 
@@ -47,16 +74,16 @@ Read the risk field from the Task Card and follow the corresponding route.
47
74
  Applies when: the bug is isolated to a single component, existing tests cover
48
75
  the affected code, and no public API or shared state is involved.
49
76
 
50
- Route: `task-coach` → `implementer` → `tester`
77
+ Route: `task-coach` → `tester` → `implementer`
51
78
 
52
- Proceed directly to Step 3a.
79
+ Proceed directly to Step 3 (tests), then Step 4a.
53
80
 
54
81
  ### Medium or high-risk route
55
82
 
56
83
  Applies when: the bug touches shared state, a public API, auth or payment paths,
57
84
  database writes, or the root cause is not yet understood.
58
85
 
59
- Route: `task-coach` → `architect` → `implementer` → `tester` → `reviewer`
86
+ Route: `task-coach` → `architect` → `tester` → `implementer` → `reviewer`
60
87
 
61
88
  Invoke `architect` before implementation. architect must:
62
89
 
@@ -70,7 +97,20 @@ before continuing.**
70
97
 
71
98
  ---
72
99
 
73
- ## Step 3aImplementation, low-risk (implementer)
100
+ ## Step 4Regression tests (tester)
101
+
102
+ Invoke `tester` for all risk levels.
103
+
104
+ tester must:
105
+
106
+ 1. Write a regression test that reproduces the original bug and confirm it fails
107
+ before any fix (RED)
108
+ 2. Verify that existing tests still pass
109
+ 3. Produce a Coverage Summary: test added, case covered
110
+
111
+ ---
112
+
113
+ ## Step 5a — Implementation, low-risk (implementer)
74
114
 
75
115
  Invoke `implementer` with the Task Card.
76
116
  Implementer creates a Git Worktree before touching any file; all edits happen inside it.
@@ -79,12 +119,12 @@ implementer must:
79
119
 
80
120
  1. Locate the defect using the reproduction steps
81
121
  2. Apply the minimal fix — no unrelated changes
82
- 3. Run the test suite
122
+ 3. Run the suite and make the RED regression test pass
83
123
  4. Produce an Implementation Summary: root cause, fix applied, files changed
84
124
 
85
125
  ---
86
126
 
87
- ## Step 3b — Implementation, medium/high-risk (implementer)
127
+ ## Step 5b — Implementation, medium/high-risk (implementer)
88
128
 
89
129
  Invoke `implementer` with the approved Technical Plan and the Task Card.
90
130
  Implementer creates a Git Worktree before touching any file; all edits happen inside it.
@@ -94,20 +134,7 @@ Plan approval. After implementation, run the full test suite.
94
134
 
95
135
  ---
96
136
 
97
- ## Step 4Regression tests (tester)
98
-
99
- Invoke `tester` for all risk levels.
100
-
101
- tester must:
102
-
103
- 1. Write a regression test that reproduces the original bug (fails before the
104
- fix, passes after)
105
- 2. Verify that existing tests still pass
106
- 3. Produce a Coverage Summary: test added, case covered
107
-
108
- ---
109
-
110
- ## Step 5 — Review (reviewer) — medium/high-risk only
137
+ ## Step 6Review (reviewer) — medium/high-risk only
111
138
 
112
139
  Invoke `reviewer` with the diff and Task Card.
113
140
 
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: cc-handoff
3
+ description:
4
+ Compact the session into gitignored `.codeconductor/sessions/handoff.md` (redact secrets).
5
+ ---
6
+
7
+ # Handoff Workflow
8
+
9
+ Handoff request: $ARGUMENTS
10
+
11
+ ## Step 0 — CCEP Bootstrap
12
+
13
+ Command: `handoff` (fixed for this workflow — do not infer from user text)
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command handoff "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command handoff "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile handoff --output json`
18
+ 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.
19
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
20
+
21
+ ---
22
+
23
+ ## Step 1 — Compact (docs)
24
+
25
+ Invoke `docs`. Write **only** `.codeconductor/sessions/handoff.md` (gitignored).
26
+ Do not write `.codeconductor/handoff.md` or any tracked path.
27
+
28
+ Before writing, redact secrets, tokens, API keys, passwords, connection strings,
29
+ `.env` contents, and log/stack-trace lines that embed those values. Summarize
30
+ errors instead of pasting dumps. If unresolved credential material remains, stop
31
+ and wait for a human (CCEP `stopOnHighRisk`).
32
+
33
+ Include: goal, Task Card status (no secret fields), files touched, test
34
+ pass/fail (not log dumps), open questions, and the next `/cc:` command.
35
+
36
+ Do not edit source or tests.
37
+
38
+ ---
39
+
40
+ ## Completion
41
+
42
+ Report the handoff path. Another session should be able to continue from that file alone.
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: cc-iterative
3
+ description:
4
+ Run the advanced iterative workflow — Wayfinding AST discovery, Relentless
5
+ Grilling, contract and spec design, TDD, council review, and docs.
6
+ ---
7
+
8
+ # Advanced Iterative Workflow
9
+
10
+ Iterative request: $ARGUMENTS
11
+
12
+ ## Step 0 — CCEP Bootstrap
13
+
14
+ Command: `iterative` (fixed for this workflow — do not infer from user text)
15
+
16
+ 1. Run: `npx cc-codeconductor ccep parse --command iterative "$ARGUMENTS" --output json`
17
+ 2. Run: `npx cc-codeconductor ccep resolve --command iterative "$ARGUMENTS" --output json`
18
+ 3. Run: `npx cc-codeconductor ccep profile iterative --output json`
19
+ 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.
20
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
21
+ Canonical delivery order is test-before-implement whenever both phases apply.
22
+
23
+ ---
24
+
25
+ ## Step 1 — Wayfinding (repo-explorer)
26
+
27
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
28
+ `graphify path` / `graphify explain` when two modules or one concept need a
29
+ scoped subgraph). Then invoke `repo-explorer` with that graph output.
30
+
31
+ repo-explorer maps directory trees, conventions, god nodes, and affected
32
+ modules. Do not write code in this step. Write a short phase handoff (scope,
33
+ files, open questions) before the next phase — do not chain agents on unspoken
34
+ context.
35
+
36
+ ---
37
+
38
+ ## Step 2 — Relentless Grilling & Task Card (task-coach)
39
+
40
+ Invoke `task-coach` using the Grilling protocol to stress-test all assumptions.
41
+
42
+ The Task Card is ready when it contains: title, type, risk classification,
43
+ scope, context, acceptance criteria, and constraints, and every assumption
44
+ behind it has survived one grilling question.
45
+
46
+ If any field is missing or ambiguous, ask one clarifying question at a time and
47
+ wait for the answer. Do not proceed with an incomplete Task Card.
48
+
49
+ **STOP here.** Unresolved grilling questions or missing fields populate
50
+ `questionsForUser` in the CCEP-1 `planner-output`; the `ConfirmationGate`
51
+ (`ccep evaluate`) reads that field and halts the workflow until a human
52
+ answers. Show the completed Task Card and wait for that confirmation before
53
+ continuing.
54
+
55
+ ---
56
+
57
+ ## Step 3 — Contract & Technical Plan (contract-builder & architect)
58
+
59
+ Invoke `contract-builder` then `architect` with the validated Task Card.
60
+
61
+ 1. Define API contracts, JSON Schemas, or TypeScript interfaces.
62
+ 2. Formulate the Technical Plan (chosen approach, affected files, trade-offs).
63
+ 3. Apply YAGNI, Simplicity First, and Stdlib-First.
64
+
65
+ **STOP here. Show the Technical Plan and wait for explicit human approval. Do
66
+ not invoke implementer until the plan is approved.**
67
+
68
+ ---
69
+
70
+ ## Step 4 — Test coverage (tester)
71
+
72
+ Invoke `tester` with the Task Card and Technical Plan.
73
+
74
+ 1. Write or extend failing tests for the new behavior before implementation (RED).
75
+ 2. Ensure all acceptance criteria from the Task Card have at least one test.
76
+ 3. Produce a Test Report: test files added or modified, cases covered.
77
+
78
+ ---
79
+
80
+ ## Step 5 — Implementation (implementer)
81
+
82
+ Invoke `implementer` with the approved Technical Plan, contracts, and failing
83
+ tests. Implementer creates a Git Worktree before touching any file; all edits
84
+ happen inside it.
85
+
86
+ 1. Read the Technical Plan before touching any file.
87
+ 2. Apply the minimal diff — only what the plan specifies.
88
+ 3. Run the project test suite and make the previously written failing tests pass.
89
+ 4. If tests fail, run up to 3 repair cycles (`implementer` → `tester`).
90
+ 5. Produce an Implementation Summary: what changed, which files, how to verify
91
+ locally.
92
+
93
+ ---
94
+
95
+ ## Step 6 — Multi-Perspective Council Review
96
+
97
+ Invoke the `council` skill on the generated diff (`council-review` phase).
98
+
99
+ The council evaluates Architecture, Security, Product, Delivery, DataOps, and
100
+ Devil. `security-reviewer` may set `securityVeto: true`; that REJECTED verdict
101
+ overrides majority consensus.
102
+
103
+ If ANY agent votes CRITICAL:
104
+ - The Review Report status is **BLOCKED**.
105
+ - Return to Step 5 with the feedback.
106
+
107
+ If APPROVED (no CRITICAL findings), continue.
108
+
109
+ ---
110
+
111
+ ## Step 7 — Documentation (docs)
112
+
113
+ Invoke `docs` when a public API, public module, or user-visible behavior
114
+ changed.
115
+
116
+ Update: README (if applicable), OpenAPI spec (if applicable), CHANGELOG
117
+ (always when implementation changed), ADR (if an architectural decision was
118
+ made).
119
+
120
+ If `graphify-out/` is in use, run `graphify update .` (AST-only).
121
+
122
+ ---
123
+
124
+ ## Completion
125
+
126
+ The iterative workflow is complete only when: all tests pass, the council
127
+ approves the spec and the diff, no CRITICAL findings remain, and documentation
128
+ and the knowledge graph reflect the implemented behavior.
@@ -17,6 +17,19 @@ Run `npx cc-codeconductor openspec validate`. If invalid, show errors and recomm
17
17
 
18
18
  ---
19
19
 
20
+ ## Step 0 — CCEP Bootstrap
21
+
22
+ Command: `openspec` (fixed for this workflow — do not infer from user text)
23
+
24
+ 1. Run: `npx cc-codeconductor ccep parse --command openspec "$ARGUMENTS" --output json`
25
+ 2. Run: `npx cc-codeconductor ccep resolve --command openspec "$ARGUMENTS" --output json`
26
+ 3. Run: `npx cc-codeconductor ccep profile openspec --output json`
27
+ 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.
28
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
29
+ Canonical delivery order is test-before-implement whenever both phases apply.
30
+
31
+ ---
32
+
20
33
  ## Step 1 — Scan
21
34
 
22
35
  Run `npx cc-codeconductor openspec scan`. Report new, modified, and closed items.
@@ -11,6 +11,18 @@ Audit URL: $ARGUMENTS
11
11
 
12
12
  ---
13
13
 
14
+ ## Step 0 — CCEP Bootstrap
15
+
16
+ Command: `pagespeed` (fixed for this workflow — do not infer from user text)
17
+
18
+ 1. Run: `npx cc-codeconductor ccep parse --command pagespeed "$ARGUMENTS" --output json`
19
+ 2. Run: `npx cc-codeconductor ccep resolve --command pagespeed "$ARGUMENTS" --output json`
20
+ 3. Run: `npx cc-codeconductor ccep profile pagespeed --output json`
21
+ 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.
22
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
23
+
24
+ ---
25
+
14
26
  ## Step 1 — Pre-flight (pagespeed-perf skill)
15
27
 
16
28
  Invoke `pagespeed-perf` skill.
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: cc-prototype
3
+ description:
4
+ Disposable spike in an isolated worktree. Not a merge candidate.
5
+ ---
6
+
7
+ # Prototype Workflow
8
+
9
+ Prototype request: $ARGUMENTS
10
+
11
+ ## Step 0 — CCEP Bootstrap
12
+
13
+ Command: `prototype` (fixed for this workflow — do not infer from user text)
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command prototype "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command prototype "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile prototype --output json`
18
+ 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.
19
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
20
+
21
+ ---
22
+
23
+ ## Step 1 — Bounds (architect)
24
+
25
+ Invoke `architect`. Define what the spike may touch, time-box, and what must not leak into main. Do not treat this as a production Technical Plan.
26
+
27
+ **STOP here. Wait for approval of the spike bounds.**
28
+
29
+ ---
30
+
31
+ ## Step 2 — Spike (implementer)
32
+
33
+ Invoke `implementer` in a Git worktree that is not a merge candidate. Label the Implementation Summary as disposable. Do not open a PR against protected branches.
34
+
35
+ ---
36
+
37
+ ## Completion
38
+
39
+ Report bounds, worktree path, and what was learned. Recommend `/cc:feature` or `/cc:fix` if the spike should become real work.
@@ -34,6 +34,18 @@ If coverage is insufficient:
34
34
 
35
35
  ---
36
36
 
37
+ ## Step 0 — CCEP Bootstrap
38
+
39
+ Command: `refactor` (fixed for this workflow — do not infer from user text)
40
+
41
+ 1. Run: `npx cc-codeconductor ccep parse --command refactor "$ARGUMENTS" --output json`
42
+ 2. Run: `npx cc-codeconductor ccep resolve --command refactor "$ARGUMENTS" --output json`
43
+ 3. Run: `npx cc-codeconductor ccep profile refactor --output json`
44
+ 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.
45
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
46
+
47
+ ---
48
+
37
49
  ## Step 1 — Architectural justification (architect)
38
50
 
39
51
  Always invoke `architect` first, regardless of risk level. A refactor without a
@@ -18,6 +18,18 @@ Specify what to review. Accepted formats:
18
18
 
19
19
  ---
20
20
 
21
+ ## Step 0 — CCEP Bootstrap
22
+
23
+ Command: `review` (fixed for this workflow — do not infer from user text)
24
+
25
+ 1. Run: `npx cc-codeconductor ccep parse --command review "$ARGUMENTS" --output json`
26
+ 2. Run: `npx cc-codeconductor ccep resolve --command review "$ARGUMENTS" --output json`
27
+ 3. Run: `npx cc-codeconductor ccep profile review --output json`
28
+ 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.
29
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
30
+
31
+ ---
32
+
21
33
  ## Step 1 — Diff collection
22
34
 
23
35
  Before invoking `reviewer`, collect the diff for the specified target.
@@ -8,6 +8,18 @@ description:
8
8
 
9
9
  Scope: $ARGUMENTS
10
10
 
11
+ ## Step 0 — CCEP Bootstrap
12
+
13
+ Command: `scorecard` (fixed for this workflow — do not infer from user text)
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command scorecard "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command scorecard "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile scorecard --output json`
18
+ 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.
19
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
20
+
21
+ ---
22
+
11
23
  1. `npx cc-codeconductor scorecard create --task <id> --from-diff`
12
24
  2. Complete criteria per docs/agent-scorecard.md
13
25
  3. `scorecard regression` if needed
@@ -18,6 +18,19 @@ Describe what behavior you want to implement. Include:
18
18
 
19
19
  ---
20
20
 
21
+ ## Step 0 — CCEP Bootstrap
22
+
23
+ Command: `tdd-cycle` (fixed for this workflow — do not infer from user text)
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.
30
+ Canonical delivery order is test-before-implement whenever both phases apply.
31
+
32
+ ---
33
+
21
34
  ## Before you begin — mandatory pre-check
22
35
 
23
36
  This command enforces strict TDD discipline. The three phases are sequential and
@@ -30,6 +43,17 @@ non-negotiable:
30
43
  Do not write implementation code during RED. Do not refactor during GREEN.
31
44
  Mixing phases invalidates the cycle.
32
45
 
46
+ ## Verifiable phase gates
47
+
48
+ RED → GREEN and GREEN → REFACTOR are enforced by `tddCycleStateMachine` in
49
+ `domain/loop`. Evidence must be captured with `captureTddSuiteEvidence` (verification
50
+ runner) — do not hand-edit JSON under `.codeconductor/evidence/`.
51
+
52
+ - RED→GREEN requires runner evidence that the suite **failed**.
53
+ - GREEN→REFACTOR requires runner evidence that the suite **passed**.
54
+
55
+ Do not advance phases until that evidence exists.
56
+
33
57
  ---
34
58
 
35
59
  ## Phase 1 — RED (Tester role)
@@ -21,6 +21,18 @@ If $ARGUMENTS is empty, describe the scope in your next message before invoking
21
21
 
22
22
  ---
23
23
 
24
+ ## Step 0 — CCEP Bootstrap
25
+
26
+ Command: `test-plan` (fixed for this workflow — do not infer from user text)
27
+
28
+ 1. Run: `npx cc-codeconductor ccep parse --command test-plan "$ARGUMENTS" --output json`
29
+ 2. Run: `npx cc-codeconductor ccep resolve --command test-plan "$ARGUMENTS" --output json`
30
+ 3. Run: `npx cc-codeconductor ccep profile test-plan --output json`
31
+ 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.
32
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
33
+
34
+ ---
35
+
24
36
  ## Step 1 — Scope confirmation
25
37
 
26
38
  Before invoking `tester`, confirm the scope is well-defined.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: cc-triage
3
+ description:
4
+ Classify a request into type, risk, and the destination CodeConductor command.
5
+ ---
6
+
7
+ # Triage Workflow
8
+
9
+ Triage request: $ARGUMENTS
10
+
11
+ ## Step 0 — CCEP Bootstrap
12
+
13
+ Command: `triage` (fixed for this workflow — do not infer from user text)
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command triage "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command triage "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile triage --output json`
18
+ 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.
19
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
20
+
21
+ ---
22
+
23
+ ## Step 1 — Classify (task-coach)
24
+
25
+ Invoke `task-coach`. Produce: title, type (`feature` | `fix` | `refactor` | `review` | `docs` | `test`), risk, named scope, and the destination command (`feature`, `fix`, `refactor`, `review`, `explore`, …).
26
+
27
+ Ask one question per unresolved branch. If the human is unavailable, emit a Markdown questionnaire and stop at ConfirmationGate.
28
+
29
+ **STOP here. Show the classification and wait for confirmation before running the destination workflow.**
30
+
31
+ ---
32
+
33
+ ## Completion
34
+
35
+ Do not implement. Hand the human a destination slash command and a partial Task Card.
@@ -384,6 +384,20 @@ contract tests. Does not write production code.
384
384
  - Cover three cases for every behavior: happy path, edge case, error case.
385
385
  - Test names must describe what is being tested and the expected outcome.
386
386
 
387
+ **Anti-pattern checklist** — before declaring tests ready, verify none of
388
+ these apply:
389
+
390
+ - **Implementation-coupled** — the test asserts internal implementation
391
+ details (private state, call order, mock invocations) instead of observable
392
+ behavior. It breaks when the implementation is refactored even if the
393
+ behavior is unchanged.
394
+ - **Tautological** — the test asserts something that cannot fail given the
395
+ test's own setup (e.g., asserting a value the test itself just hardcoded).
396
+ It always passes regardless of the code under test.
397
+ - **Horizontal slicing** — the test spans multiple unrelated behaviors or
398
+ layers in one assertion block instead of a single vertical slice of one
399
+ behavior.
400
+
387
401
  **Test types:**
388
402
 
389
403
  | Type | When to write |
@@ -494,6 +508,56 @@ _(none)_ if no suggestions
494
508
  - **Verdict justification**: [one sentence]
495
509
  ```
496
510
 
511
+
512
+ **Two-Axis Review Model (Standards + Spec)**
513
+
514
+ The Reviewer role executes two independent, parallel sub-agents without reranking between them:
515
+
516
+ 1.
517
+
518
+ _El modelo de dos ejes (Standards, Spec) es la estructura de ejecución de `/cc:review`; los review axes listados en la tabla anterior se aplican DENTRO de cada eje._ **Standards Axis** — Code smell detection against the Fowler baseline (Long Method, Large Class, Duplicated Code, Feature Envy, Shotgun Surgery, Primitive Obsession, Data Clumps, Switch Statements, Speculative Generality, Temporary Fields, Message Chains, Middle Man, Inappropriate Intimacy, Data Class, Comments-as-apology), with documented override allowed via repo standards documentation (e.g., CONTEXT.md or project norms).
519
+
520
+ 2. **Spec Axis** — Alignment with Task Card, acceptance criteria, and scope boundaries.
521
+
522
+ Each axis produces findings independently. **No reranking** occurs between axes — each axis is evaluated in parallel and its findings remain independent. After parallel execution, a **combined verdict** integrates findings from both axes:
523
+
524
+ - If either axis finds CRITICAL issues → verdict is `blocked`
525
+ - Else if either axis finds WARNING → verdict is `approved with warnings`
526
+ - Else → verdict is `approved`
527
+
528
+ **Two-Axis Review Report format:**
529
+
530
+ ```markdown
531
+ ## Review Report
532
+
533
+ **Task**: [objective from Task Card] **Verdict**: [approved | approved with warnings | blocked]
534
+
535
+ ---
536
+
537
+ ### Standards Axis
538
+
539
+ Applies Fowler code smell baseline with documented overrides.
540
+
541
+ - [ ] [S1] [file:line] — [code smell] | Override: [documented or N/A] | Required action: [what must change] (CRITICAL) or Recommended action: [what must change] (WARNING)
542
+
543
+ _(none)_ if no findings
544
+
545
+ ### Spec Axis
546
+
547
+ Validates Task Card, acceptance criteria, and scope alignment.
548
+
549
+ - [ ] [Sp1] [criterion number] — [description] | Evidence: [quote] | Required action: [what must change] (CRITICAL) or Recommended action: [what must change] (WARNING)
550
+
551
+ _(none)_ if no findings
552
+
553
+ ### Combined Summary
554
+
555
+ - Standards findings: [count] (X CRITICAL, Y WARNING, Z SUGGESTION)
556
+ - Spec findings: [count] (X CRITICAL, Y WARNING, Z SUGGESTION)
557
+ - **Combined Verdict**: [approved | approved with warnings | blocked]
558
+ - **Verdict justification**: [one sentence]
559
+ ```
560
+
497
561
  ---
498
562
 
499
563
  ### Complexity Auditor
@@ -8,6 +8,18 @@ description: >-
8
8
 
9
9
  API contract request: $ARGUMENTS
10
10
 
11
+ ## Step 0 — CCEP Bootstrap
12
+
13
+ Command: `api-contract` (fixed for this workflow — do not infer from user text)
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command api-contract "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command api-contract "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile api-contract --output json`
18
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command api-contract --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.
20
+
21
+ ---
22
+
11
23
  ## Step 1 — Task Card validation (Task Coach role)
12
24
 
13
25
  Adopt the **Task Coach** role as defined in `CLAUDE.md`.