cc-codeconductor 0.4.3 → 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 (262) 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 +23721 -15064
  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/skills/evaluation/SKILL.md +6 -0
  33. package/presets/agy/skills/openspec/SKILL.md +32 -0
  34. package/presets/agy/workflows/cc-api-contract.md +12 -0
  35. package/presets/agy/workflows/cc-ask.md +55 -0
  36. package/presets/agy/workflows/cc-clarify.md +33 -0
  37. package/presets/agy/workflows/cc-council.md +31 -7
  38. package/presets/agy/workflows/cc-db-migration.md +22 -9
  39. package/presets/agy/workflows/cc-explore.md +37 -0
  40. package/presets/agy/workflows/cc-feature.md +41 -19
  41. package/presets/agy/workflows/cc-fix.md +50 -23
  42. package/presets/agy/workflows/cc-handoff.md +42 -0
  43. package/presets/agy/workflows/cc-iterative.md +128 -0
  44. package/presets/agy/workflows/cc-openspec.md +75 -0
  45. package/presets/agy/workflows/cc-pagespeed.md +12 -0
  46. package/presets/agy/workflows/cc-prototype.md +39 -0
  47. package/presets/agy/workflows/cc-refactor.md +12 -0
  48. package/presets/agy/workflows/cc-review.md +12 -0
  49. package/presets/agy/workflows/cc-scorecard.md +29 -0
  50. package/presets/agy/workflows/cc-tdd-cycle.md +24 -0
  51. package/presets/agy/workflows/cc-test-plan.md +12 -0
  52. package/presets/agy/workflows/cc-triage.md +35 -0
  53. package/presets/claude/CLAUDE.md +64 -0
  54. package/presets/claude/commands/cc/api-contract.md +12 -0
  55. package/presets/claude/commands/cc/ask.md +55 -0
  56. package/presets/claude/commands/cc/clarify.md +32 -0
  57. package/presets/claude/commands/cc/council.md +87 -0
  58. package/presets/claude/commands/cc/db-migration.md +22 -9
  59. package/presets/claude/commands/cc/explore.md +36 -0
  60. package/presets/claude/commands/cc/feature.md +49 -22
  61. package/presets/claude/commands/cc/fix.md +74 -20
  62. package/presets/claude/commands/cc/handoff.md +44 -0
  63. package/presets/claude/commands/cc/iterative.md +132 -0
  64. package/presets/claude/commands/cc/openspec.md +169 -0
  65. package/presets/claude/commands/cc/pagespeed.md +12 -0
  66. package/presets/claude/commands/cc/prototype.md +38 -0
  67. package/presets/claude/commands/cc/refactor.md +152 -1
  68. package/presets/claude/commands/cc/review.md +90 -17
  69. package/presets/claude/commands/cc/scorecard.md +77 -0
  70. package/presets/claude/commands/cc/tdd-cycle.md +53 -3
  71. package/presets/claude/commands/cc/test-plan.md +12 -0
  72. package/presets/claude/commands/cc/triage.md +34 -0
  73. package/presets/claude/gates/pre-commit/GATE.md +136 -0
  74. package/presets/claude/settings.json +8 -46
  75. package/presets/claude/skills/evaluation/SKILL.md +42 -0
  76. package/presets/claude/skills/openspec/SKILL.md +54 -0
  77. package/presets/codex/AGENTS.md +62 -5
  78. package/presets/codex/commands/cc-ask.md +55 -0
  79. package/presets/codex/gates/pre-commit/GATE.md +136 -0
  80. package/presets/cursor/.cursorignore +15 -0
  81. package/presets/cursor/AGENTS.md +504 -0
  82. package/presets/cursor/agents/architect.md +211 -0
  83. package/presets/cursor/agents/business-agent.md +44 -0
  84. package/presets/cursor/agents/complexity-auditor.md +76 -0
  85. package/presets/cursor/agents/continuous-architect.md +37 -0
  86. package/presets/cursor/agents/contract-builder.md +75 -0
  87. package/presets/cursor/agents/docs.md +181 -0
  88. package/presets/cursor/agents/goal-planner.md +71 -0
  89. package/presets/cursor/agents/impact-analyst.md +43 -0
  90. package/presets/cursor/agents/implementer.md +161 -0
  91. package/presets/cursor/agents/orchestrator.md +377 -0
  92. package/presets/cursor/agents/repo-explorer.md +100 -0
  93. package/presets/cursor/agents/reviewer.md +237 -0
  94. package/presets/cursor/agents/security-reviewer.md +113 -0
  95. package/presets/cursor/agents/task-coach.md +145 -0
  96. package/presets/cursor/agents/tester.md +241 -0
  97. package/presets/cursor/commands/cc/api-contract.md +70 -0
  98. package/presets/cursor/commands/cc/ask.md +55 -0
  99. package/presets/cursor/commands/cc/clarify.md +32 -0
  100. package/presets/cursor/commands/cc/council.md +87 -0
  101. package/presets/cursor/commands/cc/db-migration.md +71 -0
  102. package/presets/cursor/commands/cc/explore.md +36 -0
  103. package/presets/cursor/commands/cc/feature.md +137 -0
  104. package/presets/cursor/commands/cc/fix.md +148 -0
  105. package/presets/cursor/commands/cc/handoff.md +41 -0
  106. package/presets/cursor/commands/cc/iterative.md +133 -0
  107. package/presets/cursor/commands/cc/openspec.md +159 -0
  108. package/presets/cursor/commands/cc/pagespeed.md +115 -0
  109. package/presets/cursor/commands/cc/prototype.md +38 -0
  110. package/presets/cursor/commands/cc/refactor.md +160 -0
  111. package/presets/cursor/commands/cc/review.md +149 -0
  112. package/presets/cursor/commands/cc/scorecard.md +77 -0
  113. package/presets/cursor/commands/cc/tdd-cycle.md +250 -0
  114. package/presets/cursor/commands/cc/test-plan.md +150 -0
  115. package/presets/cursor/commands/cc/triage.md +34 -0
  116. package/presets/cursor/gates/pre-commit/GATE.md +136 -0
  117. package/presets/cursor/rules/behavioral-discipline.mdc +14 -0
  118. package/presets/cursor/rules/context-budget.mdc +12 -0
  119. package/presets/cursor/rules/orchestration.mdc +12 -0
  120. package/presets/cursor/rules/yagni-stdlib.mdc +11 -0
  121. package/presets/cursor/skills/android/SKILL.md +122 -0
  122. package/presets/cursor/skills/api-versioning/SKILL.md +394 -0
  123. package/presets/cursor/skills/astro/SKILL.md +322 -0
  124. package/presets/cursor/skills/auth-token-inspector/SKILL.md +33 -0
  125. package/presets/cursor/skills/code-review/SKILL.md +208 -0
  126. package/presets/cursor/skills/conductor-setup/SKILL.md +127 -0
  127. package/presets/cursor/skills/django-orm/SKILL.md +463 -0
  128. package/presets/cursor/skills/django-testing/SKILL.md +417 -0
  129. package/presets/cursor/skills/django-uv/SKILL.md +409 -0
  130. package/presets/cursor/skills/drizzle-schema-architect/SKILL.md +54 -0
  131. package/presets/cursor/skills/evaluation/SKILL.md +8 -0
  132. package/presets/cursor/skills/fastapi-pydantic-strict/SKILL.md +46 -0
  133. package/presets/cursor/skills/find-skills/SKILL.md +144 -0
  134. package/presets/cursor/skills/jpa-nplusone-detector/SKILL.md +49 -0
  135. package/presets/cursor/skills/jpa-postgres/SKILL.md +626 -0
  136. package/presets/cursor/skills/laravel-specialist/SKILL.md +267 -0
  137. package/presets/cursor/skills/laravel-specialist/references/eloquent.md +351 -0
  138. package/presets/cursor/skills/laravel-specialist/references/livewire.md +512 -0
  139. package/presets/cursor/skills/laravel-specialist/references/queues.md +423 -0
  140. package/presets/cursor/skills/laravel-specialist/references/routing.md +362 -0
  141. package/presets/cursor/skills/laravel-specialist/references/testing.md +522 -0
  142. package/presets/cursor/skills/livewire-alpine-bridge/SKILL.md +39 -0
  143. package/presets/cursor/skills/multi-agent-orchestration/README.md +144 -0
  144. package/presets/cursor/skills/multi-agent-orchestration/SKILL.md +579 -0
  145. package/presets/cursor/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  146. package/presets/cursor/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  147. package/presets/cursor/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  148. package/presets/cursor/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  149. package/presets/cursor/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  150. package/presets/cursor/skills/nextjs-typescript/SKILL.md +394 -0
  151. package/presets/cursor/skills/openspec/SKILL.md +52 -0
  152. package/presets/cursor/skills/pagespeed-insights/SKILL.md +445 -0
  153. package/presets/cursor/skills/pagespeed-insights/reference.md +50 -0
  154. package/presets/cursor/skills/pagespeed-perf/SKILL.md +281 -0
  155. package/presets/cursor/skills/php-pro/SKILL.md +210 -0
  156. package/presets/cursor/skills/php-pro/references/async-patterns.md +412 -0
  157. package/presets/cursor/skills/php-pro/references/laravel-patterns.md +377 -0
  158. package/presets/cursor/skills/php-pro/references/modern-php-features.md +323 -0
  159. package/presets/cursor/skills/php-pro/references/symfony-patterns.md +466 -0
  160. package/presets/cursor/skills/php-pro/references/testing-quality.md +466 -0
  161. package/presets/cursor/skills/python/SKILL.md +613 -0
  162. package/presets/cursor/skills/python-django-stack/SKILL.md +500 -0
  163. package/presets/cursor/skills/python-fastapi-stack/SKILL.md +464 -0
  164. package/presets/cursor/skills/security/SKILL.md +384 -0
  165. package/presets/cursor/skills/seo-analytics-injector/SKILL.md +44 -0
  166. package/presets/cursor/skills/spring-auth-auditor/SKILL.md +33 -0
  167. package/presets/cursor/skills/spring-boot-feature/SKILL.md +566 -0
  168. package/presets/cursor/skills/spring-boot-kotlin/SKILL.md +408 -0
  169. package/presets/cursor/skills/spring-boot-testing-strategy/SKILL.md +479 -0
  170. package/presets/cursor/skills/sqlalchemy/SKILL.md +473 -0
  171. package/presets/cursor/skills/tailwind-responsive-auditor/SKILL.md +32 -0
  172. package/presets/cursor/skills/tdd-mutation-tester/SKILL.md +28 -0
  173. package/presets/cursor/skills/testing-tdd/SKILL.md +592 -0
  174. package/presets/cursor/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  175. package/presets/cursor/skills/workflow-orchestration-patterns/references/details.md +223 -0
  176. package/presets/opencode/agents/architect.md +22 -2
  177. package/presets/opencode/agents/complexity-auditor.md +16 -0
  178. package/presets/opencode/agents/contract-builder.md +109 -0
  179. package/presets/opencode/agents/devil.md +158 -0
  180. package/presets/opencode/agents/docs.md +19 -2
  181. package/presets/opencode/agents/goal-planner.md +112 -0
  182. package/presets/opencode/agents/implementer.md +39 -2
  183. package/presets/opencode/agents/orchestrator.md +124 -19
  184. package/presets/opencode/agents/planner.md +61 -0
  185. package/presets/opencode/agents/repo-explorer.md +15 -0
  186. package/presets/opencode/agents/reviewer.md +53 -2
  187. package/presets/opencode/agents/security-reviewer.md +159 -0
  188. package/presets/opencode/agents/task-coach.md +69 -2
  189. package/presets/opencode/agents/tester.md +18 -2
  190. package/presets/opencode/commands/cc-api-contract.md +12 -0
  191. package/presets/opencode/commands/cc-ask.md +55 -0
  192. package/presets/opencode/commands/cc-clarify.md +31 -0
  193. package/presets/opencode/commands/cc-council.md +87 -0
  194. package/presets/opencode/commands/cc-db-migration.md +22 -9
  195. package/presets/opencode/commands/cc-explore.md +35 -0
  196. package/presets/opencode/commands/cc-feature.md +41 -19
  197. package/presets/opencode/commands/cc-fix.md +50 -23
  198. package/presets/opencode/commands/cc-handoff.md +40 -0
  199. package/presets/opencode/commands/cc-iterative.md +127 -0
  200. package/presets/opencode/commands/cc-openspec.md +74 -0
  201. package/presets/opencode/commands/cc-pagespeed.md +12 -0
  202. package/presets/opencode/commands/cc-prototype.md +37 -0
  203. package/presets/opencode/commands/cc-refactor.md +12 -0
  204. package/presets/opencode/commands/cc-review.md +12 -0
  205. package/presets/opencode/commands/cc-scorecard.md +28 -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 +136 -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/architect.md +222 -0
  215. package/presets/opencode/prompts/v0.5.0/complexity-auditor.md +91 -0
  216. package/presets/opencode/prompts/v0.5.0/contract-builder.md +84 -0
  217. package/presets/opencode/prompts/v0.5.0/docs.md +190 -0
  218. package/presets/opencode/prompts/v0.5.0/goal-planner.md +80 -0
  219. package/presets/opencode/prompts/v0.5.0/implementer.md +171 -0
  220. package/presets/opencode/prompts/v0.5.0/orchestrator.md +388 -0
  221. package/presets/opencode/prompts/v0.5.0/repo-explorer.md +111 -0
  222. package/presets/opencode/prompts/v0.5.0/reviewer.md +248 -0
  223. package/presets/opencode/prompts/v0.5.0/security-reviewer.md +123 -0
  224. package/presets/opencode/prompts/v0.5.0/task-coach.md +156 -0
  225. package/presets/opencode/prompts/v0.5.0/tester.md +252 -0
  226. package/presets/opencode/prompts/v0.6.0/implementer.md +35 -0
  227. package/presets/opencode/prompts/v0.6.0/planner.md +36 -0
  228. package/presets/opencode/prompts/v0.6.0/reviewer.md +40 -0
  229. package/presets/opencode/prompts/v1.0.0/README.md +47 -0
  230. package/presets/opencode/prompts/v1.0.0/architect.md +259 -0
  231. package/presets/opencode/prompts/v1.0.0/complexity-auditor.md +116 -0
  232. package/presets/opencode/prompts/v1.0.0/contract-builder.md +120 -0
  233. package/presets/opencode/prompts/v1.0.0/devil.md +169 -0
  234. package/presets/opencode/prompts/v1.0.0/docs.md +229 -0
  235. package/presets/opencode/prompts/v1.0.0/goal-planner.md +123 -0
  236. package/presets/opencode/prompts/v1.0.0/implementer.md +228 -0
  237. package/presets/opencode/prompts/v1.0.0/orchestrator.md +474 -0
  238. package/presets/opencode/prompts/v1.0.0/planner.md +72 -0
  239. package/presets/opencode/prompts/v1.0.0/repo-explorer.md +147 -0
  240. package/presets/opencode/prompts/v1.0.0/reviewer.md +295 -0
  241. package/presets/opencode/prompts/v1.0.0/security-reviewer.md +170 -0
  242. package/presets/opencode/prompts/v1.0.0/task-coach.md +235 -0
  243. package/presets/opencode/prompts/v1.0.0/tester.md +298 -0
  244. package/presets/opencode/skills/evaluation/SKILL.md +6 -0
  245. package/presets/opencode/skills/openspec/SKILL.md +50 -0
  246. package/presets/seo-hotel/settings.json +0 -17
  247. package/presets/templates/BACKLOG.md +33 -0
  248. package/presets/templates/execution-profile.yml +6 -0
  249. package/presets/templates/model-comparison.md +11 -0
  250. package/presets/templates/regression-checklist.yml +10 -0
  251. package/src/presets/manifests/agy.yml +2 -2
  252. package/src/presets/manifests/claude.yml +2 -2
  253. package/src/presets/manifests/codex.yml +2 -2
  254. package/src/presets/manifests/cursor.yml +19 -3
  255. package/src/presets/manifests/gemini.yml +2 -2
  256. package/src/presets/manifests/opencode.yml +2 -2
  257. package/src/presets/models/agy.yml +97 -49
  258. package/src/presets/models/claude.yml +83 -39
  259. package/src/presets/models/codex.yml +83 -40
  260. package/src/presets/models/cursor.yml +83 -39
  261. package/src/presets/models/gemini.yml +83 -39
  262. package/src/presets/models/opencode.yml +78 -34
