create-agdf 0.2.7 → 0.2.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.
package/NOTICE ADDED
@@ -0,0 +1,10 @@
1
+ AI Governance & Delivery Framework (AGDF)
2
+
3
+ Copyright 2024-2026 Arndt Gold.
4
+
5
+ The create-agdf package is licensed under the Apache License, Version 2.0.
6
+
7
+ AGDF(TM) and AI Governance & Delivery Framework(TM) are marks of Arndt Gold.
8
+ The package license does not grant permission to use project names, trademarks,
9
+ service marks or logos except as required for reasonable and customary
10
+ description of the origin of the project.
package/README.md CHANGED
@@ -5,12 +5,13 @@ Bootstrap AGDF repository instructions and a machine-checkable control loop for
5
5
  ## Usage
6
6
 
7
7
  ```bash
8
- npm create agdf@latest codex
9
- npm create agdf@latest copilot
10
- npm create agdf@latest both
11
- npm create agdf@latest init
12
- npm create agdf@latest doctor
13
- npm create agdf@latest gate-check
8
+ npm create agdf@latest -- codex
9
+ npm create agdf@latest -- copilot
10
+ npm create agdf@latest -- both
11
+ npm create agdf@latest -- init
12
+ npm create agdf@latest -- config --language en
13
+ npm create agdf@latest -- doctor
14
+ npm create agdf@latest -- gate-check
14
15
  ```
15
16
 
16
17
  Optional flags:
@@ -26,12 +27,13 @@ If no language is provided, `create-agdf` derives the preference from the local
26
27
  - `codex` writes a repository-local Codex marketplace under `.agents/plugins/` and a local AGDF plugin copy under `plugins/agdf/`
27
28
  - `copilot` writes `AGENTS.md`, Copilot custom instructions under `.github/`, visible repository skills under `.github/skills/`, and AGDF control templates under `.agdf/control/`
28
29
  - `both` writes the Codex repository-local marketplace plus the Copilot-facing repository files
30
+ - `config` writes or updates only `.agdf/control/config.json` for an already installed plugin or an existing repository
29
31
 
30
32
  If the target repository already has an `AGENTS.md`, `create-agdf` preserves it and writes `AGENTS.agdf.md` instead of replacing your existing instructions. Merge the AGDF fragment into your current `AGENTS.md` when you want Copilot to load both instruction sets. The generated `.github/copilot-instructions.md` keeps Copilot pointed at `AGENTS.md`, `.github/skills/` and `.agdf/control/` without duplicating the full AGDF rule model. Use `--force` only when you explicitly want to overwrite generated files.
31
33
 
32
34
  Use the `codex` target when AGDF should be available only inside one repository instead of being installed as a personal/global Codex plugin.
33
35
 
34
- After `npm create agdf@latest codex`, restart Codex in that repository, open `/plugins`, select `This repository` and install `agdf`.
36
+ After `npm create agdf@latest -- codex`, restart Codex in that repository, open `/plugins`, select `This repository` and install `agdf`.
35
37
 
36
38
  ## Control scaffold
37
39
 
@@ -47,7 +49,7 @@ The generated `.agdf/control/templates/` files are reusable starting points for
47
49
  Use `init` to promote those templates into live control files when the repository should own durable AGDF control state:
48
50
 
49
51
  ```bash
50
- npm create agdf@latest init
52
+ npm create agdf@latest -- init
51
53
  ```
52
54
 
53
55
  This writes:
@@ -66,11 +68,17 @@ This writes:
66
68
 
67
69
  `config.json` stores `artifact_language` and `chat_language` for governed work in the target repository. Runtime rules stay English so all AGDF surfaces share the same control contract.
68
70
 
71
+ For an existing repository where the plugin is already installed and only the language preference is missing or wrong, use the lighter config target:
72
+
73
+ ```bash
74
+ npm create agdf@latest -- config --language en
75
+ ```
76
+
69
77
  Use `doctor` to check whether the live control state is actionable:
70
78
 
