cc-codeconductor 0.5.0 → 1.1.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 (268) hide show
  1. package/README.md +387 -150
  2. package/dist/cli/errors.d.ts +65 -0
  3. package/dist/core/compilation/compile-checker.d.ts +53 -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 +82 -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 +24165 -15800
  23. package/dist/library.js +2744 -0
  24. package/dist/utils/result.d.ts +36 -0
  25. package/dist/validation/schemas.d.ts +4006 -0
  26. package/package.json +18 -2
  27. package/policy.yml +12 -11
  28. package/presets/agy/AGENTS.md +14 -5
  29. package/presets/agy/gates/pre-commit/GATE.md +137 -0
  30. package/presets/agy/skills/backlog/SKILL.md +91 -0
  31. package/presets/agy/skills/cc-fix/SKILL.md +2 -2
  32. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +11 -0
  33. package/presets/agy/skills/openspec/SKILL.md +5 -1
  34. package/presets/agy/skills/security-ai-llm/SKILL.md +43 -0
  35. package/presets/agy/skills/security-blue-team/SKILL.md +43 -0
  36. package/presets/agy/skills/security-cloud/SKILL.md +43 -0
  37. package/presets/agy/skills/security-crypto/SKILL.md +43 -0
  38. package/presets/agy/skills/security-exploit-dev/SKILL.md +45 -0
  39. package/presets/agy/skills/security-grc/SKILL.md +43 -0
  40. package/presets/agy/skills/security-incident-response/SKILL.md +45 -0
  41. package/presets/agy/skills/security-log-analysis/SKILL.md +43 -0
  42. package/presets/agy/skills/security-malware-analysis/SKILL.md +44 -0
  43. package/presets/agy/skills/security-mobile/SKILL.md +43 -0
  44. package/presets/agy/skills/security-network/SKILL.md +43 -0
  45. package/presets/agy/skills/security-ot-ics/SKILL.md +43 -0
  46. package/presets/agy/skills/security-recon/SKILL.md +45 -0
  47. package/presets/agy/skills/security-red-team/SKILL.md +44 -0
  48. package/presets/agy/skills/security-reverse-engineering/SKILL.md +44 -0
  49. package/presets/agy/skills/security-soc-automation/SKILL.md +43 -0
  50. package/presets/agy/skills/security-threat-hunting/SKILL.md +43 -0
  51. package/presets/agy/skills/security-vuln-assessment/SKILL.md +45 -0
  52. package/presets/agy/skills/security-web/SKILL.md +44 -0
  53. package/presets/agy/workflows/cc-api-contract.md +12 -0
  54. package/presets/agy/workflows/cc-ask.md +56 -0
  55. package/presets/agy/workflows/cc-backlog.md +69 -0
  56. package/presets/agy/workflows/cc-clarify.md +33 -0
  57. package/presets/agy/workflows/cc-council.md +31 -7
  58. package/presets/agy/workflows/cc-db-migration.md +22 -9
  59. package/presets/agy/workflows/cc-explore.md +37 -0
  60. package/presets/agy/workflows/cc-feature.md +41 -19
  61. package/presets/agy/workflows/cc-fix.md +50 -23
  62. package/presets/agy/workflows/cc-handoff.md +42 -0
  63. package/presets/agy/workflows/cc-iterative.md +128 -0
  64. package/presets/agy/workflows/cc-openspec.md +16 -1
  65. package/presets/agy/workflows/cc-pagespeed.md +12 -0
  66. package/presets/agy/workflows/cc-prototype.md +39 -0
  67. package/presets/agy/workflows/cc-refactor.md +12 -0
  68. package/presets/agy/workflows/cc-review.md +12 -0
  69. package/presets/agy/workflows/cc-scorecard.md +12 -0
  70. package/presets/agy/workflows/cc-security.md +180 -0
  71. package/presets/agy/workflows/cc-tdd-cycle.md +24 -0
  72. package/presets/agy/workflows/cc-test-plan.md +12 -0
  73. package/presets/agy/workflows/cc-triage.md +35 -0
  74. package/presets/claude/CLAUDE.md +68 -0
  75. package/presets/claude/commands/cc/api-contract.md +12 -0
  76. package/presets/claude/commands/cc/ask.md +56 -0
  77. package/presets/claude/commands/cc/backlog.md +104 -0
  78. package/presets/claude/commands/cc/clarify.md +32 -0
  79. package/presets/claude/commands/cc/council.md +87 -0
  80. package/presets/claude/commands/cc/db-migration.md +22 -9
  81. package/presets/claude/commands/cc/explore.md +36 -0
  82. package/presets/claude/commands/cc/feature.md +49 -22
  83. package/presets/claude/commands/cc/fix.md +74 -20
  84. package/presets/claude/commands/cc/handoff.md +44 -0
  85. package/presets/claude/commands/cc/iterative.md +132 -0
  86. package/presets/claude/commands/cc/openspec.md +41 -1
  87. package/presets/claude/commands/cc/pagespeed.md +12 -0
  88. package/presets/claude/commands/cc/prototype.md +38 -0
  89. package/presets/claude/commands/cc/refactor.md +152 -1
  90. package/presets/claude/commands/cc/review.md +78 -16
  91. package/presets/claude/commands/cc/scorecard.md +12 -0
  92. package/presets/claude/commands/cc/security.md +179 -0
  93. package/presets/claude/commands/cc/tdd-cycle.md +53 -3
  94. package/presets/claude/commands/cc/test-plan.md +12 -0
  95. package/presets/claude/commands/cc/triage.md +34 -0
  96. package/presets/claude/gates/pre-commit/GATE.md +137 -0
  97. package/presets/claude/settings.json +8 -46
  98. package/presets/claude/skills/backlog/SKILL.md +91 -0
  99. package/presets/claude/skills/openspec/SKILL.md +5 -1
  100. package/presets/claude/skills/security/SKILL.md +382 -0
  101. package/presets/claude/skills/security-ai-llm/SKILL.md +43 -0
  102. package/presets/claude/skills/security-blue-team/SKILL.md +43 -0
  103. package/presets/claude/skills/security-cloud/SKILL.md +43 -0
  104. package/presets/claude/skills/security-crypto/SKILL.md +43 -0
  105. package/presets/claude/skills/security-exploit-dev/SKILL.md +45 -0
  106. package/presets/claude/skills/security-grc/SKILL.md +43 -0
  107. package/presets/claude/skills/security-incident-response/SKILL.md +45 -0
  108. package/presets/claude/skills/security-log-analysis/SKILL.md +43 -0
  109. package/presets/claude/skills/security-malware-analysis/SKILL.md +44 -0
  110. package/presets/claude/skills/security-mobile/SKILL.md +43 -0
  111. package/presets/claude/skills/security-network/SKILL.md +43 -0
  112. package/presets/claude/skills/security-ot-ics/SKILL.md +43 -0
  113. package/presets/claude/skills/security-recon/SKILL.md +45 -0
  114. package/presets/claude/skills/security-red-team/SKILL.md +44 -0
  115. package/presets/claude/skills/security-reverse-engineering/SKILL.md +44 -0
  116. package/presets/claude/skills/security-soc-automation/SKILL.md +43 -0
  117. package/presets/claude/skills/security-threat-hunting/SKILL.md +43 -0
  118. package/presets/claude/skills/security-vuln-assessment/SKILL.md +45 -0
  119. package/presets/claude/skills/security-web/SKILL.md +44 -0
  120. package/presets/codex/AGENTS.md +6 -6
  121. package/presets/codex/commands/cc-ask.md +56 -0
  122. package/presets/codex/gates/pre-commit/GATE.md +137 -0
  123. package/presets/cursor/AGENTS.md +8 -8
  124. package/presets/cursor/agents/business-agent.md +44 -0
  125. package/presets/cursor/agents/continuous-architect.md +37 -0
  126. package/presets/cursor/agents/docs.md +1 -0
  127. package/presets/cursor/agents/goal-planner.md +1 -1
  128. package/presets/cursor/agents/impact-analyst.md +43 -0
  129. package/presets/cursor/agents/orchestrator.md +6 -6
  130. package/presets/cursor/commands/cc/api-contract.md +12 -0
  131. package/presets/cursor/commands/cc/ask.md +56 -0
  132. package/presets/cursor/commands/cc/backlog.md +105 -0
  133. package/presets/cursor/commands/cc/clarify.md +32 -0
  134. package/presets/cursor/commands/cc/council.md +87 -0
  135. package/presets/cursor/commands/cc/db-migration.md +22 -9
  136. package/presets/cursor/commands/cc/explore.md +36 -0
  137. package/presets/cursor/commands/cc/feature.md +41 -19
  138. package/presets/cursor/commands/cc/fix.md +47 -20
  139. package/presets/cursor/commands/cc/handoff.md +41 -0
  140. package/presets/cursor/commands/cc/iterative.md +133 -0
  141. package/presets/cursor/commands/cc/openspec.md +38 -8
  142. package/presets/cursor/commands/cc/pagespeed.md +12 -0
  143. package/presets/cursor/commands/cc/prototype.md +38 -0
  144. package/presets/cursor/commands/cc/refactor.md +12 -0
  145. package/presets/cursor/commands/cc/review.md +12 -0
  146. package/presets/cursor/commands/cc/scorecard.md +12 -0
  147. package/presets/cursor/commands/cc/security.md +179 -0
  148. package/presets/cursor/commands/cc/tdd-cycle.md +24 -0
  149. package/presets/cursor/commands/cc/test-plan.md +12 -0
  150. package/presets/cursor/commands/cc/triage.md +34 -0
  151. package/presets/cursor/gates/pre-commit/GATE.md +137 -0
  152. package/presets/cursor/rules/orchestration.mdc +1 -1
  153. package/presets/cursor/skills/backlog/SKILL.md +91 -0
  154. package/presets/cursor/skills/openspec/SKILL.md +5 -1
  155. package/presets/cursor/skills/security-ai-llm/SKILL.md +43 -0
  156. package/presets/cursor/skills/security-blue-team/SKILL.md +43 -0
  157. package/presets/cursor/skills/security-cloud/SKILL.md +43 -0
  158. package/presets/cursor/skills/security-crypto/SKILL.md +43 -0
  159. package/presets/cursor/skills/security-exploit-dev/SKILL.md +45 -0
  160. package/presets/cursor/skills/security-grc/SKILL.md +43 -0
  161. package/presets/cursor/skills/security-incident-response/SKILL.md +45 -0
  162. package/presets/cursor/skills/security-log-analysis/SKILL.md +43 -0
  163. package/presets/cursor/skills/security-malware-analysis/SKILL.md +44 -0
  164. package/presets/cursor/skills/security-mobile/SKILL.md +43 -0
  165. package/presets/cursor/skills/security-network/SKILL.md +43 -0
  166. package/presets/cursor/skills/security-ot-ics/SKILL.md +43 -0
  167. package/presets/cursor/skills/security-recon/SKILL.md +45 -0
  168. package/presets/cursor/skills/security-red-team/SKILL.md +44 -0
  169. package/presets/cursor/skills/security-reverse-engineering/SKILL.md +44 -0
  170. package/presets/cursor/skills/security-soc-automation/SKILL.md +43 -0
  171. package/presets/cursor/skills/security-threat-hunting/SKILL.md +43 -0
  172. package/presets/cursor/skills/security-vuln-assessment/SKILL.md +45 -0
  173. package/presets/cursor/skills/security-web/SKILL.md +44 -0
  174. package/presets/opencode/agents/architect.md +22 -1
  175. package/presets/opencode/agents/complexity-auditor.md +16 -1
  176. package/presets/opencode/agents/contract-builder.md +17 -1
  177. package/presets/opencode/agents/devil.md +158 -0
  178. package/presets/opencode/agents/docs.md +19 -1
  179. package/presets/opencode/agents/goal-planner.md +32 -2
  180. package/presets/opencode/agents/implementer.md +32 -2
  181. package/presets/opencode/agents/orchestrator.md +79 -12
  182. package/presets/opencode/agents/planner.md +61 -0
  183. package/presets/opencode/agents/repo-explorer.md +16 -0
  184. package/presets/opencode/agents/reviewer.md +33 -3
  185. package/presets/opencode/agents/security-reviewer.md +31 -1
  186. package/presets/opencode/agents/task-coach.md +69 -1
  187. package/presets/opencode/agents/tester.md +18 -1
  188. package/presets/opencode/commands/cc-api-contract.md +12 -0
  189. package/presets/opencode/commands/cc-ask.md +56 -0
  190. package/presets/opencode/commands/cc-backlog.md +68 -0
  191. package/presets/opencode/commands/cc-clarify.md +31 -0
  192. package/presets/opencode/commands/cc-council.md +87 -0
  193. package/presets/opencode/commands/cc-db-migration.md +22 -9
  194. package/presets/opencode/commands/cc-explore.md +35 -0
  195. package/presets/opencode/commands/cc-feature.md +41 -19
  196. package/presets/opencode/commands/cc-fix.md +50 -23
  197. package/presets/opencode/commands/cc-handoff.md +40 -0
  198. package/presets/opencode/commands/cc-iterative.md +127 -0
  199. package/presets/opencode/commands/cc-openspec.md +16 -1
  200. package/presets/opencode/commands/cc-pagespeed.md +12 -0
  201. package/presets/opencode/commands/cc-prototype.md +37 -0
  202. package/presets/opencode/commands/cc-refactor.md +12 -0
  203. package/presets/opencode/commands/cc-review.md +12 -0
  204. package/presets/opencode/commands/cc-scorecard.md +12 -0
  205. package/presets/opencode/commands/cc-security.md +179 -0
  206. package/presets/opencode/commands/cc-tdd-cycle.md +24 -0
  207. package/presets/opencode/commands/cc-test-plan.md +12 -0
  208. package/presets/opencode/commands/cc-triage.md +33 -0
  209. package/presets/opencode/gates/pre-commit/GATE.md +137 -0
  210. package/presets/opencode/prompts/v0.1.0/DEPRECATED.md +11 -0
  211. package/presets/opencode/prompts/v0.2.0/DEPRECATED.md +11 -0
  212. package/presets/opencode/prompts/v0.3.0/DEPRECATED.md +11 -0
  213. package/presets/opencode/prompts/v0.4.0/DEPRECATED.md +11 -0
  214. package/presets/opencode/prompts/v0.5.0/goal-planner.md +1 -1
  215. package/presets/opencode/prompts/v0.5.0/orchestrator.md +6 -6
  216. package/presets/opencode/prompts/v0.6.0/implementer.md +35 -0
  217. package/presets/opencode/prompts/v0.6.0/planner.md +36 -0
  218. package/presets/opencode/prompts/v0.6.0/reviewer.md +40 -0
  219. package/presets/opencode/prompts/v1.0.0/README.md +47 -0
  220. package/presets/opencode/prompts/v1.0.0/architect.md +259 -0
  221. package/presets/opencode/prompts/v1.0.0/complexity-auditor.md +116 -0
  222. package/presets/opencode/prompts/v1.0.0/contract-builder.md +120 -0
  223. package/presets/opencode/prompts/v1.0.0/devil.md +169 -0
  224. package/presets/opencode/prompts/v1.0.0/docs.md +229 -0
  225. package/presets/opencode/prompts/v1.0.0/goal-planner.md +123 -0
  226. package/presets/opencode/prompts/v1.0.0/implementer.md +228 -0
  227. package/presets/opencode/prompts/v1.0.0/orchestrator.md +474 -0
  228. package/presets/opencode/prompts/v1.0.0/planner.md +72 -0
  229. package/presets/opencode/prompts/v1.0.0/repo-explorer.md +147 -0
  230. package/presets/opencode/prompts/v1.0.0/reviewer.md +295 -0
  231. package/presets/opencode/prompts/v1.0.0/security-reviewer.md +170 -0
  232. package/presets/opencode/prompts/v1.0.0/task-coach.md +235 -0
  233. package/presets/opencode/prompts/v1.0.0/tester.md +298 -0
  234. package/presets/opencode/skills/backlog/SKILL.md +91 -0
  235. package/presets/opencode/skills/openspec/SKILL.md +5 -1
  236. package/presets/opencode/skills/security-ai-llm/SKILL.md +43 -0
  237. package/presets/opencode/skills/security-blue-team/SKILL.md +43 -0
  238. package/presets/opencode/skills/security-cloud/SKILL.md +43 -0
  239. package/presets/opencode/skills/security-crypto/SKILL.md +43 -0
  240. package/presets/opencode/skills/security-exploit-dev/SKILL.md +45 -0
  241. package/presets/opencode/skills/security-grc/SKILL.md +43 -0
  242. package/presets/opencode/skills/security-incident-response/SKILL.md +45 -0
  243. package/presets/opencode/skills/security-log-analysis/SKILL.md +43 -0
  244. package/presets/opencode/skills/security-malware-analysis/SKILL.md +44 -0
  245. package/presets/opencode/skills/security-mobile/SKILL.md +43 -0
  246. package/presets/opencode/skills/security-network/SKILL.md +43 -0
  247. package/presets/opencode/skills/security-ot-ics/SKILL.md +43 -0
  248. package/presets/opencode/skills/security-recon/SKILL.md +45 -0
  249. package/presets/opencode/skills/security-red-team/SKILL.md +44 -0
  250. package/presets/opencode/skills/security-reverse-engineering/SKILL.md +44 -0
  251. package/presets/opencode/skills/security-soc-automation/SKILL.md +43 -0
  252. package/presets/opencode/skills/security-threat-hunting/SKILL.md +43 -0
  253. package/presets/opencode/skills/security-vuln-assessment/SKILL.md +45 -0
  254. package/presets/opencode/skills/security-web/SKILL.md +44 -0
  255. package/presets/seo-hotel/settings.json +0 -17
  256. package/src/presets/council/council.yml +12 -0
  257. package/src/presets/manifests/agy.yml +2 -2
  258. package/src/presets/manifests/claude.yml +2 -2
  259. package/src/presets/manifests/codex.yml +2 -2
  260. package/src/presets/manifests/cursor.yml +2 -2
  261. package/src/presets/manifests/gemini.yml +2 -2
  262. package/src/presets/manifests/opencode.yml +2 -2
  263. package/src/presets/models/agy.yml +93 -66
  264. package/src/presets/models/claude.yml +79 -53
  265. package/src/presets/models/codex.yml +79 -54
  266. package/src/presets/models/cursor.yml +72 -58
  267. package/src/presets/models/gemini.yml +79 -53
  268. package/src/presets/models/opencode.yml +72 -46
