cc-codeconductor 1.4.1 → 1.4.2
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 +24 -1
- package/dist/core/verification/rdd-receipt.d.ts +39 -0
- package/dist/core/verification/verification-runner.d.ts +8 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +996 -251
- package/dist/library.js +267 -26
- package/dist/validation/schemas.d.ts +521 -26
- package/docs/generated/cli.md +12 -0
- package/package.json +1 -1
- package/presets/agy/AGENTS.md +6 -0
- package/presets/agy/workflows/cc-handoff.md +2 -1
- package/presets/agy/workflows/cc-odd.md +15 -0
- package/presets/claude/CLAUDE.md +6 -0
- package/presets/claude/commands/cc/handoff.md +2 -1
- package/presets/claude/commands/cc/odd.md +15 -0
- package/presets/codex/AGENTS.md +6 -0
- package/presets/codex/skills/cc-handoff/SKILL.md +3 -1
- package/presets/codex/skills/cc-odd/SKILL.md +25 -0
- package/presets/codex/skills/cc-openspec/SKILL.md +4 -0
- package/presets/codex/skills/cc-spec-mutation/SKILL.md +5 -0
- package/presets/codex/skills/cc-tdd-cycle/SKILL.md +8 -0
- package/presets/cursor/AGENTS.md +6 -0
- package/presets/cursor/commands/cc/handoff.md +3 -1
- package/presets/cursor/commands/cc/odd.md +20 -0
- package/presets/cursor/commands/cc/openspec.md +4 -0
- package/presets/cursor/commands/cc/spec-mutation.md +5 -0
- package/presets/cursor/commands/cc/tdd-cycle.md +8 -0
- package/presets/gemini/GEMINI.md +6 -0
- package/presets/gemini/commands/cc/handoff.toml +3 -1
- package/presets/gemini/commands/cc/odd.toml +20 -0
- package/presets/gemini/commands/cc/openspec.toml +4 -0
- package/presets/gemini/commands/cc/spec-mutation.toml +5 -0
- package/presets/gemini/commands/cc/tdd-cycle.toml +8 -0
- package/presets/opencode/agents/implementer.md +2 -0
- package/presets/opencode/agents/reviewer.md +2 -0
- package/presets/opencode/agents/tester.md +2 -0
- package/presets/opencode/commands/cc-handoff.md +2 -1
- package/presets/opencode/commands/cc-odd.md +15 -0
- package/presets/pi/AGENTS.md +6 -0
- package/src/presets/targets/pi.yml +1 -0
package/README.md
CHANGED
|
@@ -134,12 +134,21 @@ what they do rather than which subsystem they touch:
|
|
|
134
134
|
| Entry | `/cc-ask`, `/cc-triage`, `/cc-explore` | Recommend a next command and stop — no writes. |
|
|
135
135
|
| Delivery | `/cc-feature`, `/cc-fix`, `/cc-refactor`, `/cc-tdd-cycle`, `/cc-api-contract`, `/cc-db-migration`, `/cc-spec-mutation` | Implement, test-before-implement where both apply. |
|
|
136
136
|
| Verification | `/cc-review`, `/cc-council`, `/cc-scorecard`, `/cc-test-plan`, `/cc-security` | Gate a diff or a decision before merge. |
|
|
137
|
-
| Management | `/cc-backlog`, `/cc-openspec`, `/cc-handoff`, `/cc-clarify`, `/cc-prototype`, `/cc-pagespeed`, `/cc-iterative` | Author BACKLOG.md, deliver it, or one-off ops. |
|
|
137
|
+
| Management | `/cc-backlog`, `/cc-openspec`, `/cc-handoff`, `/cc-clarify`, `/cc-prototype`, `/cc-pagespeed`, `/cc-iterative`, `/cc-odd` | Author BACKLOG.md, deliver it, or one-off ops. |
|
|
138
138
|
|
|
139
139
|
Prefer `/cc-iterative`, `/cc-triage`, and `/cc-handoff` for wayfinding.
|
|
140
140
|
`/cc-ask` recommends a command from a natural-language problem; it does not
|
|
141
141
|
start the workflow.
|
|
142
142
|
|
|
143
|
+
### ODD adoption and escalation
|
|
144
|
+
|
|
145
|
+
ODD is opt-in until paired delivery evidence shows non-inferior acceptance,
|
|
146
|
+
tests, and findings with lower context than OpenSpec. Run
|
|
147
|
+
`bun run dev scorecard suite-run --suite odd-adoption` to keep that decision
|
|
148
|
+
reproducible. The [ODD adoption guide](docs/odd-adoption.md) explains route
|
|
149
|
+
selection, ledger-based resumption, and when to return to OpenSpec, TDD, or
|
|
150
|
+
Council.
|
|
151
|
+
|
|
143
152
|
### OpenSpec and TDD
|
|
144
153
|
|
|
145
154
|
OpenSpec is the delivery loop for `BACKLOG.md`:
|
|
@@ -152,6 +161,18 @@ Agent phases: validate-backlog → discover → design → **test** → implemen
|
|
|
152
161
|
review. Test-before-implement is required whenever both phases apply.
|
|
153
162
|
`/cc-tdd-cycle` enforces Red → Green → Refactor (`tester` then `implementer`).
|
|
154
163
|
|
|
164
|
+
### Receipt-Driven Development
|
|
165
|
+
|
|
166
|
+
RDD binds local verification evidence to the exact code, tests, contracts,
|
|
167
|
+
lockfiles, and configuration it observed. Use `bun run dev rdd capture --task
|
|
168
|
+
<id>`, `bun run dev rdd verify --receipt <id>`, and `bun run dev rdd status` to
|
|
169
|
+
inspect that evidence. A changed candidate invalidates its receipt and requires
|
|
170
|
+
the affected verification to run again. RDD complements TDD and Mutation
|
|
171
|
+
Testing: it checks evidence freshness rather than behavioral coverage.
|
|
172
|
+
Run `bun run dev rdd install-hooks` in a Git repository to install preserving
|
|
173
|
+
pre-commit and pre-push checks; the hook runs `rdd git-check` against the latest
|
|
174
|
+
receipt.
|
|
175
|
+
|
|
155
176
|
### Review agents
|
|
156
177
|
|
|
157
178
|
15 Conductor Agents ship in `presets/<target>/agents/`. Review path:
|
|
@@ -630,7 +651,9 @@ npx cc-codeconductor openspec next
|
|
|
630
651
|
npx cc-codeconductor openspec start BC-001-discover
|
|
631
652
|
npx cc-codeconductor openspec done BC-001-discover
|
|
632
653
|
npx cc-codeconductor openspec block BC-001-implement --reason "waiting on design"
|
|
654
|
+
npx cc-codeconductor openspec unblock BC-001-implement
|
|
633
655
|
npx cc-codeconductor openspec archive BC-001
|
|
656
|
+
npx cc-codeconductor odd read delivery-001
|
|
634
657
|
```
|
|
635
658
|
|
|
636
659
|
Subcommands: `validate` / `scan` / `plan` / `analyze` / `status` / `next` /
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type RddPhase = 'red' | 'green' | 'refactor' | 'verification' | 'mutation' | 'review';
|
|
2
|
+
export interface RddReceiptPath {
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly hash: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RddReceipt {
|
|
7
|
+
readonly version: 1;
|
|
8
|
+
readonly taskId: string;
|
|
9
|
+
readonly phase: RddPhase;
|
|
10
|
+
readonly paths: readonly RddReceiptPath[];
|
|
11
|
+
readonly coverage: 'paths' | 'project';
|
|
12
|
+
readonly manifestHash: string;
|
|
13
|
+
readonly command?: string;
|
|
14
|
+
readonly outcome: 'passed' | 'failed';
|
|
15
|
+
readonly capturedAt: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ReceiptVerification {
|
|
18
|
+
readonly valid: boolean;
|
|
19
|
+
readonly expectedHash: string;
|
|
20
|
+
readonly actualHash: string;
|
|
21
|
+
readonly changedPaths: readonly string[];
|
|
22
|
+
}
|
|
23
|
+
export declare function isRddReceipt(value: unknown): value is RddReceipt;
|
|
24
|
+
export declare function captureReceipt(projectRoot: string, input: {
|
|
25
|
+
readonly taskId: string;
|
|
26
|
+
readonly phase: RddPhase;
|
|
27
|
+
readonly paths: readonly string[];
|
|
28
|
+
readonly command?: string;
|
|
29
|
+
readonly outcome: 'passed' | 'failed';
|
|
30
|
+
/** Include additions and deletions across the complete project candidate. */
|
|
31
|
+
readonly coverage?: 'paths' | 'project';
|
|
32
|
+
}): Promise<RddReceipt>;
|
|
33
|
+
/**
|
|
34
|
+
* Collect the versioned-input candidate for a local verification run. Runtime
|
|
35
|
+
* state and generated output are deliberately excluded because recording a
|
|
36
|
+
* receipt itself must not invalidate the candidate it describes.
|
|
37
|
+
*/
|
|
38
|
+
export declare function collectReceiptPaths(projectRoot: string): Promise<string[]>;
|
|
39
|
+
export declare function verifyReceipt(projectRoot: string, receipt: RddReceipt): Promise<ReceiptVerification>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { GoalGraphInput } from '../../validation/schemas';
|
|
2
2
|
import type { TddSuiteEvidence } from '../../domain/loop/loop-state';
|
|
3
3
|
import { type Result } from '../../utils/result';
|
|
4
|
+
import { type RddReceipt } from './rdd-receipt';
|
|
4
5
|
export interface VerificationCheck {
|
|
5
6
|
name: string;
|
|
6
7
|
passed: boolean;
|
|
@@ -42,6 +43,8 @@ export declare const TDD_CAPTURED_BY = "verification-runner";
|
|
|
42
43
|
export interface CaptureTddSuiteOptions extends RunVerificationOptions {
|
|
43
44
|
/** Allowlisted test command (`bun test`, `npm test`, …). */
|
|
44
45
|
readonly command: string;
|
|
46
|
+
/** The TDD transition this runner invocation is expected to prove. */
|
|
47
|
+
readonly phase?: 'red' | 'green' | 'refactor';
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
47
50
|
* Run a test suite and store TDD evidence. Only this function writes records
|
|
@@ -51,14 +54,17 @@ export declare function captureTddSuiteEvidence(projectRoot: string, taskId: str
|
|
|
51
54
|
evidenceId: string;
|
|
52
55
|
suiteFailed: boolean;
|
|
53
56
|
suitePassed: boolean;
|
|
57
|
+
receipt: RddReceipt;
|
|
54
58
|
}, Error>>;
|
|
55
59
|
/**
|
|
56
60
|
* Load TDD suite evidence written by `captureTddSuiteEvidence`. Hand-edited
|
|
57
61
|
* files (wrong source/type/`capturedBy`) are rejected.
|
|
58
62
|
*/
|
|
59
|
-
export declare function loadTddSuiteEvidence(projectRoot: string, taskId: string, evidenceId: string): Promise<Result<TddSuiteEvidence
|
|
63
|
+
export declare function loadTddSuiteEvidence(projectRoot: string, taskId: string, evidenceId: string): Promise<Result<TddSuiteEvidence & {
|
|
64
|
+
receipt: RddReceipt;
|
|
65
|
+
}, Error>>;
|
|
60
66
|
/**
|
|
61
67
|
* True when the verification runner stored TDD evidence for this task.
|
|
62
68
|
* Handmade JSON (wrong source/type/capturedBy) does not count.
|
|
63
69
|
*/
|
|
64
|
-
export declare function hasTddRunnerEvidence(projectRoot: string, taskId: string): Promise<boolean>;
|
|
70
|
+
export declare function hasTddRunnerEvidence(projectRoot: string, taskId: string, expectedPhase?: 'red' | 'green'): Promise<boolean>;
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export type { OrchestratorNextResult } from './core/orchestrator/runtime-orchest
|
|
|
9
9
|
export { LoopEngine, runLoop, runLoopForProject, shouldRunAgentLoop, formatFeedback, advanceTddPhase, } from './core/loop/loop-engine';
|
|
10
10
|
export type { LoopConfig, LoopResult, EscalationReport, GuardrailHit, GenerateFn, CompileCheckFn, } from './core/loop/loop-engine';
|
|
11
11
|
export { runVerification, gateTaskCompletion, validateEvidenceIds, captureTddSuiteEvidence, loadTddSuiteEvidence, hasTddRunnerEvidence, } from './core/verification/verification-runner';
|
|
12
|
+
export { captureReceipt, collectReceiptPaths, isRddReceipt, verifyReceipt, } from './core/verification/rdd-receipt';
|
|
13
|
+
export type { RddPhase, RddReceipt, RddReceiptPath, ReceiptVerification } from './core/verification/rdd-receipt';
|
|
12
14
|
export type { RunVerificationOptions, VerificationCheck, CaptureTddSuiteOptions, } from './core/verification/verification-runner';
|
|
13
15
|
export * from './validation/schemas';
|
|
14
16
|
export { createInitialState, loopStateMachine, createInitialTddState, tddCycleStateMachine, } from './domain/loop/loop-state';
|