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
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: impact-analyst
3
+ description: Produces ImpactReport before medium/high-risk changes — endpoints, contracts, tests, flows affected.
4
+ ---
5
+
6
+ # Impact Analyst
7
+
8
+ You are the **Impact Analyst** for CodeConductor. Before implementation of
9
+ medium or high-risk tasks, you analyze blast radius using the product graph.
10
+
11
+ ## Input
12
+
13
+ - Task Card with `targetFiles` or capability ID
14
+ - Product graph context from `cc impact` or CCEP `knowledge`
15
+
16
+ ## Output
17
+
18
+ Structured `ImpactReport`:
19
+
20
+ ```json
21
+ {
22
+ "target": "string",
23
+ "brokenEndpoints": ["string"],
24
+ "brokenContracts": ["string"],
25
+ "affectedTests": ["string"],
26
+ "affectedFlows": ["string"],
27
+ "affectedComponents": ["string"],
28
+ "summary": "If you implement this, you may affect: ..."
29
+ }
30
+ ```
31
+
32
+ ## Process
33
+
34
+ 1. Map target files to product graph components
35
+ 2. Traverse `depends_on`, `affects`, `implements` relations
36
+ 3. List contracts, tests, and flows at risk
37
+ 4. Summarize in one actionable sentence
38
+
39
+ ## Constraints
40
+
41
+ - Read-only analysis — no code changes
42
+ - Cite graph node IDs in summary when available
43
+ - Block routing to implementer if critical contracts lack migration plan
@@ -95,22 +95,22 @@ regression.
95
95
 
96
96
  | Task type | Risk | Route |
97
97
  | ------------------ | ----------- | ------------------------------------------------------------------ |
98
- | New feature | high | `architect` → `implementer` → `tester` → `security-reviewer` → `reviewer` |
99
- | New feature | low-medium | `architect` → `implementer` → `tester` → `reviewer` |
98
+ | New feature | high | `architect` → `tester` → `implementer` → `security-reviewer` → `reviewer` |
99
+ | New feature | low-medium | `architect` → `tester` → `implementer` → `reviewer` |
100
100
  | Performance Opt | medium | `task-coach` → `implementer` → `reviewer` |
101
- | Bug fix | low | `implementer` → `tester` |
102
- | Bug fix | medium–high | `task-coach` → `architect` → `implementer` → `tester` → `reviewer` |
101
+ | Bug fix | low | `tester` → `implementer` |
102
+ | Bug fix | medium–high | `task-coach` → `architect` → `tester` → `implementer` → `reviewer` |
103
103
  | Refactor | low | `architect` → `implementer` |
104
104
  | Refactor | medium–high | `architect` → `implementer` → `reviewer` |
105
105
  | API change | any | `architect` → `implementer` → `reviewer` |
106
- | Database migration | any | `architect` → `implementer` → `tester` → `reviewer` |
106
+ | Database migration | any | `architect` → `tester` → `implementer` → `reviewer` |
107
107
  | Test coverage | any | `tester` |
108
108
  | Documentation | any | `docs` |
109
109
  | Codebase question | any | `repo-explorer` |
110
110
  | Code review | any | `reviewer` |
111
111
  | Task unclear | any | `task-coach` |
112
112
  | Multi-step goal | any | `goal-planner` → [dependency-ordered agents] |
113
- | DDD→SDD→TDD | any | `contract-builder` → `architect` → `implementer` → `tester` |
113
+ | DDD→SDD→TDD | any | `contract-builder` → `architect` → `tester` → `implementer` |
114
114
 
115
115
  ---
116
116
 
@@ -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
  Invoke the `task-coach` subagent via the Task tool.
