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