create-agdf 0.3.4 → 0.4.0

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.
Files changed (33) hide show
  1. package/README.md +29 -11
  2. package/bin/create-agdf.js +546 -32
  3. package/generated/.agdf/control/templates/AGDF_RUN.md +29 -0
  4. package/generated/.agdf/control/templates/AGENT_QUALITY_CONTRACTS.json +48 -0
  5. package/generated/.agdf/control/templates/MASTER_BACKLOG.md +7 -10
  6. package/generated/.agdf/control/templates/artefacts/OR.md +20 -4
  7. package/generated/.github/skills/agdf-gate-check/SKILL.md +7 -0
  8. package/generated/.github/skills/agdf-release-or/SKILL.md +2 -0
  9. package/generated/.github/skills/agdf-runtime-contract.md +132 -0
  10. package/generated/.opencode/AGDF.md +8 -0
  11. package/generated/.opencode/README.md +4 -0
  12. package/generated/.opencode/agdf-runtime-contract.md +132 -0
  13. package/generated/.opencode/agents/agdf-brownfield-analysis.md +0 -5
  14. package/generated/.opencode/agents/agdf-clean-implementation-review.md +0 -5
  15. package/generated/.opencode/agents/agdf-code-review.md +0 -5
  16. package/generated/.opencode/agents/agdf-delivery-closeout.md +0 -5
  17. package/generated/.opencode/agents/agdf-gate-check.md +7 -5
  18. package/generated/.opencode/agents/agdf-qa-gate.md +0 -5
  19. package/generated/.opencode/agents/agdf-release-or.md +2 -5
  20. package/generated/.opencode/agents/agdf-task-plan-review.md +0 -5
  21. package/generated/AGENTS.md +4 -0
  22. package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
  23. package/generated/plugins/agdf/control/templates/AGDF_RUN.md +29 -0
  24. package/generated/plugins/agdf/control/templates/AGENT_QUALITY_CONTRACTS.json +48 -0
  25. package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +7 -10
  26. package/generated/plugins/agdf/control/templates/artefacts/OR.md +20 -4
  27. package/generated/plugins/agdf/meta/agdf-agent-router.md +4 -0
  28. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
  29. package/generated/plugins/agdf/meta/agdf-runtime-contract.md +132 -0
  30. package/generated/plugins/agdf/skills/gate-check/SKILL.md +7 -0
  31. package/generated/plugins/agdf/skills/release-or/SKILL.md +2 -0
  32. package/opencode-plugin.js +16 -2
  33. package/package.json +1 -1
package/README.md CHANGED
@@ -8,7 +8,9 @@ Preferred long-term CLI shape:
8
8
 
9
9
  ```bash
10
10
  npx --yes @agdf/cli@latest codex
11
- npx --yes @agdf/cli@latest opencode
11
+ npx --yes @agdf/cli@latest codex-repo
12
+ npx --yes @agdf/cli@latest claude
13
+ npx --yes @agdf/cli@latest opencode-repo
12
14
  npx --yes @agdf/cli@latest init
13
15
  npx --yes @agdf/cli@latest config --language en
14
16
  npx --yes @agdf/cli@latest doctor
@@ -19,8 +21,10 @@ Backward-compatible scaffold usage:
19
21
 
20
22
  ```bash
21
23
  npm create agdf@latest -- codex
24
+ npm create agdf@latest -- codex-repo
25
+ npm create agdf@latest -- claude
22
26
  npm create agdf@latest -- copilot
23
- npm create agdf@latest -- opencode
27
+ npm create agdf@latest -- opencode-repo
24
28
  npm create agdf@latest -- both
25
29
  npm create agdf@latest -- init
26
30
  npm create agdf@latest -- config --language en
@@ -38,27 +42,37 @@ If no language is provided, `create-agdf` derives the preference from the local
38
42
 
39
43
  ## Targets and existing AGENTS.md
40
44
 
41
- - `codex` writes a repository-local Codex marketplace under `.agents/plugins/` and a local AGDF plugin copy under `plugins/agdf/`
45
+ - `codex` installs the AGDF plugin globally for Codex
46
+ - `codex-repo` writes a repository-local Codex marketplace under `.agents/plugins/` and a local AGDF plugin copy under `plugins/agdf/`
47
+ - `claude` installs the AGDF plugin globally for Claude Code
42
48
  - `copilot` writes `AGENTS.md`, Copilot custom instructions under `.github/`, visible repository skills under `.github/skills/`, and AGDF control templates under `.agdf/control/`
