create-agdf 0.2.2 → 0.2.4

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 (36) hide show
  1. package/README.md +6 -0
  2. package/bin/create-agdf.js +522 -36
  3. package/generated/.agdf/control/README.md +17 -1
  4. package/generated/.agdf/control/templates/AGDF_RUN.md +23 -1
  5. package/generated/.agdf/control/templates/MASTER_BACKLOG.md +16 -11
  6. package/generated/.agdf/control/templates/artefacts/OR.md +86 -0
  7. package/generated/.agdf/control/templates/artefacts/PRD.md +42 -0
  8. package/generated/.agdf/control/templates/artefacts/QA_REPORT.md +38 -0
  9. package/generated/.agdf/control/templates/artefacts/SD.md +42 -0
  10. package/generated/.agdf/control/templates/artefacts/TP.md +36 -0
  11. package/generated/.agdf/control/templates/artefacts/UR.md +41 -0
  12. package/generated/.github/copilot-instructions.md +3 -0
  13. package/generated/.github/instructions/agdf-governance.instructions.md +1 -0
  14. package/generated/.github/skills/agdf-brownfield-analysis/SKILL.md +24 -17
  15. package/generated/.github/skills/agdf-gate-check/SKILL.md +53 -5
  16. package/generated/.github/skills/agdf-release-or/SKILL.md +13 -9
  17. package/generated/.github/skills/agdf-runtime-contract.md +60 -2
  18. package/generated/AGENTS.md +15 -2
  19. package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
  20. package/generated/plugins/agdf/control/README.md +17 -1
  21. package/generated/plugins/agdf/control/templates/AGDF_RUN.md +23 -1
  22. package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +16 -11
  23. package/generated/plugins/agdf/control/templates/artefacts/OR.md +86 -0
  24. package/generated/plugins/agdf/control/templates/artefacts/PRD.md +42 -0
  25. package/generated/plugins/agdf/control/templates/artefacts/QA_REPORT.md +38 -0
  26. package/generated/plugins/agdf/control/templates/artefacts/SD.md +42 -0
  27. package/generated/plugins/agdf/control/templates/artefacts/TP.md +36 -0
  28. package/generated/plugins/agdf/control/templates/artefacts/UR.md +41 -0
  29. package/generated/plugins/agdf/meta/agdf-agent-router.md +15 -2
  30. package/generated/plugins/agdf/meta/agdf-constitution.md +22 -5
  31. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +4 -4
  32. package/generated/plugins/agdf/meta/agdf-runtime-contract.md +60 -2
  33. package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +24 -17
  34. package/generated/plugins/agdf/skills/gate-check/SKILL.md +53 -5
  35. package/generated/plugins/agdf/skills/release-or/SKILL.md +13 -9
  36. package/package.json +1 -1
@@ -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)
@@ -176,11 +184,11 @@ Gate Discipline
176
184
 
177
185
  AGDF work follows a gate-driven flow:
178
186
 
179
- UR → PRD → SD → TP → QA → UAT
187
+ UR → Brownfield Review → Mode/Slice Decision → PRD/SD/TP as needed → QA → UAT
180
188
 
181
189
  with internal process steps:
182
190
 
183
- Brownfield Analysis → CD+Tests → CR → OR
191
+ Brownfield Review → Mode/Slice Decision → Brownfield Analysis → CD+Tests → CR → OR
184
192
 
185
193
  Rules:
186
194
 
@@ -191,8 +199,17 @@ Rules:
191
199
  `Approval: <GateName>`
192
200
  Legacy German runs may contain `Freigabe: <GateName>`; keep it as an
193
201
  interpretation alias only and write new artefacts with `Approval:`.
