create-agdf 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/bin/create-agdf.js +363 -9
  2. package/generated/.agdf/control/README.md +7 -1
  3. package/generated/.agdf/control/templates/AGDF_RUN.md +25 -1
  4. package/generated/.agdf/control/templates/MASTER_BACKLOG.md +16 -14
  5. package/generated/.agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +67 -0
  6. package/generated/.agdf/control/templates/artefacts/OR.md +86 -0
  7. package/generated/.agdf/control/templates/artefacts/UR.md +1 -1
  8. package/generated/.github/copilot-instructions.md +3 -0
  9. package/generated/.github/instructions/agdf-governance.instructions.md +1 -0
  10. package/generated/.github/skills/agdf-brownfield-analysis/SKILL.md +35 -17
  11. package/generated/.github/skills/agdf-gate-check/SKILL.md +33 -29
  12. package/generated/.github/skills/agdf-release-or/SKILL.md +17 -10
  13. package/generated/.github/skills/agdf-runtime-contract.md +102 -5
  14. package/generated/AGENTS.md +14 -4
  15. package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
  16. package/generated/plugins/agdf/control/README.md +7 -1
  17. package/generated/plugins/agdf/control/templates/AGDF_RUN.md +25 -1
  18. package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +16 -14
  19. package/generated/plugins/agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +67 -0
  20. package/generated/plugins/agdf/control/templates/artefacts/OR.md +86 -0
  21. package/generated/plugins/agdf/control/templates/artefacts/UR.md +1 -1
  22. package/generated/plugins/agdf/meta/agdf-agent-router.md +14 -4
  23. package/generated/plugins/agdf/meta/agdf-constitution.md +13 -4
  24. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +4 -4
  25. package/generated/plugins/agdf/meta/agdf-runtime-contract.md +102 -5
  26. package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +35 -17
  27. package/generated/plugins/agdf/skills/gate-check/SKILL.md +33 -29
  28. package/generated/plugins/agdf/skills/release-or/SKILL.md +17 -10
  29. package/package.json +1 -1
@@ -32,18 +32,24 @@ Use Structured Delivery Mode for new capabilities, architecture, policy, persist
32
32
  Any new product semantics, functional change or user-visible behaviour change requires a durable UR first.
33
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
34
  Treat approval text and durable artefact presence as separate checks for UR, PRD, SD, TP and QA report decisions.
35
-
36
- Quick Task Mode must still cite evidence and close with a concrete result.
35
+ Do not infer approval from "ok", "go ahead", "do it", "approved", "continue", "leg los" or similar wording.
36
+ Those phrases may express intent to proceed, but they do not unlock a gate unless the exact gate formula is present.
37
+ After `Approval: UR`, run lightweight Brownfield Review before PRD when Brownfield, ownership, runtime, policy, persistence, architecture, UI or UX impact is possible.
38
+ Brownfield Review must produce a Mode/Slice Decision: `quick_task`, `structured_slice`, `structured_delivery` or `block`.
39
+ Make that decision visible before coding or drafting later artefacts: state the selected path, scope reason, evidence and next required gate in the live control state or linked artefact.
40
+ Do not assume the full PRD/SD/TP chain before that decision; use only as much gate depth as the reviewed change size justifies.
41
+
42
+ Quick Task Mode must still use the Runtime Contract mini-output: `result`, `evidence`, `risk`, `next_step`.
37
43
  Structured Delivery Mode must respect gates, reviews and closeout discipline.
38
44
 
39
45
  ## Skill Routing
40
46
  | Skill | Use For | Boundary |
41
47
  |---|---|---|
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 |
48
+ | `agdf-brownfield-analysis` | after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems | clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission |
43
49
  | `agdf-clean-implementation-review` | inspect workarounds, fallbacks, parallel structures or symptom fixes | not a TP or QA substitute |
