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
@@ -151,15 +151,7 @@
151
151
  "hooks": [
152
152
  {
153
153
  "type": "command",
154
- "command": "if echo \"$CLAUDE_TOOL_INPUT_FILE_PATH\" | grep -qE '\\.(ts|tsx|js|jsx|mjs|cjs|json|jsonc|md|mdx|css|scss|html|astro|yaml|yml)$'; then npx --no-install prettier --write \"$CLAUDE_TOOL_INPUT_FILE_PATH\" 2>/dev/null || true; fi"
155
- },
156
- {
157
- "type": "command",
158
- "command": "if echo \"$CLAUDE_TOOL_INPUT_FILE_PATH\" | grep -qE '\\.(ts|tsx|js|jsx|mjs|cjs)$'; then npx --no-install eslint --fix \"$CLAUDE_TOOL_INPUT_FILE_PATH\" 2>/dev/null || true; fi"
159
- },
160
- {
161
- "type": "command",
162
- "command": "if echo \"$CLAUDE_TOOL_INPUT_FILE_PATH\" | grep -qE '\\.py$'; then ruff format \"$CLAUDE_TOOL_INPUT_FILE_PATH\" 2>/dev/null && ruff check --fix \"$CLAUDE_TOOL_INPUT_FILE_PATH\" 2>/dev/null || true; fi"
154
+ "command": "node .claude/hooks/invoke-hook.cjs post-tool"
163
155
  }
164
156
  ]
165
157
  }
@@ -170,7 +162,17 @@
170
162
  "hooks": [
171
163
  {
172
164
  "type": "command",
173
- "command": "if echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '(\\.env|secrets/|id_rsa|\\.pem|\\.key)\\b' && echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '(cat|less|more|head|tail|cp |mv |scp )'; then echo 'Bloqueado: intento de leer archivos sensibles' >&2; exit 2; elif echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '^\\s*git\\s+(push|reset\\s+--hard)' || echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '^\\s*git\\s+clean\\s+(-[a-z]*f[a-z]*|--force)' || echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '^\\s*git\\s+branch\\s+(-D|--delete\\s+--force)' || echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '^\\s*git\\s+checkout\\s+(-f|--force|--discard-changes|--theirs|--ours|-\\s|-$)' || echo \"$CLAUDE_TOOL_INPUT_COMMAND\" | grep -qE '^\\s*git\\s+restore\\s+(-f|--force|--discard-changes|--theirs|--ours)'; then echo \"Bloqueado: El agente no tiene autoridad sobre este comando.\" >&2; exit 2; fi"
165
+ "command": "node .claude/hooks/invoke-hook.cjs pre-tool"
166
+ }
167
+ ]
168
+ }
169
+ ],
170
+ "SessionStart": [
171
+ {
172
+ "hooks": [
173
+ {
174
+ "type": "command",
175
+ "command": "node .claude/hooks/invoke-hook.cjs session-start"
174
176
  }
175
177
  ]
176
178
  }
@@ -180,7 +182,7 @@
180
182
  "hooks": [
181
183
  {
182
184
  "type": "command",
183
- "command": "echo \"[subagent fin] $(date -Iseconds)\" >> ~/.claude/subagent.log"
185
+ "command": "node -e \"var fs=require('fs');var os=require('os');var p=require('path');var dir=p.join(os.homedir(),'.claude');fs.mkdirSync(dir,{recursive:true});fs.appendFileSync(p.join(dir,'subagent.log'),'[subagent fin] '+new Date().toISOString()+'\\n');\""
184
186
  }
185
187
  ]
186
188
  }
@@ -1,91 +1,61 @@
1
1
  ---
2
2
  name: backlog
3
3
  description: >
4
- Author BACKLOG.md and OpenSpec change folders for CodeConductor.
5
- Trigger: /cc-backlog, /cc:backlog, creating or appending backlog items,
6
- writing BACKLOG.md, or preparing work for /cc-openspec.
4
+ Guides agents through authoring BACKLOG.md and OpenSpec change folders.
5
+ Use when running /cc-backlog or /cc:backlog, creating or appending backlog
6
+ items, or preparing work for /cc-openspec. Delivery is skill openspec.
7
7
  ---
8
8
 
