@oscaner-skills/cdd-engine 2.0.0 → 3.0.1
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 +2 -2
- package/README.zh-CN.md +2 -2
- package/{src-next/bin.ts → dist/bin.js} +18 -21
- package/dist/contract/declare.js +998 -0
- package/dist/contract/doc.js +565 -0
- package/dist/contract/frontmatter.js +209 -0
- package/dist/contract/home-extractors.js +379 -0
- package/dist/contract/invariants.js +1030 -0
- package/dist/contract/judge.js +109 -0
- package/dist/contract/lint.js +206 -0
- package/dist/contract/project.js +371 -0
- package/dist/contract/skill-anatomy.js +156 -0
- package/dist/contract/translate.js +85 -0
- package/dist/face/artifacts.js +189 -0
- package/dist/face/board-view.js +522 -0
- package/dist/face/capsule.js +141 -0
- package/dist/face/cli.js +891 -0
- package/dist/face/declare.js +241 -0
- package/dist/face/gate.js +158 -0
- package/dist/face/graph-view.js +66 -0
- package/dist/face/host.js +211 -0
- package/dist/face/lifecycle.js +603 -0
- package/dist/face/preview.js +136 -0
- package/dist/face/projection.js +259 -0
- package/dist/face/route-render.js +162 -0
- package/dist/face/termination.js +482 -0
- package/dist/face/words.js +220 -0
- package/{src-next/infra/config.ts → dist/infra/config.js} +19 -24
- package/dist/infra/doc-roots.js +19 -0
- package/dist/infra/git.js +37 -0
- package/dist/infra/process.js +22 -0
- package/dist/infra/root.js +62 -0
- package/dist/infra/runtime.js +85 -0
- package/dist/infra/workspace.js +276 -0
- package/dist/render/brief.js +82 -0
- package/dist/render/issue-body.js +129 -0
- package/dist/render/skeleton.js +434 -0
- package/dist/render/templates.js +520 -0
- package/dist/session/faces.js +38 -0
- package/dist/session/graph.js +309 -0
- package/dist/session/handoff-schema.js +295 -0
- package/dist/session/ledger.js +762 -0
- package/dist/session/next.js +211 -0
- package/dist/session/preflight.js +194 -0
- package/dist/session/round-naming.js +73 -0
- package/dist/session/run.js +441 -0
- package/dist/session/state.js +8 -0
- package/dist/session/wave.js +92 -0
- package/package.json +8 -7
- package/templates/report/issue-body.json +0 -46
- package/src-next/__tests__/bin.test.ts +0 -128
- package/src-next/__tests__/smoke.integration.test.ts +0 -202
- package/src-next/__tests__/zero-dep.test.ts +0 -134
- package/src-next/contract/__tests__/__snapshots__/project.schema.overall-spec.snap +0 -238
- package/src-next/contract/__tests__/__snapshots__/project.schema.phase-spec.snap +0 -153
- package/src-next/contract/__tests__/__snapshots__/project.schema.plan.snap +0 -173
- package/src-next/contract/__tests__/__snapshots__/project.schema.single-spec.snap +0 -89
- package/src-next/contract/__tests__/__snapshots__/project.shape.overall-spec.snap +0 -225
- package/src-next/contract/__tests__/__snapshots__/project.shape.phase-spec.snap +0 -155
- package/src-next/contract/__tests__/__snapshots__/project.shape.plan.snap +0 -175
- package/src-next/contract/__tests__/__snapshots__/project.shape.single-spec.snap +0 -85
- package/src-next/contract/__tests__/declare.test.ts +0 -242
- package/src-next/contract/__tests__/doc.test.ts +0 -358
- package/src-next/contract/__tests__/judge.test.ts +0 -873
- package/src-next/contract/__tests__/lint.test.ts +0 -314
- package/src-next/contract/__tests__/project.test.ts +0 -419
- package/src-next/contract/__tests__/translate.test.ts +0 -96
- package/src-next/contract/declare.ts +0 -983
- package/src-next/contract/doc.ts +0 -753
- package/src-next/contract/invariants.ts +0 -1268
- package/src-next/contract/judge.ts +0 -142
- package/src-next/contract/lint.ts +0 -275
- package/src-next/contract/project.ts +0 -596
- package/src-next/contract/skill-anatomy.ts +0 -273
- package/src-next/contract/translate.ts +0 -113
- package/src-next/face/__tests__/board-view.test.ts +0 -948
- package/src-next/face/__tests__/capsule.test.ts +0 -276
- package/src-next/face/__tests__/channel-closure.guard.test.ts +0 -102
- package/src-next/face/__tests__/cli.test.ts +0 -4643
- package/src-next/face/__tests__/face.test.ts +0 -289
- package/src-next/face/__tests__/graph-view.test.ts +0 -61
- package/src-next/face/__tests__/host.test.ts +0 -24
- package/src-next/face/__tests__/negation.ts +0 -6
- package/src-next/face/__tests__/projection.test.ts +0 -301
- package/src-next/face/__tests__/sync-runner.test.ts +0 -70
- package/src-next/face/__tests__/words.guard.test.ts +0 -93
- package/src-next/face/artifacts.ts +0 -195
- package/src-next/face/board-view.ts +0 -662
- package/src-next/face/capsule.ts +0 -149
- package/src-next/face/cli.ts +0 -819
- package/src-next/face/declare.ts +0 -326
- package/src-next/face/gate.ts +0 -170
- package/src-next/face/graph-view.ts +0 -74
- package/src-next/face/host.ts +0 -326
- package/src-next/face/lifecycle.ts +0 -700
- package/src-next/face/projection.ts +0 -282
- package/src-next/face/route-render.ts +0 -160
- package/src-next/face/words.ts +0 -296
- package/src-next/infra/__tests__/infra.test.ts +0 -287
- package/src-next/infra/git.ts +0 -39
- package/src-next/infra/process.ts +0 -34
- package/src-next/infra/runtime.ts +0 -185
- package/src-next/infra/workspace.ts +0 -232
- package/src-next/render/__tests__/render.test.ts +0 -499
- package/src-next/render/__tests__/skeleton.test.ts +0 -466
- package/src-next/render/brief.ts +0 -121
- package/src-next/render/issue-body.ts +0 -159
- package/src-next/render/skeleton.ts +0 -437
- package/src-next/render/templates.ts +0 -650
- package/src-next/session/__tests__/graph.test.ts +0 -270
- package/src-next/session/__tests__/handoff-plane.guard.test.ts +0 -48
- package/src-next/session/__tests__/handoff-schema.test.ts +0 -310
- package/src-next/session/__tests__/ledger.test.ts +0 -744
- package/src-next/session/__tests__/next.test.ts +0 -368
- package/src-next/session/__tests__/preflight.test.ts +0 -491
- package/src-next/session/__tests__/run.test.ts +0 -1014
- package/src-next/session/__tests__/wave-line-phase.guard.test.ts +0 -49
- package/src-next/session/__tests__/wave.test.ts +0 -469
- package/src-next/session/faces.ts +0 -110
- package/src-next/session/graph.ts +0 -411
- package/src-next/session/handoff-schema.ts +0 -373
- package/src-next/session/ledger.ts +0 -1004
- package/src-next/session/next.ts +0 -192
- package/src-next/session/preflight.ts +0 -240
- package/src-next/session/run.ts +0 -606
- package/src-next/session/state.ts +0 -30
- package/src-next/session/wave.ts +0 -139
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ The engine runs the implement / review / fix phases of the CDD workflow against
|
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
|
-
Requires Node.js `>=
|
|
13
|
+
Requires Node.js `>= 24`.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
# global CLI (provides the `cdd` binary)
|
|
@@ -22,7 +22,7 @@ npm install @oscaner-skills/cdd-engine
|
|
|
22
22
|
|
|
23
23
|
## CLI
|
|
24
24
|
|
|
25
|
-
Global option: `--dry-run` —
|
|
25
|
+
Global option: `--dry-run` — preview the next dispatch step and its expected artifacts — zero repo writes, no round consumed (implement/review/fix only).
|
|
26
26
|
|
|
27
27
|
| Subcommand | Usage | Purpose |
|
|
28
28
|
|------------|-------|---------|
|
package/README.zh-CN.md
CHANGED
|
@@ -12,7 +12,7 @@ CDD 引擎 CLI——kairos `cdd-dev` 技能背后的任务运行器、文档/分
|
|
|
12
12
|
|
|
13
13
|
## 安装
|
|
14
14
|
|
|
15
|
-
需要 Node.js `>=
|
|
15
|
+
需要 Node.js `>= 24`。
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
# 全局 CLI(提供 `cdd` 二进制)
|
|
@@ -24,7 +24,7 @@ npm install @oscaner-skills/cdd-engine
|
|
|
24
24
|
|
|
25
25
|
## CLI
|
|
26
26
|
|
|
27
|
-
全局选项:`--dry-run
|
|
27
|
+
全局选项:`--dry-run`——预览下一步派发及其预期产物 — 对 repo 零写入、不占轮次(仅限 implement/review/fix)。
|
|
28
28
|
|
|
29
29
|
| 子命令 | 用法 | 用途 |
|
|
30
30
|
|--------|------|------|
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
// stripping); the published artifact runs the tsc-emitted dist/bin.js. Unconditional
|
|
8
8
|
// boot — this artifact is only ever executed as the CLI entry, never imported.
|
|
9
9
|
import process from "node:process";
|
|
10
|
-
|
|
11
10
|
// The environment pre-flight — the engine's `engines` floor (package.json#engines
|
|
12
11
|
// ">=22.18.0"). It is the first thing this module body runs and covers every
|
|
13
12
|
// configuration where the entry's JS actually loads — the published artifact (the
|
|
@@ -20,8 +19,7 @@ import process from "node:process";
|
|
|
20
19
|
// (native type stripping), so no engine JS — including this guard — ever runs; that
|
|
21
20
|
// crash is inherent to a `.ts` entry on old Node. On the published artifact the
|
|
22
21
|
// guard is a no-op — floor-consistent, never over-strict.
|
|
23
|
-
const NODE_FLOOR = { major: 22, minor: 18 }
|
|
24
|
-
|
|
22
|
+
const NODE_FLOOR = { major: 22, minor: 18 };
|
|
25
23
|
/**
|
|
26
24
|
* NodeEnvGuard — the entry's environment pre-flight, a static-judgement class (the
|
|
27
25
|
* module carries zero bare functions). problem() returns the below-floor message or
|
|
@@ -30,32 +28,31 @@ const NODE_FLOOR = { major: 22, minor: 18 } as const;
|
|
|
30
28
|
*/
|
|
31
29
|
// biome-ignore lint/complexity/noStaticOnlyClass: the plan-mandated static guard surface — the zero-bare-function discipline admits no standalone predicate functions.
|
|
32
30
|
class NodeEnvGuard {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
static problem() {
|
|
32
|
+
const [major, minor] = process.versions.node
|
|
33
|
+
.split(".")
|
|
34
|
+
.map((part) => Number.parseInt(part, 10));
|
|
35
|
+
if (major < NODE_FLOOR.major || (major === NODE_FLOOR.major && minor < NODE_FLOOR.minor)) {
|
|
36
|
+
return `cdd requires Node >= ${NODE_FLOOR.major}.${NODE_FLOOR.minor} (native type stripping) — installed: ${process.versions.node}`;
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
39
|
}
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
40
|
}
|
|
43
|
-
|
|
44
41
|
const environmentProblem = NodeEnvGuard.problem();
|
|
45
42
|
if (environmentProblem !== null) {
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
process.stderr.write(`${environmentProblem}\n`);
|
|
44
|
+
process.exit(1);
|
|
48
45
|
}
|
|
49
|
-
|
|
50
46
|
// The CLI face — runArgv owns the usage-error normalization (exit code 0 / 1 / 2,
|
|
51
47
|
// the steady exit-code table); the boot wrapper only maps an unexpected
|
|
52
48
|
// composition-root load/crash to the message + exit 1, never an unhandled
|
|
53
49
|
// rejection. `await import` keeps the environment pre-flight ahead of the load.
|
|
54
50
|
try {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
const { Cli } = await import("./face/cli.js");
|
|
52
|
+
const exitCode = await Cli.create().runArgv(process.argv.slice(2));
|
|
53
|
+
process.exit(exitCode);
|
|
54
|
+
}
|
|
55
|
+
catch (raw) {
|
|
56
|
+
process.stderr.write(`cdd: ${raw instanceof Error ? raw.message : String(raw)}\n`);
|
|
57
|
+
process.exit(1);
|
|
61
58
|
}
|