@@ -0,0 +1,35 @@
1
+ ---
2
+ description: Map the repository and recommend the next CodeConductor slash command. Read-only.
3
+ ---
4
+
5
+ # Explore Workflow
6
+
7
+ Explore request: $ARGUMENTS
8
+
9
+ ## Step 0 — CCEP Bootstrap
10
+
11
+ Command: `explore` (fixed for this workflow — do not infer from user text)
12
+
13
+ 1. Run: `npx cc-codeconductor ccep parse --command explore "$ARGUMENTS" --output json`
14
+ 2. Run: `npx cc-codeconductor ccep resolve --command explore "$ARGUMENTS" --output json`
15
+ 3. Run: `npx cc-codeconductor ccep profile explore --output json`
16
+ 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.
17
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
18
+
19
+ ---
20
+
21
+ ## Step 1 — Map (repo-explorer)
22
+
23
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"`. Invoke `repo-explorer`. Produce a Repo Map. Do not write code.
24
+
25
+ ---
26
+
27
+ ## Step 2 — Suggest next command (orchestrator)
28
+
29
+ Recommend exactly one next slash command (`/cc:feature`, `/cc:fix`, `/cc:refactor`, `/cc:review`, `/cc:backlog`, `/cc:openspec`, `/cc:triage`, …) with a one-sentence rationale. Do not start that workflow.
30
+
31
+ ---
32
+
33
+ ## Completion
34
+
35
+ Report the Repo Map and the recommended next `/cc:` command.
@@ -8,7 +8,29 @@ description:
8
8
 