9
9
  # Backlog authoring
10
10
 
11
- Use this skill to **create or append** `BACKLOG.md` and generate OpenSpec
12
- change docs. Delivery of an existing item is `/cc-openspec` (skill `openspec`).
11
+ ## Overview
13
12
 
14
- ## BACKLOG.md contract
13
+ Create or append `BACKLOG.md`, then `openspec validate` / `plan`. Do not deliver
14
+ the item here.
15
15
 
16
- Canonical template: `presets/templates/BACKLOG.md` (or the installed copy).
17
- Required sections:
16
+ ## When to Use
18
17
 
19
- - `## Global` Product, Strategy, Policy, Review required, TDD required
20
- - `## Items` — active entries
21
- - `## Archive` — completed entries (never re-execute; never rewrite)
18
+ - `/cc-backlog`, first backlog in a repo, or appending `### BC-xxx` items
22
19
 
23
- Each item: `### BC-001 | Short title` with Priority (P0–P3), Status, Type,
24
- Depends on, Description, Scope, Out of scope, Acceptance (measurable checklist).
20
+ **NOT** for executing an item (`openspec`) or for scorecards (`evaluation`).
25
21
 
26
- Status after grilling: `READY`. `openspec plan` then moves the item to `PLANNED`.
22
+ ## Process
27
23
 
28
- ## Create vs append
24
+ 1. If `graphify-out/graph.json` exists, `graphify query "<objectives>"`. Then
25
+ `repo-explorer`. Scope names real files.
26
+ 2. Invoke `task-coach`. One grilling question per assumption. Reject vague
27
+ acceptance ("improve UX"). At most 3 `[NEEDS CLARIFICATION]`.
28
+ 3. `ccep evaluate --command backlog`. If `stop`, wait for the human.
29
+ 4. Create `BACKLOG.md` from `presets/templates/BACKLOG.md` or append under
30
+ `## Items`. Do not rewrite `## Global` or `## Archive`.
31
+ 5. Next ID = max numeric suffix in Items + Archive + 1, zero-padded (`BC-013`).
32
+ 6. `bun run dev openspec validate` (or `npx cc-codeconductor`). Fix until valid.
33
+ 7. `openspec plan BC-xxx` for each **new** item this run. Then tell the user
34
+ to run `/cc-openspec`.
29
35
 
30
- - **No `BACKLOG.md`:** create it from the template. Set Global `Product` from
31
- `package.json` `name` when present.
32
- - **File exists:** append new `### BC-xxx` blocks under `## Items`. Do not
33
- rewrite `## Global` or `## Archive`.
36
+ Required sections: `## Global`, `## Items`, `## Archive`. Each item:
37
+ `### BC-001 | Title` with Priority, Status (`READY` after grilling), Type,
38
+ Depends on, Description, Scope, Out of scope, Acceptance.
34
39
 
35
- Next ID = max numeric suffix across Items and Archive, plus one, zero-padded
36
- to three digits (`BC-013` after `BC-012`).
40
+ Local artifacts (`BACKLOG.md`, `openspec/`, `.codeconductor/openspec-state.json`)
41
+ are gitignored in consumer projects. Do not `git add` them.
37
42
 
38
- ## Wayfinding (before Scope)
43
+ ## Common Rationalizations
39
44
 