@@ -0,0 +1,55 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Recommend one CodeConductor slash command from a natural-language
4
+ problem. Does not start that workflow.
5
+ ---
6
+
7
+ # Ask — recommend a slash command
8
+
9
+ Problem: $ARGUMENTS
10
+
11
+ This is a **router**, not a delivery workflow. Recommend exactly one command.
12
+ Do **not** run the recommended `/cc:` command unless the human confirms.
13
+
14
+ ---
15
+
16
+ ## Step 1 — Recommend (deterministic)
17
+
18
+ Run (local repo: `bun run dev`; published package: `npx cc-codeconductor`):
19
+
20
+ ```bash
21
+ bun run dev ask "$ARGUMENTS" --output json
22
+ ```
23
+
24
+ or:
25
+
26
+ ```bash
27
+ npx cc-codeconductor ask "$ARGUMENTS" --output json
28
+ ```
29
+
30
+ The catalog is only:
31
+
32
+ | Slash | When |
33
+ | ----- | ---- |
34
+ | `/cc:feature` | new behavior |
35
+ | `/cc:fix` | bug / regression |
36
+ | `/cc:refactor` | structure, no behavior change |
37
+ | `/cc:review` | inspect a diff/PR |
38
+ | `/cc:tdd-cycle` | red → green → refactor |
39
+ | `/cc:openspec` | BACKLOG / BC-xxx delivery |
40
+
41
+ If the CLI is unavailable, apply the same catalog and the same priority:
42
+ openspec → tdd-cycle → review → refactor → fix → feature (default).
43
+
44
+ ---
45
+
46
+ ## Step 2 — Show and stop
47
+
48
+ Print:
49
+
50
+ - **Recommended:** the slash command
51
+ - **Why:** one or two sentences from the CLI `reason` (or your matching)
52
+
53
+ **STOP.** Wait for the human. Do not invoke the recommended workflow.
54
+
55
+ For a full preset inventory (skills, commands on disk), use `/cc:help` / `cc-help`.
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Re-explain the last deliverable in Task Card vocabulary when it did not land.
4
+ ---
5
+
6
+ # Clarify Workflow
7
+
8
+ Clarify request: $ARGUMENTS
9
+
10
+ ## Step 0 — CCEP Bootstrap
11
+
12
+ Command: `clarify` (fixed for this workflow — do not infer from user text)
13
+
14
+ 1. Run: `npx cc-codeconductor ccep parse --command clarify "$ARGUMENTS" --output json`
15
+ 2. Run: `npx cc-codeconductor ccep resolve --command clarify "$ARGUMENTS" --output json`
16
+ 3. Run: `npx cc-codeconductor ccep profile clarify --output json`
17
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command clarify --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
18
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
19
+
20
+ ---
21
+
22
+ ## Step 1 — Re-explain (task-coach)
23
+
24
+ Invoke `task-coach` / `orchestrator`. Restate the last Task Card, plan, or review in the project's vocabulary. Do not add new scope. If questions remain, one question per branch.
25
+
26
+ **STOP if ConfirmationGate reports questions.**
27
+
28
+ ---
29
+
30
+ ## Completion
31
+
32
+ A plain-language restatement plus any remaining questions. Then resume the previous workflow.
@@ -0,0 +1,87 @@
1
+ ---
2
+ description: Council-driven workflow with CCEP-1 bootstrap
3
+ ---
4
+
5
+ # Council-Driven Workflow
6
+
7
+ Task request: $ARGUMENTS
8
+
9
+ ## Step 0 — CCEP Bootstrap
10
+
11
+ Command: `council` (fixed for this workflow — do not infer from user text)
12
+ command: council
13
+
14
+ 1. Run: `npx cc-codeconductor ccep parse --command council "$ARGUMENTS" --output json`
15
+ 2. Run: `npx cc-codeconductor ccep resolve --command council "$ARGUMENTS" --output json`
16
+ 3. Run: `npx cc-codeconductor ccep profile council --output json`
17
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command council --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
18
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
19
+
20
+ ---
21
+
22
+ ## Step 1 — Wayfinding (repo-explorer)
23
+
24
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
25
+ `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
26
+ to map impact radius before deliberation. Do not write code in this step.
27
+
28
+ ---
29
+
30
+ ## Step 2 — Deliberation & Specification (SDD)
31
+
32
+ Invoke the `council` skill to analyze the request before writing any code. The council must act as a steering committee involving `task-coach` (Product), `architect`, and `devil`.
33
+
34
+ The council must:
35
+ 1. Clarify the prompt and define the absolute minimum scope (Simplicity Gate).
36
+ 2. Explicitly document all assumptions and run the Grilling protocol on each one (Think Before Coding).
37
+ 3. Draft a Task Card & Technical Plan (The Specification).
38
+
39
+ **STOP here.** Unresolved grilling questions populate `questionsForUser` in the
40
+ CCEP-1 `planner-output`; `ccep evaluate` (ConfirmationGate) halts until a human
41
+ answers. Show the agreed Task Card & Technical Plan and wait for confirmation
42
+ before continuing.
43
+
44
+ ---
45
+
46
+ ## Step 3 — Test Definition (TDD)
47
+
48
+ Invoke `tester` with the approved Task Card & Technical Plan.
49
+
50
+ tester must:
51
+ 1. Write failing tests based on the Acceptance Criteria defined in the Task Card.
52
+ 2. Confirm the tests fail as expected (Red state).
53
+
54
+ **Goal-Driven Execution (Karpathy)**: Do not proceed until verifiable tests are written and fail for the correct reasons.
55
+
56
+ ---
57
+
58
+ ## Step 4 — Surgical Implementation
59
+
60
+ Invoke `implementer` with the failing tests and the Technical Plan.
61
+
62
+ implementer must:
63
+ 1. Write the minimal code required to pass the tests.
64
+ 2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
65
+ 3. NOT refactor adjacent code, change existing styles, or build speculative features.
66
+ 4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state).
67
+
68
+ ---
69
+
70
+ ## Step 5 — Multi-Perspective Council Review
71
+
72
+ Invoke the `council` skill on the generated diff to perform the final review phase.
73
+
74
+ The council will evaluate the diff against the 6 axes (Architecture, Security, Product, Delivery, DataOps, Devil).
75
+
76
+ If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
77
+ - The Review Report status is **BLOCKED**.
78
+ - Return to Step 4 with the feedback.
79
+
80
+ If APPROVED (no CRITICAL findings):
81
+ - Deliver the final Council Verdict and the diff summary.
82
+
83
+ ---
84
+
85
+ ## Completion
86
+
87
+ Deliver the complete Council Verdict. The feature is only complete when tests pass and the council explicitly approves the implementation according to the specification.
@@ -8,6 +8,19 @@ description: >-
8
8
 
9
9
  Migration request: $ARGUMENTS
10
10
 
11
+ ## Step 0 — CCEP Bootstrap
12
+
13
+ Command: `db-migration` (fixed for this workflow — do not infer from user text)
14
+
15
+ 1. Run: `npx cc-codeconductor ccep parse --command db-migration "$ARGUMENTS" --output json`
16
+ 2. Run: `npx cc-codeconductor ccep resolve --command db-migration "$ARGUMENTS" --output json`
17
+ 3. Run: `npx cc-codeconductor ccep profile db-migration --output json`
18
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command db-migration --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
19
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
20
+ Canonical delivery order is test-before-implement whenever both phases apply.
21
+
22
+ ---
23
+
11
24
  ## Step 1 — Task Card validation (Task Coach role)
12
25
 
13
26
  Invoke the `task-coach` subagent via the Task tool.
@@ -31,22 +44,22 @@ rollback/forward-fix notes, and test approach.
31
44
 
32
45
  ---
33
46
 
34
- ## Step 3 — Implementation (Implementer role)
47
+ ## Step 3 — Migration Tests (Tester role)
35
48
 
36
- Invoke the `implementer` subagent via the Task tool.
49
+ Invoke the `tester` subagent via the Task tool.
37
50
 
38
- Keep model and migration changes together, avoid unrelated refactors, and
39
- preserve the deployment order specified by architect.
51
+ Cover migration-sensitive behavior where the stack supports it, including
52
+ existing-data edge cases and rollback/forward-fix notes when automated rollback
53
+ tests are not practical.
40
54
 
41
55
  ---
42
56
 
43
- ## Step 4 — Migration Tests (Tester role)
57
+ ## Step 4 — Implementation (Implementer role)
44
58
 
45
- Invoke the `tester` subagent via the Task tool.
59
+ Invoke the `implementer` subagent via the Task tool.
46
60
 
47
- Cover migration-sensitive behavior where the stack supports it, including
48
- existing-data edge cases and rollback/forward-fix notes when automated rollback
49
- tests are not practical.
61
+ Keep model and migration changes together, avoid unrelated refactors, and
62
+ preserve the deployment order specified by architect.
50
63
 
51
64
  ---
52
65
 
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Map the repository and recommend the next CodeConductor slash command. Read-only.
4
+ ---
5
+
6
+ # Explore Workflow
7
+
8
+ Explore request: $ARGUMENTS
9
+
10
+ ## Step 0 — CCEP Bootstrap
11
+
12
+ Command: `explore` (fixed for this workflow — do not infer from user text)
13
+
14
+ 1. Run: `npx cc-codeconductor ccep parse --command explore "$ARGUMENTS" --output json`
15
+ 2. Run: `npx cc-codeconductor ccep resolve --command explore "$ARGUMENTS" --output json`
16
+ 3. Run: `npx cc-codeconductor ccep profile explore --output json`
17
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command explore --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
18
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
19
+
20
+ ---
21
+
22
+ ## Step 1 — Map (repo-explorer)
23
+
24
+ If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"`. Invoke `repo-explorer`. Produce a Repo Map. Do not write code.
25
+
26
+ ---
27
+
28
+ ## Step 2 — Suggest next command (orchestrator)
29
+
30
+ Recommend exactly one next slash command (`/cc:feature`, `/cc:fix`, `/cc:refactor`, `/cc:review`, `/cc:triage`, …) with a one-sentence rationale. Do not start that workflow.
31
+
32
+ ---
33
+
34
+ ## Completion
35
+
36
+ Report the Repo Map and the recommended next `/cc:` command.
@@ -10,7 +10,29 @@ Feature request: $ARGUMENTS
10
10
 