9
9
  Feature request: $ARGUMENTS
10
10
 
11
- ## Step 1Task Card validation (task-coach)
11
+ ## Step 0CCEP Bootstrap
12
+
13
+ Command: `feature` (fixed for this workflow — do not infer from user text)
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command feature "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command feature "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile feature --output json`
18
+ 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.
19
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
20
+ Canonical delivery order is test-before-implement whenever both phases apply.
21
+
22
+ ---
23
+
24
+ ## Step 1 — Wayfinding (repo-explorer)
25
+
26
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
27
+ `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
28
+ to map modules, conventions, and impact radius. Do not write code in this step.
29
+ Record a Repo Map artifact before intake.
30
+
31
+ ---
32
+
33
+ ## Step 2 — Task Card validation (task-coach)
12
34
 
13
35
  Invoke `task-coach` with the feature description above.
14
36
 
@@ -25,7 +47,7 @@ continuing.**
25
47
 
26
48
  ---
27
49
 
28
- ## Step 2 — Technical Plan (architect)
50
+ ## Step 3 — Technical Plan (architect)
29
51
 
30
52
  Invoke `architect` with the validated Task Card from Step 1.
31
53
 
@@ -43,7 +65,20 @@ not invoke implementer until the plan is approved.**
43
65
 
44
66
  ---
