create-agdf 0.2.0 → 0.2.3

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 (28) hide show
  1. package/README.md +6 -0
  2. package/bin/create-agdf.js +168 -30
  3. package/generated/.agdf/control/README.md +13 -0
  4. package/generated/.agdf/control/templates/MASTER_BACKLOG.md +9 -5
  5. package/generated/.agdf/control/templates/artefacts/PRD.md +42 -0
  6. package/generated/.agdf/control/templates/artefacts/QA_REPORT.md +38 -0
  7. package/generated/.agdf/control/templates/artefacts/SD.md +42 -0
  8. package/generated/.agdf/control/templates/artefacts/TP.md +36 -0
  9. package/generated/.agdf/control/templates/artefacts/UR.md +41 -0
  10. package/generated/.github/skills/agdf-brownfield-analysis/SKILL.md +3 -1
  11. package/generated/.github/skills/agdf-gate-check/SKILL.md +29 -1
  12. package/generated/.github/skills/agdf-runtime-contract.md +8 -0
  13. package/generated/AGENTS.md +9 -2
  14. package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
  15. package/generated/plugins/agdf/control/README.md +13 -0
  16. package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +9 -5
  17. package/generated/plugins/agdf/control/templates/artefacts/PRD.md +42 -0
  18. package/generated/plugins/agdf/control/templates/artefacts/QA_REPORT.md +38 -0
  19. package/generated/plugins/agdf/control/templates/artefacts/SD.md +42 -0
  20. package/generated/plugins/agdf/control/templates/artefacts/TP.md +36 -0
  21. package/generated/plugins/agdf/control/templates/artefacts/UR.md +41 -0
  22. package/generated/plugins/agdf/meta/agdf-agent-router.md +9 -2
  23. package/generated/plugins/agdf/meta/agdf-constitution.md +9 -1
  24. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +4 -4
  25. package/generated/plugins/agdf/meta/agdf-runtime-contract.md +8 -0
  26. package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +3 -1
  27. package/generated/plugins/agdf/skills/gate-check/SKILL.md +29 -1
  28. package/package.json +1 -1
package/README.md CHANGED
@@ -36,6 +36,7 @@ The generated `.agdf/control/templates/` files are reusable starting points for
36
36
 
37
37
  - `AGDF_RUN.md` for the current run dashboard
38
38
  - `MASTER_BACKLOG.md` for active delivery pointers
39
+ - `templates/artefacts/` for durable UR, PRD, SD, TP and QA report artefact templates
39
40
  - `SOT_REGISTRY.md` for one source of truth per domain
40
41
  - `CONTEXT_GRAPH.md` for durable Brownfield findings, decisions, risks, evidence and exit criteria
41
42
  - `AGENT_QUALITY_CONTRACTS.json` for reusable block, revise and warning conditions
@@ -50,6 +51,11 @@ This writes:
50
51
 
51
52
  - `.agdf/control/AGDF_RUN.md`
52
53
  - `.agdf/control/MASTER_BACKLOG.md`
54
+ - `.agdf/control/templates/artefacts/UR.md`
55
+ - `.agdf/control/templates/artefacts/PRD.md`
56
+ - `.agdf/control/templates/artefacts/SD.md`
57
+ - `.agdf/control/templates/artefacts/TP.md`
58
+ - `.agdf/control/templates/artefacts/QA_REPORT.md`
53
59
  - `.agdf/control/SOT_REGISTRY.md`
54
60
  - `.agdf/control/CONTEXT_GRAPH.md`
55
61
  - `.agdf/control/AGENT_QUALITY_CONTRACTS.json`
@@ -14,6 +14,7 @@ const pluginInstallCommand = "claude plugin add arndtgold/ai-native-governance-d
14
14
  const allowedTargets = new Set(["codex", "copilot", "both", "init", "doctor", "gate-check"]);
15
15
  const agdfFragmentPath = "AGENTS.agdf.md";
16
16
  const userGateOrder = ["UR", "PRD", "SD", "TP", "QA", "UAT"];
17
+ const durableGateArtefacts = new Set(["UR", "PRD", "SD", "TP", "QA"]);
17
18
  const codexSkillNames = pluginDefinition.skillSet.map((skill) => `${pluginDefinition.codex.skillPrefix}${skill.slug}`);
18
19
  const copilotSkillNames = pluginDefinition.skillSet.map((skill) => `${pluginDefinition.copilot.skillPrefix}${skill.slug}`);
