create-agdf 0.8.9 → 0.9.1

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 (63) hide show
  1. package/README.md +4 -0
  2. package/bin/create-agdf.js +43 -2
  3. package/generated/.github/skills/agdf-brownfield-analysis/SKILL.md +6 -2
  4. package/generated/.github/skills/agdf-clean-implementation-review/SKILL.md +4 -1
  5. package/generated/.github/skills/agdf-code-review/SKILL.md +4 -1
  6. package/generated/.github/skills/agdf-delivery-closeout/SKILL.md +5 -1
  7. package/generated/.github/skills/agdf-delivery-path-search/SKILL.md +5 -1
  8. package/generated/.github/skills/agdf-gate-check/SKILL.md +8 -2
  9. package/generated/.github/skills/agdf-qa-gate/SKILL.md +6 -2
  10. package/generated/.github/skills/agdf-release-or/SKILL.md +7 -2
  11. package/generated/.github/skills/agdf-runtime-contract.md +11 -851
  12. package/generated/.github/skills/agdf-task-plan-review/SKILL.md +5 -1
  13. package/generated/.github/skills/contracts/closeout.md +29 -0
  14. package/generated/.github/skills/contracts/context-graph.md +48 -0
  15. package/generated/.github/skills/contracts/control-scaffold.md +109 -0
  16. package/generated/.github/skills/contracts/gate-transition.md +134 -0
  17. package/generated/.github/skills/contracts/interaction.md +370 -0
  18. package/generated/.github/skills/contracts/modes.md +91 -0
  19. package/generated/.github/skills/contracts/quality.md +100 -0
  20. package/generated/.opencode/AGDF.md +9 -1
  21. package/generated/.opencode/agdf-runtime-contract.md +11 -851
  22. package/generated/.opencode/contracts/closeout.md +29 -0
  23. package/generated/.opencode/contracts/context-graph.md +48 -0
  24. package/generated/.opencode/contracts/control-scaffold.md +109 -0
  25. package/generated/.opencode/contracts/gate-transition.md +134 -0
  26. package/generated/.opencode/contracts/interaction.md +370 -0
  27. package/generated/.opencode/contracts/modes.md +91 -0
  28. package/generated/.opencode/contracts/quality.md +100 -0
  29. package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +6 -2
  30. package/generated/.opencode/skills/agdf-clean-implementation-review/SKILL.md +4 -1
  31. package/generated/.opencode/skills/agdf-code-review/SKILL.md +4 -1
  32. package/generated/.opencode/skills/agdf-delivery-closeout/SKILL.md +5 -1
  33. package/generated/.opencode/skills/agdf-delivery-path-search/SKILL.md +5 -1
  34. package/generated/.opencode/skills/agdf-gate-check/SKILL.md +8 -2
  35. package/generated/.opencode/skills/agdf-qa-gate/SKILL.md +6 -2
  36. package/generated/.opencode/skills/agdf-release-or/SKILL.md +7 -2
  37. package/generated/.opencode/skills/agdf-task-plan-review/SKILL.md +5 -1
  38. package/generated/AGENTS.md +9 -1
  39. package/generated/plugins/agdf/.codex-plugin/plugin.json +4 -4
  40. package/generated/plugins/agdf/meta/agdf-agent-router.md +9 -1
  41. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +14 -8
  42. package/generated/plugins/agdf/meta/agdf-runtime-contract.md +11 -851
  43. package/generated/plugins/agdf/meta/contracts/closeout.md +29 -0
  44. package/generated/plugins/agdf/meta/contracts/context-graph.md +48 -0
  45. package/generated/plugins/agdf/meta/contracts/control-scaffold.md +109 -0
  46. package/generated/plugins/agdf/meta/contracts/gate-transition.md +134 -0
  47. package/generated/plugins/agdf/meta/contracts/interaction.md +370 -0
  48. package/generated/plugins/agdf/meta/contracts/modes.md +91 -0
  49. package/generated/plugins/agdf/meta/contracts/quality.md +100 -0
  50. package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +6 -2
  51. package/generated/plugins/agdf/skills/clean-implementation-review/SKILL.md +4 -1
  52. package/generated/plugins/agdf/skills/code-review/SKILL.md +4 -1
  53. package/generated/plugins/agdf/skills/delivery-closeout/SKILL.md +5 -1
  54. package/generated/plugins/agdf/skills/delivery-path-search/SKILL.md +5 -1
  55. package/generated/plugins/agdf/skills/gate-check/SKILL.md +8 -2
  56. package/generated/plugins/agdf/skills/qa-gate/SKILL.md +6 -2
  57. package/generated/plugins/agdf/skills/release-or/SKILL.md +7 -2
  58. package/generated/plugins/agdf/skills/task-plan-review/SKILL.md +5 -1
  59. package/lib/skill-evals/artefact-quality.js +36 -0
  60. package/lib/skill-evals/index.js +105 -0
  61. package/lib/skill-evals/live-recorder.js +108 -0
  62. package/lib/skill-evals/workspace.js +97 -0
  63. package/package.json +6 -2
