cc-codeconductor 1.1.0 → 1.2.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.
- package/README.md +4 -2
- package/dist/core/verification/verification-runner.d.ts +7 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1413 -309
- package/dist/library.js +29 -1
- package/dist/validation/schemas.d.ts +97 -26
- package/package.json +1 -1
- package/presets/agy/AGENTS.md +10 -9
- package/presets/agy/hooks.json +2 -2
- package/presets/agy/scripts/invoke-hook.cjs +115 -0
- package/presets/agy/skills/backlog/SKILL.md +40 -70
- package/presets/agy/skills/cc-spec-mutation/SKILL.md +165 -0
- package/presets/agy/skills/cc-tdd-cycle/SKILL.md +3 -0
- package/presets/agy/skills/evaluation/SKILL.md +61 -2
- package/presets/agy/skills/openspec/SKILL.md +49 -19
- package/presets/agy/skills/testing-tdd/SKILL.md +53 -0
- package/presets/agy/skills/using-cc-skills/SKILL.md +48 -0
- package/presets/agy/workflows/cc-api-contract.md +14 -0
- package/presets/agy/workflows/cc-db-migration.md +14 -0
- package/presets/agy/workflows/cc-feature.md +18 -0
- package/presets/agy/workflows/cc-fix.md +14 -0
- package/presets/agy/workflows/cc-iterative.md +14 -0
- package/presets/agy/workflows/cc-openspec.md +14 -0
- package/presets/agy/workflows/cc-scorecard.md +2 -0
- package/presets/agy/workflows/cc-spec-mutation.md +191 -0
- package/presets/agy/workflows/cc-tdd-cycle.md +14 -0
- package/presets/claude/commands/cc/api-contract.md +14 -0
- package/presets/claude/commands/cc/db-migration.md +14 -0
- package/presets/claude/commands/cc/feature.md +18 -0
- package/presets/claude/commands/cc/fix.md +17 -0
- package/presets/claude/commands/cc/iterative.md +14 -0
- package/presets/claude/commands/cc/openspec.md +14 -0
- package/presets/claude/commands/cc/review.md +3 -0
- package/presets/claude/commands/cc/scorecard.md +2 -0
- package/presets/claude/commands/cc/spec-mutation.md +190 -0
- package/presets/claude/commands/cc/tdd-cycle.md +17 -0
- package/presets/claude/settings.json +13 -11
- package/presets/claude/skills/backlog/SKILL.md +40 -70
- package/presets/claude/skills/evaluation/SKILL.md +47 -24
- package/presets/claude/skills/openspec/SKILL.md +46 -38
- package/presets/claude/skills/testing-tdd/SKILL.md +53 -0
- package/presets/claude/skills/using-cc-skills/SKILL.md +48 -0
- package/presets/codex/AGENTS.md +16 -12
- package/presets/codex/skills/backlog/SKILL.md +61 -0
- package/presets/codex/skills/cc-api-contract/SKILL.md +87 -0
- package/presets/codex/skills/cc-backlog/SKILL.md +108 -0
- package/presets/codex/skills/cc-clarify/SKILL.md +36 -0
- package/presets/codex/skills/cc-council/SKILL.md +92 -0
- package/presets/codex/skills/cc-db-migration/SKILL.md +88 -0
- package/presets/codex/skills/cc-explore/SKILL.md +40 -0
- package/presets/codex/skills/cc-feature/SKILL.md +154 -0
- package/presets/codex/skills/cc-fix/SKILL.md +165 -0
- package/presets/codex/skills/cc-handoff/SKILL.md +45 -0
- package/presets/codex/skills/cc-iterative/SKILL.md +150 -0
- package/presets/codex/skills/cc-openspec/SKILL.md +191 -0
- package/presets/codex/skills/cc-pagespeed/SKILL.md +124 -0
- package/presets/codex/skills/cc-prototype/SKILL.md +42 -0
- package/presets/codex/skills/cc-refactor/SKILL.md +163 -0
- package/presets/codex/skills/cc-review/SKILL.md +152 -0
- package/presets/codex/skills/cc-scorecard/SKILL.md +82 -0
- package/presets/codex/skills/cc-security/SKILL.md +182 -0
- package/presets/codex/skills/cc-spec-mutation/SKILL.md +192 -0
- package/presets/codex/skills/cc-tdd-cycle/SKILL.md +266 -0
- package/presets/codex/skills/cc-test-plan/SKILL.md +153 -0
- package/presets/codex/skills/cc-triage/SKILL.md +38 -0
- package/presets/codex/skills/evaluation/SKILL.md +65 -0
- package/presets/codex/skills/openspec/SKILL.md +66 -0
- package/presets/codex/skills/testing-tdd/SKILL.md +53 -0
- package/presets/codex/skills/using-cc-skills/SKILL.md +48 -0
- package/presets/cursor/commands/cc/api-contract.md +14 -0
- package/presets/cursor/commands/cc/db-migration.md +14 -0
- package/presets/cursor/commands/cc/feature.md +18 -0
- package/presets/cursor/commands/cc/fix.md +17 -0
- package/presets/cursor/commands/cc/iterative.md +14 -0
- package/presets/cursor/commands/cc/openspec.md +14 -0
- package/presets/cursor/commands/cc/scorecard.md +2 -0
- package/presets/cursor/commands/cc/spec-mutation.md +190 -0
- package/presets/cursor/commands/cc/tdd-cycle.md +14 -0
- package/presets/cursor/skills/backlog/SKILL.md +40 -70
- package/presets/cursor/skills/evaluation/SKILL.md +61 -4
- package/presets/cursor/skills/openspec/SKILL.md +46 -36
- package/presets/cursor/skills/testing-tdd/SKILL.md +35 -574
- package/presets/cursor/skills/using-cc-skills/SKILL.md +48 -0
- package/presets/gemini/commands/cc/api-contract.toml +82 -0
- package/presets/gemini/commands/cc/ask.toml +54 -0
- package/presets/gemini/commands/cc/backlog.toml +103 -0
- package/presets/gemini/commands/cc/clarify.toml +31 -0
- package/presets/gemini/commands/cc/council.toml +87 -0
- package/presets/gemini/commands/cc/db-migration.toml +83 -0
- package/presets/gemini/commands/cc/explore.toml +35 -0
- package/presets/gemini/commands/cc/feature.toml +153 -0
- package/presets/gemini/commands/cc/fix.toml +163 -0
- package/presets/gemini/commands/cc/handoff.toml +40 -0
- package/presets/gemini/commands/cc/iterative.toml +145 -0
- package/presets/gemini/commands/cc/openspec.toml +186 -0
- package/presets/gemini/commands/cc/pagespeed.toml +119 -0
- package/presets/gemini/commands/cc/prototype.toml +37 -0
- package/presets/gemini/commands/cc/refactor.toml +158 -0
- package/presets/gemini/commands/cc/review.toml +150 -0
- package/presets/gemini/commands/cc/scorecard.toml +77 -0
- package/presets/gemini/commands/cc/security.toml +177 -0
- package/presets/gemini/commands/cc/spec-mutation.toml +187 -0
- package/presets/gemini/commands/cc/tdd-cycle.toml +264 -0
- package/presets/gemini/commands/cc/test-plan.toml +148 -0
- package/presets/gemini/commands/cc/triage.toml +33 -0
- package/presets/opencode/README.md +24 -21
- package/presets/opencode/agents/architect.md +6 -0
- package/presets/opencode/agents/implementer.md +7 -0
- package/presets/opencode/agents/reviewer.md +6 -0
- package/presets/opencode/agents/tester.md +6 -0
- package/presets/opencode/commands/cc-api-contract.md +14 -0
- package/presets/opencode/commands/cc-db-migration.md +14 -0
- package/presets/opencode/commands/cc-feature.md +18 -0
- package/presets/opencode/commands/cc-fix.md +17 -0
- package/presets/opencode/commands/cc-iterative.md +14 -0
- package/presets/opencode/commands/cc-openspec.md +14 -0
- package/presets/opencode/commands/cc-scorecard.md +2 -0
- package/presets/opencode/commands/cc-spec-mutation.md +190 -0
- package/presets/opencode/commands/cc-tdd-cycle.md +14 -0
- package/presets/opencode/opencode.jsonc +1 -1
- package/presets/opencode/prompts/v1.0.0/architect.md +6 -0
- package/presets/opencode/prompts/v1.0.0/implementer.md +7 -0
- package/presets/opencode/prompts/v1.0.0/reviewer.md +6 -0
- package/presets/opencode/prompts/v1.0.0/tester.md +6 -0
- package/presets/opencode/skills/backlog/SKILL.md +40 -70
- package/presets/opencode/skills/evaluation/SKILL.md +61 -2
- package/presets/opencode/skills/openspec/SKILL.md +46 -34
- package/presets/opencode/skills/testing-tdd/SKILL.md +35 -574
- package/presets/opencode/skills/using-cc-skills/SKILL.md +48 -0
- package/presets/shared/__pycache__/mutation_runner.cpython-314.pyc +0 -0
- package/presets/shared/invoke-hook.cjs +115 -0
- package/presets/shared/mutation_runner.py +273 -0
- package/src/presets/manifests/agy.yml +2 -0
- package/src/presets/manifests/claude.yml +3 -0
- package/src/presets/manifests/gemini.yml +15 -0
- package/src/presets/models/agy.yml +24 -24
- package/src/presets/models/claude.yml +10 -10
- package/src/presets/models/codex.yml +10 -10
- package/src/presets/models/cursor.yml +10 -10
- package/src/presets/models/gemini.yml +10 -10
- package/src/presets/models/opencode.yml +10 -10
- package/presets/agy/scripts/post-tool.sh +0 -25
- package/presets/agy/scripts/pre-tool.sh +0 -56
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
description = "compatibility constraints, contract tests, documentation, and review."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# API Contract Workflow
|
|
5
|
+
|
|
6
|
+
API contract request: {{args}}
|
|
7
|
+
|
|
8
|
+
## Step 0 — CCEP Bootstrap
|
|
9
|
+
|
|
10
|
+
Command: `api-contract` (fixed for this workflow — do not infer from user text)
|
|
11
|
+
|
|
12
|
+
1. Run: `npx cc-codeconductor ccep parse --command api-contract "{{args}}" --output json`
|
|
13
|
+
2. Run: `npx cc-codeconductor ccep resolve --command api-contract "{{args}}" --output json`
|
|
14
|
+
3. Run: `npx cc-codeconductor ccep profile api-contract --output json`
|
|
15
|
+
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.
|
|
16
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `{{args}}` to planners.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 0b — OpenSpec quality gates
|
|
21
|
+
|
|
22
|
+
If `openspec status` reports an active change folder:
|
|
23
|
+
|
|
24
|
+
1. Run: `npx cc-codeconductor openspec validate --output json`
|
|
25
|
+
2. Run: `npx cc-codeconductor openspec analyze --output json`
|
|
26
|
+
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
27
|
+
4. Next command spelling on this runner: `/cc:api-contract`
|
|
28
|
+
|
|
29
|
+
Local development: `bun run dev <same argv>`. Published package: `npx cc-codeconductor`.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Step 1 — Task Card validation (Task Coach role)
|
|
35
|
+
|
|
36
|
+
Invoke the `task-coach` subagent via the Task tool.
|
|
37
|
+
|
|
38
|
+
The Task Card must classify the task as high risk by default and include the
|
|
39
|
+
affected public interface, request/response examples, compatibility notes,
|
|
40
|
+
versioning impact, consumer impact, contract tests, and docs acceptance
|
|
41
|
+
criteria.
|
|
42
|
+
|
|
43
|
+
**STOP here. Show the completed Task Card and wait for human confirmation.**
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Step 2 — Technical Plan (Architect role)
|
|
48
|
+
|
|
49
|
+
Invoke the `architect` subagent via the Task tool.
|
|
50
|
+
|
|
51
|
+
Define the API contract, validation strategy, compatibility behavior, docs or
|
|
52
|
+
OpenAPI changes, and reviewer blocking conditions.
|
|
53
|
+
|
|
54
|
+
**STOP here. Show the Technical Plan and wait for explicit human approval.**
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Step 3 — Implementation (Implementer role)
|
|
59
|
+
|
|
60
|
+
Invoke the `implementer` subagent via the Task tool.
|
|
61
|
+
|
|
62
|
+
Apply the minimal diff, preserve compatible behavior unless explicitly approved
|
|
63
|
+
as breaking, and update only the planned files.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Step 4 — Contract Tests (Tester role)
|
|
68
|
+
|
|
69
|
+
Invoke the `tester` subagent via the Task tool.
|
|
70
|
+
|
|
71
|
+
Add or update tests for request shape, response shape, status/error behavior,
|
|
72
|
+
and backward compatibility.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Step 5 — Review (Reviewer role)
|
|
77
|
+
|
|
78
|
+
Invoke the `reviewer` subagent via the Task tool.
|
|
79
|
+
|
|
80
|
+
Block on missing contract tests, undocumented breaking changes, or docs/OpenAPI
|
|
81
|
+
drift.
|
|
82
|
+
"""
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
description = "[cc: alias] Recommend one CodeConductor slash command from a natural-language problem. Does not start that workflow."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# Ask — recommend a slash command
|
|
5
|
+
|
|
6
|
+
Problem: {{args}}
|
|
7
|
+
|
|
8
|
+
This is a **router**, not a delivery workflow. Recommend exactly one command.
|
|
9
|
+
Do **not** run the recommended `/cc:` command unless the human confirms.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Step 1 — Recommend (deterministic)
|
|
14
|
+
|
|
15
|
+
Run (local repo: `bun run dev`; published package: `npx cc-codeconductor`):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
bun run dev ask "{{args}}" --output json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
or:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx cc-codeconductor ask "{{args}}" --output json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The catalog is only:
|
|
28
|
+
|
|
29
|
+
| Slash | When |
|
|
30
|
+
| ----- | ---- |
|
|
31
|
+
| `/cc:feature` | new behavior |
|
|
32
|
+
| `/cc:fix` | bug / regression |
|
|
33
|
+
| `/cc:refactor` | structure, no behavior change |
|
|
34
|
+
| `/cc:review` | inspect a diff/PR |
|
|
35
|
+
| `/cc:tdd-cycle` | red → green → refactor |
|
|
36
|
+
| `/cc:backlog` | create or append BACKLOG.md / objectives |
|
|
37
|
+
| `/cc:openspec` | BACKLOG / BC-xxx delivery |
|
|
38
|
+
|
|
39
|
+
If the CLI is unavailable, apply the same catalog and the same priority:
|
|
40
|
+
backlog (author) vs openspec (deliver) → tdd-cycle → review → refactor → fix → feature (default).
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Step 2 — Show and stop
|
|
45
|
+
|
|
46
|
+
Print:
|
|
47
|
+
|
|
48
|
+
- **Recommended:** the slash command
|
|
49
|
+
- **Why:** one or two sentences from the CLI `reason` (or your matching)
|
|
50
|
+
|
|
51
|
+
**STOP.** Wait for the human. Do not invoke the recommended workflow.
|
|
52
|
+
|
|
53
|
+
For a full preset inventory (skills, commands on disk), use `/cc:help` / `cc-help`.
|
|
54
|
+
"""
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
description = "validate with openspec, and plan OpenSpec change folders for /cc-openspec."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# Backlog Authoring Workflow
|
|
5
|
+
|
|
6
|
+
Objectives: {{args}}
|
|
7
|
+
|
|
8
|
+
Create or append valid `BACKLOG.md` items and OpenSpec change docs. Do **not**
|
|
9
|
+
deliver implementation — that is `/cc-openspec`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Step 0 — CCEP Bootstrap
|
|
14
|
+
|
|
15
|
+
Command: `backlog` (fixed for this workflow — do not infer from user text)
|
|
16
|
+
|
|
17
|
+
1. Run: `npx cc-codeconductor ccep parse --command backlog "{{args}}" --output json`
|
|
18
|
+
2. Run: `npx cc-codeconductor ccep resolve --command backlog "{{args}}" --output json`
|
|
19
|
+
3. Run: `npx cc-codeconductor ccep profile backlog --output json`
|
|
20
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command backlog --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 `{{args}}` to planners.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Step 1 — Wayfinding (repo-explorer)
|
|
26
|
+
|
|
27
|
+
If `graphify-out/graph.json` exists, run `graphify query "{{args}}"` (and
|
|
28
|
+
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
|
|
29
|
+
to map modules, conventions, and impact radius. Do not write `BACKLOG.md` in
|
|
30
|
+
this step. Record a Repo Map so Scope names real files or modules.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Step 2 — Relentless Grilling (task-coach)
|
|
35
|
+
|
|
36
|
+
Invoke `task-coach`. Produce complete backlog item fields: title, type, risk,
|
|
37
|
+
scope, description, out of scope, measurable acceptance criteria.
|
|
38
|
+
|
|
39
|
+
Every assumption must survive one grilling question. Reject vague acceptance
|
|
40
|
+
("improve UX", "fix bugs").
|
|
41
|
+
|
|
42
|
+
If any field is missing or ambiguous, ask one clarifying question at a time.
|
|
43
|
+
|
|
44
|
+
**STOP here.** Unresolved grilling questions populate `questionsForUser` in the
|
|
45
|
+
CCEP-1 `planner-output`; `ccep evaluate --command backlog` halts until a human
|
|
46
|
+
answers. Do not write `BACKLOG.md` until that confirmation.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Step 3 — Write or append BACKLOG.md (docs)
|
|
51
|
+
|
|
52
|
+
Apply skill `backlog`.
|
|
53
|
+
|
|
54
|
+
- If `BACKLOG.md` is absent, create it from the canonical template
|
|
55
|
+
(`presets/templates/BACKLOG.md`). Set Global `Product` from `package.json`
|
|
56
|
+
`name` when present.
|
|
57
|
+
- If it exists, append new `### BC-xxx` items under `## Items`. Do not rewrite
|
|
58
|
+
`## Global` or `## Archive`.
|
|
59
|
+
- Next ID = max `BC-NNN` across Items and Archive, plus one.
|
|
60
|
+
- New items: Status `READY`, Progress `0%`, measurable Acceptance checklist.
|
|
61
|
+
|
|
62
|
+
Do **not** `git add` `BACKLOG.md` or `openspec/`.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Step 4 — Validate (mandatory gate)
|
|
67
|
+
|
|
68
|
+
Run:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npx cc-codeconductor openspec validate
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
If validation fails:
|
|
75
|
+
|
|
76
|
+
1. List all errors and recommendations from the CLI output.
|
|
77
|
+
2. Show the canonical BACKLOG.md structure (## Global, ## Items, ### BC-001 | Title, Priority, Status, Type, Depends on, Description, Scope, Acceptance).
|
|
78
|
+
3. Fix the file and re-run validate. **STOP** planning until valid.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Step 5 — Plan new items
|
|
83
|
+
|
|
84
|
+
For each **new** `BC-xxx` from this run:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npx cc-codeconductor openspec plan <BC-id>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Show TaskCards and `openspec/changes/<slug>/` (proposal, design, tasks, specs).
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Completion
|
|
95
|
+
|
|
96
|
+
Report: item IDs added, validate result, change folder paths.
|
|
97
|
+
|
|
98
|
+
Tell the user to run `/cc-openspec` (optionally `/cc-openspec BC-xxx`) to
|
|
99
|
+
deliver. Do not start delivery in this workflow.
|
|
100
|
+
|
|
101
|
+
Apply skill `backlog` for create/append rules. Apply skill `openspec` only for
|
|
102
|
+
format and state-machine reference.
|
|
103
|
+
"""
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
description = "CodeConductor clarify workflow"
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# Clarify Workflow
|
|
5
|
+
|
|
6
|
+
Clarify request: {{args}}
|
|
7
|
+
|
|
8
|
+
## Step 0 — CCEP Bootstrap
|
|
9
|
+
|
|
10
|
+
Command: `clarify` (fixed for this workflow — do not infer from user text)
|
|
11
|
+
|
|
12
|
+
1. Run: `npx cc-codeconductor ccep parse --command clarify "{{args}}" --output json`
|
|
13
|
+
2. Run: `npx cc-codeconductor ccep resolve --command clarify "{{args}}" --output json`
|
|
14
|
+
3. Run: `npx cc-codeconductor ccep profile clarify --output json`
|
|
15
|
+
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.
|
|
16
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `{{args}}` to planners.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 1 — Re-explain (task-coach)
|
|
21
|
+
|
|
22
|
+
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.
|
|
23
|
+
|
|
24
|
+
**STOP if ConfirmationGate reports questions.**
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Completion
|
|
29
|
+
|
|
30
|
+
A plain-language restatement plus any remaining questions. Then resume the previous workflow.
|
|
31
|
+
"""
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
description = "Council-driven workflow with CCEP-1 bootstrap"
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# Council-Driven Workflow
|
|
5
|
+
|
|
6
|
+
Task request: {{args}}
|
|
7
|
+
|
|
8
|
+
## Step 0 — CCEP Bootstrap
|
|
9
|
+
|
|
10
|
+
Command: `council` (fixed for this workflow — do not infer from user text)
|
|
11
|
+
command: council
|
|
12
|
+
|
|
13
|
+
1. Run: `npx cc-codeconductor ccep parse --command council "{{args}}" --output json`
|
|
14
|
+
2. Run: `npx cc-codeconductor ccep resolve --command council "{{args}}" --output json`
|
|
15
|
+
3. Run: `npx cc-codeconductor ccep profile council --output json`
|
|
16
|
+
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.
|
|
17
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `{{args}}` to planners.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Step 1 — Wayfinding (repo-explorer)
|
|
22
|
+
|
|
23
|
+
If `graphify-out/graph.json` exists, run `graphify query "{{args}}"` (and
|
|
24
|
+
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
|
|
25
|
+
to map impact radius before deliberation. Do not write code in this step.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Step 2 — Deliberation & Specification (SDD)
|
|
30
|
+
|
|
31
|
+
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`.
|
|
32
|
+
|
|
33
|
+
The council must:
|
|
34
|
+
1. Clarify the prompt and define the absolute minimum scope (Simplicity Gate).
|
|
35
|
+
2. Explicitly document all assumptions and run the Grilling protocol on each one (Think Before Coding).
|
|
36
|
+
3. Draft a Task Card & Technical Plan (The Specification).
|
|
37
|
+
|
|
38
|
+
**STOP here.** Unresolved grilling questions populate `questionsForUser` in the
|
|
39
|
+
CCEP-1 `planner-output`; `ccep evaluate` (ConfirmationGate) halts until a human
|
|
40
|
+
answers. Show the agreed Task Card & Technical Plan and wait for confirmation
|
|
41
|
+
before continuing.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Step 3 — Test Definition (TDD)
|
|
46
|
+
|
|
47
|
+
Invoke `tester` with the approved Task Card & Technical Plan.
|
|
48
|
+
|
|
49
|
+
tester must:
|
|
50
|
+
1. Write failing tests based on the Acceptance Criteria defined in the Task Card.
|
|
51
|
+
2. Confirm the tests fail as expected (Red state).
|
|
52
|
+
|
|
53
|
+
**Goal-Driven Execution (Karpathy)**: Do not proceed until verifiable tests are written and fail for the correct reasons.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Step 4 — Surgical Implementation
|
|
58
|
+
|
|
59
|
+
Invoke `implementer` with the failing tests and the Technical Plan.
|
|
60
|
+
|
|
61
|
+
implementer must:
|
|
62
|
+
1. Write the minimal code required to pass the tests.
|
|
63
|
+
2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
|
|
64
|
+
3. NOT refactor adjacent code, change existing styles, or build speculative features.
|
|
65
|
+
4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state).
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Step 5 — Multi-Perspective Council Review
|
|
70
|
+
|
|
71
|
+
Invoke the `council` skill on the generated diff to perform the final review phase.
|
|
72
|
+
|
|
73
|
+
The council will evaluate the diff against the 6 axes (Architecture, Security, Product, Delivery, DataOps, Devil).
|
|
74
|
+
|
|
75
|
+
If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
|
|
76
|
+
- The Review Report status is **BLOCKED**.
|
|
77
|
+
- Return to Step 4 with the feedback.
|
|
78
|
+
|
|
79
|
+
If APPROVED (no CRITICAL findings):
|
|
80
|
+
- Deliver the final Council Verdict and the diff summary.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Completion
|
|
85
|
+
|
|
86
|
+
Deliver the complete Council Verdict. The feature is only complete when tests pass and the council explicitly approves the implementation according to the specification.
|
|
87
|
+
"""
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
description = "operational sequencing, tests, and review."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# Database Migration Workflow
|
|
5
|
+
|
|
6
|
+
Migration request: {{args}}
|
|
7
|
+
|
|
8
|
+
## Step 0 — CCEP Bootstrap
|
|
9
|
+
|
|
10
|
+
Command: `db-migration` (fixed for this workflow — do not infer from user text)
|
|
11
|
+
|
|
12
|
+
1. Run: `npx cc-codeconductor ccep parse --command db-migration "{{args}}" --output json`
|
|
13
|
+
2. Run: `npx cc-codeconductor ccep resolve --command db-migration "{{args}}" --output json`
|
|
14
|
+
3. Run: `npx cc-codeconductor ccep profile db-migration --output json`
|
|
15
|
+
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.
|
|
16
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `{{args}}` to planners.
|
|
17
|
+
Canonical delivery order is test-before-implement whenever both phases apply.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Step 0b — OpenSpec quality gates
|
|
22
|
+
|
|
23
|
+
If `openspec status` reports an active change folder:
|
|
24
|
+
|
|
25
|
+
1. Run: `npx cc-codeconductor openspec validate --output json`
|
|
26
|
+
2. Run: `npx cc-codeconductor openspec analyze --output json`
|
|
27
|
+
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
28
|
+
4. Next command spelling on this runner: `/cc:db-migration`
|
|
29
|
+
|
|
30
|
+
Local development: `bun run dev <same argv>`. Published package: `npx cc-codeconductor`.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## Step 1 — Task Card validation (Task Coach role)
|
|
36
|
+
|
|
37
|
+
Invoke the `task-coach` subagent via the Task tool.
|
|
38
|
+
|
|
39
|
+
The Task Card must classify the task as high risk and include affected schema,
|
|
40
|
+
model, and migration files; data backfill needs; deployment ordering;
|
|
41
|
+
rollback/forward-fix strategy; lock risk; data risk; and verification commands.
|
|
42
|
+
|
|
43
|
+
**STOP here. Show the completed Task Card and wait for human confirmation.**
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Step 2 — Migration Plan (Architect role)
|
|
48
|
+
|
|
49
|
+
Invoke the `architect` subagent via the Task tool.
|
|
50
|
+
|
|
51
|
+
Define the schema/data plan, operational sequencing, compatibility strategy,
|
|
52
|
+
rollback/forward-fix notes, and test approach.
|
|
53
|
+
|
|
54
|
+
**STOP here. Show the Technical Plan and wait for explicit human approval.**
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Step 3 — Migration Tests (Tester role)
|
|
59
|
+
|
|
60
|
+
Invoke the `tester` subagent via the Task tool.
|
|
61
|
+
|
|
62
|
+
Cover migration-sensitive behavior where the stack supports it, including
|
|
63
|
+
existing-data edge cases and rollback/forward-fix notes when automated rollback
|
|
64
|
+
tests are not practical.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Step 4 — Implementation (Implementer role)
|
|
69
|
+
|
|
70
|
+
Invoke the `implementer` subagent via the Task tool.
|
|
71
|
+
|
|
72
|
+
Keep model and migration changes together, avoid unrelated refactors, and
|
|
73
|
+
preserve the deployment order specified by architect.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Step 5 — Review (Reviewer role)
|
|
78
|
+
|
|
79
|
+
Invoke the `reviewer` subagent via the Task tool.
|
|
80
|
+
|
|
81
|
+
Block on missing migration tests, missing data-risk notes, undocumented
|
|
82
|
+
deployment sequencing, or model/migration drift.
|
|
83
|
+
"""
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
description = "CodeConductor explore workflow"
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# Explore Workflow
|
|
5
|
+
|
|
6
|
+
Explore request: {{args}}
|
|
7
|
+
|
|
8
|
+
## Step 0 — CCEP Bootstrap
|
|
9
|
+
|
|
10
|
+
Command: `explore` (fixed for this workflow — do not infer from user text)
|
|
11
|
+
|
|
12
|
+
1. Run: `npx cc-codeconductor ccep parse --command explore "{{args}}" --output json`
|
|
13
|
+
2. Run: `npx cc-codeconductor ccep resolve --command explore "{{args}}" --output json`
|
|
14
|
+
3. Run: `npx cc-codeconductor ccep profile explore --output json`
|
|
15
|
+
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.
|
|
16
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `{{args}}` to planners.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 1 — Map (repo-explorer)
|
|
21
|
+
|
|
22
|
+
If `graphify-out/graph.json` exists, run `graphify query "{{args}}"`. Invoke `repo-explorer`. Produce a Repo Map. Do not write code.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Step 2 — Suggest next command (orchestrator)
|
|
27
|
+
|
|
28
|
+
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.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Completion
|
|
33
|
+
|
|
34
|
+
Report the Repo Map and the recommended next `/cc:` command.
|
|
35
|
+
"""
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
description = "implementation, testing, review, and documentation."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# Feature Workflow
|
|
5
|
+
|
|
6
|
+
Feature request: {{args}}
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Step 0 — CCEP Bootstrap
|
|
11
|
+
|
|
12
|
+
Command: `feature` (fixed for this workflow — do not infer from user text)
|
|
13
|
+
|
|
14
|
+
1. Run: `npx cc-codeconductor ccep parse --command feature "{{args}}" --output json`
|
|
15
|
+
2. Run: `npx cc-codeconductor ccep resolve --command feature "{{args}}" --output json`
|
|
16
|
+
3. Run: `npx cc-codeconductor ccep profile feature --output json`
|
|
17
|
+
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.
|
|
18
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `{{args}}` to planners.
|
|
19
|
+
Canonical delivery order is test-before-implement whenever both phases apply.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Step 0b — OpenSpec quality gates
|
|
24
|
+
|
|
25
|
+
If `openspec status` reports an active change folder:
|
|
26
|
+
|
|
27
|
+
1. Run: `npx cc-codeconductor openspec validate --output json`
|
|
28
|
+
2. Run: `npx cc-codeconductor openspec analyze --output json`
|
|
29
|
+
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
30
|
+
4. Next command spelling on this runner: `/cc:feature`
|
|
31
|
+
|
|
32
|
+
Local development: `bun run dev <same argv>`. Published package: `npx cc-codeconductor`.
|
|
33
|
+
|
|
34
|
+
Skills: `using-cc-skills`, `openspec`, `testing-tdd`, `evaluation`.
|
|
35
|
+
Do not skip `openspec analyze` when a change folder is active.
|
|
36
|
+
"I'll add tests later" is not allowed — tester before implementer.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Step 1 — Wayfinding (repo-explorer)
|
|
42
|
+
|
|
43
|
+
If `graphify-out/graph.json` exists, run `graphify query "{{args}}"` (and
|
|
44
|
+
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
|
|
45
|
+
to map modules, conventions, and impact radius. Do not write code in this step.
|
|
46
|
+
Record a Repo Map artifact before intake.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Step 2 — Task Card validation (Task Coach role)
|
|
51
|
+
|
|
52
|
+
Invoke the `task-coach` subagent via the Task tool.
|
|
53
|
+
|
|
54
|
+
Produce a complete Task Card. The Task Card is ready when it contains: title,
|
|
55
|
+
type, risk classification, scope, context, acceptance criteria, and constraints.
|
|
56
|
+
|
|
57
|
+
If any field is missing or ambiguous, ask one clarifying question at a time and
|
|
58
|
+
wait for the answer. Do not proceed with an incomplete Task Card.
|
|
59
|
+
|
|
60
|
+
**STOP here. Show the completed Task Card and wait for human confirmation before
|
|
61
|
+
continuing.**
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Step 3 — Technical Plan (Architect role)
|
|
66
|
+
|
|
67
|
+
Invoke the `architect` subagent via the Task tool.
|
|
68
|
+
|
|
69
|
+
Produce a Technical Plan that covers:
|
|
70
|
+
|
|
71
|
+
- Chosen approach and rationale
|
|
72
|
+
- Affected files and modules
|
|
73
|
+
- Data model changes (if any)
|
|
74
|
+
- API contract changes (if any)
|
|
75
|
+
- Identified risks and mitigations
|
|
76
|
+
- Open questions that require a human decision
|
|
77
|
+
|
|
78
|
+
**STOP here. Show the Technical Plan and wait for explicit human approval. Do
|
|
79
|
+
not proceed to implementation until the plan is approved.**
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Step 4 — Test coverage (Tester role)
|
|
84
|
+
|
|
85
|
+
Invoke the `tester` subagent via the Task tool.
|
|
86
|
+
|
|
87
|
+
Use the Implementation Summary and the Task Card.
|
|
88
|
+
|
|
89
|
+
1. Write or extend failing tests for the new behavior before implementation (RED).
|
|
90
|
+
2. Ensure all acceptance criteria from the Task Card have at least one test.
|
|
91
|
+
3. Run the full test suite and confirm it passes.
|
|
92
|
+
4. Produce a Test Report: test files added or modified, cases covered.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Step 5 — Implementation (Implementer role)
|
|
97
|
+
|
|
98
|
+
Invoke the `implementer` subagent via the Task tool.
|
|
99
|
+
|
|
100
|
+
Use the approved Technical Plan and the Task Card from the steps above.
|
|
101
|
+
Implementer creates a Git Worktree before touching any file; all edits happen inside it.
|
|
102
|
+
|
|
103
|
+
1. Read the Technical Plan before touching any file.
|
|
104
|
+
2. Apply the minimal diff — only what the plan specifies.
|
|
105
|
+
3. Run the project test suite and make the previously written failing tests pass.
|
|
106
|
+
4. Produce an Implementation Summary: what changed, which files, how to verify
|
|
107
|
+
locally.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Step 6 — Code review (Reviewer role)
|
|
112
|
+
|
|
113
|
+
Invoke the `reviewer` subagent via the Task tool.
|
|
114
|
+
|
|
115
|
+
Use the complete diff and the Task Card.
|
|
116
|
+
|
|
117
|
+
Produce a Review Report with findings categorized as CRITICAL, WARNING, or
|
|
118
|
+
SUGGESTION.
|
|
119
|
+
|
|
120
|
+
If any CRITICAL findings exist, **STOP and report them**. Do not proceed until
|
|
121
|
+
they are resolved and the diff is re-reviewed.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Step 7 — Documentation (Docs role)
|
|
126
|
+
|
|
127
|
+
Invoke the `docs` subagent via the Task tool.
|
|
128
|
+
|
|
129
|
+
Invoke this step only if any of the following changed:
|
|
130
|
+
|
|
131
|
+
- A public API endpoint was added or modified
|
|
132
|
+
- A public interface or module was introduced
|
|
133
|
+
- Behavior visible to end users changed
|
|
134
|
+
|
|
135
|
+
Update: README (if applicable), OpenAPI spec (if applicable), CHANGELOG
|
|
136
|
+
(always), ADR (if an architectural decision was made).
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Completion
|
|
141
|
+
|
|
142
|
+
Report the following:
|
|
143
|
+
|
|
144
|
+
- Task Card (final)
|
|
145
|
+
- Technical Plan (approved)
|
|
146
|
+
- Implementation Summary
|
|
147
|
+
- Test Report
|
|
148
|
+
- Review Report (all findings resolved)
|
|
149
|
+
- List of documentation files updated (if any)
|
|
150
|
+
|
|
151
|
+
The feature is complete only when: all tests pass, no CRITICAL review findings
|
|
152
|
+
remain, and documentation reflects the implemented behavior.
|
|
153
|
+
"""
|