45
67
 
46
- ## Step 3Implementation (implementer)
68
+ ## Step 4Test coverage (tester)
69
+
70
+ Invoke `tester` with the Implementation Summary and the Task Card.
71
+
72
+ tester must:
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. Run the full test suite and confirm it passes
77
+ 4. Produce a Coverage Summary: test files added or modified, cases covered
78
+
79
+ ---
80
+
81
+ ## Step 5 — Implementation (implementer)
47
82
 
48
83
  Invoke `implementer` with the approved Technical Plan and the Task Card.
49
84
  Implementer creates a Git Worktree before touching any file; all edits happen inside it.
@@ -52,26 +87,13 @@ implementer must:
52
87
 
53
88
  1. Read the Technical Plan before touching any file
54
89
  2. Apply the minimal diff — only what the plan specifies
55
- 3. Run the project test suite after implementation
90
+ 3. Run the project test suite and make the previously written failing tests pass
56
91
  4. Produce an Implementation Summary: what changed, which files, how to verify
57
92
  locally
58
93
 
59
94
  ---
60
95
 
61
- ## Step 4Test coverage (tester)
62
-
63
- Invoke `tester` with the Implementation Summary and the Task Card.
64
-
65
- tester must:
66
-
67
- 1. Write or extend tests to cover the new behavior
68
- 2. Ensure all acceptance criteria from the Task Card have at least one test
69
- 3. Run the full test suite and confirm it passes
70
- 4. Produce a Coverage Summary: test files added or modified, cases covered
71
-
72
- ---
73
-
74
- ## Step 5 — Code review (reviewer)
96
+ ## Step 6Code review (reviewer)
75
97
 