package/README.md CHANGED
@@ -237,8 +237,12 @@ Non-sensitive feedback, examples and contributions are welcome through [GitHub I
237
237
 
238
238
  ```bash
239
239
  npm --prefix create-agdf run smoke-test
240
+ npm --prefix create-agdf run eval:skills
241
+ npm --prefix create-agdf run eval:skills:record -- --surface codex --case gate-check-normal
240
242
  ```
241
243
 
244
+ `eval:skills` is the credential-free deterministic CI lane. The recorder is an explicit supporting-evidence lane; it uses a disposable repository, records live provenance and refuses to persist a failing or mutation-violating result.
245
+
242
246
  The repository is licensed under [Apache-2.0](../LICENSE). No separate public `CONTRIBUTING.md`, `SECURITY.md` or private security-reporting channel is currently published. Do not treat a public issue as a private vulnerability disclosure.
243
247
 
244
248
  ## Publishing
@@ -91,6 +91,15 @@ const codexSkillNames = pluginDefinition.skillSet.map((skill) => `${pluginDefini
91
91
  const copilotSkillNames = pluginDefinition.skillSet.map((skill) => `${pluginDefinition.copilot.skillPrefix}${skill.slug}`);
92
92
  const openCodeSkillNames = pluginDefinition.skillSet.map((skill) => `${pluginDefinition.opencode.skillPrefix}${skill.slug}`);
93
93
  const globalOpenCodeSkillNames = pluginDefinition.skillSet.map((skill) => `${pluginDefinition.opencode.globalSkillPrefix}${skill.slug}`);
94
+ const contractModules = [
95
+ "gate-transition.md",
96
+ "interaction.md",
97
+ "modes.md",
98
+ "quality.md",
99
+ "context-graph.md",
100
+ "control-scaffold.md",
101
+ "closeout.md",
102
+ ];
94
103
  const globalOpenCodeSkillOwnershipMarker = "<!-- AGDF-GLOBAL-SKILL: ";
95
104
  const globalOpenCodeInstructionsOwnershipMarker = "<!-- AGDF-GLOBAL-INSTRUCTIONS -->";
96
105
  const globalOpenCodeRuntimeContractOwnershipMarker = "<!-- AGDF-GLOBAL-RUNTIME-CONTRACT -->";
@@ -119,6 +128,7 @@ const codexPluginFiles = [
119
128
  join("plugins", "agdf", "meta", "agdf-plugin.definition.json"),
120
129
  join("plugins", "agdf", "meta", "agdf-runtime-contract.md"),
121
130
  join("plugins", "agdf", "meta", "agdf-tenets.md"),
131
+ ...contractModules.map((moduleName) => join("plugins", "agdf", "meta", "contracts", moduleName)),
122
132
  ...codexSkillNames.map((skillName) => join("plugins", "agdf", "skills", skillName, "SKILL.md")),
123
133
  ];
124
134
  const controlFiles = [
@@ -184,12 +194,14 @@ const copilotInstructionFiles = [
184
194
  const copilotSkillFiles = [
185
195
  join(".github", "skills", "README.md"),
186
196
  join(".github", "skills", pluginDefinition.copilot.runtimeContractFileName),
197
+ ...contractModules.map((moduleName) => join(".github", "skills", "contracts", moduleName)),
187
198
  ...copilotSkillNames.map((skillName) => join(".github", "skills", skillName, "SKILL.md")),
188
199
  ];
189
200
  const openCodeFiles = [
190
201
  join(".opencode", pluginDefinition.opencode.instructionsFileName),
191
202
  join(".opencode", "README.md"),
192
203
  join(".opencode", pluginDefinition.opencode.runtimeContractFileName),
204
+ ...contractModules.map((moduleName) => join(".opencode", "contracts", moduleName)),
193
205
  ...openCodeSkillNames.map((skillName) => join(".opencode", "skills", skillName, "SKILL.md")),
194
206
  ];
195
207
 
@@ -582,6 +594,7 @@ function globalOpenCodeConfigPaths(configDir) {
582
594
  return {
583
595
  instructions: join(configDir, pluginDefinition.opencode.instructionsFileName),
584
596
  runtimeContract: join(configDir, pluginDefinition.opencode.runtimeContractFileName),
597
+ contracts: join(configDir, "contracts"),
585
598
  skills: join(configDir, "skills"),
586
599
  };
587
600
  }
@@ -605,6 +618,13 @@ function assertGlobalOpenCodeSurfaceWritable(configDir) {
605
618
  const paths = globalOpenCodeConfigPaths(configDir);
606
619
  assertGlobalOpenCodeFileWritable(paths.instructions, globalOpenCodeInstructionsOwnershipMarker, "first-line");
607
620
  assertGlobalOpenCodeFileWritable(paths.runtimeContract, globalOpenCodeRuntimeContractOwnershipMarker, "first-line");
621
+ for (const moduleName of contractModules) {
622
+ assertGlobalOpenCodeFileWritable(
623
+ join(paths.contracts, moduleName),
624
+ globalOpenCodeRuntimeContractOwnershipMarker,
625
+ "first-line",
626
+ );
627
+ }
608
628
  for (const skillName of globalOpenCodeSkillNames) {
609
629
  assertGlobalOpenCodeFileWritable(
610
630
  join(paths.skills, skillName, "SKILL.md"),
@@ -664,6 +684,15 @@ function installOpenCodeGlobalSurface(configDir) {
664
684
 
665
685
  writeOwnedGlobalOpenCodeFile(paths.instructions, globalInstructions, globalOpenCodeInstructionsOwnershipMarker, "first-line");
666
686
  writeOwnedGlobalOpenCodeFile(paths.runtimeContract, globalRuntimeContract, globalOpenCodeRuntimeContractOwnershipMarker, "first-line");
687
+ for (const moduleName of contractModules) {
688
+ const generatedModule = readFileSync(join(generatedOpenCodeRoot, "contracts", moduleName), "utf8");
689
+ writeOwnedGlobalOpenCodeFile(
690
+ join(paths.contracts, moduleName),
691
+ `${globalOpenCodeRuntimeContractOwnershipMarker}\n${generatedModule}`,
692
+ globalOpenCodeRuntimeContractOwnershipMarker,
693
+ "first-line",
694
+ );
695
+ }
667
696
 
668
697
  for (let index = 0; index < openCodeSkillNames.length; index += 1) {
669
698
  const sourceName = openCodeSkillNames[index];
@@ -678,6 +707,7 @@ function installOpenCodeGlobalSurface(configDir) {
678
707
  return {
679
708
  instructions: paths.instructions,
680
709
  runtimeContract: paths.runtimeContract,
710
+ contracts: paths.contracts,
681
711
  skills: paths.skills,
682
712
  };
683
713
  }
@@ -760,14 +790,21 @@ function openCodePackageTransition(previousPackage, installedPackage) {
760
790
  function evaluateGlobalOpenCodeSurface(configDir) {
761
791
  const paths = globalOpenCodeConfigPaths(configDir);
762
792
  const skillCount = globalOpenCodeSkillNames.filter((skillName) => existsSync(join(paths.skills, skillName, "SKILL.md"))).length;
793
+ const contractCount = contractModules.filter((moduleName) => existsSync(join(paths.contracts, moduleName))).length;
763
794
  return {
764
795
  path: paths.skills,
765
796
  instructions: paths.instructions,
766
797
  runtime_contract: paths.runtimeContract,
798
+ contracts: paths.contracts,
767
799
  expected_skill_count: globalOpenCodeSkillNames.length,
768
800
  skill_count: skillCount,
801
+ expected_contract_count: contractModules.length,
802
+ contract_count: contractCount,
769
803
  present: existsSync(paths.skills),
770
- complete: existsSync(paths.instructions) && existsSync(paths.runtimeContract) && skillCount === openCodeSkillNames.length,
804
+ complete: existsSync(paths.instructions)
805
+ && existsSync(paths.runtimeContract)
806
+ && contractCount === contractModules.length
807
+ && skillCount === openCodeSkillNames.length,
771
808
  };
772
809
  }
773
810
 
@@ -795,7 +832,11 @@ function evaluateOpenCodeStatus(targetDir, configDir = defaultOpenCodeConfigDir(
795
832
  if (!packageState.loadable) findings.push(`${pluginDefinition.opencode.npmPackage} is not loadable from the OpenCode config directory.`);
796
833
  if (packageVersionStatus === "outdated") findings.push(`${pluginDefinition.opencode.npmPackage} version ${packageState.installed_version} is outdated; expected ${pluginDefinition.version}.`);
797
834
  if (packageVersionStatus === "unknown" && packageState.loadable) findings.push(`${pluginDefinition.opencode.npmPackage} is loadable but its installed version is unknown.`);
798
- if (!globalNativeSurface.complete) findings.push(`Global OpenCode native skill surface is incomplete (${globalNativeSurface.skill_count}/${globalNativeSurface.expected_skill_count} skills).`);
835
+ if (!globalNativeSurface.complete) {
836
+ findings.push(
837
+ `Global OpenCode native surface is incomplete (${globalNativeSurface.skill_count}/${globalNativeSurface.expected_skill_count} skills; ${globalNativeSurface.contract_count}/${globalNativeSurface.expected_contract_count} contract modules).`,
838
+ );
839
+ }
799
840
  if (!sessionSignals.active) findings.push("No active AGDF OpenCode session signal is visible in this process.");
800
841
  if (!repositorySurface) findings.push("Current repository does not contain the AGDF OpenCode surface.");
801
842
 
@@ -19,7 +19,11 @@ The skill answers:
19
19
  - whether Context Graph impact exists without automatically creating a node
20
20
 
21
21
  ## Runtime Contract
22
- Use `../agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
22
+ Use these focused runtime-contract modules:
23
+
24
+ - `../contracts/gate-transition.md`
25
+ - `../contracts/context-graph.md`
26
+ - `../contracts/quality.md`
23
27
 
24
28
  Brownfield-specific output must make evidence, missing existing-system view, parallel-structure risk, reuse strategy, and the minimal next step visible.
25
29
  When `.agdf/control/` is present, persist or link `post_ur_review` output under `.agdf/control/artefacts/<key>/BROWNFIELD_REVIEW.md`.
@@ -96,7 +100,7 @@ When used as Brownfield Review after `Approval: UR`, do not recommend PRD, SD, T
96
100
  7. Check SoT/runtime/product-semantics drift.
97
101
  8. Check primary visible ownership for UI/status/recovery paths.
98
102
  9. Check UI monolith risk for large surfaces or central hooks.
99
- 10. Check Context Graph impact according to `../agdf-runtime-contract.md`.
103
+ 10. Check Context Graph impact according to `../contracts/context-graph.md`.
100
104
  11. Recommend the minimal clean implementation path.
101
105
 
102
106
  ## Output
@@ -18,7 +18,10 @@ This skill answers:
18
18
  - is it maintainable or workaround-heavy
19
19
 
20
20
  ## Runtime Contract
21
- Use `../agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
21
+ Use these focused runtime-contract modules:
22
+
23
+ - `../contracts/quality.md`
24
+ - `../contracts/context-graph.md`
22
25
 
23
26
  Clean-review-specific output must make the primary solution, fallbacks, workarounds, parallel structures, exit criteria, and next cleanup/review step visible.
24
27
 
@@ -17,7 +17,10 @@ It answers:
17
17
  - whether Brownfield, TP, or clean-review follow-up remains open
18
18
 
19
19
  ## Runtime Contract
20
- Use `../agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
20
+ Use these focused runtime-contract modules:
21
+
22
+ - `../contracts/quality.md`
23
+ - `../contracts/context-graph.md`
21
24
 
22
25
  Code-review-specific output must make actual findings, missing review scope, evidence strength, and the next required step visible.
23
26
 
@@ -20,7 +20,11 @@ It answers:
20
20
  This skill does not replace `agdf-qa-gate`, `agdf-release-or`, user approvals, or gate decisions.
21
21
 
22
22
  ## Runtime Contract
23
- Use `../agdf-runtime-contract.md` for closeout discipline, gate terms, Context Graph fields, and non-duplication rules.
23
+ Use these focused runtime-contract modules:
24
+
25
+ - `../contracts/closeout.md`
26
+ - `../contracts/context-graph.md`
27
+ - `../contracts/gate-transition.md`
24
28
 
25
29
  ## Rules
26
30
  1. Delivery follows gate clarity.
@@ -13,7 +13,11 @@ The search is advisory and read-only. Canonical AGDF `agdf-gate-check` remains t
13
13
 
14
14
  ## Runtime Contract
15
15
 
16
- Use `../agdf-runtime-contract.md` for canonical gate state, output discipline and Delivery Path Search boundaries. This skill must not maintain a second gate or scoring model.
16
+ Use these focused runtime-contract modules:
17
+
18
+ - `../contracts/control-scaffold.md`
19
+ - `../contracts/gate-transition.md`
20
+ - `../contracts/quality.md`
17
21
 
18
22
  ## Trigger
19
23
 
@@ -18,8 +18,14 @@ Determine the earliest blocking user approval gate and derive:
18
18
  This skill must not create later artefacts such as PRD, SD, TP, CD, CR, QA, or UAT when the gate does not allow them.
19
19
 
20
20
  ## Runtime Contract
21
- Use `../agdf-runtime-contract.md` for gate terms, closeout discipline, and non-duplication rules.
22
- The canonical gate order and transition model live only in the Runtime Contract. This skill evaluates the current state against that model; it must not maintain a second complete gate table.
21
+ Use these focused runtime-contract modules:
22
+
23
+ - `../contracts/gate-transition.md`
24
+ - `../contracts/interaction.md`
25
+ - `../contracts/control-scaffold.md`
26
+ - `../contracts/modes.md`
27
+ - `../contracts/quality.md`
28
+ The canonical gate order and transition model live only in `../contracts/gate-transition.md`. This skill evaluates the current state against that model; it must not maintain a second complete gate table.
23
29
 
24
30
  ## Agent-Native Control Path
25
31
 
@@ -22,7 +22,11 @@ It answers:
22
22
  - whether blockers, critical risks, or missing evidence remain
23
23
 
24
24
  ## Runtime Contract
25
- Use `../agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
25
+ Use these focused runtime-contract modules:
26
+
27
+ - `../contracts/quality.md`
28
+ - `../contracts/context-graph.md`
29
+ - `../contracts/gate-transition.md`
26
30
 
27
31
  QA-specific `decision` is exactly `pass | revise | block`.
28
32
  `pass` is allowed only when TP coverage, Brownfield fit, solution integrity, and relevant documentation/Context Graph impact are sufficiently evidenced.
@@ -100,7 +104,7 @@ Use this shape:
100
104
  - impact_codes:
101
105
  ```
102
106
 
103
- If Context Graph impact is relevant, include the fields from `../agdf-runtime-contract.md`.
107
+ If Context Graph impact is relevant, include the fields from `../contracts/context-graph.md`.
104
108
 
105
109
  ### Compact Chat Output
106
110
 
@@ -25,7 +25,12 @@ It reports:
25
25
  - whether further quality follow-up or a separate delivery closeout is useful
26
26
 
27
27
  ## Runtime Contract
28
- Use `../agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
28
+ Use these focused runtime-contract modules:
29
+
30
+ - `../contracts/closeout.md`
31
+ - `../contracts/quality.md`
32
+ - `../contracts/context-graph.md`
33
+ - `../contracts/control-scaffold.md`
29
34
 
30
35
  OR-specific output must make gate status, delivered and intentionally not delivered content, missing approvals, missing evidence, risks, retained fallbacks, and the next permissible step visible.
31
36
  When `.agdf/control/` is present, persist or link the OR under `.agdf/control/artefacts/<key>/OR.md` and reference it from the selected canonical `RUN_STATE.md` or `MASTER_BACKLOG.md` when it is steering-relevant.
@@ -118,7 +123,7 @@ Use a compact structure:
118
123
  - quality_outlook:
119
124
  ```
120
125
 
121
- When Context Graph impact is relevant, include the fields from `../agdf-runtime-contract.md`.
126
+ When Context Graph impact is relevant, include the fields from `../contracts/context-graph.md`.
122
127
  Include `context_graph_reconciliation` whenever Context Graph impact is present. If the value is `open_gap`, required next step must resolve or explicitly retain that gap before commit-ready or release-ready handoff.
123
128
 
124
129
  ## Forbidden