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,163 @@
|
|
|
1
|
+
description = "validation, implementation, testing, and optional review."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# Bug Fix Workflow
|
|
5
|
+
|
|
6
|
+
Bug description: {{args}}
|
|
7
|
+
|
|
8
|
+
Provide the following information in {{args}}:
|
|
9
|
+
|
|
10
|
+
- What is the incorrect behavior (actual)
|
|
11
|
+
- What is the expected behavior
|
|
12
|
+
- Steps to reproduce
|
|
13
|
+
- Environment or version where the bug occurs (if known)
|
|
14
|
+
- Any relevant error messages or stack traces
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Step 0 — CCEP Bootstrap
|
|
19
|
+
|
|
20
|
+
Command: `fix` (fixed for this workflow — do not infer from user text)
|
|
21
|
+
|
|
22
|
+
1. Run: `npx cc-codeconductor ccep parse --command fix "{{args}}" --output json`
|
|
23
|
+
2. Run: `npx cc-codeconductor ccep resolve --command fix "{{args}}" --output json`
|
|
24
|
+
3. Run: `npx cc-codeconductor ccep profile fix --output json`
|
|
25
|
+
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.
|
|
26
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `{{args}}` to planners.
|
|
27
|
+
Canonical delivery order is test-before-implement whenever both phases apply.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Step 0b — OpenSpec quality gates
|
|
32
|
+
|
|
33
|
+
If `openspec status` reports an active change folder:
|
|
34
|
+
|
|
35
|
+
1. Run: `npx cc-codeconductor openspec validate --output json`
|
|
36
|
+
2. Run: `npx cc-codeconductor openspec analyze --output json`
|
|
37
|
+
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
38
|
+
4. Next command spelling on this runner: `/cc:fix`
|
|
39
|
+
|
|
40
|
+
Local development: `bun run dev <same argv>`. Published package: `npx cc-codeconductor`.
|
|
41
|
+
|
|
42
|
+
Skills: `testing-tdd`, `evaluation`. Record `scorecard create --from-diff`.
|
|
43
|
+
A small fix still needs a Task Card and a failing regression test first.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## Step 1 — Wayfinding (repo-explorer)
|
|
49
|
+
|
|
50
|
+
If `graphify-out/graph.json` exists, run `graphify query "{{args}}"` (and
|
|
51
|
+
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
|
|
52
|
+
to map modules, conventions, and impact radius. Do not write code in this step.
|
|
53
|
+
Record a Repo Map artifact before intake.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Step 2 — Task Card validation (Task Coach role)
|
|
58
|
+
|
|
59
|
+
Invoke the `task-coach` subagent via the Task tool.
|
|
60
|
+
|
|
61
|
+
Produce a Task Card that includes:
|
|
62
|
+
|
|
63
|
+
- A clear statement of actual vs. expected behavior
|
|
64
|
+
- Reproduction steps (or a note that they are unknown)
|
|
65
|
+
- Risk classification: `low`, `medium`, or `high`
|
|
66
|
+
- Scope: which files or modules are likely affected
|
|
67
|
+
|
|
68
|
+
If reproduction steps are missing, ask for them before classifying risk. A bug
|
|
69
|
+
without a reproduction path cannot be classified reliably.
|
|
70
|
+
|
|
71
|
+
Capture evidence before tests: reproduction, logs or stack traces, and one
|
|
72
|
+
falsifiable hypothesis of the root cause. Do not patch without that evidence.
|
|
73
|
+
Redact secrets, tokens, and credential dumps from logs before they enter the
|
|
74
|
+
Task Card. Summarize stack traces; do not paste env files.
|
|
75
|
+
|
|
76
|
+
**STOP here. Show the Task Card and wait for human confirmation.**
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Step 3 — Route by risk
|
|
81
|
+
|
|
82
|
+
Read the risk field from the Task Card and follow the corresponding route.
|
|
83
|
+
|
|
84
|
+
### Low-risk route
|
|
85
|
+
|
|
86
|
+
Applies when: the bug is isolated to a single component, existing tests cover
|
|
87
|
+
the affected code, and no public API or shared state is involved.
|
|
88
|
+
|
|
89
|
+
Route: Task Coach → Tester → Implementer
|
|
90
|
+
|
|
91
|
+
Proceed directly to Step 3 (tests), then Step 4a.
|
|
92
|
+
|
|
93
|
+
### Medium or high-risk route
|
|
94
|
+
|
|
95
|
+
Applies when: the bug touches shared state, a public API, auth or payment paths,
|
|
96
|
+
database writes, or the root cause is not yet understood.
|
|
97
|
+
|
|
98
|
+
Route: Task Coach → Architect → Tester → Implementer → Reviewer
|
|
99
|
+
|
|
100
|
+
Invoke the `architect` subagent before implementation. Architect must:
|
|
101
|
+
|
|
102
|
+
- Identify the root cause (or document that it is unknown)
|
|
103
|
+
- Define the fix approach and affected files
|
|
104
|
+
- Flag any regression risk to adjacent components
|
|
105
|
+
- Produce a Technical Plan
|
|
106
|
+
|
|
107
|
+
**STOP here if high-risk. Show the Technical Plan and wait for human approval
|
|
108
|
+
before continuing.**
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Step 4 — Regression tests (Tester role)
|
|
113
|
+
|
|
114
|
+
Invoke the `tester` subagent via the Task tool. Apply for all risk levels.
|
|
115
|
+
|
|
116
|
+
1. Write a regression test that reproduces the original bug and confirm it fails
|
|
117
|
+
before any fix (RED).
|
|
118
|
+
2. Verify that existing tests still pass.
|
|
119
|
+
3. Produce a Test Report: test added, case covered.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Step 5a — Implementation, low-risk (Implementer role)
|
|
124
|
+
|
|
125
|
+
Invoke the `implementer` subagent via the Task tool. Use the Task Card.
|
|
126
|
+
Implementer creates a Git Worktree before touching any file; all edits happen inside it.
|
|
127
|
+
|
|
128
|
+
1. Locate the defect using the reproduction steps.
|
|
129
|
+
2. Apply the minimal fix — no unrelated changes.
|
|
130
|
+
3. Run the suite and make the RED regression test pass.
|
|
131
|
+
4. Produce an Implementation Summary: root cause, fix applied, files changed.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Step 5b — Implementation, medium/high-risk (Implementer role)
|
|
136
|
+
|
|
137
|
+
Invoke the `implementer` subagent via the Task tool. Use the approved
|
|
138
|
+
Technical Plan and the Task Card.
|
|
139
|
+
Implementer creates a Git Worktree before touching any file; all edits happen inside it.
|
|
140
|
+
|
|
141
|
+
Follow the plan exactly. Any deviation requires a new Technical Plan approval.
|
|
142
|
+
After implementation, run the full test suite.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Step 6 — Review (Reviewer role) — medium/high-risk only
|
|
147
|
+
|
|
148
|
+
Invoke the `reviewer` subagent via the Task tool. Use the diff and Task
|
|
149
|
+
Card.
|
|
150
|
+
|
|
151
|
+
Produce a Review Report with CRITICAL / WARNING / SUGGESTION findings. If any
|
|
152
|
+
CRITICAL findings exist, **STOP**. Do not close the fix until they are resolved.
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Completion
|
|
157
|
+
|
|
158
|
+
Report: Task Card, Implementation Summary, regression test added, Review Report
|
|
159
|
+
(if applicable).
|
|
160
|
+
|
|
161
|
+
The fix is complete only when: the regression test passes, the full suite
|
|
162
|
+
passes, and no CRITICAL review findings remain.
|
|
163
|
+
"""
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
description = "CodeConductor handoff workflow"
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# Handoff Workflow
|
|
5
|
+
|
|
6
|
+
Handoff request: {{args}}
|
|
7
|
+
|
|
8
|
+
## Step 0 — CCEP Bootstrap
|
|
9
|
+
|
|
10
|
+
Command: `handoff` (fixed for this workflow — do not infer from user text)
|
|
11
|
+
|
|
12
|
+
1. Run: `npx cc-codeconductor ccep parse --command handoff "{{args}}" --output json`
|
|
13
|
+
2. Run: `npx cc-codeconductor ccep resolve --command handoff "{{args}}" --output json`
|
|
14
|
+
3. Run: `npx cc-codeconductor ccep profile handoff --output json`
|
|
15
|
+
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.
|
|
16
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `{{args}}` to planners.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 1 — Compact (docs)
|
|
21
|
+
|
|
22
|
+
Invoke `docs`. Write **only** `.codeconductor/sessions/handoff.md` (gitignored).
|
|
23
|
+
Do not write `.codeconductor/handoff.md` or any tracked path.
|
|
24
|
+
|
|
25
|
+
Before writing, redact secrets, tokens, API keys, passwords, connection strings,
|
|
26
|
+
`.env` contents, and log/stack-trace lines that embed those values. Summarize
|
|
27
|
+
errors instead of pasting dumps. If unresolved credential material remains, stop
|
|
28
|
+
and wait for a human (CCEP `stopOnHighRisk`).
|
|
29
|
+
|
|
30
|
+
Include: goal, Task Card status (no secret fields), files touched, test
|
|
31
|
+
pass/fail (not log dumps), open questions, and the next `/cc:` command.
|
|
32
|
+
|
|
33
|
+
Do not edit source or tests.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Completion
|
|
38
|
+
|
|
39
|
+
Report the handoff path. Another session should be able to continue from that file alone.
|
|
40
|
+
"""
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
description = "Relentless Grilling, contract and spec design, TDD, council review, and docs."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# Advanced Iterative Workflow
|
|
5
|
+
|
|
6
|
+
Iterative request: {{args}}
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Step 0 — CCEP Bootstrap
|
|
11
|
+
|
|
12
|
+
Command: `iterative` (fixed for this workflow — do not infer from user text)
|
|
13
|
+
|
|
14
|
+
1. Run: `npx cc-codeconductor ccep parse --command iterative "{{args}}" --output json`
|
|
15
|
+
2. Run: `npx cc-codeconductor ccep resolve --command iterative "{{args}}" --output json`
|
|
16
|
+
3. Run: `npx cc-codeconductor ccep profile iterative --output json`
|
|
17
|
+
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.
|
|
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:iterative`
|
|
31
|
+
|
|
32
|
+
Local development: `bun run dev <same argv>`. Published package: `npx cc-codeconductor`.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## Step 1 — Wayfinding (repo-explorer)
|
|
38
|
+
|
|
39
|
+
If `graphify-out/graph.json` exists, run `graphify query "{{args}}"` (and
|
|
40
|
+
`graphify path` / `graphify explain` when two modules or one concept need a
|
|
41
|
+
scoped subgraph). Then invoke the `repo-explorer` subagent via the Task tool
|
|
42
|
+
with that graph output.
|
|
43
|
+
|
|
44
|
+
repo-explorer maps directory trees, conventions, god nodes, and affected
|
|
45
|
+
modules. Do not write code in this step. Write a short phase handoff (scope,
|
|
46
|
+
files, open questions) before the next phase — do not chain agents on unspoken
|
|
47
|
+
context.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Step 2 — Relentless Grilling & Task Card (task-coach)
|
|
52
|
+
|
|
53
|
+
Invoke the `task-coach` subagent via the Task tool.
|
|
54
|
+
|
|
55
|
+
Produce a complete Task Card. The Task Card is ready when it contains: title,
|
|
56
|
+
type, risk classification, scope, context, acceptance criteria, and
|
|
57
|
+
constraints, and every assumption behind it has survived one grilling
|
|
58
|
+
question (Grilling protocol).
|
|
59
|
+
|
|
60
|
+
If any field is missing or ambiguous, ask one clarifying question at a time and
|
|
61
|
+
wait for the answer. Do not proceed with an incomplete Task Card.
|
|
62
|
+
|
|
63
|
+
**STOP here.** Unresolved grilling questions or missing fields populate
|
|
64
|
+
`questionsForUser` in the CCEP-1 `planner-output`; the `ConfirmationGate`
|
|
65
|
+
(`ccep evaluate`) reads that field and halts the workflow until a human
|
|
66
|
+
answers. Show the completed Task Card and wait for that confirmation before
|
|
67
|
+
continuing.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Step 3 — Contract & Technical Plan (contract-builder & architect)
|
|
72
|
+
|
|
73
|
+
Invoke `contract-builder` then `architect` via the Task tool.
|
|
74
|
+
|
|
75
|
+
1. Define API contracts, JSON Schemas, or TypeScript interfaces.
|
|
76
|
+
2. Formulate the Technical Plan (chosen approach, affected files, trade-offs).
|
|
77
|
+
3. Apply YAGNI, Simplicity First, and Stdlib-First.
|
|
78
|
+
|
|
79
|
+
**STOP here. Show the Technical Plan and wait for explicit human approval. Do
|
|
80
|
+
not proceed to tests until the plan is approved.**
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Step 4 — Test coverage (Tester role)
|
|
85
|
+
|
|
86
|
+
Invoke the `tester` subagent via the Task tool.
|
|
87
|
+
|
|
88
|
+
1. Write or extend failing tests for the new behavior before implementation (RED).
|
|
89
|
+
2. Ensure all acceptance criteria from the Task Card have at least one test.
|
|
90
|
+
3. Produce a Test Report: test files added or modified, cases covered.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Step 5 — Implementation (Implementer role)
|
|
95
|
+
|
|
96
|
+
Invoke the `implementer` subagent via the Task tool.
|
|
97
|
+
|
|
98
|
+
Use the approved Technical Plan, contracts, and the failing tests.
|
|
99
|
+
Implementer creates a Git Worktree before touching any file; all edits happen
|
|
100
|
+
inside it.
|
|
101
|
+
|
|
102
|
+
1. Read the Technical Plan before touching any file.
|
|
103
|
+
2. Apply the minimal diff — only what the plan specifies.
|
|
104
|
+
3. Run the project test suite and make the previously written failing tests pass.
|
|
105
|
+
4. If tests fail, run up to 3 repair cycles (`implementer` → `tester`).
|
|
106
|
+
5. Produce an Implementation Summary: what changed, which files, how to verify
|
|
107
|
+
locally.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Step 6 — Multi-Perspective Council Review
|
|
112
|
+
|
|
113
|
+
Invoke the `council` skill on the generated diff (`council-review` phase).
|
|
114
|
+
|
|
115
|
+
The council evaluates Architecture, Security, Product, Delivery, DataOps, and
|
|
116
|
+
Devil. `security-reviewer` may set `securityVeto: true`; that REJECTED verdict
|
|
117
|
+
overrides majority consensus.
|
|
118
|
+
|
|
119
|
+
If ANY agent votes CRITICAL:
|
|
120
|
+
- The Review Report status is **BLOCKED**.
|
|
121
|
+
- Return to Step 5 with the feedback.
|
|
122
|
+
|
|
123
|
+
If APPROVED (no CRITICAL findings), continue.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Step 7 — Documentation (Docs role)
|
|
128
|
+
|
|
129
|
+
Invoke the `docs` subagent via the Task tool when a public API, public module,
|
|
130
|
+
or user-visible behavior changed.
|
|
131
|
+
|
|
132
|
+
Update: README (if applicable), OpenAPI spec (if applicable), CHANGELOG
|
|
133
|
+
(always when implementation changed), ADR (if an architectural decision was
|
|
134
|
+
made).
|
|
135
|
+
|
|
136
|
+
If `graphify-out/` is in use, run `graphify update .` (AST-only).
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Completion
|
|
141
|
+
|
|
142
|
+
The iterative workflow is complete only when: all tests pass, the council
|
|
143
|
+
approves the spec and the diff, no CRITICAL findings remain, and documentation
|
|
144
|
+
and the knowledge graph reflect the implemented behavior.
|
|
145
|
+
"""
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
description = "orchestrate agents by phase, review gate, and update backlog state."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# OpenSpec Backlog Workflow
|
|
5
|
+
|
|
6
|
+
Scope: {{args}}
|
|
7
|
+
|
|
8
|
+
Orchestrate FIFO delivery from `BACKLOG.md`. CodeConductor owns planning; agents execute one TaskCard per phase with the installed preset model for each role.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Step 0 — CCEP Bootstrap
|
|
15
|
+
|
|
16
|
+
Command: `openspec` (fixed for this workflow — do not infer from user text)
|
|
17
|
+
|
|
18
|
+
1. Run: `npx cc-codeconductor ccep parse --command openspec "{{args}}" --output json`
|
|
19
|
+
2. Run: `npx cc-codeconductor ccep resolve --command openspec "{{args}}" --output json`
|
|
20
|
+
3. Run: `npx cc-codeconductor ccep profile openspec --output json`
|
|
21
|
+
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.
|
|
22
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `{{args}}` to planners.
|
|
23
|
+
Canonical delivery order is test-before-implement whenever both phases apply.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 0b — OpenSpec quality gates
|
|
28
|
+
|
|
29
|
+
If `openspec status` reports an active change folder:
|
|
30
|
+
|
|
31
|
+
1. Run: `npx cc-codeconductor openspec validate --output json`
|
|
32
|
+
2. Run: `npx cc-codeconductor openspec analyze --output json`
|
|
33
|
+
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
34
|
+
4. Next command spelling on this runner: `/cc:openspec`
|
|
35
|
+
|
|
36
|
+
Local development: `bun run dev <same argv>`. Published package: `npx cc-codeconductor`.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Step 1 — Validate (mandatory gate)
|
|
42
|
+
|
|
43
|
+
Run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx cc-codeconductor openspec validate
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If validation fails:
|
|
50
|
+
|
|
51
|
+
1. List all errors and recommendations from the CLI output.
|
|
52
|
+
2. Show the canonical BACKLOG.md structure (## Global, ## Items, ### BC-001 | Title, Priority, Status, Type, Depends on, Description, Scope, Acceptance).
|
|
53
|
+
3. **STOP.** Do not scan, plan, or execute until the user fixes BACKLOG.md.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Step 2 — Scan
|
|
58
|
+
|
|
59
|
+
Run:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npx cc-codeconductor openspec scan
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Report: new items, modified items, closed/archived items, and whether the file changed.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Step 3 — Select item
|
|
70
|
+
|
|
71
|
+
If `{{args}}` contains a `BC-xxx` ID, use that item. Otherwise run:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx cc-codeconductor openspec status
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Pick the next `READY` item with satisfied dependencies (FIFO by priority). Skip items in `DONE` or `Archive`.
|
|
78
|
+
|
|
79
|
+
**STOP if no eligible item.** Report backlog status and wait for the user.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Step 4 — Plan
|
|
84
|
+
|
|
85
|
+
Run:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npx cc-codeconductor openspec plan <BC-id>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Show:
|
|
92
|
+
|
|
93
|
+
- Generated TaskCards (discover → design → test → implement → review when TDD required)
|
|
94
|
+
- Path to `openspec/changes/<slug>/` (proposal, design, tasks, specs)
|
|
95
|
+
|
|
96
|
+
Update BACKLOG item status to `PLANNED` (CLI does this automatically).
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Drive card status (CLI)
|
|
101
|
+
|
|
102
|
+
Do not edit `.codeconductor/openspec-state.json` by hand.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npx cc-codeconductor openspec start <cardId>
|
|
106
|
+
npx cc-codeconductor openspec done <cardId>
|
|
107
|
+
npx cc-codeconductor openspec block <cardId> --reason "waiting on design"
|
|
108
|
+
npx cc-codeconductor openspec archive <itemId>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`start` moves the card `pending → doing` and the item `PLANNED → IN_PROGRESS`. `done` marks the card complete, updates Progress, and moves the item to `REVIEW` when every card is done and review is required. `archive` requires all cards done (and review evidence when Global review is required) and moves `openspec/changes/<slug>` to `archive/`.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Step 5 — Model matrix and execute loop
|
|
116
|
+
|
|
117
|
+
Before executing phases, show resolved models:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npx cc-codeconductor scorecard models
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
For each pending TaskCard, run:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npx cc-codeconductor openspec next
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Invoke the agent named on the card with **isolated** context (`/clear` between phases unless continuation is required):
|
|
130
|
+
|
|
131
|
+
| Phase | Agent | Role |
|
|
132
|
+
|-------|-------|------|
|
|
133
|
+
| discover | repo-explorer | Map repo and impact |
|
|
134
|
+
| design | architect | Technical plan |
|
|
135
|
+
| test | tester | TDD tests (before implement if TDD required) |
|
|
136
|
+
| implement | implementer | Minimal diff in worktree |
|
|
137
|
+
| review | reviewer | Acceptance + scope gate |
|
|
138
|
+
|
|
139
|
+
Use the model configured in the installed preset for each agent role.
|
|
140
|
+
|
|
141
|
+
After each phase:
|
|
142
|
+
|
|
143
|
+
- Mark progress in deliverable summary.
|
|
144
|
+
- Run `npx cc-codeconductor openspec done <cardId>` when the phase completes. Do not edit openspec-state.json by hand.
|
|
145
|
+
|
|
146
|
+
Implementer: create a Git worktree before editing (`git worktree add ../<branch>-session <branch>`).
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Step 6 — Review gate
|
|
151
|
+
|
|
152
|
+
Run regression when BACKLOG Global `Review required: yes`:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
npx cc-codeconductor scorecard regression
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The `reviewer` agent must verify:
|
|
159
|
+
|
|
160
|
+
- All acceptance criteria from BACKLOG.md
|
|
161
|
+
- Tests pass
|
|
162
|
+
- Scope matches the backlog item
|
|
163
|
+
- No architectural violations
|
|
164
|
+
|
|
165
|
+
If **rejected**: set item status `IN_PROGRESS`, record findings in state, **STOP** and report to user.
|
|
166
|
+
|
|
167
|
+
If **approved**: proceed to Step 6.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Step 7 — Scorecard and update backlog
|
|
172
|
+
|
|
173
|
+
1. `npx cc-codeconductor scorecard create --task <BC-id> --from-diff`
|
|
174
|
+
2. Complete criteria; `scorecard record` with verdict and optional cost/tokens
|
|
175
|
+
3. Set item `Progress: 100%`, `Status: DONE` if PASS
|
|
176
|
+
4. Move item to `## Archive` in BACKLOG.md if DONE
|
|
177
|
+
5. Run `npx cc-codeconductor openspec scan`
|
|
178
|
+
|
|
179
|
+
Report completion: Task Cards executed, scorecard verdict, change folder path, files changed.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Skill
|
|
184
|
+
|
|
185
|
+
Apply `.claude/skills/openspec/SKILL.md` for backlog format rules and state transitions.
|
|
186
|
+
"""
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
description = "CodeConductor pagespeed workflow"
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# PageSpeed Performance Audit
|
|
5
|
+
|
|
6
|
+
Audit web performance using the PageSpeed Insights API. Applies the 80/20
|
|
7
|
+
principle: identify the 20% of changes that produce 80% of the performance gain.
|
|
8
|
+
Produces a prioritized report in the current working directory.
|
|
9
|
+
|
|
10
|
+
## Step 0 — CCEP Bootstrap
|
|
11
|
+
|
|
12
|
+
Command: `pagespeed` (fixed for this workflow — do not infer from user text)
|
|
13
|
+
|
|
14
|
+
1. Run: `npx cc-codeconductor ccep parse --command pagespeed "{{args}}" --output json`
|
|
15
|
+
2. Run: `npx cc-codeconductor ccep resolve --command pagespeed "{{args}}" --output json`
|
|
16
|
+
3. Run: `npx cc-codeconductor ccep profile pagespeed --output json`
|
|
17
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command pagespeed --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
18
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `{{args}}` to planners.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
/cc-pagespeed --url <url> [--strategy mobile|desktop|both]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Parameters
|
|
29
|
+
|
|
30
|
+
| Parameter | Required | Description |
|
|
31
|
+
| ------------- | -------- | -------------------------------------------------------------- |
|
|
32
|
+
| `--url` | Yes | Full URL to audit (must include scheme: https://...) |
|
|
33
|
+
| `--strategy` | No | Analysis strategy: `mobile`, `desktop`, or `both` (default: `both`) |
|
|
34
|
+
|
|
35
|
+
## Requirements
|
|
36
|
+
|
|
37
|
+
### `PAGESPEED_API_KEY` — Optional but strongly recommended
|
|
38
|
+
|
|
39
|
+
| Mode | Lab data | CrUX field data | Rate limits |
|
|
40
|
+
| ------------ | -------- | --------------- | ---------------- |
|
|
41
|
+
| **With key** | ✅ | ✅ (real users) | 25,000 req/day |
|
|
42
|
+
| **Without** | ✅ | ❌ | ~2 req/s shared |
|
|
43
|
+
|
|
44
|
+
Without the key, Core Web Vitals field data (real user experience via CrUX) is
|
|
45
|
+
unavailable. Lab data from Lighthouse still runs.
|
|
46
|
+
|
|
47
|
+
Set the key before invoking the command:
|
|
48
|
+
|
|
49
|
+
```powershell
|
|
50
|
+
# Windows PowerShell
|
|
51
|
+
$env:PAGESPEED_API_KEY = "your-api-key"
|
|
52
|
+
|
|
53
|
+
# macOS / Linux
|
|
54
|
+
export PAGESPEED_API_KEY="your-api-key"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Get a free key (Google account required):
|
|
58
|
+
<https://developers.google.com/speed/docs/insights/v5/get-started>
|
|
59
|
+
|
|
60
|
+
## Workflow
|
|
61
|
+
|
|
62
|
+
When `/cc-pagespeed` is invoked, load the `pagespeed-perf` skill and execute
|
|
63
|
+
the following steps in order:
|
|
64
|
+
|
|
65
|
+
1. **Pre-flight** — Read `$env:PAGESPEED_API_KEY` from the environment. Compute
|
|
66
|
+
the output filename: `{YYYY-MM-DD}_pagespeed-{hostname}-claude.md`.
|
|
67
|
+
|
|
68
|
+
2. **Collect** — Call the PageSpeed Insights API for the requested strategy
|
|
69
|
+
(`mobile`, `desktop`, or `both`). Prefer the Bun scripts in
|
|
70
|
+
`~/.claude/skills/pagespeed-perf/scripts/run.ts` if Bun is available.
|
|
71
|
+
Otherwise, use `WebFetch` to call the PSI endpoint directly.
|
|
72
|
+
|
|
73
|
+
3. **Analyze** — Extract Core Web Vitals (LCP, INP, CLS, FCP, TTFB, TBT),
|
|
74
|
+
identify the LCP element, enumerate third-party scripts by blocking time,
|
|
75
|
+
and inspect resource hints in the HTML `<head>`.
|
|
76
|
+
|
|
77
|
+
4. **Prioritize** — Score each identified optimization using the 80/20 matrix:
|
|
78
|
+
`Impact × Ease` (each 1–5). Order findings by descending score. Highlight
|
|
79
|
+
the top actions with Score ≥ 20 as the critical 20%.
|
|
80
|
+
|
|
81
|
+
5. **Report** — Write the structured markdown report to
|
|
82
|
+
`{YYYY-MM-DD}_pagespeed-{hostname}-claude.md` in the current directory.
|
|
83
|
+
|
|
84
|
+
## Output File
|
|
85
|
+
|
|
86
|
+
The report is saved as `{YYYY-MM-DD}_pagespeed-{hostname}-claude.md`.
|
|
87
|
+
|
|
88
|
+
- Hostname characters outside `[a-zA-Z0-9]` are replaced with `-`.
|
|
89
|
+
- Example: `https://www.example.com` → `2026-06-07_pagespeed-www-example-com-claude.md`
|
|
90
|
+
|
|
91
|
+
## Skills Loaded
|
|
92
|
+
|
|
93
|
+
- `pagespeed-perf` — Web Performance Engineering: PSI API, Core Web Vitals
|
|
94
|
+
thresholds, 80/20 optimization matrix, resource-hint analysis, third-party
|
|
95
|
+
script auditing, framework-specific implementation templates.
|
|
96
|
+
|
|
97
|
+
## Examples
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Full audit — mobile + desktop
|
|
101
|
+
/cc-pagespeed --url https://www.example.com
|
|
102
|
+
|
|
103
|
+
# Mobile only
|
|
104
|
+
/cc-pagespeed --url https://www.example.com --strategy mobile
|
|
105
|
+
|
|
106
|
+
# Desktop only
|
|
107
|
+
/cc-pagespeed --url https://www.example.com --strategy desktop
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Hard Rules
|
|
111
|
+
|
|
112
|
+
- **GET only.** Never send POST, PUT, or DELETE to the target URL.
|
|
113
|
+
- **No auth.** Never include cookies, tokens, or auth headers.
|
|
114
|
+
- **No external crawling.** Audit only the provided URL.
|
|
115
|
+
- **Quantify every finding.** Never write "it would improve LCP". Always cite
|
|
116
|
+
the observed value and estimated gain (e.g., "reduces LCP from 4.2 s to ~3.0 s").
|
|
117
|
+
- **No generic recommendations.** Every finding must be backed by data from
|
|
118
|
+
the audit of this specific URL.
|
|
119
|
+
"""
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
description = "CodeConductor prototype workflow"
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# Prototype Workflow
|
|
5
|
+
|
|
6
|
+
Prototype request: {{args}}
|
|
7
|
+
|
|
8
|
+
## Step 0 — CCEP Bootstrap
|
|
9
|
+
|
|
10
|
+
Command: `prototype` (fixed for this workflow — do not infer from user text)
|
|
11
|
+
|
|
12
|
+
1. Run: `npx cc-codeconductor ccep parse --command prototype "{{args}}" --output json`
|
|
13
|
+
2. Run: `npx cc-codeconductor ccep resolve --command prototype "{{args}}" --output json`
|
|
14
|
+
3. Run: `npx cc-codeconductor ccep profile prototype --output json`
|
|
15
|
+
4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command prototype --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
16
|
+
5. Delegate to subagents using compiled CCEP prompts — never forward raw `{{args}}` to planners.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 1 — Bounds (architect)
|
|
21
|
+
|
|
22
|
+
Invoke `architect`. Define what the spike may touch, time-box, and what must not leak into main. Do not treat this as a production Technical Plan.
|
|
23
|
+
|
|
24
|
+
**STOP here. Wait for approval of the spike bounds.**
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Step 2 — Spike (implementer)
|
|
29
|
+
|
|
30
|
+
Invoke `implementer` in a Git worktree that is not a merge candidate. Label the Implementation Summary as disposable. Do not open a PR against protected branches.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Completion
|
|
35
|
+
|
|
36
|
+
Report bounds, worktree path, and what was learned. Recommend `/cc:feature` or `/cc:fix` if the spike should become real work.
|
|
37
|
+
"""
|