cc-codeconductor 1.6.0 → 1.7.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 +22 -7
- package/dist/core/compilation/compile-checker.d.ts +3 -2
- package/dist/core/goal/goal-state.d.ts +1 -0
- package/dist/core/orchestrator/runtime-orchestrator.d.ts +1 -0
- package/dist/core/queue/lock.d.ts +3 -0
- package/dist/core/verification/rdd-receipt.d.ts +25 -0
- package/dist/core/verification/verification-runner.d.ts +27 -2
- package/dist/index.js +1501 -782
- package/dist/library.js +420 -142
- package/dist/validation/schemas.d.ts +65 -26
- package/docs/generated/cli.md +8 -0
- package/package.json +2 -1
- package/presets/agy/AGENTS.md +1 -1
- package/presets/agy/scripts/invoke-hook.cjs +43 -24
- package/presets/agy/skills/backlog/SKILL.md +1 -1
- package/presets/agy/skills/cc-feature/SKILL.md +17 -16
- package/presets/agy/skills/cc-fix/SKILL.md +28 -34
- package/presets/agy/skills/cc-spec-mutation/SKILL.md +1 -1
- package/presets/agy/skills/cc-tdd-cycle/SKILL.md +1 -1
- package/presets/agy/skills/evaluation/SKILL.md +1 -1
- package/presets/agy/skills/openspec/SKILL.md +10 -6
- package/presets/agy/skills/testing-tdd/SKILL.md +3 -3
- package/presets/agy/workflows/cc-api-contract.md +1 -1
- package/presets/agy/workflows/cc-ask.md +2 -2
- package/presets/agy/workflows/cc-council.md +2 -0
- package/presets/agy/workflows/cc-db-migration.md +1 -1
- package/presets/agy/workflows/cc-feature.md +1 -1
- package/presets/agy/workflows/cc-fix.md +1 -1
- package/presets/agy/workflows/cc-iterative.md +1 -1
- package/presets/agy/workflows/cc-odd.md +2 -2
- package/presets/agy/workflows/cc-openspec.md +1 -1
- package/presets/agy/workflows/cc-spec-mutation.md +2 -2
- package/presets/agy/workflows/cc-tdd-cycle.md +2 -2
- package/presets/claude/CLAUDE.md +1 -1
- package/presets/claude/commands/cc/api-contract.md +1 -1
- package/presets/claude/commands/cc/ask.md +2 -2
- package/presets/claude/commands/cc/council.md +2 -83
- package/presets/claude/commands/cc/db-migration.md +1 -1
- package/presets/claude/commands/cc/feature.md +1 -1
- package/presets/claude/commands/cc/fix.md +1 -1
- package/presets/claude/commands/cc/iterative.md +1 -1
- package/presets/claude/commands/cc/odd.md +2 -2
- package/presets/claude/commands/cc/openspec.md +5 -5
- package/presets/claude/commands/cc/spec-mutation.md +2 -2
- package/presets/claude/commands/cc/tdd-cycle.md +3 -3
- package/presets/claude/settings.json +6 -101
- package/presets/claude/skills/backlog/SKILL.md +1 -1
- package/presets/claude/skills/evaluation/SKILL.md +1 -1
- package/presets/claude/skills/openspec/SKILL.md +10 -6
- package/presets/claude/skills/testing-tdd/SKILL.md +3 -3
- package/presets/codex/AGENTS.md +1 -1
- package/presets/codex/commands/cc-ask.md +2 -2
- package/presets/codex/skills/backlog/SKILL.md +1 -1
- package/presets/codex/skills/cc-api-contract/SKILL.md +1 -1
- package/presets/codex/skills/cc-council/SKILL.md +2 -93
- package/presets/codex/skills/cc-db-migration/SKILL.md +1 -1
- package/presets/codex/skills/cc-feature/SKILL.md +1 -1
- package/presets/codex/skills/cc-fix/SKILL.md +1 -1
- package/presets/codex/skills/cc-iterative/SKILL.md +1 -1
- package/presets/codex/skills/cc-odd/SKILL.md +2 -2
- package/presets/codex/skills/cc-openspec/SKILL.md +10 -8
- package/presets/codex/skills/cc-spec-mutation/SKILL.md +2 -2
- package/presets/codex/skills/cc-tdd-cycle/SKILL.md +2 -2
- package/presets/codex/skills/django-testing/SKILL.md +1 -1
- package/presets/codex/skills/evaluation/SKILL.md +1 -1
- package/presets/codex/skills/openspec/SKILL.md +10 -6
- package/presets/codex/skills/python-django-stack/SKILL.md +1 -1
- package/presets/codex/skills/testing-tdd/SKILL.md +3 -3
- package/presets/cursor/AGENTS.md +1 -1
- package/presets/cursor/commands/cc/api-contract.md +1 -1
- package/presets/cursor/commands/cc/ask.md +2 -2
- package/presets/cursor/commands/cc/council.md +2 -83
- package/presets/cursor/commands/cc/db-migration.md +1 -1
- package/presets/cursor/commands/cc/feature.md +1 -1
- package/presets/cursor/commands/cc/fix.md +1 -1
- package/presets/cursor/commands/cc/iterative.md +1 -1
- package/presets/cursor/commands/cc/odd.md +2 -2
- package/presets/cursor/commands/cc/openspec.md +10 -8
- package/presets/cursor/commands/cc/spec-mutation.md +2 -2
- package/presets/cursor/commands/cc/tdd-cycle.md +2 -2
- package/presets/cursor/skills/backlog/SKILL.md +1 -1
- package/presets/cursor/skills/evaluation/SKILL.md +1 -1
- package/presets/cursor/skills/openspec/SKILL.md +10 -6
- package/presets/cursor/skills/testing-tdd/SKILL.md +3 -3
- package/presets/gemini/GEMINI.md +1 -1
- package/presets/gemini/commands/cc/api-contract.toml +1 -1
- package/presets/gemini/commands/cc/ask.toml +2 -2
- package/presets/gemini/commands/cc/council.toml +2 -83
- package/presets/gemini/commands/cc/db-migration.toml +1 -1
- package/presets/gemini/commands/cc/feature.toml +1 -1
- package/presets/gemini/commands/cc/fix.toml +1 -1
- package/presets/gemini/commands/cc/iterative.toml +1 -1
- package/presets/gemini/commands/cc/odd.toml +2 -2
- package/presets/gemini/commands/cc/openspec.toml +10 -8
- package/presets/gemini/commands/cc/spec-mutation.toml +2 -2
- package/presets/gemini/commands/cc/tdd-cycle.toml +2 -2
- package/presets/muse/AGENTS.md +1 -1
- package/presets/opencode/agents/implementer.md +1 -1
- package/presets/opencode/agents/tester.md +1 -1
- package/presets/opencode/commands/cc-api-contract.md +1 -1
- package/presets/opencode/commands/cc-ask.md +2 -2
- package/presets/opencode/commands/cc-council.md +2 -83
- package/presets/opencode/commands/cc-db-migration.md +1 -1
- package/presets/opencode/commands/cc-feature.md +1 -1
- package/presets/opencode/commands/cc-fix.md +1 -1
- package/presets/opencode/commands/cc-iterative.md +1 -1
- package/presets/opencode/commands/cc-odd.md +2 -2
- package/presets/opencode/commands/cc-openspec.md +2 -2
- package/presets/opencode/commands/cc-spec-mutation.md +2 -2
- package/presets/opencode/commands/cc-tdd-cycle.md +2 -2
- package/presets/opencode/prompts/v1.0.0/implementer.md +1 -1
- package/presets/opencode/prompts/v1.0.0/tester.md +1 -1
- package/presets/opencode/skills/backlog/SKILL.md +1 -1
- package/presets/opencode/skills/django-testing/SKILL.md +1 -0
- package/presets/opencode/skills/evaluation/SKILL.md +1 -1
- package/presets/opencode/skills/openspec/SKILL.md +10 -6
- package/presets/opencode/skills/python-django-stack/SKILL.md +1 -0
- package/presets/opencode/skills/python-fastapi-stack/SKILL.md +1 -0
- package/presets/opencode/skills/spring-boot-kotlin/SKILL.md +1 -0
- package/presets/opencode/skills/sqlalchemy/SKILL.md +1 -0
- package/presets/opencode/skills/testing-tdd/SKILL.md +3 -3
- package/presets/pi/AGENTS.md +1 -1
- package/presets/shared/invoke-hook.cjs +43 -24
- package/src/presets/manifests/claude.yml +1 -1
- package/src/presets/shared-skills.yml +30 -0
- package/src/presets/targets/pi.yml +1 -1
|
@@ -2,89 +2,8 @@
|
|
|
2
2
|
description: Council-driven workflow with CCEP-1 bootstrap
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Task request: $ARGUMENTS
|
|
5
|
+
<!-- GENERATED redirect to presets/agy/workflows/cc-council.md by scripts/inject-ccep-bootstrap.ts — DO NOT EDIT. -->
|
|
8
6
|
|
|
9
7
|
## Step 0 — CCEP Bootstrap
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
command: council
|
|
13
|
-
|
|
14
|
-
1. Run: `npx cc-codeconductor ccep profile council --output json` to get the phases and their roles.
|
|
15
|
-
2. For each delegated phase, run: `npx cc-codeconductor ccep compile --command council --phase <phase-id> "$ARGUMENTS" --view prompt --output json`
|
|
16
|
-
3. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command council --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
|
|
17
|
-
4. Pass each subagent only the compiled `prompt` for its phase — never forward raw `$ARGUMENTS` to planners.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Step 1 — Wayfinding (repo-explorer)
|
|
22
|
-
|
|
23
|
-
If `graphify-out/graph.json` exists, run `graphify query "$ARGUMENTS"` (and
|
|
24
|
-
`graphify path` / `graphify explain` when needed). Then invoke `repo-explorer`
|
|
25
|
-
to map impact radius before deliberation. Do not write code in this step.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Step 2 — Deliberation & Specification (SDD)
|
|
30
|
-
|
|
31
|
-
Invoke the `council` skill to analyze the request before writing any code. The council must act as a steering committee involving `task-coach` (Product), `architect`, and `devil`.
|
|
32
|
-
|
|
33
|
-
The council must:
|
|
34
|
-
1. Clarify the prompt and define the absolute minimum scope (Simplicity Gate).
|
|
35
|
-
2. Explicitly document all assumptions and run the Grilling protocol on each one (Think Before Coding).
|
|
36
|
-
3. Draft a Task Card & Technical Plan (The Specification).
|
|
37
|
-
|
|
38
|
-
**STOP here.** Unresolved grilling questions populate `questionsForUser` in the
|
|
39
|
-
CCEP-1 `planner-output`; `ccep evaluate` (ConfirmationGate) halts until a human
|
|
40
|
-
answers. Show the agreed Task Card & Technical Plan and wait for confirmation
|
|
41
|
-
before continuing.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Step 3 — Test Definition (TDD)
|
|
46
|
-
|
|
47
|
-
Invoke `tester` with the approved Task Card & Technical Plan.
|
|
48
|
-
|
|
49
|
-
tester must:
|
|
50
|
-
1. Write failing tests based on the Acceptance Criteria defined in the Task Card.
|
|
51
|
-
2. Confirm the tests fail as expected (Red state).
|
|
52
|
-
|
|
53
|
-
**Goal-Driven Execution (Karpathy)**: Do not proceed until verifiable tests are written and fail for the correct reasons.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## Step 4 — Surgical Implementation
|
|
58
|
-
|
|
59
|
-
Invoke `implementer` with the failing tests and the Technical Plan.
|
|
60
|
-
|
|
61
|
-
implementer must:
|
|
62
|
-
1. Write the minimal code required to pass the tests.
|
|
63
|
-
2. Touch ONLY the files specified in the Technical Plan (Surgical Changes).
|
|
64
|
-
3. NOT refactor adjacent code, change existing styles, or build speculative features.
|
|
65
|
-
4. Run the tests. Loop `implementer` -> `tester` until all tests pass (Green state), at most 3 iterations -- then stop and report the failing tests instead of looping.
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Step 5 — Multi-Perspective Council Review
|
|
70
|
-
|
|
71
|
-
Invoke the `council` skill on the generated diff to perform the final review phase.
|
|
72
|
-
|
|
73
|
-
The council will evaluate the diff against the 6 axes (Architecture, Security, Product, Delivery, DataOps, Devil).
|
|
74
|
-
|
|
75
|
-
If ANY agent votes CRITICAL (especially due to over-engineering, scope creep, or missing the verifiable goals):
|
|
76
|
-
- The Review Report status is **BLOCKED**.
|
|
77
|
-
- Return to Step 4 with the feedback (at most 3 review rounds in total -- then deliver the BLOCKED verdict with the unresolved findings instead of looping).
|
|
78
|
-
|
|
79
|
-
If APPROVED (no CRITICAL findings):
|
|
80
|
-
- Deliver the final Council Verdict and the diff summary.
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Completion
|
|
85
|
-
|
|
86
|
-
Deliver the complete Council Verdict. The feature is only complete when tests pass and the council explicitly approves the implementation according to the specification.
|
|
87
|
-
|
|
88
|
-
## Next
|
|
89
|
-
|
|
90
|
-
Approved: merge. Blocked: return the findings to `/cc-fix` or `/cc-feature`.
|
|
9
|
+
command: council. Read `presets/agy/workflows/cc-council.md`, then `ccep profile council` + `ccep compile --command council --view prompt`.
|
|
@@ -29,7 +29,7 @@ If `openspec status` reports an active change folder:
|
|
|
29
29
|
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
30
30
|
4. Next command spelling on this runner: `/cc-db-migration`
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Run the CLI as `npx cc-codeconductor <same argv>`.
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
@@ -51,7 +51,7 @@ If `openspec status` reports an active change folder:
|
|
|
51
51
|
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
52
52
|
4. Next command spelling on this runner: `/cc-feature`
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Run the CLI as `npx cc-codeconductor <same argv>`.
|
|
55
55
|
|
|
56
56
|
Skills: `using-cc-skills`, `openspec`, `testing-tdd`, `evaluation`.
|
|
57
57
|
Do not skip `openspec analyze` when a change folder is active.
|
|
@@ -61,7 +61,7 @@ If `openspec status` reports an active change folder:
|
|
|
61
61
|
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
62
62
|
4. Next command spelling on this runner: `/cc-fix`
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
Run the CLI as `npx cc-codeconductor <same argv>`.
|
|
65
65
|
|
|
66
66
|
---
|
|
67
67
|
|
|
@@ -29,7 +29,7 @@ If `openspec status` reports an active change folder:
|
|
|
29
29
|
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
30
30
|
4. Next command spelling on this runner: `/cc-iterative`
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Run the CLI as `npx cc-codeconductor <same argv>`.
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
@@ -7,8 +7,8 @@ description: Create or resume an opt-in Delivery Ledger for substantial authoriz
|
|
|
7
7
|
## Step 0 — CCEP Bootstrap
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
npx cc-codeconductor ccep profile odd --output json
|
|
11
|
+
npx cc-codeconductor ccep compile --command odd --phase <phase-id> "$ARGUMENTS" --view prompt --output json
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Pass each subagent only the compiled `prompt` for its phase.
|
|
@@ -59,7 +59,7 @@ If `openspec status` reports an active change folder:
|
|
|
59
59
|
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
60
60
|
4. Next command spelling on this runner: `/cc-openspec`
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Run the CLI as `npx cc-codeconductor <same argv>`.
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
@@ -96,7 +96,7 @@ For each pending card: `npx cc-codeconductor openspec next`, then invoke the lis
|
|
|
96
96
|
- implement → `implementer`
|
|
97
97
|
- review → `reviewer`
|
|
98
98
|
|
|
99
|
-
Run each phase as a subagent with isolated context. Implementer uses a git worktree. Discover is read-only (never writes code); implementer ticks `tasks.md`
|
|
99
|
+
Run each phase as a subagent with isolated context. Implementer uses a git worktree. Discover is read-only (never writes code); `done` ticks each card's boxes and the implementer ticks any other `tasks.md` box (`- [ ]` → `- [x]`, only `x`/`X` counts). If implementation reveals a design problem, pause and reconcile planning artifacts first (any direction, planning-only, confirm each edit); if the intent changed, open a fresh item with `/cc-backlog`.
|
|
100
100
|
|
|
101
101
|
---
|
|
102
102
|
|
|
@@ -39,7 +39,7 @@ If `openspec status` reports an active change folder:
|
|
|
39
39
|
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
40
40
|
4. Next command spelling on this runner: `/cc-spec-mutation`
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Run the CLI as `npx cc-codeconductor <same argv>`.
|
|
43
43
|
|
|
44
44
|
---
|
|
45
45
|
|
|
@@ -101,7 +101,7 @@ aborts the pipeline with scorecard 0 (Specification Gaming).
|
|
|
101
101
|
## Stage 3 — TDD under the three laws (`tdd_craftsman`)
|
|
102
102
|
|
|
103
103
|
Delegates to the `/cc-tdd-cycle` state machine (`tddCycleStateMachine` in
|
|
104
|
-
`domain/loop`). Evidence must be captured with `
|
|
104
|
+
`domain/loop`). Evidence must be captured with `npx cc-codeconductor tdd capture` — do
|
|
105
105
|
not hand-edit JSON under `.codeconductor/evidence/`.
|
|
106
106
|
|
|
107
107
|
1. **Law 1 (RED):** no production code except to make a failing test pass. A
|
|
@@ -38,7 +38,7 @@ If `openspec status` reports an active change folder:
|
|
|
38
38
|
3. If analyze `stop` is true or any finding is CRITICAL, stop. Do not delegate to implementer.
|
|
39
39
|
4. Next command spelling on this runner: `/cc-tdd-cycle`
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Run the CLI as `npx cc-codeconductor <same argv>`.
|
|
42
42
|
|
|
43
43
|
---
|
|
44
44
|
|
|
@@ -58,7 +58,7 @@ Mixing phases invalidates the cycle.
|
|
|
58
58
|
## Verifiable phase gates
|
|
59
59
|
|
|
60
60
|
RED → GREEN and GREEN → REFACTOR are enforced by `tddCycleStateMachine` in
|
|
61
|
-
`domain/loop`. Evidence must be captured with `
|
|
61
|
+
`domain/loop`. Evidence must be captured with `npx cc-codeconductor tdd capture` (verification
|
|
62
62
|
runner) — do not hand-edit JSON under `.codeconductor/evidence/`.
|
|
63
63
|
|
|
64
64
|
- RED→GREEN requires runner evidence that the suite **failed**.
|
|
@@ -232,4 +232,4 @@ tests. On **REJECT**, stop and escalate to the orchestrator.
|
|
|
232
232
|
Invoke via `/cc-feature`, `/cc-fix`, `/cc-tdd-cycle`, or the orchestrator.
|
|
233
233
|
Do not invoke other agents. Invoke skill `testing-tdd`.
|
|
234
234
|
Deliverable is incomplete without a passing suite and runner TDD evidence when
|
|
235
|
-
TDD is required. Scorecard: `
|
|
235
|
+
TDD is required. Scorecard: `npx cc-codeconductor scorecard create --from-diff`.
|
|
@@ -301,4 +301,4 @@ and confirmed failing; list the failing test paths in `artifacts` so the
|
|
|
301
301
|
|
|
302
302
|
Invoke via `/cc-tdd-cycle`, `/cc-feature`, or the orchestrator (test before
|
|
303
303
|
implement). Do not invoke other agents. Invoke skill `testing-tdd`.
|
|
304
|
-
Deliverable is incomplete without `
|
|
304
|
+
Deliverable is incomplete without `npx cc-codeconductor tdd capture` when TDD is required.
|
|
@@ -29,7 +29,7 @@ the item here.
|
|
|
29
29
|
4. Create `BACKLOG.md` from `presets/templates/BACKLOG.md` or append under
|
|
30
30
|
`## Items`. Do not rewrite `## Global` or `## Archive`.
|
|
31
31
|
5. Next ID = max numeric suffix in Items + Archive + 1, zero-padded (`BC-013`).
|
|
32
|
-
6. `
|
|
32
|
+
6. `npx cc-codeconductor openspec validate`. Fix until valid.
|
|
33
33
|
7. `openspec plan BC-xxx` for each **new** item this run. Then tell the user
|
|
34
34
|
to run `/cc-openspec`.
|
|
35
35
|
|
|
@@ -24,7 +24,7 @@ coding rules.
|
|
|
24
24
|
|
|
25
25
|
## Process
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
The CLI is always `npx cc-codeconductor`.
|
|
28
28
|
|
|
29
29
|
1. `openspec validate` — must pass before delivery. If you reached this
|
|
30
30
|
workflow on your own (the user did not ask for OpenSpec) and there is no
|
|
@@ -40,9 +40,13 @@ Local CLI is `bun run dev`. Published package is `npx cc-codeconductor`.
|
|
|
40
40
|
5. Phases: discover (`repo-explorer`) → design (`architect`) → test (`tester`) →
|
|
41
41
|
implement (`implementer`) → review (`reviewer`). If Global `TDD required: yes`,
|
|
42
42
|
test runs before implement. Discover is read-only: it never writes code.
|
|
43
|
-
6. `openspec done` on test/implement
|
|
44
|
-
|
|
45
|
-
(
|
|
43
|
+
6. `openspec done` on test/implement needs runner evidence: run
|
|
44
|
+
`npx cc-codeconductor tdd capture --task <cardId> --phase red|green --command "<test command>"`
|
|
45
|
+
first (RED on the test card, GREEN on the implement card). Handmade evidence JSON is
|
|
46
|
+
rejected. It is `ev-tdd-*` evidence, not an RDD receipt (`ev-rdd-*`, `rdd verify`).
|
|
47
|
+
`done` ticks that card's `tasks.md` boxes and keeps your edits; the implementer ticks
|
|
48
|
+
any other box it adds (`- [ ]` → `- [x]`, only `x`/`X` counts). `archive` fails while
|
|
49
|
+
boxes stay unchecked (override: `--allow-unchecked`).
|
|
46
50
|
7. When implementation reveals a design problem, pause and reconcile the planning
|
|
47
51
|
artifacts first — in any direction (a later artifact may force revising an
|
|
48
52
|
earlier one). Planning artifacts only in that step, never code; confirm each
|
|
@@ -54,7 +58,7 @@ Local CLI is `bun run dev`. Published package is `npx cc-codeconductor`.
|
|
|
54
58
|
9. `scorecard create --task BC-xxx --from-diff` then record a verdict.
|
|
55
59
|
10. `openspec archive` only after human review when `Review required: yes` and
|
|
56
60
|
the scorecard is PASS. Archive re-checks planning artifacts and analyze
|
|
57
|
-
CRITICALs, and
|
|
61
|
+
CRITICALs, and fails on unchecked `tasks.md` boxes (override: `--allow-unchecked`), ticks the BACKLOG acceptance criteria.
|
|
58
62
|
|
|
59
63
|
Status machine: `TODO` → `READY` → `PLANNED` → `IN_PROGRESS` → `REVIEW` → `DONE`
|
|
60
64
|
→ Archive. `BLOCKED` returns to `READY`. Reviewer rejection: `REVIEW` →
|
|
@@ -111,4 +115,4 @@ delivery read-only and record unavailable visual or emulator evidence as pending
|
|
|
111
115
|
- [ ] `tasks.md` boxes ticked as FRs land
|
|
112
116
|
- [ ] `openspec verify --output json` checked before archive
|
|
113
117
|
- [ ] `scorecard create --from-diff` recorded
|
|
114
|
-
- [ ] Suite check (optional): `
|
|
118
|
+
- [ ] Suite check (optional): `npx cc-codeconductor scorecard suite-run --suite workflow-gates`
|
|
@@ -11,7 +11,7 @@ description:
|
|
|
11
11
|
## Overview
|
|
12
12
|
|
|
13
13
|
Red (failing test) → Green (minimal code) → Refactor. Evidence comes from
|
|
14
|
-
`
|
|
14
|
+
`npx cc-codeconductor tdd capture`, not handmade JSON.
|
|
15
15
|
|
|
16
16
|
## When to Use
|
|
17
17
|
|
|
@@ -29,7 +29,7 @@ Red (failing test) → Green (minimal code) → Refactor. Evidence comes from
|
|
|
29
29
|
when TDD is required).
|
|
30
30
|
5. Cover happy path, edge, and error for each behavior.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Pyramid default: many unit, fewer integration, rare E2E.
|
|
33
33
|
|
|
34
34
|
## Common Rationalizations
|
|
35
35
|
|
|
@@ -50,4 +50,4 @@ Local: `bun run dev`. Pyramid default: many unit, fewer integration, rare E2E.
|
|
|
50
50
|
- [ ] Suite failed before implement
|
|
51
51
|
- [ ] Suite passed after implement
|
|
52
52
|
- [ ] Runner evidence exists (not handmade)
|
|
53
|
-
- [ ] Optional: `
|
|
53
|
+
- [ ] Optional: `npx cc-codeconductor scorecard suite-run --suite workflow-gates`
|
package/presets/pi/AGENTS.md
CHANGED
|
@@ -42,7 +42,7 @@ act as that role for the rest of the step.
|
|
|
42
42
|
|
|
43
43
|
## Receipt integrity
|
|
44
44
|
|
|
45
|
-
- For any implementation, test, review, handoff, or delivery decision, capture or verify the current RDD receipt with `
|
|
45
|
+
- For any implementation, test, review, handoff, or delivery decision, capture or verify the current RDD receipt with `npx cc-codeconductor rdd`.
|
|
46
46
|
- A receipt is valid only for its exact candidate. If code, tests, contracts, or runner configuration changed, repeat the affected verification.
|
|
47
47
|
- TDD and Mutation Testing retain their existing gates; RDD verifies that their observed evidence still belongs to the current candidate.
|
|
48
48
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
const { spawnSync } = require('node:child_process');
|
|
5
5
|
const { existsSync, readFileSync, realpathSync } = require('node:fs');
|
|
6
|
-
const { delimiter, join, resolve } = require('node:path');
|
|
6
|
+
const { delimiter, dirname, join, resolve } = require('node:path');
|
|
7
7
|
|
|
8
8
|
const VALID_EVENTS = ['pre-tool', 'post-tool', 'session-start'];
|
|
9
9
|
const SPAWN_TIMEOUT = 10000;
|
|
@@ -17,17 +17,15 @@ const args = rawArgs.filter((arg) => {
|
|
|
17
17
|
const event = args.find((a) => VALID_EVENTS.includes(a)) || 'pre-tool';
|
|
18
18
|
const extra = args.filter((a) => a !== event);
|
|
19
19
|
const isAgy = process.argv.some((a) => a === '--format=agy') || extra.includes('--format=agy');
|
|
20
|
+
const failClosed = process.env.CC_HOOK_FAIL_CLOSED === '1' || extra.includes('--fail-closed');
|
|
21
|
+
const checkOnly = extra.includes('--check');
|
|
22
|
+
const runnerExtra = extra.filter(arg => arg !== '--fail-closed' && arg !== '--check');
|
|
20
23
|
|
|
21
24
|
function findProjectRoot() {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
process.cwd(),
|
|
27
|
-
resolve(__dirname, '..', '..'),
|
|
28
|
-
].filter(Boolean);
|
|
29
|
-
|
|
30
|
-
for (const dir of candidates) {
|
|
25
|
+
const explicit = process.env.PROJECT_ROOT || process.env.CLAUDE_PROJECT_DIR || process.env.WORKSPACE_DIR;
|
|
26
|
+
if (explicit) return resolve(explicit);
|
|
27
|
+
let dir = process.cwd();
|
|
28
|
+
while (true) {
|
|
31
29
|
if (
|
|
32
30
|
existsSync(join(dir, 'package.json')) ||
|
|
33
31
|
existsSync(join(dir, '.git')) ||
|
|
@@ -36,8 +34,11 @@ function findProjectRoot() {
|
|
|
36
34
|
) {
|
|
37
35
|
return dir;
|
|
38
36
|
}
|
|
37
|
+
const parent = dirname(dir);
|
|
38
|
+
if (parent === dir) break;
|
|
39
|
+
dir = parent;
|
|
39
40
|
}
|
|
40
|
-
return
|
|
41
|
+
return process.cwd();
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
const projectRoot = findProjectRoot();
|
|
@@ -55,7 +56,7 @@ const input = process.stdin.isTTY ? '' : readFileSync(0, 'utf8');
|
|
|
55
56
|
*/
|
|
56
57
|
function tryRun(bin, runArgs) {
|
|
57
58
|
try {
|
|
58
|
-
const result = spawnSync(bin, runArgs, {
|
|
59
|
+
const result = spawnSync(bin, checkOnly ? [...runArgs.slice(0, runArgs.indexOf('hook')), '--help'] : runArgs, {
|
|
59
60
|
cwd: projectRoot,
|
|
60
61
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
61
62
|
input,
|
|
@@ -71,27 +72,40 @@ function tryRun(bin, runArgs) {
|
|
|
71
72
|
process.stderr.write(result.stderr);
|
|
72
73
|
}
|
|
73
74
|
if (result.status === 0) {
|
|
75
|
+
if (checkOnly) {
|
|
76
|
+
process.stdout.write(JSON.stringify({ operational: true, failClosed }) + '\n');
|
|
77
|
+
process.exit(0);
|
|
78
|
+
}
|
|
74
79
|
if (result.stdout) process.stdout.write(result.stdout);
|
|
75
80
|
process.exit(0);
|
|
76
81
|
}
|
|
77
|
-
if (!
|
|
78
|
-
process.
|
|
82
|
+
if (!checkOnly && result.status === 2) {
|
|
83
|
+
if (isAgy) process.stdout.write(JSON.stringify({ decision: 'deny', reason: 'CodeConductor runner denied the tool.' }) + '\n');
|
|
84
|
+
process.exit(isAgy ? 0 : 2);
|
|
79
85
|
}
|
|
80
|
-
|
|
86
|
+
fallback();
|
|
81
87
|
} catch {
|
|
82
88
|
return false;
|
|
83
89
|
}
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
function fallback() {
|
|
93
|
+
if (checkOnly) {
|
|
94
|
+
process.stdout.write(JSON.stringify({ operational: false, failClosed }) + '\n');
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
97
|
+
const denied = event === 'pre-tool' && failClosed;
|
|
98
|
+
if (denied || event === 'session-start') {
|
|
99
|
+
process.stderr.write('CodeConductor guard unavailable: install cc-codeconductor locally or enable CC_DEV=1 for trusted development.\n');
|
|
100
|
+
}
|
|
87
101
|
if (isAgy) {
|
|
88
102
|
if (event === 'post-tool' || event === 'session-start') {
|
|
89
103
|
process.stdout.write('{}\n');
|
|
90
104
|
} else {
|
|
91
|
-
process.stdout.write('{
|
|
105
|
+
process.stdout.write(JSON.stringify(denied ? { decision: 'deny', reason: 'CodeConductor guard unavailable' } : { decision: 'allow' }) + '\n');
|
|
92
106
|
}
|
|
93
107
|
}
|
|
94
|
-
process.exit(0);
|
|
108
|
+
process.exit(denied && !isAgy ? 2 : 0);
|
|
95
109
|
}
|
|
96
110
|
|
|
97
111
|
try {
|
|
@@ -101,18 +115,20 @@ try {
|
|
|
101
115
|
// tryRun(), so the pre-check is redundant — dropping it halves the spawn
|
|
102
116
|
// count (and the worst-case latency) for the common case where bun exists.
|
|
103
117
|
const srcMain = join(projectRoot, 'src', 'cli', 'main.ts');
|
|
104
|
-
if (existsSync(srcMain)) {
|
|
105
|
-
|
|
118
|
+
if (process.env.CC_DEV === '1' && existsSync(srcMain)) {
|
|
119
|
+
const metadata = JSON.parse(readFileSync(join(projectRoot, 'package.json'), 'utf8'));
|
|
120
|
+
if (metadata.name === 'cc-codeconductor') tryRun('bun', ['run', srcMain, 'hook', event, ...runnerExtra]);
|
|
106
121
|
}
|
|
107
122
|
|
|
108
123
|
const packaged = join(projectRoot, 'node_modules', 'cc-codeconductor', 'dist', 'index.js');
|
|
109
124
|
if (existsSync(packaged)) {
|
|
110
|
-
tryRun(process.execPath, [packaged, 'hook', event, ...
|
|
125
|
+
tryRun(process.execPath, [packaged, 'hook', event, ...runnerExtra]);
|
|
111
126
|
}
|
|
112
127
|
|
|
113
128
|
const localDist = join(projectRoot, 'dist', 'index.js');
|
|
114
|
-
if (existsSync(localDist)) {
|
|
115
|
-
|
|
129
|
+
if (process.env.CC_DEV === '1' && existsSync(localDist)) {
|
|
130
|
+
const metadata = JSON.parse(readFileSync(join(projectRoot, 'package.json'), 'utf8'));
|
|
131
|
+
if (metadata.name === 'cc-codeconductor') tryRun(process.execPath, [localDist, 'hook', event, ...runnerExtra]);
|
|
116
132
|
}
|
|
117
133
|
|
|
118
134
|
// Locate global npm installs without invoking npx or Windows .cmd shims.
|
|
@@ -122,9 +138,12 @@ try {
|
|
|
122
138
|
join(binDir, '..', 'lib', 'node_modules', 'cc-codeconductor', 'dist', 'index.js'),
|
|
123
139
|
];
|
|
124
140
|
const executable = join(binDir, 'cc-codeconductor');
|
|
125
|
-
if (existsSync(executable))
|
|
141
|
+
if (existsSync(executable)) {
|
|
142
|
+
const resolved = realpathSync(executable);
|
|
143
|
+
if (resolved.endsWith(join('cc-codeconductor', 'dist', 'index.js'))) candidates.push(resolved);
|
|
144
|
+
}
|
|
126
145
|
for (const candidate of candidates) {
|
|
127
|
-
if (existsSync(candidate)) tryRun(process.execPath, [candidate, 'hook', event, ...
|
|
146
|
+
if (existsSync(candidate)) tryRun(process.execPath, [candidate, 'hook', event, ...runnerExtra]);
|
|
128
147
|
}
|
|
129
148
|
}
|
|
130
149
|
} catch {
|
|
@@ -102,3 +102,33 @@ skills:
|
|
|
102
102
|
targets: [claude, codex, cursor, opencode, agy]
|
|
103
103
|
- name: api-versioning
|
|
104
104
|
targets: [claude, codex, cursor, opencode, agy]
|
|
105
|
+
# Stack skills migrated from duplicated preset copies (BC-026). Never list
|
|
106
|
+
# cursor here: its copies keep `paths:` or differ and stay hand-maintained.
|
|
107
|
+
- name: android
|
|
108
|
+
targets: [claude, codex, opencode]
|
|
109
|
+
- name: backlog
|
|
110
|
+
targets: [claude, codex, opencode, agy]
|
|
111
|
+
- name: conductor-setup
|
|
112
|
+
targets: [claude, codex, opencode]
|
|
113
|
+
- name: django-testing
|
|
114
|
+
targets: [claude, codex, opencode]
|
|
115
|
+
- name: find-skills
|
|
116
|
+
targets: [claude, codex, opencode, seo-hotel]
|
|
117
|
+
- name: laravel-specialist
|
|
118
|
+
targets: [claude, codex, opencode]
|
|
119
|
+
- name: pagespeed-insights
|
|
120
|
+
targets: [claude, codex, opencode, seo-hotel]
|
|
121
|
+
- name: pagespeed-perf
|
|
122
|
+
targets: [claude, codex, opencode]
|
|
123
|
+
- name: php-pro
|
|
124
|
+
targets: [claude, codex, opencode]
|
|
125
|
+
- name: python-django-stack
|
|
126
|
+
targets: [claude, codex, opencode]
|
|
127
|
+
- name: python-fastapi-stack
|
|
128
|
+
targets: [claude, codex, opencode]
|
|
129
|
+
- name: spring-boot-kotlin
|
|
130
|
+
targets: [claude, codex, opencode]
|
|
131
|
+
- name: sqlalchemy
|
|
132
|
+
targets: [claude, codex, opencode]
|
|
133
|
+
- name: security
|
|
134
|
+
targets: [claude, opencode]
|
|
@@ -2,7 +2,7 @@ target: pi
|
|
|
2
2
|
invocation: hyphen
|
|
3
3
|
commandFormat: markdown
|
|
4
4
|
contextFile: AGENTS.md
|
|
5
|
-
# ODD is available through `
|
|
5
|
+
# ODD is available through `npx cc-codeconductor odd`; Pi installs no slash-prompt files.
|
|
6
6
|
# No Task tool or subagents (deliberate design choice, per pi's own docs) —
|
|
7
7
|
# same style as opencode and agy, which share the reason.
|
|
8
8
|
subagentInvocationStyle: invoke-with-context
|