cc-codeconductor 1.0.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 +326 -87
- package/dist/core/compilation/compile-checker.d.ts +2 -0
- package/dist/core/loop/loop-engine.d.ts +3 -0
- package/dist/core/verification/verification-runner.d.ts +7 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3825 -597
- package/dist/library.js +195 -18
- package/dist/validation/schemas.d.ts +461 -44
- package/package.json +4 -1
- package/presets/agy/AGENTS.md +13 -9
- package/presets/agy/gates/pre-commit/GATE.md +5 -4
- package/presets/agy/hooks.json +2 -2
- package/presets/agy/scripts/invoke-hook.cjs +115 -0
- package/presets/agy/skills/backlog/SKILL.md +61 -0
- 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 +50 -16
- package/presets/agy/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/agy/skills/security-blue-team/SKILL.md +43 -0
- package/presets/agy/skills/security-cloud/SKILL.md +43 -0
- package/presets/agy/skills/security-crypto/SKILL.md +43 -0
- package/presets/agy/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/agy/skills/security-grc/SKILL.md +43 -0
- package/presets/agy/skills/security-incident-response/SKILL.md +45 -0
- package/presets/agy/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/agy/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/agy/skills/security-mobile/SKILL.md +43 -0
- package/presets/agy/skills/security-network/SKILL.md +43 -0
- package/presets/agy/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/agy/skills/security-recon/SKILL.md +45 -0
- package/presets/agy/skills/security-red-team/SKILL.md +44 -0
- package/presets/agy/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/agy/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/agy/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/agy/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/agy/skills/security-web/SKILL.md +44 -0
- 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-ask.md +2 -1
- package/presets/agy/workflows/cc-backlog.md +69 -0
- package/presets/agy/workflows/cc-db-migration.md +14 -0
- package/presets/agy/workflows/cc-explore.md +1 -1
- 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 +17 -1
- package/presets/agy/workflows/cc-scorecard.md +2 -0
- package/presets/agy/workflows/cc-security.md +180 -0
- package/presets/agy/workflows/cc-spec-mutation.md +191 -0
- package/presets/agy/workflows/cc-tdd-cycle.md +14 -0
- package/presets/claude/CLAUDE.md +4 -0
- package/presets/claude/commands/cc/api-contract.md +14 -0
- package/presets/claude/commands/cc/ask.md +2 -1
- package/presets/claude/commands/cc/backlog.md +104 -0
- package/presets/claude/commands/cc/db-migration.md +14 -0
- package/presets/claude/commands/cc/explore.md +1 -1
- 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 +30 -1
- package/presets/claude/commands/cc/review.md +3 -0
- package/presets/claude/commands/cc/scorecard.md +2 -0
- package/presets/claude/commands/cc/security.md +179 -0
- package/presets/claude/commands/cc/spec-mutation.md +190 -0
- package/presets/claude/commands/cc/tdd-cycle.md +17 -0
- package/presets/claude/gates/pre-commit/GATE.md +5 -4
- package/presets/claude/settings.json +13 -11
- package/presets/claude/skills/backlog/SKILL.md +61 -0
- package/presets/claude/skills/evaluation/SKILL.md +47 -24
- package/presets/claude/skills/openspec/SKILL.md +46 -34
- package/presets/claude/skills/security/SKILL.md +382 -0
- package/presets/claude/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/claude/skills/security-blue-team/SKILL.md +43 -0
- package/presets/claude/skills/security-cloud/SKILL.md +43 -0
- package/presets/claude/skills/security-crypto/SKILL.md +43 -0
- package/presets/claude/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/claude/skills/security-grc/SKILL.md +43 -0
- package/presets/claude/skills/security-incident-response/SKILL.md +45 -0
- package/presets/claude/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/claude/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/claude/skills/security-mobile/SKILL.md +43 -0
- package/presets/claude/skills/security-network/SKILL.md +43 -0
- package/presets/claude/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/claude/skills/security-recon/SKILL.md +45 -0
- package/presets/claude/skills/security-red-team/SKILL.md +44 -0
- package/presets/claude/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/claude/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/claude/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/claude/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/claude/skills/security-web/SKILL.md +44 -0
- 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/commands/cc-ask.md +2 -1
- package/presets/codex/gates/pre-commit/GATE.md +5 -4
- 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/AGENTS.md +2 -2
- package/presets/cursor/commands/cc/api-contract.md +14 -0
- package/presets/cursor/commands/cc/ask.md +2 -1
- package/presets/cursor/commands/cc/backlog.md +105 -0
- package/presets/cursor/commands/cc/db-migration.md +14 -0
- package/presets/cursor/commands/cc/explore.md +1 -1
- 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 +30 -1
- package/presets/cursor/commands/cc/scorecard.md +2 -0
- package/presets/cursor/commands/cc/security.md +179 -0
- package/presets/cursor/commands/cc/spec-mutation.md +190 -0
- package/presets/cursor/commands/cc/tdd-cycle.md +14 -0
- package/presets/cursor/gates/pre-commit/GATE.md +5 -4
- package/presets/cursor/skills/backlog/SKILL.md +61 -0
- package/presets/cursor/skills/evaluation/SKILL.md +61 -4
- package/presets/cursor/skills/openspec/SKILL.md +47 -33
- package/presets/cursor/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/cursor/skills/security-blue-team/SKILL.md +43 -0
- package/presets/cursor/skills/security-cloud/SKILL.md +43 -0
- package/presets/cursor/skills/security-crypto/SKILL.md +43 -0
- package/presets/cursor/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/cursor/skills/security-grc/SKILL.md +43 -0
- package/presets/cursor/skills/security-incident-response/SKILL.md +45 -0
- package/presets/cursor/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/cursor/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/cursor/skills/security-mobile/SKILL.md +43 -0
- package/presets/cursor/skills/security-network/SKILL.md +43 -0
- package/presets/cursor/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/cursor/skills/security-recon/SKILL.md +45 -0
- package/presets/cursor/skills/security-red-team/SKILL.md +44 -0
- package/presets/cursor/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/cursor/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/cursor/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/cursor/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/cursor/skills/security-web/SKILL.md +44 -0
- 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-ask.md +2 -1
- package/presets/opencode/commands/cc-backlog.md +68 -0
- package/presets/opencode/commands/cc-db-migration.md +14 -0
- package/presets/opencode/commands/cc-explore.md +1 -1
- 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 +17 -1
- package/presets/opencode/commands/cc-scorecard.md +2 -0
- package/presets/opencode/commands/cc-security.md +179 -0
- package/presets/opencode/commands/cc-spec-mutation.md +190 -0
- package/presets/opencode/commands/cc-tdd-cycle.md +14 -0
- package/presets/opencode/gates/pre-commit/GATE.md +5 -4
- 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 +61 -0
- package/presets/opencode/skills/evaluation/SKILL.md +61 -2
- package/presets/opencode/skills/openspec/SKILL.md +47 -31
- package/presets/opencode/skills/security-ai-llm/SKILL.md +43 -0
- package/presets/opencode/skills/security-blue-team/SKILL.md +43 -0
- package/presets/opencode/skills/security-cloud/SKILL.md +43 -0
- package/presets/opencode/skills/security-crypto/SKILL.md +43 -0
- package/presets/opencode/skills/security-exploit-dev/SKILL.md +45 -0
- package/presets/opencode/skills/security-grc/SKILL.md +43 -0
- package/presets/opencode/skills/security-incident-response/SKILL.md +45 -0
- package/presets/opencode/skills/security-log-analysis/SKILL.md +43 -0
- package/presets/opencode/skills/security-malware-analysis/SKILL.md +44 -0
- package/presets/opencode/skills/security-mobile/SKILL.md +43 -0
- package/presets/opencode/skills/security-network/SKILL.md +43 -0
- package/presets/opencode/skills/security-ot-ics/SKILL.md +43 -0
- package/presets/opencode/skills/security-recon/SKILL.md +45 -0
- package/presets/opencode/skills/security-red-team/SKILL.md +44 -0
- package/presets/opencode/skills/security-reverse-engineering/SKILL.md +44 -0
- package/presets/opencode/skills/security-soc-automation/SKILL.md +43 -0
- package/presets/opencode/skills/security-threat-hunting/SKILL.md +43 -0
- package/presets/opencode/skills/security-vuln-assessment/SKILL.md +45 -0
- package/presets/opencode/skills/security-web/SKILL.md +44 -0
- 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/council/council.yml +12 -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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-codeconductor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A multi-agent orchestration framework for AI-assisted software engineering workflows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -49,7 +49,10 @@
|
|
|
49
49
|
"build:lib": "bun build src/index.ts --target=node --outfile=dist/library.js --packages=external",
|
|
50
50
|
"build:types": "tsc -p tsconfig.lib.json --emitDeclarationOnly",
|
|
51
51
|
"test": "bun test",
|
|
52
|
+
"test:fast": "bun run scripts/test-fast.ts",
|
|
52
53
|
"typecheck": "tsc --noEmit",
|
|
54
|
+
"lint": "bun run scripts/lint.ts",
|
|
55
|
+
"check:coverage": "bun run scripts/check-coverage.ts",
|
|
53
56
|
"check:prompt-changelog": "bun run scripts/check-prompt-changelog.ts",
|
|
54
57
|
"release:patch": "bash release.sh patch",
|
|
55
58
|
"release:minor": "bash release.sh minor",
|
package/presets/agy/AGENTS.md
CHANGED
|
@@ -72,6 +72,7 @@ Antigravity CLI loads custom slash commands from `.agents/workflows/*.md`. The f
|
|
|
72
72
|
| `/cc-review` | Runs a structured, multi-perspective code review and audit |
|
|
73
73
|
| `/cc-test-plan` | Generates a structured test plan for a given scope |
|
|
74
74
|
| `/cc-tdd-cycle` | Runs a Test-Driven Development (TDD) cycle |
|
|
75
|
+
| `/cc-spec-mutation` | Spec-locked TDD with SHA-256 freeze and mutation-testing gate |
|
|
75
76
|
| `/cc-api-contract`| Handles API contract modification and validation |
|
|
76
77
|
| `/cc-db-migration`| Coordinates database schema migrations safely |
|
|
77
78
|
| `/cc-iterative` | Advanced iterative workflow — wayfinding, grilling, TDD, council |
|
|
@@ -80,7 +81,10 @@ Antigravity CLI loads custom slash commands from `.agents/workflows/*.md`. The f
|
|
|
80
81
|
| `/cc-prototype` | Disposable spike in an isolated worktree |
|
|
81
82
|
| `/cc-handoff` | Compact the session to `.codeconductor/` Markdown |
|
|
82
83
|
| `/cc-clarify` | Re-explain the last deliverable in Task Card vocabulary |
|
|
84
|
+
| `/cc-backlog` | Author or append BACKLOG.md and plan OpenSpec change folders |
|
|
85
|
+
| `/cc-openspec` | OpenSpec delivery loop from BACKLOG.md |
|
|
83
86
|
| `/cc-pagespeed` | Performs a web performance and Core Web Vitals audit |
|
|
87
|
+
| `/cc-security` | Authorized defensive security workflow (authorization gate) |
|
|
84
88
|
|
|
85
89
|
---
|
|
86
90
|
|
|
@@ -138,7 +142,7 @@ When multiple signals apply, take the highest risk level. Do not average.
|
|
|
138
142
|
|
|
139
143
|
**Does not:** Write code. Execute tests. Push to any branch.
|
|
140
144
|
|
|
141
|
-
**Model:** `{{
|
|
145
|
+
**Model:** `{{MODEL}}`
|
|
142
146
|
|
|
143
147
|
**Responsibilities:**
|
|
144
148
|
1. Validate the Task Card before doing anything else.
|
|
@@ -186,7 +190,7 @@ High-risk checkpoint: [yes | no — if yes, describe what triggers a stop]
|
|
|
186
190
|
- bash: `deny`
|
|
187
191
|
- network: `deny`
|
|
188
192
|
|
|
189
|
-
**Model:** `{{
|
|
193
|
+
**Model:** `{{MODEL}}`
|
|
190
194
|
|
|
191
195
|
**Intake process:**
|
|
192
196
|
1. Read the entire request before asking anything.
|
|
@@ -231,7 +235,7 @@ High-risk checkpoint: [yes | no — if yes, describe what triggers a stop]
|
|
|
231
235
|
- bash: `allow` (git log, git diff, git status)
|
|
232
236
|
- network: `deny`
|
|
233
237
|
|
|
234
|
-
**Model:** `{{
|
|
238
|
+
**Model:** `{{MODEL}}`
|
|
235
239
|
|
|
236
240
|
**Repo Map format:**
|
|
237
241
|
```markdown
|
|
@@ -266,7 +270,7 @@ High-risk checkpoint: [yes | no — if yes, describe what triggers a stop]
|
|
|
266
270
|
- bash: `deny`
|
|
267
271
|
- network: `deny`
|
|
268
272
|
|
|
269
|
-
**Model:** `{{
|
|
273
|
+
**Model:** `{{MODEL}}`
|
|
270
274
|
|
|
271
275
|
**Does not:** Write files. Execute commands. Make routing decisions.
|
|
272
276
|
|
|
@@ -290,7 +294,7 @@ When the orchestrator receives a GoalGraph, it delegates tasks in dependency ord
|
|
|
290
294
|
- bash: `deny`
|
|
291
295
|
- network: `deny`
|
|
292
296
|
|
|
293
|
-
**Model:** `{{
|
|
297
|
+
**Model:** `{{MODEL}}`
|
|
294
298
|
|
|
295
299
|
**Technical Plan format:**
|
|
296
300
|
```markdown
|
|
@@ -327,7 +331,7 @@ When the orchestrator receives a GoalGraph, it delegates tasks in dependency ord
|
|
|
327
331
|
- bash: `allow` (build, test, and lint commands only)
|
|
328
332
|
- network: `deny`
|
|
329
333
|
|
|
330
|
-
**Model:** `{{
|
|
334
|
+
**Model:** `{{MODEL}}`
|
|
331
335
|
|
|
332
336
|
**Pre-implementation checklist:**
|
|
333
337
|
1. Create a Git Worktree: `git worktree add ../<branch>-session <branch>`
|
|
@@ -368,7 +372,7 @@ When the orchestrator receives a GoalGraph, it delegates tasks in dependency ord
|
|
|
368
372
|
- bash: `allow` (test commands only)
|
|
369
373
|
- network: `deny`
|
|
370
374
|
|
|
371
|
-
**Model:** `{{
|
|
375
|
+
**Model:** `{{MODEL}}`
|
|
372
376
|
|
|
373
377
|
**Coverage Summary format:**
|
|
374
378
|
```markdown
|
|
@@ -397,7 +401,7 @@ When the orchestrator receives a GoalGraph, it delegates tasks in dependency ord
|
|
|
397
401
|
- bash: `allow` (git diff, git status, test commands)
|
|
398
402
|
- network: `deny`
|
|
399
403
|
|
|
400
|
-
**Model:** `{{
|
|
404
|
+
**Model:** `{{MODEL}}`
|
|
401
405
|
|
|
402
406
|
**Review Axes & Gates:**
|
|
403
407
|
- **Simplicity Gate**: Flag overcomplicated/speculative code. Ask: "Would a senior engineer say this is overbuilt?"
|
|
@@ -455,7 +459,7 @@ When the orchestrator receives a GoalGraph, it delegates tasks in dependency ord
|
|
|
455
459
|
- bash: `deny`
|
|
456
460
|
- network: `deny`
|
|
457
461
|
|
|
458
|
-
**Model:** `{{
|
|
462
|
+
**Model:** `{{MODEL}}`
|
|
459
463
|
|
|
460
464
|
---
|
|
461
465
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Pre-commit Gate: Typecheck and Test
|
|
1
|
+
# Pre-commit Gate: Typecheck, Lint, and Test
|
|
2
2
|
|
|
3
|
-
Este gate instala un hook `pre-commit` que ejecuta `bun run typecheck` y `bun run test` antes de permitir commits en el repositorio. Si cualquiera de estos comandos falla, el commit es bloqueado.
|
|
3
|
+
Este gate instala un hook `pre-commit` que ejecuta `bun run typecheck`, `bun run lint` y `bun run test` antes de permitir commits en el repositorio. Si cualquiera de estos comandos falla, el commit es bloqueado.
|
|
4
4
|
|
|
5
5
|
## Cuándo usar
|
|
6
6
|
|
|
@@ -63,6 +63,7 @@ mkdir -p "$GIT_DIR/hooks"
|
|
|
63
63
|
cat > "$HOOK_PATH" << 'HOOK_EOF'
|
|
64
64
|
#!/bin/bash
|
|
65
65
|
bun run typecheck || exit 1
|
|
66
|
+
bun run lint || exit 1
|
|
66
67
|
bun run test || exit 1
|
|
67
68
|
HOOK_EOF
|
|
68
69
|
|
|
@@ -78,7 +79,7 @@ echo "Pre-commit hook installed successfully."
|
|
|
78
79
|
- **Resolución dinámica de git dir**: Usa `git rev-parse --git-dir` para localizar el directorio correcto, incluso en worktrees.
|
|
79
80
|
- **Detección de conflictos**: Si Husky o lint-staged ya está en `package.json`, el script avisa y no instala para evitar conflictos.
|
|
80
81
|
- **Protección de hooks existentes**: Si ya existe un `.git/hooks/pre-commit`, el script no lo sobrescribe.
|
|
81
|
-
- **Solo Bun**: El hook ejecuta `bun run typecheck` y `bun run test`. Asegúrate de que estos scripts están definidos en `package.json`.
|
|
82
|
+
- **Solo Bun**: El hook ejecuta `bun run typecheck`, `bun run lint` y `bun run test`. Asegúrate de que estos scripts están definidos en `package.json`.
|
|
82
83
|
|
|
83
84
|
## Verificación
|
|
84
85
|
|
|
@@ -121,7 +122,7 @@ Verifica que el hook es ejecutable:
|
|
|
121
122
|
|
|
122
123
|
chmod +x .git/hooks/pre-commit
|
|
123
124
|
|
|
124
|
-
Verifica que `bun run typecheck` y `bun run test` existen en `package.json`:
|
|
125
|
+
Verifica que `bun run typecheck`, `bun run lint` y `bun run test` existen en `package.json`:
|
|
125
126
|
|
|
126
127
|
cat package.json | grep -A 5 '"scripts"'
|
|
127
128
|
|
package/presets/agy/hooks.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"hooks": [
|
|
8
8
|
{
|
|
9
9
|
"type": "command",
|
|
10
|
-
"command": "
|
|
10
|
+
"command": "node -e \"const fs=require('fs'),p=['scripts/invoke-hook.cjs','.agents/scripts/invoke-hook.cjs'].find(f=>fs.existsSync(f));if(p)require(require('path').resolve(p));else{if(process.argv.includes('--format=agy')){process.stdout.write(process.argv.includes('post-tool')?'{}\\n':'{\\\"decision\\\":\\\"allow\\\"}\\n');}process.exit(0);}\" post-tool --format=agy"
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"hooks": [
|
|
22
22
|
{
|
|
23
23
|
"type": "command",
|
|
24
|
-
"command": "
|
|
24
|
+
"command": "node -e \"const fs=require('fs'),p=['scripts/invoke-hook.cjs','.agents/scripts/invoke-hook.cjs'].find(f=>fs.existsSync(f));if(p)require(require('path').resolve(p));else{if(process.argv.includes('--format=agy')){process.stdout.write(process.argv.includes('post-tool')?'{}\\n':'{\\\"decision\\\":\\\"allow\\\"}\\n');}process.exit(0);}\" pre-tool --format=agy"
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require('node:child_process');
|
|
5
|
+
const { existsSync } = require('node:fs');
|
|
6
|
+
const { join, resolve } = require('node:path');
|
|
7
|
+
|
|
8
|
+
const VALID_EVENTS = ['pre-tool', 'post-tool', 'session-start'];
|
|
9
|
+
const SPAWN_TIMEOUT = 10000;
|
|
10
|
+
|
|
11
|
+
const rawArgs = process.argv.slice(1);
|
|
12
|
+
const args = rawArgs.filter((arg) => {
|
|
13
|
+
if (VALID_EVENTS.includes(arg) || arg.startsWith('-')) return true;
|
|
14
|
+
return false;
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const event = args.find((a) => VALID_EVENTS.includes(a)) || 'pre-tool';
|
|
18
|
+
const extra = args.filter((a) => a !== event);
|
|
19
|
+
const isAgy = process.argv.some((a) => a === '--format=agy') || extra.includes('--format=agy');
|
|
20
|
+
|
|
21
|
+
function findProjectRoot() {
|
|
22
|
+
const candidates = [
|
|
23
|
+
process.env.PROJECT_ROOT,
|
|
24
|
+
process.env.WORKSPACE_DIR,
|
|
25
|
+
resolve(__dirname, '..', '..'),
|
|
26
|
+
process.cwd(),
|
|
27
|
+
].filter(Boolean);
|
|
28
|
+
|
|
29
|
+
for (const dir of candidates) {
|
|
30
|
+
if (
|
|
31
|
+
existsSync(join(dir, 'package.json')) ||
|
|
32
|
+
existsSync(join(dir, '.git')) ||
|
|
33
|
+
existsSync(join(dir, '.agents')) ||
|
|
34
|
+
existsSync(join(dir, '.claude'))
|
|
35
|
+
) {
|
|
36
|
+
return dir;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return resolve(__dirname, '..', '..');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const projectRoot = findProjectRoot();
|
|
43
|
+
|
|
44
|
+
function canRun(bin) {
|
|
45
|
+
try {
|
|
46
|
+
const result = spawnSync(bin, ['--version'], {
|
|
47
|
+
encoding: 'utf8',
|
|
48
|
+
windowsHide: true,
|
|
49
|
+
stdio: 'ignore',
|
|
50
|
+
timeout: SPAWN_TIMEOUT,
|
|
51
|
+
});
|
|
52
|
+
return result.status === 0;
|
|
53
|
+
} catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function tryRun(bin, runArgs) {
|
|
59
|
+
try {
|
|
60
|
+
const result = spawnSync(bin, runArgs, {
|
|
61
|
+
cwd: projectRoot,
|
|
62
|
+
stdio: 'inherit',
|
|
63
|
+
windowsHide: true,
|
|
64
|
+
env: process.env,
|
|
65
|
+
timeout: SPAWN_TIMEOUT,
|
|
66
|
+
});
|
|
67
|
+
if (result.error) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
if (result.status === 0) {
|
|
71
|
+
process.exit(0);
|
|
72
|
+
}
|
|
73
|
+
if (!isAgy && result.status === 2) {
|
|
74
|
+
process.exit(2);
|
|
75
|
+
}
|
|
76
|
+
return false;
|
|
77
|
+
} catch {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function fallback() {
|
|
83
|
+
if (isAgy) {
|
|
84
|
+
if (event === 'post-tool' || event === 'session-start') {
|
|
85
|
+
process.stdout.write('{}\n');
|
|
86
|
+
} else {
|
|
87
|
+
process.stdout.write('{"decision":"allow"}\n');
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
process.exit(0);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
try {
|
|
94
|
+
const srcMain = join(projectRoot, 'src', 'cli', 'main.ts');
|
|
95
|
+
if (existsSync(srcMain) && canRun('bun')) {
|
|
96
|
+
tryRun('bun', ['run', srcMain, 'hook', event, ...extra]);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const packaged = join(projectRoot, 'node_modules', 'cc-codeconductor', 'dist', 'index.js');
|
|
100
|
+
if (existsSync(packaged)) {
|
|
101
|
+
tryRun(process.execPath, [packaged, 'hook', event, ...extra]);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const localDist = join(projectRoot, 'dist', 'index.js');
|
|
105
|
+
if (existsSync(localDist)) {
|
|
106
|
+
tryRun(process.execPath, [localDist, 'hook', event, ...extra]);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
tryRun('npx', ['--no-install', 'cc-codeconductor', 'hook', event, ...extra]);
|
|
110
|
+
} catch {
|
|
111
|
+
// Ignore errors in runner attempts
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
fallback();
|
|
115
|
+
|
|
@@ -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
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-spec-mutation
|
|
3
|
+
description: >-
|
|
4
|
+
Spec-locked TDD with a mutation-testing gate — refine the intent
|
|
5
|
+
into an immutable Gherkin contract (SHA-256 frozen), implement under the
|
|
6
|
+
three laws of TDD, pass a judge audit, and merge only if every mutant dies.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Spec-Mutation — Hard Spec → TDD → Judge → Mutation Gate
|
|
10
|
+
|
|
11
|
+
Scope: $ARGUMENTS
|
|
12
|
+
|
|
13
|
+
Describe what behavior you want to implement. Include:
|
|
14
|
+
|
|
15
|
+
- The function, method, or feature to implement
|
|
16
|
+
- The expected behavior (inputs, outputs, invariants, edge cases)
|
|
17
|
+
- The allowed file scope (production files that may change)
|
|
18
|
+
- The test command for the affected suite (e.g. `pytest tests/test_billing.py`)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Contract
|
|
23
|
+
|
|
24
|
+
The Gherkin specification is the **immutable contract** of the system. No code
|
|
25
|
+
merges unless it survives intentional source mutations. The loop is closed:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
[Human + spec_partner] ──> [gherkin_author] ──> [Test Freeze: SHA-256]
|
|
29
|
+
│
|
|
30
|
+
┌──────────────────────────────────────────────────────┘
|
|
31
|
+
▼
|
|
32
|
+
[tdd_craftsman] <───────────────┐ (surviving mutant)
|
|
33
|
+
(Red-Green-Refactor) │
|
|
34
|
+
│ │
|
|
35
|
+
▼ │
|
|
36
|
+
[judge] ───────────> [mutation_testing] ───> [Safe Merge]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Role mapping onto Conductor Agents (AGENTS.md):
|
|
40
|
+
|
|
41
|
+
| Workflow role | Conductor Agent | Deliverable |
|
|
42
|
+
| ------------------ | ----------------- | ------------------------------------------ |
|
|
43
|
+
| `craftsman_lead` | `orchestrator` | Routed Task Cards, per-stage scorecards |
|
|
44
|
+
| `spec_partner` | `task-coach` | Spec draft with invariants and boundaries |
|
|
45
|
+
| `gherkin_author` | `contract-builder`| Strict `.feature` file (Given/When/Then) |
|
|
46
|
+
| `tdd_craftsman` | `tester` → `implementer` | Failing test, then minimal production code |
|
|
47
|
+
| `judge` | `reviewer` | Binary verdict (PASS/REJECT) with scoring |
|
|
48
|
+
| `mutation_testing` | `tester` (runner) | Killed/survived mutant report |
|
|
49
|
+
|
|
50
|
+
## Stage 1 — Interactive refinement (`spec_partner` / task-coach)
|
|
51
|
+
|
|
52
|
+
Do not jump to implementation. Apply Socratic questioning to the initial intent:
|
|
53
|
+
|
|
54
|
+
- Preconditions, postconditions, and edge cases.
|
|
55
|
+
- Invariant matrix: what must always be true.
|
|
56
|
+
- Scope boundaries: explicit `Scope / Files` and `Scope / Out` for the Task Card.
|
|
57
|
+
|
|
58
|
+
Stop gate: human confirms the draft before formalization.
|
|
59
|
+
|
|
60
|
+
## Stage 2 — Hard Spec formalization (`gherkin_author` / contract-builder)
|
|
61
|
+
|
|
62
|
+
Formalize the agreed draft into `specs/<task>.feature` using strict Gherkin:
|
|
63
|
+
|
|
64
|
+
- No vague language ("must respond fast" is forbidden — use measurable Then steps).
|
|
65
|
+
- Every scenario declares preconditions (`Given`), actions (`When`), and
|
|
66
|
+
observable states (`Then`).
|
|
67
|
+
- Once the human approves the `.feature`, freeze it:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
shasum -a 256 specs/<task>.feature tests/ > .codeconductor/tasks/<task_id>.lock
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
From this point `specs/` and `tests/` are **read-only** for implementation
|
|
74
|
+
agents. Before every later gate, recompute the hash; any single-byte difference
|
|
75
|
+
aborts the pipeline with scorecard 0 (Specification Gaming).
|
|
76
|
+
|
|
77
|
+
## Stage 3 — TDD under the three laws (`tdd_craftsman`)
|
|
78
|
+
|
|
79
|
+
Delegates to the `/cc-tdd-cycle` state machine (`tddCycleStateMachine` in
|
|
80
|
+
`domain/loop`). Evidence must be captured with `captureTddSuiteEvidence` — do
|
|
81
|
+
not hand-edit JSON under `.codeconductor/evidence/`.
|
|
82
|
+
|
|
83
|
+
1. **Law 1 (RED):** no production code except to make a failing test pass. A
|
|
84
|
+
compile error from a missing interface counts as a failure.
|
|
85
|
+
2. **Law 2:** write exactly one failing assertion or scenario at a time.
|
|
86
|
+
3. **Law 3 (GREEN):** write only the minimal production code to pass. No
|
|
87
|
+
speculative code, no preventive heuristics, stdlib-first.
|
|
88
|
+
|
|
89
|
+
Hard rule: any write attempt against `specs/` or `tests/` during GREEN/REFACTOR
|
|
90
|
+
is a harness violation — stop execution and report.
|
|
91
|
+
|
|
92
|
+
## Stage 4 — Judge audit (`judge` / reviewer)
|
|
93
|
+
|
|
94
|
+
Deterministic gates before spending compute on mutation:
|
|
95
|
+
|
|
96
|
+
- Clean compile / diagnostics exit code 0.
|
|
97
|
+
- Traceability: every Gherkin step maps to an implemented test step.
|
|
98
|
+
- Scope Gaming audit: `git diff --name-only` must match the Task Card
|
|
99
|
+
`Scope / Files` exactly. Relaxed types, weakened assertions, or out-of-scope
|
|
100
|
+
edits → REJECT with findings.
|
|
101
|
+
|
|
102
|
+
Verdict is binary: PASS continues to the mutation gate; REJECT returns to the
|
|
103
|
+
`implement` phase with the findings attached.
|
|
104
|
+
|
|
105
|
+
## Stage 5 — Mutation gate (`mutation_testing`)
|
|
106
|
+
|
|
107
|
+
Run the deterministic AST mutator shipped with this preset:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
python3 presets/shared/mutation_runner.py \
|
|
111
|
+
--target <production_file.py> \
|
|
112
|
+
--test-command "<test command>" \
|
|
113
|
+
--spec-folder specs
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The runner applies deterministic operator mutations (`>` → `<=`, `==` → `!=`,
|
|
117
|
+
`is` → `is not`, …) one at a time, re-runs the suite per mutant, and restores
|
|
118
|
+
the original source unconditionally (`finally` rollback).
|
|
119
|
+
|
|
120
|
+
- **Mutant killed (tests fail):** the suite detects the corruption. Continue.
|
|
121
|
+
- **Mutant survived (tests pass):** the tests are blind to this branch. The
|
|
122
|
+
runner writes `specs/handover.md` + appends to
|
|
123
|
+
`specs/implementation-summary.md` and exits with code **2**.
|
|
124
|
+
|
|
125
|
+
Non-Python stacks: substitute Stryker (JS/TS), PITest (JVM), or Mutmut
|
|
126
|
+
(Python full-suite) with the same contract — 100% kill rate or hands-off.
|
|
127
|
+
|
|
128
|
+
### Hands-off protocol (exit code 2)
|
|
129
|
+
|
|
130
|
+
1. Do NOT modify production code to "fix" a surviving mutant.
|
|
131
|
+
2. Route back to `tdd_craftsman` with `specs/handover.md` as input: write the
|
|
132
|
+
missing failing test (Law 1 & 2) that asserts the mutated branch.
|
|
133
|
+
3. Re-run stages 3–5.
|
|
134
|
+
|
|
135
|
+
### Circuit breaker (max 3 loops)
|
|
136
|
+
|
|
137
|
+
The orchestrator keeps a persistent counter per Task Card. If the
|
|
138
|
+
`tdd_craftsman ↔ mutation_testing` loop does not reach a 100% kill rate after
|
|
139
|
+
**3 iterations**:
|
|
140
|
+
|
|
141
|
+
- Cancel active subagents (stop token/context spend).
|
|
142
|
+
- `git checkout -- <scope>` rollback to the last clean state.
|
|
143
|
+
- Scorecard: `STATUS = BLOCKED`; escalate to a human operator. The branch stays
|
|
144
|
+
frozen until human arbitration.
|
|
145
|
+
|
|
146
|
+
## Guardrails (harness-enforced, not prompt-enforced)
|
|
147
|
+
|
|
148
|
+
- **Test Freezing:** SHA-256 of `specs/` + `tests/` stored in
|
|
149
|
+
`.codeconductor/tasks/<task_id>.lock`; hash mismatch aborts the pipeline.
|
|
150
|
+
- **Scope Guardian:** `fs_write`/`fs_patch` paths are validated against the Task
|
|
151
|
+
Card `Scope / Files`; path escapes (`../`) and critical files (`**/.env*`,
|
|
152
|
+
`**/credentials*`, infrastructure roots) are denied per `policy.yml`.
|
|
153
|
+
- **RBAC per role:** `gherkin_author` writes only `specs/`; `tdd_craftsman`
|
|
154
|
+
reads specs/tests and writes only scoped `src/`; `judge` and
|
|
155
|
+
`mutation_testing` are read-only except the runner's rolled-back patch.
|
|
156
|
+
- **Worktree isolation:** run the whole flow in a dedicated `git worktree`;
|
|
157
|
+
protected branches (`main`, `master`, `develop`) are never touched.
|
|
158
|
+
|
|
159
|
+
## Completion criteria
|
|
160
|
+
|
|
161
|
+
- [ ] `.feature` approved and frozen (SHA-256 lock file exists and matches).
|
|
162
|
+
- [ ] RED → GREEN → REFACTOR evidence captured per phase.
|
|
163
|
+
- [ ] Judge verdict PASS (compile clean, traceability complete, scope clean).
|
|
164
|
+
- [ ] Mutation runner exits 0 with `total_mutants_killed == total_points`.
|
|
165
|
+
- [ ] Scorecard records the kill rate and iteration count (≤ 3).
|
|
@@ -41,6 +41,9 @@ runner) — do not hand-edit JSON under `.codeconductor/evidence/`.
|
|
|
41
41
|
|
|
42
42
|
Do not advance phases until that evidence exists.
|
|
43
43
|
|
|
44
|
+
When delivering a BACKLOG item, `openspec done` on the test or implement card
|
|
45
|
+
uses the same runner evidence.
|
|
46
|
+
|
|
44
47
|
---
|
|
45
48
|
|
|
46
49
|
## Phase 1 — RED (Tester role)
|
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: evaluation
|
|
3
|
-
description:
|
|
3
|
+
description:
|
|
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.
|
|
4
7
|
---
|
|
5
8
|
|
|
6
|
-
|
|
9
|
+
# Evaluation
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
A scorecard measures the deliverable against eight weighted criteria. Spec
|
|
14
|
+
quality checklists are reviewer-owned. "Seems right" is not a verdict.
|
|
15
|
+
|
|
16
|
+
Pass threshold: weighted score >= 2.0 and no criterion at 0.
|
|
17
|
+
|
|
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
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`openspec analyze` can auto-suggest `acceptance` / `tests` on `--from-diff`.
|
|
42
|
+
Archive needs PASS when review is required.
|
|
43
|
+
|
|
44
|
+
Outcomes append to `.codeconductor/evaluation/outcomes.jsonl`.
|
|
45
|
+
|
|
46
|
+
## Common Rationalizations
|
|
47
|
+
|
|
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. |
|
|
53
|
+
|
|
54
|
+
## Red Flags
|
|
55
|
+
|
|
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`
|
|
59
|
+
|
|
60
|
+
## Verification
|
|
61
|
+
|
|
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,32 +1,66 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: openspec
|
|
3
3
|
description:
|
|
4
|
-
|
|
5
|
-
Use when running /cc-openspec
|
|
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.
|
|
6
8
|
---
|
|
7
9
|
|
|
8
|
-
# OpenSpec
|
|
10
|
+
# OpenSpec delivery
|
|
9
11
|
|
|
10
|
-
##
|
|
12
|
+
## Overview
|
|
11
13
|
|
|
12
|
-
`BACKLOG.md`
|
|
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.
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
- `## Items` — active backlog entries
|
|
16
|
-
- `## Archive` — completed entries (do not re-execute)
|
|
17
|
+
## When to Use
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
- `/cc-openspec` or `openspec next` / `plan` / `done` / `archive`
|
|
20
|
+
- An item is `READY` or later and must move through the state machine
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
**NOT** for creating `BACKLOG.md` (use skill `backlog`) or for stack-specific
|
|
23
|
+
coding rules.
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
## Process
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
Local CLI is `bun run dev`. Published package is `npx cc-codeconductor`.
|
|
25
28
|
|
|
26
|
-
`openspec validate
|
|
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.
|
|
27
40
|
|
|
28
|
-
|
|
41
|
+
Status machine: `TODO` → `READY` → `PLANNED` → `IN_PROGRESS` → `REVIEW` → `DONE`
|
|
42
|
+
→ Archive. `BLOCKED` returns to `READY`. Reviewer rejection: `REVIEW` →
|
|
43
|
+
`IN_PROGRESS`.
|
|
29
44
|
|
|
30
|
-
|
|
45
|
+
## Common Rationalizations
|
|
31
46
|
|
|
32
|
-
|
|
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. |
|
|
53
|
+
|
|
54
|
+
## Red Flags
|
|
55
|
+
|
|
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
|
|
59
|
+
|
|
60
|
+
## Verification
|
|
61
|
+
|
|
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`
|