44
50
  | `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 |
45
51
  | `agdf-delivery-closeout` | commit/PR-near handoff after QA/OR/UAT | never performs VCS actions automatically |
46
- | `agdf-gate-check` | new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested | does not create later artefacts |
52
+ | `agdf-gate-check` | new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested | does not create later artefacts or skip Mode/Slice Decision after Brownfield Review |
47
53
  | `agdf-qa-gate` | final QA decision | only instance for `pass | revise | block` |
48
54
  | `agdf-release-or` | auditable closeout for every relevant run | not a QA substitute |
49
55
  | `agdf-task-plan-review` | after implementation and before QA, verify TP coverage | no final QA decision |
@@ -51,6 +57,7 @@ Structured Delivery Mode must respect gates, reviews and closeout discipline.
51
57
  Select exactly one primary skill first.
52
58
  Add more only when they cover a distinct concrete risk dimension.
53
59
  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.
60
+ Never jump directly from `Approval: UR`, implicit consent, or a generic "start" request to implementation. Route to Brownfield Review, then a visible Mode/Slice Decision with evidence, then the smallest safe next gate or Quick Task execution.
54
61
 
55
62
  ## Runtime Contract
56
63
  For repeated output, gate, Quality Contract and Context Graph rules, use:
@@ -65,6 +72,9 @@ Use templates as starting points only.
65
72
 
66
73
  Do not let chat history become the source of truth for gate state, approvals, evidence, backlog status or durable Brownfield knowledge.
67
74
 
75
+ AGDF is a native agent workflow first: read the live control state, apply the active skill and make the next allowed step explicit.
76
+ Use `doctor`, `gate-check --json` or `delivery-map --json` as validators when a machine-readable proof is useful, not as a substitute for the router or skills.
77
+
68
78
  ## Closeout
69
79
  After relevant code, documentation, skill or governance changes:
70
80
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
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",
@@ -9,12 +9,14 @@ Use this scaffold when a target repository should keep AGDF state outside chat h
9
9
  | File | Purpose |
10
10
  |---|---|
11
11
  | `templates/AGDF_RUN.md` | Template for current run state: mode, gate, approvals, evidence, risks, next allowed action |
12
- | `templates/MASTER_BACKLOG.md` | Template for the living backlog pointer: active initiatives and current UR/PRD/SD/TP artefacts |
12
+ | `templates/MASTER_BACKLOG.md` | Template for the living backlog pointer: active initiatives and current UR/Brownfield/PRD/SD/TP/QA/OR artefacts |
13
13
  | `templates/artefacts/UR.md` | Template for the durable user requirement artefact of a work item |
14
+ | `templates/artefacts/BROWNFIELD_REVIEW.md` | Template for the durable Brownfield Review and Mode/Slice Decision |
14
15
  | `templates/artefacts/PRD.md` | Template for the durable product requirements artefact |
15
16
  | `templates/artefacts/SD.md` | Template for the durable solution design artefact |
16
17
  | `templates/artefacts/TP.md` | Template for the durable task and test plan artefact |
17
18
  | `templates/artefacts/QA_REPORT.md` | Template for the durable QA decision report |
19
+ | `templates/artefacts/OR.md` | Template for the durable Orchestration Report closeout |
18
20
  | `templates/SOT_REGISTRY.md` | Template for the source-of-truth registry: one primary owner per domain |
19
21
  | `templates/CONTEXT_GRAPH.md` | Template for project memory: durable decisions, Brownfield findings, risks, evidence and exit criteria |
20
22
  | `templates/AGENT_QUALITY_CONTRACTS.json` | Template for machine-readable warning, revise and block contracts for review and QA |
@@ -29,10 +31,12 @@ Use this scaffold when a target repository should keep AGDF state outside chat h
29
31
  artefacts/
30
32
  <work-item>/
31
33
  UR.md
34
+ BROWNFIELD_REVIEW.md
32
35
  PRD.md
33
36
  SD.md
34
37
  TP.md
35
38
  QA_REPORT.md
39
+ OR.md
36
40
  SOT_REGISTRY.md
37
41
  CONTEXT_GRAPH.md
38
42
  AGENT_QUALITY_CONTRACTS.json
@@ -61,7 +65,9 @@ npm create agdf@latest gate-check --json
61
65
 
62
66
  - `AGDF_RUN.md` is the current run dashboard.
63
67
  - `MASTER_BACKLOG.md` points to active delivery work; detailed artefacts live beside the work item.
68
+ - Brownfield Review records the post-UR Mode/Slice Decision before PRD depth or Quick Task execution is chosen.
64
69
  - 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.
70
+ - OR records the run closeout and next permissible step; it does not approve later gates.
65
71
  - `SOT_REGISTRY.md` decides which document owns which domain.
66
72
  - `CONTEXT_GRAPH.md` records durable project knowledge only when it has evidence and an exit criterion.
67
73
  - `AGENT_QUALITY_CONTRACTS.json` names reusable block, revise and warning conditions.
@@ -5,7 +5,7 @@
5
5
  - run_id:
6
6
  - started_at:
7
7
  - mode: `quick_task | structured_delivery`
8
- - current_gate: `none | UR | PRD | SD | TP | CD+Tests | CR | QA | UAT | OR`
8
+ - current_gate: `none | UR | Brownfield Review | Mode/Slice Decision | PRD | SD | TP | Quick Task Execution | Brownfield Analysis | CD+Tests | CR | QA | UAT | OR`
9
9
  - decision: `pass | revise | block | in_progress`
10
10
  - owner:
11
11
 
@@ -44,10 +44,34 @@ Valid approval format for new runs: `Approval: <GateName>`.
44
44
  | PRD | | `draft | approved | superseded | not_applicable` | |
45
45
  | SD | | `draft | approved | superseded | not_applicable` | |
46
46
  | TP | | `draft | approved | superseded | not_applicable` | |
47
+ | Brownfield Review | | `missing | draft | done | not_applicable | superseded` | |
47
48
  | Review | | `missing | done | not_applicable` | |
48
49
  | QA | | `missing | pass | revise | block | not_applicable` | |
49
50
  | OR | | `missing | done | not_applicable` | |
50
51
 
52
+ ## Mode / Slice Decision
53
+
54
+ Set this after Brownfield Review. Do not assume the full gate chain before the existing-system impact is understood.
55
+ Quick Task execution or implementation is not allowed until this decision is visible with scope reason and evidence.
56
+
57
+ - decision: `undecided | quick_task | structured_slice | structured_delivery | block`
58
+ - required_next_gate: `none | PRD | SD | TP | Brownfield Analysis`
59
+ - scope_reason:
60
+ - evidence:
61
+ - transparency_note:
62
+
63
+ ## Artefact Chain
64
+
65
+ Keep the active work item traceable. A gate may open only when the previous gate has both exact approval and a durable or linked artefact.
66
+
67
+ | From | Relationship | To | Evidence |
68
+ |---|---|---|---|
69
+ | UR | `approved_by` | `Approval: UR` | |
70
+ | PRD | `derived_from` | UR | |
71
+ | SD | `derived_from` | PRD | |
72
+ | TP | `derived_from` | SD | |
73
+ | QA_REPORT | `tests` | TP | |
74
+
51
75
  ## Evidence
52
76
 
53
77
  | Evidence | Source | Covers | Strength |
@@ -1,30 +1,32 @@
1
1
  # AGDF Master Backlog
2
2
 
3
- This file is the living control pointer for active AGDF delivery work. Detailed UR, PRD, SD, TP, QA and OR artefacts should live in stable paths and be linked from here.
3
+ This file is the living control pointer for active AGDF delivery work. Detailed UR, Brownfield Review, PRD, SD, TP, QA and OR artefacts should live in stable paths and be linked from here.
4
4
 
5
5
  ## Rules
6
6
 
7
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
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.
9
+ 3. Brownfield Review is created for the same work item after UR approval when existing-system impact must be sized before PRD depth or Quick Task execution.
10
+ 4. PRD, SD, TP and QA report artefacts are created for the same work item after the previous gate is approved and persisted or linked.
11
+ 5. `Approval: PRD`, `Approval: SD`, `Approval: TP` and `Approval: QA` require the corresponding durable artefact or linked repository SoT before the next gate can open.
12
+ 6. Generic consent such as "ok", "go ahead", "do it", "continue", "leg los" or "approved" does not update a gate. Only `Approval: <GateName>` does.
13
+ 7. Keep only steering-relevant work in `Active Backlog`.
14
+ 8. Every active item has exactly one current spec pointer and a visible artefact chain.
15
+ 9. Historical artefacts remain linkable but do not override the current pointer.
16
+ 10. If an item is superseded, mark the replacement.
17
+ 11. If active work grows beyond roughly ten items, triage the backlog.
16
18
 
17
19
  ## Active Backlog
18
20
 
19
- | Prio | Key | Title | Status | Current Spec | Notes |
20
- |---:|---|---|---|---|---|
21
- | P1 | | | `in_progress | blocked` | | |
21
+ | Prio | Key | Title | Status | UR | Brownfield Review | PRD | SD | TP | QA | OR | Current Spec | Notes |
22
+ |---:|---|---|---|---|---|---|---|---|---|---|---|---|
23
+ | P1 | | | `in_progress | blocked` | | | | | | | | | |
22
24
 
23
25
  ## Planned / Parking Lot
24
26
 
25
- | Prio | Key | Title | Status | Current Spec | Notes |
26
- |---:|---|---|---|---|---|
27
- | P2 | | | `planned | review_needed` | | |
27
+ | Prio | Key | Title | Status | UR | Brownfield Review | PRD | SD | TP | QA | OR | Current Spec | Notes |
28
+ |---:|---|---|---|---|---|---|---|---|---|---|---|---|
29
+ | P2 | | | `planned | review_needed` | | | | | | | | | |
28
30
 
29
31
  ## Completed / Superseded Pointers
30
32
 
@@ -0,0 +1,67 @@
1
+ # Brownfield Review: <Title>
2
+
3
+ Gate: Brownfield Review
4
+ Type: Brownfield Review
5
+ Mode: `post_ur_review`
6
+ Status: `draft | done | not_applicable | superseded`
7
+
8
+ ## Run
9
+
10
+ - run_id:
11
+ - related_ur:
12
+ - current_gate:
13
+ - reviewer:
14
+ - reviewed_at:
15
+
16
+ ## Objective
17
+
18
+ What approved UR scope is being sized and routed?
19
+
20
+ ## Existing-System View
21
+
22
+ | Area | Existing owner or artefact | Evidence | Impact |
23
+ |---|---|---|---|
24
+ | Product semantics | | | `none | low | medium | high` |
25
+ | Source of truth | | | `none | low | medium | high` |
26
+ | Runtime path | | | `none | low | medium | high` |
27
+ | UI / UX | | | `none | low | medium | high` |
28
+ | Persistence / data | | | `none | low | medium | high` |
29
+ | Tests / QA | | | `none | low | medium | high` |
30
+ | Release / operations | | | `none | low | medium | high` |
31
+
32
+ ## Reuse And Parallel-Structure Risk
33
+
34
+ | Finding | Evidence | Risk | Required action |
35
+ |---|---|---|---|
36
+ | | | `none | warn | revise | block` | |
37
+
38
+ ## Mode / Slice Decision
39
+
40
+ - decision: `quick_task | structured_slice | structured_delivery | block`
41
+ - required_next_gate: `none | PRD | SD | TP | Brownfield Analysis`
42
+ - scope_reason:
43
+ - evidence:
44
+ - transparency_note:
45
+
46
+ ## PRD / SD Open Questions
47
+
48
+ | Question | Required gate | Impact |
49
+ |---|---|---|
50
+ | | `none | PRD | SD | TP` | `warn | revise | block` |
51
+
52
+ ## Context Graph Impact
53
+
54
+ - context_graph_impact: `none | link_only | update_existing_node | new_node_required | sot_drift`
55
+ - context_graph_refs:
56
+ - context_graph_required_action: `none | link | update | create | resolve_drift`
57
+ - context_graph_gate_effect: `none | warning | revise | block`
58
+ - context_graph_evidence:
59
+
60
+ ## Next Permissible Step
61
+
62
+ - next_allowed_action:
63
+ - forbidden_until_then:
64
+
65
+ ## Quality Outlook
66
+
67
+ - quality_outlook:
@@ -0,0 +1,86 @@
1
+ # OR: <Title>
2
+
3
+ Gate: OR
4
+ Type: Orchestration Report
5
+ Report mode: `OR-lite | OR-full`
6
+ Status: `draft | done | superseded`
7
+
8
+ ## Run
9
+
10
+ - run_id:
11
+ - related_ur:
12
+ - related_prd:
13
+ - related_sd:
14
+ - related_tp:
15
+ - related_qa_report:
16
+ - mode_slice_decision:
17
+ - current_gate:
18
+ - decision: `pass | revise | block | in_progress`
19
+
20
+ ## Gate State
21
+
22
+ | Gate or step | Status | Evidence |
23
+ |---|---|---|
24
+ | UR | | |
25
+ | Brownfield Review | | |
26
+ | Mode/Slice Decision | | |
27
+ | PRD | | |
28
+ | SD | | |
29
+ | TP | | |
30
+ | Brownfield Analysis | | |
31
+ | CD+Tests | | |
32
+ | CR | | |
33
+ | QA | | |
34
+ | UAT | | |
35
+
36
+ ## Delivered
37
+
38
+ | Item | Evidence |
39
+ |---|---|
40
+ | | |
41
+
42
+ ## Not Delivered / Intentionally Deferred
43
+
44
+ | Item | Reason | Next owner or gate |
45
+ |---|---|---|
46
+ | | | |
47
+
48
+ ## Evidence
49
+
50
+ | Evidence | Source | Covers | Strength |
51
+ |---|---|---|---|
52
+ | | | | `direct | indirect | weak` |
53
+
54
+ ## Missing Evidence
55
+
56
+ | Missing evidence | Impact | Required next step |
57
+ |---|---|---|
58
+ | | `warn | revise | block` | |
59
+
60
+ ## Risks And Open Items
61
+
62
+ | Risk or open item | Impact | Owner or mitigation |
63
+ |---|---|---|
64
+ | | `warn | revise | block` | |
65
+
66
+ ## Context Graph Impact
67
+
68
+ - context_graph_impact: `none | link_only | update_existing_node | new_node_required | sot_drift`
69
+ - context_graph_refs:
70
+ - context_graph_required_action: `none | link | update | create | resolve_drift`
71
+ - context_graph_gate_effect: `none | warning | revise | block`
72
+ - context_graph_evidence:
73
+
74
+ ## Next Permissible Step
75
+
76
+ - next_allowed_action:
77
+ - required_approval:
78
+ - forbidden_until_then:
79
+
80
+ ## Quality Outlook
81
+
82
+ - quality_outlook:
83
+
84
+ ## Approval
85
+
86
+ OR does not approve later gates. It records the next permissible step.
@@ -32,7 +32,7 @@ Which existing repository artefacts, docs, code paths or decisions must be respe
32
32
 
33
33
  ## 7. Risks And Unknowns
34
34
 
35
- Which questions must PRD, SD or Brownfield Analysis clarify later?
35
+ Which questions must Brownfield Review, PRD, SD or later implementation-preparation Brownfield Analysis clarify?
36
36
 
37
37
  ## 8. Next Step
38
38
 
@@ -33,18 +33,24 @@ Use Structured Delivery Mode for new capabilities, architecture, policy, persist
33
33
  Any new product semantics, functional change or user-visible behaviour change requires a durable UR first.
34
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
35
  Treat approval text and durable artefact presence as separate checks for UR, PRD, SD, TP and QA report decisions.
36
-
37
- Quick Task Mode must still cite evidence and close with a concrete result.
36
+ Do not infer approval from "ok", "go ahead", "do it", "approved", "continue", "leg los" or similar wording.
37
+ Those phrases may express intent to proceed, but they do not unlock a gate unless the exact gate formula is present.
38
+ After `Approval: UR`, run lightweight Brownfield Review before PRD when Brownfield, ownership, runtime, policy, persistence, architecture, UI or UX impact is possible.
39
+ Brownfield Review must produce a Mode/Slice Decision: `quick_task`, `structured_slice`, `structured_delivery` or `block`.
40
+ Make that decision visible before coding or drafting later artefacts: state the selected path, scope reason, evidence and next required gate in the live control state or linked artefact.
41
+ Do not assume the full PRD/SD/TP chain before that decision; use only as much gate depth as the reviewed change size justifies.
42
+
43
+ Quick Task Mode must still use the Runtime Contract mini-output: `result`, `evidence`, `risk`, `next_step`.
38
44
  Structured Delivery Mode must respect gates, reviews and closeout discipline.
39
45
 
40
46
  ## Skill Routing
41
47
  | Skill | Use For | Boundary |
42
48
  |---|---|---|
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 |
49
+ | `brownfield-analysis` | after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems | clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission |
44
50
  | `clean-implementation-review` | inspect workarounds, fallbacks, parallel structures or symptom fixes | not a TP or QA substitute |
45
51
  | `code-review` | mandatory CR step after code changes, focused on defects, regression and security findings | does not replace TP review, clean review or QA |
46
52
  | `delivery-closeout` | commit/PR-near handoff after QA/OR/UAT | never performs VCS actions automatically |
47
- | `gate-check` | new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested | does not create later artefacts |
53
+ | `gate-check` | new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested | does not create later artefacts or skip Mode/Slice Decision after Brownfield Review |
48
54
  | `qa-gate` | final QA decision | only instance for `pass | revise | block` |
49
55
  | `release-or` | auditable closeout for every relevant run | not a QA substitute |
50
56
  | `task-plan-review` | after implementation and before QA, verify TP coverage | no final QA decision |
@@ -52,6 +58,7 @@ Structured Delivery Mode must respect gates, reviews and closeout discipline.
52
58
  Select exactly one primary skill first.
53
59
  Add more only when they cover a distinct concrete risk dimension.
54
60
  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.
61
+ Never jump directly from `Approval: UR`, implicit consent, or a generic "start" request to implementation. Route to Brownfield Review, then a visible Mode/Slice Decision with evidence, then the smallest safe next gate or Quick Task execution.
55
62
 
56
63
  ## Runtime Contract
57
64
  For repeated output, gate, Quality Contract and Context Graph rules, use:
@@ -66,6 +73,9 @@ Use templates as starting points only.
66
73
 
67
74
  Do not let chat history become the source of truth for gate state, approvals, evidence, backlog status or durable Brownfield knowledge.
68
75
 
76
+ AGDF is a native agent workflow first: read the live control state, apply the active skill and make the next allowed step explicit.
77
+ Use `doctor`, `gate-check --json` or `delivery-map --json` as validators when a machine-readable proof is useful, not as a substitute for the router or skills.
78
+
69
79
  ## Closeout
70
80
  After relevant code, documentation, skill or governance changes:
71
81
 
@@ -184,11 +184,11 @@ Gate Discipline
184
184
 
185
185
  AGDF work follows a gate-driven flow:
186
186
 
187
- UR → PRD → SD → TP → QA → UAT
187
+ UR → Brownfield Review → Mode/Slice Decision → PRD/SD/TP as needed → QA → UAT
188
188
 
189
189
  with internal process steps:
190
190
 
191
- Brownfield Analysis → CD+Tests → CR → OR
191
+ Brownfield Review → Mode/Slice Decision → Brownfield Analysis → CD+Tests → CR → OR
192
192
 
193
193
  Rules:
194
194
 
@@ -199,8 +199,17 @@ Rules:
199
199
  `Approval: <GateName>`
200
200
  Legacy German runs may contain `Freigabe: <GateName>`; keep it as an
201
201
  interpretation alias only and write new artefacts with `Approval:`.
202
- * **Implicit consent is not consent**: "ok", "go", "approved" or similar
203
- 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`.
204
213
  * **No gate leaks**: Later gate artefacts must not be produced when an