76
98
  Invoke `reviewer` with the complete diff and the Task Card.
77
99
 
@@ -86,7 +108,7 @@ they are resolved and re-reviewed.
86
108
 
87
109
  ---
88
110
 
89
- ## Step 6 — Documentation (docs)
111
+ ## Step 7 — Documentation (docs)
90
112
 
91
113
  Invoke `docs` only if any of the following changed:
92
114
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description:
3
3
  Run the bug fix workflow — risk-based routing through task validation,
4
- implementation, testing, and optional review.
4
+ testing, implementation, and optional review.
5
5
  ---
6
6
 
7
7
  # Bug Fix Workflow
@@ -18,7 +18,29 @@ Provide the following information in $ARGUMENTS:
18
18
 
19
19
  ---
20
20
 
21
- ## Step 1Task Card validation (task-coach)
21
+ ## Step 0CCEP Bootstrap
22
+
23
+ Command: `fix` (fixed for this workflow — do not infer from user text)
24
+
25
+ 1. Run: `npx cc-codeconductor ccep parse --command fix "$ARGUMENTS" --output json`
26
+ 2. Run: `npx cc-codeconductor ccep resolve --command fix "$ARGUMENTS" --output json`
27
+ 3. Run: `npx cc-codeconductor ccep profile fix --output json`
28
+ 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.
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
+
34
+ ## Step 1 — Wayfinding (repo-explorer)
35
+
36
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
37
+ `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
38
+ to map modules, conventions, and impact radius. Do not write code in this step.
39
+ Record a Repo Map artifact before intake.
40
+
41
+ ---
42
+
43
+ ## Step 2 — Task Card validation (task-coach)
22
44
 
23
45
  Invoke `task-coach` with the bug description above.
24
46
 
@@ -33,11 +55,16 @@ If reproduction steps are missing, task-coach must ask for them before
33
55
  classifying risk. A bug without a reproduction path cannot be classified
34
56
  reliably.
35
57
 
58
+ Capture evidence before tests: reproduction, logs or stack traces, and one
59
+ falsifiable hypothesis of the root cause. Do not patch without that evidence.
60
+ Redact secrets, tokens, and credential dumps from logs before they enter the
61
+ Task Card. Summarize stack traces; do not paste env files.
62
+
36
63
  **STOP here. Show the Task Card and wait for human confirmation.**
37
64
 
38
65
  ---
39
66
 
40
- ## Step 2 — Route by risk
67
+ ## Step 3 — Route by risk
41
68
 
42
69
  Read the risk field from the Task Card and follow the corresponding route.
43
70
 
@@ -46,16 +73,16 @@ Read the risk field from the Task Card and follow the corresponding route.
46
73
  Applies when: the bug is isolated to a single component, existing tests cover
47
74
  the affected code, and no public API or shared state is involved.
48
75
 
49
- Route: `task-coach` → `implementer` → `tester`
76
+ Route: `task-coach` → `tester` → `implementer`
50
77
 
51
- Proceed directly to Step 3a.
78
+ Proceed directly to Step 3 (tests), then Step 4a.
52
79
 
53
80
  ### Medium or high-risk route
54
81
 
55
82
  Applies when: the bug touches shared state, a public API, auth or payment paths,
56
83
  database writes, or the root cause is not yet understood.
57
84
 
58
- Route: `task-coach` → `architect` → `implementer` → `tester` → `reviewer`
85
+ Route: `task-coach` → `architect` → `tester` → `implementer` → `reviewer`
59
86
 
60
87
  Invoke `architect` before implementation. architect must:
61
88
 
@@ -69,7 +96,20 @@ before continuing.**
69
96
 
70
97
  ---
71
98
 
72
- ## Step 3aImplementation, low-risk (implementer)
99
+ ## Step 4Regression tests (tester)
100
+
101
+ Invoke `tester` for all risk levels.
102
+
103
+ tester must:
104
+
105
+ 1. Write a regression test that reproduces the original bug and confirm it fails
106
+ before any fix (RED)
107
+ 2. Verify that existing tests still pass
108
+ 3. Produce a Coverage Summary: test added, case covered
109
+
110
+ ---
111
+
112
+ ## Step 5a — Implementation, low-risk (implementer)
73
113
 
74
114
  Invoke `implementer` with the Task Card.
75
115
  Implementer creates a Git Worktree before touching any file; all edits happen inside it.
@@ -78,12 +118,12 @@ implementer must:
78
118
 
79
119
  1. Locate the defect using the reproduction steps
80
120
  2. Apply the minimal fix — no unrelated changes
81
- 3. Run the test suite
121
+ 3. Run the suite and make the RED regression test pass
82
122
  4. Produce an Implementation Summary: root cause, fix applied, files changed
83
123
 
84
124
  ---
85
125
 
86
- ## Step 3b — Implementation, medium/high-risk (implementer)
126
+ ## Step 5b — Implementation, medium/high-risk (implementer)
87
127
 
88
128
  Invoke `implementer` with the approved Technical Plan and the Task Card.
89
129
  Implementer creates a Git Worktree before touching any file; all edits happen inside it.
@@ -93,20 +133,7 @@ Plan approval. After implementation, run the full test suite.
93
133
 
94
134
  ---
95
135
 
96
- ## Step 4Regression tests (tester)
97
-
98
- Invoke `tester` for all risk levels.
99
-
100
- tester must:
101
-
102
- 1. Write a regression test that reproduces the original bug (fails before the
103
- fix, passes after)
104
- 2. Verify that existing tests still pass
105
- 3. Produce a Coverage Summary: test added, case covered
106
-
107
- ---
108
-
109
- ## Step 5 — Review (reviewer) — medium/high-risk only
136
+ ## Step 6Review (reviewer) — medium/high-risk only
110
137
 
111
138
  Invoke `reviewer` with the diff and Task Card.
112
139
 
@@ -0,0 +1,40 @@
1
+ ---
2
+ description: Compact the session into gitignored `.codeconductor/sessions/handoff.md` (redact secrets).
3
+ ---
4
+
5
+ # Handoff Workflow
6
+
7
+ Handoff request: $ARGUMENTS
8
+
9
+ ## Step 0 — CCEP Bootstrap
10
+
11
+ Command: `handoff` (fixed for this workflow — do not infer from user text)
12
+
13
+ 1. Run: `npx cc-codeconductor ccep parse --command handoff "$ARGUMENTS" --output json`
14
+ 2. Run: `npx cc-codeconductor ccep resolve --command handoff "$ARGUMENTS" --output json`
15
+ 3. Run: `npx cc-codeconductor ccep profile handoff --output json`
16
+ 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.
17
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
18
+
19
+ ---
20
+
21
+ ## Step 1 — Compact (docs)
22
+
23
+ Invoke `docs`. Write **only** `.codeconductor/sessions/handoff.md` (gitignored).
24
+ Do not write `.codeconductor/handoff.md` or any tracked path.
25
+
26
+ Before writing, redact secrets, tokens, API keys, passwords, connection strings,
27
+ `.env` contents, and log/stack-trace lines that embed those values. Summarize
28
+ errors instead of pasting dumps. If unresolved credential material remains, stop
29
+ and wait for a human (CCEP `stopOnHighRisk`).
30
+
31
+ Include: goal, Task Card status (no secret fields), files touched, test
32
+ pass/fail (not log dumps), open questions, and the next `/cc:` command.
33
+
34
+ Do not edit source or tests.
35
+
36
+ ---
37
+
38
+ ## Completion
39
+
40
+ Report the handoff path. Another session should be able to continue from that file alone.
@@ -0,0 +1,127 @@
1
+ ---
2
+ description:
3
+ Run the advanced iterative workflow — Wayfinding AST discovery, Relentless
4
+ Grilling, contract and spec design, TDD, council review, and docs.
5
+ ---
6
+
7
+ # Advanced Iterative Workflow
8
+
9
+ Iterative request: $ARGUMENTS
10
+
11
+ ## Step 0 — CCEP Bootstrap
12
+
13
+ Command: `iterative` (fixed for this workflow — do not infer from user text)
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command iterative "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command iterative "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile iterative --output json`
18
+ 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.
19
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
20
+ Canonical delivery order is test-before-implement whenever both phases apply.
21
+
22
+ ---
23
+
24
+ ## Step 1 — Wayfinding (repo-explorer)
25
+
26
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
27
+ `graphify path` / `graphify explain` when two modules or one concept need a
28
+ scoped subgraph). Then invoke `repo-explorer` with that graph output.
29
+
30
+ repo-explorer maps directory trees, conventions, god nodes, and affected
31
+ modules. Do not write code in this step. Write a short phase handoff (scope,
32
+ files, open questions) before the next phase — do not chain agents on unspoken
33
+ context.
34
+
35
+ ---
36
+
37
+ ## Step 2 — Relentless Grilling & Task Card (task-coach)
38
+
39
+ Invoke `task-coach` using the Grilling protocol to stress-test all assumptions.
40
+
41
+ The Task Card is ready when it contains: title, type, risk classification,
42
+ scope, context, acceptance criteria, and constraints, and every assumption
43
+ behind it has survived one grilling question.
44
+
45
+ If any field is missing or ambiguous, ask one clarifying question at a time and
46
+ wait for the answer. Do not proceed with an incomplete Task Card.
47
+
48
+ **STOP here.** Unresolved grilling questions or missing fields populate
49
+ `questionsForUser` in the CCEP-1 `planner-output`; the `ConfirmationGate`
50
+ (`ccep evaluate`) reads that field and halts the workflow until a human
51
+ answers. Show the completed Task Card and wait for that confirmation before
52
+ continuing.
53
+
54
+ ---
55
+
56
+ ## Step 3 — Contract & Technical Plan (contract-builder & architect)
57
+
58
+ Invoke `contract-builder` then `architect` with the validated Task Card.
59
+
60
+ 1. Define API contracts, JSON Schemas, or TypeScript interfaces.
61
+ 2. Formulate the Technical Plan (chosen approach, affected files, trade-offs).
62
+ 3. Apply YAGNI, Simplicity First, and Stdlib-First.
63
+
64
+ **STOP here. Show the Technical Plan and wait for explicit human approval. Do
65
+ not invoke implementer until the plan is approved.**
66
+
67
+ ---
68
+
69
+ ## Step 4 — Test coverage (tester)
70
+
71
+ Invoke `tester` with the Task Card and Technical Plan.
72
+
73
+ 1. Write or extend failing tests for the new behavior before implementation (RED).
74
+ 2. Ensure all acceptance criteria from the Task Card have at least one test.
75
+ 3. Produce a Test Report: test files added or modified, cases covered.
76
+
77
+ ---
78
+
79
+ ## Step 5 — Implementation (implementer)
80
+
81
+ Invoke `implementer` with the approved Technical Plan, contracts, and failing
82
+ tests. Implementer creates a Git Worktree before touching any file; all edits
83
+ happen inside it.
84
+
85
+ 1. Read the Technical Plan before touching any file.
86
+ 2. Apply the minimal diff — only what the plan specifies.
87
+ 3. Run the project test suite and make the previously written failing tests pass.
88
+ 4. If tests fail, run up to 3 repair cycles (`implementer` → `tester`).
89
+ 5. Produce an Implementation Summary: what changed, which files, how to verify
90
+ locally.
91
+
92
+ ---
93
+
94
+ ## Step 6 — Multi-Perspective Council Review
95
+
96
+ Invoke the `council` skill on the generated diff (`council-review` phase).
97
+
98
+ The council evaluates Architecture, Security, Product, Delivery, DataOps, and
99
+ Devil. `security-reviewer` may set `securityVeto: true`; that REJECTED verdict
100
+ overrides majority consensus.
101
+
102
+ If ANY agent votes CRITICAL:
103
+ - The Review Report status is **BLOCKED**.
104
+ - Return to Step 5 with the feedback.
105
+
106
+ If APPROVED (no CRITICAL findings), continue.
107
+
108
+ ---
109
+
110
+ ## Step 7 — Documentation (docs)
111
+
112
+ Invoke `docs` when a public API, public module, or user-visible behavior
113
+ changed.
114
+
115
+ Update: README (if applicable), OpenAPI spec (if applicable), CHANGELOG
116
+ (always when implementation changed), ADR (if an architectural decision was
117
+ made).
118
+
119
+ If `graphify-out/` is in use, run `graphify update .` (AST-only).
120
+
121
+ ---
122
+
123
+ ## Completion
124
+
125
+ The iterative workflow is complete only when: all tests pass, the council
126
+ approves the spec and the diff, no CRITICAL findings remain, and documentation
127
+ and the knowledge graph reflect the implemented behavior.
@@ -16,6 +16,19 @@ Run `npx cc-codeconductor openspec validate`. If invalid, show errors and recomm
16
16
 