71
79
  ```bash
72
- npm create agdf@latest doctor
73
- npm create agdf@latest doctor --json
80
+ npm create agdf@latest -- doctor
81
+ npx --yes create-agdf@latest doctor --json
74
82
  ```
75
83
 
76
84
  The doctor reports missing live control files, missing current gate, missing next allowed action, empty evidence, empty backlog pointer, empty source-of-truth registry, duplicate active SoT rows and invalid quality contracts. It exits non-zero only for blocking control failures.
@@ -78,8 +86,8 @@ The doctor reports missing live control files, missing current gate, missing nex
78
86
  Use `gate-check` to derive the next process decision from the doctor result and `AGDF_RUN.md`:
79
87
 
80
88
  ```bash
81
- npm create agdf@latest gate-check
82
- npm create agdf@latest gate-check --json
89
+ npm create agdf@latest -- gate-check
90
+ npx --yes create-agdf@latest gate-check --json
83
91
  ```
84
92
 
85
93
  The gate check reports `open | blocked`, the current gate, blocking reason, missing exact approval, allowed outputs, forbidden outputs, next allowed action, evidence references and the embedded doctor report.
@@ -119,3 +127,8 @@ The repository publishes this package from `create-agdf/` via the GitHub Actions
119
127
  - Create or update the version in `create-agdf/package.json`
120
128
  - Push a matching git tag in the form `create-agdf-v<version>`
121
129
  - Ensure the repository secret `NPM_TOKEN` exists with publish rights for `create-agdf`
130
+
131
+ ## Trademark Notice
132
+
133
+ AGDF(TM) and AI Governance & Delivery Framework(TM) are marks of Arndt Gold.
134
+ Use of the AGDF name and marks is governed by the project trademark guidelines.
@@ -11,7 +11,7 @@ const generatedRoot = join(packageRoot, "generated");
11
11
  const pluginDefinitionPath = join(generatedRoot, "plugins", "agdf", "meta", "agdf-plugin.definition.json");
12
12
  const pluginDefinition = JSON.parse(readFileSync(pluginDefinitionPath, "utf8"));
13
13
  const pluginInstallCommand = "claude plugin add arndtgold/ai-native-governance-delivery-framework";
14
- const allowedTargets = new Set(["codex", "copilot", "both", "init", "doctor", "gate-check", "delivery-map"]);
14
+ const allowedTargets = new Set(["codex", "copilot", "both", "init", "config", "doctor", "gate-check", "delivery-map"]);
15
15
  const agdfFragmentPath = "AGENTS.agdf.md";
16
16
  const userGateOrder = ["UR", "PRD", "SD", "TP", "QA", "UAT"];
17
17
  const durableGateArtefacts = new Set(["UR", "PRD", "SD", "TP", "QA"]);