@@ -0,0 +1,137 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Run the full feature workflow — task validation, technical design,
4
+ implementation, testing, review, and documentation.
5
+ ---
6
+
7
+ # Feature Workflow
8
+
9
+ Feature request: $ARGUMENTS
10
+
11
+ ---
12
+
13
+ ## Step 0 — CCEP Bootstrap
14
+
15
+ Command: `feature` (fixed for this workflow — do not infer from user text)
16
+
17
+ 1. Run: `npx cc-codeconductor ccep parse --command feature "$ARGUMENTS" --output json`
18
+ 2. Run: `npx cc-codeconductor ccep resolve --command feature "$ARGUMENTS" --output json`
19
+ 3. Run: `npx cc-codeconductor ccep profile feature --output json`
20
+ 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.
21
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
22
+ Canonical delivery order is test-before-implement whenever both phases apply.
23
+
24
+ ---
25
+
26
+ ## Step 1 — Wayfinding (repo-explorer)
27
+
28
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
29
+ `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
30
+ to map modules, conventions, and impact radius. Do not write code in this step.
31
+ Record a Repo Map artifact before intake.
32
+
33
+ ---
34
+
35
+ ## Step 2 — Task Card validation (Task Coach role)
36
+
37
+ Invoke the `task-coach` subagent via the Task tool.
38
+
39
+ Produce a complete Task Card. The Task Card is ready when it contains: title,
40
+ type, risk classification, scope, context, acceptance criteria, and constraints.
41
+
42
+ If any field is missing or ambiguous, ask one clarifying question at a time and
43
+ wait for the answer. Do not proceed with an incomplete Task Card.
44
+
45
+ **STOP here. Show the completed Task Card and wait for human confirmation before
46
+ continuing.**
47
+
48
+ ---
49
+
50
+ ## Step 3 — Technical Plan (Architect role)
51
+
52
+ Invoke the `architect` subagent via the Task tool.
53
+
54
+ Produce a Technical Plan that covers:
55
+
56
+ - Chosen approach and rationale
57
+ - Affected files and modules
58
+ - Data model changes (if any)
59
+ - API contract changes (if any)
60
+ - Identified risks and mitigations
61
+ - Open questions that require a human decision
62
+
63
+ **STOP here. Show the Technical Plan and wait for explicit human approval. Do
64
+ not proceed to implementation until the plan is approved.**
65
+
66
+ ---
67
+
68
+ ## Step 4 — Test coverage (Tester role)
69
+
70
+ Invoke the `tester` subagent via the Task tool.
71
+
72
+ Use the Implementation Summary and the Task Card.
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 Test Report: test files added or modified, cases covered.
78
+
79
+ ---
80
+
81
+ ## Step 5 — Implementation (Implementer role)
82
+
83
+ Invoke the `implementer` subagent via the Task tool.
84
+
85
+ Use the approved Technical Plan and the Task Card from the steps above.
86
+ Implementer creates a Git Worktree before touching any file; all edits happen inside it.
87
+
88
+ 1. Read the Technical Plan before touching any file.
89
+ 2. Apply the minimal diff — only what the plan specifies.
90
+ 3. Run the project test suite and make the previously written failing tests pass.
91
+ 4. Produce an Implementation Summary: what changed, which files, how to verify
92
+ locally.
93
+
94
+ ---
95
+
96
+ ## Step 6 — Code review (Reviewer role)
97
+
98
+ Invoke the `reviewer` subagent via the Task tool.
99
+
100
+ Use the complete diff and the Task Card.
101
+
102
+ Produce a Review Report with findings categorized as CRITICAL, WARNING, or
103
+ SUGGESTION.
104
+
105
+ If any CRITICAL findings exist, **STOP and report them**. Do not proceed until
106
+ they are resolved and the diff is re-reviewed.
107
+
108
+ ---
109
+
110
+ ## Step 7 — Documentation (Docs role)
111
+
112
+ Invoke the `docs` subagent via the Task tool.
113
+
114
+ Invoke this step only if any of the following changed:
115
+
116
+ - A public API endpoint was added or modified
117
+ - A public interface or module was introduced
118
+ - Behavior visible to end users changed
119
+
120
+ Update: README (if applicable), OpenAPI spec (if applicable), CHANGELOG
121
+ (always), ADR (if an architectural decision was made).
122
+
123
+ ---
124
+
125
+ ## Completion
126
+
127
+ Report the following:
128
+
129
+ - Task Card (final)
130
+ - Technical Plan (approved)
131
+ - Implementation Summary
132
+ - Test Report
133
+ - Review Report (all findings resolved)
134
+ - List of documentation files updated (if any)
135
+
136
+ The feature is complete only when: all tests pass, no CRITICAL review findings
137
+ remain, and documentation reflects the implemented behavior.
@@ -0,0 +1,148 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Run the bug fix workflow — risk-based routing through task
4
+ validation, implementation, testing, and optional review.
5
+ ---
6
+
7
+ # Bug Fix Workflow
8
+
9
+ Bug description: $ARGUMENTS
10
+
11
+ Provide the following information in $ARGUMENTS:
12
+
13
+ - What is the incorrect behavior (actual)
14
+ - What is the expected behavior
15
+ - Steps to reproduce
16
+ - Environment or version where the bug occurs (if known)
17
+ - Any relevant error messages or stack traces
18
+
19
+ ---
20
+
21
+ ## Step 0 — CCEP 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 role)
44
+
45
+ Invoke the `task-coach` subagent via the Task tool.
46
+
47
+ Produce a Task Card that includes:
48
+
49
+ - A clear statement of actual vs. expected behavior
50
+ - Reproduction steps (or a note that they are unknown)
51
+ - Risk classification: `low`, `medium`, or `high`
52
+ - Scope: which files or modules are likely affected
53
+
54
+ If reproduction steps are missing, ask for them before classifying risk. A bug
55
+ without a reproduction path cannot be classified reliably.
56
+
57
+ Capture evidence before tests: reproduction, logs or stack traces, and one
58
+ falsifiable hypothesis of the root cause. Do not patch without that evidence.
59
+ Redact secrets, tokens, and credential dumps from logs before they enter the
60
+ Task Card. Summarize stack traces; do not paste env files.
61
+
62
+ **STOP here. Show the Task Card and wait for human confirmation.**
63
+
64
+ ---
65
+
66
+ ## Step 3 — Route by risk
67
+
68
+ Read the risk field from the Task Card and follow the corresponding route.
69
+
70
+ ### Low-risk route
71
+
72
+ Applies when: the bug is isolated to a single component, existing tests cover
73
+ the affected code, and no public API or shared state is involved.
74
+
75
+ Route: Task Coach → Tester → Implementer
76
+
77
+ Proceed directly to Step 3 (tests), then Step 4a.
78
+
79
+ ### Medium or high-risk route
80
+
81
+ Applies when: the bug touches shared state, a public API, auth or payment paths,
82
+ database writes, or the root cause is not yet understood.
83
+
84
+ Route: Task Coach → Architect → Tester → Implementer → Reviewer
85
+
86
+ Invoke the `architect` subagent before implementation. Architect must:
87
+
88
+ - Identify the root cause (or document that it is unknown)
89
+ - Define the fix approach and affected files
90
+ - Flag any regression risk to adjacent components
91
+ - Produce a Technical Plan
92
+
93
+ **STOP here if high-risk. Show the Technical Plan and wait for human approval
94
+ before continuing.**
95
+
96
+ ---
97
+
98
+ ## Step 4 — Regression tests (Tester role)
99
+
100
+ Invoke the `tester` subagent via the Task tool. Apply for all risk levels.
101
+
102
+ 1. Write a regression test that reproduces the original bug and confirm it fails
103
+ before any fix (RED).
104
+ 2. Verify that existing tests still pass.
105
+ 3. Produce a Test Report: test added, case covered.
106
+
107
+ ---
108
+
109
+ ## Step 5a — Implementation, low-risk (Implementer role)
110
+
111
+ Invoke the `implementer` subagent via the Task tool. Use the Task Card.
112
+ Implementer creates a Git Worktree before touching any file; all edits happen inside it.
113
+
114
+ 1. Locate the defect using the reproduction steps.
115
+ 2. Apply the minimal fix — no unrelated changes.
116
+ 3. Run the suite and make the RED regression test pass.
117
+ 4. Produce an Implementation Summary: root cause, fix applied, files changed.
118
+
119
+ ---
120
+
121
+ ## Step 5b — Implementation, medium/high-risk (Implementer role)
122
+
123
+ Invoke the `implementer` subagent via the Task tool. Use the approved
124
+ Technical Plan and the Task Card.
125
+ Implementer creates a Git Worktree before touching any file; all edits happen inside it.
126
+
127
+ Follow the plan exactly. Any deviation requires a new Technical Plan approval.
128
+ After implementation, run the full test suite.
129
+
130
+ ---
131
+
132
+ ## Step 6 — Review (Reviewer role) — medium/high-risk only
133
+
134
+ Invoke the `reviewer` subagent via the Task tool. Use the diff and Task
135
+ Card.
136
+
137
+ Produce a Review Report with CRITICAL / WARNING / SUGGESTION findings. If any
138
+ CRITICAL findings exist, **STOP**. Do not close the fix until they are resolved.
139
+
140
+ ---
141
+
142
+ ## Completion
143
+
144
+ Report: Task Card, Implementation Summary, regression test added, Review Report
145
+ (if applicable).
146
+
147
+ The fix is complete only when: the regression test passes, the full suite
148
+ passes, and no CRITICAL review findings remain.
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Compact the session into gitignored `.codeconductor/sessions/handoff.md` (redact secrets).
4
+ ---
5
+
6
+ # Handoff Workflow
7
+
8
+ Handoff request: $ARGUMENTS
9
+
10
+ ## Step 0 — CCEP Bootstrap
11
+
12
+ Command: `handoff` (fixed for this workflow — do not infer from user text)
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.
19
+
20
+ ---
21
+
22
+ ## Step 1 — Compact (docs)
23
+
24
+ Invoke `docs`. Write **only** `.codeconductor/sessions/handoff.md` (gitignored).
25
+ Do not write `.codeconductor/handoff.md` or any tracked path.
26
+
27
+ Before writing, redact secrets, tokens, API keys, passwords, connection strings,
28
+ `.env` contents, and log/stack-trace lines that embed those values. Summarize
29
+ errors instead of pasting dumps. If unresolved credential material remains, stop
30
+ and wait for a human (CCEP `stopOnHighRisk`).
31
+
32
+ Include: goal, Task Card status (no secret fields), files touched, test
33
+ pass/fail (not log dumps), open questions, and the next `/cc:` command.
34
+
35
+ Do not edit source or tests.
36
+
37
+ ---
38
+
39
+ ## Completion
40
+
41
+ Report the handoff path. Another session should be able to continue from that file alone.
@@ -0,0 +1,133 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Run the advanced iterative workflow — Wayfinding AST discovery,
4
+ Relentless Grilling, contract and spec design, TDD, council review, and docs.
5
+ ---
6
+
7
+ # Advanced Iterative Workflow
8
+
9
+ Iterative request: $ARGUMENTS
10
+
11
+ ---
12
+
13
+ ## Step 0 — CCEP Bootstrap
14
+
15
+ Command: `iterative` (fixed for this workflow — do not infer from user text)
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.
22
+ Canonical delivery order is test-before-implement whenever both phases apply.
23
+
24
+ ---
25
+
26
+ ## Step 1 — Wayfinding (repo-explorer)
27
+
28
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
29
+ `graphify path` / `graphify explain` when two modules or one concept need a
30
+ scoped subgraph). Then invoke the `repo-explorer` subagent via the Task tool
31
+ with that graph output.
32
+
33
+ repo-explorer maps directory trees, conventions, god nodes, and affected
34
+ modules. Do not write code in this step. Write a short phase handoff (scope,
35
+ files, open questions) before the next phase — do not chain agents on unspoken
36
+ context.
37
+
38
+ ---
39
+
40
+ ## Step 2 — Relentless Grilling & Task Card (task-coach)
41
+
42
+ Invoke the `task-coach` subagent via the Task tool.
43
+
44
+ Produce a complete Task Card. The Task Card is ready when it contains: title,
45
+ type, risk classification, scope, context, acceptance criteria, and
46
+ constraints, and every assumption behind it has survived one grilling
47
+ question (Grilling protocol).
48
+
49
+ If any field is missing or ambiguous, ask one clarifying question at a time and
50
+ wait for the answer. Do not proceed with an incomplete Task Card.
51
+
52
+ **STOP here.** Unresolved grilling questions or missing fields populate
53
+ `questionsForUser` in the CCEP-1 `planner-output`; the `ConfirmationGate`
54
+ (`ccep evaluate`) reads that field and halts the workflow until a human
55
+ answers. Show the completed Task Card and wait for that confirmation before
56
+ continuing.
57
+
58
+ ---
59
+
60
+ ## Step 3 — Contract & Technical Plan (contract-builder & architect)
61
+
62
+ Invoke `contract-builder` then `architect` via the Task tool.
63
+
64
+ 1. Define API contracts, JSON Schemas, or TypeScript interfaces.
65
+ 2. Formulate the Technical Plan (chosen approach, affected files, trade-offs).
66
+ 3. Apply YAGNI, Simplicity First, and Stdlib-First.
67
+
68
+ **STOP here. Show the Technical Plan and wait for explicit human approval. Do
69
+ not proceed to tests until the plan is approved.**
70
+
71
+ ---
72
+
73
+ ## Step 4 — Test coverage (Tester role)
74
+
75
+ Invoke the `tester` subagent via the Task tool.
76
+
77
+ 1. Write or extend failing tests for the new behavior before implementation (RED).
78
+ 2. Ensure all acceptance criteria from the Task Card have at least one test.
79
+ 3. Produce a Test Report: test files added or modified, cases covered.
80
+
81
+ ---
82
+
83
+ ## Step 5 — Implementation (Implementer role)
84
+
85
+ Invoke the `implementer` subagent via the Task tool.
86
+
87
+ Use the approved Technical Plan, contracts, and the failing tests.
88
+ Implementer creates a Git Worktree before touching any file; all edits happen
89
+ inside it.
90
+
91
+ 1. Read the Technical Plan before touching any file.
92
+ 2. Apply the minimal diff — only what the plan specifies.
93
+ 3. Run the project test suite and make the previously written failing tests pass.
94
+ 4. If tests fail, run up to 3 repair cycles (`implementer` → `tester`).
95
+ 5. Produce an Implementation Summary: what changed, which files, how to verify
96
+ locally.
97
+
98
+ ---
99
+
100
+ ## Step 6 — Multi-Perspective Council Review
101
+
102
+ Invoke the `council` skill on the generated diff (`council-review` phase).
103
+
104
+ The council evaluates Architecture, Security, Product, Delivery, DataOps, and
105
+ Devil. `security-reviewer` may set `securityVeto: true`; that REJECTED verdict
106
+ overrides majority consensus.
107
+
108
+ If ANY agent votes CRITICAL:
109
+ - The Review Report status is **BLOCKED**.
110
+ - Return to Step 5 with the feedback.
111
+
112
+ If APPROVED (no CRITICAL findings), continue.
113
+
114
+ ---
115
+
116
+ ## Step 7 — Documentation (Docs role)
117
+
118
+ Invoke the `docs` subagent via the Task tool when a public API, public module,
119
+ or user-visible behavior changed.
120
+
121
+ Update: README (if applicable), OpenAPI spec (if applicable), CHANGELOG
122
+ (always when implementation changed), ADR (if an architectural decision was
123
+ made).
124
+
125
+ If `graphify-out/` is in use, run `graphify update .` (AST-only).
126
+
127
+ ---
128
+
129
+ ## Completion
130
+
131
+ The iterative workflow is complete only when: all tests pass, the council
132
+ approves the spec and the diff, no CRITICAL findings remain, and documentation
133
+ and the knowledge graph reflect the implemented behavior.
@@ -0,0 +1,159 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Run OpenSpec backlog delivery — validate BACKLOG.md, plan TaskCards,
4
+ orchestrate agents by phase, review gate, and update backlog state.
5
+ ---
6
+
7
+ # OpenSpec Backlog Workflow
8
+
9
+ Scope: $ARGUMENTS
10
+
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
+
13
+ ---
14
+
15
+ ---
16
+
17
+ ## Step 0 — CCEP Bootstrap
18
+
19
+ Command: `openspec` (fixed for this workflow — do not infer from user text)
20
+
21
+ 1. Run: `npx cc-codeconductor ccep parse --command openspec "$ARGUMENTS" --output json`
22
+ 2. Run: `npx cc-codeconductor ccep resolve --command openspec "$ARGUMENTS" --output json`
23
+ 3. Run: `npx cc-codeconductor ccep profile openspec --output json`
24
+ 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.
25
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
26
+ Canonical delivery order is test-before-implement whenever both phases apply.
27
+
28
+ ---
29
+
30
+ ## Step 1 — Validate (mandatory gate)
31
+
32
+ Run:
33
+
34
+ ```bash
35
+ npx cc-codeconductor openspec validate
36
+ ```
37
+
38
+ If validation fails:
39
+
40
+ 1. List all errors and recommendations from the CLI output.
41
+ 2. Show the canonical BACKLOG.md structure (## Global, ## Items, ### BC-001 | Title, Priority, Status, Type, Depends on, Description, Scope, Acceptance).
42
+ 3. **STOP.** Do not scan, plan, or execute until the user fixes BACKLOG.md.
43
+
44
+ ---
45
+
46
+ ## Step 2 — Scan
47
+
48
+ Run:
49
+
50
+ ```bash
51
+ npx cc-codeconductor openspec scan
52
+ ```
53
+
54
+ Report: new items, modified items, closed/archived items, and whether the file changed.
55
+
56
+ ---
57
+
58
+ ## Step 3 — Select item
59
+
60
+ If `$ARGUMENTS` contains a `BC-xxx` ID, use that item. Otherwise run:
61
+
62
+ ```bash
63
+ npx cc-codeconductor openspec status
64
+ ```
65
+
66
+ Pick the next `READY` item with satisfied dependencies (FIFO by priority). Skip items in `DONE` or `Archive`.
67
+
68
+ **STOP if no eligible item.** Report backlog status and wait for the user.
69
+
70
+ ---
71
+
72
+ ## Step 4 — Plan
73
+
74
+ Run:
75
+
76
+ ```bash
77
+ npx cc-codeconductor openspec plan <BC-id>
78
+ ```
79
+
80
+ Show:
81
+
82
+ - Generated TaskCards (discover → design → test → implement → review when TDD required)
83
+ - Path to `openspec/changes/<slug>/` (proposal, design, tasks, specs)
84
+
85
+ Update BACKLOG item status to `PLANNED` (CLI does this automatically).
86
+
87
+ ---
88
+
89
+ ## Step 5 — Model matrix and execute loop
90
+
91
+ Before executing phases, show resolved models:
92
+
93
+ ```bash
94
+ npx cc-codeconductor scorecard models
95
+ ```
96
+
97
+ For each pending TaskCard, run:
98
+
99
+ ```bash
100
+ npx cc-codeconductor openspec next
101
+ ```
102
+
103
+ Invoke the agent named on the card with **isolated** context (`/clear` between phases unless continuation is required):
104
+
105
+ | Phase | Agent | Role |
106
+ |-------|-------|------|
107
+ | discover | repo-explorer | Map repo and impact |
108
+ | design | architect | Technical plan |
109
+ | test | tester | TDD tests (before implement if TDD required) |
110
+ | implement | implementer | Minimal diff in worktree |
111
+ | review | reviewer | Acceptance + scope gate |
112
+
113
+ Use the model configured in the installed preset for each agent role.
114
+
115
+ After each phase:
116
+
117
+ - Mark progress in deliverable summary.
118
+ - Set TaskCard status to `done` in `.codeconductor/openspec-state.json` when phase completes.
119
+
120
+ Implementer: create a Git worktree before editing (`git worktree add ../<branch>-session <branch>`).
121
+
122
+ ---
123
+
124
+ ## Step 6 — Review gate
125
+
126
+ Run regression when BACKLOG Global `Review required: yes`:
127
+
128
+ ```bash
129
+ npx cc-codeconductor scorecard regression
130
+ ```
131
+
132
+ The `reviewer` agent must verify:
133
+
134
+ - All acceptance criteria from BACKLOG.md
135
+ - Tests pass
136
+ - Scope matches the backlog item
137
+ - No architectural violations
138
+
139
+ If **rejected**: set item status `IN_PROGRESS`, record findings in state, **STOP** and report to user.
140
+
141
+ If **approved**: proceed to Step 6.
142
+
143
+ ---
144
+
145
+ ## Step 7 — Scorecard and update backlog
146
+
147
+ 1. `npx cc-codeconductor scorecard create --task <BC-id> --from-diff`
148
+ 2. Complete criteria; `scorecard record` with verdict and optional cost/tokens
149
+ 3. Set item `Progress: 100%`, `Status: DONE` if PASS
150
+ 4. Move item to `## Archive` in BACKLOG.md if DONE
151
+ 5. Run `npx cc-codeconductor openspec scan`
152
+
153
+ Report completion: Task Cards executed, scorecard verdict, change folder path, files changed.
154
+
155
+ ---
156
+
157
+ ## Skill
158
+
159
+ Apply `.claude/skills/openspec/SKILL.md` for backlog format rules and state transitions.