205
214
  earlier gate is still blocking.
206
215
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.2.3",
4
+ "version": "0.2.5",
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",
@@ -15,26 +15,97 @@ Structured Delivery must not bypass missing approvals.
15
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
16
  UR, PRD, SD, TP and QA report approvals require durable artefacts or linked authoritative repository SoT entries before the next gate can open.
17
17
 
18
+ ## Quick Task Output
19
+
20
+ Quick Tasks are intentionally lightweight, but they must not become invisible.
21
+ Use this compact output shape when no formal gate artefact is required:
22
+
23
+ - `result`: what changed or was concluded
24
+ - `evidence`: files, commands, observations, or reasoning that support the result
25
+ - `risk`: remaining risk or `none`
26
+ - `next_step`: the single next useful action or `none`
27
+
28
+ ## Relevant Run
29
+
30
+ A relevant run is any run that changes durable state, creates or updates an AGDF artefact, changes code or runtime behaviour, performs a gate decision, blocks on a governance condition, produces QA/UAT/release evidence, or closes a delivery slice.
31
+
32
+ OR is not mandatory for a pure explanation, read-only inspection, small review, or local debugging step that produces no durable state change and no gate consequence.
33
+ When in doubt, use a short OR-lite only if it clarifies gate state, evidence, risk, or the next permissible step.
34
+
18
35
  ## Gate Rules