11
11
  ---
12
12
 
13
- ## Step 1Task Card validation (Task Coach role)
13
+ ## Step 0CCEP 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)
14
36
 
15
37
  Invoke the `task-coach` subagent via the Task tool.
16
38
 
@@ -25,7 +47,7 @@ continuing.**
25
47
 
26
48
  ---
27
49
 
28
- ## Step 2 — Technical Plan (Architect role)
50
+ ## Step 3 — Technical Plan (Architect role)
29
51
 
30
52
  Invoke the `architect` subagent via the Task tool.
31
53
 
@@ -43,7 +65,20 @@ not proceed to implementation until the plan is approved.**
43
65
 
44
66
  ---
45
67
 
46
- ## Step 3Implementation (Implementer role)
68
+ ## Step 4Test 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)
47
82
 
48
83
  Invoke the `implementer` subagent via the Task tool.
49
84
 
@@ -52,26 +87,13 @@ Implementer creates a Git Worktree before touching any file; all edits happen in
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 role)
62
-
63
- Invoke the `tester` subagent via the Task tool.
64
-
65
- Use the Implementation Summary and the Task Card.
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 Test Report: test files added or modified, cases covered.
71
-
72
- ---
73
-
74
- ## Step 5 — Code review (Reviewer role)
96
+ ## Step 6Code review (Reviewer role)
75
97
 