19
20
  const codexPluginFiles = [
@@ -25,6 +26,11 @@ const codexPluginFiles = [
25
26
  join("plugins", "agdf", "control", "templates", "SOT_REGISTRY.md"),
26
27
  join("plugins", "agdf", "control", "templates", "CONTEXT_GRAPH.md"),
27
28
  join("plugins", "agdf", "control", "templates", "AGENT_QUALITY_CONTRACTS.json"),
29
+ join("plugins", "agdf", "control", "templates", "artefacts", "UR.md"),
30
+ join("plugins", "agdf", "control", "templates", "artefacts", "PRD.md"),
31
+ join("plugins", "agdf", "control", "templates", "artefacts", "SD.md"),
32
+ join("plugins", "agdf", "control", "templates", "artefacts", "TP.md"),
33
+ join("plugins", "agdf", "control", "templates", "artefacts", "QA_REPORT.md"),
28
34
  join("plugins", "agdf", "hooks", "hooks.json"),
29
35
  join("plugins", "agdf", "hooks", "session-start.sh"),
30
36
  join("plugins", "agdf", "meta", "agdf-agent-router.md"),
@@ -41,6 +47,11 @@ const controlFiles = [
41
47
  join(".agdf", "control", "templates", "SOT_REGISTRY.md"),
42
48
  join(".agdf", "control", "templates", "CONTEXT_GRAPH.md"),
43
49
  join(".agdf", "control", "templates", "AGENT_QUALITY_CONTRACTS.json"),
50
+ join(".agdf", "control", "templates", "artefacts", "UR.md"),
51
+ join(".agdf", "control", "templates", "artefacts", "PRD.md"),
52
+ join(".agdf", "control", "templates", "artefacts", "SD.md"),
53
+ join(".agdf", "control", "templates", "artefacts", "TP.md"),
54
+ join(".agdf", "control", "templates", "artefacts", "QA_REPORT.md"),
44
55
  ];
45
56
  const liveControlFiles = [
46
57
  {
@@ -64,6 +75,13 @@ const liveControlFiles = [
64
75
  source: join(".agdf", "control", "templates", "AGENT_QUALITY_CONTRACTS.json"),
65
76
  },
66
77
  ];
78
+ const artefactTemplateFiles = [
79
+ join(".agdf", "control", "templates", "artefacts", "UR.md"),
80
+ join(".agdf", "control", "templates", "artefacts", "PRD.md"),
81
+ join(".agdf", "control", "templates", "artefacts", "SD.md"),
82
+ join(".agdf", "control", "templates", "artefacts", "TP.md"),
83
+ join(".agdf", "control", "templates", "artefacts", "QA_REPORT.md"),
84
+ ];
67
85
  const doctorRequiredFiles = [
68
86
  join(".agdf", "control", "AGDF_RUN.md"),
69
87
  join(".agdf", "control", "MASTER_BACKLOG.md"),
@@ -202,6 +220,13 @@ function generatedFilesForTarget(target, targetDir, force) {
202
220
  });
203
221
  }
204
222
 
223
+ for (const templatePath of artefactTemplateFiles) {
224
+ files.push({
225
+ path: templatePath,
226
+ content: loadAsset(templatePath),
227
+ });
228
+ }
229
+
205
230
  return files;
206
231
  }
207
232
 
@@ -528,6 +553,17 @@ function cleanStatusCell(value) {
528
553
  return value.replace(/^`|`$/g, "").trim();
529
554
  }
530
555
 
556
+ function addApprovalRows(approvals, section) {
557
+ for (const cells of tableRows(section)) {
558
+ const [gate, status, evidence] = cells;
559
+ if (!userGateOrder.includes(gate)) continue;
560
+ approvals.set(gate, {
561
+ status: cleanStatusCell(status ?? ""),
562
+ evidence: evidence ?? "",
563
+ });
564
+ }
565
+ }
566
+
531
567
  function readRunState(targetDir) {
532
568
  const runPath = join(".agdf", "control", "AGDF_RUN.md");
533
569
  if (!existsSync(join(targetDir, runPath))) {
@@ -537,19 +573,25 @@ function readRunState(targetDir) {
537
573
  current_gate: "",
538
574
  next_allowed_action: "",
539
575
  approvals: new Map(),
576
+ artefacts: new Map(),
540
577
  evidence_refs: [],
541
578
  };
542
579
  }
543
580
 
544
581
  const content = readTargetFile(targetDir, runPath);
545
- const approvalsSection = content.match(/## Approvals([\s\S]*?)(?:\n## |\n# |$)/)?.[1] ?? "";
546
582
  const approvals = new Map();
547
- for (const cells of tableRows(approvalsSection)) {
548
- const [gate, status, evidence] = cells;
549
- if (!userGateOrder.includes(gate)) continue;
550
- approvals.set(gate, {
583
+ addApprovalRows(approvals, content.match(/## Approvals([\s\S]*?)(?:\n## |\n# |$)/)?.[1] ?? "");
584
+ addApprovalRows(approvals, content.match(/## Gate Checklist([\s\S]*?)(?:\n## |\n# |$)/)?.[1] ?? "");
585
+
586
+ const artefacts = new Map();
587
+ const artefactsSection = content.match(/## Artefacts([\s\S]*?)(?:\n## |\n# |$)/)?.[1] ?? "";
588
+ for (const cells of tableRows(artefactsSection)) {
589
+ const [type, path, status, notes] = cells;
590
+ if (!userGateOrder.includes(type)) continue;
591
+ artefacts.set(type, {
592
+ path: path ?? "",
551
593
  status: cleanStatusCell(status ?? ""),
552
- evidence: evidence ?? "",
594
+ notes: notes ?? "",
553
595
  });
554
596
  }
555
597
 
@@ -570,6 +612,7 @@ function readRunState(targetDir) {
570
612
  current_gate: extractField(content, "current_gate"),
571
613
  next_allowed_action: extractField(content, "next_allowed_action"),
572
614
  approvals,
615
+ artefacts,
573
616
  evidence_refs,
574
617
  };
575
618
  }
@@ -593,29 +636,131 @@ function gateApprovalStatus(runState, gate) {
593
636
  return runState.approvals.get(gate)?.status ?? "";
594
637
  }
595
638
 
639
+ function gateArtefactStatus(runState, gate) {
640
+ if (!userGateOrder.includes(gate)) return { status: "not_applicable", path: "" };
641
+ return runState.artefacts.get(gate) ?? { status: "", path: "" };
642
+ }
643
+
644
+ function isDurableGateArtefactSatisfied(runState, gate) {
645
+ if (!durableGateArtefacts.has(gate)) return true;
646
+ const artefact = gateArtefactStatus(runState, gate);
647
+ if (!artefact.path || isPlaceholderValue(artefact.path)) return false;
648
+ if (gate === "QA") return artefact.status === "pass";
649
+ return artefact.status === "approved";
650
+ }
651
+
652
+ function durableArtefactBlock(gate, nextGate) {
653
+ const label = gate === "QA" ? "QA report" : `${gate} artefact`;
654
+ const stablePath = gate === "QA" ? ".agdf/control/artefacts/<key>/QA_REPORT.md" : `.agdf/control/artefacts/<key>/${gate}.md`;
655
+ return {
656
+ status: "blocked",
657
+ current_gate: gate,
658
+ blocking_reason: `missing_durable_${gate.toLowerCase()}_artefact`,
659
+ missing_approval: "none",
660
+ allowed: [
661
+ `persist the approved ${label} in a stable artefact path such as ${stablePath}`,
662
+ "link the artefact from AGDF_RUN.md and MASTER_BACKLOG.md",
663
+ "run gate-check again",
664
+ ],
665
+ forbidden: nextGate
666
+ ? [`create ${nextGate}`, "create later-gate artefacts", "implement gated work", "claim QA or release readiness"]
667
+ : ["create later-gate artefacts", "implement gated work", "claim release readiness"],
668
+ next_allowed_action: `Persist the approved ${label} and link it from the AGDF control state before continuing.`,
669
+ };
670
+ }
671
+
672
+ function isGateSatisfied(runState, gate) {
673
+ const status = gateApprovalStatus(runState, gate);
674
+ if (status === "not_applicable") return true;
675
+ if (status !== "approved") return false;
676
+ return isDurableGateArtefactSatisfied(runState, gate);
677
+ }
678
+
679
+ function transitionDecisionForRunState(runState) {
680
+ if (gateApprovalStatus(runState, "UR") === "approved" && !isGateSatisfied(runState, "UR")) return durableArtefactBlock("UR", "PRD");
681
+
682
+ if (!isGateSatisfied(runState, "UR")) {
683
+ return {
684
+ status: "blocked",
685
+ current_gate: "UR",
686
+ blocking_reason: "missing_exact_approval",
687
+ missing_approval: "Approval: UR",
688
+ allowed: ["clarify user need", "formulate and persist UR", "record evidence", "request exact UR approval"],
689
+ forbidden: ["create PRD", "create SD", "create TP", "run Brownfield Analysis", "implement code", "claim QA or release readiness"],
690
+ next_allowed_action: "Clarify the user requirement, persist the UR, and request exact approval: Approval: UR",
691
+ };
692
+ }
693
+
694
+ if (gateApprovalStatus(runState, "PRD") === "approved" && !isGateSatisfied(runState, "PRD")) return durableArtefactBlock("PRD", "SD");
695
+
696
+ if (!isGateSatisfied(runState, "PRD")) {
697
+ return {
698
+ status: "open",
699
+ current_gate: "PRD",
700
+ blocking_reason: "none",
701
+ missing_approval: "Approval: PRD",
702
+ allowed: ["draft or refine PRD", "define scope", "define acceptance criteria", "define non-goals", "request exact PRD approval"],
703
+ forbidden: ["create SD", "create TP", "run Brownfield Analysis as implementation preparation", "implement code", "claim QA or release readiness"],
704
+ next_allowed_action: "Draft or refine the PRD; do not implement before PRD, SD and TP are approved.",
705
+ };
706
+ }
707
+
708
+ if (gateApprovalStatus(runState, "SD") === "approved" && !isGateSatisfied(runState, "SD")) return durableArtefactBlock("SD", "TP");
709
+
710
+ if (!isGateSatisfied(runState, "SD")) {
711
+ return {
712
+ status: "open",
713
+ current_gate: "SD",
714
+ blocking_reason: "none",
715
+ missing_approval: "Approval: SD",
716
+ allowed: ["draft or refine Solution Design", "define architecture", "define ownership", "request exact SD approval"],
717
+ forbidden: ["create TP", "implement code", "claim QA or release readiness"],
718
+ next_allowed_action: "Draft or refine the Solution Design; do not implement before SD and TP are approved.",
719
+ };
720
+ }
721
+
722
+ if (gateApprovalStatus(runState, "TP") === "approved" && !isGateSatisfied(runState, "TP")) return durableArtefactBlock("TP", "Brownfield Analysis");
723
+
724
+ if (!isGateSatisfied(runState, "TP")) {
725
+ return {
726
+ status: "open",
727
+ current_gate: "TP",
728
+ blocking_reason: "none",
729
+ missing_approval: "Approval: TP",
730
+ allowed: ["draft or refine Task/Test Plan", "define task IDs", "define test evidence", "request exact TP approval"],
731
+ forbidden: ["implement code", "claim QA or release readiness"],
732
+ next_allowed_action: "Draft or refine the Task/Test Plan; do not implement before TP is approved.",
733
+ };
734
+ }
735
+
736
+ if (gateApprovalStatus(runState, "QA") === "approved" && !isGateSatisfied(runState, "QA")) return durableArtefactBlock("QA", "UAT");
737
+
738
+ return {
739
+ status: "open",
740
+ current_gate: "Brownfield Analysis",
741
+ blocking_reason: "none",
742
+ missing_approval: "none",
743
+ allowed: ["run Brownfield Analysis for the approved TP scope", "verify existing owners, reuse paths and regression risks"],
744
+ forbidden: ["implement before Brownfield evidence supports the approved TP path", "claim QA or release readiness"],
745
+ next_allowed_action: "Run Brownfield Analysis for the approved TP scope before CD+Tests.",
746
+ };
747
+ }
748
+
596
749
  function evaluateGateCheck(targetDir) {
597
750
  const doctorReport = evaluateDoctor(targetDir);
598
751
  const runState = readRunState(targetDir);
599
- const fallbackGate = firstUnapprovedGate(runState.approvals);
600
- const currentGate = normalizeCurrentGate(runState.current_gate, fallbackGate);
601
- const currentApprovalStatus = gateApprovalStatus(runState, currentGate);
752
+ const transitionDecision = transitionDecisionForRunState(runState);
602
753
  const doctorBlocker = doctorReport.findings.find((finding) => finding.severity === "block");
603
754
  const doctorRevise = doctorReport.findings.find((finding) => finding.severity === "revise");
604
755
 
605
- let status = "open";
606
- let blockingReason = "none";
607
- let missingApproval = "none";
608
- let allowed = [
609
- "continue with the documented next allowed action",
610
- "update evidence when new facts are observed",
611
- "run doctor or gate-check again after control changes",
612
- ];
613
- let forbidden = [
614
- "bypass the documented gate state",
615
- "treat warnings as resolved without evidence",
616
- ];
756
+ let status = transitionDecision.status;
757
+ let currentGate = transitionDecision.current_gate;
758
+ let blockingReason = transitionDecision.blocking_reason;
759
+ let missingApproval = transitionDecision.missing_approval;
760
+ let allowed = transitionDecision.allowed;
761
+ let forbidden = transitionDecision.forbidden;
617
762
  let nextAllowedAction = isPlaceholderValue(runState.next_allowed_action)
618
- ? "Continue with the current documented gate only after setting next_allowed_action."
763
+ ? transitionDecision.next_allowed_action
619
764
  : runState.next_allowed_action;
620
765
 
621
766
  if (doctorBlocker) {
@@ -627,16 +772,9 @@ function evaluateGateCheck(targetDir) {
627
772
  } else if (doctorRevise) {
628
773
  status = "blocked";
629
774
  blockingReason = doctorRevise.code;
630
- allowed = ["repair the incomplete control state", "run doctor again"];
775
+ allowed = [...new Set(["repair the incomplete control state", ...transitionDecision.allowed, "run doctor again"])];
631
776
  forbidden = ["continue governed delivery", "create later-gate artefacts", "implement gated work"];
632
777
  nextAllowedAction = doctorRevise.next_step;
633
- } else if (userGateOrder.includes(currentGate) && currentApprovalStatus !== "approved" && currentApprovalStatus !== "not_applicable") {
634
- status = "blocked";
635
- blockingReason = "missing_exact_approval";
636
- missingApproval = `Approval: ${currentGate}`;
637
- allowed = ["clarify the current gate", "record evidence", "write OR-lite status", "request exact approval"];
638
- forbidden = ["create later-gate artefacts", "implement gated work", "mark QA or UAT as passed"];
639
- nextAllowedAction = `Request exact approval: Approval: ${currentGate}`;
640
778
  }
641
779
 
642
780
  return {
@@ -10,6 +10,11 @@ Use this scaffold when a target repository should keep AGDF state outside chat h
10
10
  |---|---|
11
11
  | `templates/AGDF_RUN.md` | Template for current run state: mode, gate, approvals, evidence, risks, next allowed action |
12
12
  | `templates/MASTER_BACKLOG.md` | Template for the living backlog pointer: active initiatives and current UR/PRD/SD/TP artefacts |
13
+ | `templates/artefacts/UR.md` | Template for the durable user requirement artefact of a work item |
14
+ | `templates/artefacts/PRD.md` | Template for the durable product requirements artefact |
15
+ | `templates/artefacts/SD.md` | Template for the durable solution design artefact |
16
+ | `templates/artefacts/TP.md` | Template for the durable task and test plan artefact |
17
+ | `templates/artefacts/QA_REPORT.md` | Template for the durable QA decision report |
13
18
  | `templates/SOT_REGISTRY.md` | Template for the source-of-truth registry: one primary owner per domain |
14
19
  | `templates/CONTEXT_GRAPH.md` | Template for project memory: durable decisions, Brownfield findings, risks, evidence and exit criteria |
15
20
  | `templates/AGENT_QUALITY_CONTRACTS.json` | Template for machine-readable warning, revise and block contracts for review and QA |
@@ -21,6 +26,13 @@ Use this scaffold when a target repository should keep AGDF state outside chat h
21
26
  control/
22
27
  AGDF_RUN.md
23
28
  MASTER_BACKLOG.md
29
+ artefacts/
30
+ <work-item>/
31
+ UR.md
32
+ PRD.md
33
+ SD.md
34
+ TP.md
35
+ QA_REPORT.md
24
36
  SOT_REGISTRY.md
25
37
  CONTEXT_GRAPH.md
26
38
  AGENT_QUALITY_CONTRACTS.json
@@ -49,6 +61,7 @@ npm create agdf@latest gate-check --json
49
61
 
50
62
  - `AGDF_RUN.md` is the current run dashboard.
51
63
  - `MASTER_BACKLOG.md` points to active delivery work; detailed artefacts live beside the work item.
64
+ - UR, PRD, SD, TP and QA decisions require durable artefacts or links to the authoritative repository source of truth before the next gate can open.
52
65
  - `SOT_REGISTRY.md` decides which document owns which domain.
53
66
  - `CONTEXT_GRAPH.md` records durable project knowledge only when it has evidence and an exit criterion.
54
67
  - `AGENT_QUALITY_CONTRACTS.json` names reusable block, revise and warning conditions.
@@ -4,11 +4,15 @@ This file is the living control pointer for active AGDF delivery work. Detailed
4
4
 
5
5
  ## Rules
6
6
 
7
- 1. Keep only steering-relevant work in `Active Backlog`.
8
- 2. Every active item has exactly one current spec pointer.
9
- 3. Historical artefacts remain linkable but do not override the current pointer.
10
- 4. If an item is superseded, mark the replacement.
11
- 5. If active work grows beyond roughly ten items, triage the backlog.
7
+ 1. New product semantics, functional change or user-visible behaviour change starts as a new UR draft in a stable local artefact path, for example `.agdf/control/artefacts/<key>/UR.md`, unless an authoritative repository SoT already exists and is linked here.
8
+ 2. `Approval: UR` adds or updates exactly one steering row with a link to the UR.
9
+ 3. PRD, SD, TP and QA report artefacts are created for the same work item after the previous gate is approved.
10
+ 4. `Approval: PRD`, `Approval: SD`, `Approval: TP` and `Approval: QA` require the corresponding durable artefact or linked repository SoT before the next gate can open.
11
+ 5. Keep only steering-relevant work in `Active Backlog`.
12
+ 6. Every active item has exactly one current spec pointer.
13
+ 7. Historical artefacts remain linkable but do not override the current pointer.
14
+ 8. If an item is superseded, mark the replacement.
15
+ 9. If active work grows beyond roughly ten items, triage the backlog.
12
16
 
13
17
  ## Active Backlog
14
18
 
@@ -0,0 +1,42 @@
1
+ # PRD: <Title>
2
+
3
+ Status: draft
4
+ Gate: PRD
5
+ Gate approval: open
6
+ Based on: UR
7
+ Date:
8
+ Owner:
9
+
10
+ ## 1. Product Scope
11
+
12
+ What exactly must be delivered?
13
+
14
+ ## 2. Acceptance Criteria
15
+
16
+ Which observable outcomes must be true?
17
+
18
+ ## 3. Non-Goals
19
+
20
+ What remains out of scope?
21
+
22
+ ## 4. Users And Roles
23
+
24
+ Who is affected and who decides?
25
+
26
+ ## 5. Constraints
27
+
28
+ Which business, operational, legal, security or compatibility constraints apply?
29
+
30
+ ## 6. Evidence Requirements
31
+
32
+ Which evidence must later support QA?
33
+
34
+ ## 7. Risks And Open Questions
35
+
36
+ Which questions must SD, TP or Brownfield Analysis clarify later?
37
+
38
+ ## 8. Next Step
39
+
40
+ Review this PRD and approve only with:
41
+
42
+ `Approval: PRD`
@@ -0,0 +1,38 @@
1
+ # QA Report: <Title>
2
+
3
+ Status: draft
4
+ Gate: QA
5
+ Gate approval: open
6
+ Based on: TP, implementation evidence, task-plan review
7
+ Date:
8
+ Owner:
9
+
10
+ ## 1. QA Decision
11
+
12
+ Decision: `pass | revise | block`
13
+
14
+ ## 2. TP Coverage
15
+
16
+ Which TP tasks are fully done, partially done or not done?
17
+
18
+ ## 3. Evidence
19
+
20
+ Which tests, logs, diffs, reviews or observations support the decision?
21
+
22
+ ## 4. Missing Evidence
23
+
24
+ What remains unverified?
25
+
26
+ ## 5. Risks
27
+
28
+ Which risks remain and what is their impact?
29
+
30
+ ## 6. Required Next Step
31
+
32
+ What is the next permitted action?
33
+
34
+ ## 7. Gate Approval
35
+
36
+ Approve this QA decision only with:
37
+
38
+ `Approval: QA`
@@ -0,0 +1,42 @@
1
+ # SD: <Title>
2
+
3
+ Status: draft
4
+ Gate: SD
5
+ Gate approval: open
6
+ Based on: PRD
7
+ Date:
8
+ Owner:
9
+
10
+ ## 1. Solution Overview
11
+
12
+ How will the approved PRD be solved?
13
+
14
+ ## 2. Ownership And Source Of Truth
15
+
16
+ Which existing modules, documents, services or owners remain authoritative?
17
+
18
+ ## 3. Architecture Decisions
19
+
20
+ Which design decisions are binding for implementation?
21
+
22
+ ## 4. Integration Points
23
+
24
+ Which APIs, data flows, UI surfaces, jobs, queues or external systems are affected?
25
+
26
+ ## 5. Constraints And Compatibility
27
+
28
+ Which constraints must implementation preserve?
29
+
30
+ ## 6. Test And Evidence Strategy
31
+
32
+ Which evidence must TP and QA later collect?
33
+
34
+ ## 7. Risks And Open Questions
35
+
36
+ Which risks remain before task planning?
37
+
38
+ ## 8. Next Step
39
+
40
+ Review this solution design and approve only with:
41
+
42
+ `Approval: SD`
@@ -0,0 +1,36 @@
1
+ # TP: <Title>
2
+
3
+ Status: draft
4
+ Gate: TP
5
+ Gate approval: open
6
+ Based on: SD
7
+ Date:
8
+ Owner:
9
+
10
+ ## 1. Task List
11
+
12
+ | task_id | Task | Acceptance mapping | Evidence required |
13
+ |---|---|---|---|
14
+ | T1 | | | |
15
+
16
+ ## 2. Test Plan
17
+
18
+ Which automated, manual or inspection checks must run?
19
+
20
+ ## 3. Brownfield Scope
21
+
22
+ Which existing owners, modules or artefacts must be inspected before implementation?
23
+
24
+ ## 4. Out Of Scope
25
+
26
+ Which implementation work is explicitly not part of this TP?
27
+
28
+ ## 5. Risks And Blockers
29
+
30
+ Which risks must block, revise or warn later QA?
31
+
32
+ ## 6. Next Step
33
+
34
+ Review this task and test plan and approve only with:
35
+
36
+ `Approval: TP`
@@ -0,0 +1,41 @@
1
+ # UR: <Title>
2
+
3
+ Status: draft
4
+ Gate: UR
5
+ Gate approval: open
6
+ Date:
7
+ Owner:
8
+
9
+ ## 1. Problem
10
+
11
+ What user, business or operational problem should be solved?
12
+
13
+ ## 2. Goal
14
+
15
+ What outcome should become possible?
16
+
17
+ ## 3. Scope
18
+
19
+ What is included in this first slice?
20
+
21
+ ## 4. Non-Goals
22
+
23
+ What is explicitly not part of this UR?
24
+
25
+ ## 5. Acceptance Signals
26
+
27
+ How will we know the need is clear enough for PRD?
28
+
29
+ ## 6. Existing Source Of Truth
30
+
31
+ Which existing repository artefacts, docs, code paths or decisions must be respected?
32
+
33
+ ## 7. Risks And Unknowns
34
+
35
+ Which questions must PRD, SD or Brownfield Analysis clarify later?
36
+
37
+ ## 8. Next Step
38
+
39
+ Review this UR and approve only with:
40
+
41
+ `Approval: UR`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: agdf-brownfield-analysis
3
- description: Use this skill before implementation in an existing codebase, especially for feature extensions, bug fixes, refactorings, or changes to existing modules. It analyzes existing artefacts, current coverage, reuse strategy, risks, and the minimal clean implementation path. Use it before CD+Tests.
3
+ description: Use this skill after gate-check or live AGDF control state confirms that implementation preparation is allowed, and before non-trivial implementation in an existing codebase. It analyzes existing artefacts, current coverage, reuse strategy, risks, and the minimal clean implementation path. Do not use it as the first AGDF skill for a fresh "I want to build/change X" prompt when approval, scope, or next allowed action is unclear.
4
4
  ---
5
5
 
6
6
  # brownfield-analysis
@@ -38,6 +38,7 @@ Brownfield-specific output must make evidence, missing existing-system view, par
38
38
  12. Specification archive migrations must follow the archive index if present.
39
39
 
40
40
  ## When To Use
41
+ - after `agdf-gate-check` permits implementation preparation or live `.agdf/control/AGDF_RUN.md` already names Brownfield Analysis as the next allowed action
41
42
  - before `CD+Tests`
42
43
  - before changes to an existing repository
43
44
  - bug fixes in existing modules
@@ -58,6 +59,7 @@ Use what is available:
58
59
  - repository conventions
59
60
 
60
61
  If inputs are missing, work only from observable evidence and mark gaps explicitly.
62
+ If gate status, approval, scope or next allowed action is unclear, stop and route to `agdf-gate-check` instead of recommending or starting implementation.
61
63
 
62
64
  ## Workflow
63
65
  1. Identify affected tasks and scope.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: agdf-gate-check
3
- description: Use this skill when the active gate is unclear, when a later-gate artefact is requested, when an exact approval may be missing, or when the next permissible step must be determined. Use it before creating formal artefacts in Structured Delivery and whenever implicit consent might be mistaken for approval.
3
+ description: Use this skill as the default first AGDF skill for any new build, change, extension, refactor, feature, CLI, app, fix with product semantics, Structured Delivery request, unclear approval, later-gate artefact request, or unclear next permissible step. Use it before brownfield-analysis, implementation, formal artefacts, QA, or release when approval/evidence/next action is not already explicit.
4
4
  ---
5
5
 
6
6
  # gate-check
@@ -43,6 +43,9 @@ The CLI report is evidence for this skill, not a second rule system. If the repo
43
43
  7. Internal process steps are not user approval gates.
44
44
  8. OR-lite is allowed if it does not leak blocked content.
45
45
  9. SoT/runtime/product-semantics drift can trigger an early product gate, usually `UR`.
46
+ 10. Approval of one user gate permits work on the next gate artefact only; it never skips directly to implementation.
47
+ 11. New product semantics, functional change or user-visible behaviour change requires a durable UR in `.agdf/control/` or a linked authoritative repository SoT before PRD, SD, TP, Brownfield Analysis or implementation.
48
+ 12. Approval text and durable artefact presence are separate requirements for UR, PRD, SD, TP and QA report decisions. Approval text without the corresponding persisted or linked artefact keeps the current gate at that gate.
46
49
 
47
50
  ## Gate Order
48
51
  User gates:
@@ -53,7 +56,25 @@ Internal mandatory steps:
53
56
 
54
57
  `Brownfield Analysis -> CD+Tests -> CR -> OR`
55
58
 
59
+ ## Gate Transitions
60
+
61
+ Use this transition model for Structured Delivery:
62
+
63
+ | State | Current gate or step | Allowed | Forbidden | Missing approval |
64
+ |---|---|---|---|---|
65
+ | No approved UR | `UR` | clarify user need, formulate and persist UR, request `Approval: UR` | PRD, SD, TP, Brownfield Analysis, implementation, QA, release | `Approval: UR` |
66
+ | `UR` approved and UR artefact persisted or linked, PRD missing or draft | `PRD` | draft/refine PRD, define scope, acceptance criteria and non-goals, persist/link PRD, request `Approval: PRD` | SD, TP, Brownfield Analysis, implementation, QA, release | `Approval: PRD` |
67
+ | `PRD` approved and PRD artefact persisted or linked, SD missing or draft | `SD` | draft/refine Solution Design, ownership and architecture, persist/link SD, request `Approval: SD` | TP, implementation, QA, release | `Approval: SD` |
68
+ | `SD` approved and SD artefact persisted or linked, TP missing or draft | `TP` | draft/refine Task/Test Plan, task IDs, evidence plan, persist/link TP, request `Approval: TP` | implementation, QA, release | `Approval: TP` |
69
+ | `TP` approved and TP artefact persisted or linked, Brownfield missing | `Brownfield Analysis` | run Brownfield Analysis for approved TP scope | implementation, QA, release | none |
70
+ | Brownfield passed for approved TP | `CD+Tests` | implement approved TP tasks and run tests | QA pass, UAT, release | none |
71
+ | `QA` approved but QA report missing or not pass | `QA` | persist/link QA report with `pass` decision or revise/block evidence | UAT, release | none |
72
+
73
+ If `Approval: UR` is present, do not say implementation is the next step.
74
+ The next step is PRD work unless the run is explicitly classified as a Quick Task with no new product semantics and no formal artefact requirement.
75
+
56
76
  ## When To Use
77
+ - new user intent to build, add, change, extend, refactor or deliver something
57
78
  - Structured Delivery before first artefact creation
58
79
  - unclear current gate
59
80
  - user says "continue" or similar without exact approval
@@ -63,6 +84,9 @@ Internal mandatory steps:
63
84
 
64
85
  Not required for simple Quick Tasks without new product scope and without formal artefacts.
65
86
 
87
+ For a fresh prompt such as "I want to build a small CLI", use this skill first.
88
+ Do not route directly to `agdf-brownfield-analysis` or implementation until this skill or live AGDF control state says that implementation preparation is the next allowed action.
89
+
66
90
  ## Inputs
67
91
  Use what is available:
68
92
 
@@ -82,6 +106,7 @@ If a status is not explicit, do not assume it is satisfied.
82
106
  4. Derive allowed and forbidden outputs.
83
107
  5. Name the exact missing approval, if any.
84
108
  6. If consent was only implicit, say it is not yet approval and provide the exact formula.
109
+ 7. Ensure the next step follows the gate transition table. In particular, never jump from `Approval: UR` to implementation.
85
110
 
86
111
  ## Output
87
112
  Keep the result short and operational:
@@ -99,6 +124,9 @@ This skill must not:
99
124
  - create PRD before UR approval
100
125
  - create SD before PRD approval
101
126
  - create TP while earlier gates block
127
+ - suggest implementation immediately after `Approval: UR`
128
+ - suggest implementation immediately after `Approval: PRD`
129
+ - suggest implementation immediately after `Approval: SD`
102
130
  - perform full Brownfield Analysis unless explicitly requested
103
131
  - provide implementation snippets while implementation is gated
104
132
  - present QA or UAT as passed without evidence
@@ -12,6 +12,8 @@ It is the operational reference for skill outputs, but it is not a second copy o
12
12
 
13
13
  Quick Task Mode must not become ritual gate overhead.
14
14
  Structured Delivery must not bypass missing approvals.
15
+ New product semantics, functional change, user-visible behaviour, policy, persistence, architecture or release-critical work requires a durable UR in `.agdf/control/` or a linked authoritative repository SoT before later artefacts or implementation.
16
+ UR, PRD, SD, TP and QA report approvals require durable artefacts or linked authoritative repository SoT entries before the next gate can open.
15
17
 
16
18
  ## Gate Rules
17
19
 
@@ -21,6 +23,12 @@ Structured Delivery must not bypass missing approvals.
21
23
  - Legacy alias: `Freigabe: <GateName>` may be accepted when reviewing older German runs, but all new outputs must use `Approval: <GateName>`.
22
24
  - Implicit consent is not approval.
23
25
  - The earliest blocking gate wins.
26
+ - For UR, PRD, SD, TP and QA, approval and durable artefact presence are separate requirements. A gate is not satisfied by approval text alone when its artefact is missing from `.agdf/control/` or not linked to the authoritative repository SoT.
27
+ - Approval of one user gate permits work on the next gate artefact only. It does not permit implementation unless the approved gate is `TP` and required internal implementation prerequisites are satisfied.
28
+ - `Approval: UR` permits PRD drafting, not implementation.
29
+ - `Approval: PRD` permits Solution Design drafting, not implementation.
30
+ - `Approval: SD` permits Task/Test Plan drafting, not implementation.
31
+ - `Approval: TP` permits Brownfield Analysis and then CD+Tests when Brownfield evidence supports it.
24
32
  - `CD+Tests` is implementation and test status only, not a delivery signal.
25
33
  - `agdf-code-review` standardizes the mandatory `CR` step, but does not replace QA.
26
34
  - `agdf-qa-gate` decides final `pass | revise | block`.
@@ -23,27 +23,34 @@ Therefore generated Copilot skill names use the AGDF prefix:
23
23
  Do not remove that prefix in Copilot-facing repository skills.
24
24
  Codex and Claude Code plugin surfaces use the same canonical router with unprefixed skill names because their plugin namespace already carries `agdf`.
25
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
+
26
28
  Use Quick Task Mode for questions, small reviews, local debugging and narrow fixes without new product semantics.
27
29
 
28
30
  Use Structured Delivery Mode for new capabilities, architecture, policy, persistence, release-critical work, formal artefacts or explicit approvals.
29
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
+
30
36
  Quick Task Mode must still cite evidence and close with a concrete result.
31
37
  Structured Delivery Mode must respect gates, reviews and closeout discipline.
32
38
 
33
39
  ## Skill Routing
34
40
  | Skill | Use For | Boundary |
35
41
  |---|---|---|
36
- | `agdf-brownfield-analysis` | before non-trivial implementation in existing systems | clarifies reuse, owners and risks |
42
+ | `agdf-brownfield-analysis` | after gate-check permits implementation preparation, before non-trivial changes in existing systems | clarifies reuse, owners and risks; never bypasses gate-check |
37
43
  | `agdf-clean-implementation-review` | inspect workarounds, fallbacks, parallel structures or symptom fixes | not a TP or QA substitute |
38
44
  | `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 |
39
45
  | `agdf-delivery-closeout` | commit/PR-near handoff after QA/OR/UAT | never performs VCS actions automatically |
40
- | `agdf-gate-check` | unclear approval, Structured Delivery, later-gate artefact requested | does not create later artefacts |
46
+ | `agdf-gate-check` | new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested | does not create later artefacts |
41
47
  | `agdf-qa-gate` | final QA decision | only instance for `pass | revise | block` |
42
48
  | `agdf-release-or` | auditable closeout for every relevant run | not a QA substitute |
43
49
  | `agdf-task-plan-review` | after implementation and before QA, verify TP coverage | no final QA decision |
44
50
 
45
51
  Select exactly one primary skill first.
46
52
  Add more only when they cover a distinct concrete risk dimension.
53
+ 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.
47
54
 
48
55
  ## Runtime Contract
49
56
  For repeated output, gate, Quality Contract and Context Graph rules, use:
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.2.0",
3
+ "version": "0.2.3",
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",
@@ -10,6 +10,11 @@ Use this scaffold when a target repository should keep AGDF state outside chat h
10
10
  |---|---|
11
11
  | `templates/AGDF_RUN.md` | Template for current run state: mode, gate, approvals, evidence, risks, next allowed action |
12
12
  | `templates/MASTER_BACKLOG.md` | Template for the living backlog pointer: active initiatives and current UR/PRD/SD/TP artefacts |
13
+ | `templates/artefacts/UR.md` | Template for the durable user requirement artefact of a work item |
14
+ | `templates/artefacts/PRD.md` | Template for the durable product requirements artefact |
15
+ | `templates/artefacts/SD.md` | Template for the durable solution design artefact |
16
+ | `templates/artefacts/TP.md` | Template for the durable task and test plan artefact |
17
+ | `templates/artefacts/QA_REPORT.md` | Template for the durable QA decision report |
13
18
  | `templates/SOT_REGISTRY.md` | Template for the source-of-truth registry: one primary owner per domain |
14
19
  | `templates/CONTEXT_GRAPH.md` | Template for project memory: durable decisions, Brownfield findings, risks, evidence and exit criteria |
15
20
  | `templates/AGENT_QUALITY_CONTRACTS.json` | Template for machine-readable warning, revise and block contracts for review and QA |
@@ -21,6 +26,13 @@ Use this scaffold when a target repository should keep AGDF state outside chat h
21
26
  control/
22
27
  AGDF_RUN.md
23
28
  MASTER_BACKLOG.md
29
+ artefacts/
30
+ <work-item>/
31
+ UR.md
32
+ PRD.md
33
+ SD.md
34
+ TP.md
35
+ QA_REPORT.md
24
36
  SOT_REGISTRY.md
25
37
  CONTEXT_GRAPH.md
26
38
  AGENT_QUALITY_CONTRACTS.json
@@ -49,6 +61,7 @@ npm create agdf@latest gate-check --json
49
61
 
50
62
  - `AGDF_RUN.md` is the current run dashboard.
51
63
  - `MASTER_BACKLOG.md` points to active delivery work; detailed artefacts live beside the work item.
64
+ - UR, PRD, SD, TP and QA decisions require durable artefacts or links to the authoritative repository source of truth before the next gate can open.
52
65
  - `SOT_REGISTRY.md` decides which document owns which domain.
53
66
  - `CONTEXT_GRAPH.md` records durable project knowledge only when it has evidence and an exit criterion.
54
67
  - `AGENT_QUALITY_CONTRACTS.json` names reusable block, revise and warning conditions.
@@ -4,11 +4,15 @@ This file is the living control pointer for active AGDF delivery work. Detailed
4
4
 
5
5
  ## Rules
6
6
 
7
- 1. Keep only steering-relevant work in `Active Backlog`.
8
- 2. Every active item has exactly one current spec pointer.
9
- 3. Historical artefacts remain linkable but do not override the current pointer.
10
- 4. If an item is superseded, mark the replacement.
11
- 5. If active work grows beyond roughly ten items, triage the backlog.
7
+ 1. New product semantics, functional change or user-visible behaviour change starts as a new UR draft in a stable local artefact path, for example `.agdf/control/artefacts/<key>/UR.md`, unless an authoritative repository SoT already exists and is linked here.
8
+ 2. `Approval: UR` adds or updates exactly one steering row with a link to the UR.
9
+ 3. PRD, SD, TP and QA report artefacts are created for the same work item after the previous gate is approved.
10
+ 4. `Approval: PRD`, `Approval: SD`, `Approval: TP` and `Approval: QA` require the corresponding durable artefact or linked repository SoT before the next gate can open.
11
+ 5. Keep only steering-relevant work in `Active Backlog`.
12
+ 6. Every active item has exactly one current spec pointer.
13
+ 7. Historical artefacts remain linkable but do not override the current pointer.
14
+ 8. If an item is superseded, mark the replacement.
15
+ 9. If active work grows beyond roughly ten items, triage the backlog.
12
16
 
13
17
  ## Active Backlog
14
18
 
@@ -0,0 +1,42 @@
1
+ # PRD: <Title>
2
+
3
+ Status: draft
4
+ Gate: PRD
5
+ Gate approval: open
6
+ Based on: UR
7
+ Date:
8
+ Owner:
9
+
10
+ ## 1. Product Scope
11
+
12
+ What exactly must be delivered?
13
+
14
+ ## 2. Acceptance Criteria
15
+
16
+ Which observable outcomes must be true?
17
+
18
+ ## 3. Non-Goals
19
+
20
+ What remains out of scope?
21
+
22
+ ## 4. Users And Roles
23
+
24
+ Who is affected and who decides?
25
+
26
+ ## 5. Constraints
27
+
28
+ Which business, operational, legal, security or compatibility constraints apply?
29
+
30
+ ## 6. Evidence Requirements
31
+
32
+ Which evidence must later support QA?
33
+
34
+ ## 7. Risks And Open Questions
35
+
36
+ Which questions must SD, TP or Brownfield Analysis clarify later?
37
+
38
+ ## 8. Next Step
39
+
40
+ Review this PRD and approve only with:
41
+
42
+ `Approval: PRD`
@@ -0,0 +1,38 @@
1
+ # QA Report: <Title>
2
+
3
+ Status: draft
4
+ Gate: QA
5
+ Gate approval: open
6
+ Based on: TP, implementation evidence, task-plan review
7
+ Date:
8
+ Owner:
9
+
10
+ ## 1. QA Decision
11
+
12
+ Decision: `pass | revise | block`
13
+
14
+ ## 2. TP Coverage
15
+
16
+ Which TP tasks are fully done, partially done or not done?
17
+
18
+ ## 3. Evidence
19
+
20
+ Which tests, logs, diffs, reviews or observations support the decision?
21
+
22
+ ## 4. Missing Evidence
23
+
24
+ What remains unverified?
25
+
26
+ ## 5. Risks
27
+
28
+ Which risks remain and what is their impact?
29
+
30
+ ## 6. Required Next Step
31
+
32
+ What is the next permitted action?
33
+
34
+ ## 7. Gate Approval
35
+
36
+ Approve this QA decision only with:
37
+
38
+ `Approval: QA`
@@ -0,0 +1,42 @@
1
+ # SD: <Title>
2
+
3
+ Status: draft
4
+ Gate: SD
5
+ Gate approval: open
6
+ Based on: PRD
7
+ Date:
8
+ Owner:
9
+
10
+ ## 1. Solution Overview
11
+
12
+ How will the approved PRD be solved?
13
+
14
+ ## 2. Ownership And Source Of Truth
15
+
16
+ Which existing modules, documents, services or owners remain authoritative?
17
+
18
+ ## 3. Architecture Decisions
19
+
20
+ Which design decisions are binding for implementation?
21
+
22
+ ## 4. Integration Points
23
+
24
+ Which APIs, data flows, UI surfaces, jobs, queues or external systems are affected?
25
+
26
+ ## 5. Constraints And Compatibility
27
+
28
+ Which constraints must implementation preserve?
29
+
30
+ ## 6. Test And Evidence Strategy
31
+
32
+ Which evidence must TP and QA later collect?
33
+
34
+ ## 7. Risks And Open Questions
35
+
36
+ Which risks remain before task planning?
37
+
38
+ ## 8. Next Step
39
+
40
+ Review this solution design and approve only with:
41
+
42
+ `Approval: SD`
@@ -0,0 +1,36 @@
1
+ # TP: <Title>
2
+
3
+ Status: draft
4
+ Gate: TP
5
+ Gate approval: open
6
+ Based on: SD
7
+ Date:
8
+ Owner:
9
+
10
+ ## 1. Task List
11
+
12
+ | task_id | Task | Acceptance mapping | Evidence required |
13
+ |---|---|---|---|
14
+ | T1 | | | |
15
+
16
+ ## 2. Test Plan
17
+
18
+ Which automated, manual or inspection checks must run?
19
+
20
+ ## 3. Brownfield Scope
21
+
22
+ Which existing owners, modules or artefacts must be inspected before implementation?
23
+
24
+ ## 4. Out Of Scope
25
+
26
+ Which implementation work is explicitly not part of this TP?
27
+
28
+ ## 5. Risks And Blockers
29
+
30
+ Which risks must block, revise or warn later QA?
31
+
32
+ ## 6. Next Step
33
+
34
+ Review this task and test plan and approve only with:
35
+
36
+ `Approval: TP`
@@ -0,0 +1,41 @@
1
+ # UR: <Title>
2
+
3
+ Status: draft
4
+ Gate: UR
5
+ Gate approval: open
6
+ Date:
7
+ Owner:
8
+
9
+ ## 1. Problem
10
+
11
+ What user, business or operational problem should be solved?
12
+
13
+ ## 2. Goal
14
+
15
+ What outcome should become possible?
16
+
17
+ ## 3. Scope
18
+
19
+ What is included in this first slice?
20
+
21
+ ## 4. Non-Goals
22
+
23
+ What is explicitly not part of this UR?
24
+
25
+ ## 5. Acceptance Signals
26
+
27
+ How will we know the need is clear enough for PRD?
28
+
29
+ ## 6. Existing Source Of Truth
30
+
31
+ Which existing repository artefacts, docs, code paths or decisions must be respected?
32
+
33
+ ## 7. Risks And Unknowns
34
+
35
+ Which questions must PRD, SD or Brownfield Analysis clarify later?
36
+
37
+ ## 8. Next Step
38
+
39
+ Review this UR and approve only with:
40
+
41
+ `Approval: UR`
@@ -24,27 +24,34 @@ Do not duplicate the plugin namespace in Codex or Claude Code plugin skill names
24
24
  That `agdf-` prefix is reserved for GitHub Copilot repository skills, where no plugin namespace exists.
25
25
 
26
26
  ## Mode Selection
27
+ Default entry rule: a new user intent to build, add, change, extend, refactor or otherwise deliver something starts with `gate-check` unless it is clearly only a question, explanation, local inspection, or explicitly scoped review.
28
+
27
29
  Use Quick Task Mode for questions, small reviews, local debugging and narrow fixes without new product semantics.
28
30
 
29
31
  Use Structured Delivery Mode for new capabilities, architecture, policy, persistence, release-critical work, formal artefacts or explicit approvals.
30
32
 
33
+ Any new product semantics, functional change or user-visible behaviour change requires a durable UR first.
34
+ 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.
35
+ Treat approval text and durable artefact presence as separate checks for UR, PRD, SD, TP and QA report decisions.
36
+
31
37
  Quick Task Mode must still cite evidence and close with a concrete result.
32
38
  Structured Delivery Mode must respect gates, reviews and closeout discipline.
33
39
 
34
40
  ## Skill Routing
35
41
  | Skill | Use For | Boundary |
36
42
  |---|---|---|
37
- | `brownfield-analysis` | before non-trivial implementation in existing systems | clarifies reuse, owners and risks |
43
+ | `brownfield-analysis` | after gate-check permits implementation preparation, before non-trivial changes in existing systems | clarifies reuse, owners and risks; never bypasses gate-check |
38
44
  | `clean-implementation-review` | inspect workarounds, fallbacks, parallel structures or symptom fixes | not a TP or QA substitute |
39
45
  | `code-review` | mandatory CR step after code changes, focused on defects, regression and security findings | does not replace TP review, clean review or QA |
40
46
  | `delivery-closeout` | commit/PR-near handoff after QA/OR/UAT | never performs VCS actions automatically |
41
- | `gate-check` | unclear approval, Structured Delivery, later-gate artefact requested | does not create later artefacts |
47
+ | `gate-check` | new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested | does not create later artefacts |
42
48
  | `qa-gate` | final QA decision | only instance for `pass | revise | block` |
43
49
  | `release-or` | auditable closeout for every relevant run | not a QA substitute |
44
50
  | `task-plan-review` | after implementation and before QA, verify TP coverage | no final QA decision |
45
51
 
46
52
  Select exactly one primary skill first.
47
53
  Add more only when they cover a distinct concrete risk dimension.
54
+ Do not choose `brownfield-analysis` as the first primary skill for a fresh "I want to build/change X" prompt unless `gate-check` or existing live AGDF control state already makes implementation preparation the next allowed action.
48
55
 
49
56
  ## Runtime Contract
50
57
  For repeated output, gate, Quality Contract and Context Graph rules, use:
@@ -105,7 +105,15 @@ Transform transient reasoning into durable knowledge.
105
105
 
106
106
  Create or update artefacts whenever they improve traceability or future work.
107
107
 
108
- Typical artefacts include:
108
+ For new product semantics, functional change, user-visible behaviour, policy,
109
+ persistence, architecture, release-critical work or any Structured Delivery run,
110
+ a User Requirement (UR) is mandatory.
111
+
112
+ UR, PRD, SD, TP and QA report approvals require durable artefacts in the target
113
+ repository's AGDF control state or links from that control state to the
114
+ repository's authoritative source of truth before the next gate can open.
115
+
116
+ Artefacts include:
109
117
 
110
118
  * User Requirements
111
119
  * Product Requirements Docs (PRD)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.2.0",
4
+ "version": "0.2.3",
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.",
@@ -42,8 +42,8 @@
42
42
  "skillSet": [
43
43
  {
44
44
  "slug": "brownfield-analysis",
45
- "useFor": "before non-trivial implementation in existing systems",
46
- "boundary": "clarifies reuse, owners and risks"
45
+ "useFor": "after gate-check permits implementation preparation, before non-trivial changes in existing systems",
46
+ "boundary": "clarifies reuse, owners and risks; never bypasses gate-check"
47
47
  },
48
48
  {
49
49
  "slug": "clean-implementation-review",
@@ -62,7 +62,7 @@
62
62
  },
63
63
  {
64
64
  "slug": "gate-check",
65
- "useFor": "unclear approval, Structured Delivery, later-gate artefact requested",
65
+ "useFor": "new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested",
66
66
  "boundary": "does not create later artefacts"
67
67
  },
68
68
  {
@@ -12,6 +12,8 @@ It is the operational reference for skill outputs, but it is not a second copy o
12
12
 
13
13
  Quick Task Mode must not become ritual gate overhead.
14
14
  Structured Delivery must not bypass missing approvals.
15
+ New product semantics, functional change, user-visible behaviour, policy, persistence, architecture or release-critical work requires a durable UR in `.agdf/control/` or a linked authoritative repository SoT before later artefacts or implementation.
16
+ UR, PRD, SD, TP and QA report approvals require durable artefacts or linked authoritative repository SoT entries before the next gate can open.
15
17
 
16
18
  ## Gate Rules
17
19
 
@@ -21,6 +23,12 @@ Structured Delivery must not bypass missing approvals.
21
23
  - Legacy alias: `Freigabe: <GateName>` may be accepted when reviewing older German runs, but all new outputs must use `Approval: <GateName>`.
22
24
  - Implicit consent is not approval.
23
25
  - The earliest blocking gate wins.
26
+ - For UR, PRD, SD, TP and QA, approval and durable artefact presence are separate requirements. A gate is not satisfied by approval text alone when its artefact is missing from `.agdf/control/` or not linked to the authoritative repository SoT.
27
+ - Approval of one user gate permits work on the next gate artefact only. It does not permit implementation unless the approved gate is `TP` and required internal implementation prerequisites are satisfied.
28
+ - `Approval: UR` permits PRD drafting, not implementation.
29
+ - `Approval: PRD` permits Solution Design drafting, not implementation.
30
+ - `Approval: SD` permits Task/Test Plan drafting, not implementation.
31
+ - `Approval: TP` permits Brownfield Analysis and then CD+Tests when Brownfield evidence supports it.
24
32
  - `CD+Tests` is implementation and test status only, not a delivery signal.
25
33
  - `code-review` standardizes the mandatory `CR` step, but does not replace QA.
26
34
  - `qa-gate` decides final `pass | revise | block`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: brownfield-analysis
3
- description: Use this skill before implementation in an existing codebase, especially for feature extensions, bug fixes, refactorings, or changes to existing modules. It analyzes existing artefacts, current coverage, reuse strategy, risks, and the minimal clean implementation path. Use it before CD+Tests.
3
+ description: Use this skill after gate-check or live AGDF control state confirms that implementation preparation is allowed, and before non-trivial implementation in an existing codebase. It analyzes existing artefacts, current coverage, reuse strategy, risks, and the minimal clean implementation path. Do not use it as the first AGDF skill for a fresh "I want to build/change X" prompt when approval, scope, or next allowed action is unclear.
4
4
  ---
5
5
 
6
6
  # brownfield-analysis
@@ -38,6 +38,7 @@ Brownfield-specific output must make evidence, missing existing-system view, par
38
38
  12. Specification archive migrations must follow the archive index if present.
39
39
 
40
40
  ## When To Use
41
+ - after `gate-check` permits implementation preparation or live `.agdf/control/AGDF_RUN.md` already names Brownfield Analysis as the next allowed action
41
42
  - before `CD+Tests`
42
43
  - before changes to an existing repository
43
44
  - bug fixes in existing modules
@@ -58,6 +59,7 @@ Use what is available:
58
59
  - repository conventions
59
60
 
60
61
  If inputs are missing, work only from observable evidence and mark gaps explicitly.
62
+ If gate status, approval, scope or next allowed action is unclear, stop and route to `gate-check` instead of recommending or starting implementation.
61
63
 
62
64
  ## Workflow
63
65
  1. Identify affected tasks and scope.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gate-check
3
- description: Use this skill when the active gate is unclear, when a later-gate artefact is requested, when an exact approval may be missing, or when the next permissible step must be determined. Use it before creating formal artefacts in Structured Delivery and whenever implicit consent might be mistaken for approval.
3
+ description: Use this skill as the default first AGDF skill for any new build, change, extension, refactor, feature, CLI, app, fix with product semantics, Structured Delivery request, unclear approval, later-gate artefact request, or unclear next permissible step. Use it before brownfield-analysis, implementation, formal artefacts, QA, or release when approval/evidence/next action is not already explicit.
4
4
  ---
5
5
 
6
6
  # gate-check
@@ -43,6 +43,9 @@ The CLI report is evidence for this skill, not a second rule system. If the repo
43
43
  7. Internal process steps are not user approval gates.
44
44
  8. OR-lite is allowed if it does not leak blocked content.
45
45
  9. SoT/runtime/product-semantics drift can trigger an early product gate, usually `UR`.
46
+ 10. Approval of one user gate permits work on the next gate artefact only; it never skips directly to implementation.
47
+ 11. New product semantics, functional change or user-visible behaviour change requires a durable UR in `.agdf/control/` or a linked authoritative repository SoT before PRD, SD, TP, Brownfield Analysis or implementation.
48
+ 12. Approval text and durable artefact presence are separate requirements for UR, PRD, SD, TP and QA report decisions. Approval text without the corresponding persisted or linked artefact keeps the current gate at that gate.
46
49
 
47
50
  ## Gate Order
48
51
  User gates:
@@ -53,7 +56,25 @@ Internal mandatory steps:
53
56
 
54
57
  `Brownfield Analysis -> CD+Tests -> CR -> OR`
55
58
 
59
+ ## Gate Transitions
60
+
61
+ Use this transition model for Structured Delivery:
62
+
63
+ | State | Current gate or step | Allowed | Forbidden | Missing approval |
64
+ |---|---|---|---|---|
65
+ | No approved UR | `UR` | clarify user need, formulate and persist UR, request `Approval: UR` | PRD, SD, TP, Brownfield Analysis, implementation, QA, release | `Approval: UR` |
66
+ | `UR` approved and UR artefact persisted or linked, PRD missing or draft | `PRD` | draft/refine PRD, define scope, acceptance criteria and non-goals, persist/link PRD, request `Approval: PRD` | SD, TP, Brownfield Analysis, implementation, QA, release | `Approval: PRD` |
67
+ | `PRD` approved and PRD artefact persisted or linked, SD missing or draft | `SD` | draft/refine Solution Design, ownership and architecture, persist/link SD, request `Approval: SD` | TP, implementation, QA, release | `Approval: SD` |
68
+ | `SD` approved and SD artefact persisted or linked, TP missing or draft | `TP` | draft/refine Task/Test Plan, task IDs, evidence plan, persist/link TP, request `Approval: TP` | implementation, QA, release | `Approval: TP` |
69
+ | `TP` approved and TP artefact persisted or linked, Brownfield missing | `Brownfield Analysis` | run Brownfield Analysis for approved TP scope | implementation, QA, release | none |
70
+ | Brownfield passed for approved TP | `CD+Tests` | implement approved TP tasks and run tests | QA pass, UAT, release | none |
71
+ | `QA` approved but QA report missing or not pass | `QA` | persist/link QA report with `pass` decision or revise/block evidence | UAT, release | none |
72
+
73
+ If `Approval: UR` is present, do not say implementation is the next step.
74
+ The next step is PRD work unless the run is explicitly classified as a Quick Task with no new product semantics and no formal artefact requirement.
75
+
56
76
  ## When To Use
77
+ - new user intent to build, add, change, extend, refactor or deliver something
57
78
  - Structured Delivery before first artefact creation
58
79
  - unclear current gate
59
80
  - user says "continue" or similar without exact approval
@@ -63,6 +84,9 @@ Internal mandatory steps:
63
84
 
64
85
  Not required for simple Quick Tasks without new product scope and without formal artefacts.
65
86
 
87
+ For a fresh prompt such as "I want to build a small CLI", use this skill first.
88
+ Do not route directly to `brownfield-analysis` or implementation until this skill or live AGDF control state says that implementation preparation is the next allowed action.
89
+
66
90
  ## Inputs
67
91
  Use what is available:
68
92
 
@@ -82,6 +106,7 @@ If a status is not explicit, do not assume it is satisfied.
82
106
  4. Derive allowed and forbidden outputs.
83
107
  5. Name the exact missing approval, if any.
84
108
  6. If consent was only implicit, say it is not yet approval and provide the exact formula.
109
+ 7. Ensure the next step follows the gate transition table. In particular, never jump from `Approval: UR` to implementation.
85
110
 
86
111
  ## Output
87
112
  Keep the result short and operational:
@@ -99,6 +124,9 @@ This skill must not:
99
124
  - create PRD before UR approval
100
125
  - create SD before PRD approval
101
126
  - create TP while earlier gates block
127
+ - suggest implementation immediately after `Approval: UR`
128
+ - suggest implementation immediately after `Approval: PRD`
129
+ - suggest implementation immediately after `Approval: SD`
102
130
  - perform full Brownfield Analysis unless explicitly requested
103
131
  - provide implementation snippets while implementation is gated
104
132
  - present QA or UAT as passed without evidence
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agdf",
3
- "version": "0.2.0",
3
+ "version": "0.2.3",
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": [