19
36
 
20
37
  - User gates: `UR -> PRD -> SD -> TP -> QA -> UAT`
21
- - Internal mandatory steps: `Brownfield Analysis -> CD+Tests -> CR -> OR`
38
+ - Internal mandatory steps: `Brownfield Review -> Mode/Slice Decision -> Brownfield Analysis -> CD+Tests -> CR -> OR`
22
39
  - Exact approval formula: `Approval: <GateName>`
23
40
  - Legacy alias: `Freigabe: <GateName>` may be accepted when reviewing older German runs, but all new outputs must use `Approval: <GateName>`.
24
- - Implicit consent is not approval.
41
+ - 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.
25
42
  - The earliest blocking gate wins.
26
43
  - 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.
44
+ - 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.
45
+ - 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.
46
+ - `Approval: UR` permits Brownfield Review after G-00 first, then a Mode/Slice Decision. It never permits implementation by itself.
47
+ - PRD, SD and TP depth is chosen after Brownfield Review through the Mode/Slice Decision, not before existing-system impact is understood.
48
+ - The Mode/Slice Decision must be visible before any PRD shortcut, Quick Task execution or implementation: record the decision, required next gate, scope reason and evidence in `AGDF_RUN.md` or an equivalent linked control artefact.
29
49
  - `Approval: PRD` permits Solution Design drafting, not implementation.
