create-agdf 0.4.7 → 0.4.8

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.
@@ -9,6 +9,7 @@ import process from "node:process";
9
9
  import { searchInputFromControl } from "../lib/delivery-path-search/state-adapter.js";
10
10
  import { runDeliveryPathSearch } from "../lib/delivery-path-search/search-engine.js";
11
11
  import { codexEvaluator } from "../lib/delivery-path-search/evaluators/codex.js";
12
+ import { claudeEvaluator } from "../lib/delivery-path-search/evaluators/claude.js";
12
13
  import { fixtureEvaluator } from "../lib/delivery-path-search/evaluators/protocol.js";
13
14
  import { enforcementForSurface } from "../lib/delivery-path-search/surfaces/capabilities.js";
14
15
  import { persistSearchResult } from "../lib/delivery-path-search/persistence.js";
@@ -175,6 +176,7 @@ Preferred AGDF CLI:
175
176
  npx --yes @agdf/cli@latest doctor
176
177
  npx --yes @agdf/cli@latest gate-check --json
177
178
  npx --yes @agdf/cli@latest delivery-path-search --surface codex --json
179
+ npx --yes @agdf/cli@latest delivery-path-search --surface claude --json
178
180
 
179
181
  Scaffold-compatible npm create usage:
180
182
  npm create agdf@latest -- codex
@@ -191,6 +193,7 @@ Scaffold-compatible npm create usage:
191
193
  npm create agdf@latest -- gate-check
192
194
  npm create agdf@latest -- delivery-map
193
195
  npm create agdf@latest -- delivery-path-search --surface codex
196
+ npm create agdf@latest -- delivery-path-search --surface claude
194
197
 
195
198
  Backward-compatible create-agdf usage:
196
199
  npx --yes create-agdf@latest doctor --json
