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.
- package/bin/create-agdf.js +363 -9
- package/generated/.agdf/control/README.md +7 -1
- package/generated/.agdf/control/templates/AGDF_RUN.md +25 -1
- package/generated/.agdf/control/templates/MASTER_BACKLOG.md +16 -14
- package/generated/.agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +67 -0
- package/generated/.agdf/control/templates/artefacts/OR.md +86 -0
- package/generated/.agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/.github/copilot-instructions.md +3 -0
- package/generated/.github/instructions/agdf-governance.instructions.md +1 -0
- package/generated/.github/skills/agdf-brownfield-analysis/SKILL.md +35 -17
- package/generated/.github/skills/agdf-gate-check/SKILL.md +33 -29
- package/generated/.github/skills/agdf-release-or/SKILL.md +17 -10
- package/generated/.github/skills/agdf-runtime-contract.md +102 -5
- package/generated/AGENTS.md +14 -4
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/control/README.md +7 -1
- package/generated/plugins/agdf/control/templates/AGDF_RUN.md +25 -1
- package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +16 -14
- package/generated/plugins/agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +67 -0
- package/generated/plugins/agdf/control/templates/artefacts/OR.md +86 -0
- package/generated/plugins/agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/plugins/agdf/meta/agdf-agent-router.md +14 -4
- package/generated/plugins/agdf/meta/agdf-constitution.md +13 -4
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +4 -4
- package/generated/plugins/agdf/meta/agdf-runtime-contract.md +102 -5
- package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +35 -17
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +33 -29
- package/generated/plugins/agdf/skills/release-or/SKILL.md +17 -10
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brownfield-analysis
|
|
3
|
-
description: Use this skill after gate-check or live AGDF control state confirms that implementation preparation is allowed
|
|
3
|
+
description: Use this skill after gate-check or live AGDF control state confirms that Brownfield Review or implementation preparation is allowed. Use it after Approval: UR as the lightweight Brownfield Review after G-00 before PRD when existing systems may be affected, and again before non-trivial implementation after TP. Do not use it as the first AGDF skill for a fresh "I want to build/change X" prompt when approval, scope, or next allowed action is unclear.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# brownfield-analysis
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
|
-
Ensure
|
|
9
|
+
Ensure delivery in an existing system is Brownfield-oriented, not Greenfield-style.
|
|
10
10
|
|
|
11
11
|
The skill answers:
|
|
12
12
|
|
|
@@ -15,30 +15,41 @@ The skill answers:
|
|
|
15
15
|
- what can be reused, extended, or refactored
|
|
16
16
|
- whether new artefacts are really needed
|
|
17
17
|
- architecture, compatibility, migration, and regression impact
|
|
18
|
-
- the minimal clean
|
|
18
|
+
- the minimal clean next step
|
|
19
19
|
- whether Context Graph impact exists without automatically creating a node
|
|
20
20
|
|
|
21
21
|
## Runtime Contract
|
|
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
|
-
1. Brownfield first: understand the existing codebase before implementation.
|
|
28
|
-
2.
|
|
29
|
-
3.
|
|
30
|
-
4.
|
|
31
|
-
5.
|
|
32
|
-
6.
|
|
33
|
-
7.
|
|
34
|
-
8.
|
|
35
|
-
9.
|
|
36
|
-
10.
|
|
37
|
-
11.
|
|
38
|
-
12.
|
|
35
|
+
1. Brownfield first: understand the existing codebase before PRD/SD decisions when existing-system impact is possible, and again before implementation.
|
|
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.
|
|
37
|
+
3. Reuse-before-create: prefer existing modules, services, components, tables, endpoints, tests, and configuration.
|
|
38
|
+
4. Minimal clean slice: choose the smallest durable intervention, not merely the smallest technical diff.
|
|
39
|
+
5. No silent parallel structures.
|
|
40
|
+
6. Existing architecture, naming, error handling, logging, security, and test conventions are binding unless deviation is justified.
|
|
41
|
+
7. What is not visibly evidenced does not count as existing.
|
|
42
|
+
8. Async execute paths must not become a second product-policy decision point.
|
|
43
|
+
9. Visible state ownership must be checked for chat, rendering, scrolling, recovery, and status problems.
|
|
44
|
+
10. SoT/runtime/product-semantics drift must be named; if official behaviour must be decided first, recommend UR or equivalent product direction.
|
|
45
|
+
11. Large UI surfaces and state hooks must be checked for mixed render, view-model, derived state, orchestration, persistence, and recovery ownership.
|
|
46
|
+
12. Context Graph impact must be curated; it is not a review log or version index.
|
|
47
|
+
13. Specification archive migrations must follow the archive index if present.
|
|
39
48
|
|
|
40
49
|
## When To Use
|
|
50
|
+
- after `gate-check` permits `Brownfield Review` or live `.agdf/control/AGDF_RUN.md` names Brownfield Review as the next allowed action
|
|
41
51
|
- after `gate-check` permits implementation preparation or live `.agdf/control/AGDF_RUN.md` already names Brownfield Analysis as the next allowed action
|
|
52
|
+
- after `Approval: UR` when existing owners, SoT, contracts, policies, persistence, runtime paths, tests, UI, UX or architecture may affect PRD/SD scope
|
|
42
53
|
- before `CD+Tests`
|
|
43
54
|
- before changes to an existing repository
|
|
44
55
|
- bug fixes in existing modules
|
|
@@ -51,7 +62,7 @@ Brownfield-specific output must make evidence, missing existing-system view, par
|
|
|
51
62
|
## Inputs
|
|
52
63
|
Use what is available:
|
|
53
64
|
|
|
54
|
-
- Task Plan, `task_id`, `story_id`
|
|
65
|
+
- approved UR, Task Plan, `task_id`, `story_id`
|
|
55
66
|
- project structure
|
|
56
67
|
- affected files, modules, services, APIs, data models
|
|
57
68
|
- existing tests
|
|
@@ -59,7 +70,8 @@ Use what is available:
|
|
|
59
70
|
- repository conventions
|
|
60
71
|
|
|
61
72
|
If inputs are missing, work only from observable evidence and mark gaps explicitly.
|
|
62
|
-
If gate status, approval, scope or next allowed action is unclear, stop and route to `gate-check` instead of recommending or starting implementation.
|
|
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.
|
|
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.
|
|
63
75
|
|
|
64
76
|
## Workflow
|
|
65
77
|
1. Identify affected tasks and scope.
|
|
@@ -92,9 +104,14 @@ Use a concise structure:
|
|
|
92
104
|
|
|
93
105
|
```text
|
|
94
106
|
## Brownfield Analysis
|
|
107
|
+
- mode: post_ur_review | pre_implementation_analysis
|
|
95
108
|
- decision: pass | revise | block | not_applicable
|
|
109
|
+
- mode_slice_decision: quick_task | structured_slice | structured_delivery | block
|
|
110
|
+
- required_next_gate: none | PRD | SD | TP | Brownfield Analysis
|
|
111
|
+
- artefact: .agdf/control/artefacts/<key>/BROWNFIELD_REVIEW.md | none
|
|
96
112
|
- scope:
|
|
97
113
|
- evidence:
|
|
114
|
+
- transparency: why later artefacts are skipped, shortened or required
|
|
98
115
|
- missing_evidence:
|
|
99
116
|
- current_coverage:
|
|
100
117
|
- reuse_strategy:
|
|
@@ -116,3 +133,4 @@ This skill must not:
|
|
|
116
133
|
- convert product-semantics drift into a mere refactor
|
|
117
134
|
- create Context Graph nodes automatically
|
|
118
135
|
- treat archive links as active current specification signals
|
|
136
|
+
- recommend broad PRD/SD/TP or implementation by reflex before Mode/Slice Decision is recorded
|
|
@@ -19,59 +19,54 @@ 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
|
|
|
25
|
-
|
|
26
|
+
AGDF is applied natively through this skill, the agent router, and live `.agdf/control/` state.
|
|
27
|
+
|
|
28
|
+
First inspect the durable control state directly:
|
|
29
|
+
|
|
30
|
+
- `.agdf/control/AGDF_RUN.md`
|
|
31
|
+
- `.agdf/control/MASTER_BACKLOG.md`
|
|
32
|
+
- `.agdf/control/SOT_REGISTRY.md`
|
|
33
|
+
- `.agdf/control/CONTEXT_GRAPH.md`
|
|
34
|
+
- `.agdf/control/AGENT_QUALITY_CONTRACTS.json`
|
|
35
|
+
|
|
36
|
+
Use the executable control path when a machine-readable check is requested, when the gate state is ambiguous, or when a repository-local automation needs JSON evidence:
|
|
26
37
|
|
|
27
38
|
```bash
|
|
28
39
|
npm create agdf@latest doctor --json
|
|
29
40
|
npm create agdf@latest gate-check --json
|
|
41
|
+
npm create agdf@latest delivery-map --json
|
|
30
42
|
```
|
|
31
43
|
|
|
32
44
|
`doctor` checks whether `.agdf/control/` is actionable. `gate-check` consumes that result and `AGDF_RUN.md` to report the operative process decision: `open | blocked`, current gate, blocking reason, missing approval, allowed outputs, forbidden outputs, next allowed action and evidence references.
|
|
45
|
+
`delivery-map` reports the durable delivery picture: active artefacts, approvals, Artefact Chain relationships, evidence refs, missing evidence, risks, Context Graph gate effect and machine-readable findings.
|
|
33
46
|
|
|
34
|
-
The CLI
|
|
47
|
+
The CLI reports are validators and JSON evidence, not the primary user experience and not a second rule system. If a report says `blocked`, do not continue with later-gate artefacts until the reported blocker is resolved.
|
|
35
48
|
|
|
36
49
|
## Rules
|
|
37
50
|
1. Fail closed when a required approval or artefact status is missing.
|
|
38
51
|
2. The earliest blocking gate wins.
|
|
39
52
|
3. A user approval is valid only as `Approval: <GateName>`.
|
|
40
53
|
4. Treat `Freigabe: <GateName>` as a legacy alias only when reviewing older German runs.
|
|
41
|
-
5. Implicit consent is not approval.
|
|
54
|
+
5. Implicit consent is not approval. "ok", "go ahead", "do it", "approved", "continue", "leg los" and similar phrases do not unlock gates.
|
|
42
55
|
6. Do not preview later artefacts while a gate blocks.
|
|
43
56
|
7. Internal process steps are not user approval gates.
|
|
44
57
|
8. OR-lite is allowed if it does not leak blocked content.
|
|
45
58
|
9. SoT/runtime/product-semantics drift can trigger an early product gate, usually `UR`.
|
|
46
|
-
10. Approval of one user gate permits work on the next gate artefact only; it never skips directly to implementation.
|
|
47
|
-
11. New product semantics, functional change or user-visible behaviour change requires a durable UR in `.agdf/control/` or a linked authoritative repository SoT before PRD, SD, TP, Brownfield Analysis or implementation.
|
|
59
|
+
10. Approval of one user gate permits work on the next allowed gate artefact or required internal step only; it never skips directly to implementation.
|
|
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.
|
|
48
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.
|
|
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.
|
|
49
64
|
|
|
50
|
-
## Gate
|
|
51
|
-
User gates:
|
|
52
|
-
|
|
53
|
-
`UR -> PRD -> SD -> TP -> QA -> UAT`
|
|
54
|
-
|
|
55
|
-
Internal mandatory steps:
|
|
56
|
-
|
|
57
|
-
`Brownfield Analysis -> CD+Tests -> CR -> OR`
|
|
58
|
-
|
|
59
|
-
## Gate Transitions
|
|
60
|
-
|
|
61
|
-
Use this transition model for Structured Delivery:
|
|
62
|
-
|
|
63
|
-
| State | Current gate or step | Allowed | Forbidden | Missing approval |
|
|
64
|
-
|---|---|---|---|---|
|
|
65
|
-
| No approved UR | `UR` | clarify user need, formulate and persist UR, request `Approval: UR` | PRD, SD, TP, Brownfield Analysis, implementation, QA, release | `Approval: UR` |
|
|
66
|
-
| `UR` approved and UR artefact persisted or linked, PRD missing or draft | `PRD` | draft/refine PRD, define scope, acceptance criteria and non-goals, persist/link PRD, request `Approval: PRD` | SD, TP, Brownfield Analysis, implementation, QA, release | `Approval: PRD` |
|
|
67
|
-
| `PRD` approved and PRD artefact persisted or linked, SD missing or draft | `SD` | draft/refine Solution Design, ownership and architecture, persist/link SD, request `Approval: SD` | TP, implementation, QA, release | `Approval: SD` |
|
|
68
|
-
| `SD` approved and SD artefact persisted or linked, TP missing or draft | `TP` | draft/refine Task/Test Plan, task IDs, evidence plan, persist/link TP, request `Approval: TP` | implementation, QA, release | `Approval: TP` |
|
|
69
|
-
| `TP` approved and TP artefact persisted or linked, Brownfield missing | `Brownfield Analysis` | run Brownfield Analysis for approved TP scope | implementation, QA, release | none |
|
|
70
|
-
| Brownfield passed for approved TP | `CD+Tests` | implement approved TP tasks and run tests | QA pass, UAT, release | none |
|
|
71
|
-
| `QA` approved but QA report missing or not pass | `QA` | persist/link QA report with `pass` decision or revise/block evidence | UAT, release | none |
|
|
65
|
+
## Gate Evaluation
|
|
72
66
|
|
|
73
67
|
If `Approval: UR` is present, do not say implementation is the next step.
|
|
74
|
-
The next step is
|
|
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.
|
|
75
70
|
|
|
76
71
|
## When To Use
|
|
77
72
|
- new user intent to build, add, change, extend, refactor or deliver something
|
|
@@ -93,6 +88,8 @@ Use what is available:
|
|
|
93
88
|
- current user request
|
|
94
89
|
- existing exact approvals
|
|
95
90
|
- status of UR, PRD, SD, TP
|
|
91
|
+
- Brownfield Review status
|
|
92
|
+
- Mode/Slice Decision
|
|
96
93
|
- Brownfield Analysis status
|
|
97
94
|
- CD+Tests, CR, QA, UAT status
|
|
98
95
|
- signs of documentation/runtime/product-semantics drift
|
|
@@ -107,6 +104,9 @@ If a status is not explicit, do not assume it is satisfied.
|
|
|
107
104
|
5. Name the exact missing approval, if any.
|
|
108
105
|
6. If consent was only implicit, say it is not yet approval and provide the exact formula.
|
|
109
106
|
7. Ensure the next step follows the gate transition table. In particular, never jump from `Approval: UR` to implementation.
|
|
107
|
+
8. Treat a generic "start", "continue" or "leg los" request as a request to perform only the current next allowed action.
|
|
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`.
|
|
110
110
|
|
|
111
111
|
## Output
|
|
112
112
|
Keep the result short and operational:
|
|
@@ -122,11 +122,15 @@ Keep the result short and operational:
|
|
|
122
122
|
This skill must not:
|
|
123
123
|
|
|
124
124
|
- create PRD before UR approval
|
|
125
|
+
- create PRD before required Brownfield Review is done or explicitly not_applicable
|
|
126
|
+
- create PRD before Mode/Slice Decision is recorded
|
|
125
127
|
- create SD before PRD approval
|
|
126
128
|
- create TP while earlier gates block
|
|
127
129
|
- suggest implementation immediately after `Approval: UR`
|
|
130
|
+
- suggest implementation before Brownfield Review has explicitly selected `quick_task`
|
|
128
131
|
- suggest implementation immediately after `Approval: PRD`
|
|
129
132
|
- suggest implementation immediately after `Approval: SD`
|
|
133
|
+
- treat "ok", "leg los", "go ahead", "approved" or similar wording as gate approval
|
|
130
134
|
- perform full Brownfield Analysis unless explicitly requested
|
|
131
135
|
- provide implementation snippets while implementation is gated
|
|
132
136
|
- present QA or UAT as passed without evidence
|
|
@@ -28,9 +28,11 @@ It reports:
|
|
|
28
28
|
Use `../../meta/agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
|
|
29
29
|
|
|
30
30
|
OR-specific output must make gate status, delivered and intentionally not delivered content, missing approvals, missing evidence, risks, retained fallbacks, and the next permissible step visible.
|
|
31
|
+
When `.agdf/control/` is present, persist or link the OR under `.agdf/control/artefacts/<key>/OR.md` and reference it from `AGDF_RUN.md` or `MASTER_BACKLOG.md` when it is steering-relevant.
|
|
32
|
+
Use the Runtime Contract definition of `Relevant Run` to decide whether OR is mandatory or whether a Quick Task mini-closeout is enough.
|
|
31
33
|
|
|
32
34
|
## Rules
|
|
33
|
-
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.
|
|
34
36
|
2. OR is an audit report, not a blocking gate.
|
|
35
37
|
3. Do not leak artefacts from blocked later gates.
|
|
36
38
|
4. Use OR-lite when early gates block.
|
|
@@ -51,6 +53,8 @@ OR-specific output must make gate status, delivered and intentionally not delive
|
|
|
51
53
|
- after UAT
|
|
52
54
|
- whenever a compact audit closeout is needed
|
|
53
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
|
+
|
|
54
58
|
## Inputs
|
|
55
59
|
Use what is available:
|
|
56
60
|
|
|
@@ -77,15 +81,16 @@ If information is missing, state the gap instead of guessing.
|
|
|
77
81
|
2. Determine report depth:
|
|
78
82
|
- `OR-lite`: gate status, allowed/forbidden outputs, missing approval, next step
|
|
79
83
|
- `OR-full`: also delivered artefacts, TP coverage, Brownfield fit, solution integrity, risks, fallbacks, QA/UAT status
|
|
80
|
-
3. Record
|
|
81
|
-
4.
|
|
82
|
-
5. Summarize
|
|
83
|
-
6. Summarize
|
|
84
|
-
7. Summarize
|
|
85
|
-
8.
|
|
86
|
-
9.
|
|
87
|
-
10. Set exactly one
|
|
88
|
-
11.
|
|
84
|
+
3. Record the selected `Report mode` and durable OR target or link when `.agdf/control/` exists.
|
|
85
|
+
4. Record delivered vs intentionally not delivered content.
|
|
86
|
+
5. Summarize TP coverage if a TP exists.
|
|
87
|
+
6. Summarize Brownfield fit and solution integrity if reviewed.
|
|
88
|
+
7. Summarize tests and verification.
|
|
89
|
+
8. Summarize documentation and Context Graph impact if relevant.
|
|
90
|
+
9. Name retained fallbacks and exit criteria.
|
|
91
|
+
10. Set exactly one next permissible step.
|
|
92
|
+
11. Set exactly one quality outlook.
|
|
93
|
+
12. State whether `delivery-closeout` is the next operational handoff step when code changes exist and the delivery state allows it.
|
|
89
94
|
|
|
90
95
|
## Output
|
|
91
96
|
Use a compact structure:
|
|
@@ -93,6 +98,8 @@ Use a compact structure:
|
|
|
93
98
|
```text
|
|
94
99
|
## OR
|
|
95
100
|
- gate:
|
|
101
|
+
- report_mode:
|
|
102
|
+
- artefact:
|
|
96
103
|
- status:
|
|
97
104
|
- delivered:
|
|
98
105
|
- intentionally_not_delivered:
|
package/package.json
CHANGED