17
17
  ---
18
18
 
19
+ ## Step 0 — CCEP Bootstrap
20
+
21
+ Command: `openspec` (fixed for this workflow — do not infer from user text)
22
+
23
+ 1. Run: `npx cc-codeconductor ccep parse --command openspec "$ARGUMENTS" --output json`
24
+ 2. Run: `npx cc-codeconductor ccep resolve --command openspec "$ARGUMENTS" --output json`
25
+ 3. Run: `npx cc-codeconductor ccep profile openspec --output json`
26
+ 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.
27
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
28
+ Canonical delivery order is test-before-implement whenever both phases apply.
29
+
30
+ ---
31
+
19
32
  ## Step 1 — Scan
20
33
 
21
34
  Run `npx cc-codeconductor openspec scan`. Report new, modified, and closed items.
@@ -32,6 +45,8 @@ Use `$ARGUMENTS` BC-id or `npx cc-codeconductor openspec status` for next READY
32
45
 
33
46
  Run `npx cc-codeconductor openspec plan <BC-id>`. Show TaskCards and `openspec/changes/` path.
34
47
 
48
+ Drive status with CLI (do not edit openspec-state.json): `openspec start <cardId>`, `openspec done <cardId>`, `openspec block <cardId> --reason "…"`, `openspec archive <itemId>`.
49
+
35
50
  ---