@@ -117,13 +117,14 @@ function printUsage() {
117
117
  console.log(`create-agdf
118
118
 
119
119
  Usage:
120
- npm create agdf@latest codex
121
- npm create agdf@latest copilot
122
- npm create agdf@latest both
123
- npm create agdf@latest init
124
- npm create agdf@latest doctor
125
- npm create agdf@latest gate-check
126
- npm create agdf@latest delivery-map
120
+ npm create agdf@latest -- codex
121
+ npm create agdf@latest -- copilot
122
+ npm create agdf@latest -- both
123
+ npm create agdf@latest -- init
124
+ npm create agdf@latest -- config --language de
125
+ npm create agdf@latest -- doctor
126
+ npm create agdf@latest -- gate-check
127
+ npm create agdf@latest -- delivery-map
127
128
 
128
129
  Options:
129
130
  --dir <path> Write files into a specific directory
@@ -262,7 +263,7 @@ function parseArgs(argv) {
262
263
  }
263
264
 
264
265
  if (!target || !allowedTargets.has(target)) {
265
- console.error("Please choose one target: codex, copilot, both, init, doctor, gate-check or delivery-map.");
266
+ console.error("Please choose one target: codex, copilot, both, init, config, doctor, gate-check or delivery-map.");
266
267
  printUsage();
267
268
  process.exit(1);
268
269
  }
@@ -280,11 +281,11 @@ function loadAsset(relativePath) {
280
281
  return readFileSync(join(generatedRoot, relativePath), "utf8");
281
282
  }
282
283
 
283
- function writeGeneratedFile(targetDir, relativePath, content, force) {
284
+ function writeGeneratedFile(targetDir, relativePath, content, force, allowOverwrite = false) {
284
285
  const outputPath = join(targetDir, relativePath);
285
286
  mkdirSync(dirname(outputPath), { recursive: true });
286
287
 
287
- if (existsSync(outputPath) && !force) {
288
+ if (existsSync(outputPath) && !force && !allowOverwrite) {
288
289
  throw new Error(`Refusing to overwrite existing file: ${relativePath}. Re-run with --force if you want to replace it.`);
289
290
  }
290
291
 
@@ -301,6 +302,15 @@ function addLanguageConfig(files, languagePreference) {
301
302
  function generatedFilesForTarget(target, targetDir, force, languagePreference) {
302
303
  const files = [];
303
304
 
305
+ if (target === "config") {
306
+ files.push({
307
+ path: join(".agdf", "control", "config.json"),
308
+ content: languageConfigContent(languagePreference),
309
+ allowOverwrite: true,
310
+ });
311
+ return files;
312
+ }
313
+
304
314
  if (target === "init") {
305
315
  addLanguageConfig(files, languagePreference);
306
316
  files.push({
@@ -386,10 +396,15 @@ function printNextSteps(target, destination, files, wroteAgentsFragment) {
386
396
  }
387
397
  if (target === "init") {
388
398
  console.log("- Fill .agdf/control/AGDF_RUN.md with the current gate, evidence and next allowed action.");
389
- console.log("- Run npm create agdf@latest doctor to check the control state before the next agent run.");
399
+ console.log("- Run npm create agdf@latest -- doctor to check the control state before the next agent run.");
390
400
  console.log("- Commit the live control files once they represent the repository's current delivery state.");
391
401
  return;
392
402
  }
403
+ if (target === "config") {
404
+ console.log("- Restart or start a new agent session so the AGDF SessionStart hook reads the updated project language config.");
405
+ console.log("- Run npm create agdf@latest -- doctor when this repository also uses durable AGDF control state.");
406
+ return;
407
+ }
393
408
  if (wroteAgentsFragment) {
394
409
  console.log(`- Existing AGENTS.md detected. Merge ${agdfFragmentPath} into your current AGENTS.md before using Copilot with AGDF.`);
395
410
  }
@@ -402,7 +417,7 @@ function printNextSteps(target, destination, files, wroteAgentsFragment) {
402
417
  }
403
418
  if (target === "copilot" || target === "both") {
404
419
  console.log("- In GitHub Copilot CLI, run /instructions after the AGENTS.md step is complete to confirm that AGDF instructions and the repository skills are visible.");
405
- console.log("- Run npm create agdf@latest init when the repository needs live AGDF control files.");
420
+ console.log("- Run npm create agdf@latest -- init when the repository needs live AGDF control files.");
406
421
  }
407
422
  console.log("- Commit the generated files so the repository becomes the source of truth.");
408
423
  }
@@ -506,7 +521,7 @@ function evaluateDoctor(targetDir) {
506
521
  ? "Live control file is missing; only the template exists."
507
522
  : "Required live control file is missing.",
508
523
  relativePath,
509
- "Run npm create agdf@latest init only when the repository should own durable AGDF control state or deterministic setup is explicitly needed.",
524
+ "Run npm create agdf@latest -- init only when the repository should own durable AGDF control state or deterministic setup is explicitly needed.",
510
525
  );
511
526
  }
512
527
 
@@ -1121,7 +1136,7 @@ function evaluateGateCheck(targetDir) {
1121
1136
  allowed = [
1122
1137
  "draft the minimal UR for the requested change in the response",
1123
1138
  "request exact approval: Approval: UR",
1124
- "run npm create agdf@latest init only when durable control state or deterministic setup is explicitly needed",
1139
+ "run npm create agdf@latest -- init only when durable control state or deterministic setup is explicitly needed",
1125
1140
  ];
1126
1141
  forbidden = ["create PRD", "create SD", "create TP", "run Brownfield Analysis", "implement code", "claim QA or release readiness"];
1127
1142
  nextAllowedAction = "Draft the minimal UR for the request in the response, then ask for exact approval: Approval: UR. Do not write a full .agdf/control scaffold unless durable control state or deterministic setup is explicitly needed.";
@@ -1289,7 +1304,7 @@ function main() {
1289
1304
 
1290
1305
  try {
1291
1306
  for (const file of files) {
1292
- writeGeneratedFile(options.dir, file.path, file.content, options.force);
1307
+ writeGeneratedFile(options.dir, file.path, file.content, options.force, file.allowOverwrite);
1293
1308
  }
1294
1309
  } catch (error) {
1295
1310
  console.error(error.message);
@@ -49,15 +49,21 @@ Keep these files small and reviewable. They are control artefacts, not a second
49
49
  Create the live files with:
50
50
 
51
51
  ```bash
52
- npm create agdf@latest init
52
+ npm create agdf@latest -- init
53
+ ```
54
+
55
+ If only the project language preference is missing or should change after plugin installation, write just the config file:
56
+
57
+ ```bash
58
+ npm create agdf@latest -- config --language en
53
59
  ```
54
60
 
55
61
  Then check whether the live state is actionable:
56
62
 
57
63
  ```bash
58
- npm create agdf@latest doctor
59
- npm create agdf@latest doctor --json
60
- npm create agdf@latest gate-check --json
64
+ npm create agdf@latest -- doctor
65
+ npx --yes create-agdf@latest doctor --json
66
+ npx --yes create-agdf@latest gate-check --json
61
67
  ```
62
68
 
63
69
  `doctor` does not replace agent judgment. It catches basic control failures: missing live files, missing current gate, missing next allowed action, empty evidence, empty backlog pointer, empty source-of-truth registry, duplicate active SoT rows and invalid quality contracts.
@@ -41,10 +41,10 @@ Use `init` only when the user explicitly asks for durable AGDF control state, th
41
41
  Use the executable control path when a machine-readable check is requested, when the gate state is ambiguous, when CI or PR evidence is needed, or when a repository-local automation needs JSON output:
42
42
 
43
43
  ```bash
44
- npm create agdf@latest init
45
- npm create agdf@latest doctor --json
46
- npm create agdf@latest gate-check --json
47
- npm create agdf@latest delivery-map --json
44
+ npm create agdf@latest -- init
45
+ npx --yes create-agdf@latest doctor --json
46
+ npx --yes create-agdf@latest gate-check --json
47
+ npx --yes create-agdf@latest delivery-map --json
48
48
  ```
49
49
 
50
50
  `init` creates the control scaffold. `doctor` checks whether `.agdf/control/` is actionable. `agdf-gate-check` consumes that result and `AGDF_RUN.md` to report the operative process decision: `open | blocked`, current gate, blocking reason, missing approval, allowed outputs, forbidden outputs, next allowed action and evidence references.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Codex-first workflow skills for gated, auditable AI-assisted software delivery.",
5
5
  "author": {
6
6
  "name": "AI-native Governance & Delivery Framework",
@@ -49,15 +49,21 @@ Keep these files small and reviewable. They are control artefacts, not a second
49
49
  Create the live files with:
50
50
 
51
51
  ```bash
52
- npm create agdf@latest init
52
+ npm create agdf@latest -- init
53
+ ```
54
+
55
+ If only the project language preference is missing or should change after plugin installation, write just the config file:
56
+
57
+ ```bash
58
+ npm create agdf@latest -- config --language en
53
59
  ```
54
60
 
55
61
  Then check whether the live state is actionable:
56
62
 
57
63
  ```bash
58
- npm create agdf@latest doctor
59
- npm create agdf@latest doctor --json
60
- npm create agdf@latest gate-check --json
64
+ npm create agdf@latest -- doctor
65
+ npx --yes create-agdf@latest doctor --json
66
+ npx --yes create-agdf@latest gate-check --json
61
67
  ```
62
68
 
63
69
  `doctor` does not replace agent judgment. It catches basic control failures: missing live files, missing current gate, missing next allowed action, empty evidence, empty backlog pointer, empty source-of-truth registry, duplicate active SoT rows and invalid quality contracts.
@@ -6,12 +6,32 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6
6
  META_DIR="$(cd "${SCRIPT_DIR}/../meta" && pwd)"
7
7
  ROUTER="${META_DIR}/agdf-agent-router.md"
8
8
  CONSTITUTION="${META_DIR}/agdf-constitution.md"
9
+ CONFIG_PATH="${PWD}/.agdf/control/config.json"
10
+
11
+ CONFIG_HINT="Project config: .agdf/control/config.json not found. Use npm create agdf@latest -- config --language de|en to persist the project language."
12
+ if [[ -f "${CONFIG_PATH}" ]]; then
13
+ CONFIG_HINT="$(CONFIG_PATH="${CONFIG_PATH}" node <<'NODE' 2>/dev/null || true
14
+ const fs = require("node:fs");
15
+ const path = process.env.CONFIG_PATH;
16
+ try {
17
+ const config = JSON.parse(fs.readFileSync(path, "utf8"));
18
+ const artefacts = config.artifact_language || "unset";
19
+ const chat = config.chat_language || "unset";
20
+ const runtime = config.runtime_language || "en";
21
+ console.log(`Project config: .agdf/control/config.json (artefacts=${artefacts}, chat=${chat}, runtime=${runtime}).`);
22
+ } catch {
23
+ console.log("Project config: .agdf/control/config.json exists but is not valid JSON. Run npm create agdf@latest -- doctor.");
24
+ }
25
+ NODE
26
+ )"
27
+ fi
9
28
 
10
29
  cat <<EOF
11
30
  AGDF active.
12
31
 
13
32
  Use the installed AGDF skills as workflow controls.
14
33
  For a new build, change, extension, refactor, CLI, app, fix with product semantics, unclear approval, or unclear next step, use gate-check before implementation or later-gate artefacts.
34
+ ${CONFIG_HINT}
15
35
 
16
36
  Do not print the full router or constitution unless the user asks for them.
17
37
  Source of truth:
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.2.7",
4
+ "version": "0.2.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.",
@@ -41,10 +41,10 @@ Use `init` only when the user explicitly asks for durable AGDF control state, th
41
41
  Use the executable control path when a machine-readable check is requested, when the gate state is ambiguous, when CI or PR evidence is needed, or when a repository-local automation needs JSON output:
42
42
 
43
43
  ```bash
44
- npm create agdf@latest init
45
- npm create agdf@latest doctor --json
46
- npm create agdf@latest gate-check --json
47
- npm create agdf@latest delivery-map --json
44
+ npm create agdf@latest -- init
45
+ npx --yes create-agdf@latest doctor --json
46
+ npx --yes create-agdf@latest gate-check --json
47
+ npx --yes create-agdf@latest delivery-map --json
48
48
  ```
49
49
 
50
50
  `init` creates the control scaffold. `doctor` checks whether `.agdf/control/` is actionable. `gate-check` consumes that result and `AGDF_RUN.md` to report the operative process decision: `open | blocked`, current gate, blocking reason, missing approval, allowed outputs, forbidden outputs, next allowed action and evidence references.
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "create-agdf",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Bootstrap AGDF repository-local plugin files, Copilot instructions, skills, control files and machine-readable checks.",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "bin",
8
8
  "generated",
9
- "README.md"
9
+ "README.md",
10
+ "NOTICE"
10
11
  ],
11
12
  "bin": {
12
13
  "create-agdf": "./bin/create-agdf.js"