create-agdf 0.2.7 → 0.2.9
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/NOTICE +10 -0
- package/README.md +37 -12
- package/bin/create-agdf.js +75 -18
- package/generated/.agdf/control/README.md +10 -4
- package/generated/.github/skills/agdf-gate-check/SKILL.md +4 -4
- package/generated/.opencode/AGDF.md +102 -0
- package/generated/.opencode/README.md +19 -0
- package/generated/.opencode/agdf-runtime-contract.md +219 -0
- package/generated/.opencode/agents/agdf-brownfield-analysis.md +142 -0
- package/generated/.opencode/agents/agdf-clean-implementation-review.md +106 -0
- package/generated/.opencode/agents/agdf-code-review.md +100 -0
- package/generated/.opencode/agents/agdf-delivery-closeout.md +115 -0
- package/generated/.opencode/agents/agdf-gate-check.md +155 -0
- package/generated/.opencode/agents/agdf-qa-gate.md +116 -0
- package/generated/.opencode/agents/agdf-release-or.md +130 -0
- package/generated/.opencode/agents/agdf-task-plan-review.md +121 -0
- package/generated/opencode.json +13 -0
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/control/README.md +10 -4
- package/generated/plugins/agdf/hooks/session-start.sh +20 -0
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +11 -1
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +4 -4
- package/opencode-plugin.js +33 -0
- package/package.json +10 -3
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# AGDF Runtime Contract
|
|
2
|
+
|
|
3
|
+
This contract centralizes recurring runtime rules for AGDF skills.
|
|
4
|
+
It is the operational reference for skill outputs, but it is not a second copy of the framework documentation.
|
|
5
|
+
|
|
6
|
+
## Mode Selection
|
|
7
|
+
|
|
8
|
+
| Mode | Default | Escalate When |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| Quick Task Mode | small questions, reviews, debugging, local fixes without new product semantics | a new user capability, architecture/policy/persistence impact, formal artefacts, or approvals are involved |
|
|
11
|
+
| Structured Delivery Mode | formal delivery runs, gate-relevant work, release-critical changes | always use gate discipline, internal reviews, and OR |
|
|
12
|
+
|
|
13
|
+
Quick Task Mode must not become ritual gate overhead.
|
|
14
|
+
Structured Delivery must not bypass missing approvals.
|
|
15
|
+
New product semantics, functional change, user-visible behaviour, policy, persistence, architecture or release-critical work requires a durable UR in `.agdf/control/` or a linked authoritative repository SoT before later artefacts or implementation.
|
|
16
|
+
UR, PRD, SD, TP and QA report approvals require durable artefacts or linked authoritative repository SoT entries before the next gate can open.
|
|
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
|
+
Do not add a separate `Quality outlook` line for pure Quick Tasks unless the task became a relevant run.
|
|
29
|
+
|
|
30
|
+
## Chat Output Discipline
|
|
31
|
+
|
|
32
|
+
Durable artefacts are for the repository, not for flooding the chat.
|
|
33
|
+
When a skill creates or updates `.agdf/control/` files, gate artefacts, reviews, QA reports or OR reports, the chat response must stay compact:
|
|
34
|
+
|
|
35
|
+
- name the artefact path and status
|
|
36
|
+
- summarize the decision or content in a few lines
|
|
37
|
+
- state the current gate, forbidden work and next permissible step
|
|
38
|
+
- mention validation evidence when available
|
|
39
|
+
|
|
40
|
+
Do not paste full control files, full artefact bodies, full templates or full generated reports into the chat unless the user explicitly asks to see the full content.
|
|
41
|
+
For larger or more formal work, create or update the durable artefacts fully, then reference them by path and summarize what changed.
|
|
42
|
+
|
|
43
|
+
## Relevant Run
|
|
44
|
+
|
|
45
|
+
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.
|
|
46
|
+
|
|
47
|
+
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.
|
|
48
|
+
When in doubt, use a short OR-lite only if it clarifies gate state, evidence, risk, or the next permissible step.
|
|
49
|
+
|
|
50
|
+
## Gate Rules
|
|
51
|
+
|
|
52
|
+
- User gates: `UR -> PRD -> SD -> TP -> QA -> UAT`
|
|
53
|
+
- Internal mandatory steps: `Brownfield Review -> Mode/Slice Decision -> Brownfield Analysis -> CD+Tests -> CR -> OR`
|
|
54
|
+
- Exact approval formula: `Approval: <GateName>`
|
|
55
|
+
- Legacy alias: `Freigabe: <GateName>` may be accepted when reviewing older German runs, but all new outputs must use `Approval: <GateName>`.
|
|
56
|
+
- 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.
|
|
57
|
+
- The earliest blocking gate wins.
|
|
58
|
+
- 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.
|
|
59
|
+
- 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.
|
|
60
|
+
- 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.
|
|
61
|
+
- Missing control files or missing current-state fields do not forbid the agent from preparing the current allowed artefact. They forbid later-gate work and implementation. For a fresh request, the default allowed work is to draft a minimal UR in the response and request `Approval: UR`. Initialize or write `.agdf/control/` only when the user explicitly asks for durable AGDF control state, the repository already uses `.agdf/control/` as its live working state, or a deterministic CLI/CI setup path is being executed.
|
|
62
|
+
- `Approval: UR` permits Brownfield Review after G-00 first, then a Mode/Slice Decision. It never permits implementation by itself.
|
|
63
|
+
- PRD, SD and TP depth is chosen after Brownfield Review through the Mode/Slice Decision, not before existing-system impact is understood.
|
|
64
|
+
- 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.
|
|
65
|
+
- `Approval: PRD` permits Solution Design drafting, not implementation.
|
|
66
|
+
- `Approval: SD` permits Task/Test Plan drafting, not implementation.
|
|
67
|
+
- `Approval: TP` permits implementation-preparation Brownfield Analysis and then CD+Tests when Brownfield evidence supports it.
|
|
68
|
+
- `CD+Tests` is implementation and test status only, not a delivery signal.
|
|
69
|
+
- `agdf-code-review` standardizes the mandatory `CR` step, but does not replace QA.
|
|
70
|
+
- `agdf-qa-gate` decides final `pass | revise | block`.
|
|
71
|
+
- `agdf-release-or` reports the run, but does not replace QA or produce the operative commit/PR handoff.
|
|
72
|
+
- `agdf-delivery-closeout` owns the operative Git handoff text when QA/OR/UAT state allows it.
|
|
73
|
+
|
|
74
|
+
## Brownfield Review After G-00
|
|
75
|
+
|
|
76
|
+
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.
|
|
77
|
+
|
|
78
|
+
This review is not a new user approval gate, not PRD, not SD, not TP and not implementation permission.
|
|
79
|
+
It is the sizing and routing step that decides how much later gate discipline is actually needed.
|
|
80
|
+
|
|
81
|
+
Its output is limited to:
|
|
82
|
+
|
|
83
|
+
- workstream or follow-up-slice classification
|
|
84
|
+
- `Mode/Slice Decision`: `quick_task | structured_slice | structured_delivery | block`
|
|
85
|
+
- affected existing owners, source-of-truth artefacts, contracts, policies, runtime paths or tests
|
|
86
|
+
- reuse-before-create risks and parallel-structure risks
|
|
87
|
+
- open questions that PRD or SD must resolve
|
|
88
|
+
- whether implementation-preparation Brownfield Analysis will also be needed after TP
|
|
89
|
+
|
|
90
|
+
Mode/Slice Decision rules:
|
|
91
|
+
|
|
92
|
+
- `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.
|
|
93
|
+
- `structured_slice`: use when some formal artefacts are needed, but they can stay intentionally small and scoped to the approved slice.
|
|
94
|
+
- `structured_delivery`: use when the change has broad product, architecture, runtime, policy, persistence, release or cross-owner impact.
|
|
95
|
+
- `block`: use when ownership, SoT, impact, evidence or product direction is not clear enough to choose a safe path.
|
|
96
|
+
|
|
97
|
+
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`.
|
|
98
|
+
|
|
99
|
+
## Gate Transition Model
|
|
100
|
+
|
|
101
|
+
This table is the canonical transition model. Skills may reference it, but must not carry a second complete copy.
|
|
102
|
+
|
|
103
|
+
| State | Current gate or step | Allowed | Forbidden | Missing approval |
|
|
104
|
+
|---|---|---|---|---|
|
|
105
|
+
| No approved UR | `UR` | clarify user need, formulate and persist UR, request `Approval: UR` | PRD, SD, TP, Brownfield Analysis, implementation, QA, release | `Approval: UR` |
|
|
106
|
+
| `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 |
|
|
107
|
+
| 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 |
|
|
108
|
+
| 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 |
|
|
109
|
+
| 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` |
|
|
110
|
+
| `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` |
|
|
111
|
+
| `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` |
|
|
112
|
+
| `TP` approved and TP artefact persisted or linked, Brownfield Analysis missing | `Brownfield Analysis` | run Brownfield Analysis for approved TP scope | implementation, QA, release | none |
|
|
113
|
+
| Brownfield Analysis passed for approved TP | `CD+Tests` | implement approved TP tasks and run tests | QA pass, UAT, release | none |
|
|
114
|
+
| `QA` approved but QA report missing or not pass | `QA` | persist/link QA report with `pass` decision or revise/block evidence | UAT, release | none |
|
|
115
|
+
|
|
116
|
+
## Brownfield Modes
|
|
117
|
+
|
|
118
|
+
The `agdf-brownfield-analysis` skill has two explicit modes:
|
|
119
|
+
|
|
120
|
+
- `post_ur_review`: lightweight sizing and routing after approved durable UR; decides Mode/Slice Decision before PRD depth or implementation is chosen.
|
|
121
|
+
- `pre_implementation_analysis`: implementation-preparation analysis after approved durable TP; verifies reuse path, owners, regression risk and fit before `CD+Tests`.
|
|
122
|
+
|
|
123
|
+
Do not mix the modes silently. Name the active mode in Brownfield output.
|
|
124
|
+
|
|
125
|
+
## Quality Contract Output
|
|
126
|
+
|
|
127
|
+
Structured Delivery skills use this shape when relevant:
|
|
128
|
+
|
|
129
|
+
- `decision`: `pass | revise | block | not_applicable`
|
|
130
|
+
- `evidence`: concrete artefacts, files, tests, logs, diffs, or observations
|
|
131
|
+
- `missing_evidence`: missing proof needed for a stronger claim
|
|
132
|
+
- `risks`: remaining risks, assumptions, fallbacks, drift, or blockers
|
|
133
|
+
- `required_next_step`: exactly the next clean step
|
|
134
|
+
- `impact_codes`: affected Quality Contract codes, if the target repo has a registry
|
|
135
|
+
|
|
136
|
+
A skill may briefly remind this shape, but must not duplicate a complete code or rule matrix.
|
|
137
|
+
|
|
138
|
+
## Context Graph Output
|
|
139
|
+
|
|
140
|
+
When a run affects project memory or a Context Graph, use:
|
|
141
|
+
|
|
142
|
+
- `Situation:` short plain-language summary when the impact is non-trivial
|
|
143
|
+
- `context_graph_impact`: `none | link_only | update_existing_node | new_node_required | sot_drift`
|
|
144
|
+
- `context_graph_refs`
|
|
145
|
+
- `context_graph_required_action`: `none | link | update | create | resolve_drift`
|
|
146
|
+
- `context_graph_gate_effect`: `none | warning | revise | block`
|
|
147
|
+
- `context_graph_evidence`
|
|
148
|
+
|
|
149
|
+
Do not create a new node for a mere version, a general chat summary, or a local observation without a concrete next clean step.
|
|
150
|
+
`sot_drift` must not pass silently as a warning.
|
|
151
|
+
|
|
152
|
+
## Control Scaffold
|
|
153
|
+
|
|
154
|
+
When a repository needs durable AGDF state, use the plugin-local `control/` scaffold as the starting point.
|
|
155
|
+
|
|
156
|
+
- `config.json` stores project language preferences. Use `artifact_language` for generated AGDF artefacts and `chat_language` for user-facing responses unless the user explicitly asks otherwise. Runtime rules remain English.
|
|
157
|
+
- `AGDF_RUN.md` is the current run dashboard.
|
|
158
|
+
- `MASTER_BACKLOG.md` is the living pointer for active delivery work.
|
|
159
|
+
- `BROWNFIELD_REVIEW.md` records the post-UR existing-system view and Mode/Slice Decision before PRD depth or Quick Task execution is chosen.
|
|
160
|
+
- `SOT_REGISTRY.md` prevents parallel sources of truth.
|
|
161
|
+
- `CONTEXT_GRAPH.md` stores durable Brownfield findings, decisions, risks, evidence and exit criteria.
|
|
162
|
+
- `AGENT_QUALITY_CONTRACTS.json` stores reusable block, revise and warning conditions.
|
|
163
|
+
- OR reports live under `.agdf/control/artefacts/<key>/OR.md` when a run closeout is steering-relevant or should be auditable beyond the chat.
|
|
164
|
+
|
|
165
|
+
The scaffold is not a second documentation site. Link to authoritative artefacts instead of copying them.
|
|
166
|
+
|
|
167
|
+
## Agent-Native Runtime And CLI Verification
|
|
168
|
+
|
|
169
|
+
AGDF is agent-native first and CLI-verifiable by design.
|
|
170
|
+
|
|
171
|
+
The primary operating path is the active skill plus the live `.agdf/control/` artefacts.
|
|
172
|
+
Agents should read the repository state, apply this Runtime Contract, create or update only the currently allowed artefact, and make the next permissible step explicit.
|
|
173
|
+
When control state is missing for a fresh request, keep the first step lightweight: draft the minimal UR in the response and request `Approval: UR`.
|
|
174
|
+
Initialize a control scaffold only when durable AGDF control state is explicitly requested, already used by the repository, or required by a deterministic CLI/CI setup path.
|
|
175
|
+
|
|
176
|
+
Helper commands are deterministic proof and automation interfaces, not the normal-work ritual:
|
|
177
|
+
|
|
178
|
+
- `init` creates the machine-readable control scaffold.
|
|
179
|
+
- `doctor --json` checks whether `.agdf/control/` is consistent and actionable; it is not the reviewer.
|
|
180
|
+
- `gate-check --json` reports reproducible gate state; it does not replace the gate-check skill judgement.
|
|
181
|
+
- `delivery-map --json` reports the delivery picture for CI, PRs, regression checks and audit trails.
|
|
182
|
+
|
|
183
|
+
Machine-readable outputs should stay agent-friendly: stable decisions, blocking gate or current gate, missing approval, allowed outputs, forbidden outputs, next step, evidence and findings.
|
|
184
|
+
They make the repository state checkable, but they do not replace the native skill workflow or the durable control artefacts.
|
|
185
|
+
|
|
186
|
+
## Delivery Map
|
|
187
|
+
|
|
188
|
+
`delivery-map --json` is the machine-readable delivery picture for the active control state.
|
|
189
|
+
It derives, but does not replace, the live `.agdf/control/AGDF_RUN.md` and `MASTER_BACKLOG.md` state.
|
|
190
|
+
|
|
191
|
+
It must expose:
|
|
192
|
+
|
|
193
|
+
- approved or active artefacts and approvals
|
|
194
|
+
- `UR -> PRD -> SD -> TP -> QA_REPORT` relationships
|
|
195
|
+
- evidence refs, missing evidence and declared risks
|
|
196
|
+
- Context Graph impact and gate effect
|
|
197
|
+
- findings that explain why the delivery picture is `pass | warn | revise | block`
|
|
198
|
+
|
|
199
|
+
Missing relationship evidence in the Artefact Chain is at least `revise` once the related gate artefact is approved or passed.
|
|
200
|
+
Declared missing evidence, declared risk or Context Graph gate effect may escalate the delivery map to `warn`, `revise` or `block`.
|
|
201
|
+
|
|
202
|
+
## Skill Output
|
|
203
|
+
|
|
204
|
+
Every skill output should be as short as possible and as concrete as needed.
|
|
205
|
+
It must distinguish:
|
|
206
|
+
|
|
207
|
+
- facts
|
|
208
|
+
- evidence
|
|
209
|
+
- assumptions
|
|
210
|
+
- interpretations
|
|
211
|
+
- missing evidence
|
|
212
|
+
- the next permissible step
|
|
213
|
+
|
|
214
|
+
## Do Not Duplicate
|
|
215
|
+
|
|
216
|
+
The explanatory framework lives in `docs/`.
|
|
217
|
+
The operating philosophy lives in `plugin/meta/agdf-constitution.md`.
|
|
218
|
+
The principles live in `plugin/meta/agdf-tenets.md`.
|
|
219
|
+
This contract is only the compact runtime interface for skills.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems
|
|
3
|
+
mode: subagent
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
name: agdf-brownfield-analysis
|
|
8
|
+
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.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# brownfield-analysis
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
Ensure delivery in an existing system is Brownfield-oriented, not Greenfield-style.
|
|
15
|
+
|
|
16
|
+
The skill answers:
|
|
17
|
+
|
|
18
|
+
- which existing artefacts matter
|
|
19
|
+
- what already exists fully or partially
|
|
20
|
+
- what can be reused, extended, or refactored
|
|
21
|
+
- whether new artefacts are really needed
|
|
22
|
+
- architecture, compatibility, migration, and regression impact
|
|
23
|
+
- the minimal clean next step
|
|
24
|
+
- whether Context Graph impact exists without automatically creating a node
|
|
25
|
+
|
|
26
|
+
## Runtime Contract
|
|
27
|
+
Use `../agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
|
|
28
|
+
|
|
29
|
+
Brownfield-specific output must make evidence, missing existing-system view, parallel-structure risk, reuse strategy, and the minimal next step visible.
|
|
30
|
+
When `.agdf/control/` is present, persist or link `post_ur_review` output under `.agdf/control/artefacts/<key>/BROWNFIELD_REVIEW.md`.
|
|
31
|
+
|
|
32
|
+
## Modes
|
|
33
|
+
|
|
34
|
+
- `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.
|
|
35
|
+
- `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.
|
|
36
|
+
|
|
37
|
+
Do not mix both modes silently. Name the active mode in the output.
|
|
38
|
+
|
|
39
|
+
## Rules
|
|
40
|
+
1. Brownfield first: understand the existing codebase before PRD/SD decisions when existing-system impact is possible, and again before implementation.
|
|
41
|
+
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.
|
|
42
|
+
3. Reuse-before-create: prefer existing modules, services, components, tables, endpoints, tests, and configuration.
|
|
43
|
+
4. Minimal clean slice: choose the smallest durable intervention, not merely the smallest technical diff.
|
|
44
|
+
5. No silent parallel structures.
|
|
45
|
+
6. Existing architecture, naming, error handling, logging, security, and test conventions are binding unless deviation is justified.
|
|
46
|
+
7. What is not visibly evidenced does not count as existing.
|
|
47
|
+
8. Async execute paths must not become a second product-policy decision point.
|
|
48
|
+
9. Visible state ownership must be checked for chat, rendering, scrolling, recovery, and status problems.
|
|
49
|
+
10. SoT/runtime/product-semantics drift must be named; if official behaviour must be decided first, recommend UR or equivalent product direction.
|
|
50
|
+
11. Large UI surfaces and state hooks must be checked for mixed render, view-model, derived state, orchestration, persistence, and recovery ownership.
|
|
51
|
+
12. Context Graph impact must be curated; it is not a review log or version index.
|
|
52
|
+
13. Specification archive migrations must follow the archive index if present.
|
|
53
|
+
|
|
54
|
+
## When To Use
|
|
55
|
+
- after `agdf-gate-check` permits `Brownfield Review` or live `.agdf/control/AGDF_RUN.md` names Brownfield Review as the next allowed action
|
|
56
|
+
- after `agdf-gate-check` permits implementation preparation or live `.agdf/control/AGDF_RUN.md` already names Brownfield Analysis as the next allowed action
|
|
57
|
+
- after `Approval: UR` when existing owners, SoT, contracts, policies, persistence, runtime paths, tests, UI, UX or architecture may affect PRD/SD scope
|
|
58
|
+
- before `CD+Tests`
|
|
59
|
+
- before changes to an existing repository
|
|
60
|
+
- bug fixes in existing modules
|
|
61
|
+
- feature extensions in existing architecture
|
|
62
|
+
- refactorings
|
|
63
|
+
- unclear existing coverage
|
|
64
|
+
- risk of new parallel structures
|
|
65
|
+
- a TP is clear but its connection to the existing system is not
|
|
66
|
+
|
|
67
|
+
## Inputs
|
|
68
|
+
Use what is available:
|
|
69
|
+
|
|
70
|
+
- approved UR, Task Plan, `task_id`, `story_id`
|
|
71
|
+
- project structure
|
|
72
|
+
- affected files, modules, services, APIs, data models
|
|
73
|
+
- existing tests
|
|
74
|
+
- architecture notes from PRD or SD
|
|
75
|
+
- repository conventions
|
|
76
|
+
|
|
77
|
+
If inputs are missing, work only from observable evidence and mark gaps explicitly.
|
|
78
|
+
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.
|
|
79
|
+
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.
|
|
80
|
+
|
|
81
|
+
## Workflow
|
|
82
|
+
1. Identify affected tasks and scope.
|
|
83
|
+
2. Find relevant existing artefacts.
|
|
84
|
+
3. Assess current coverage before new implementation:
|
|
85
|
+
- `fully_done`
|
|
86
|
+
- `partially_done`
|
|
87
|
+
- `not_done`
|
|
88
|
+
4. Choose reuse strategy:
|
|
89
|
+
- `extend`
|
|
90
|
+
- `refactor`
|
|
91
|
+
- `replace`
|
|
92
|
+
- `new`
|
|
93
|
+
5. Assess change impact:
|
|
94
|
+
- files/modules
|
|
95
|
+
- interfaces
|
|
96
|
+
- data model/migrations
|
|
97
|
+
- backwards compatibility
|
|
98
|
+
- regression tests
|
|
99
|
+
- side effects
|
|
100
|
+
6. Check parallel-structure risk.
|
|
101
|
+
7. Check SoT/runtime/product-semantics drift.
|
|
102
|
+
8. Check primary visible ownership for UI/status/recovery paths.
|
|
103
|
+
9. Check UI monolith risk for large surfaces or central hooks.
|
|
104
|
+
10. Check Context Graph impact according to `../agdf-runtime-contract.md`.
|
|
105
|
+
11. Recommend the minimal clean implementation path.
|
|
106
|
+
|
|
107
|
+
## Output
|
|
108
|
+
Use a concise structure:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
## Brownfield Analysis
|
|
112
|
+
- mode: post_ur_review | pre_implementation_analysis
|
|
113
|
+
- decision: pass | revise | block | not_applicable
|
|
114
|
+
- mode_slice_decision: quick_task | structured_slice | structured_delivery | block
|
|
115
|
+
- required_next_gate: none | PRD | SD | TP | Brownfield Analysis
|
|
116
|
+
- artefact: .agdf/control/artefacts/<key>/BROWNFIELD_REVIEW.md | none
|
|
117
|
+
- scope:
|
|
118
|
+
- evidence:
|
|
119
|
+
- transparency: why later artefacts are skipped, shortened or required
|
|
120
|
+
- missing_evidence:
|
|
121
|
+
- current_coverage:
|
|
122
|
+
- reuse_strategy:
|
|
123
|
+
- risks:
|
|
124
|
+
- context_graph_impact:
|
|
125
|
+
- required_next_step:
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Pass / Revise / Block Guidance
|
|
129
|
+
- `pass`: existing owners are understood, reuse path is clear, and no blocking drift or parallel structure risk remains.
|
|
130
|
+
- `revise`: relevant evidence, tests, ownership, or reuse path is incomplete.
|
|
131
|
+
- `block`: implementation would create a second SoT, second owner, unresolved product semantics, or hard unmitigated risk.
|
|
132
|
+
|
|
133
|
+
## Forbidden
|
|
134
|
+
This skill must not:
|
|
135
|
+
|
|
136
|
+
- propose a Greenfield replacement without evidence
|
|
137
|
+
- silently accept overlapping ownership
|
|
138
|
+
- convert product-semantics drift into a mere refactor
|
|
139
|
+
- create Context Graph nodes automatically
|
|
140
|
+
- treat archive links as active current specification signals
|
|
141
|
+
- recommend broad PRD/SD/TP or implementation by reflex before Mode/Slice Decision is recorded
|
|
142
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: inspect workarounds, fallbacks, parallel structures or symptom fixes
|
|
3
|
+
mode: subagent
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
name: agdf-clean-implementation-review
|
|
8
|
+
description: Use this skill to determine whether an implementation is a clean primary solution or whether fallbacks, workarounds, guards, defaults, shims, or parallel structures have made it unnecessarily complex. Use it after code changes, before QA, or whenever symptom treatment is suspected.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# clean-implementation-review
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
Evaluate implementation integrity.
|
|
15
|
+
|
|
16
|
+
This skill answers:
|
|
17
|
+
|
|
18
|
+
- was the task solved with a clean primary solution
|
|
19
|
+
- was the root cause fixed or only masked
|
|
20
|
+
- were unnecessary fallbacks, workarounds, guards, defaults, or shims introduced
|
|
21
|
+
- were unnecessary parallel structures introduced
|
|
22
|
+
- does the solution fit the existing architecture
|
|
23
|
+
- is it maintainable or workaround-heavy
|
|
24
|
+
|
|
25
|
+
## Runtime Contract
|
|
26
|
+
Use `../agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
|
|
27
|
+
|
|
28
|
+
Clean-review-specific output must make the primary solution, fallbacks, workarounds, parallel structures, exit criteria, and next cleanup/review step visible.
|
|
29
|
+
|
|
30
|
+
## Rules
|
|
31
|
+
1. Clean primary solution before fallback.
|
|
32
|
+
2. Root cause before symptom masking.
|
|
33
|
+
3. Fallbacks are exceptions, not target architecture.
|
|
34
|
+
4. Every retained fallback needs rationale, target state, and exit condition.
|
|
35
|
+
5. No silent parallel structures.
|
|
36
|
+
6. Brownfield fit is mandatory.
|
|
37
|
+
7. Maintainability matters; "works somehow" is not enough.
|
|
38
|
+
8. Async execute paths must not decide product rules again.
|
|
39
|
+
9. Shared finalization or merge rules belong in one owner.
|
|
40
|
+
|
|
41
|
+
## When To Use
|
|
42
|
+
- after `CD+Tests`
|
|
43
|
+
- before QA
|
|
44
|
+
- when a solution contains many guards, defaults, or special paths
|
|
45
|
+
- when wrappers or helper layers were introduced
|
|
46
|
+
- when symptom treatment is suspected
|
|
47
|
+
- when fallback, retry, or compatibility-shim logic was added
|
|
48
|
+
- when code works but the architecture looks questionable
|
|
49
|
+
|
|
50
|
+
## Inputs
|
|
51
|
+
Use what is available:
|
|
52
|
+
|
|
53
|
+
- Task Plan
|
|
54
|
+
- Code Deliverables
|
|
55
|
+
- changed files
|
|
56
|
+
- tests and test results
|
|
57
|
+
- `agdf-code-review` or Code Review Report
|
|
58
|
+
- QA Report
|
|
59
|
+
- Brownfield Analysis findings
|
|
60
|
+
- PRD or SD architecture notes
|
|
61
|
+
|
|
62
|
+
If evidence is missing, mark it explicitly.
|
|
63
|
+
|
|
64
|
+
## Workflow
|
|
65
|
+
1. Understand the intended change.
|
|
66
|
+
2. Identify the primary implementation path.
|
|
67
|
+
3. Identify fallbacks, guards, defaults, shims, retries, wrappers, and catch-all branches.
|
|
68
|
+
4. Decide whether each is justified.
|
|
69
|
+
5. Check for parallel ownership.
|
|
70
|
+
6. Check Brownfield fit.
|
|
71
|
+
7. Assess whether the implementation fixes the root cause.
|
|
72
|
+
8. Assign a decision:
|
|
73
|
+
- `pass`
|
|
74
|
+
- `revise`
|
|
75
|
+
- `block`
|
|
76
|
+
- `not_applicable`
|
|
77
|
+
|
|
78
|
+
## Output
|
|
79
|
+
Use this compact structure:
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
## Clean Implementation Review
|
|
83
|
+
- decision:
|
|
84
|
+
- primary_solution:
|
|
85
|
+
- evidence:
|
|
86
|
+
- fallbacks_retained:
|
|
87
|
+
- workaround_or_shim_risk:
|
|
88
|
+
- parallel_structure_risk:
|
|
89
|
+
- brownfield_fit:
|
|
90
|
+
- missing_evidence:
|
|
91
|
+
- required_next_step:
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Pass / Revise / Block Guidance
|
|
95
|
+
- `pass`: primary solution is clean, tested, and integrated with existing owners.
|
|
96
|
+
- `revise`: solution works but contains avoidable fallback, unclear ownership, or missing evidence.
|
|
97
|
+
- `block`: solution creates a second SoT, a second owner, unbounded fallback, or masks unresolved product semantics.
|
|
98
|
+
|
|
99
|
+
## Forbidden
|
|
100
|
+
This skill must not:
|
|
101
|
+
|
|
102
|
+
- accept fallback-heavy logic as target architecture
|
|
103
|
+
- hide unjustified workarounds
|
|
104
|
+
- treat green tests as proof of solution integrity
|
|
105
|
+
- decide final QA
|
|
106
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: mandatory CR step after code changes, focused on defects, regression and security findings
|
|
3
|
+
mode: subagent
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
name: agdf-code-review
|
|
8
|
+
description: Use this skill after code changes and before QA to produce the mandatory Code Review Report for correctness, regression, security, and maintainability findings in the actual diff. It standardizes the CR step without replacing TP review, clean review, or QA.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# code-review
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
Produce the mandatory Code Review Report (CR) for a relevant run.
|
|
15
|
+
|
|
16
|
+
It answers:
|
|
17
|
+
|
|
18
|
+
- whether the changed code shows functional defects, security issues, regression risks, or maintainability problems that matter
|
|
19
|
+
- whether findings are blocking, revisable, or advisory
|
|
20
|
+
- which concrete evidence in files, diffs, tests, or runtime observations supports each finding
|
|
21
|
+
- which issues must be fixed before QA
|
|
22
|
+
- whether Brownfield, TP, or clean-review follow-up remains open
|
|
23
|
+
|
|
24
|
+
## Runtime Contract
|
|
25
|
+
Use `../agdf-runtime-contract.md` for Quality Contract output, Context Graph fields, gate terms, and non-duplication rules.
|
|
26
|
+
|
|
27
|
+
Code-review-specific output must make actual findings, missing review scope, evidence strength, and the next required step visible.
|
|
28
|
+
|
|
29
|
+
## Rules
|
|
30
|
+
1. Review the actual diff and impacted code, not intent alone.
|
|
31
|
+
2. Findings require concrete evidence.
|
|
32
|
+
3. Prioritize correctness, safety, data integrity, compatibility, and maintainability over style.
|
|
33
|
+
4. Do not generate style-only noise.
|
|
34
|
+
5. Missing review scope or evidence must stay visible.
|
|
35
|
+
6. Brownfield owners and existing conventions are binding unless deviation is justified.
|
|
36
|
+
7. Distinguish blocking defects from fixable review findings.
|
|
37
|
+
8. CR does not grant QA pass.
|
|
38
|
+
|
|
39
|
+
## When To Use
|
|
40
|
+
- after `CD+Tests`
|
|
41
|
+
- before `QA`
|
|
42
|
+
- when code changes exist
|
|
43
|
+
- when multiple agents or contributors touched the same area
|
|
44
|
+
- when a commit-near change needs explicit review evidence
|
|
45
|
+
|
|
46
|
+
## Inputs
|
|
47
|
+
Use what is available:
|
|
48
|
+
|
|
49
|
+
- changed files and diff
|
|
50
|
+
- affected neighbouring code
|
|
51
|
+
- test/build results
|
|
52
|
+
- Brownfield Analysis
|
|
53
|
+
- Task Plan and TP Review
|
|
54
|
+
- Clean Implementation Review
|
|
55
|
+
- runtime or UI evidence
|
|
56
|
+
- known risks or follow-up decisions
|
|
57
|
+
|
|
58
|
+
If no code changes are present, do not invent a CR result.
|
|
59
|
+
|
|
60
|
+
## Workflow
|
|
61
|
+
1. Inspect the changed files and directly impacted neighbours.
|
|
62
|
+
2. Check correctness, edge cases, and error paths.
|
|
63
|
+
3. Check security, data handling, and state ownership risks.
|
|
64
|
+
4. Check regression and compatibility risks.
|
|
65
|
+
5. Check maintainability only where it creates real defect or change-risk exposure.
|
|
66
|
+
6. Classify the overall result:
|
|
67
|
+
- `pass`
|
|
68
|
+
- `revise`
|
|
69
|
+
- `block`
|
|
70
|
+
- `not_applicable`
|
|
71
|
+
7. Set exactly one required next step.
|
|
72
|
+
|
|
73
|
+
## Output
|
|
74
|
+
Use this compact structure:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
## Code Review
|
|
78
|
+
- decision: pass | revise | block | not_applicable
|
|
79
|
+
- findings:
|
|
80
|
+
- [severity] file/path - issue - evidence
|
|
81
|
+
- missing_evidence:
|
|
82
|
+
- risks:
|
|
83
|
+
- required_next_step:
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Decision Guidance
|
|
87
|
+
- `pass`: no meaningful review finding remains evident in reviewed scope.
|
|
88
|
+
- `revise`: fixable correctness, regression, or maintainability issues remain.
|
|
89
|
+
- `block`: a hard defect, security risk, data-integrity risk, or unresolved critical uncertainty remains.
|
|
90
|
+
- `not_applicable`: no code changes were present for review.
|
|
91
|
+
|
|
92
|
+
## Forbidden
|
|
93
|
+
This skill must not:
|
|
94
|
+
|
|
95
|
+
- decide final QA
|
|
96
|
+
- accept a green build as sufficient review evidence
|
|
97
|
+
- hide missing review scope
|
|
98
|
+
- generate style-only findings
|
|
99
|
+
- duplicate TP Review or QA as if they were the same step
|
|
100
|
+
|