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,115 @@
|
|
|
1
|
+
# AGDF Runtime Contract — Control Scaffold
|
|
2
|
+
|
|
3
|
+
## Delivery Path Search
|
|
4
|
+
|
|
5
|
+
Delivery Path Search is an optional read-only planning step for high-impact decisions with several materially different next actions.
|
|
6
|
+
|
|
7
|
+
- It consumes current AGDF state and must reject gate-illegal candidates before model evaluation.
|
|
8
|
+
- It returns one advisory recommendation or `no_safe_recommendation`.
|
|
9
|
+
- It must report budgets, stopping reason and `full | tool_enforced | instruction_only` enforcement.
|
|
10
|
+
- Model scores are judgements, not measurements.
|
|
11
|
+
- Search output is evidence only. Canonical `gate-check` independently decides what may proceed.
|
|
12
|
+
- The bounded first-release algorithm must not be labelled MCTS.
|
|
13
|
+
- Surface adapters may translate transport and presentation, but must not fork scoring, search or gate semantics.
|
|
14
|
+
- Optional AI-native candidate generation supplements the deterministic candidate baseline; it never replaces it.
|
|
15
|
+
- Generated proposals are untrusted. The core must validate schema, exact canonical gate action, scope, duplicates and material diversity before evaluation.
|
|
16
|
+
- Generation is opt-in and bounded to one call, five proposals, 30 seconds and five abstract cost units by default, within whole-run budgets.
|
|
17
|
+
- External generation receives only bounded normalized control summaries and references, never secrets, full artefacts, raw prompts, hidden reasoning or source snapshots.
|
|
18
|
+
- Generator status, provenance, accepted/rejected counts, separate budget use and typed failure must remain visible. Failure retains the deterministic baseline; automatic provider fallback is forbidden.
|
|
19
|
+
- Codex and Claude Code may provide tool-enforced generator transports. Copilot, OpenCode and generic surfaces remain instruction-only without conforming evidence.
|
|
20
|
+
- OpenCode may provide a tool-enforced evaluator only for an invocation whose capability preflight proves `opencode run --pure --agent`, the owned evaluator agent and effective executable-tool denies. Preflight or transport failure must return `evaluator_unavailable` with `instruction_only` enforcement and point to the existing instruction-only workflow; it must not continue through a weaker subprocess.
|
|
21
|
+
- OpenCode candidate generation remains unavailable.
|
|
22
|
+
|
|
23
|
+
The field names above are the stable machine-readable contract used by JSON
|
|
24
|
+
reports and automation. Human-facing Markdown must present the same projection
|
|
25
|
+
with readable labels such as `Current gate`, `Allowed now`, `Blocked by`,
|
|
26
|
+
`Next step` and `Quality outlook`; do not expose snake_case keys as the visible
|
|
27
|
+
Run Status Card. Keep that card compact: show `Status`, `Current gate`,
|
|
28
|
+
`Allowed now`, `Blocked by`, `Missing approval`, `Next gate after approval`
|
|
29
|
+
and `Allowed after approval` when a missing approval exists, `Next step` and
|
|
30
|
+
`Quality outlook`. Keep mode, forbidden actions, evidence and next-skill detail
|
|
31
|
+
in the surrounding control artefact when they are relevant.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Control Scaffold
|
|
35
|
+
|
|
36
|
+
### Run-Scoped Control State
|
|
37
|
+
|
|
38
|
+
Canonical mutable run state lives at `.agdf/control/runs/<run_id>/RUN_STATE.md`, one file per run.
|
|
39
|
+
Repository-level discovery is derived; do not maintain a writable active-run dashboard. Select with
|
|
40
|
+
`--run`, then `AGDF_RUN_ID`, or automatically only when exactly one run is active. Ambiguity fails
|
|
41
|
+
closed. Legacy `AGDF_RUN.md` is migration input or an explicitly rendered non-authoritative projection,
|
|
42
|
+
never a second writable owner. Read-only commands must not migrate state.
|
|
43
|
+
|
|
44
|
+
When a repository needs durable AGDF state, use the plugin-local `control/` scaffold as the starting point.
|
|
45
|
+
|
|
46
|
+
- `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.
|
|
47
|
+
- `.agdf/control/runs/<run_id>/RUN_STATE.md` is the canonical current-run dashboard; legacy `AGDF_RUN.md` is migration input or an explicit non-authoritative projection.
|
|
48
|
+
- `MASTER_BACKLOG.md` is the living pointer for active delivery work.
|
|
49
|
+
- `BROWNFIELD_REVIEW.md` records the post-UR existing-system view and Mode/Slice Decision before PRD depth or Quick Task execution is chosen.
|
|
50
|
+
- `SOT_REGISTRY.md` prevents parallel sources of truth.
|
|
51
|
+
- `CONTEXT_GRAPH.md` stores durable Brownfield findings, decisions, risks, evidence and exit criteria.
|
|
52
|
+
- `AGENT_QUALITY_CONTRACTS.json` stores reusable block, revise and warning conditions.
|
|
53
|
+
- `memory_target`, `multi_scope_state` and branch/workspace evidence fields make ambiguity and persistence decisions visible without turning chat history into the source of truth.
|
|
54
|
+
- OR reports live under `.agdf/control/artefacts/<key>/OR.md` when a run closeout is steering-relevant or should be auditable beyond the chat.
|
|
55
|
+
|
|
56
|
+
### Human-readable Master Backlog
|
|
57
|
+
|
|
58
|
+
The Markdown backlog is a human steering view; CLI reports are its normalized
|
|
59
|
+
machine projection.
|
|
60
|
+
|
|
61
|
+
- Use readable status labels such as `In progress`, `Awaiting UAT` and
|
|
62
|
+
`Completed` in Markdown.
|
|
63
|
+
- Use links relative to `MASTER_BACKLOG.md`, such as
|
|
64
|
+
`[UR](artefacts/<key>/UR.md)`, instead of exposing long raw paths.
|
|
65
|
+
- Keep `Priority`, `Key`, `Work item`, `Status`, `Artefacts`, `Current spec`
|
|
66
|
+
and `Next step` visible for active and planned work.
|
|
67
|
+
- Keep one canonical template. Generated surface copies remain derived output.
|
|
68
|
+
- Normalize human labels and link targets only at the CLI parser boundary.
|
|
69
|
+
- Existing wide rows, raw paths and snake_case statuses remain supported for
|
|
70
|
+
backward compatibility.
|
|
71
|
+
|
|
72
|
+
The scaffold is not a second documentation site. Link to authoritative artefacts instead of copying them.
|
|
73
|
+
|
|
74
|
+
## Agent-Native Runtime And CLI Verification
|
|
75
|
+
|
|
76
|
+
AGDF is agent-native first and CLI-verifiable by design.
|
|
77
|
+
|
|
78
|
+
The primary operating path is the active skill plus the live `.agdf/control/` artefacts.
|
|
79
|
+
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.
|
|
80
|
+
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`.
|
|
81
|
+
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.
|
|
82
|
+
|
|
83
|
+
Helper commands are deterministic proof and automation interfaces, not the normal-work ritual:
|
|
84
|
+
|
|
85
|
+
- `init` creates the machine-readable control scaffold.
|
|
86
|
+
- `doctor --json` checks whether `.agdf/control/` is consistent and actionable; it is not the reviewer.
|
|
87
|
+
- `gate-check --json` reports reproducible gate state; it does not replace the gate-check skill judgement.
|
|
88
|
+
- `gate-check --approval-envelope` prints the canonical ready-gate cards and exact-text request from the same evaluation; it does not grant approval or replace the chat workflow.
|
|
89
|
+
- `delivery-map --json` reports the delivery picture for CI, PRs, regression checks and audit trails.
|
|
90
|
+
|
|
91
|
+
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.
|
|
92
|
+
They make the repository state checkable, but they do not replace the native skill workflow or the durable control artefacts.
|
|
93
|
+
|
|
94
|
+
### Repository Activation Diagnosis Boundary
|
|
95
|
+
|
|
96
|
+
`doctor --json` on the resolved surface-local validator is the sole canonical, code-owned, tool-shell-safe activation probe. Plugin `AGDF_*` environment variables set by the OpenCode `shell.env` hook are an internal plugin status channel consumed by `opencode-status`, not an agent-facing diagnosis proof; host shell-env propagation to spawned tool shells is not guaranteed and is OpenCode-owned. A relative glob or `grep` for `.agdf/control/config.json` must not be used as proof of presence or absence of `.agdf/control/config.json`; an absolute `read` or the canonical CLI probe is required.
|
|
97
|
+
|
|
98
|
+
## Delivery Map
|
|
99
|
+
|
|
100
|
+
`delivery-map --json` is the machine-readable delivery picture for the selected canonical control state.
|
|
101
|
+
It derives, but does not replace, the selected `RUN_STATE.md` and `MASTER_BACKLOG.md` state.
|
|
102
|
+
|
|
103
|
+
It must expose:
|
|
104
|
+
|
|
105
|
+
- approved or active artefacts and approvals
|
|
106
|
+
- `UR -> PRD -> SD -> TP -> QA_REPORT` relationships
|
|
107
|
+
- evidence refs, missing evidence and declared risks
|
|
108
|
+
- multi-scope ambiguity and branch/workspace evidence limits when present
|
|
109
|
+
- memory persistence target, reason and references when present
|
|
110
|
+
- Context Graph impact and gate effect
|
|
111
|
+
- the Run Status Card as a compact projection of current gate, next step and quality outlook
|
|
112
|
+
- findings that explain why the delivery picture is `pass | warn | revise | block`
|
|
113
|
+
|
|
114
|
+
Missing relationship evidence in the Artefact Chain is at least `revise` once the related gate artefact is approved or passed.
|
|
115
|
+
Declared missing evidence, declared risk or Context Graph gate effect may escalate the delivery map to `warn`, `revise` or `block`.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# AGDF Runtime Contract — Gate Transition
|
|
2
|
+
|
|
3
|
+
## Source Precedence
|
|
4
|
+
|
|
5
|
+
Every governed repository should make the normative instruction source visible.
|
|
6
|
+
When several instruction files, generated copies, submodule rules, branch names, worktree diffs or chat summaries point in different directions, fail closed instead of inventing a primary authority.
|
|
7
|
+
|
|
8
|
+
Default precedence:
|
|
9
|
+
|
|
10
|
+
1. safety, security and compliance instructions
|
|
11
|
+
2. repository-declared normative agent instructions
|
|
12
|
+
3. live `.agdf/control/` state or a linked authoritative repository SoT
|
|
13
|
+
4. approved gate artefacts
|
|
14
|
+
5. source code and verified runtime evidence
|
|
15
|
+
6. branch names, workspace deltas, chat history and model memory
|
|
16
|
+
|
|
17
|
+
A branch name or uncommitted workspace delta is never sufficient scope proof by itself.
|
|
18
|
+
It may support a scope only when it does not conflict with durable artefacts, approvals or source-of-truth records.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## Workstate And Scope Ambiguity
|
|
22
|
+
|
|
23
|
+
If a repository contains multiple plausible active work lines, the agent must not silently choose one.
|
|
24
|
+
List the evidenced competing lines with their latest known gate, artefact pointers, approvals and missing evidence.
|
|
25
|
+
The next permissible step is scope clarification or the earliest common safe gate.
|
|
26
|
+
|
|
27
|
+
Use `multi_scope_state: clear | ambiguous | blocked` when the control state needs to make this visible.
|
|
28
|
+
`ambiguous` is at least a revise condition for delivery-map style reporting.
|
|
29
|
+
`blocked` applies when continuing would produce later-gate artefacts, implementation or release claims for the wrong scope.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## Domain Guardrail Packs
|
|
33
|
+
|
|
34
|
+
Repositories may define domain guardrail packs for recurring high-risk surfaces such as UI, persistence, integration, financial calculations, policy, security, migration or release operations.
|
|
35
|
+
A pack should define:
|
|
36
|
+
|
|
37
|
+
- trigger patterns
|
|
38
|
+
- required Brownfield touchpoints
|
|
39
|
+
- protected invariants
|
|
40
|
+
- required evidence
|
|
41
|
+
- review or QA escalation conditions
|
|
42
|
+
|
|
43
|
+
Domain guardrails are project-specific extensions.
|
|
44
|
+
They must not override AGDF gates, approvals or the Runtime Contract.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Gate Rules
|
|
48
|
+
|
|
49
|
+
- User gates: `UR -> PRD -> SD -> TP -> QA -> UAT`
|
|
50
|
+
- Internal mandatory steps: `Brownfield Review -> Mode/Slice Decision -> Verified Change Execution | Brownfield Analysis -> CD+Tests -> CR -> OR`
|
|
51
|
+
- On the approved-TP path, `CD+Tests` and `CR` are satisfied only by `done`; `not_applicable` may satisfy Brownfield Review or Brownfield Analysis, but it must not bypass implementation/test evidence or mandatory Code Review.
|
|
52
|
+
- Exact approval formula: `Approval: <GateName>`
|
|
53
|
+
- Legacy alias: `Freigabe: <GateName>` may be accepted when reviewing older German runs, but all new outputs must use `Approval: <GateName>`.
|
|
54
|
+
- 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.
|
|
55
|
+
- The earliest blocking gate wins.
|
|
56
|
+
- 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.
|
|
57
|
+
- 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.
|
|
58
|
+
- 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.
|
|
59
|
+
- 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.
|
|
60
|
+
- `Approval: UR` permits Brownfield Review after G-00 first. The review records its Mode/Slice Decision in the same internal operation when evidence is sufficient; the user is told that no action is required now. A separate `Mode/Slice Decision` step is fail-closed recovery for incomplete or legacy review state, not a normal user decision. UR approval never permits implementation by itself and does not preselect PRD.
|
|
61
|
+
- PRD, SD and TP depth is chosen after Brownfield Review through the Mode/Slice Decision, not before existing-system impact is understood.
|
|
62
|
+
- 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 the selected canonical `RUN_STATE.md` or an equivalent linked control artefact.
|
|
63
|
+
- `Approval: PRD` permits Solution Design drafting, not implementation.
|
|
64
|
+
- `Approval: SD` permits Task/Test Plan drafting, not implementation.
|
|
65
|
+
- `Approval: TP` permits implementation-preparation Brownfield Analysis and then CD+Tests when Brownfield evidence supports it.
|
|
66
|
+
- `CD+Tests` is implementation and test status only, not a delivery signal.
|
|
67
|
+
- `code-review` standardizes the mandatory `CR` step, but does not replace QA.
|
|
68
|
+
- `qa-gate` decides final `pass | revise | block`.
|
|
69
|
+
- `release-or` reports the run, but does not replace QA or produce the operative commit/PR handoff.
|
|
70
|
+
- `delivery-closeout` owns the operative Git handoff text when QA/OR/UAT state allows it.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## Brownfield Review After G-00
|
|
74
|
+
|
|
75
|
+
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.
|
|
76
|
+
|
|
77
|
+
This review is not a new user approval gate, not PRD, not SD, not TP and not implementation permission.
|
|
78
|
+
It is the sizing and routing step that decides how much later gate discipline is actually needed.
|
|
79
|
+
When evidence is sufficient, persist the review and Mode/Slice selection together; do not expose a
|
|
80
|
+
second routine user decision. Keep the standalone Mode/Slice step only for fail-closed recovery when
|
|
81
|
+
the review record is incomplete or legacy.
|
|
82
|
+
|
|
83
|
+
Its output is limited to:
|
|
84
|
+
|
|
85
|
+
- workstream or follow-up-slice classification
|
|
86
|
+
- `Mode/Slice Decision`: `quick_task | verified_change | structured_slice | structured_delivery | block`
|
|
87
|
+
- affected existing owners, source-of-truth artefacts, contracts, policies, runtime paths or tests
|
|
88
|
+
- reuse-before-create risks and parallel-structure risks
|
|
89
|
+
- open questions that PRD or SD must resolve
|
|
90
|
+
- whether implementation-preparation Brownfield Analysis will also be needed after TP
|
|
91
|
+
|
|
92
|
+
Mode/Slice Decision rules:
|
|
93
|
+
|
|
94
|
+
- `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.
|
|
95
|
+
- `verified_change`: use only when the compact record can prove one canonical owner, bounded clean-at-baseline paths, no prohibited impact, deterministic propagation/validation and a structured escalation target. It skips later approvals only after every condition is evidenced and machine-validated.
|
|
96
|
+
- `structured_slice` and `structured_delivery`: apply the sole normative `Structured Depth Decision`
|
|
97
|
+
in `modes.md`; this contract owns only the operational transition and does not duplicate its
|
|
98
|
+
trigger or bounded-slice matrix.
|
|
99
|
+
- `block`: use when ownership, SoT, impact, evidence or product direction is not clear enough to
|
|
100
|
+
choose a safe path. A `depth_unresolved` product result is persisted through this existing value
|
|
101
|
+
with `depth_facts_missing | depth_facts_conflicting`, a Brownfield Review evidence link and a
|
|
102
|
+
precise evidence-owner/re-evaluation next action; it never creates a new mode or advances a gate.
|
|
103
|
+
|
|
104
|
+
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`.
|
|
105
|
+
|
|
106
|
+
### UI/UX Impact And UX Intent Definition
|
|
107
|
+
|
|
108
|
+
The existing `brownfield-analysis` `post_ur_review` mode is the single proportional routing owner for
|
|
109
|
+
both Greenfield and Brownfield delivery. It records:
|
|
110
|
+
|
|
111
|
+
- `delivery_context: greenfield | brownfield`
|
|
112
|
+
- `ui_ux_impact: none | low | medium | high`
|
|
113
|
+
- `ui_ux_impact_reason`
|
|
114
|
+
- `ux_intent_definition_required: yes | no`
|
|
115
|
+
|
|
116
|
+
Classify impact as:
|
|
117
|
+
|
|
118
|
+
- `none`: no user-facing capability, decision, state, feedback or recovery behavior changes;
|
|
119
|
+
- `low`: a bounded user-facing change preserves unambiguous intent, working modes, effective-state,
|
|
120
|
+
activation and recovery semantics;
|
|
121
|
+
- `medium`: a bounded capability materially changes its primary action, working mode, effective
|
|
122
|
+
state, visible state type, blocker, activation or recovery behavior; or
|
|
123
|
+
- `high`: the change spans capabilities or modes, creates competing or safety-relevant authority,
|
|
124
|
+
adds high-consequence decisions or materially changes cross-surface activation and recovery.
|
|
125
|
+
|
|
126
|
+
`medium | high` requires `ux-intent-definition` before PRD readiness. `low` requires it when any
|
|
127
|
+
mandatory PRD UX semantics remain ambiguous. `none` records the analytical decision
|
|
128
|
+
`not_applicable`. The skill is an internal, non-authorizing step: it adds no gate, approval value or
|
|
129
|
+
implementation permission. A required `blocked` result keeps PRD readiness closed.
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
## Gate Transition Model
|
|
133
|
+
|
|
134
|
+
This table is the canonical transition model. Skills may reference it, but must not carry a second complete copy.
|
|
135
|
+
|
|
136
|
+
| State | Current gate or step | Allowed | Forbidden | Missing approval |
|
|
137
|
+
|---|---|---|---|---|
|
|
138
|
+
| No approved UR | `UR` | clarify user need, formulate and persist UR, request `Approval: UR` | PRD, SD, TP, Brownfield Analysis, implementation, QA, release | `Approval: UR` |
|
|
139
|
+
| `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 |
|
|
140
|
+
| Brownfield Review done or not_applicable, Mode/Slice Decision missing or incomplete | `Mode/Slice Decision` | decide `quick_task`, `verified_change`, `structured_slice`, `structured_delivery` or `block`; record scope reason, evidence and required next gate depth | PRD, SD, TP, implementation, QA, release | none |
|
|
141
|
+
| 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 |
|
|
142
|
+
| Mode/Slice Decision is `verified_change`, record missing/draft/invalid | `Verified Change Execution` | create or repair compact record, capture baseline and prove eligibility with doctor/gate-check | implementation, QA, UAT, release | none |
|
|
143
|
+
| Verified Change record is `eligible` | `Verified Change Execution` | implement only declared paths, run declared propagation/validation, record mini-closeout | unlisted paths, prohibited impacts, QA/UAT/release claims | none |
|
|
144
|
+
| Verified Change record is `executed` | `OR` | use mini-closeout and offer delivery closeout when requested | PRD/SD/TP/QA/UAT by ritual; automatic VCS actions | none |
|
|
145
|
+
| Verified Change record is `escalated` | `PRD` | draft the PRD for declared `structured_slice` or `structured_delivery` escalation target | implementation through Verified Change | `Approval: PRD` |
|
|
146
|
+
| 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` |
|
|
147
|
+
| `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` |
|
|
148
|
+
| `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` |
|
|
149
|
+
| `TP` approved and TP artefact persisted or linked, Brownfield Analysis missing | `Brownfield Analysis` | run Brownfield Analysis for approved TP scope | implementation, QA, release | none |
|
|
150
|
+
| Brownfield Analysis passed for approved TP | `CD+Tests` | implement approved TP tasks and run tests | QA pass, UAT, release | none |
|
|
151
|
+
| `CD+Tests` done for approved TP, CR missing | `CR` | run mandatory Code Review and resolve blocking findings | QA pass, UAT, release | none |
|
|
152
|
+
| `CR` done, QA not approved | `QA` | run QA gate, persist/refine QA report, request `Approval: QA` | UAT, release | `Approval: QA` |
|
|
153
|
+
| `QA` approved but QA report missing or not pass | `QA` | persist/link QA report with `pass` decision or revise/block evidence | UAT, release | none |
|
|
154
|
+
| QA approved and QA report is `pass` or `passed`, UAT not approved | `UAT` | request `Approval: UAT`, prepare non-operative delivery summary | release and automatic VCS actions | `Approval: UAT` |
|
|
155
|
+
| UAT approved | `OR` | produce OR or delivery closeout; prepare VCS handoff only when requested | automatic commit, push, PR or release | none |
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## Brownfield Modes
|
|
159
|
+
|
|
160
|
+
The `brownfield-analysis` skill has two explicit modes:
|
|
161
|
+
|
|
162
|
+
- `post_ur_review`: lightweight sizing and routing after approved durable UR; decides Mode/Slice Decision before PRD depth or implementation is chosen.
|
|
163
|
+
- `pre_implementation_analysis`: implementation-preparation analysis after approved durable TP; verifies reuse path, owners, regression risk and fit before `CD+Tests`.
|
|
164
|
+
|
|
165
|
+
Do not mix the modes silently. Name the active mode in Brownfield output.
|