create-agdf 0.1.4 → 0.1.5
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 +4 -4
- package/bin/create-agdf.js +16 -1
- package/generated/.agents/plugins/marketplace.json +4 -1
- package/generated/.github/copilot-instructions.md +10 -0
- package/generated/.github/instructions/agdf-governance.instructions.md +13 -0
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/hooks/hooks.json +15 -0
- package/generated/plugins/agdf/hooks/session-start.sh +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,14 +18,14 @@ Optional flags:
|
|
|
18
18
|
## Targets and existing AGENTS.md
|
|
19
19
|
|
|
20
20
|
- `codex` writes a repository-local Codex marketplace under `.agents/plugins/` and a local AGDF plugin copy under `plugins/agdf/`
|
|
21
|
-
- `copilot` writes `AGENTS.md`, visible repository skills under `.github/skills/`, and AGDF control templates under `.agdf/control/`
|
|
22
|
-
- `both` writes the Codex
|
|
21
|
+
- `copilot` writes `AGENTS.md`, Copilot custom instructions under `.github/`, visible repository skills under `.github/skills/`, and AGDF control templates under `.agdf/control/`
|
|
22
|
+
- `both` writes the Codex repository-local marketplace plus the Copilot-facing repository files
|
|
23
23
|
|
|
24
|
-
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. Use `--force` only when you explicitly want to overwrite generated files.
|
|
24
|
+
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.
|
|
25
25
|
|
|
26
26
|
Use the `codex` target when AGDF should be available only inside one repository instead of being installed as a personal/global Codex plugin.
|
|
27
27
|
|
|
28
|
-
After `npm create agdf@latest codex`, restart Codex in that repository, open `/plugins`, select
|
|
28
|
+
After `npm create agdf@latest codex`, restart Codex in that repository, open `/plugins`, select `This repository` and install `agdf`.
|
|
29
29
|
|
|
30
30
|
## Control scaffold
|
|
31
31
|
|
package/bin/create-agdf.js
CHANGED
|
@@ -20,7 +20,11 @@ const codexPluginFiles = [
|
|
|
20
20
|
join("plugins", "agdf", "control", "templates", "SOT_REGISTRY.md"),
|
|
21
21
|
join("plugins", "agdf", "control", "templates", "CONTEXT_GRAPH.md"),
|
|
22
22
|
join("plugins", "agdf", "control", "templates", "AGENT_QUALITY_CONTRACTS.json"),
|
|
23
|
+
join("plugins", "agdf", "hooks", "hooks.json"),
|
|
24
|
+
join("plugins", "agdf", "hooks", "session-start.sh"),
|
|
25
|
+
join("plugins", "agdf", "meta", "agdf-constitution.md"),
|
|
23
26
|
join("plugins", "agdf", "meta", "agdf-runtime-contract.md"),
|
|
27
|
+
join("plugins", "agdf", "meta", "agdf-tenets.md"),
|
|
24
28
|
join("plugins", "agdf", "skills", "agdf-gate-check", "SKILL.md"),
|
|
25
29
|
join("plugins", "agdf", "skills", "agdf-brownfield-analysis", "SKILL.md"),
|
|
26
30
|
join("plugins", "agdf", "skills", "agdf-task-plan-review", "SKILL.md"),
|
|
@@ -38,6 +42,10 @@ const controlFiles = [
|
|
|
38
42
|
join(".agdf", "control", "templates", "CONTEXT_GRAPH.md"),
|
|
39
43
|
join(".agdf", "control", "templates", "AGENT_QUALITY_CONTRACTS.json"),
|
|
40
44
|
];
|
|
45
|
+
const copilotInstructionFiles = [
|
|
46
|
+
join(".github", "copilot-instructions.md"),
|
|
47
|
+
join(".github", "instructions", "agdf-governance.instructions.md"),
|
|
48
|
+
];
|
|
41
49
|
const copilotSkillFiles = [
|
|
42
50
|
join(".github", "skills", "README.md"),
|
|
43
51
|
join(".github", "skills", "agdf-runtime-contract.md"),
|
|
@@ -171,6 +179,13 @@ function generatedFilesForTarget(target, targetDir, force) {
|
|
|
171
179
|
});
|
|
172
180
|
}
|
|
173
181
|
|
|
182
|
+
for (const instructionPath of copilotInstructionFiles) {
|
|
183
|
+
files.push({
|
|
184
|
+
path: instructionPath,
|
|
185
|
+
content: loadAsset(instructionPath),
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
174
189
|
for (const skillPath of copilotSkillFiles) {
|
|
175
190
|
files.push({
|
|
176
191
|
path: skillPath,
|
|
@@ -197,7 +212,7 @@ function printNextSteps(target, destination, files, wroteAgentsFragment) {
|
|
|
197
212
|
console.log(`- Existing AGENTS.md detected. Merge ${agdfFragmentPath} into your current AGENTS.md before using Copilot with AGDF.`);
|
|
198
213
|
}
|
|
199
214
|
if (target === "codex" || target === "both") {
|
|
200
|
-
console.log("- Restart Codex in this repository, open /plugins, select
|
|
215
|
+
console.log("- Restart Codex in this repository, open /plugins, select This repository and install agdf.");
|
|
201
216
|
console.log("- Start a new Codex thread in this repository and ask: Run an AGDF gate check for this request.");
|
|
202
217
|
}
|
|
203
218
|
if (target === "both") {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# AGDF Copilot instructions
|
|
2
|
+
|
|
3
|
+
AGDF is active in this repository.
|
|
4
|
+
|
|
5
|
+
- Treat `AGENTS.md` as the primary repository instruction source.
|
|
6
|
+
- Use `.github/skills/` for AGDF task workflows instead of inventing parallel process rules.
|
|
7
|
+
- Use `.agdf/control/` for durable run state, backlog pointers, source-of-truth ownership, Context Graph knowledge and quality contracts.
|
|
8
|
+
- Before non-trivial implementation or formal delivery work, determine whether the request is a Quick Task or Structured Delivery.
|
|
9
|
+
- If approval, evidence, ownership or the next allowed action is unclear, run the AGDF gate-check workflow before creating later artefacts or code.
|
|
10
|
+
- Do not treat chat history as the source of truth for gate state, approvals, evidence or delivery status.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "AGENTS.md,AGENTS.agdf.md,.agdf/**,.github/skills/**,.github/copilot-instructions.md,.github/instructions/**"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# AGDF governance artefacts
|
|
6
|
+
|
|
7
|
+
These files are control artefacts, not general documentation.
|
|
8
|
+
|
|
9
|
+
- Keep AGDF rules sourced from `AGENTS.md`, `.github/skills/` and `.github/skills/agdf-runtime-contract.md`.
|
|
10
|
+
- Do not duplicate the full gate model, Quality Contract table or Context Graph relationship language in new files.
|
|
11
|
+
- Keep generated AGDF files small, reviewable and linked to the owning source of truth.
|
|
12
|
+
- Preserve the rule that missing approval, missing evidence or unclear ownership blocks later delivery steps.
|
|
13
|
+
- If changing AGDF bootstrap behaviour, update the generated files, smoke test and affected setup documentation together.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "bash -lc 'for hook in \"${CODEX_HOME:-$HOME/.codex}\"/plugins/cache/*/agdf/*/hooks/session-start.sh \"$PWD/plugins/agdf/hooks/session-start.sh\" \"$(dirname \"$0\")/session-start.sh\"; do [ -f \"$hook\" ] && exec bash \"$hook\"; done; exit 0'",
|
|
9
|
+
"statusMessage": "Loading AGDF..."
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# AGDF Session Start Hook
|
|
3
|
+
# Loads the AGDF constitution into the agent session.
|
|
4
|
+
|
|
5
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
6
|
+
CONSTITUTION="${SCRIPT_DIR}/../meta/agdf-constitution.md"
|
|
7
|
+
|
|
8
|
+
if [ -f "$CONSTITUTION" ]; then
|
|
9
|
+
cat "$CONSTITUTION"
|
|
10
|
+
fi
|