40
- If `graphify-out/graph.json` exists, run `graphify query "<objectives>"` (and
41
- `graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`.
42
- Scope must name real files or modules. Do not write `BACKLOG.md` in this step.
45
+ | Rationalization | Reality |
46
+ | --- | --- |
47
+ | This fix is small; skip the Task Card | Every item needs measurable acceptance. |
48
+ | I'll validate later | Do not plan until `openspec validate` passes. |
49
+ | Archive can be rewritten | Archive is history. Never rewrite or re-execute. |
43
50
 
44
- ## Grilling (before write)
51
+ ## Red Flags
45
52
 
46
- Invoke `task-coach`. One grilling question per assumption. Reject vague
47
- acceptance ("improve UX", "fix bugs"). Criteria must be measurable (same rules
48
- as `openspec validate` / `VAGUE_ACCEPTANCE`).
53
+ - Acceptance that cannot fail a check
54
+ - Editing `openspec-state.json` by hand
55
+ - Planning an invalid backlog
49
56
 
50
- Unresolved questions go in `questionsForUser`. Run `ccep evaluate --command
51
- backlog`. If `stop` is true, **STOP** and wait for the human.
57
+ ## Verification
52
58
 
53
- Do not write items until the gate passes.
54
-
55
- ## Validate loop
56
-
57
- After writing:
58
-
59
- ```bash
60
- npx cc-codeconductor openspec validate
61
- ```
62
-
63
- Local CodeConductor dogfood: `bun run dev openspec validate`.
64
-
65
- If invalid: list errors and recommendations, show the canonical structure,
66
- fix the file, re-validate. Do not plan until valid.
67
-
68
- ## Plan new items only
69
-
70
- For each **new** `BC-xxx` this run:
71
-
72
- ```bash
73
- npx cc-codeconductor openspec plan BC-xxx
74
- ```
75
-
76
- That writes `openspec/changes/<slug>/` (`proposal.md`, `design.md`, `tasks.md`,
77
- `specs/`). Then tell the user to run `/cc-openspec` (optionally with the ID).
78
-
79
- ## Local artifacts — do not version
80
-
81
- In consumer projects these paths are gitignored (see `init`):
82
-
83
- - `BACKLOG.md`
84
- - `openspec/`
85
- - `.codeconductor/openspec-state.json`
86
-
87
- Do **not** `git add` them. Do not edit `openspec-state.json` by hand.
88
-
89
- ## Delivery
90
-
91
- Format and state machine: skill `openspec`. Authoring is this skill.
59
+ - [ ] `openspec validate` exit 0
60
+ - [ ] New items have `FR`/`SC`-ready measurable acceptance
61
+ - [ ] User pointed at `/cc-openspec` for delivery
@@ -1,42 +1,65 @@
1
1
  ---
2
2
  name: evaluation
3
3
  description:
4
- Agent scorecard criteria, outcome tracking, model profiles, and evaluation CLI.
5
- Use when running /cc:scorecard or measuring deliverable quality.
4
+ Guides agents through scorecards, outcomes, model profiles, and eval suites.
5
+ Use when running /cc-scorecard or /cc:scorecard, measuring a deliverable, or
6
+ checking workflow gates with suite-run.
6
7
  ---
7
8
 
8
- # Evaluation Skill
9
+ # Evaluation
9
10
 
10
- ## Scorecard criteria (8 weighted)
11
+ ## Overview
11
12
 
12
- See `docs/agent-scorecard.md`. Pass threshold: weighted score >= 2.0, no criterion at 0.
13
+ A scorecard measures the deliverable against eight weighted criteria. Spec
14
+ quality checklists are reviewer-owned. "Seems right" is not a verdict.
13
15
 
14
- ## CLI
16
+ Pass threshold: weighted score >= 2.0 and no criterion at 0.
15
17
 
16
- ```bash
17
- npx cc-codeconductor scorecard create --task BC-001 --from-diff
18
- npx cc-codeconductor scorecard record --task BC-001 --verdict PASS --score 2.5
19
- npx cc-codeconductor scorecard list
20
- npx cc-codeconductor scorecard aggregate
21
- npx cc-codeconductor scorecard models
22
- npx cc-codeconductor scorecard regression
23
- npx cc-codeconductor scorecard matrix
24
- npx cc-codeconductor scorecard compare-models
25
- npx cc-codeconductor scorecard prompt-diff 0.4.0 0.5.0 --agent architect
18
+ ## When to Use
19
+
20
+ - After implement/review, before `openspec archive`
21
+ - Comparing models or prompt versions
22
+ - Proving the workflow tools still work (`suite-run`)
23
+
24
+ **NOT** for rewriting specs (reviewer checklist) or for implementing code.
25
+
26
+ ## Process
27
+
28
+ Local: `bun run dev`. Published: `npx cc-codeconductor`.
29
+
30
+ ```text
31
+ scorecard create --task BC-001 --from-diff
32
+ scorecard record --task BC-001 --verdict PASS --score 2.5
33
+ scorecard list | aggregate | models | regression | matrix | compare-models
34
+ scorecard prompt-diff 0.4.0 0.5.0 --agent architect
35
+ scorecard experiment start --suite harness-v1
36
+ scorecard suite-run --suite workflow-gates
37
+ scorecard suite-run --suite hook-guardrails
38
+ scorecard suite-run --suite scorecard-signals
26
39
  ```
27
40
 
28
- ## Outcome tracking
41
+ `openspec analyze` can auto-suggest `acceptance` / `tests` on `--from-diff`.
42
+ Archive needs PASS when review is required.
29
43
 
30
- Append-only: `.codeconductor/evaluation/outcomes.jsonl`
44
+ Outcomes append to `.codeconductor/evaluation/outcomes.jsonl`.
31
45
 
32
- Record after each phase (openspec) and after review gate with agent, model, verdict, optional cost/tokens.
46
+ ## Common Rationalizations
33
47
 
34
- ## Execution profiles
48
+ | Rationalization | Reality |
49
+ | --- | --- |
50
+ | I'll fill the scorecard by hand without a diff | Use `--from-diff` and runner evidence. |
51
+ | Suites are optional toys | `suite-run` is the workflow tool that proves gates. |
52
+ | Handmade TDD JSON is fine | The runner rejects it. |
35
53
 
36
- `.codeconductor/evaluation/execution-profile.yml` `balanced`, `quality`, `economical`.
54
+ ## Red Flags
37
55
 
38
- Use `scorecard models` before OpenSpec execute loop to show phase → agent → model.
56
+ - PASS with a criterion at 0
57
+ - Archive without a recorded scorecard when review is required
58
+ - Declaring the workflow ready without `suite-run` or `scorecard record`
39
59
 
40
- ## Verdicts
60
+ ## Verification
41
61
 
42
- PASS / REVISE / REJECT see scorecard calculator rules in docs.
62
+ - [ ] Scorecard created from diff (or explicit scores)
63
+ - [ ] Verdict PASS / REVISE / REJECT recorded
64
+ - [ ] For process changes: `scorecard suite-run --suite hook-guardrails` (and
65
+ `workflow-gates` / `scorecard-signals` when those gates changed)
@@ -1,58 +1,66 @@
1
1
  ---
2
2
  name: openspec
3
3
  description:
4
- OpenSpec backlog format, state machine, and delivery workflow for CodeConductor.
5
- Use when running /cc:openspec or delivering a BACKLOG.md item.
6
- To create or append BACKLOG.md, use /cc:backlog (skill backlog).
4
+ Guides agents through OpenSpec delivery from BACKLOG.md (validate, analyze,
5
+ test-before-implement, scorecard, archive). Use when running /cc-openspec,
6
+ /cc:openspec, or delivering an existing backlog item. Authoring BACKLOG.md
7
+ is skill backlog, not this skill.
7
8
  ---
8
9
 
9
- # OpenSpec / BACKLOG Skill
10
+ # OpenSpec delivery
10
11
 
11
- Authoring (create or append `BACKLOG.md`, then `openspec validate` / `plan`) is
12
- `/cc:backlog` and skill `backlog`. This skill is **delivery**.
12
+ ## Overview
13
13
 
14
- ## BACKLOG.md contract
14
+ This skill delivers an existing `BACKLOG.md` item. It is a workflow with CLI
15
+ gates, not a reference doc. Specs describe WHAT; `design.md` describes HOW.
15
16
 
16
- `BACKLOG.md` at repo root is the operational queue. Required sections:
17
+ ## When to Use
17
18
 
18
- - `## Global` Product, Strategy, Policy, Review required, TDD required
19
- - `## Items` active backlog entries
20
- - `## Archive` — completed entries (do not re-execute)
19
+ - `/cc-openspec` or `openspec next` / `plan` / `done` / `archive`
20
+ - An item is `READY` or later and must move through the state machine
21
21
 
22
- Each item: `### BC-001 | Short title` with Priority (P0–P3), Status, Type, Depends on, Description, Scope, Out of scope, Acceptance (measurable checklist).
22
+ **NOT** for creating `BACKLOG.md` (use skill `backlog`) or for stack-specific
23
+ coding rules.
23
24
 
24
- ## Status machine
25
+ ## Process
25
26
 
26
- `TODO` `READY` `PLANNED` `IN_PROGRESS` `REVIEW` `DONE` → Archive
27
+ Local CLI is `bun run dev`. Published package is `npx cc-codeconductor`.
27
28
 
28
- `BLOCKED` can return to `READY` when resolved. Reviewer rejection: `REVIEW` → `IN_PROGRESS`.
29
+ 1. `openspec validate` must pass before delivery.
30
+ 2. `openspec plan BC-xxx` if the item is not yet `PLANNED`.
31
+ 3. `openspec analyze --output json` — CRITICAL findings exit 1. Do not implement.
32
+ 4. Phases: discover (`repo-explorer`) → design (`architect`) → test (`tester`) →
33
+ implement (`implementer`) → review (`reviewer`). If Global `TDD required: yes`,
34
+ test runs before implement.
35
+ 5. `openspec done` on test/implement requires `captureTddSuiteEvidence`. Handmade
36
+ evidence JSON is rejected.
37
+ 6. `scorecard create --task BC-xxx --from-diff` then record a verdict.
38
+ 7. `openspec archive` only after human review when `Review required: yes` and
39
+ the scorecard is PASS.
29
40
 
30
- ## CLI commands
41
+ Status machine: `TODO` → `READY` → `PLANNED` → `IN_PROGRESS` → `REVIEW` → `DONE`
42
+ → Archive. `BLOCKED` returns to `READY`. Reviewer rejection: `REVIEW` →
43
+ `IN_PROGRESS`.
31
44
 
32
- ```bash
33
- npx cc-codeconductor openspec validate # gate — must pass before delivery
34
- npx cc-codeconductor openspec scan
35
- npx cc-codeconductor openspec plan BC-001
36
- npx cc-codeconductor openspec status
37
- npx cc-codeconductor openspec next
38
- ```
45
+ ## Common Rationalizations
39
46
 
40
- ## OpenSpec folders
47
+ | Rationalization | Reality |
48
+ | --- | --- |
49
+ | Validate is bureaucracy | `openspec validate` is the gate. Skipping it is a defect. |
50
+ | I'll add tests after green | Global TDD required means tester before implementer. |
51
+ | I'll write the evidence JSON myself | Handmade TDD JSON is rejected. Use the verification runner. |
52
+ | The item is small; skip analyze | `openspec analyze` CRITICAL still stops implement. |
41
53
 
42
- Each item generates `openspec/changes/<slug>/` with `proposal.md`, `design.md`, `tasks.md`, `specs/` — compatible with Fission-AI OpenSpec layout (no external CLI required).
54
+ ## Red Flags
43
55
 
44
- ## Agent phases
56
+ - Implementing while analyze reports CRITICAL
57
+ - Archive without a PASS scorecard when review is required
58
+ - Acceptance like "improve UX" with no measurable check
45
59
 
46
- | Phase | Agent |
47
- |-------|-------|
48
- | discover | repo-explorer |
49
- | design | architect |
50
- | test | tester |
51
- | implement | implementer |
52
- | review | reviewer |
60
+ ## Verification
53
61
 
54
- When Global `TDD required: yes`, test runs before implement.
55
-
56
- ## Reject vague backlog
57
-
58
- Do not process items with acceptance like "improve UX" or "fix bugs". Require verifiable criteria.
62
+ - [ ] `openspec validate` exit 0
63
+ - [ ] `openspec analyze --output json` has no CRITICAL
64
+ - [ ] TDD evidence from the runner when TDD is required
65
+ - [ ] `scorecard create --from-diff` recorded
66
+ - [ ] Suite check (optional): `bun run dev scorecard suite-run --suite workflow-gates`
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: testing-tdd
3
+ description:
4
+ Guides agents through Red-Green-Refactor with runner-captured evidence.
5
+ Use when running /cc-tdd-cycle, writing tests before implementation, or
6
+ Global TDD required is yes.
7
+ ---
8
+
9
+ # Test-Driven Development
10
+
11
+ ## Overview
12
+
13
+ Red (failing test) → Green (minimal code) → Refactor. Evidence comes from
14
+ `captureTddSuiteEvidence`, not handmade JSON.
15
+
16
+ ## When to Use
17
+
18
+ - `/cc-tdd-cycle`, new behavior, bug fixes, TDD-required OpenSpec items
19
+
20
+ **NOT** for docs-only changes or when the Task Card forbids tests.
21
+
22
+ ## Process
23
+
24
+ 1. Write the failing test that encodes one acceptance criterion. Run the suite.
25
+ It MUST fail (`suiteFails === true`).
26
+ 2. Implement the minimum that turns it green. Do not expand scope.
27
+ 3. Refactor only with a green suite.
28
+ 4. Capture evidence via the verification runner (`openspec done` on test/implement
29
+ when TDD is required).
30
+ 5. Cover happy path, edge, and error for each behavior.
31
+
32
+ Local: `bun run dev`. Pyramid default: many unit, fewer integration, rare E2E.
33
+
34
+ ## Common Rationalizations
35
+
36
+ | Rationalization | Reality |
37
+ | --- | --- |
38
+ | I'll add tests later | Later means never. Red first. |
39
+ | This is too small to test | If it can break, it needs a failing test first. |
40
+ | I'll write the evidence JSON | Handmade TDD JSON is rejected. |
41
+
42
+ ## Red Flags
43
+
44
+ - Tests that assert implementation details instead of behavior
45
+ - Green without a recorded red
46
+ - Skipping error cases
47
+
48
+ ## Verification
49
+
50
+ - [ ] Suite failed before implement
51
+ - [ ] Suite passed after implement
52
+ - [ ] Runner evidence exists (not handmade)
53
+ - [ ] Optional: `bun run dev scorecard suite-run --suite workflow-gates`
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: using-cc-skills
3
+ description:
4
+ Maps incoming work to the CodeConductor slash command and workflow skill.
5
+ Use when starting a session or deciding which /cc-* command applies.
6
+ ---
7
+
8
+ # Using CodeConductor skills
9
+
10
+ ## Overview
11
+
12
+ Pick one slash command. Follow its skill. Invoke CLI for gates. Do not invent
13
+ a parallel process.
14
+
15
+ ## When to Use
16
+
17
+ - Start of a session, ambiguous request, or "which /cc should I run?"
18
+
19
+ ## Process
20
+
21
+ | Intent | Command | Skill |
22
+ | --- | --- | --- |
23
+ | New backlog item | `/cc-backlog` | `backlog` |
24
+ | Deliver a BC-xxx item | `/cc-openspec` | `openspec` |
25
+ | New feature | `/cc-feature` | `openspec` + `testing-tdd` |
26
+ | Bug fix | `/cc-fix` | `testing-tdd` |
27
+ | Review a diff | `/cc-review` | `evaluation` |
28
+ | TDD cycle only | `/cc-tdd-cycle` | `testing-tdd` |
29
+ | Scorecard / suites | `/cc-scorecard` | `evaluation` |
30
+
31
+ Then run the matching CLI (`openspec validate`, `scorecard create --from-diff`,
32
+ `hook pre-tool`, `scorecard suite-run`).
33
+
34
+ ## Common Rationalizations
35
+
36
+ | Rationalization | Reality |
37
+ | --- | --- |
38
+ | I'll skip the slash and just code | Skipping the workflow is a defect. |
39
+
40
+ ## Red Flags
41
+
42
+ - Two slash commands in parallel that mutate the same files
43
+ - Implementing before `openspec analyze` when a change folder is active
44
+
45
+ ## Verification
46
+
47
+ - [ ] One command selected and shown to the user
48
+ - [ ] Matching skill loaded before edits
@@ -64,20 +64,24 @@ Skipping any step is not an optimization. It is a defect.
64
64
 
65
65
  ## Trigger Phrases
66
66
 
67
- Codex does not load custom slash commands from this preset. Use these natural
68
- language patterns to activate each workflow:
67
+ Invoke workflows as Codex skills (`$cc-feature`, `$cc-openspec`, …). Custom
68
+ prompts under `~/.codex/prompts` are deprecated. Natural-language phrases still
69
+ work:
69
70
 
70
- | Workflow | Trigger phrase |
71
+ | Workflow | Skill / trigger |
71
72
  | ------------ | -------------------------------------------------- |
72
- | Full feature | "Run the feature workflow for: [description]" |
73
- | Bug fix | "Run the fix workflow for: [description]" |
74
- | Refactor | "Run the refactor workflow for: [scope]" |
75
- | API contract | "Run the API contract workflow for: [change]" |
76
- | DB migration | "Run the database migration workflow for: [scope]" |
77
- | Code review | "Run a structured review of: [target]" |
78
- | Test plan | "Create a test plan for: [scope]" |
79
- | Task intake | "Help me define a Task Card for: [vague request]" |
80
- | PageSpeed | "Run a PageSpeed audit for: [url]" |
73
+ | Full feature | `$cc-feature` or "Run the feature workflow for:" |
74
+ | Bug fix | `$cc-fix` |
75
+ | Refactor | `$cc-refactor` |
76
+ | API contract | `$cc-api-contract` |
77
+ | DB migration | `$cc-db-migration` |
78
+ | Code review | `$cc-review` |
79
+ | Test plan | `$cc-test-plan` |
80
+ | TDD cycle | `$cc-tdd-cycle` |
81
+ | Backlog | `$cc-backlog` |
82
+ | OpenSpec | `$cc-openspec` |
83
+ | Scorecard | `$cc-scorecard` |
84
+ | PageSpeed | `$cc-pagespeed` or "PageSpeed audit" |
81
85
 
82
86
  ---
83
87
 
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: backlog
3
+ description: >
4
+ Guides agents through authoring BACKLOG.md and OpenSpec change folders.
5
+ Use when running /cc-backlog or /cc:backlog, creating or appending backlog
6
+ items, or preparing work for /cc-openspec. Delivery is skill openspec.
7
+ ---
8
+
9
+ # Backlog authoring
10
+
11
+ ## Overview
12
+
13
+ Create or append `BACKLOG.md`, then `openspec validate` / `plan`. Do not deliver
14
+ the item here.
15
+
16
+ ## When to Use
17
+
18
+ - `/cc-backlog`, first backlog in a repo, or appending `### BC-xxx` items
19
+
20
+ **NOT** for executing an item (`openspec`) or for scorecards (`evaluation`).
21
+
22
+ ## Process
23
+
24
+ 1. If `graphify-out/graph.json` exists, `graphify query "<objectives>"`. Then
25
+ `repo-explorer`. Scope names real files.
26
+ 2. Invoke `task-coach`. One grilling question per assumption. Reject vague
27
+ acceptance ("improve UX"). At most 3 `[NEEDS CLARIFICATION]`.
28
+ 3. `ccep evaluate --command backlog`. If `stop`, wait for the human.
29
+ 4. Create `BACKLOG.md` from `presets/templates/BACKLOG.md` or append under
30
+ `## Items`. Do not rewrite `## Global` or `## Archive`.
31
+ 5. Next ID = max numeric suffix in Items + Archive + 1, zero-padded (`BC-013`).
32
+ 6. `bun run dev openspec validate` (or `npx cc-codeconductor`). Fix until valid.
33
+ 7. `openspec plan BC-xxx` for each **new** item this run. Then tell the user
34
+ to run `/cc-openspec`.
35
+
36
+ Required sections: `## Global`, `## Items`, `## Archive`. Each item:
37
+ `### BC-001 | Title` with Priority, Status (`READY` after grilling), Type,
38
+ Depends on, Description, Scope, Out of scope, Acceptance.
39
+
40
+ Local artifacts (`BACKLOG.md`, `openspec/`, `.codeconductor/openspec-state.json`)
41
+ are gitignored in consumer projects. Do not `git add` them.
42
+
43
+ ## Common Rationalizations
44
+
45
+ | Rationalization | Reality |
46
+ | --- | --- |
47
+ | This fix is small; skip the Task Card | Every item needs measurable acceptance. |
48
+ | I'll validate later | Do not plan until `openspec validate` passes. |
49
+ | Archive can be rewritten | Archive is history. Never rewrite or re-execute. |
50
+
51
+ ## Red Flags
52
+
53
+ - Acceptance that cannot fail a check
54
+ - Editing `openspec-state.json` by hand
55
+ - Planning an invalid backlog
56
+
57
+ ## Verification
58
+
59
+ - [ ] `openspec validate` exit 0
60
+ - [ ] New items have `FR`/`SC`-ready measurable acceptance
61
+ - [ ] User pointed at `/cc-openspec` for delivery