194
- * **Implicit consent is not consent**: "ok", "go", "approved" or similar
195
- formulations do not count as gate approvals.
202
+ * **Implicit consent is not consent**: "ok", "go", "approved", "go ahead",
203
+ "do it", "continue", "leg los" or similar formulations do not count as gate
204
+ approvals.
205
+ * **No gate skipping**: Urgency, task wording, chat history, "start" requests
206
+ or implicit consent must not skip from one gate to implementation or to a
207
+ later artefact. The next allowed action is the next unsatisfied gate or
208
+ internal mandatory step.
209
+ * **Size before ceremony**: After an approved durable UR, Brownfield Review
210
+ determines change size and routing before PRD depth is chosen. The Mode/Slice
211
+ Decision is one of `quick_task`, `structured_slice`, `structured_delivery` or
212
+ `block`.
196
213
  * **No gate leaks**: Later gate artefacts must not be produced when an
197
214
  earlier gate is still blocking.
198
215
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.2.2",
4
+ "version": "0.2.4",
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": "after gate-check permits implementation preparation, before non-trivial changes in existing systems",
46
- "boundary": "clarifies reuse, owners and risks; never bypasses gate-check"
45
+ "useFor": "after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems",
46
+ "boundary": "clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission"
47
47
  },
48
48
  {
49
49
  "slug": "clean-implementation-review",
@@ -63,7 +63,7 @@
63
63
  {
64
64
  "slug": "gate-check",
65
65
  "useFor": "new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested",
66
- "boundary": "does not create later artefacts"
66
+ "boundary": "does not create later artefacts or skip Mode/Slice Decision after Brownfield Review"
67
67
  },
68
68
  {
69
69
  "slug": "qa-gate",
@@ -12,21 +12,54 @@ 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
 
18
20
  - User gates: `UR -> PRD -> SD -> TP -> QA -> UAT`
19
- - Internal mandatory steps: `Brownfield Analysis -> CD+Tests -> CR -> OR`
21
+ - Internal mandatory steps: `Brownfield Review -> Mode/Slice Decision -> Brownfield Analysis -> CD+Tests -> CR -> OR`
20
22
  - Exact approval formula: `Approval: <GateName>`
21
23
  - Legacy alias: `Freigabe: <GateName>` may be accepted when reviewing older German runs, but all new outputs must use `Approval: <GateName>`.
22
- - Implicit consent is not approval.
24
+ - Implicit consent is not approval. Phrases such as "ok", "go ahead", "do it", "approved", "continue", "leg los" or "looks good" are work intent, not gate 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 allowed gate artefact or required internal step only. It does not permit implementation unless the approved gate is `TP` and required internal implementation prerequisites are satisfied.
28
+ - Gates must never be skipped or inferred from urgency, tone, chat history, task wording or an instruction to "start". The next allowed action is always the next unsatisfied gate or internal mandatory step.
29
+ - `Approval: UR` permits Brownfield Review after G-00 first, then a Mode/Slice Decision. It never permits implementation by itself.
30
+ - PRD, SD and TP depth is chosen after Brownfield Review through the Mode/Slice Decision, not before existing-system impact is understood.
31
+ - `Approval: PRD` permits Solution Design drafting, not implementation.
32
+ - `Approval: SD` permits Task/Test Plan drafting, not implementation.
33
+ - `Approval: TP` permits implementation-preparation Brownfield Analysis and then CD+Tests when Brownfield evidence supports it.
24
34
  - `CD+Tests` is implementation and test status only, not a delivery signal.
25
35
  - `code-review` standardizes the mandatory `CR` step, but does not replace QA.
26
36
  - `qa-gate` decides final `pass | revise | block`.
27
37
  - `release-or` reports the run, but does not replace QA or produce the operative commit/PR handoff.
28
38
  - `delivery-closeout` owns the operative Git handoff text when QA/OR/UAT state allows it.
29
39
 
40
+ ## Brownfield Review After G-00
41
+
42
+ After an approved and durable UR, perform a lightweight `Brownfield Review` before PRD when Brownfield, UI, UX, admin, runtime, policy, persistence, architecture, ownership or source-of-truth impact is possible.
43
+
44
+ This review is not a new user approval gate, not PRD, not SD, not TP and not implementation permission.
45
+ It is the sizing and routing step that decides how much later gate discipline is actually needed.
46
+
47
+ Its output is limited to:
48
+
49
+ - workstream or follow-up-slice classification
50
+ - `Mode/Slice Decision`: `quick_task | structured_slice | structured_delivery | block`
51
+ - affected existing owners, source-of-truth artefacts, contracts, policies, runtime paths or tests
52
+ - reuse-before-create risks and parallel-structure risks
53
+ - open questions that PRD or SD must resolve
54
+ - whether implementation-preparation Brownfield Analysis will also be needed after TP
55
+
56
+ Mode/Slice Decision rules:
57
+
58
+ - `quick_task`: use only when Brownfield Review shows a narrow local change, no new product semantics beyond the approved UR, no architecture/policy/persistence/contract expansion, and evidence is sufficient to proceed with a small implementation plus relevant checks.
59
+ - `structured_slice`: use when some formal artefacts are needed, but they can stay intentionally small and scoped to the approved slice.
60
+ - `structured_delivery`: use when the change has broad product, architecture, runtime, policy, persistence, release or cross-owner impact.
61
+ - `block`: use when ownership, SoT, impact, evidence or product direction is not clear enough to choose a safe path.
62
+
30
63
  ## Quality Contract Output
31
64
 
32
65
  Structured Delivery skills use this shape when relevant:
@@ -63,9 +96,34 @@ When a repository needs durable AGDF state, use the plugin-local `control/` scaf
63
96
  - `SOT_REGISTRY.md` prevents parallel sources of truth.
64
97
  - `CONTEXT_GRAPH.md` stores durable Brownfield findings, decisions, risks, evidence and exit criteria.
65
98
  - `AGENT_QUALITY_CONTRACTS.json` stores reusable block, revise and warning conditions.
99
+ - OR reports live under `.agdf/control/artefacts/<key>/OR.md` when a run closeout is steering-relevant or should be auditable beyond the chat.
66
100
 
67
101
  The scaffold is not a second documentation site. Link to authoritative artefacts instead of copying them.
68
102
 
103
+ ## Native Runtime
104
+
105
+ AGDF must work natively through the plugin router, skills and live `.agdf/control/` artefacts.
106
+ Agents should read the live control state and apply the gate model directly before reaching for helper commands.
107
+
108
+ Machine-readable commands such as `doctor --json`, `gate-check --json` and `delivery-map --json` are validators and automation interfaces.
109
+ They make the repository state checkable, but they do not replace the native skill workflow or the durable control artefacts.
110
+
111
+ ## Delivery Map
112
+
113
+ `delivery-map --json` is the machine-readable delivery picture for the active control state.
114
+ It derives, but does not replace, the live `.agdf/control/AGDF_RUN.md` and `MASTER_BACKLOG.md` state.
115
+
116
+ It must expose:
117
+
118
+ - approved or active artefacts and approvals
119
+ - `UR -> PRD -> SD -> TP -> QA_REPORT` relationships
120
+ - evidence refs, missing evidence and declared risks
121
+ - Context Graph impact and gate effect
122
+ - findings that explain why the delivery picture is `pass | warn | revise | block`
123
+
124
+ Missing relationship evidence in the Artefact Chain is at least `revise` once the related gate artefact is approved or passed.
125
+ Declared missing evidence, declared risk or Context Graph gate effect may escalate the delivery map to `warn`, `revise` or `block`.
126
+
69
127
  ## Skill Output
70
128
 
71
129
  Every skill output should be as short as possible and as concrete as needed.
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: brownfield-analysis
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.
3
+ description: Use this skill after gate-check or live AGDF control state confirms that Brownfield Review or implementation preparation is allowed. Use it after Approval: UR as the lightweight Brownfield Review after G-00 before PRD when existing systems may be affected, and again before non-trivial implementation after TP. 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
7
7
 
8
8
  ## Purpose
9
- Ensure implementation in an existing system is Brownfield-oriented, not Greenfield-style.
9
+ Ensure delivery in an existing system is Brownfield-oriented, not Greenfield-style.
10
10
 
11
11
  The skill answers:
12
12
 
@@ -15,7 +15,7 @@ The skill answers:
15
15
  - what can be reused, extended, or refactored
16
16
  - whether new artefacts are really needed
17
17
  - architecture, compatibility, migration, and regression impact
18
- - the minimal clean implementation path
18
+ - the minimal clean next step
19
19
  - whether Context Graph impact exists without automatically creating a node
20
20
 
21
21
  ## Runtime Contract
@@ -24,21 +24,24 @@ Use `../../meta/agdf-runtime-contract.md` for Quality Contract output, Context G
24
24
  Brownfield-specific output must make evidence, missing existing-system view, parallel-structure risk, reuse strategy, and the minimal next step visible.
25
25
 
26
26
  ## Rules
27
- 1. Brownfield first: understand the existing codebase before implementation.
28
- 2. Reuse-before-create: prefer existing modules, services, components, tables, endpoints, tests, and configuration.
29
- 3. Minimal clean slice: choose the smallest durable intervention, not merely the smallest technical diff.
30
- 4. No silent parallel structures.
31
- 5. Existing architecture, naming, error handling, logging, security, and test conventions are binding unless deviation is justified.
32
- 6. What is not visibly evidenced does not count as existing.
33
- 7. Async execute paths must not become a second product-policy decision point.
34
- 8. Visible state ownership must be checked for chat, rendering, scrolling, recovery, and status problems.
35
- 9. SoT/runtime/product-semantics drift must be named; if official behaviour must be decided first, recommend UR or equivalent product direction.
36
- 10. Large UI surfaces and state hooks must be checked for mixed render, view-model, derived state, orchestration, persistence, and recovery ownership.
37
- 11. Context Graph impact must be curated; it is not a review log or version index.
38
- 12. Specification archive migrations must follow the archive index if present.
27
+ 1. Brownfield first: understand the existing codebase before PRD/SD decisions when existing-system impact is possible, and again before implementation.
28
+ 2. Brownfield Review after `Approval: UR` is a sizing and routing step. It must decide `quick_task`, `structured_slice`, `structured_delivery`, or `block` before PRD depth or implementation is chosen.
29
+ 3. Reuse-before-create: prefer existing modules, services, components, tables, endpoints, tests, and configuration.
30
+ 4. Minimal clean slice: choose the smallest durable intervention, not merely the smallest technical diff.
31
+ 5. No silent parallel structures.
32
+ 6. Existing architecture, naming, error handling, logging, security, and test conventions are binding unless deviation is justified.
33
+ 7. What is not visibly evidenced does not count as existing.
34
+ 8. Async execute paths must not become a second product-policy decision point.
35
+ 9. Visible state ownership must be checked for chat, rendering, scrolling, recovery, and status problems.
36
+ 10. SoT/runtime/product-semantics drift must be named; if official behaviour must be decided first, recommend UR or equivalent product direction.
37
+ 11. Large UI surfaces and state hooks must be checked for mixed render, view-model, derived state, orchestration, persistence, and recovery ownership.
38
+ 12. Context Graph impact must be curated; it is not a review log or version index.
39
+ 13. Specification archive migrations must follow the archive index if present.
39
40
 
40
41
  ## When To Use
42
+ - after `gate-check` permits `Brownfield Review` or live `.agdf/control/AGDF_RUN.md` names Brownfield Review as the next allowed action
41
43
  - after `gate-check` permits implementation preparation or live `.agdf/control/AGDF_RUN.md` already names Brownfield Analysis as the next allowed action
44
+ - after `Approval: UR` when existing owners, SoT, contracts, policies, persistence, runtime paths, tests, UI, UX or architecture may affect PRD/SD scope
42
45
  - before `CD+Tests`
43
46
  - before changes to an existing repository
44
47
  - bug fixes in existing modules
@@ -51,7 +54,7 @@ Brownfield-specific output must make evidence, missing existing-system view, par
51
54
  ## Inputs
52
55
  Use what is available:
53
56
 
54
- - Task Plan, `task_id`, `story_id`
57
+ - approved UR, Task Plan, `task_id`, `story_id`
55
58
  - project structure
56
59
  - affected files, modules, services, APIs, data models
57
60
  - existing tests
@@ -59,7 +62,8 @@ Use what is available:
59
62
  - repository conventions
60
63
 
61
64
  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.
65
+ If gate status, approval, scope or next allowed action is unclear, stop and route to `gate-check` instead of recommending PRD/SD detail or starting implementation.
66
+ When used as Brownfield Review after `Approval: UR`, do not recommend PRD, SD, TP, or implementation until the Mode/Slice Decision is explicit.
63
67
 
64
68
  ## Workflow
65
69
  1. Identify affected tasks and scope.
@@ -93,6 +97,8 @@ Use a concise structure:
93
97
  ```text
94
98
  ## Brownfield Analysis
95
99
  - decision: pass | revise | block | not_applicable
100
+ - mode_slice_decision: quick_task | structured_slice | structured_delivery | block
101
+ - required_next_gate: none | PRD | SD | TP | Brownfield Analysis
96
102
  - scope:
97
103
  - evidence:
98
104
  - missing_evidence:
@@ -116,3 +122,4 @@ This skill must not:
116
122
  - convert product-semantics drift into a mere refactor
117
123
  - create Context Graph nodes automatically
118
124
  - treat archive links as active current specification signals
125
+ - recommend broad PRD/SD/TP or implementation by reflex before Mode/Slice Decision is recorded
@@ -20,29 +20,45 @@ This skill must not create later artefacts such as PRD, SD, TP, CD, CR, QA, or U
20
20
  ## Runtime Contract
21
21
  Use `../../meta/agdf-runtime-contract.md` for gate terms, closeout discipline, and non-duplication rules.
22
22
 
23
- ## Machine-Readable Control Path
23
+ ## Native Control Path
24
24
 
25
- When the target repository contains live AGDF control files, prefer the executable control path before deriving a gate decision manually:
25
+ AGDF is applied natively through this skill, the agent router, and live `.agdf/control/` state.
26
+
27
+ First inspect the durable control state directly:
28
+
29
+ - `.agdf/control/AGDF_RUN.md`
30
+ - `.agdf/control/MASTER_BACKLOG.md`
31
+ - `.agdf/control/SOT_REGISTRY.md`
32
+ - `.agdf/control/CONTEXT_GRAPH.md`
33
+ - `.agdf/control/AGENT_QUALITY_CONTRACTS.json`
34
+
35
+ Use the executable control path when a machine-readable check is requested, when the gate state is ambiguous, or when a repository-local automation needs JSON evidence:
26
36
 
27
37
  ```bash
28
38
  npm create agdf@latest doctor --json
29
39
  npm create agdf@latest gate-check --json
40
+ npm create agdf@latest delivery-map --json
30
41
  ```
31
42
 
32
43
  `doctor` checks whether `.agdf/control/` is actionable. `gate-check` consumes that result and `AGDF_RUN.md` to report the operative process decision: `open | blocked`, current gate, blocking reason, missing approval, allowed outputs, forbidden outputs, next allowed action and evidence references.
44
+ `delivery-map` reports the durable delivery picture: active artefacts, approvals, Artefact Chain relationships, evidence refs, missing evidence, risks, Context Graph gate effect and machine-readable findings.
33
45
 
34
- The CLI report is evidence for this skill, not a second rule system. If the report says `blocked`, do not continue with later-gate artefacts until the reported blocker is resolved.
46
+ The CLI reports are validators and JSON evidence, not the primary user experience and not a second rule system. If a report says `blocked`, do not continue with later-gate artefacts until the reported blocker is resolved.
35
47
 
36
48
  ## Rules
37
49
  1. Fail closed when a required approval or artefact status is missing.
38
50
  2. The earliest blocking gate wins.
39
51
  3. A user approval is valid only as `Approval: <GateName>`.
40
52
  4. Treat `Freigabe: <GateName>` as a legacy alias only when reviewing older German runs.
41
- 5. Implicit consent is not approval.
53
+ 5. Implicit consent is not approval. "ok", "go ahead", "do it", "approved", "continue", "leg los" and similar phrases do not unlock gates.
42
54
  6. Do not preview later artefacts while a gate blocks.
43
55
  7. Internal process steps are not user approval gates.
44
56
  8. OR-lite is allowed if it does not leak blocked content.
45
57
  9. SoT/runtime/product-semantics drift can trigger an early product gate, usually `UR`.
58
+ 10. Approval of one user gate permits work on the next allowed gate artefact or required internal step only; it never skips directly to implementation.
59
+ 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 Brownfield Review, PRD, SD, TP, Brownfield Analysis or implementation.
60
+ 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.
61
+ 13. After Brownfield Review, decide the process size before drafting PRD or implementing: `quick_task | structured_slice | structured_delivery | block`.
46
62
 
47
63
  ## Gate Order
48
64
  User gates:
@@ -51,7 +67,27 @@ User gates:
51
67
 
52
68
  Internal mandatory steps:
53
69
 
54
- `Brownfield Analysis -> CD+Tests -> CR -> OR`
70
+ `Brownfield Review -> Mode/Slice Decision -> Brownfield Analysis -> CD+Tests -> CR -> OR`
71
+
72
+ ## Gate Transitions
73
+
74
+ Use this transition model for Structured Delivery:
75
+
76
+ | State | Current gate or step | Allowed | Forbidden | Missing approval |
77
+ |---|---|---|---|---|
78
+ | No approved UR | `UR` | clarify user need, formulate and persist UR, request `Approval: UR` | PRD, SD, TP, Brownfield Analysis, implementation, QA, release | `Approval: UR` |
79
+ | `UR` approved and UR artefact persisted or linked, Brownfield Review missing | `Brownfield Review` | classify workstream, existing owners, SoT, reuse risks, change size and PRD/SD open questions; mark review done or not_applicable | PRD, SD, TP, implementation, QA, release | none |
80
+ | Brownfield Review done or not_applicable, Mode/Slice Decision missing | `Mode/Slice Decision` | decide `quick_task`, `structured_slice`, `structured_delivery` or `block`; record evidence and required next gate depth | PRD, SD, TP, implementation, QA, release | none |
81
+ | Mode/Slice Decision is `quick_task` | `Quick Task Execution` | implement only the narrow approved UR scope, run relevant checks, record evidence and OR-lite | broad PRD/SD/TP by ritual, scope expansion, QA or release claims without evidence | none |
82
+ | Mode/Slice Decision is `structured_slice` or `structured_delivery`, PRD missing or draft | `PRD` | draft/refine PRD at the smallest justified depth, define scope, acceptance criteria and non-goals, persist/link PRD, request `Approval: PRD` | SD, TP, implementation-preparation Brownfield Analysis, implementation, QA, release | `Approval: PRD` |
83
+ | `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` |
84
+ | `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` |
85
+ | `TP` approved and TP artefact persisted or linked, Brownfield missing | `Brownfield Analysis` | run Brownfield Analysis for approved TP scope | implementation, QA, release | none |
86
+ | Brownfield passed for approved TP | `CD+Tests` | implement approved TP tasks and run tests | QA pass, UAT, release | none |
87
+ | `QA` approved but QA report missing or not pass | `QA` | persist/link QA report with `pass` decision or revise/block evidence | UAT, release | none |
88
+
89
+ If `Approval: UR` is present, do not say implementation is the next step.
90
+ The next step is Brownfield Review when Brownfield, ownership, runtime, policy, persistence, architecture, UI or UX impact is possible; after that, the next step is a Mode/Slice Decision. Do not assume the full PRD/SD/TP chain before the existing-system impact is understood.
55
91
 
56
92
  ## When To Use
57
93
  - new user intent to build, add, change, extend, refactor or deliver something
@@ -73,6 +109,8 @@ Use what is available:
73
109
  - current user request
74
110
  - existing exact approvals
75
111
  - status of UR, PRD, SD, TP
112
+ - Brownfield Review status
113
+ - Mode/Slice Decision
76
114
  - Brownfield Analysis status
77
115
  - CD+Tests, CR, QA, UAT status
78
116
  - signs of documentation/runtime/product-semantics drift
@@ -86,6 +124,9 @@ If a status is not explicit, do not assume it is satisfied.
86
124
  4. Derive allowed and forbidden outputs.
87
125
  5. Name the exact missing approval, if any.
88
126
  6. If consent was only implicit, say it is not yet approval and provide the exact formula.
127
+ 7. Ensure the next step follows the gate transition table. In particular, never jump from `Approval: UR` to implementation.
128
+ 8. Treat a generic "start", "continue" or "leg los" request as a request to perform only the current next allowed action.
129
+ 9. After Brownfield Review, choose the smallest safe process path before creating later artefacts.
89
130
 
90
131
  ## Output
91
132
  Keep the result short and operational:
@@ -101,8 +142,15 @@ Keep the result short and operational:
101
142
  This skill must not:
102
143
 
103
144
  - create PRD before UR approval
145
+ - create PRD before required Brownfield Review is done or explicitly not_applicable
146
+ - create PRD before Mode/Slice Decision is recorded
104
147
  - create SD before PRD approval
105
148
  - create TP while earlier gates block
149
+ - suggest implementation immediately after `Approval: UR`
150
+ - suggest implementation before Brownfield Review has explicitly selected `quick_task`
151
+ - suggest implementation immediately after `Approval: PRD`
152
+ - suggest implementation immediately after `Approval: SD`
153
+ - treat "ok", "leg los", "go ahead", "approved" or similar wording as gate approval
106
154
  - perform full Brownfield Analysis unless explicitly requested
107
155
  - provide implementation snippets while implementation is gated
108
156
  - present QA or UAT as passed without evidence
@@ -28,6 +28,7 @@ It reports:
28
28
  Use `../../meta/agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
29
29
 
30
30
  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
+ When `.agdf/control/` is present, persist or link the OR under `.agdf/control/artefacts/<key>/OR.md` and reference it from `AGDF_RUN.md` or `MASTER_BACKLOG.md` when it is steering-relevant.
31
32
 
32
33
  ## Rules
33
34
  1. OR is always allowed and mandatory for relevant runs.
@@ -77,15 +78,16 @@ If information is missing, state the gap instead of guessing.
77
78
  2. Determine report depth:
78
79
  - `OR-lite`: gate status, allowed/forbidden outputs, missing approval, next step
79
80
  - `OR-full`: also delivered artefacts, TP coverage, Brownfield fit, solution integrity, risks, fallbacks, QA/UAT status
80
- 3. Record delivered vs intentionally not delivered content.
81
- 4. Summarize TP coverage if a TP exists.
82
- 5. Summarize Brownfield fit and solution integrity if reviewed.
83
- 6. Summarize tests and verification.
84
- 7. Summarize documentation and Context Graph impact if relevant.
85
- 8. Name retained fallbacks and exit criteria.
86
- 9. Set exactly one next permissible step.
87
- 10. Set exactly one quality outlook.
88
- 11. State whether `delivery-closeout` is the next operational handoff step when code changes exist and the delivery state allows it.
81
+ 3. Record the selected `Report mode` and durable OR target or link when `.agdf/control/` exists.
82
+ 4. Record delivered vs intentionally not delivered content.
83
+ 5. Summarize TP coverage if a TP exists.
84
+ 6. Summarize Brownfield fit and solution integrity if reviewed.
85
+ 7. Summarize tests and verification.
86
+ 8. Summarize documentation and Context Graph impact if relevant.
87
+ 9. Name retained fallbacks and exit criteria.
88
+ 10. Set exactly one next permissible step.
89
+ 11. Set exactly one quality outlook.
90
+ 12. State whether `delivery-closeout` is the next operational handoff step when code changes exist and the delivery state allows it.
89
91
 
90
92
  ## Output
91
93
  Use a compact structure:
@@ -93,6 +95,8 @@ Use a compact structure:
93
95
  ```text
94
96
  ## OR
95
97
  - gate:
98
+ - report_mode:
99
+ - artefact:
96
100
  - status:
97
101
  - delivered:
98
102
  - intentionally_not_delivered:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agdf",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
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": [