76
98
  Invoke the `reviewer` subagent via the Task tool.
77
99
 
@@ -85,7 +107,7 @@ they are resolved and the diff is re-reviewed.
85
107
 
86
108
  ---
87
109
 
88
- ## Step 6 — Documentation (Docs role)
110
+ ## Step 7 — Documentation (Docs role)
89
111
 
90
112
  Invoke the `docs` subagent via the Task tool.
91
113
 
@@ -18,7 +18,29 @@ Provide the following information in $ARGUMENTS:
18
18
 
19
19
  ---
20
20
 
21
- ## Step 1Task Card validation (Task Coach role)
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 role)
22
44
 
23
45
  Invoke the `task-coach` subagent via the Task tool.
24
46
 
@@ -32,11 +54,16 @@ Produce a Task Card that includes:
32
54
  If reproduction steps are missing, ask for them before classifying risk. A bug
33
55
  without a reproduction path cannot be classified reliably.
34
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
+
35
62
  **STOP here. Show the Task Card and wait for human confirmation.**
36
63
 
37
64
  ---
38
65
 
39
- ## Step 2 — Route by risk
66
+ ## Step 3 — Route by risk
40
67
 
41
68
  Read the risk field from the Task Card and follow the corresponding route.
42
69
 
@@ -45,16 +72,16 @@ Read the risk field from the Task Card and follow the corresponding route.
45
72
  Applies when: the bug is isolated to a single component, existing tests cover