36
51
 
37
52
  ## Step 4 — Execute loop
@@ -56,6 +71,6 @@ Reviewer approves or rejects against acceptance criteria. Reject → `IN_PROGRES
56
71
 
57
72
  ## Step 6 — Update
58
73
 
59
- Mark DONE, move to Archive in BACKLOG.md, run `openspec scan`.
74
+ Mark DONE with `openspec archive <itemId>` (all cards must be done), then run `openspec scan`.
60
75
 
61
76
  Apply skill `openspec` for format and state rules.
@@ -10,6 +10,18 @@ Audit URL: $ARGUMENTS
10
10
 
11
11
  ---
12
12
 
13
+ ## Step 0 — CCEP Bootstrap
14
+
15
+ Command: `pagespeed` (fixed for this workflow — do not infer from user text)
16
+
17
+ 1. Run: `npx cc-codeconductor ccep parse --command pagespeed "$ARGUMENTS" --output json`
18
+ 2. Run: `npx cc-codeconductor ccep resolve --command pagespeed "$ARGUMENTS" --output json`
19
+ 3. Run: `npx cc-codeconductor ccep profile pagespeed --output json`
20
+ 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.
21
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
22
+
23
+ ---
24
+
13
25
  ## Step 1 — Pre-flight (pagespeed-perf skill)
14
26
 
15
27
  Invoke `pagespeed-perf` skill.
@@ -0,0 +1,37 @@
1
+ ---
2
+ description: Disposable spike in an isolated worktree. Not a merge candidate.
3
+ ---
4
+
5
+ # Prototype Workflow
6
+
7
+ Prototype request: $ARGUMENTS
8
+
9
+ ## Step 0 — CCEP Bootstrap
10
+
11
+ Command: `prototype` (fixed for this workflow — do not infer from user text)
12
+
13
+ 1. Run: `npx cc-codeconductor ccep parse --command prototype "$ARGUMENTS" --output json`
14
+ 2. Run: `npx cc-codeconductor ccep resolve --command prototype "$ARGUMENTS" --output json`
15
+ 3. Run: `npx cc-codeconductor ccep profile prototype --output json`
16
+ 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.
17
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
18
+
19
+ ---
20
+
21
+ ## Step 1 — Bounds (architect)
22
+
23
+ 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.
24
+
25
+ **STOP here. Wait for approval of the spike bounds.**
26
+
27
+ ---
28
+
29
+ ## Step 2 — Spike (implementer)
30
+
31
+ 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.
32
+
33
+ ---
34
+
35
+ ## Completion
36
+
37
+ Report bounds, worktree path, and what was learned. Recommend `/cc:feature` or `/cc:fix` if the spike should become real work.
@@ -33,6 +33,18 @@ If coverage is insufficient:
33
33
 
34
34
  ---
35
35
 
36
+ ## Step 0 — CCEP Bootstrap
37
+
38
+ Command: `refactor` (fixed for this workflow — do not infer from user text)
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.
45
+
46
+ ---
47
+
36
48
  ## Step 1 — Architectural justification (architect)
37
49
 
38
50
  Always invoke `architect` first, regardless of risk level. A refactor without a
@@ -17,6 +17,18 @@ Specify what to review. Accepted formats:
17
17
 
18
18
  ---
19
19
 
20
+ ## Step 0 — CCEP Bootstrap
21
+
22
+ Command: `review` (fixed for this workflow — do not infer from user text)
23
+
24
+ 1. Run: `npx cc-codeconductor ccep parse --command review "$ARGUMENTS" --output json`
25
+ 2. Run: `npx cc-codeconductor ccep resolve --command review "$ARGUMENTS" --output json`
26
+ 3. Run: `npx cc-codeconductor ccep profile review --output json`
27
+ 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.
28
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
29
+
30
+ ---
31
+
20
32
  ## Step 1 — Diff collection
21
33
 
22
34
  Before invoking `reviewer`, collect the diff for the specified target.
@@ -7,6 +7,18 @@ description:
7
7
 
8
8
  Scope: $ARGUMENTS
9
9
 
10
+ ## Step 0 — CCEP Bootstrap
11
+
12
+ Command: `scorecard` (fixed for this workflow — do not infer from user text)
13
+
14
+ 1. Run: `npx cc-codeconductor ccep parse --command scorecard "$ARGUMENTS" --output json`
15
+ 2. Run: `npx cc-codeconductor ccep resolve --command scorecard "$ARGUMENTS" --output json`
16
+ 3. Run: `npx cc-codeconductor ccep profile scorecard --output json`
17
+ 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.
18
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
19
+
20
+ ---
21
+
10
22
  1. `scorecard create --task <id> --from-diff`
11
23
  2. Complete criteria (reviewer or human)
12
24
  3. `scorecard regression` (optional)