create-agdf 0.11.4 → 0.13.0
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/README.md +1 -1
- package/generated/.agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +25 -0
- package/generated/.github/skills/agdf-brownfield-analysis/SKILL.md +26 -0
- package/generated/.github/skills/agdf-gate-check/SKILL.md +40 -18
- package/generated/.github/skills/agdf-interaction-locales.json +50 -0
- package/generated/.github/skills/agdf-runtime-contract.md +1 -0
- package/generated/.github/skills/contracts/gate-transition.md +7 -3
- package/generated/.github/skills/contracts/interaction.md +22 -0
- package/generated/.github/skills/contracts/modes.md +81 -0
- package/generated/.github/skills/contracts/task-target-resolution.md +102 -0
- package/generated/.opencode/AGDF.md +2 -0
- package/generated/.opencode/agdf-interaction-locales.json +50 -0
- package/generated/.opencode/agdf-runtime-contract.md +1 -0
- package/generated/.opencode/contracts/gate-transition.md +7 -3
- package/generated/.opencode/contracts/interaction.md +22 -0
- package/generated/.opencode/contracts/modes.md +81 -0
- package/generated/.opencode/contracts/task-target-resolution.md +102 -0
- package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +26 -0
- package/generated/.opencode/skills/agdf-gate-check/SKILL.md +40 -18
- package/generated/AGENTS.md +1 -0
- package/generated/plugins/agdf/.claude-plugin/plugin.json +2 -2
- package/generated/plugins/agdf/.codex-plugin/plugin.json +9 -6
- package/generated/plugins/agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +25 -0
- package/generated/plugins/agdf/meta/agdf-agent-router.md +16 -0
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +50 -0
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +41 -5
- package/generated/plugins/agdf/meta/agdf-runtime-contract.md +1 -0
- package/generated/plugins/agdf/meta/contracts/gate-transition.md +7 -3
- package/generated/plugins/agdf/meta/contracts/interaction.md +22 -0
- package/generated/plugins/agdf/meta/contracts/modes.md +81 -0
- package/generated/plugins/agdf/meta/contracts/task-target-resolution.md +102 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +50 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +41 -5
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/gate-policy.js +14 -7
- package/generated/plugins/agdf/runtime/create-agdf/lib/interaction-presentation.js +85 -0
- package/generated/plugins/agdf/runtime/create-agdf/package.json +4 -65
- package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +146 -40
- package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +26 -0
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +40 -18
- package/generated/plugins/agdf/submission/openai/availability.md +16 -0
- package/generated/plugins/agdf/submission/openai/capability-matrix.json +49 -0
- package/generated/plugins/agdf/submission/openai/release-notes.md +16 -0
- package/generated/plugins/agdf/submission/openai/reviewer-cases.json +96 -0
- package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +43 -0
- package/generated/submissions/openai/agdf/assets/agdf-icon.svg +16 -0
- package/generated/submissions/openai/agdf/assets/agdf-logo.svg +16 -0
- package/generated/submissions/openai/agdf/meta/agdf-agent-router.md +129 -0
- package/generated/submissions/openai/agdf/meta/agdf-constitution.md +329 -0
- package/generated/submissions/openai/agdf/meta/agdf-interaction-locales.json +514 -0
- package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +263 -0
- package/generated/submissions/openai/agdf/meta/agdf-runtime-contract.md +16 -0
- package/generated/submissions/openai/agdf/meta/agdf-tenets.md +201 -0
- package/generated/submissions/openai/agdf/meta/contracts/closeout.md +29 -0
- package/generated/submissions/openai/agdf/meta/contracts/context-graph.md +48 -0
- package/generated/submissions/openai/agdf/meta/contracts/control-scaffold.md +115 -0
- package/generated/submissions/openai/agdf/meta/contracts/gate-transition.md +165 -0
- package/generated/submissions/openai/agdf/meta/contracts/interaction.md +476 -0
- package/generated/submissions/openai/agdf/meta/contracts/modes.md +183 -0
- package/generated/submissions/openai/agdf/meta/contracts/quality.md +157 -0
- package/generated/submissions/openai/agdf/meta/contracts/task-target-resolution.md +102 -0
- package/generated/submissions/openai/agdf/skills/brownfield-analysis/SKILL.md +175 -0
- package/generated/submissions/openai/agdf/skills/brownfield-analysis/help.md +23 -0
- package/generated/submissions/openai/agdf/skills/clean-implementation-review/SKILL.md +126 -0
- package/generated/submissions/openai/agdf/skills/clean-implementation-review/help.md +23 -0
- package/generated/submissions/openai/agdf/skills/code-review/SKILL.md +119 -0
- package/generated/submissions/openai/agdf/skills/code-review/help.md +23 -0
- package/generated/submissions/openai/agdf/skills/delivery-closeout/SKILL.md +118 -0
- package/generated/submissions/openai/agdf/skills/delivery-closeout/help.md +23 -0
- package/generated/submissions/openai/agdf/skills/delivery-path-search/SKILL.md +94 -0
- package/generated/submissions/openai/agdf/skills/delivery-path-search/help.md +23 -0
- package/generated/submissions/openai/agdf/skills/gate-check/SKILL.md +238 -0
- package/generated/submissions/openai/agdf/skills/gate-check/help.md +23 -0
- package/generated/submissions/openai/agdf/skills/qa-gate/SKILL.md +137 -0
- package/generated/submissions/openai/agdf/skills/qa-gate/help.md +23 -0
- package/generated/submissions/openai/agdf/skills/release-or/SKILL.md +137 -0
- package/generated/submissions/openai/agdf/skills/release-or/help.md +23 -0
- package/generated/submissions/openai/agdf/skills/task-plan-review/SKILL.md +157 -0
- package/generated/submissions/openai/agdf/skills/task-plan-review/help.md +23 -0
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/SKILL.md +94 -0
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/help.md +17 -0
- package/generated/submissions/openai/agdf/submission/openai/availability.md +16 -0
- package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +49 -0
- package/generated/submissions/openai/agdf/submission/openai/inventory.json +175 -0
- package/generated/submissions/openai/agdf/submission/openai/listing.json +38 -0
- package/generated/submissions/openai/agdf/submission/openai/readiness.json +40 -0
- package/generated/submissions/openai/agdf/submission/openai/readiness.md +24 -0
- package/generated/submissions/openai/agdf/submission/openai/release-notes.md +16 -0
- package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +96 -0
- package/lib/cli/application.js +13 -2
- package/lib/control-evaluation/gate-policy.js +14 -7
- package/lib/installers/local-marketplace.js +1 -1
- package/lib/installers/opencode.js +128 -1
- package/lib/interaction-presentation.js +85 -0
- package/lib/live-agent/read-only-structured.js +43 -0
- package/lib/proportionality-benchmark/blind-prompt.js +37 -0
- package/lib/proportionality-benchmark/contracts.js +120 -0
- package/lib/proportionality-benchmark/corpus-loader.js +110 -0
- package/lib/proportionality-benchmark/evaluator.js +250 -0
- package/lib/proportionality-benchmark/index.js +7 -0
- package/lib/proportionality-benchmark/live-recorder.js +100 -0
- package/lib/proportionality-benchmark/report.js +51 -0
- package/lib/proportionality-benchmark/source-fingerprint.js +30 -0
- package/lib/public-plugin/builder.js +82 -0
- package/lib/public-plugin/contract.js +102 -0
- package/lib/public-plugin/manifest.js +72 -0
- package/lib/public-plugin/report.js +33 -0
- package/lib/public-plugin/validator.js +101 -0
- package/lib/skill-evals/live-recorder.js +3 -26
- package/opencode-plugin.js +40 -1
- package/package.json +7 -2
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# AGDF Runtime Contract — Quality
|
|
2
|
+
|
|
3
|
+
## Quality Readiness Projection
|
|
4
|
+
|
|
5
|
+
After CD+Tests, when any of the four review/QA artefacts exists, surfaces may show one compact
|
|
6
|
+
derived `Quality Readiness` projection. It answers the user-facing question "what is the current
|
|
7
|
+
quality outcome and what should happen next?" without replacing evidence or creating another
|
|
8
|
+
decision authority.
|
|
9
|
+
|
|
10
|
+
- It contains exactly four rows, in this order: `Plan coverage` from `task-plan-review`,
|
|
11
|
+
`Solution integrity` from `clean-implementation-review`, `Code quality` from `code-review`,
|
|
12
|
+
and `QA decision` from `qa-gate`.
|
|
13
|
+
- `qa-gate` is always labeled as the sole decision owner. The other three rows are evidence
|
|
14
|
+
dimensions, not competing pass/revise/block decisions.
|
|
15
|
+
- Overall status reuses canonical severity ordering. Missing or conflicting required evidence
|
|
16
|
+
must not render `pass`; surface `revise` or `block` with the decisive reason and one permitted
|
|
17
|
+
next action instead.
|
|
18
|
+
- The projection is derived, non-persistent and non-authorizing. It cannot accept an approval,
|
|
19
|
+
advance a gate, suppress a report or replace the Run Status Card, Gate Transition Card, JSON
|
|
20
|
+
projection or durable review artefacts.
|
|
21
|
+
- Show compact rows on `pass`. On `revise` or `block`, expand only the decisive row with its
|
|
22
|
+
canonical report reference; do not paste complete reports into chat.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## Chat Output Discipline
|
|
26
|
+
|
|
27
|
+
Durable artefacts are for the repository, not for flooding the chat.
|
|
28
|
+
When a skill creates or updates `.agdf/control/` files, gate artefacts, reviews, QA reports or OR reports, the chat response must stay compact:
|
|
29
|
+
|
|
30
|
+
- name the artefact path and status
|
|
31
|
+
- summarize the decision or content in a few lines
|
|
32
|
+
- state the current gate, forbidden work and next permissible step
|
|
33
|
+
- mention validation evidence when available
|
|
34
|
+
|
|
35
|
+
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.
|
|
36
|
+
For larger or more formal work, create or update the durable artefacts fully, then reference them by path and summarize what changed.
|
|
37
|
+
|
|
38
|
+
### Chat and Tool-Call Discipline
|
|
39
|
+
|
|
40
|
+
Chat output shows decisions and outcomes. Files show evidence and detail. The agent
|
|
41
|
+
minimises both the number of tool calls and the amount of accompanying chat text. This
|
|
42
|
+
is surface-agnostic: it changes agent behaviour and framework text, not host rendering.
|
|
43
|
+
Whether a host renders a tool-call block visibly is a host concern; the framework ensures
|
|
44
|
+
the agent makes fewer calls and produces less text around them.
|
|
45
|
+
|
|
46
|
+
Skill output compaction:
|
|
47
|
+
|
|
48
|
+
- QA, Code Review, TP Review and Clean Implementation Review output is 1 line at `pass`:
|
|
49
|
+
`<skill>: pass — <one-line summary>`.
|
|
50
|
+
- At `revise`/`block`: the decisive dimension, reason and next action. The Quality
|
|
51
|
+
Readiness projection is shown only at `revise`/`block`, not at `pass`.
|
|
52
|
+
- Full reports remain in durable files; the chat references the path.
|
|
53
|
+
|
|
54
|
+
Tool-call batching:
|
|
55
|
+
|
|
56
|
+
- `RUN_STATE.md` is written once per user gate approval, not once per field change. The
|
|
57
|
+
agent keeps intermediate state in memory between gate approvals and writes the complete
|
|
58
|
+
updated state in one operation.
|
|
59
|
+
- The agent does not `read` existing artefacts for format reference. Skill instructions
|
|
60
|
+
carry the format/structure inline. If a specific existing artefact must be inspected
|
|
61
|
+
for content (not format), the read has no accompanying commentary.
|
|
62
|
+
- Artefact writes are silent: the agent names the path and a 1-line summary only when an
|
|
63
|
+
artefact is first created or significantly changed — not on every state update.
|
|
64
|
+
- Validation commands (tests, integrity, diff) show pass/fail only. Full output appears
|
|
65
|
+
only on failure.
|
|
66
|
+
|
|
67
|
+
Always visible:
|
|
68
|
+
|
|
69
|
+
- Gate decisions (Run Status Card, Gate Transition Card, approval question).
|
|
70
|
+
- Post-acceptance narration (1 line per gate transition).
|
|
71
|
+
- Delivery summary (UAT/OR compact summary).
|
|
72
|
+
- Errors, blockers and evidence at `revise`/`block`.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## Quality Contract Output
|
|
76
|
+
|
|
77
|
+
Structured Delivery skills use this shape when relevant:
|
|
78
|
+
|
|
79
|
+
- `decision`: `pass | revise | block | not_applicable`
|
|
80
|
+
- `evidence`: concrete artefacts, files, tests, logs, diffs, or observations
|
|
81
|
+
- `missing_evidence`: missing proof needed for a stronger claim
|
|
82
|
+
- `risks`: remaining risks, assumptions, fallbacks, drift, or blockers
|
|
83
|
+
- `required_next_step`: exactly the next clean step
|
|
84
|
+
- `impact_codes`: affected Quality Contract codes, if the target repo has a registry
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## Normalized Review Gaps
|
|
88
|
+
|
|
89
|
+
This section is the sole normative owner for review-gap classification and routing. An applicable
|
|
90
|
+
finding from Task Plan Review, Clean Implementation Review or Code Review carries exactly one
|
|
91
|
+
normalized gap type and one routing target:
|
|
92
|
+
|
|
93
|
+
| gap_type | meaning | routing_target |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| `requirements_gap` | approved product behavior or an acceptance criterion is missing or contradictory | `PRD`; use `UR` only when user intent or scope changed |
|
|
96
|
+
| `design_gap` | technical ownership, architecture, fallback policy, exit criterion or a prohibited parallel structure was not decided | `SD` |
|
|
97
|
+
| `plan_gap` | an approved requirement or design obligation lacks an executable task, test or evidence mapping | `TP` |
|
|
98
|
+
| `implementation_gap` | code or a surface does not fulfil an approved requirement, design or task | `CD+Tests` |
|
|
99
|
+
| `evidence_gap` | required test, runtime or visible evidence is absent or insufficient | `evidence_obligation` |
|
|
100
|
+
| `emergent_risk` | implementation exposes a concrete risk not reasonably decidable from approved artefacts | earliest affected `UR | PRD | SD | TP | CD+Tests | evidence_obligation` target after explicit assessment |
|
|
101
|
+
|
|
102
|
+
Normalized finding rows use these fields in order:
|
|
103
|
+
|
|
104
|
+
`finding_id | gap_type | routing_target | gap_status | evidence | required_next_step`
|
|
105
|
+
|
|
106
|
+
- `finding_id` is stable within the durable review report.
|
|
107
|
+
- `gap_type` is exactly one type from the table above.
|
|
108
|
+
- `routing_target` is exactly `UR | PRD | SD | TP | CD+Tests | evidence_obligation` and must agree
|
|
109
|
+
with the fixed route above. `requirements_gap` may use `UR` only with evidence of changed user
|
|
110
|
+
intent or scope. `emergent_risk` requires an explicit earliest-owner assessment.
|
|
111
|
+
- `gap_status` is exactly `open | resolved`.
|
|
112
|
+
- `evidence` names concrete source, diff, test, observation or missing proof.
|
|
113
|
+
- `required_next_step` is exactly one executable action consistent with the routing target.
|
|
114
|
+
|
|
115
|
+
Missing, unknown or contradictory fields fail closed as an open gap. Consumers must not silently
|
|
116
|
+
reclassify a finding. Classification is non-authorizing: it cannot edit or approve UR, PRD, SD or TP,
|
|
117
|
+
advance a gate or replace a review decision. `qa-gate` consumes the normalized findings and cannot
|
|
118
|
+
return `pass` while any applicable finding is open or invalid.
|
|
119
|
+
|
|
120
|
+
`none` is permitted only as a presentation sentinel on a fulfilled UX Intent Fidelity row.
|
|
121
|
+
It is not a seventh normalized finding type and must not appear in a normalized finding row.
|
|
122
|
+
|
|
123
|
+
A consumer may repeat the field order and allowed scalar values needed to emit valid output. It must
|
|
124
|
+
reference this section for meanings and routes instead of maintaining a second complete mapping.
|
|
125
|
+
|
|
126
|
+
## UX Intent Fidelity
|
|
127
|
+
|
|
128
|
+
When an approved PRD contains applicable UX criteria, `task-plan-review` produces an additional
|
|
129
|
+
evidence matrix with these columns in order:
|
|
130
|
+
|
|
131
|
+
`prd_criterion | working_mode_state | task_id | visible_evidence | fidelity_status | gap_type`
|
|
132
|
+
|
|
133
|
+
`fidelity_status` is exactly `fulfilled | partial | missing | not_verifiable`. A fulfilled row uses
|
|
134
|
+
the `none` sentinel. Any non-fulfilled row uses the applicable normalized type from `Normalized
|
|
135
|
+
Review Gaps`; it may also emit the normalized finding shape when routing detail is required.
|
|
136
|
+
|
|
137
|
+
This matrix verifies PRD-to-TP coverage and TP-to-code/surface fulfilment. It does not create product
|
|
138
|
+
requirements and does not decide QA. A missing implementation-relevant PRD requirement is a
|
|
139
|
+
`requirements_gap` and routes to PRD revision. `qa-gate` consumes this evidence and cannot return
|
|
140
|
+
`pass` while an applicable row is `partial`, `missing` or `not_verifiable`, or while a visible-behavior
|
|
141
|
+
claim has code evidence without visible evidence. The four-row Quality Readiness projection and
|
|
142
|
+
`qa-gate` sole decision ownership remain unchanged.
|
|
143
|
+
|
|
144
|
+
A skill may briefly remind this shape, but must not duplicate a complete code or rule matrix.
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
## Skill Output
|
|
148
|
+
|
|
149
|
+
Every skill output should be as short as possible and as concrete as needed.
|
|
150
|
+
It must distinguish:
|
|
151
|
+
|
|
152
|
+
- facts
|
|
153
|
+
- evidence
|
|
154
|
+
- assumptions
|
|
155
|
+
- interpretations
|
|
156
|
+
- missing evidence
|
|
157
|
+
- the next permissible step
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# AGDF Runtime Contract — Task Target Resolution
|
|
2
|
+
|
|
3
|
+
## Purpose And Ordering
|
|
4
|
+
|
|
5
|
+
Resolve the user's primary work target before repository activation, Scope Classification, mode
|
|
6
|
+
selection or gate evaluation. Repository governance is downstream of the task target; the current
|
|
7
|
+
working directory, an inspected repository or a source mentioned as evidence must never become the
|
|
8
|
+
work target by accident.
|
|
9
|
+
|
|
10
|
+
The canonical order is:
|
|
11
|
+
|
|
12
|
+
1. resolve or revalidate the task target;
|
|
13
|
+
2. derive the governance target from that resolved target;
|
|
14
|
+
3. activate repository-local AGDF control only for that governance target;
|
|
15
|
+
4. then apply read-only orientation, Scope Classification, mode selection and gate evaluation.
|
|
16
|
+
|
|
17
|
+
If task-target resolution is unresolved, steps 2–4 and every mutation are forbidden.
|
|
18
|
+
|
|
19
|
+
## Resolution Result
|
|
20
|
+
|
|
21
|
+
Use one normalized result:
|
|
22
|
+
|
|
23
|
+
- `resolution_state`: `resolved | unresolved`
|
|
24
|
+
- `reason_code`: `explicit_target | continued_target | multiple_plausible_targets |
|
|
25
|
+
target_content_mismatch | target_unavailable | no_reliable_target`
|
|
26
|
+
- `primary_target`: exactly one requested work object when resolved, otherwise empty
|
|
27
|
+
- `evidence_sources`: zero or more mentioned or inspected sources that do not gain mutation authority
|
|
28
|
+
- `working_directory`: execution context only, never target authority by itself
|
|
29
|
+
- `governance_target`: the repository whose control state applies to the primary target, otherwise empty
|
|
30
|
+
- `target_changed`: whether an explicit new target replaced the previously confirmed target
|
|
31
|
+
- `next_action`: required clarification, supply or retry action when unresolved
|
|
32
|
+
|
|
33
|
+
A resolved result requires a non-empty `primary_target` and a reason code of `explicit_target` or
|
|
34
|
+
`continued_target`. An unresolved result requires an empty `primary_target`, an empty
|
|
35
|
+
`governance_target`, one of the four unresolved reason codes and a non-empty `next_action`.
|
|
36
|
+
Contradictory or incomplete results fail closed.
|
|
37
|
+
|
|
38
|
+
## Target Authority Precedence
|
|
39
|
+
|
|
40
|
+
Resolve in this order:
|
|
41
|
+
|
|
42
|
+
1. an explicit file, artefact or repository named as the work target in the current user turn;
|
|
43
|
+
2. a previously confirmed target only when the current turn unambiguously continues the same action,
|
|
44
|
+
object and scope;
|
|
45
|
+
3. the current repository or working directory only when the request explicitly or deictically asks
|
|
46
|
+
for work on "this project", "this repository" or an equivalent current-scope reference;
|
|
47
|
+
4. otherwise `no_reliable_target`.
|
|
48
|
+
|
|
49
|
+
An explicit current-turn target always replaces an inherited target. Make the change visible when
|
|
50
|
+
the previous target could otherwise remain plausible.
|
|
51
|
+
|
|
52
|
+
Do not fall back to the working directory, a neighboring file or an evidence source when the
|
|
53
|
+
explicit target is unavailable or its content does not support the requested change.
|
|
54
|
+
|
|
55
|
+
## Evidence And Mutation Boundary
|
|
56
|
+
|
|
57
|
+
Reading, inspecting, mentioning or relying on a repository or artefact makes it an evidence source,
|
|
58
|
+
not a mutation target. Evidence access never grants mutation authority and never activates that
|
|
59
|
+
repository's AGDF control state.
|
|
60
|
+
|
|
61
|
+
Derive `governance_target` only from:
|
|
62
|
+
|
|
63
|
+
- the repository containing the resolved `primary_target`; or
|
|
64
|
+
- an explicit user statement that a named repository governs the target.
|
|
65
|
+
|
|
66
|
+
An external standalone artefact may have no repository governance target. In that case the router
|
|
67
|
+
continues with the applicable non-repository path; it must not borrow governance from the current
|
|
68
|
+
working directory.
|
|
69
|
+
|
|
70
|
+
## Continuation And Target Change
|
|
71
|
+
|
|
72
|
+
A confirmed target may continue across related turns only when the current request remains
|
|
73
|
+
unambiguous. Revalidate it before every mutation or gate decision. New explicit target evidence wins.
|
|
74
|
+
New ambiguity ends the inherited binding and produces `multiple_plausible_targets`.
|
|
75
|
+
|
|
76
|
+
When a durable AGDF run exists, its Source And Scope State may record the confirmed target as
|
|
77
|
+
evidence. It does not override a newer explicit user target. Outside a run, continuation remains
|
|
78
|
+
transient conversation state; do not create a global target store or a second run-state owner.
|
|
79
|
+
|
|
80
|
+
## Fail-Closed States
|
|
81
|
+
|
|
82
|
+
- `multiple_plausible_targets`: more than one work target remains plausible; list the candidates and
|
|
83
|
+
request the smallest clarification.
|
|
84
|
+
- `target_content_mismatch`: the requested content change is not supported by the explicit target's
|
|
85
|
+
observable content; name the mismatch and ask whether the target or requested change should change.
|
|
86
|
+
- `target_unavailable`: the named file, attachment or artefact cannot be inspected; request supply or
|
|
87
|
+
access and offer a visible retry.
|
|
88
|
+
- `no_reliable_target`: neither an explicit target nor an unambiguous continuation exists; request a
|
|
89
|
+
target.
|
|
90
|
+
|
|
91
|
+
These states forbid repository activation, Scope Classification, gate evaluation and mutation.
|
|
92
|
+
Never silently expand scope to make the request fit a different project.
|
|
93
|
+
|
|
94
|
+
## Presentation Boundary
|
|
95
|
+
|
|
96
|
+
`contracts/interaction.md` owns the visible, non-authorizing Task Target Orientation.
|
|
97
|
+
`create-agdf/lib/interaction-presentation.js` owns its rendering. The renderer projects a normalized
|
|
98
|
+
result; it must not resolve targets, derive governance or become a state store.
|
|
99
|
+
|
|
100
|
+
Show orientation when target/context separation is material, when the target changes, or when the
|
|
101
|
+
result is unresolved. Avoid redundant presentation for an obvious unchanged target. Presentation
|
|
102
|
+
never grants mutation or gate authority.
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brownfield-analysis
|
|
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
|
+
---
|
|
5
|
+
|
|
6
|
+
# brownfield-analysis
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
Ensure delivery in an existing system is Brownfield-oriented, not Greenfield-style.
|
|
10
|
+
|
|
11
|
+
The skill answers:
|
|
12
|
+
|
|
13
|
+
- which existing artefacts matter
|
|
14
|
+
- what already exists fully or partially
|
|
15
|
+
- what can be reused, extended, or refactored
|
|
16
|
+
- whether new artefacts are really needed
|
|
17
|
+
- architecture, compatibility, migration, and regression impact
|
|
18
|
+
- the minimal clean next step
|
|
19
|
+
- whether Context Graph impact exists without automatically creating a node
|
|
20
|
+
|
|
21
|
+
## Runtime Contract
|
|
22
|
+
Use these focused runtime-contract modules:
|
|
23
|
+
|
|
24
|
+
- `../../meta/contracts/gate-transition.md`
|
|
25
|
+
- `../../meta/contracts/modes.md`
|
|
26
|
+
- `../../meta/contracts/context-graph.md`
|
|
27
|
+
- `../../meta/contracts/quality.md`
|
|
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`, `verified_change`, `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
|
+
In `post_ur_review`, also record `delivery_context`, `ui_ux_impact`, `ui_ux_impact_reason` and
|
|
40
|
+
`ux_intent_definition_required` using the single classification and routing contract in
|
|
41
|
+
`../../meta/contracts/gate-transition.md`. Greenfield records make existing-system evidence explicitly
|
|
42
|
+
not applicable; Brownfield records cite repository evidence. Do not create a second Greenfield router.
|
|
43
|
+
|
|
44
|
+
## Rules
|
|
45
|
+
1. Brownfield first: understand the existing codebase before PRD/SD decisions when existing-system impact is possible, and again before implementation.
|
|
46
|
+
2. Brownfield Review after `Approval: UR` is a sizing and routing step. It must visibly decide `quick_task`, `verified_change`, `structured_slice`, `structured_delivery`, or `block` before PRD depth or implementation is chosen. Persist the completed review and its decision, scope reason, evidence and required next gate in the same internal operation; mark the review `done` only after both the artefact and canonical run projection are complete. An interrupted, incomplete or legacy record stays at fail-closed `Mode/Slice Decision` recovery without another user approval.
|
|
47
|
+
3. Reuse-before-create: prefer existing modules, services, components, tables, endpoints, tests, and configuration.
|
|
48
|
+
4. Minimal clean slice: choose the smallest durable intervention, not merely the smallest technical diff.
|
|
49
|
+
5. No silent parallel structures.
|
|
50
|
+
6. Existing architecture, naming, error handling, logging, security, and test conventions are binding unless deviation is justified.
|
|
51
|
+
7. What is not visibly evidenced does not count as existing.
|
|
52
|
+
8. Async execute paths must not become a second product-policy decision point.
|
|
53
|
+
9. Visible state ownership must be checked for chat, rendering, scrolling, recovery, and status problems.
|
|
54
|
+
10. SoT/runtime/product-semantics drift must be named; if official behaviour must be decided first, recommend UR or equivalent product direction.
|
|
55
|
+
11. Large UI surfaces and state hooks must be checked for mixed render, view-model, derived state, orchestration, persistence, and recovery ownership.
|
|
56
|
+
12. Context Graph impact must be curated; it is not a review log or version index.
|
|
57
|
+
13. Specification archive migrations must follow the archive index if present.
|
|
58
|
+
14. In `post_ur_review`, evaluate unchanged compact paths first. For a structured candidate, apply
|
|
59
|
+
only the `Structured Depth Decision` in `modes.md`; do not recreate its trigger/check matrix in
|
|
60
|
+
this skill.
|
|
61
|
+
15. A positive structured decision requires `depth_policy_version: 1`,
|
|
62
|
+
`depth_facts_status: complete`, complete evidence for all seven bounded-slice checks, a primary
|
|
63
|
+
reason code, rejected alternative and evidence references. A decisive full-depth trigger may
|
|
64
|
+
support `structured_delivery`; `structured_slice` requires every bounded-slice check to pass.
|
|
65
|
+
16. Missing or conflicting decisive facts without an already-evidenced full-depth trigger persist
|
|
66
|
+
the existing `block` decision with `depth_facts_missing | depth_facts_conflicting`, named facts,
|
|
67
|
+
their evidence owner where known, a Brownfield Review link and a precise next action for evidence
|
|
68
|
+
completion and Brownfield/Mode-Slice re-evaluation.
|
|
69
|
+
17. Owner, file, consumer, task or derived-path counts must never select a structured depth by
|
|
70
|
+
themselves.
|
|
71
|
+
|
|
72
|
+
## When To Use
|
|
73
|
+
- after `gate-check` permits `Brownfield Review` or the selected canonical run record names Brownfield Review as the next allowed action
|
|
74
|
+
- after `gate-check` permits implementation preparation or the selected canonical run record already names Brownfield Analysis as the next allowed action
|
|
75
|
+
- after `Approval: UR` when existing owners, SoT, contracts, policies, persistence, runtime paths, tests, UI, UX or architecture may affect PRD/SD scope
|
|
76
|
+
- before `CD+Tests`
|
|
77
|
+
- before changes to an existing repository
|
|
78
|
+
- bug fixes in existing modules
|
|
79
|
+
- feature extensions in existing architecture
|
|
80
|
+
- refactorings
|
|
81
|
+
- unclear existing coverage
|
|
82
|
+
- risk of new parallel structures
|
|
83
|
+
- a TP is clear but its connection to the existing system is not
|
|
84
|
+
|
|
85
|
+
## Inputs
|
|
86
|
+
Use what is available:
|
|
87
|
+
|
|
88
|
+
- approved UR, Task Plan, `task_id`, `story_id`
|
|
89
|
+
- project structure
|
|
90
|
+
- affected files, modules, services, APIs, data models
|
|
91
|
+
- existing tests
|
|
92
|
+
- architecture notes from PRD or SD
|
|
93
|
+
- repository conventions
|
|
94
|
+
|
|
95
|
+
If inputs are missing, work only from observable evidence and mark gaps explicitly.
|
|
96
|
+
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.
|
|
97
|
+
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.
|
|
98
|
+
|
|
99
|
+
## Workflow
|
|
100
|
+
1. Identify affected tasks and scope.
|
|
101
|
+
2. Find relevant existing artefacts.
|
|
102
|
+
3. Assess current coverage before new implementation:
|
|
103
|
+
- `fully_done`
|
|
104
|
+
- `partially_done`
|
|
105
|
+
- `not_done`
|
|
106
|
+
4. Choose reuse strategy:
|
|
107
|
+
- `extend`
|
|
108
|
+
- `refactor`
|
|
109
|
+
- `replace`
|
|
110
|
+
- `new`
|
|
111
|
+
5. Assess change impact:
|
|
112
|
+
- files/modules
|
|
113
|
+
- interfaces
|
|
114
|
+
- data model/migrations
|
|
115
|
+
- backwards compatibility
|
|
116
|
+
- regression tests
|
|
117
|
+
- side effects
|
|
118
|
+
6. Check parallel-structure risk.
|
|
119
|
+
7. Check SoT/runtime/product-semantics drift.
|
|
120
|
+
8. Check primary visible ownership for UI/status/recovery paths.
|
|
121
|
+
9. Check UI monolith risk for large surfaces or central hooks.
|
|
122
|
+
10. Check Context Graph impact according to `../../meta/contracts/context-graph.md`.
|
|
123
|
+
11. Recommend the minimal clean implementation path.
|
|
124
|
+
12. In `post_ur_review`, record `depth_policy_version`, `depth_facts_status`,
|
|
125
|
+
`primary_reason_code`, `decisive_full_depth_triggers`, `rejected_alternative`,
|
|
126
|
+
`missing_or_conflicting_facts`, `depth_evidence_refs` and evidence for all seven bounded-slice
|
|
127
|
+
check IDs in the Brownfield Review. Then persist the completed review and the existing
|
|
128
|
+
Mode/Slice Decision atomically.
|
|
129
|
+
|
|
130
|
+
## Output
|
|
131
|
+
Use a concise structure:
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
## Brownfield Analysis
|
|
135
|
+
- mode: post_ur_review | pre_implementation_analysis
|
|
136
|
+
- decision: pass | revise | block | not_applicable
|
|
137
|
+
- mode_slice_decision: quick_task | verified_change | structured_slice | structured_delivery | block
|
|
138
|
+
- required_next_gate: none | PRD | SD | TP | Brownfield Analysis
|
|
139
|
+
- artefact: .agdf/control/artefacts/<key>/BROWNFIELD_REVIEW.md | none
|
|
140
|
+
- scope:
|
|
141
|
+
- evidence:
|
|
142
|
+
- transparency: why later artefacts are skipped, shortened or required
|
|
143
|
+
- missing_evidence:
|
|
144
|
+
- current_coverage:
|
|
145
|
+
- reuse_strategy:
|
|
146
|
+
- risks:
|
|
147
|
+
- context_graph_impact:
|
|
148
|
+
- required_next_step:
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
For `post_ur_review`, include the four UI/UX routing fields immediately after `scope`. If UX intent
|
|
152
|
+
definition is required, its `ready | blocked | not_applicable` result must be visible before PRD
|
|
153
|
+
readiness. A required `blocked` result is at least `revise` for this routing step.
|
|
154
|
+
|
|
155
|
+
For a structured `post_ur_review` candidate, also include the complete `Structured Depth Evidence`
|
|
156
|
+
section from `BROWNFIELD_REVIEW.md`. The decision projection must show the primary reason, decisive
|
|
157
|
+
dimensions, bounded-slice result, rejected alternative, evidence and required next gate. For
|
|
158
|
+
missing/conflicting facts, show product-language `depth_unresolved` while persisting `block`; name
|
|
159
|
+
the gap and exact recovery action. Structural instruction checks can detect missing contract
|
|
160
|
+
elements but do not prove semantic model compliance or live-host behavior.
|
|
161
|
+
|
|
162
|
+
## Pass / Revise / Block Guidance
|
|
163
|
+
- `pass`: existing owners are understood, reuse path is clear, and no blocking drift or parallel structure risk remains.
|
|
164
|
+
- `revise`: relevant evidence, tests, ownership, or reuse path is incomplete.
|
|
165
|
+
- `block`: implementation would create a second SoT, second owner, unresolved product semantics, or hard unmitigated risk.
|
|
166
|
+
|
|
167
|
+
## Forbidden
|
|
168
|
+
This skill must not:
|
|
169
|
+
|
|
170
|
+
- propose a Greenfield replacement without evidence
|
|
171
|
+
- silently accept overlapping ownership
|
|
172
|
+
- convert product-semantics drift into a mere refactor
|
|
173
|
+
- create Context Graph nodes automatically
|
|
174
|
+
- treat archive links as active current specification signals
|
|
175
|
+
- recommend broad PRD/SD/TP or implementation by reflex before Mode/Slice Decision is recorded
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## NAME
|
|
2
|
+
|
|
3
|
+
`brownfield-analysis` - brownfield analysis
|
|
4
|
+
|
|
5
|
+
## SYNOPSIS
|
|
6
|
+
|
|
7
|
+
`/brownfield-analysis` [`--help`|`-h`]
|
|
8
|
+
|
|
9
|
+
## DESCRIPTION
|
|
10
|
+
|
|
11
|
+
Ensures implementation in an existing system is Brownfield-oriented rather than Greenfield-style. Analyzes existing artefacts, current coverage, reuse strategy, risks, and the minimal clean implementation path.
|
|
12
|
+
|
|
13
|
+
## EXAMPLES
|
|
14
|
+
|
|
15
|
+
Trigger the skill:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
> /brownfield-analysis
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## SEE ALSO
|
|
22
|
+
|
|
23
|
+
See the full SKILL.md for detailed workflow, output format, and decision logic.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clean-implementation-review
|
|
3
|
+
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.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# clean-implementation-review
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
Evaluate implementation integrity.
|
|
10
|
+
|
|
11
|
+
This skill answers:
|
|
12
|
+
|
|
13
|
+
- was the task solved with a clean primary solution
|
|
14
|
+
- was the root cause fixed or only masked
|
|
15
|
+
- were unnecessary fallbacks, workarounds, guards, defaults, or shims introduced
|
|
16
|
+
- were unnecessary parallel structures introduced
|
|
17
|
+
- does the solution fit the existing architecture
|
|
18
|
+
- is it maintainable or workaround-heavy
|
|
19
|
+
|
|
20
|
+
## Runtime Contract
|
|
21
|
+
Use these focused runtime-contract modules:
|
|
22
|
+
|
|
23
|
+
- `../../meta/contracts/quality.md`
|
|
24
|
+
- `../../meta/contracts/context-graph.md`
|
|
25
|
+
|
|
26
|
+
Clean-review-specific output must make the primary solution, fallbacks, workarounds, parallel structures, exit criteria, and next cleanup/review step visible.
|
|
27
|
+
Applicable findings must use `../../meta/contracts/quality.md` §Normalized Review Gaps. This skill
|
|
28
|
+
must distinguish a missing upstream decision from implementation that violates an approved decision.
|
|
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
|
+
10. Missing canonical ownership, fallback policy, exit criteria or parallel-structure decisions are
|
|
41
|
+
upstream gaps; do not invent those decisions during review.
|
|
42
|
+
11. Actual code that violates an approved design or plan is an implementation gap.
|
|
43
|
+
12. Missing, unknown or contradictory classifications fail closed and stay open.
|
|
44
|
+
|
|
45
|
+
## When To Use
|
|
46
|
+
- after `CD+Tests`
|
|
47
|
+
- before QA
|
|
48
|
+
- when a solution contains many guards, defaults, or special paths
|
|
49
|
+
- when wrappers or helper layers were introduced
|
|
50
|
+
- when symptom treatment is suspected
|
|
51
|
+
- when fallback, retry, or compatibility-shim logic was added
|
|
52
|
+
- when code works but the architecture looks questionable
|
|
53
|
+
|
|
54
|
+
## Inputs
|
|
55
|
+
Use what is available:
|
|
56
|
+
|
|
57
|
+
- Task Plan
|
|
58
|
+
- Code Deliverables
|
|
59
|
+
- changed files
|
|
60
|
+
- tests and test results
|
|
61
|
+
- `code-review` or Code Review Report
|
|
62
|
+
- QA Report
|
|
63
|
+
- Brownfield Analysis findings
|
|
64
|
+
- PRD or SD architecture notes
|
|
65
|
+
|
|
66
|
+
If evidence is missing, mark it explicitly.
|
|
67
|
+
|
|
68
|
+
## Workflow
|
|
69
|
+
1. Understand the intended change.
|
|
70
|
+
2. Identify the primary implementation path.
|
|
71
|
+
3. Identify fallbacks, guards, defaults, shims, retries, wrappers, and catch-all branches.
|
|
72
|
+
4. Decide whether each is justified.
|
|
73
|
+
5. Check for parallel ownership.
|
|
74
|
+
6. Check Brownfield fit.
|
|
75
|
+
7. Assess whether the implementation fixes the root cause.
|
|
76
|
+
8. Assign a decision:
|
|
77
|
+
- `pass`
|
|
78
|
+
- `revise`
|
|
79
|
+
- `block`
|
|
80
|
+
- `not_applicable`
|
|
81
|
+
|
|
82
|
+
## Output
|
|
83
|
+
Use this compact structure:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
## Clean Implementation Review
|
|
87
|
+
- decision:
|
|
88
|
+
- primary_solution:
|
|
89
|
+
- evidence:
|
|
90
|
+
- fallbacks_retained:
|
|
91
|
+
- workaround_or_shim_risk:
|
|
92
|
+
- parallel_structure_risk:
|
|
93
|
+
- brownfield_fit:
|
|
94
|
+
- missing_evidence:
|
|
95
|
+
- required_next_step:
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
When findings exist, append:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
## Normalized Findings
|
|
102
|
+
| finding_id | gap_type | routing_target | gap_status | evidence | required_next_step |
|
|
103
|
+
|---|---|---|---|---|---|
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Use the shared Quality Contract for meanings and routes; do not copy its complete mapping here.
|
|
107
|
+
|
|
108
|
+
## Pass / Revise / Block Guidance
|
|
109
|
+
- `pass`: primary solution is clean, tested, and integrated with existing owners.
|
|
110
|
+
- `revise`: solution works but contains avoidable fallback, unclear ownership, or missing evidence.
|
|
111
|
+
- `block`: solution creates a second SoT, a second owner, unbounded fallback, or masks unresolved product semantics.
|
|
112
|
+
|
|
113
|
+
### Compact Chat Output
|
|
114
|
+
|
|
115
|
+
At `pass`: one line — `Clean Review: pass — <one-line summary>`.
|
|
116
|
+
At `revise`/`block`: show the specific fallback/workaround/parallel-structure risk with file references.
|
|
117
|
+
|
|
118
|
+
## Forbidden
|
|
119
|
+
This skill must not:
|
|
120
|
+
|
|
121
|
+
- accept fallback-heavy logic as target architecture
|
|
122
|
+
- hide unjustified workarounds
|
|
123
|
+
- treat green tests as proof of solution integrity
|
|
124
|
+
- decide final QA
|
|
125
|
+
- create a missing design, plan or product decision during review
|
|
126
|
+
- silently repair or reclassify an invalid normalized finding
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## NAME
|
|
2
|
+
|
|
3
|
+
`clean-implementation-review` - clean implementation review
|
|
4
|
+
|
|
5
|
+
## SYNOPSIS
|
|
6
|
+
|
|
7
|
+
`/clean-implementation-review` [`--help`|`-h`]
|
|
8
|
+
|
|
9
|
+
## DESCRIPTION
|
|
10
|
+
|
|
11
|
+
Evaluates solution integrity: whether the implementation is a clean primary solution or has become unnecessarily complex through fallbacks, workarounds, guards, defaults, shims, or parallel structures.
|
|
12
|
+
|
|
13
|
+
## EXAMPLES
|
|
14
|
+
|
|
15
|
+
Trigger the skill:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
> /clean-implementation-review
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## SEE ALSO
|
|
22
|
+
|
|
23
|
+
See the full SKILL.md for detailed workflow, output format, and decision logic.
|