46
73
  the affected code, and no public API or shared state is involved.
47
74
 
48
- Route: Task Coach → ImplementerTester
75
+ Route: Task Coach → TesterImplementer
49
76
 
50
- Proceed directly to Step 3a.
77
+ Proceed directly to Step 3 (tests), then Step 4a.
51
78
 
52
79
  ### Medium or high-risk route
53
80
 
54
81
  Applies when: the bug touches shared state, a public API, auth or payment paths,
55
82
  database writes, or the root cause is not yet understood.
56
83
 
57
- Route: Task Coach → Architect → ImplementerTester → Reviewer
84
+ Route: Task Coach → Architect → TesterImplementer → Reviewer
58
85
 
59
86
  Invoke the `architect` subagent before implementation. Architect must:
60
87
 
@@ -68,19 +95,30 @@ before continuing.**
68
95
 
69
96
  ---
70
97
 
71
- ## Step 3aImplementation, low-risk (Implementer role)
98
+ ## Step 4Regression 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)
72
110
 
73
111
  Invoke the `implementer` subagent via the Task tool. Use the Task Card.
74
112
  Implementer creates a Git Worktree before touching any file; all edits happen inside it.
75
113
 
76
114
  1. Locate the defect using the reproduction steps.
77
115
  2. Apply the minimal fix — no unrelated changes.
78
- 3. Run the test suite.
116
+ 3. Run the suite and make the RED regression test pass.
79
117
  4. Produce an Implementation Summary: root cause, fix applied, files changed.
80
118
 
81
119
  ---
82
120
 
83
- ## Step 3b — Implementation, medium/high-risk (Implementer role)
121
+ ## Step 5b — Implementation, medium/high-risk (Implementer role)
84
122
 
85
123
  Invoke the `implementer` subagent via the Task tool. Use the approved
86
124
  Technical Plan and the Task Card.
@@ -91,18 +129,7 @@ After implementation, run the full test suite.
91
129
 
92
130
  ---
93
131
 
94
- ## Step 4Regression tests (Tester role)
95
-
96
- Invoke the `tester` subagent via the Task tool. Apply for all risk levels.
97
-
98
- 1. Write a regression test that reproduces the original bug (fails before the
99
- fix, passes after).
100
- 2. Verify that existing tests still pass.
101
- 3. Produce a Test Report: test added, case covered.
102
-
103
- ---
104
-
105
- ## Step 5 — Review (Reviewer role) — medium/high-risk only
132
+ ## Step 6Review (Reviewer role) — medium/high-risk only
106
133
 
107
134
  Invoke the `reviewer` subagent via the Task tool. Use the diff and Task
108
135
  Card.
@@ -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.