30
50
  - `Approval: SD` permits Task/Test Plan drafting, not implementation.
31
- - `Approval: TP` permits Brownfield Analysis and then CD+Tests when Brownfield evidence supports it.
51
+ - `Approval: TP` permits implementation-preparation Brownfield Analysis and then CD+Tests when Brownfield evidence supports it.
32
52
  - `CD+Tests` is implementation and test status only, not a delivery signal.
33
53
  - `code-review` standardizes the mandatory `CR` step, but does not replace QA.
34
54
  - `qa-gate` decides final `pass | revise | block`.
35
55
  - `release-or` reports the run, but does not replace QA or produce the operative commit/PR handoff.
36
56
  - `delivery-closeout` owns the operative Git handoff text when QA/OR/UAT state allows it.
37
57
 
58
+ ## Brownfield Review After G-00
59
+
60
+ 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.
61
+
62
+ This review is not a new user approval gate, not PRD, not SD, not TP and not implementation permission.
63
+ It is the sizing and routing step that decides how much later gate discipline is actually needed.
64
+
65
+ Its output is limited to:
66
+
67
+ - workstream or follow-up-slice classification
68
+ - `Mode/Slice Decision`: `quick_task | structured_slice | structured_delivery | block`
69
+ - affected existing owners, source-of-truth artefacts, contracts, policies, runtime paths or tests
70
+ - reuse-before-create risks and parallel-structure risks
71
+ - open questions that PRD or SD must resolve
72
+ - whether implementation-preparation Brownfield Analysis will also be needed after TP
73
+
74
+ Mode/Slice Decision rules:
75
+
76
+ - `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.
77
+ - `structured_slice`: use when some formal artefacts are needed, but they can stay intentionally small and scoped to the approved slice.
78
+ - `structured_delivery`: use when the change has broad product, architecture, runtime, policy, persistence, release or cross-owner impact.
79
+ - `block`: use when ownership, SoT, impact, evidence or product direction is not clear enough to choose a safe path.
80
+
81
+ A Mode/Slice Decision without scope reason and evidence is not recorded. Treat it as missing and keep the next step at `Mode/Slice Decision`.
82
+
83
+ ## Gate Transition Model
84
+
85
+ This table is the canonical transition model. Skills may reference it, but must not carry a second complete copy.
86
+
87
+ | State | Current gate or step | Allowed | Forbidden | Missing approval |
88
+ |---|---|---|---|---|
89
+ | No approved UR | `UR` | clarify user need, formulate and persist UR, request `Approval: UR` | PRD, SD, TP, Brownfield Analysis, implementation, QA, release | `Approval: UR` |
90
+ | `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 |
91
+ | Brownfield Review done or not_applicable, Mode/Slice Decision missing or incomplete | `Mode/Slice Decision` | decide `quick_task`, `structured_slice`, `structured_delivery` or `block`; record scope reason, evidence and required next gate depth | PRD, SD, TP, implementation, QA, release | none |
92
+ | Mode/Slice Decision is `quick_task` | `Quick Task Execution` | implement only the narrow approved UR scope, run relevant checks, record evidence and OR-lite when the run is relevant | broad PRD/SD/TP by ritual, scope expansion, QA or release claims without evidence | none |
93
+ | 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` |
94
+ | `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` |
95
+ | `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` |
96
+ | `TP` approved and TP artefact persisted or linked, Brownfield Analysis missing | `Brownfield Analysis` | run Brownfield Analysis for approved TP scope | implementation, QA, release | none |
97
+ | Brownfield Analysis passed for approved TP | `CD+Tests` | implement approved TP tasks and run tests | QA pass, UAT, release | none |
98
+ | `QA` approved but QA report missing or not pass | `QA` | persist/link QA report with `pass` decision or revise/block evidence | UAT, release | none |
99
+
100
+ ## Brownfield Modes
101
+
102
+ The `brownfield-analysis` skill has two explicit modes:
103
+
104
+ - `post_ur_review`: lightweight sizing and routing after approved durable UR; decides Mode/Slice Decision before PRD depth or implementation is chosen.
105
+ - `pre_implementation_analysis`: implementation-preparation analysis after approved durable TP; verifies reuse path, owners, regression risk and fit before `CD+Tests`.
106
+
107
+ Do not mix the modes silently. Name the active mode in Brownfield output.
108
+
38
109
  ## Quality Contract Output
39
110
 
40
111
  Structured Delivery skills use this shape when relevant:
@@ -68,12 +139,38 @@ When a repository needs durable AGDF state, use the plugin-local `control/` scaf
68
139
 
69
140
  - `AGDF_RUN.md` is the current run dashboard.
70
141
  - `MASTER_BACKLOG.md` is the living pointer for active delivery work.
142
+ - `BROWNFIELD_REVIEW.md` records the post-UR existing-system view and Mode/Slice Decision before PRD depth or Quick Task execution is chosen.
71
143
  - `SOT_REGISTRY.md` prevents parallel sources of truth.
72
144
  - `CONTEXT_GRAPH.md` stores durable Brownfield findings, decisions, risks, evidence and exit criteria.
73
145
  - `AGENT_QUALITY_CONTRACTS.json` stores reusable block, revise and warning conditions.
146
+ - OR reports live under `.agdf/control/artefacts/<key>/OR.md` when a run closeout is steering-relevant or should be auditable beyond the chat.
74
147
 
75
148
  The scaffold is not a second documentation site. Link to authoritative artefacts instead of copying them.
76
149
 
150
+ ## Native Runtime
151
+
152
+ AGDF must work natively through the plugin router, skills and live `.agdf/control/` artefacts.
153
+ Agents should read the live control state and apply the gate model directly before reaching for helper commands.
154
+
155
+ Machine-readable commands such as `doctor --json`, `gate-check --json` and `delivery-map --json` are validators and automation interfaces.
156
+ They make the repository state checkable, but they do not replace the native skill workflow or the durable control artefacts.
157
+
158
+ ## Delivery Map
159
+
160
+ `delivery-map --json` is the machine-readable delivery picture for the active control state.
161
+ It derives, but does not replace, the live `.agdf/control/AGDF_RUN.md` and `MASTER_BACKLOG.md` state.
162
+
163
+ It must expose:
164
+
165
+ - approved or active artefacts and approvals
166
+ - `UR -> PRD -> SD -> TP -> QA_REPORT` relationships
167
+ - evidence refs, missing evidence and declared risks
168
+ - Context Graph impact and gate effect
169
+ - findings that explain why the delivery picture is `pass | warn | revise | block`
170
+
171
+ Missing relationship evidence in the Artefact Chain is at least `revise` once the related gate artefact is approved or passed.
172
+ Declared missing evidence, declared risk or Context Graph gate effect may escalate the delivery map to `warn`, `revise` or `block`.
173
+
77
174
  ## Skill Output
78
175
 
79
176
  Every skill output should be as short as possible and as concrete as needed.