create-agdf 0.2.7 → 0.2.9
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 +10 -0
- package/README.md +37 -12
- package/bin/create-agdf.js +75 -18
- package/generated/.agdf/control/README.md +10 -4
- package/generated/.github/skills/agdf-gate-check/SKILL.md +4 -4
- package/generated/.opencode/AGDF.md +102 -0
- package/generated/.opencode/README.md +19 -0
- package/generated/.opencode/agdf-runtime-contract.md +219 -0
- package/generated/.opencode/agents/agdf-brownfield-analysis.md +142 -0
- package/generated/.opencode/agents/agdf-clean-implementation-review.md +106 -0
- package/generated/.opencode/agents/agdf-code-review.md +100 -0
- package/generated/.opencode/agents/agdf-delivery-closeout.md +115 -0
- package/generated/.opencode/agents/agdf-gate-check.md +155 -0
- package/generated/.opencode/agents/agdf-qa-gate.md +116 -0
- package/generated/.opencode/agents/agdf-release-or.md +130 -0
- package/generated/.opencode/agents/agdf-task-plan-review.md +121 -0
- package/generated/opencode.json +13 -0
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/control/README.md +10 -4
- package/generated/plugins/agdf/hooks/session-start.sh +20 -0
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +11 -1
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +4 -4
- package/opencode-plugin.js +33 -0
- package/package.json +10 -3
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,14 @@ 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
|
|
11
|
-
npm create agdf@latest
|
|
12
|
-
npm create agdf@latest
|
|
13
|
-
npm create agdf@latest
|
|
8
|
+
npm create agdf@latest -- codex
|
|
9
|
+
npm create agdf@latest -- copilot
|
|
10
|
+
npm create agdf@latest -- opencode
|
|
11
|
+
npm create agdf@latest -- both
|
|
12
|
+
npm create agdf@latest -- init
|
|
13
|
+
npm create agdf@latest -- config --language en
|
|
14
|
+
npm create agdf@latest -- doctor
|
|
15
|
+
npm create agdf@latest -- gate-check
|
|
14
16
|
```
|
|
15
17
|
|
|
16
18
|
Optional flags:
|
|
@@ -25,13 +27,25 @@ If no language is provided, `create-agdf` derives the preference from the local
|
|
|
25
27
|
|
|
26
28
|
- `codex` writes a repository-local Codex marketplace under `.agents/plugins/` and a local AGDF plugin copy under `plugins/agdf/`
|
|
27
29
|
- `copilot` writes `AGENTS.md`, Copilot custom instructions under `.github/`, visible repository skills under `.github/skills/`, and AGDF control templates under `.agdf/control/`
|
|
30
|
+
- `opencode` writes `opencode.json`, `.opencode/AGDF.md`, prefixed OpenCode agents under `.opencode/agents/`, explicit edit/bash permissions, and AGDF control templates under `.agdf/control/`
|
|
28
31
|
- `both` writes the Codex repository-local marketplace plus the Copilot-facing repository files
|
|
32
|
+
- `config` writes or updates only `.agdf/control/config.json` for an already installed plugin or an existing repository
|
|
29
33
|
|
|
30
34
|
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
35
|
|
|
32
36
|
Use the `codex` target when AGDF should be available only inside one repository instead of being installed as a personal/global Codex plugin.
|
|
33
37
|
|
|
34
|
-
After `npm create agdf@latest codex`, restart Codex in that repository, open `/plugins`, select `This repository` and install `agdf`.
|
|
38
|
+
After `npm create agdf@latest -- codex`, restart Codex in that repository, open `/plugins`, select `This repository` and install `agdf`.
|
|
39
|
+
|
|
40
|
+
Use the `opencode` target when AGDF should be available to OpenCode from repository files:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm create agdf@latest -- opencode
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
OpenCode loads the AGDF npm plugin from `opencode.json`, AGENTS-style rules from `.opencode/AGDF.md`, explicit `edit`/`bash` permissions and the `agdf-` prefixed agents under `.opencode/agents/`.
|
|
47
|
+
If `opencode.json` already exists, AGDF keeps it unchanged and writes `opencode.agdf.json` as a merge fragment.
|
|
48
|
+
Using OpenCode's plugin installer for `create-agdf` can add the npm plugin entry, but AGDF still needs the repository instructions and agents. The `opencode` target writes the npm plugin entry and the repository files together.
|
|
35
49
|
|
|
36
50
|
## Control scaffold
|
|
37
51
|
|
|
@@ -47,7 +61,7 @@ The generated `.agdf/control/templates/` files are reusable starting points for
|
|
|
47
61
|
Use `init` to promote those templates into live control files when the repository should own durable AGDF control state:
|
|
48
62
|
|
|
49
63
|
```bash
|
|
50
|
-
npm create agdf@latest init
|
|
64
|
+
npm create agdf@latest -- init
|
|
51
65
|
```
|
|
52
66
|
|
|
53
67
|
This writes:
|
|
@@ -66,11 +80,17 @@ This writes:
|
|
|
66
80
|
|
|
67
81
|
`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
82
|
|
|
83
|
+
For an existing repository where the plugin is already installed and only the language preference is missing or wrong, use the lighter config target:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm create agdf@latest -- config --language en
|
|
87
|
+
```
|
|
88
|
+
|
|
69
89
|
Use `doctor` to check whether the live control state is actionable:
|
|
70
90
|
|
|
71
91
|
```bash
|
|
72
|
-
npm create agdf@latest doctor
|
|
73
|
-
|
|
92
|
+
npm create agdf@latest -- doctor
|
|
93
|
+
npx --yes create-agdf@latest doctor --json
|
|
74
94
|
```
|
|
75
95
|
|
|
76
96
|
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 +98,8 @@ The doctor reports missing live control files, missing current gate, missing nex
|
|
|
78
98
|
Use `gate-check` to derive the next process decision from the doctor result and `AGDF_RUN.md`:
|
|
79
99
|
|
|
80
100
|
```bash
|
|
81
|
-
npm create agdf@latest gate-check
|
|
82
|
-
|
|
101
|
+
npm create agdf@latest -- gate-check
|
|
102
|
+
npx --yes create-agdf@latest gate-check --json
|
|
83
103
|
```
|
|
84
104
|
|
|
85
105
|
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 +139,8 @@ The repository publishes this package from `create-agdf/` via the GitHub Actions
|
|
|
119
139
|
- Create or update the version in `create-agdf/package.json`
|
|
120
140
|
- Push a matching git tag in the form `create-agdf-v<version>`
|
|
121
141
|
- Ensure the repository secret `NPM_TOKEN` exists with publish rights for `create-agdf`
|
|
142
|
+
|
|
143
|
+
## Trademark Notice
|
|
144
|
+
|
|
145
|
+
AGDF(TM) and AI Governance & Delivery Framework(TM) are marks of Arndt Gold.
|
|
146
|
+
Use of the AGDF name and marks is governed by the project trademark guidelines.
|
package/bin/create-agdf.js
CHANGED
|
@@ -11,8 +11,9 @@ 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", "opencode", "both", "init", "config", "doctor", "gate-check", "delivery-map"]);
|
|
15
15
|
const agdfFragmentPath = "AGENTS.agdf.md";
|
|
16
|
+
const openCodeConfigFragmentPath = "opencode.agdf.json";
|
|
16
17
|
const userGateOrder = ["UR", "PRD", "SD", "TP", "QA", "UAT"];
|
|
17
18
|
const durableGateArtefacts = new Set(["UR", "PRD", "SD", "TP", "QA"]);
|
|
18
19
|
const internalStepArtefacts = new Set(["Brownfield Review"]);
|
|
@@ -25,6 +26,7 @@ const deliveryRelationships = [
|
|
|
25
26
|
];
|
|
26
27
|
const codexSkillNames = pluginDefinition.skillSet.map((skill) => `${pluginDefinition.codex.skillPrefix}${skill.slug}`);
|
|
27
28
|
const copilotSkillNames = pluginDefinition.skillSet.map((skill) => `${pluginDefinition.copilot.skillPrefix}${skill.slug}`);
|
|
29
|
+
const openCodeSkillNames = pluginDefinition.skillSet.map((skill) => `${pluginDefinition.opencode.skillPrefix}${skill.slug}`);
|
|
28
30
|
const codexPluginFiles = [
|
|
29
31
|
join(".agents", "plugins", "marketplace.json"),
|
|
30
32
|
join("plugins", "agdf", ".codex-plugin", "plugin.json"),
|
|
@@ -112,18 +114,26 @@ const copilotSkillFiles = [
|
|
|
112
114
|
join(".github", "skills", pluginDefinition.copilot.runtimeContractFileName),
|
|
113
115
|
...copilotSkillNames.map((skillName) => join(".github", "skills", skillName, "SKILL.md")),
|
|
114
116
|
];
|
|
117
|
+
const openCodeFiles = [
|
|
118
|
+
join(".opencode", pluginDefinition.opencode.instructionsFileName),
|
|
119
|
+
join(".opencode", "README.md"),
|
|
120
|
+
join(".opencode", pluginDefinition.opencode.runtimeContractFileName),
|
|
121
|
+
...openCodeSkillNames.map((skillName) => join(".opencode", "agents", `${skillName}.md`)),
|
|
122
|
+
];
|
|
115
123
|
|
|
116
124
|
function printUsage() {
|
|
117
125
|
console.log(`create-agdf
|
|
118
126
|
|
|
119
127
|
Usage:
|
|
120
|
-
npm create agdf@latest codex
|
|
121
|
-
npm create agdf@latest copilot
|
|
122
|
-
npm create agdf@latest
|
|
123
|
-
npm create agdf@latest
|
|
124
|
-
npm create agdf@latest
|
|
125
|
-
npm create agdf@latest
|
|
126
|
-
npm create agdf@latest
|
|
128
|
+
npm create agdf@latest -- codex
|
|
129
|
+
npm create agdf@latest -- copilot
|
|
130
|
+
npm create agdf@latest -- opencode
|
|
131
|
+
npm create agdf@latest -- both
|
|
132
|
+
npm create agdf@latest -- init
|
|
133
|
+
npm create agdf@latest -- config --language de
|
|
134
|
+
npm create agdf@latest -- doctor
|
|
135
|
+
npm create agdf@latest -- gate-check
|
|
136
|
+
npm create agdf@latest -- delivery-map
|
|
127
137
|
|
|
128
138
|
Options:
|
|
129
139
|
--dir <path> Write files into a specific directory
|
|
@@ -262,7 +272,7 @@ function parseArgs(argv) {
|
|
|
262
272
|
}
|
|
263
273
|
|
|
264
274
|
if (!target || !allowedTargets.has(target)) {
|
|
265
|
-
console.error("Please choose one target: codex, copilot, both, init, doctor, gate-check or delivery-map.");
|
|
275
|
+
console.error("Please choose one target: codex, copilot, opencode, both, init, config, doctor, gate-check or delivery-map.");
|
|
266
276
|
printUsage();
|
|
267
277
|
process.exit(1);
|
|
268
278
|
}
|
|
@@ -280,11 +290,11 @@ function loadAsset(relativePath) {
|
|
|
280
290
|
return readFileSync(join(generatedRoot, relativePath), "utf8");
|
|
281
291
|
}
|
|
282
292
|
|
|
283
|
-
function writeGeneratedFile(targetDir, relativePath, content, force) {
|
|
293
|
+
function writeGeneratedFile(targetDir, relativePath, content, force, allowOverwrite = false) {
|
|
284
294
|
const outputPath = join(targetDir, relativePath);
|
|
285
295
|
mkdirSync(dirname(outputPath), { recursive: true });
|
|
286
296
|
|
|
287
|
-
if (existsSync(outputPath) && !force) {
|
|
297
|
+
if (existsSync(outputPath) && !force && !allowOverwrite) {
|
|
288
298
|
throw new Error(`Refusing to overwrite existing file: ${relativePath}. Re-run with --force if you want to replace it.`);
|
|
289
299
|
}
|
|
290
300
|
|
|
@@ -301,6 +311,15 @@ function addLanguageConfig(files, languagePreference) {
|
|
|
301
311
|
function generatedFilesForTarget(target, targetDir, force, languagePreference) {
|
|
302
312
|
const files = [];
|
|
303
313
|
|
|
314
|
+
if (target === "config") {
|
|
315
|
+
files.push({
|
|
316
|
+
path: join(".agdf", "control", "config.json"),
|
|
317
|
+
content: languageConfigContent(languagePreference),
|
|
318
|
+
allowOverwrite: true,
|
|
319
|
+
});
|
|
320
|
+
return files;
|
|
321
|
+
}
|
|
322
|
+
|
|
304
323
|
if (target === "init") {
|
|
305
324
|
addLanguageConfig(files, languagePreference);
|
|
306
325
|
files.push({
|
|
@@ -365,10 +384,33 @@ function generatedFilesForTarget(target, targetDir, force, languagePreference) {
|
|
|
365
384
|
}
|
|
366
385
|
}
|
|
367
386
|
|
|
387
|
+
if (target === "opencode") {
|
|
388
|
+
addLanguageConfig(files, languagePreference);
|
|
389
|
+
const openCodeConfigTargetPath = existsSync(join(targetDir, "opencode.json")) && !force ? openCodeConfigFragmentPath : "opencode.json";
|
|
390
|
+
files.push({
|
|
391
|
+
path: openCodeConfigTargetPath,
|
|
392
|
+
content: loadAsset("opencode.json"),
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
for (const openCodePath of openCodeFiles) {
|
|
396
|
+
files.push({
|
|
397
|
+
path: openCodePath,
|
|
398
|
+
content: loadAsset(openCodePath),
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
for (const controlPath of controlFiles) {
|
|
403
|
+
files.push({
|
|
404
|
+
path: controlPath,
|
|
405
|
+
content: loadAsset(controlPath),
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
368
410
|
return files;
|
|
369
411
|
}
|
|
370
412
|
|
|
371
|
-
function printNextSteps(target, destination, files, wroteAgentsFragment) {
|
|
413
|
+
function printNextSteps(target, destination, files, wroteAgentsFragment, wroteOpenCodeConfigFragment) {
|
|
372
414
|
console.log("");
|
|
373
415
|
console.log(`AGDF bootstrap complete in ${destination}`);
|
|
374
416
|
console.log("");
|
|
@@ -386,10 +428,15 @@ function printNextSteps(target, destination, files, wroteAgentsFragment) {
|
|
|
386
428
|
}
|
|
387
429
|
if (target === "init") {
|
|
388
430
|
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.");
|
|
431
|
+
console.log("- Run npm create agdf@latest -- doctor to check the control state before the next agent run.");
|
|
390
432
|
console.log("- Commit the live control files once they represent the repository's current delivery state.");
|
|
391
433
|
return;
|
|
392
434
|
}
|
|
435
|
+
if (target === "config") {
|
|
436
|
+
console.log("- Restart or start a new agent session so the AGDF SessionStart hook reads the updated project language config.");
|
|
437
|
+
console.log("- Run npm create agdf@latest -- doctor when this repository also uses durable AGDF control state.");
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
393
440
|
if (wroteAgentsFragment) {
|
|
394
441
|
console.log(`- Existing AGENTS.md detected. Merge ${agdfFragmentPath} into your current AGENTS.md before using Copilot with AGDF.`);
|
|
395
442
|
}
|
|
@@ -400,9 +447,18 @@ function printNextSteps(target, destination, files, wroteAgentsFragment) {
|
|
|
400
447
|
if (target === "both") {
|
|
401
448
|
console.log(`- Optional global Claude Code install: ${pluginInstallCommand}`);
|
|
402
449
|
}
|
|
450
|
+
if (target === "opencode") {
|
|
451
|
+
if (wroteOpenCodeConfigFragment) {
|
|
452
|
+
console.log(`- Existing opencode.json detected. Merge ${openCodeConfigFragmentPath} into your current opencode.json so OpenCode loads .opencode/AGDF.md.`);
|
|
453
|
+
}
|
|
454
|
+
console.log(`- OpenCode will install the ${pluginDefinition.opencode.npmPackage} npm plugin from opencode.json at startup.`);
|
|
455
|
+
console.log("- Start OpenCode in this repository; it will load opencode.json, .opencode/AGDF.md and the AGDF subagents.");
|
|
456
|
+
console.log("- Use @agdf-gate-check for new build/change intent or unclear approval before later artefacts or implementation.");
|
|
457
|
+
console.log("- Run npm create agdf@latest -- init when the repository needs live AGDF control files.");
|
|
458
|
+
}
|
|
403
459
|
if (target === "copilot" || target === "both") {
|
|
404
460
|
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.");
|
|
461
|
+
console.log("- Run npm create agdf@latest -- init when the repository needs live AGDF control files.");
|
|
406
462
|
}
|
|
407
463
|
console.log("- Commit the generated files so the repository becomes the source of truth.");
|
|
408
464
|
}
|
|
@@ -506,7 +562,7 @@ function evaluateDoctor(targetDir) {
|
|
|
506
562
|
? "Live control file is missing; only the template exists."
|
|
507
563
|
: "Required live control file is missing.",
|
|
508
564
|
relativePath,
|
|
509
|
-
"Run npm create agdf@latest init only when the repository should own durable AGDF control state or deterministic setup is explicitly needed.",
|
|
565
|
+
"Run npm create agdf@latest -- init only when the repository should own durable AGDF control state or deterministic setup is explicitly needed.",
|
|
510
566
|
);
|
|
511
567
|
}
|
|
512
568
|
|
|
@@ -1121,7 +1177,7 @@ function evaluateGateCheck(targetDir) {
|
|
|
1121
1177
|
allowed = [
|
|
1122
1178
|
"draft the minimal UR for the requested change in the response",
|
|
1123
1179
|
"request exact approval: Approval: UR",
|
|
1124
|
-
"run npm create agdf@latest init only when durable control state or deterministic setup is explicitly needed",
|
|
1180
|
+
"run npm create agdf@latest -- init only when durable control state or deterministic setup is explicitly needed",
|
|
1125
1181
|
];
|
|
1126
1182
|
forbidden = ["create PRD", "create SD", "create TP", "run Brownfield Analysis", "implement code", "claim QA or release readiness"];
|
|
1127
1183
|
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.";
|
|
@@ -1286,17 +1342,18 @@ function main() {
|
|
|
1286
1342
|
|
|
1287
1343
|
const files = generatedFilesForTarget(options.target, options.dir, options.force, options.language);
|
|
1288
1344
|
const wroteAgentsFragment = files.some(file => file.path === agdfFragmentPath);
|
|
1345
|
+
const wroteOpenCodeConfigFragment = files.some(file => file.path === openCodeConfigFragmentPath);
|
|
1289
1346
|
|
|
1290
1347
|
try {
|
|
1291
1348
|
for (const file of files) {
|
|
1292
|
-
writeGeneratedFile(options.dir, file.path, file.content, options.force);
|
|
1349
|
+
writeGeneratedFile(options.dir, file.path, file.content, options.force, file.allowOverwrite);
|
|
1293
1350
|
}
|
|
1294
1351
|
} catch (error) {
|
|
1295
1352
|
console.error(error.message);
|
|
1296
1353
|
process.exit(1);
|
|
1297
1354
|
}
|
|
1298
1355
|
|
|
1299
|
-
printNextSteps(options.target, options.dir, files, wroteAgentsFragment);
|
|
1356
|
+
printNextSteps(options.target, options.dir, files, wroteAgentsFragment, wroteOpenCodeConfigFragment);
|
|
1300
1357
|
}
|
|
1301
1358
|
|
|
1302
1359
|
main();
|
|
@@ -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
|
-
|
|
60
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# AGDF OpenCode instructions
|
|
2
|
+
|
|
3
|
+
## Role
|
|
4
|
+
You are operating in an OpenCode project configured with AGDF.
|
|
5
|
+
|
|
6
|
+
Use the AGDF agents as workflow controls, not as documentation shortcuts.
|
|
7
|
+
Your goal is trustworthy progress: reduce uncertainty, establish evidence, preserve artefacts, verify outcomes and make the next allowed step explicit.
|
|
8
|
+
|
|
9
|
+
## Surface Convention
|
|
10
|
+
OpenCode project agents do not have a plugin namespace.
|
|
11
|
+
|
|
12
|
+
Therefore generated OpenCode agent names use the AGDF prefix:
|
|
13
|
+
|
|
14
|
+
- `agdf-brownfield-analysis`
|
|
15
|
+
- `agdf-clean-implementation-review`
|
|
16
|
+
- `agdf-code-review`
|
|
17
|
+
- `agdf-delivery-closeout`
|
|
18
|
+
- `agdf-gate-check`
|
|
19
|
+
- `agdf-qa-gate`
|
|
20
|
+
- `agdf-release-or`
|
|
21
|
+
- `agdf-task-plan-review`
|
|
22
|
+
|
|
23
|
+
Do not remove that prefix in OpenCode-facing repository agents.
|
|
24
|
+
Codex and Claude Code plugin surfaces use unprefixed skill names because their plugin namespace already carries `agdf`.
|
|
25
|
+
## Mode Selection
|
|
26
|
+
Default entry rule: a new user intent to build, add, change, extend, refactor or otherwise deliver something starts with `agdf-gate-check` unless it is clearly only a question, explanation, local inspection, or explicitly scoped review.
|
|
27
|
+
|
|
28
|
+
Use Quick Task Mode for questions, small reviews, local debugging and narrow fixes without new product semantics.
|
|
29
|
+
|
|
30
|
+
Use Structured Delivery Mode for new capabilities, architecture, policy, persistence, release-critical work, formal artefacts or explicit approvals.
|
|
31
|
+
|
|
32
|
+
Any new product semantics, functional change or user-visible behaviour change requires a durable UR first.
|
|
33
|
+
Persist it in `.agdf/control/` or link it from there to the target repository's authoritative source of truth before PRD, SD, TP, Brownfield Analysis or implementation.
|
|
34
|
+
Treat approval text and durable artefact presence as separate checks for UR, PRD, SD, TP and QA report decisions.
|
|
35
|
+
Do not infer approval from "ok", "go ahead", "do it", "approved", "continue", "leg los" or similar wording.
|
|
36
|
+
Those phrases may express intent to proceed, but they do not unlock a gate unless the exact gate formula is present.
|
|
37
|
+
After `Approval: UR`, run lightweight Brownfield Review before PRD when Brownfield, ownership, runtime, policy, persistence, architecture, UI or UX impact is possible.
|
|
38
|
+
Brownfield Review must produce a Mode/Slice Decision: `quick_task`, `structured_slice`, `structured_delivery` or `block`.
|
|
39
|
+
Make that decision visible before coding or drafting later artefacts: state the selected path, scope reason, evidence and next required gate in the live control state or linked artefact.
|
|
40
|
+
Do not assume the full PRD/SD/TP chain before that decision; use only as much gate depth as the reviewed change size justifies.
|
|
41
|
+
|
|
42
|
+
Quick Task Mode must still use the Runtime Contract mini-output: `result`, `evidence`, `risk`, `next_step`.
|
|
43
|
+
Structured Delivery Mode must respect gates, reviews and closeout discipline.
|
|
44
|
+
|
|
45
|
+
## Skill Routing
|
|
46
|
+
| Skill | Use For | Boundary |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `agdf-brownfield-analysis` | after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems | clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission |
|
|
49
|
+
| `agdf-clean-implementation-review` | inspect workarounds, fallbacks, parallel structures or symptom fixes | not a TP or QA substitute |
|
|
50
|
+
| `agdf-code-review` | mandatory CR step after code changes, focused on defects, regression and security findings | does not replace TP review, clean review or QA |
|
|
51
|
+
| `agdf-delivery-closeout` | commit/PR-near handoff after QA/OR/UAT | never performs VCS actions automatically |
|
|
52
|
+
| `agdf-gate-check` | new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested | does not create later artefacts or skip Mode/Slice Decision after Brownfield Review |
|
|
53
|
+
| `agdf-qa-gate` | final QA decision | only instance for `pass | revise | block` |
|
|
54
|
+
| `agdf-release-or` | auditable closeout for every relevant run | not a QA substitute |
|
|
55
|
+
| `agdf-task-plan-review` | after implementation and before QA, verify TP coverage | no final QA decision |
|
|
56
|
+
|
|
57
|
+
Select exactly one primary skill first.
|
|
58
|
+
Add more only when they cover a distinct concrete risk dimension.
|
|
59
|
+
Do not choose `agdf-brownfield-analysis` as the first primary skill for a fresh "I want to build/change X" prompt unless `agdf-gate-check` or existing live AGDF control state already makes implementation preparation the next allowed action.
|
|
60
|
+
Never jump directly from `Approval: UR`, implicit consent, or a generic "start" request to implementation. Route to Brownfield Review, then a visible Mode/Slice Decision with evidence, then the smallest safe next gate or Quick Task execution.
|
|
61
|
+
|
|
62
|
+
## Runtime Contract
|
|
63
|
+
For repeated output, gate, Quality Contract and Context Graph rules, use:
|
|
64
|
+
|
|
65
|
+
`agdf-runtime-contract.md`
|
|
66
|
+
|
|
67
|
+
Skills may include short reminders, but they must not carry a second complete rule or code table.
|
|
68
|
+
|
|
69
|
+
## Durable Control State
|
|
70
|
+
When the target repository uses the AGDF control scaffold, keep live control files under `.agdf/control/`.
|
|
71
|
+
Use templates as starting points only.
|
|
72
|
+
|
|
73
|
+
Do not let chat history become the source of truth for gate state, approvals, evidence, backlog status or durable Brownfield knowledge.
|
|
74
|
+
|
|
75
|
+
AGDF is agent-native first and CLI-verifiable by design: read the live control state, apply the active skill and make the next allowed step explicit.
|
|
76
|
+
Use `init` only when durable control state is explicitly requested, the repository already uses `.agdf/control/` as its live AGDF working state, or a deterministic CLI/CI setup path is being executed.
|
|
77
|
+
Use `doctor --json`, `gate-check --json` or `delivery-map --json` as deterministic validators for CI, PR evidence, regression checks or audit trails, not as a substitute for the router or skills.
|
|
78
|
+
|
|
79
|
+
## Closeout
|
|
80
|
+
For Quick Task Mode, close with the Runtime Contract mini-output only:
|
|
81
|
+
|
|
82
|
+
- `result`
|
|
83
|
+
- `evidence`
|
|
84
|
+
- `risk`
|
|
85
|
+
- `next_step`
|
|
86
|
+
|
|
87
|
+
For relevant runs that change durable state, code, artefacts or gate status:
|
|
88
|
+
|
|
89
|
+
- run relevant checks or state the test gap
|
|
90
|
+
- never commit, push or open a PR automatically
|
|
91
|
+
- include exactly one `Next step:`
|
|
92
|
+
- include exactly one `Quality outlook:`
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## OpenCode Files
|
|
96
|
+
|
|
97
|
+
- OpenCode loads this file through `opencode.json` `instructions`.
|
|
98
|
+
- OpenCode agents live under `.opencode/agents/` and use the `agdf-` prefix.
|
|
99
|
+
- The AGDF OpenCode plugin is loaded from npm through `opencode.json` `plugin: ["create-agdf"]`.
|
|
100
|
+
- OpenCode permissions keep `edit` and `bash` on explicit approval by default.
|
|
101
|
+
- Shared output and gate rules live in `.opencode/agdf-runtime-contract.md`.
|
|
102
|
+
- Do not paste full control files, templates or artefact bodies into chat unless the user explicitly asks for the full content; summarize and link paths instead.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# AGDF OpenCode surface
|
|
2
|
+
|
|
3
|
+
These files were generated from the AGDF source repository for OpenCode.
|
|
4
|
+
|
|
5
|
+
- `opencode.json` loads the npm plugin `create-agdf` and `.opencode/AGDF.md` as repository instructions.
|
|
6
|
+
- `opencode.json` keeps `edit` and `bash` on `ask` so execution remains permissioned.
|
|
7
|
+
- `.opencode/agents/` contains AGDF subagents generated from the canonical AGDF skills.
|
|
8
|
+
- `.opencode/agdf-runtime-contract.md` is the shared gate and output contract.
|
|
9
|
+
|
|
10
|
+
## Agents
|
|
11
|
+
|
|
12
|
+
- `agdf-brownfield-analysis`
|
|
13
|
+
- `agdf-clean-implementation-review`
|
|
14
|
+
- `agdf-code-review`
|
|
15
|
+
- `agdf-delivery-closeout`
|
|
16
|
+
- `agdf-gate-check`
|
|
17
|
+
- `agdf-qa-gate`
|
|
18
|
+
- `agdf-release-or`
|
|
19
|
+
- `agdf-task-plan-review`
|