create-agdf 0.2.4 → 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.
- package/bin/create-agdf.js +16 -10
- package/generated/.agdf/control/README.md +4 -1
- package/generated/.agdf/control/templates/AGDF_RUN.md +3 -1
- package/generated/.agdf/control/templates/MASTER_BACKLOG.md +16 -15
- package/generated/.agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +67 -0
- package/generated/.github/skills/agdf-brownfield-analysis/SKILL.md +13 -2
- package/generated/.github/skills/agdf-gate-check/SKILL.md +5 -25
- package/generated/.github/skills/agdf-release-or/SKILL.md +4 -1
- package/generated/.github/skills/agdf-runtime-contract.md +47 -0
- package/generated/AGENTS.md +3 -2
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/control/README.md +4 -1
- package/generated/plugins/agdf/control/templates/AGDF_RUN.md +3 -1
- package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +16 -15
- package/generated/plugins/agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +67 -0
- package/generated/plugins/agdf/meta/agdf-agent-router.md +3 -2
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/agdf/meta/agdf-runtime-contract.md +47 -0
- package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +13 -2
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +5 -25
- package/generated/plugins/agdf/skills/release-or/SKILL.md +4 -1
- package/package.json +1 -1
package/bin/create-agdf.js
CHANGED
|
@@ -35,6 +35,7 @@ const codexPluginFiles = [
|
|
|
35
35
|
join("plugins", "agdf", "control", "templates", "CONTEXT_GRAPH.md"),
|
|
36
36
|
join("plugins", "agdf", "control", "templates", "AGENT_QUALITY_CONTRACTS.json"),
|
|
37
37
|
join("plugins", "agdf", "control", "templates", "artefacts", "UR.md"),
|
|
38
|
+
join("plugins", "agdf", "control", "templates", "artefacts", "BROWNFIELD_REVIEW.md"),
|
|
38
39
|
join("plugins", "agdf", "control", "templates", "artefacts", "PRD.md"),
|
|
39
40
|
join("plugins", "agdf", "control", "templates", "artefacts", "SD.md"),
|
|
40
41
|
join("plugins", "agdf", "control", "templates", "artefacts", "TP.md"),
|
|
@@ -57,6 +58,7 @@ const controlFiles = [
|
|
|
57
58
|
join(".agdf", "control", "templates", "CONTEXT_GRAPH.md"),
|
|
58
59
|
join(".agdf", "control", "templates", "AGENT_QUALITY_CONTRACTS.json"),
|
|
59
60
|
join(".agdf", "control", "templates", "artefacts", "UR.md"),
|
|
61
|
+
join(".agdf", "control", "templates", "artefacts", "BROWNFIELD_REVIEW.md"),
|
|
60
62
|
join(".agdf", "control", "templates", "artefacts", "PRD.md"),
|
|
61
63
|
join(".agdf", "control", "templates", "artefacts", "SD.md"),
|
|
62
64
|
join(".agdf", "control", "templates", "artefacts", "TP.md"),
|
|
@@ -87,6 +89,7 @@ const liveControlFiles = [
|
|
|
87
89
|
];
|
|
88
90
|
const artefactTemplateFiles = [
|
|
89
91
|
join(".agdf", "control", "templates", "artefacts", "UR.md"),
|
|
92
|
+
join(".agdf", "control", "templates", "artefacts", "BROWNFIELD_REVIEW.md"),
|
|
90
93
|
join(".agdf", "control", "templates", "artefacts", "PRD.md"),
|
|
91
94
|
join(".agdf", "control", "templates", "artefacts", "SD.md"),
|
|
92
95
|
join(".agdf", "control", "templates", "artefacts", "TP.md"),
|
|
@@ -745,7 +748,9 @@ function isInternalStepSatisfied(runState, step) {
|
|
|
745
748
|
|
|
746
749
|
function modeSliceDecision(runState) {
|
|
747
750
|
const decision = runState.mode_slice_decision?.decision ?? "";
|
|
748
|
-
|
|
751
|
+
const scopeReason = runState.mode_slice_decision?.scope_reason ?? "";
|
|
752
|
+
const evidence = runState.mode_slice_decision?.evidence ?? "";
|
|
753
|
+
if (!decision || isPlaceholderValue(decision) || !filled(scopeReason) || !filled(evidence)) return "undecided";
|
|
749
754
|
return decision;
|
|
750
755
|
}
|
|
751
756
|
|
|
@@ -917,11 +922,11 @@ function transitionDecisionForRunState(runState) {
|
|
|
917
922
|
missing_approval: "none",
|
|
918
923
|
allowed: [
|
|
919
924
|
"decide whether the approved UR is quick_task, structured_slice, structured_delivery or block",
|
|
920
|
-
"record scope reason and
|
|
925
|
+
"record scope reason, evidence and required next gate depth in AGDF_RUN.md",
|
|
921
926
|
"choose the next required gate depth before drafting PRD or implementing",
|
|
922
927
|
],
|
|
923
928
|
forbidden: ["create PRD before process size is decided", "create SD", "create TP", "implement code", "claim QA or release readiness"],
|
|
924
|
-
next_allowed_action: "Record the Mode/Slice Decision from Brownfield Review before choosing PRD depth or Quick Task execution.",
|
|
929
|
+
next_allowed_action: "Record the Mode/Slice Decision from Brownfield Review with scope reason and evidence before choosing PRD depth or Quick Task execution.",
|
|
925
930
|
};
|
|
926
931
|
}
|
|
927
932
|
|
|
@@ -1091,13 +1096,14 @@ function readBacklogPointers(targetDir) {
|
|
|
1091
1096
|
title: cells[2] ?? "",
|
|
1092
1097
|
status: cleanStatusCell(cells[3] ?? ""),
|
|
1093
1098
|
ur: cells[4] ?? "",
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1099
|
+
brownfield_review: cells[5] ?? "",
|
|
1100
|
+
prd: cells[6] ?? "",
|
|
1101
|
+
sd: cells[7] ?? "",
|
|
1102
|
+
tp: cells[8] ?? "",
|
|
1103
|
+
qa: cells[9] ?? "",
|
|
1104
|
+
or: cells[10] ?? "",
|
|
1105
|
+
current_spec: cells[11] ?? "",
|
|
1106
|
+
notes: cells[12] ?? "",
|
|
1101
1107
|
}));
|
|
1102
1108
|
}
|
|
1103
1109
|
|
|
@@ -9,8 +9,9 @@ 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/QA/OR 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 |
|
|
@@ -30,6 +31,7 @@ Use this scaffold when a target repository should keep AGDF state outside chat h
|
|
|
30
31
|
artefacts/
|
|
31
32
|
<work-item>/
|
|
32
33
|
UR.md
|
|
34
|
+
BROWNFIELD_REVIEW.md
|
|
33
35
|
PRD.md
|
|
34
36
|
SD.md
|
|
35
37
|
TP.md
|
|
@@ -63,6 +65,7 @@ npm create agdf@latest gate-check --json
|
|
|
63
65
|
|
|
64
66
|
- `AGDF_RUN.md` is the current run dashboard.
|
|
65
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.
|
|
66
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.
|
|
67
70
|
- OR records the run closeout and next permissible step; it does not approve later gates.
|
|
68
71
|
- `SOT_REGISTRY.md` decides which document owns which domain.
|
|
@@ -44,7 +44,7 @@ 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 | done | not_applicable` | |
|
|
47
|
+
| Brownfield Review | | `missing | draft | done | not_applicable | superseded` | |
|
|
48
48
|
| Review | | `missing | done | not_applicable` | |
|
|
49
49
|
| QA | | `missing | pass | revise | block | not_applicable` | |
|
|
50
50
|
| OR | | `missing | done | not_applicable` | |
|
|
@@ -52,11 +52,13 @@ Valid approval format for new runs: `Approval: <GateName>`.
|
|
|
52
52
|
## Mode / Slice Decision
|
|
53
53
|
|
|
54
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.
|
|
55
56
|
|
|
56
57
|
- decision: `undecided | quick_task | structured_slice | structured_delivery | block`
|
|
57
58
|
- required_next_gate: `none | PRD | SD | TP | Brownfield Analysis`
|
|
58
59
|
- scope_reason:
|
|
59
60
|
- evidence:
|
|
61
|
+
- transparency_note:
|
|
60
62
|
|
|
61
63
|
## Artefact Chain
|
|
62
64
|
|
|
@@ -1,31 +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.
|
|
10
|
-
4.
|
|
11
|
-
5.
|
|
12
|
-
6.
|
|
13
|
-
7.
|
|
14
|
-
8.
|
|
15
|
-
9.
|
|
16
|
-
10. If
|
|
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.
|
|
17
18
|
|
|
18
19
|
## Active Backlog
|
|
19
20
|
|
|
20
|
-
| Prio | Key | Title | Status | UR | PRD | SD | TP | QA | OR | Current Spec | Notes |
|
|
21
|
-
|
|
22
|
-
| 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` | | | | | | | | | |
|
|
23
24
|
|
|
24
25
|
## Planned / Parking Lot
|
|
25
26
|
|
|
26
|
-
| Prio | Key | Title | Status | UR | PRD | SD | TP | QA | OR | Current Spec | Notes |
|
|
27
|
-
|
|
28
|
-
| 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` | | | | | | | | | |
|
|
29
30
|
|
|
30
31
|
## Completed / Superseded Pointers
|
|
31
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:
|
|
@@ -22,10 +22,18 @@ The skill answers:
|
|
|
22
22
|
Use `../agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
|
|
23
23
|
|
|
24
24
|
Brownfield-specific output must make evidence, missing existing-system view, parallel-structure risk, reuse strategy, and the minimal next step visible.
|
|
25
|
+
When `.agdf/control/` is present, persist or link `post_ur_review` output under `.agdf/control/artefacts/<key>/BROWNFIELD_REVIEW.md`.
|
|
26
|
+
|
|
27
|
+
## Modes
|
|
28
|
+
|
|
29
|
+
- `post_ur_review`: use after approved durable UR to size and route the work. Output must decide `quick_task`, `structured_slice`, `structured_delivery`, or `block` with scope reason and evidence.
|
|
30
|
+
- `pre_implementation_analysis`: use after approved durable TP to verify the implementation path before `CD+Tests`. Output must focus on reuse path, owners, regression risk, test impact and minimal clean implementation.
|
|
31
|
+
|
|
32
|
+
Do not mix both modes silently. Name the active mode in the output.
|
|
25
33
|
|
|
26
34
|
## Rules
|
|
27
35
|
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.
|
|
36
|
+
2. Brownfield Review after `Approval: UR` is a sizing and routing step. It must visibly decide `quick_task`, `structured_slice`, `structured_delivery`, or `block` before PRD depth or implementation is chosen.
|
|
29
37
|
3. Reuse-before-create: prefer existing modules, services, components, tables, endpoints, tests, and configuration.
|
|
30
38
|
4. Minimal clean slice: choose the smallest durable intervention, not merely the smallest technical diff.
|
|
31
39
|
5. No silent parallel structures.
|
|
@@ -63,7 +71,7 @@ Use what is available:
|
|
|
63
71
|
|
|
64
72
|
If inputs are missing, work only from observable evidence and mark gaps explicitly.
|
|
65
73
|
If gate status, approval, scope or next allowed action is unclear, stop and route to `agdf-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.
|
|
74
|
+
When used as Brownfield Review after `Approval: UR`, do not recommend PRD, SD, TP, or implementation until the Mode/Slice Decision is explicit, evidenced and recorded.
|
|
67
75
|
|
|
68
76
|
## Workflow
|
|
69
77
|
1. Identify affected tasks and scope.
|
|
@@ -96,11 +104,14 @@ Use a concise structure:
|
|
|
96
104
|
|
|
97
105
|
```text
|
|
98
106
|
## Brownfield Analysis
|
|
107
|
+
- mode: post_ur_review | pre_implementation_analysis
|
|
99
108
|
- decision: pass | revise | block | not_applicable
|
|
100
109
|
- mode_slice_decision: quick_task | structured_slice | structured_delivery | block
|
|
101
110
|
- required_next_gate: none | PRD | SD | TP | Brownfield Analysis
|
|
111
|
+
- artefact: .agdf/control/artefacts/<key>/BROWNFIELD_REVIEW.md | none
|
|
102
112
|
- scope:
|
|
103
113
|
- evidence:
|
|
114
|
+
- transparency: why later artefacts are skipped, shortened or required
|
|
104
115
|
- missing_evidence:
|
|
105
116
|
- current_coverage:
|
|
106
117
|
- reuse_strategy:
|
|
@@ -19,6 +19,7 @@ This skill must not create later artefacts such as PRD, SD, TP, CD, CR, QA, or U
|
|
|
19
19
|
|
|
20
20
|
## Runtime Contract
|
|
21
21
|
Use `../agdf-runtime-contract.md` for gate terms, closeout discipline, and non-duplication rules.
|
|
22
|
+
The canonical gate order and transition model live only in the Runtime Contract. This skill evaluates the current state against that model; it must not maintain a second complete gate table.
|
|
22
23
|
|
|
23
24
|
## Native Control Path
|
|
24
25
|
|
|
@@ -59,35 +60,13 @@ The CLI reports are validators and JSON evidence, not the primary user experienc
|
|
|
59
60
|
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
61
|
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
62
|
13. After Brownfield Review, decide the process size before drafting PRD or implementing: `quick_task | structured_slice | structured_delivery | block`.
|
|
63
|
+
14. The Mode/Slice Decision must be visible and evidenced before any Quick Task execution, PRD shortcut or implementation. A decision value without scope reason and evidence is still missing.
|
|
62
64
|
|
|
63
|
-
## Gate
|
|
64
|
-
User gates:
|
|
65
|
-
|
|
66
|
-
`UR -> PRD -> SD -> TP -> QA -> UAT`
|
|
67
|
-
|
|
68
|
-
Internal mandatory steps:
|
|
69
|
-
|
|
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 |
|
|
65
|
+
## Gate Evaluation
|
|
88
66
|
|
|
89
67
|
If `Approval: UR` is present, do not say implementation is the next step.
|
|
90
68
|
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.
|
|
69
|
+
Use the Runtime Contract's Gate Transition Model to derive the current gate, allowed outputs, forbidden outputs and missing approval.
|
|
91
70
|
|
|
92
71
|
## When To Use
|
|
93
72
|
- new user intent to build, add, change, extend, refactor or deliver something
|
|
@@ -127,6 +106,7 @@ If a status is not explicit, do not assume it is satisfied.
|
|
|
127
106
|
7. Ensure the next step follows the gate transition table. In particular, never jump from `Approval: UR` to implementation.
|
|
128
107
|
8. Treat a generic "start", "continue" or "leg los" request as a request to perform only the current next allowed action.
|
|
129
108
|
9. After Brownfield Review, choose the smallest safe process path before creating later artefacts.
|
|
109
|
+
10. If the selected path is not visibly recorded with scope reason and evidence, keep the run at `Mode/Slice Decision`.
|
|
130
110
|
|
|
131
111
|
## Output
|
|
132
112
|
Keep the result short and operational:
|
|
@@ -29,9 +29,10 @@ Use `../agdf-runtime-contract.md` for Quality Contract output, Context Graph fie
|
|
|
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
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.
|
|
32
|
+
Use the Runtime Contract definition of `Relevant Run` to decide whether OR is mandatory or whether a Quick Task mini-closeout is enough.
|
|
32
33
|
|
|
33
34
|
## Rules
|
|
34
|
-
1. OR is always allowed and mandatory for relevant runs.
|
|
35
|
+
1. OR is always allowed and mandatory for relevant runs as defined in the Runtime Contract.
|
|
35
36
|
2. OR is an audit report, not a blocking gate.
|
|
36
37
|
3. Do not leak artefacts from blocked later gates.
|
|
37
38
|
4. Use OR-lite when early gates block.
|
|
@@ -52,6 +53,8 @@ When `.agdf/control/` is present, persist or link the OR under `.agdf/control/ar
|
|
|
52
53
|
- after UAT
|
|
53
54
|
- whenever a compact audit closeout is needed
|
|
54
55
|
|
|
56
|
+
Do not force OR onto a pure explanation, read-only inspection, small review, or local debugging step that produces no durable state change and no gate consequence.
|
|
57
|
+
|
|
55
58
|
## Inputs
|
|
56
59
|
Use what is available:
|
|
57
60
|
|
|
@@ -15,6 +15,23 @@ 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`
|
|
@@ -28,6 +45,7 @@ UR, PRD, SD, TP and QA report approvals require durable artefacts or linked auth
|
|
|
28
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.
|
|
29
46
|
- `Approval: UR` permits Brownfield Review after G-00 first, then a Mode/Slice Decision. It never permits implementation by itself.
|
|
30
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.
|
|
31
49
|
- `Approval: PRD` permits Solution Design drafting, not implementation.
|
|
32
50
|
- `Approval: SD` permits Task/Test Plan drafting, not implementation.
|
|
33
51
|
- `Approval: TP` permits implementation-preparation Brownfield Analysis and then CD+Tests when Brownfield evidence supports it.
|
|
@@ -60,6 +78,34 @@ Mode/Slice Decision rules:
|
|
|
60
78
|
- `structured_delivery`: use when the change has broad product, architecture, runtime, policy, persistence, release or cross-owner impact.
|
|
61
79
|
- `block`: use when ownership, SoT, impact, evidence or product direction is not clear enough to choose a safe path.
|
|
62
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 `agdf-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
|
+
|
|
63
109
|
## Quality Contract Output
|
|
64
110
|
|
|
65
111
|
Structured Delivery skills use this shape when relevant:
|
|
@@ -93,6 +139,7 @@ When a repository needs durable AGDF state, use the plugin-local `control/` scaf
|
|
|
93
139
|
|
|
94
140
|
- `AGDF_RUN.md` is the current run dashboard.
|
|
95
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.
|
|
96
143
|
- `SOT_REGISTRY.md` prevents parallel sources of truth.
|
|
97
144
|
- `CONTEXT_GRAPH.md` stores durable Brownfield findings, decisions, risks, evidence and exit criteria.
|
|
98
145
|
- `AGENT_QUALITY_CONTRACTS.json` stores reusable block, revise and warning conditions.
|
package/generated/AGENTS.md
CHANGED
|
@@ -36,9 +36,10 @@ Do not infer approval from "ok", "go ahead", "do it", "approved", "continue", "l
|
|
|
36
36
|
Those phrases may express intent to proceed, but they do not unlock a gate unless the exact gate formula is present.
|
|
37
37
|
After `Approval: UR`, run lightweight Brownfield Review before PRD when Brownfield, ownership, runtime, policy, persistence, architecture, UI or UX impact is possible.
|
|
38
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.
|
|
39
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.
|
|
40
41
|
|
|
41
|
-
Quick Task Mode must still
|
|
42
|
+
Quick Task Mode must still use the Runtime Contract mini-output: `result`, `evidence`, `risk`, `next_step`.
|
|
42
43
|
Structured Delivery Mode must respect gates, reviews and closeout discipline.
|
|
43
44
|
|
|
44
45
|
## Skill Routing
|
|
@@ -56,7 +57,7 @@ Structured Delivery Mode must respect gates, reviews and closeout discipline.
|
|
|
56
57
|
Select exactly one primary skill first.
|
|
57
58
|
Add more only when they cover a distinct concrete risk dimension.
|
|
58
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.
|
|
59
|
-
Never jump directly from `Approval: UR`, implicit consent, or a generic "start" request to implementation. Route to Brownfield Review, then Mode/Slice Decision, then the smallest safe next gate or Quick Task execution.
|
|
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.
|
|
60
61
|
|
|
61
62
|
## Runtime Contract
|
|
62
63
|
For repeated output, gate, Quality Contract and Context Graph rules, use:
|
|
@@ -9,8 +9,9 @@ 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/QA/OR 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 |
|
|
@@ -30,6 +31,7 @@ Use this scaffold when a target repository should keep AGDF state outside chat h
|
|
|
30
31
|
artefacts/
|
|
31
32
|
<work-item>/
|
|
32
33
|
UR.md
|
|
34
|
+
BROWNFIELD_REVIEW.md
|
|
33
35
|
PRD.md
|
|
34
36
|
SD.md
|
|
35
37
|
TP.md
|
|
@@ -63,6 +65,7 @@ npm create agdf@latest gate-check --json
|
|
|
63
65
|
|
|
64
66
|
- `AGDF_RUN.md` is the current run dashboard.
|
|
65
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.
|
|
66
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.
|
|
67
70
|
- OR records the run closeout and next permissible step; it does not approve later gates.
|
|
68
71
|
- `SOT_REGISTRY.md` decides which document owns which domain.
|
|
@@ -44,7 +44,7 @@ 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 | done | not_applicable` | |
|
|
47
|
+
| Brownfield Review | | `missing | draft | done | not_applicable | superseded` | |
|
|
48
48
|
| Review | | `missing | done | not_applicable` | |
|
|
49
49
|
| QA | | `missing | pass | revise | block | not_applicable` | |
|
|
50
50
|
| OR | | `missing | done | not_applicable` | |
|
|
@@ -52,11 +52,13 @@ Valid approval format for new runs: `Approval: <GateName>`.
|
|
|
52
52
|
## Mode / Slice Decision
|
|
53
53
|
|
|
54
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.
|
|
55
56
|
|
|
56
57
|
- decision: `undecided | quick_task | structured_slice | structured_delivery | block`
|
|
57
58
|
- required_next_gate: `none | PRD | SD | TP | Brownfield Analysis`
|
|
58
59
|
- scope_reason:
|
|
59
60
|
- evidence:
|
|
61
|
+
- transparency_note:
|
|
60
62
|
|
|
61
63
|
## Artefact Chain
|
|
62
64
|
|
|
@@ -1,31 +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.
|
|
10
|
-
4.
|
|
11
|
-
5.
|
|
12
|
-
6.
|
|
13
|
-
7.
|
|
14
|
-
8.
|
|
15
|
-
9.
|
|
16
|
-
10. If
|
|
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.
|
|
17
18
|
|
|
18
19
|
## Active Backlog
|
|
19
20
|
|
|
20
|
-
| Prio | Key | Title | Status | UR | PRD | SD | TP | QA | OR | Current Spec | Notes |
|
|
21
|
-
|
|
22
|
-
| 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` | | | | | | | | | |
|
|
23
24
|
|
|
24
25
|
## Planned / Parking Lot
|
|
25
26
|
|
|
26
|
-
| Prio | Key | Title | Status | UR | PRD | SD | TP | QA | OR | Current Spec | Notes |
|
|
27
|
-
|
|
28
|
-
| 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` | | | | | | | | | |
|
|
29
30
|
|
|
30
31
|
## Completed / Superseded Pointers
|
|
31
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:
|
|
@@ -37,9 +37,10 @@ Do not infer approval from "ok", "go ahead", "do it", "approved", "continue", "l
|
|
|
37
37
|
Those phrases may express intent to proceed, but they do not unlock a gate unless the exact gate formula is present.
|
|
38
38
|
After `Approval: UR`, run lightweight Brownfield Review before PRD when Brownfield, ownership, runtime, policy, persistence, architecture, UI or UX impact is possible.
|
|
39
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.
|
|
40
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.
|
|
41
42
|
|
|
42
|
-
Quick Task Mode must still
|
|
43
|
+
Quick Task Mode must still use the Runtime Contract mini-output: `result`, `evidence`, `risk`, `next_step`.
|
|
43
44
|
Structured Delivery Mode must respect gates, reviews and closeout discipline.
|
|
44
45
|
|
|
45
46
|
## Skill Routing
|
|
@@ -57,7 +58,7 @@ Structured Delivery Mode must respect gates, reviews and closeout discipline.
|
|
|
57
58
|
Select exactly one primary skill first.
|
|
58
59
|
Add more only when they cover a distinct concrete risk dimension.
|
|
59
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.
|
|
60
|
-
Never jump directly from `Approval: UR`, implicit consent, or a generic "start" request to implementation. Route to Brownfield Review, then Mode/Slice Decision, then the smallest safe next gate or Quick Task execution.
|
|
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.
|
|
61
62
|
|
|
62
63
|
## Runtime Contract
|
|
63
64
|
For repeated output, gate, Quality Contract and Context Graph rules, use:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"id": "agdf",
|
|
4
|
-
"version": "0.2.
|
|
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.",
|
|
@@ -15,6 +15,23 @@ 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`
|
|
@@ -28,6 +45,7 @@ UR, PRD, SD, TP and QA report approvals require durable artefacts or linked auth
|
|
|
28
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.
|
|
29
46
|
- `Approval: UR` permits Brownfield Review after G-00 first, then a Mode/Slice Decision. It never permits implementation by itself.
|
|
30
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.
|
|
31
49
|
- `Approval: PRD` permits Solution Design drafting, not implementation.
|
|
32
50
|
- `Approval: SD` permits Task/Test Plan drafting, not implementation.
|
|
33
51
|
- `Approval: TP` permits implementation-preparation Brownfield Analysis and then CD+Tests when Brownfield evidence supports it.
|
|
@@ -60,6 +78,34 @@ Mode/Slice Decision rules:
|
|
|
60
78
|
- `structured_delivery`: use when the change has broad product, architecture, runtime, policy, persistence, release or cross-owner impact.
|
|
61
79
|
- `block`: use when ownership, SoT, impact, evidence or product direction is not clear enough to choose a safe path.
|
|
62
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
|
+
|
|
63
109
|
## Quality Contract Output
|
|
64
110
|
|
|
65
111
|
Structured Delivery skills use this shape when relevant:
|
|
@@ -93,6 +139,7 @@ When a repository needs durable AGDF state, use the plugin-local `control/` scaf
|
|
|
93
139
|
|
|
94
140
|
- `AGDF_RUN.md` is the current run dashboard.
|
|
95
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.
|
|
96
143
|
- `SOT_REGISTRY.md` prevents parallel sources of truth.
|
|
97
144
|
- `CONTEXT_GRAPH.md` stores durable Brownfield findings, decisions, risks, evidence and exit criteria.
|
|
98
145
|
- `AGENT_QUALITY_CONTRACTS.json` stores reusable block, revise and warning conditions.
|
|
@@ -22,10 +22,18 @@ The skill answers:
|
|
|
22
22
|
Use `../../meta/agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
|
|
23
23
|
|
|
24
24
|
Brownfield-specific output must make evidence, missing existing-system view, parallel-structure risk, reuse strategy, and the minimal next step visible.
|
|
25
|
+
When `.agdf/control/` is present, persist or link `post_ur_review` output under `.agdf/control/artefacts/<key>/BROWNFIELD_REVIEW.md`.
|
|
26
|
+
|
|
27
|
+
## Modes
|
|
28
|
+
|
|
29
|
+
- `post_ur_review`: use after approved durable UR to size and route the work. Output must decide `quick_task`, `structured_slice`, `structured_delivery`, or `block` with scope reason and evidence.
|
|
30
|
+
- `pre_implementation_analysis`: use after approved durable TP to verify the implementation path before `CD+Tests`. Output must focus on reuse path, owners, regression risk, test impact and minimal clean implementation.
|
|
31
|
+
|
|
32
|
+
Do not mix both modes silently. Name the active mode in the output.
|
|
25
33
|
|
|
26
34
|
## Rules
|
|
27
35
|
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.
|
|
36
|
+
2. Brownfield Review after `Approval: UR` is a sizing and routing step. It must visibly decide `quick_task`, `structured_slice`, `structured_delivery`, or `block` before PRD depth or implementation is chosen.
|
|
29
37
|
3. Reuse-before-create: prefer existing modules, services, components, tables, endpoints, tests, and configuration.
|
|
30
38
|
4. Minimal clean slice: choose the smallest durable intervention, not merely the smallest technical diff.
|
|
31
39
|
5. No silent parallel structures.
|
|
@@ -63,7 +71,7 @@ Use what is available:
|
|
|
63
71
|
|
|
64
72
|
If inputs are missing, work only from observable evidence and mark gaps explicitly.
|
|
65
73
|
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.
|
|
74
|
+
When used as Brownfield Review after `Approval: UR`, do not recommend PRD, SD, TP, or implementation until the Mode/Slice Decision is explicit, evidenced and recorded.
|
|
67
75
|
|
|
68
76
|
## Workflow
|
|
69
77
|
1. Identify affected tasks and scope.
|
|
@@ -96,11 +104,14 @@ Use a concise structure:
|
|
|
96
104
|
|
|
97
105
|
```text
|
|
98
106
|
## Brownfield Analysis
|
|
107
|
+
- mode: post_ur_review | pre_implementation_analysis
|
|
99
108
|
- decision: pass | revise | block | not_applicable
|
|
100
109
|
- mode_slice_decision: quick_task | structured_slice | structured_delivery | block
|
|
101
110
|
- required_next_gate: none | PRD | SD | TP | Brownfield Analysis
|
|
111
|
+
- artefact: .agdf/control/artefacts/<key>/BROWNFIELD_REVIEW.md | none
|
|
102
112
|
- scope:
|
|
103
113
|
- evidence:
|
|
114
|
+
- transparency: why later artefacts are skipped, shortened or required
|
|
104
115
|
- missing_evidence:
|
|
105
116
|
- current_coverage:
|
|
106
117
|
- reuse_strategy:
|
|
@@ -19,6 +19,7 @@ This skill must not create later artefacts such as PRD, SD, TP, CD, CR, QA, or U
|
|
|
19
19
|
|
|
20
20
|
## Runtime Contract
|
|
21
21
|
Use `../../meta/agdf-runtime-contract.md` for gate terms, closeout discipline, and non-duplication rules.
|
|
22
|
+
The canonical gate order and transition model live only in the Runtime Contract. This skill evaluates the current state against that model; it must not maintain a second complete gate table.
|
|
22
23
|
|
|
23
24
|
## Native Control Path
|
|
24
25
|
|
|
@@ -59,35 +60,13 @@ The CLI reports are validators and JSON evidence, not the primary user experienc
|
|
|
59
60
|
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
61
|
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
62
|
13. After Brownfield Review, decide the process size before drafting PRD or implementing: `quick_task | structured_slice | structured_delivery | block`.
|
|
63
|
+
14. The Mode/Slice Decision must be visible and evidenced before any Quick Task execution, PRD shortcut or implementation. A decision value without scope reason and evidence is still missing.
|
|
62
64
|
|
|
63
|
-
## Gate
|
|
64
|
-
User gates:
|
|
65
|
-
|
|
66
|
-
`UR -> PRD -> SD -> TP -> QA -> UAT`
|
|
67
|
-
|
|
68
|
-
Internal mandatory steps:
|
|
69
|
-
|
|
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 |
|
|
65
|
+
## Gate Evaluation
|
|
88
66
|
|
|
89
67
|
If `Approval: UR` is present, do not say implementation is the next step.
|
|
90
68
|
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.
|
|
69
|
+
Use the Runtime Contract's Gate Transition Model to derive the current gate, allowed outputs, forbidden outputs and missing approval.
|
|
91
70
|
|
|
92
71
|
## When To Use
|
|
93
72
|
- new user intent to build, add, change, extend, refactor or deliver something
|
|
@@ -127,6 +106,7 @@ If a status is not explicit, do not assume it is satisfied.
|
|
|
127
106
|
7. Ensure the next step follows the gate transition table. In particular, never jump from `Approval: UR` to implementation.
|
|
128
107
|
8. Treat a generic "start", "continue" or "leg los" request as a request to perform only the current next allowed action.
|
|
129
108
|
9. After Brownfield Review, choose the smallest safe process path before creating later artefacts.
|
|
109
|
+
10. If the selected path is not visibly recorded with scope reason and evidence, keep the run at `Mode/Slice Decision`.
|
|
130
110
|
|
|
131
111
|
## Output
|
|
132
112
|
Keep the result short and operational:
|
|
@@ -29,9 +29,10 @@ Use `../../meta/agdf-runtime-contract.md` for Quality Contract output, Context G
|
|
|
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
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.
|
|
32
|
+
Use the Runtime Contract definition of `Relevant Run` to decide whether OR is mandatory or whether a Quick Task mini-closeout is enough.
|
|
32
33
|
|
|
33
34
|
## Rules
|
|
34
|
-
1. OR is always allowed and mandatory for relevant runs.
|
|
35
|
+
1. OR is always allowed and mandatory for relevant runs as defined in the Runtime Contract.
|
|
35
36
|
2. OR is an audit report, not a blocking gate.
|
|
36
37
|
3. Do not leak artefacts from blocked later gates.
|
|
37
38
|
4. Use OR-lite when early gates block.
|
|
@@ -52,6 +53,8 @@ When `.agdf/control/` is present, persist or link the OR under `.agdf/control/ar
|
|
|
52
53
|
- after UAT
|
|
53
54
|
- whenever a compact audit closeout is needed
|
|
54
55
|
|
|
56
|
+
Do not force OR onto a pure explanation, read-only inspection, small review, or local debugging step that produces no durable state change and no gate consequence.
|
|
57
|
+
|
|
55
58
|
## Inputs
|
|
56
59
|
Use what is available:
|
|
57
60
|
|
package/package.json
CHANGED