@@ -2200,9 +2203,11 @@ async function executeDeliveryPathSearch(options) {
2200
2203
  ? fixtureEvaluator(fixture.evaluations ?? {})
2201
2204
  : options.surface === "codex"
2202
2205
  ? codexEvaluator({ cwd: options.dir, model: options.model })
2203
- : null;
2206
+ : options.surface === "claude"
2207
+ ? claudeEvaluator({ cwd: options.dir, model: options.model })
2208
+ : null;
2204
2209
  if (!evaluator) {
2205
- throw new Error(`${options.surface} has no executable evaluator in this release. Codex is the reference adapter; --fixture is available for deterministic contract testing.`);
2210
+ throw new Error(`${options.surface} has no executable evaluator in this release. Codex and Claude are the reference adapters; --fixture is available for deterministic contract testing.`);
2206
2211
  }
2207
2212
  const result = await runDeliveryPathSearch(input, evaluator, { candidates: fixture?.candidates });
2208
2213
  if (options.persist) result.persistence = persistSearchResult(options.dir, result);
@@ -15,6 +15,9 @@ This file is the living control pointer for active AGDF delivery work. Detailed
15
15
  9. Historical artefacts remain linkable but do not override the current pointer.
16
16
  10. If an item is superseded, mark the replacement.
17
17
  11. If active work grows beyond roughly ten items, triage the backlog.
18
+ 12. `Status` must be one of the human-readable labels `create-agdf/bin/create-agdf.js`'s `backlogStatusLabels` normalizes: Needs UR, Awaiting Brownfield Review, Awaiting PRD, Awaiting PRD Approval, Awaiting SD, Awaiting SD Approval, Awaiting TP, Awaiting TP Approval, In Progress, Blocked, Awaiting QA, Awaiting UAT, Completed, Superseded, Abandoned. That map is authoritative; this list only mirrors it for readability.
19
+ 13. `Artefacts` link labels must be one of `backlogArtefactLabels`: `ur`, `brownfield`, `prd`, `sd`, `tp`, `qa`, `or` (case-insensitive). Do not invent other labels such as a raw artefact filename.
20
+ 14. After writing or updating this file, run `doctor --json` (or the locally available equivalent) and resolve any `AGDF_BACKLOG_STATUS_UNKNOWN` or `AGDF_BACKLOG_ARTEFACT_LABEL_UNKNOWN` finding before treating the edit as done.
18
21
 
19
22
  ## Active Backlog
20
23
 
@@ -70,7 +70,7 @@ The CLI reports are validators and JSON evidence, not the primary user experienc
70
70
  15. Missing or incomplete control state must not push setup work back to the user. For a fresh request, draft the current minimal artefact in the response and request the exact approval. Initialize or write `.agdf/control/` only when durable control state is explicitly requested, already live for the repository, or required for a deterministic CLI/CI setup path. Implementation remains forbidden.
71
71
  16. Branch names, uncommitted diffs, generated summaries and chat history are not sufficient scope proof when durable artefacts or approvals are missing or conflicting.
72
72
  17. If multiple active scopes are plausible, list the evidenced competing lines and keep the current step at scope clarification or the earliest common safe gate.
73
- 18. When maintaining `MASTER_BACKLOG.md`, use its canonical compact columns, readable status labels and document-relative Markdown links. Do not expose raw long paths or internal snake_case statuses in the human-facing table.
73
+ 18. When maintaining `MASTER_BACKLOG.md`, use its canonical compact columns, readable status labels and document-relative Markdown links. Do not expose raw long paths or internal snake_case statuses in the human-facing table. The canonical status/artefact label vocabulary is defined in the AGDF control scaffold's `MASTER_BACKLOG.md` template Rules section; do not invent other labels.
74
74
  19. Preserve legacy backlog compatibility through the CLI parser; do not create a second surface-specific backlog format.
75
75
 
76
76
  ## Gate Evaluation
@@ -46,6 +46,7 @@ Use the Runtime Contract definition of `Relevant Run` to decide whether OR is ma
46
46
  12. Keep machine status normalization in the CLI; do not write internal snake_case status values into the human-facing backlog.
47
47
  13. Reconcile Context Graph impact before clean closeout: report `context_graph_reconciliation: resolved | not_applicable | open_gap`.
48
48
  14. If Context Graph work remains unresolved, report it as an explicit open gap and do not describe the run as cleanly handoff-ready.
49
+ 15. After writing or updating `MASTER_BACKLOG.md`, run `doctor --json` (or the locally available equivalent) and resolve any `AGDF_BACKLOG_STATUS_UNKNOWN` or `AGDF_BACKLOG_ARTEFACT_LABEL_UNKNOWN` finding before closeout. See the AGDF control scaffold's `MASTER_BACKLOG.md` template Rules section for the canonical status/artefact label vocabulary.
49
50
 
50
51
  ## When To Use
51
52
  - at the end of every relevant run
@@ -70,7 +70,7 @@ The CLI reports are validators and JSON evidence, not the primary user experienc
70
70
  15. Missing or incomplete control state must not push setup work back to the user. For a fresh request, draft the current minimal artefact in the response and request the exact approval. Initialize or write `.agdf/control/` only when durable control state is explicitly requested, already live for the repository, or required for a deterministic CLI/CI setup path. Implementation remains forbidden.
71
71
  16. Branch names, uncommitted diffs, generated summaries and chat history are not sufficient scope proof when durable artefacts or approvals are missing or conflicting.
72
72
  17. If multiple active scopes are plausible, list the evidenced competing lines and keep the current step at scope clarification or the earliest common safe gate.
73
- 18. When maintaining `MASTER_BACKLOG.md`, use its canonical compact columns, readable status labels and document-relative Markdown links. Do not expose raw long paths or internal snake_case statuses in the human-facing table.
73
+ 18. When maintaining `MASTER_BACKLOG.md`, use its canonical compact columns, readable status labels and document-relative Markdown links. Do not expose raw long paths or internal snake_case statuses in the human-facing table. The canonical status/artefact label vocabulary is defined in the AGDF control scaffold's `MASTER_BACKLOG.md` template Rules section; do not invent other labels.
74
74
  19. Preserve legacy backlog compatibility through the CLI parser; do not create a second surface-specific backlog format.
75
75
 
76
76
  ## Gate Evaluation
@@ -46,6 +46,7 @@ Use the Runtime Contract definition of `Relevant Run` to decide whether OR is ma
46
46
  12. Keep machine status normalization in the CLI; do not write internal snake_case status values into the human-facing backlog.
47
47
  13. Reconcile Context Graph impact before clean closeout: report `context_graph_reconciliation: resolved | not_applicable | open_gap`.
48
48
  14. If Context Graph work remains unresolved, report it as an explicit open gap and do not describe the run as cleanly handoff-ready.
49
+ 15. After writing or updating `MASTER_BACKLOG.md`, run `doctor --json` (or the locally available equivalent) and resolve any `AGDF_BACKLOG_STATUS_UNKNOWN` or `AGDF_BACKLOG_ARTEFACT_LABEL_UNKNOWN` finding before closeout. See the AGDF control scaffold's `MASTER_BACKLOG.md` template Rules section for the canonical status/artefact label vocabulary.
49
50
 
50
51
  ## When To Use
51
52
  - at the end of every relevant run
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Codex-first workflow skills for gated, auditable AI-assisted software delivery.",
5
5
  "author": {
6
- "name": "AI-native Governance & Delivery Framework",
6
+ "name": "Arndt Gold",
7
7
  "url": "https://agdf.iself.eu"
8
8
  },
9
9
  "homepage": "https://agdf.iself.eu",
@@ -15,6 +15,9 @@ This file is the living control pointer for active AGDF delivery work. Detailed
15
15
  9. Historical artefacts remain linkable but do not override the current pointer.
16
16
  10. If an item is superseded, mark the replacement.
17
17
  11. If active work grows beyond roughly ten items, triage the backlog.
18
+ 12. `Status` must be one of the human-readable labels `create-agdf/bin/create-agdf.js`'s `backlogStatusLabels` normalizes: Needs UR, Awaiting Brownfield Review, Awaiting PRD, Awaiting PRD Approval, Awaiting SD, Awaiting SD Approval, Awaiting TP, Awaiting TP Approval, In Progress, Blocked, Awaiting QA, Awaiting UAT, Completed, Superseded, Abandoned. That map is authoritative; this list only mirrors it for readability.
19
+ 13. `Artefacts` link labels must be one of `backlogArtefactLabels`: `ur`, `brownfield`, `prd`, `sd`, `tp`, `qa`, `or` (case-insensitive). Do not invent other labels such as a raw artefact filename.
20
+ 14. After writing or updating this file, run `doctor --json` (or the locally available equivalent) and resolve any `AGDF_BACKLOG_STATUS_UNKNOWN` or `AGDF_BACKLOG_ARTEFACT_LABEL_UNKNOWN` finding before treating the edit as done.
18
21
 
19
22
  ## Active Backlog
20
23
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.4.7",
4
+ "version": "0.4.8",
5
5
  "displayName": "AI Governance & Delivery Framework",
6
6
  "developerName": "AI-native Governance & Delivery Framework",
7
7
  "description": "Codex-first workflow skills for gated, auditable AI-assisted software delivery.",
@@ -21,7 +21,7 @@
21
21
  "category": "Productivity",
22
22
  "brandColor": "#14B8A6",
23
23
  "author": {
24
- "name": "AI-native Governance & Delivery Framework",
24
+ "name": "Arndt Gold",
25
25
  "url": "https://agdf.iself.eu"
26
26
  },
27
27
  "codex": {
@@ -70,7 +70,7 @@ The CLI reports are validators and JSON evidence, not the primary user experienc
70
70
  15. Missing or incomplete control state must not push setup work back to the user. For a fresh request, draft the current minimal artefact in the response and request the exact approval. Initialize or write `.agdf/control/` only when durable control state is explicitly requested, already live for the repository, or required for a deterministic CLI/CI setup path. Implementation remains forbidden.
71
71
  16. Branch names, uncommitted diffs, generated summaries and chat history are not sufficient scope proof when durable artefacts or approvals are missing or conflicting.
72
72
  17. If multiple active scopes are plausible, list the evidenced competing lines and keep the current step at scope clarification or the earliest common safe gate.
73
- 18. When maintaining `MASTER_BACKLOG.md`, use its canonical compact columns, readable status labels and document-relative Markdown links. Do not expose raw long paths or internal snake_case statuses in the human-facing table.
73
+ 18. When maintaining `MASTER_BACKLOG.md`, use its canonical compact columns, readable status labels and document-relative Markdown links. Do not expose raw long paths or internal snake_case statuses in the human-facing table. The canonical status/artefact label vocabulary is defined in the AGDF control scaffold's `MASTER_BACKLOG.md` template Rules section; do not invent other labels.
74
74
  19. Preserve legacy backlog compatibility through the CLI parser; do not create a second surface-specific backlog format.
75
75
 
76
76
  ## Gate Evaluation
@@ -46,6 +46,7 @@ Use the Runtime Contract definition of `Relevant Run` to decide whether OR is ma
46
46
  12. Keep machine status normalization in the CLI; do not write internal snake_case status values into the human-facing backlog.
47
47
  13. Reconcile Context Graph impact before clean closeout: report `context_graph_reconciliation: resolved | not_applicable | open_gap`.
48
48
  14. If Context Graph work remains unresolved, report it as an explicit open gap and do not describe the run as cleanly handoff-ready.
49
+ 15. After writing or updating `MASTER_BACKLOG.md`, run `doctor --json` (or the locally available equivalent) and resolve any `AGDF_BACKLOG_STATUS_UNKNOWN` or `AGDF_BACKLOG_ARTEFACT_LABEL_UNKNOWN` finding before closeout. See the AGDF control scaffold's `MASTER_BACKLOG.md` template Rules section for the canonical status/artefact label vocabulary.
49
50
 
50
51
  ## When To Use
51
52
  - at the end of every relevant run
@@ -0,0 +1,58 @@
1
+ import { execFileSync } from "node:child_process";
2
+ import { evaluatorOutputSchema, validateEvaluation } from "../contracts.js";
3
+
4
+ export function claudeEvaluator(options = {}) {
5
+ const claudeBin = options.claudeBin ?? "claude";
6
+ let runtime = "claude version unavailable";
7
+ try {
8
+ runtime = execFileSync(claudeBin, ["--version"], { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
9
+ } catch {}
10
+
11
+ function gitState() {
12
+ try {
13
+ return execFileSync("git", ["status", "--porcelain=v1", "-z"], {
14
+ cwd: options.cwd,
15
+ encoding: "utf8",
16
+ stdio: ["ignore", "pipe", "ignore"],
17
+ });
18
+ } catch {
19
+ return null;
20
+ }
21
+ }
22
+
23
+ return {
24
+ name: "claude",
25
+ metadata: { name: "claude", runtime, model: options.model ?? "configured-default" },
26
+ async evaluate(input, candidate) {
27
+ const prompt = [
28
+ "You are an evaluation-only component. Do not use tools, execute commands, or modify files.",
29
+ `Return JSON matching contract version ${input.contract_version}.`,
30
+ `Objective: ${input.objective}`,
31
+ `Current gate: ${input.current_gate}`,
32
+ `Candidate id: ${candidate.id}`,
33
+ `Candidate action: ${candidate.action}`,
34
+ "Score scope_fit, gate_readiness, risk_reduction, evidence_gain, testability, reversibility and cost from 0 to 5.",
35
+ "Cost 0 is low and 5 is high. uncertainty is 0 low to 5 high.",
36
+ "Keep rationale concise. child_actions must only contain actions permitted by the current gate.",
37
+ ].join("\n");
38
+ const args = [
39
+ "-p", "--disallowedTools", "Edit,Write,Bash",
40
+ "--output-format", "json", "--json-schema", JSON.stringify(evaluatorOutputSchema()),
41
+ ];
42
+ if (options.model) args.push("--model", options.model);
43
+ args.push(prompt);
44
+ const before = gitState();
45
+ const raw = execFileSync(claudeBin, args, {
46
+ cwd: options.cwd,
47
+ encoding: "utf8",
48
+ stdio: ["ignore", "pipe", "pipe"],
49
+ timeout: options.timeoutMs ?? 120000,
50
+ });
51
+ const after = gitState();
52
+ if (before !== null && after !== before) throw new Error("repository mutation detected during read-only evaluator run");
53
+ const response = JSON.parse(raw);
54
+ if (response.is_error) throw new Error(`claude evaluator returned an error: ${response.result ?? "unknown error"}`);
55
+ return validateEvaluation(JSON.parse(response.result), candidate.id);
56
+ },
57
+ };
58
+ }
@@ -3,7 +3,7 @@ import { validateEnforcement } from "../contracts.js";
3
3
  export function enforcementForSurface(surface, evidence = []) {
4
4
  const defaults = {
5
5
  codex: { level: "tool_enforced", evidence: ["codex exec --sandbox read-only --ephemeral"] },
6
- claude: { level: "instruction_only", evidence: [] },
6
+ claude: { level: "tool_enforced", evidence: ["claude -p --disallowedTools Edit,Write,Bash"] },
7
7
  copilot: { level: "instruction_only", evidence: [] },
8
8
  opencode: { level: "instruction_only", evidence: [] },
9
9
  generic: { level: "instruction_only", evidence: [] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agdf",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Bootstrap AGDF repository-local plugin files, Copilot/OpenCode instructions, skills, control files and machine-readable checks.",
5
5
  "type": "module",
6
6
  "files": [
@@ -22,8 +22,9 @@
22
22
  "scripts": {
23
23
  "sync-package-assets": "node ./scripts/sync-package-assets.js",
24
24
  "test:delivery-path-search": "node ./scripts/delivery-path-search-test.js",
25
+ "test:delivery-path-search-unit": "node ./scripts/delivery-path-search-unit-test.js",
25
26
  "test:routing": "npm run sync-package-assets && node ./scripts/test-routing.js",
26
- "smoke-test": "npm run sync-package-assets && npm run test:delivery-path-search && node ./scripts/smoke-test.js && node ./scripts/test-routing.js",
27
+ "smoke-test": "npm run sync-package-assets && npm run test:delivery-path-search && npm run test:delivery-path-search-unit && node ./scripts/smoke-test.js && node ./scripts/test-routing.js",
27
28
  "prepack": "npm run sync-package-assets"
28
29
  },
29
30
  "keywords": [