43
- - `opencode` writes `opencode.json`, `.opencode/AGDF.md`, prefixed OpenCode agents under `.opencode/agents/`, explicit edit/bash permissions, and AGDF control templates under `.agdf/control/`
49
+ - `opencode` installs the AGDF npm plugin as a user-wide OpenCode hook
50
+ - `opencode-repo` writes `opencode.json`, `.opencode/AGDF.md`, prefixed OpenCode agents under `.opencode/agents/`, explicit edit/bash permissions, and AGDF control templates under `.agdf/control/`
44
51
  - `both` writes the Codex repository-local marketplace plus the Copilot-facing repository files
45
52
  - `config` writes or updates only `.agdf/control/config.json` for an already installed plugin or an existing repository
46
53
 
47
54
  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.
48
55
 
49
- Use the `codex` target when AGDF should be available only inside one repository instead of being installed as a personal/global Codex plugin.
56
+ Use the `codex-repo` target when AGDF should be available only inside one repository instead of being installed as a personal/global Codex plugin.
57
+
58
+ After `npm create agdf@latest -- codex-repo`, restart Codex in that repository, open `/plugins`, select `This repository` and install `agdf`.
50
59
 
51
- After `npm create agdf@latest -- codex`, restart Codex in that repository, open `/plugins`, select `This repository` and install `agdf`.
60
+ Use the `opencode` target to install the AGDF npm plugin as a user-wide OpenCode hook:
61
+
62
+ ```bash
63
+ npx --yes @agdf/cli@latest opencode
64
+ ```
52
65
 
53
- Use the `opencode` target when AGDF should be available to OpenCode from repository files:
66
+ Use the `opencode-repo` target when AGDF should be available to OpenCode from repository files:
54
67
 
55
68
  ```bash
56
- npm create agdf@latest -- opencode
69
+ npm create agdf@latest -- opencode-repo
57
70
  ```
58
71
 
59
- 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/`.
72
+ OpenCode loads the AGDF npm plugin from global OpenCode config or repository `opencode.json`, AGENTS-style rules from `.opencode/AGDF.md`, explicit `edit`/`bash` permissions and the `agdf-` prefixed agents under `.opencode/agents/`. AGDF for OpenCode has two layers: a global npm plugin hook installed with `npx --yes @agdf/cli@latest opencode` and a repository-local governance surface generated by the `opencode-repo` target.
73
+ Those generated agents use `mode: subagent` intentionally: they are internal governance-routing controls, not OpenCode Skills under `.opencode/skills/` and not primary menu agents. Use `@agdf-gate-check` as the visible entry point for new build/change intent or unclear approval.
60
74
  If `opencode.json` already exists, AGDF keeps it unchanged and writes `opencode.agdf.json` as a merge fragment.
61
- 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.
75
+ Using OpenCode's plugin installer or global config for `create-agdf` can add the npm plugin hook, but AGDF still needs the repository instructions and agents. The `opencode-repo` target writes the repository files together.
62
76
 
63
77
  ## Control scaffold
64
78
 
@@ -93,6 +107,8 @@ This writes:
93
107
 
94
108
  `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.
95
109
 
110
+ For a normal fresh request, `init` is not the required first move. The agent-native path can draft the minimal UR in the response and ask for the exact approval text `Approval: UR`. Write or initialize `.agdf/control` only when durable repository-owned control state is explicitly wanted, already in use, or needed for deterministic setup/CI evidence. Before Brownfield Review, later gates or implementation, AGDF still requires the persisted or linked artefacts named by the Runtime Contract.
111
+
96
112
  For an existing repository where the plugin is already installed and only the language preference is missing or wrong, use the lighter config target:
97
113
 
98
114
  ```bash
@@ -117,7 +133,9 @@ npx --yes create-agdf@latest gate-check --json
117
133
 
118
134
  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
135
 
120
- Together, `init`, `doctor` and `gate-check --json` turn AGDF from an instruction layer into a repository control system when durable control state is needed. For normal fresh requests, the agent-native path can stay lighter: draft the minimal UR in the response, request `Approval: UR`, and use CLI validators only when machine-readable proof is useful.
136
+ `gate-check --json` and `delivery-map --json` also expose a `status_card` object. It is a compact projection of the current control state: current gate, allowed and forbidden actions, blocker, next skill, next permissible step and `quality_outlook`. `next_step` is process permission; `quality_outlook` is the next meaningful quality-improvement focus and does not unlock gates.
137
+
138
+ Together, `init`, `doctor` and `gate-check --json` turn AGDF from an instruction layer into a repository control system when durable control state is needed. For normal fresh requests, keep the path lighter: draft the minimal UR in the response, request `Approval: UR`, and use CLI validators only when machine-readable proof is useful.
121
139
 
122
140
  ## Single source of truth
123
141