qfai 2.1.1 → 2.1.2
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 +56 -36
- package/assets/defaults/agent-routing/qfai-triage.yml +9 -0
- package/assets/defaults/workflows/run-owned-cleanup.yml +12 -0
- package/assets/init/.claude/settings.json +27 -9
- package/assets/init/.codex/hooks.json +20 -8
- package/assets/init/.qfai/assistant/agent/frontend-engineer.md +5 -0
- package/assets/init/.qfai/assistant/agent/product-experience-architect.md +4 -0
- package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +7 -0
- package/assets/init/.qfai/assistant/agent/requirements-analyst.md +8 -0
- package/assets/init/.qfai/assistant/rule/communication.md +18 -8
- package/assets/init/.qfai/assistant/rule/drift-protocol.md +58 -2
- package/assets/init/.qfai/assistant/rule/references/asset-authoring.md +6 -4
- package/assets/init/.qfai/assistant/rule/references/worker-edit-boundary.md +48 -0
- package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +15 -25
- package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +8 -8
- package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +6 -1
- package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +3 -3
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-completion-matrix.md +3 -7
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md +2 -4
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux_best_practices.md +1 -6
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/00_index.md +0 -16
- package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +9 -3
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +9 -1
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/red-admissibility.md +46 -0
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +3 -0
- package/assets/init/.qfai/assistant/skill/qfai-maintain/SKILL.md +3 -3
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +12 -6
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-guide.md +1 -265
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-placement.md +273 -0
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +4 -3
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +2 -3
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +17 -1
- package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +30 -17
- package/assets/init/.qfai/assistant/skill/qfai-run/references/evidence-delivery.md +322 -0
- package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +47 -24
- package/assets/init/.qfai/assistant/skill/qfai-run/references/operator-screens.md +218 -11
- package/assets/init/.qfai/assistant/skill/qfai-run/references/plan.md +4 -3
- package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +14 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/SKILL.md +4 -3
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +1 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-anti-patterns.md +23 -5
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/requirements-decomposition.md +8 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +29 -4
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md +132 -4
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +14 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +114 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-design-contract-normalization.md +4 -29
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/change-request.md +38 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/ui-contract.sample.yaml +52 -5
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +3 -0
- package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +29 -19
- package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +5 -4
- package/assets/init/.qfai/assistant/skill/qfai-verify/references/context-load.md +9 -6
- package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +72 -7
- package/assets/init/.qfai/assistant/skill/web-research/SKILL.md +35 -21
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/brave-search/config.toml +2 -4
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/brave-search/mcp-config.json +9 -5
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/firecrawl/.mcp.json +1 -2
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/firecrawl/config.toml +3 -3
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/firecrawl/mcp-config.json +11 -8
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/playwright/config.toml +1 -1
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/playwright/mcp-config.json +7 -3
- package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +0 -4
- package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +98 -8
- package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +3 -2
- package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +1 -0
- package/assets/init/.qfai/assistant/step/discussion-research/STEP.md +2 -0
- package/assets/init/.qfai/assistant/step/discussion-uiux/STEP.md +1 -3
- package/assets/init/.qfai/assistant/step/implement-backport/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/implement-benchmark/STEP.md +7 -4
- package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +4 -1
- package/assets/init/.qfai/assistant/step/implement-diagnose/STEP.md +2 -0
- package/assets/init/.qfai/assistant/step/implement-oracle-parity/STEP.md +2 -2
- package/assets/init/.qfai/assistant/step/implement-quarantine/STEP.md +3 -3
- package/assets/init/.qfai/assistant/step/implement-refactor/STEP.md +2 -2
- package/assets/init/.qfai/assistant/step/implement-regression-fix/STEP.md +4 -3
- package/assets/init/.qfai/assistant/step/implement-retire/STEP.md +6 -3
- package/assets/init/.qfai/assistant/step/implement-revert/STEP.md +4 -3
- package/assets/init/.qfai/assistant/step/implement-seam/STEP.md +6 -5
- package/assets/init/.qfai/assistant/step/implement-stress-harness/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/implement-sweep/STEP.md +4 -3
- package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +39 -5
- package/assets/init/.qfai/assistant/step/implement-tooling/STEP.md +22 -2
- package/assets/init/.qfai/assistant/step/maintain-edit/STEP.md +18 -14
- package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +4 -3
- package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +4 -0
- package/assets/init/.qfai/assistant/step/prototyping-preflight/STEP.md +1 -3
- package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +11 -0
- package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +2 -0
- package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +10 -0
- package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +30 -8
- package/assets/init/.qfai/assistant/step/triage-answer/STEP.md +5 -4
- package/assets/init/.qfai/assistant/step/triage-close/STEP.md +33 -23
- package/assets/init/.qfai/assistant/step/triage-cluster/STEP.md +5 -3
- package/assets/init/.qfai/assistant/step/triage-decompose/STEP.md +2 -0
- package/assets/init/.qfai/assistant/step/triage-dedupe/STEP.md +4 -0
- package/assets/init/.qfai/assistant/step/triage-handoff/STEP.md +13 -4
- package/assets/init/.qfai/assistant/step/triage-investigate/STEP.md +8 -5
- package/assets/init/.qfai/assistant/step/triage-owned-cleanup/STEP.md +86 -0
- package/assets/init/.qfai/assistant/step/triage-request-info/STEP.md +2 -0
- package/assets/init/.qfai/assistant/step/triage-security-intake/STEP.md +6 -3
- package/assets/init/.qfai/assistant/step/verify-change-note/STEP.md +1 -0
- package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +37 -9
- package/assets/init/.qfai/assistant/step/verify-external/STEP.md +5 -2
- package/assets/init/.qfai/assistant/step/verify-qfai-gate/STEP.md +7 -16
- package/assets/init/.qfai/assistant/step/verify-release-notes/STEP.md +1 -0
- package/assets/init/.qfai/assistant/step/verify-repeat-run/STEP.md +6 -4
- package/assets/init/.qfai/assistant/step/verify-repo-gate/STEP.md +121 -30
- package/assets/init/root/.agents/rules/ai-readable-markdown.md +2 -2
- package/assets/init/root/.agents/rules/api-budget.md +187 -8
- package/assets/init/root/.agents/rules/documentation-clarity.md +162 -33
- package/assets/init/root/.agents/rules/minimal-implementation.md +3 -3
- package/assets/init/root/.agents/rules/reminders.json +27 -14
- package/assets/init/root/.agents/rules/session-feedback.md +136 -0
- package/assets/init/root/.agents/rules/temporary-files.md +33 -0
- package/assets/init/root/.agents/rules/user-questions.md +48 -37
- package/assets/init/root/.github/workflows/qfai-docs.yml +1 -1
- package/assets/init/root/AGENTS.md +23 -22
- package/assets/sandbox-templates/default-deny.yaml +9 -3
- package/assets/schemas/workflow/extraction.schema.json +85 -5
- package/assets/uix-rev/comparison-review.md +1 -1
- package/assets/uix-rev/contracts-review.md +1 -2
- package/dist/cli/index.cjs +6697 -8810
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +6036 -8152
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.cjs +4947 -7746
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -658
- package/dist/index.d.ts +18 -658
- package/dist/index.mjs +4866 -7640
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -6
- package/assets/init/root/CLAUDE.md +0 -46
|
@@ -89,14 +89,26 @@ The table holds no rule. A behaviour a layer must show is a BR in the contract t
|
|
|
89
89
|
|
|
90
90
|
Use highest existing number plus one in the scope. Count IDs named in retired-item decisions, so deletion never frees an ID. Empty scopes begin at 0001 or, for AC and EX tails, 01. Directory names match their BF and US IDs. Do not add a CLI allocator.
|
|
91
91
|
|
|
92
|
+
AC/EX tails remain two digits with upper bound 99. Before planned additions,
|
|
93
|
+
compare requested additions with the retired-inclusive remaining 99-H. Stop an
|
|
94
|
+
over-capacity batch before partial declarations. For an approved capacity-only
|
|
95
|
+
sibling or actual move, apply the owning stage's capacity preflight and complete
|
|
96
|
+
map before writing; no larger ID or new product outcome is a substitute for the
|
|
97
|
+
required scope.
|
|
98
|
+
|
|
92
99
|
Constraint IDs are the exception. `TC-NN`, `OC-NN` and `BC-NN` in constraint.md are positional: each section numbers its rows from 01 in table order. No other document cites one, so a removed row closes the gap and the rows after it are renumbered. `npx qfai validate` reports a constraint ID that is not its row's place.
|
|
93
100
|
|
|
94
|
-
Moving a story to another flow changes its US ID and every child AC and EX ID
|
|
101
|
+
Moving a story to another flow changes its US ID and every child AC and EX ID
|
|
102
|
+
under its existing approval path. Preserve case meanings and assertions through
|
|
103
|
+
the complete fixed-source map, update approved active indexes, contract citations
|
|
104
|
+
and counted test references. Record the old IDs as retired in a new approved
|
|
105
|
+
record so they cannot be issued again. Inherited DEC ID, Content and Approach
|
|
106
|
+
cells and their old-ID references stay historical and unchanged.
|
|
95
107
|
|
|
96
108
|
## Edge rules
|
|
97
109
|
|
|
98
110
|
1. business-flows.md cites each actual BF. Each business-flow.md states its BF in its H1, gives its purpose, and draws its main path as exactly one Mermaid flowchart or sequenceDiagram under `## Flow`.
|
|
99
|
-
2. user-stories.md cites each US under that flow. A user story declares its US in its H1. Its parent BF is the directory it sits in, and no line of the file restates it. Keep each observable outcome in its own story.
|
|
111
|
+
2. user-stories.md cites each US under that flow. A user story declares its US in its H1. Its parent BF is the directory it sits in, and no line of the file restates it. Keep each observable outcome in its own story, except the explicitly approved same-BF, same-actor-goal capacity-only partition above.
|
|
100
112
|
3. 02_Acceptance-Criteria.md states each AC under that US as an `# AC-NNNN-NNNN-NN` comment followed by exactly one Gherkin `Scenario:`.
|
|
101
113
|
4. Each EX row in 03_Example.md has exactly one AC-Ref. It names an AC in that story. Every AC has at least one EX.
|
|
102
114
|
5. Each BR lives in an enforcing contract and cites one or more full EX IDs that already exist. Every EX is cited by at least one BR. Several BRs may cite an EX, and one BR may cite several EXs.
|
|
@@ -11,6 +11,7 @@ The flows a UI contract serves are the flows whose examples its rules cite; the
|
|
|
11
11
|
- `elements[].label` is inspection-target text
|
|
12
12
|
- `data-qfai` marker convention
|
|
13
13
|
- Prototype metadata
|
|
14
|
+
- Purposeful copy: `supplements` and `structure`
|
|
14
15
|
- Screen contract rules
|
|
15
16
|
- Template
|
|
16
17
|
- Typical failures
|
|
@@ -143,6 +144,110 @@ evidence records nothing against it — an entry is a note between the contract'
|
|
|
143
144
|
author and whoever reviews the prototype. Follow the shape
|
|
144
145
|
`templates/contracts/ui-contract.sample.yaml` shows.
|
|
145
146
|
|
|
147
|
+
## Purposeful copy: `supplements` and `structure`
|
|
148
|
+
|
|
149
|
+
A screen states the words it shows, so that implementation adds none the contract
|
|
150
|
+
did not ask for and review can compare the rendered screen with what was agreed.
|
|
151
|
+
The words are the screen `title` (its one heading), the labels of `elements` and
|
|
152
|
+
`actions`, the group headings, and the supplements below. Two keys carry them,
|
|
153
|
+
beside `primary_tasks`, `elements` and `actions`, which stay as they are.
|
|
154
|
+
|
|
155
|
+
### `supplements` (required)
|
|
156
|
+
|
|
157
|
+
Every text the screen shows beyond its `title`, group headings and labels: a
|
|
158
|
+
sentence under a field, a notice, an empty-state message, a disclosure, the result
|
|
159
|
+
of a save or a send, the instruction after a failure, the consequence of an action
|
|
160
|
+
that cannot be undone. Each is an entry with exactly these keys, all non-empty:
|
|
161
|
+
|
|
162
|
+
| Key | Holds |
|
|
163
|
+
| ------ | ----------------------------------------------------------------------------------------- |
|
|
164
|
+
| `id` | stable key, unique in the screen |
|
|
165
|
+
| `near` | the `id` of the element, action or structure group the text sits with |
|
|
166
|
+
| `when` | the state it shows in: `default`, `empty`, `loading`, `error` or `success` |
|
|
167
|
+
| `text` | the words as displayed |
|
|
168
|
+
| `why` | what the user could not know or do without it, and why a label or structure is not enough |
|
|
169
|
+
|
|
170
|
+
`supplements: []` says the screen shows none. Most screens need few, and a screen
|
|
171
|
+
need not have any. Two kinds of text are not supplements: the message of a field
|
|
172
|
+
rule is owned by the `validations` of its element, and data the product shows or
|
|
173
|
+
the user types is not copy the contract authors. A field message that says more
|
|
174
|
+
than its rule does is a supplement with `when: error`.
|
|
175
|
+
|
|
176
|
+
The list is the whole inventory in both directions. Text the screen shows that is
|
|
177
|
+
not listed is excess. A listed text the screen does not show is an unmet need, so
|
|
178
|
+
a necessary condition, cost, destination, result, recovery step or consequence
|
|
179
|
+
that is written here cannot be dropped by a later tidy-up; removing it is a
|
|
180
|
+
change to the contract, which goes back to `/qfai-sdd`.
|
|
181
|
+
|
|
182
|
+
Write `why` for the point of decision. "Explains the Save button" is a reason to
|
|
183
|
+
delete the text. "After the click the user cannot see where the draft went" is a
|
|
184
|
+
reason to keep it.
|
|
185
|
+
|
|
186
|
+
### `structure` (optional)
|
|
187
|
+
|
|
188
|
+
The groups the screen is read in, in reading order. Each is an entry with exactly
|
|
189
|
+
`id`, `tasks`, `members` and, when the group shows a heading, `heading`:
|
|
190
|
+
|
|
191
|
+
| Key | Holds |
|
|
192
|
+
| --------- | ------------------------------------------------------------------ |
|
|
193
|
+
| `id` | stable key, unique in the screen |
|
|
194
|
+
| `tasks` | the `primary_tasks[].id` values the group serves, at least one |
|
|
195
|
+
| `members` | the `elements[].id` and `actions[].id` values it holds, in order |
|
|
196
|
+
| `heading` | the displayed heading; leave the key out when the group shows none |
|
|
197
|
+
|
|
198
|
+
An id belongs to one group, and an element or action may be left out of every
|
|
199
|
+
group. Without `structure` the screen shows no heading beyond its `title`, so a
|
|
200
|
+
heading that appears on the rendered screen has a group here. A group heading is
|
|
201
|
+
not the screen title: a second heading above or beside the real one repeats it.
|
|
202
|
+
A group that serves no task does not belong on the screen; name the task it
|
|
203
|
+
enables, or leave the heading and the group out.
|
|
204
|
+
|
|
205
|
+
### A worked example
|
|
206
|
+
|
|
207
|
+
The sample at `templates/contracts/ui-contract.sample.yaml` shows a complete
|
|
208
|
+
screen. Its draft action reads "Save draft", and no paragraph says what Save draft
|
|
209
|
+
does. What the label cannot say is declared instead: `Saved to Drafts` after the
|
|
210
|
+
click, and `Not saved. Your entries are still here. Try again.` after a failure.
|
|
211
|
+
The user learns where the draft went and what a failure means, and nothing is
|
|
212
|
+
written twice.
|
|
213
|
+
|
|
214
|
+
### What a necessary text looks like
|
|
215
|
+
|
|
216
|
+
Subtraction removes text that adds no meaning. It never removes:
|
|
217
|
+
|
|
218
|
+
- a condition, cost, storage or transmission destination, or the result of an
|
|
219
|
+
action that is not visible otherwise (a demo-data notice that is true and
|
|
220
|
+
shown where the user decides is one of these);
|
|
221
|
+
- error recovery, and the consequence of an action that cannot be undone;
|
|
222
|
+
- labels, accessible names, roles and states.
|
|
223
|
+
|
|
224
|
+
Moving such text into a tooltip or a placeholder does not keep it. A word or
|
|
225
|
+
character count never approves or rejects a screen; a count is an observation
|
|
226
|
+
a finding may cite.
|
|
227
|
+
|
|
228
|
+
### What validate checks
|
|
229
|
+
|
|
230
|
+
`QFAI-CONTRACT-043` reports `supplements` absent, a key that is not a list, an
|
|
231
|
+
entry that is not a mapping, a missing, empty or extra key, a `when` outside the
|
|
232
|
+
five states, and a repeated `id`; the same for `structure` when it is written.
|
|
233
|
+
`QFAI-CONTRACT-044` reports a `members`, `tasks` or `near` that names an id
|
|
234
|
+
the screen does not declare, and an element or action in two groups.
|
|
235
|
+
`QFAI-CONTRACT-045` warns when a group heading is the screen title, or a
|
|
236
|
+
supplement's text is the title, a group heading, the label of what it sits near, or
|
|
237
|
+
another supplement's text near the same target in the same state; case, spacing and
|
|
238
|
+
closing punctuation do not make a text different. Whether a sentence is needed is
|
|
239
|
+
judged against the task by the reviewer; validate compares ids and exact wording
|
|
240
|
+
only.
|
|
241
|
+
|
|
242
|
+
A contract written before these keys was valid without them. Add
|
|
243
|
+
`supplements` to each screen: `supplements: []` is the answer for a screen that
|
|
244
|
+
shows nothing beyond its title and labels. Keep `structure` out until a group
|
|
245
|
+
heading is wanted.
|
|
246
|
+
|
|
247
|
+
Two contracts that state the same screen `id` each hold their own `supplements`
|
|
248
|
+
and `structure`; the project-wide screen list compares `title`, `route` and
|
|
249
|
+
`primary_tasks` only.
|
|
250
|
+
|
|
146
251
|
## Screen contract rules
|
|
147
252
|
|
|
148
253
|
`screens[].elements[]` are the display fields:
|
|
@@ -185,6 +290,13 @@ Render the element with that marker, or remove the marker from the contract.
|
|
|
185
290
|
**A label does not match.** Update the contract label, then the rendered text or
|
|
186
291
|
marker mapping. Updating one side leaves the two out of step.
|
|
187
292
|
|
|
293
|
+
**`QFAI-CONTRACT-043` names a screen with no `supplements`.** Add `supplements: []`
|
|
294
|
+
if the screen shows no text beyond its title, group headings and labels, or list each
|
|
295
|
+
text with its `near`, `when`, `text` and `why`.
|
|
296
|
+
|
|
297
|
+
**`QFAI-CONTRACT-045` warns that a supplement repeats a label.** Delete the supplement,
|
|
298
|
+
or word it so it tells the user something the label does not.
|
|
299
|
+
|
|
188
300
|
**The discussion pack already has screen contracts, so this looks redundant.**
|
|
189
301
|
It is not. A discussion pack is discovery output and is non-normative; the
|
|
190
302
|
downstream skills and every validate lane read `<paths.contractsDir>/ui/*.yaml`.
|
|
@@ -207,4 +319,6 @@ For a UI-bearing visual flow, the root `DESIGN.md` is authored and validated by
|
|
|
207
319
|
- [ ] Every UI-bearing contract has one full declared ID, at least one screen, and a matching `contracts.md` row.
|
|
208
320
|
- [ ] Screen IDs, routes, primary tasks, labels, markers, and actions are stable and testable.
|
|
209
321
|
- [ ] Every declared action has an observable effect, including relevant failure states.
|
|
322
|
+
- [ ] Every screen declares `supplements` (`[]` when none), each with the reason the text is needed, and its `structure` names every heading beyond the title.
|
|
323
|
+
- [ ] No supplement restates a label, heading or action the screen already shows, and none is development commentary.
|
|
210
324
|
- [ ] Prototyping coverage uses full contract IDs and the current cycle-0 fields.
|
package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-design-contract-normalization.md
CHANGED
|
@@ -15,33 +15,6 @@ A cli-only target has no root `DESIGN.md`; it still normalizes
|
|
|
15
15
|
`/qfai-prototyping` records its handoff in
|
|
16
16
|
`.qfai/prototype/final/handoff.json`. SDD does not author it.
|
|
17
17
|
|
|
18
|
-
## Removed yaml contracts (permanent)
|
|
19
|
-
|
|
20
|
-
The legacy per-aspect brand yaml contracts have been **removed**. The
|
|
21
|
-
brand SSOT is now root `DESIGN.md` only, authored by `common-design-md`.
|
|
22
|
-
Do not regenerate or reintroduce these files. Their content is subsumed by
|
|
23
|
-
`DESIGN.md`:
|
|
24
|
-
|
|
25
|
-
- brand archetype / voice / audience → `DESIGN.md` `brand` + `audience` +
|
|
26
|
-
`# Brand Philosophy` body.
|
|
27
|
-
- negative references / things-to-avoid →
|
|
28
|
-
`audience.do_not_look_like` and the **Don't** subsection of
|
|
29
|
-
`# Brand Philosophy`.
|
|
30
|
-
- color / typography / spacing / radius / shadow tokens →
|
|
31
|
-
`DESIGN.md` `visual.*` token tree.
|
|
32
|
-
|
|
33
|
-
The following contracts MUST NOT be generated (the corresponding
|
|
34
|
-
concepts do not exist in the current prototyping skill):
|
|
35
|
-
|
|
36
|
-
- `evaluation-rubric.yaml` — evaluation axes are global constants; no
|
|
37
|
-
per-project rubric.
|
|
38
|
-
- `evaluator-calibration.yaml` — calibration is the ordinal scale plus
|
|
39
|
-
a 200–500 word prose critique authored at review time.
|
|
40
|
-
- `absorption-policy.yaml` — absorption / harvest concepts are not
|
|
41
|
-
used.
|
|
42
|
-
- `selected-direction.yaml` — winner selection is not used; the latest
|
|
43
|
-
accepted iteration is always the artifact.
|
|
44
|
-
|
|
45
18
|
## Sidecar mapping
|
|
46
19
|
|
|
47
20
|
The remaining UI-bearing sidecar maps to its contract as follows:
|
|
@@ -50,12 +23,14 @@ The remaining UI-bearing sidecar maps to its contract as follows:
|
|
|
50
23
|
|
|
51
24
|
Project-specific anti-pattern notes live in `audience.do_not_look_like`
|
|
52
25
|
of `DESIGN.md`. Evaluator axes are fixed by the review validation the
|
|
53
|
-
QFAI CLI applies
|
|
54
|
-
and are no longer authored as sidecar files.
|
|
26
|
+
QFAI CLI applies.
|
|
55
27
|
|
|
56
28
|
## Normalization Rules
|
|
57
29
|
|
|
58
30
|
- Preserve source IDs where available.
|
|
31
|
+
- Normalize the sidecar's notes on displayed text into the screen's `supplements`
|
|
32
|
+
and `structure`, as the UI contract guide shapes them. Notes for the author or
|
|
33
|
+
the reviewer are not displayed text and are not copied into either key.
|
|
59
34
|
- Convert prose into machine-readable arrays or objects.
|
|
60
35
|
- Reject placeholder text instead of copying it into contracts.
|
|
61
36
|
- Frame negative references in `audience.do_not_look_like` as
|
|
@@ -11,5 +11,42 @@ Record a change request as one row in `<paths.specsDir>/decisions.md`. The row h
|
|
|
11
11
|
- Describe the actual contradiction and its source in `Content`. In `Approach`, state the proposed correction, affected work, and the gate that proves it is applied, inside the form stated at the top of `templates/spec/decisions.md`. Keep both cells concise enough to review as a table row.
|
|
12
12
|
- Append the row only once the user approves the change, at `WIP`, and record in `Approach` who approved it, when, and the option chosen. Move it to `DONE` only after the owner rerun, affected artifacts, and validation evidence are complete. Use `SUPERSEDED (by DEC-NNNN)` when a later decision replaces the row, and `PARTLY SUPERSEDED (by DEC-NNNN)` when it replaces only part of it.
|
|
13
13
|
- Append a declined change at `REJECTED`, recording in `Approach` who declined it and when. It authorizes no edit.
|
|
14
|
-
- After appending, change only `Status
|
|
14
|
+
- After appending, change only `Status`, apart from the drift protocol's
|
|
15
|
+
explicit branch-added decision renumbering or published decision prefix
|
|
16
|
+
recovery. Keep inherited ID, Content and Approach fixed, and never delete a
|
|
17
|
+
row. A row the base holds at DONE authorizes nothing at any Status, so a later
|
|
18
|
+
change needs a new row. If its scope or proposed correction changes, append a
|
|
19
|
+
new decision row and supersede the old one.
|
|
15
20
|
- Keep open questions in `<paths.specsDir>/open-questions.md`. Use the same four columns there, with `OQ-NNNN` IDs and the statuses permitted by that template.
|
|
21
|
+
|
|
22
|
+
## Published decision prefix recovery
|
|
23
|
+
|
|
24
|
+
Use the same four-cell row only after actual approval covers this specific
|
|
25
|
+
recovery. Read `.qfai/assistant/rule/drift-protocol.md#published-decision-prefix-recovery`
|
|
26
|
+
for eligibility, byte boundaries, pre-write checks and stop conditions. Generic
|
|
27
|
+
protocol approval and a diagnostic suggestion do not authorize a target.
|
|
28
|
+
|
|
29
|
+
- Content names the target's repository-relative file and the unique target
|
|
30
|
+
DEC ID. Approach records the published source commit, fixed base and unique
|
|
31
|
+
common ancestor, with evidence the target is absent from the latter two and
|
|
32
|
+
the source commit is a current-HEAD ancestor.
|
|
33
|
+
- Evidence names actual supporting files. Grounds records the recovery reason,
|
|
34
|
+
actual approval authority, old and new SHA-256 Approach digests, and the exact
|
|
35
|
+
approved `- Evidence: <actual file references> - Grounds: ` prefix, including
|
|
36
|
+
its trailing space. Use actual references in place of the placeholder.
|
|
37
|
+
- The old digest matches the raw published source cell; the new digest matches
|
|
38
|
+
the prefix plus the complete original Approach. State the single-line valid
|
|
39
|
+
UTF-8 cell boundary: exclude only delimiter pipes and exactly one ASCII
|
|
40
|
+
padding space at each end. Decode no escapes and trim or normalize nothing.
|
|
41
|
+
- State that original ordered, nonempty Residual risk and Rollback items are
|
|
42
|
+
valid. Preserve ID, Content, Status, the full original suffix and every other
|
|
43
|
+
row. Record the immediate pre-write uniqueness, unchanged-cell and old-digest
|
|
44
|
+
checks, and the required existing validation without an exemption.
|
|
45
|
+
- Residual risk states the remaining observation and concurrency limits.
|
|
46
|
+
Rollback removes only the recorded prefix when the current new digest still
|
|
47
|
+
matches; otherwise it preserves the row and stops. Removal restores the
|
|
48
|
+
original validation failure. Do not reset, amend or force push.
|
|
49
|
+
|
|
50
|
+
Inherited records, open-question rows, unavailable provenance, ambiguous byte
|
|
51
|
+
boundaries, duplicate IDs, stale digests and any unapproved change stop recovery.
|
|
52
|
+
Do not fill approval or execution fields with assumed answers or planned results.
|
package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/ui-contract.sample.yaml
CHANGED
|
@@ -19,6 +19,8 @@ prototype:
|
|
|
19
19
|
purpose: customer id field on the order create form
|
|
20
20
|
screens:
|
|
21
21
|
- id: order_create
|
|
22
|
+
# The one heading of the screen. A heading beyond it is a group heading
|
|
23
|
+
# under `structure`.
|
|
22
24
|
title: Create Order
|
|
23
25
|
route: /orders/new
|
|
24
26
|
# primary_tasks: at least one entry required per screen (QFAI-AUD-001).
|
|
@@ -36,6 +38,9 @@ screens:
|
|
|
36
38
|
label: Correct a rejected field
|
|
37
39
|
acceptance: the field-level error clears and submit re-enables
|
|
38
40
|
- id: t3
|
|
41
|
+
label: Keep the order for later
|
|
42
|
+
acceptance: the order appears under /orders/drafts and the form keeps what was entered
|
|
43
|
+
- id: t4
|
|
39
44
|
label: Abandon the draft
|
|
40
45
|
acceptance: navigating away discards the draft and returns to /orders
|
|
41
46
|
elements:
|
|
@@ -51,13 +56,55 @@ screens:
|
|
|
51
56
|
required: true
|
|
52
57
|
validations:
|
|
53
58
|
- must be non-empty
|
|
54
|
-
- id: submit_button
|
|
55
|
-
label: Submit
|
|
56
|
-
type: button
|
|
57
|
-
required: true
|
|
58
|
-
validations: []
|
|
59
59
|
actions:
|
|
60
60
|
- id: submit_order
|
|
61
61
|
label: Submit order
|
|
62
62
|
kind: submit
|
|
63
63
|
effect: navigates to /orders and shows the created row
|
|
64
|
+
- id: save_draft
|
|
65
|
+
label: Save draft
|
|
66
|
+
kind: submit
|
|
67
|
+
effect: stores the order under /orders/drafts, stays on the form and keeps what was entered
|
|
68
|
+
- id: discard_draft
|
|
69
|
+
label: Discard draft
|
|
70
|
+
kind: navigate
|
|
71
|
+
effect: navigates to /orders without storing the order
|
|
72
|
+
# structure (optional): the groups the screen is read in, in reading order.
|
|
73
|
+
# `tasks` are primary_tasks ids, `members` are elements/actions ids, and
|
|
74
|
+
# `heading` is the displayed heading of the group; leave it out for a group
|
|
75
|
+
# that shows none. Without `structure` the screen shows no heading beyond
|
|
76
|
+
# its title. An id belongs to one group.
|
|
77
|
+
structure:
|
|
78
|
+
- id: g_customer
|
|
79
|
+
heading: Customer
|
|
80
|
+
tasks: [t1, t2]
|
|
81
|
+
members: [customer_id_input]
|
|
82
|
+
- id: g_items
|
|
83
|
+
heading: Items
|
|
84
|
+
tasks: [t1, t2]
|
|
85
|
+
members: [item_code_input]
|
|
86
|
+
- id: g_commit
|
|
87
|
+
tasks: [t1, t3, t4]
|
|
88
|
+
members: [submit_order, save_draft, discard_draft]
|
|
89
|
+
# supplements (required): every text the screen shows beyond its title,
|
|
90
|
+
# group headings and labels. Field validation messages are the exception;
|
|
91
|
+
# they belong to the element's `validations`. `[]` says the screen shows
|
|
92
|
+
# none. `near` is an elements/actions/structure id, `when` is one of
|
|
93
|
+
# default, empty, loading, error, success, and `why` says what the user
|
|
94
|
+
# could not know or do without the text, and why a label or the structure
|
|
95
|
+
# cannot carry it.
|
|
96
|
+
#
|
|
97
|
+
# There is no supplement that restates what "Save draft" does: the label
|
|
98
|
+
# says it. What the label cannot say is where the draft went and what a
|
|
99
|
+
# failed save means, so those two are declared.
|
|
100
|
+
supplements:
|
|
101
|
+
- id: sp_draft_saved
|
|
102
|
+
near: save_draft
|
|
103
|
+
when: success
|
|
104
|
+
text: Saved to Drafts
|
|
105
|
+
why: After the click the user cannot see where the order went; the label names the action, not the place its result is kept.
|
|
106
|
+
- id: sp_draft_not_saved
|
|
107
|
+
near: save_draft
|
|
108
|
+
when: error
|
|
109
|
+
text: Not saved. Your entries are still here. Try again.
|
|
110
|
+
why: A failed save leaves the user unsure whether work was lost and what to do; the label says nothing about failure.
|
|
@@ -13,6 +13,9 @@ No item is empty, and only the last two may take `none — <reason>`. What a
|
|
|
13
13
|
kind of row must state in its Approach, such as a change request's proposed
|
|
14
14
|
correction, goes inside these items. Write a `|` inside a cell as `\|`.
|
|
15
15
|
|
|
16
|
+
Use this form for every new row. A passing validation result does not prove
|
|
17
|
+
that every decision row follows it.
|
|
18
|
+
|
|
16
19
|
A row that records a spec change following from an earlier approval may name
|
|
17
20
|
that earlier decision by its ID in `Grounds:`, in place of a new answer from
|
|
18
21
|
the user. Its `Evidence:` still lists what supports the change.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qfai-triage
|
|
3
|
-
title: QFAI Triage (Requests that end without a change)
|
|
4
|
-
description: "Use when invoked by name or handed a QFAI work order for a request that ends without a change
|
|
3
|
+
title: QFAI Triage (Requests that end without a tracked change)
|
|
4
|
+
description: "Use when invoked by name or handed a QFAI work order for a request that ends without a tracked change: a question, a duplicate, missing information, a split, automated reports, a security report, an operation only a person can run, or authorized cleanup of current-task temporary directories."
|
|
5
5
|
argument-hint: "<the request, as it was reported>"
|
|
6
6
|
allowed-tools: [Read, Glob, Grep, Write, Bash, TodoWrite, Task, Agent]
|
|
7
7
|
roles:
|
|
@@ -24,12 +24,13 @@ steps:
|
|
|
24
24
|
- triage-cluster
|
|
25
25
|
- triage-security-intake
|
|
26
26
|
- triage-handoff
|
|
27
|
+
- triage-owned-cleanup
|
|
27
28
|
- triage-close
|
|
28
29
|
requires: []
|
|
29
30
|
mode: execution-focused
|
|
30
31
|
---
|
|
31
32
|
|
|
32
|
-
## /qfai-triage - Requests that end without a change
|
|
33
|
+
## /qfai-triage - Requests that end without a tracked change
|
|
33
34
|
|
|
34
35
|
[DRIFT-PROTOCOL:REQUIRED]
|
|
35
36
|
|
|
@@ -39,7 +40,10 @@ first.
|
|
|
39
40
|
|
|
40
41
|
This skill answers, closes, splits or hands over a request, and changes no
|
|
41
42
|
file git tracks. Work the request needs is recorded as a follow-up request,
|
|
42
|
-
never done here
|
|
43
|
+
never done here except the exact current-task temporary cleanup that
|
|
44
|
+
`triage-owned-cleanup` permits. That step rechecks existing user authority and
|
|
45
|
+
repository-local scope before any deletion. No other triage step executes an
|
|
46
|
+
operation, and `triage-handoff` still waits for the person's reported result.
|
|
43
47
|
|
|
44
48
|
## Inputs
|
|
45
49
|
|
|
@@ -59,17 +63,18 @@ Invoked by name, run the steps in this order, as
|
|
|
59
63
|
states: read `.qfai/assistant/step/<name>/STEP.md` for the current step only,
|
|
60
64
|
run it, then move to the next.
|
|
61
65
|
|
|
62
|
-
| Step | What it does
|
|
63
|
-
| ------------------------ |
|
|
64
|
-
| `triage-dedupe` | Finds the same or a successor item, and links it
|
|
65
|
-
| `triage-request-info` | Asks for the facts the request is missing
|
|
66
|
-
| `triage-investigate` | Reads internals, history and outside facts to find the answer
|
|
67
|
-
| `triage-answer` | Answers, citing what shows the answer
|
|
68
|
-
| `triage-decompose` | Splits the request into child requests with their dependencies
|
|
69
|
-
| `triage-cluster` | Groups automated reports by signature
|
|
70
|
-
| `triage-security-intake` | Takes a vulnerability report in privately
|
|
71
|
-
| `triage-handoff` | Gives a person the steps of an operation only they can run
|
|
72
|
-
| `triage-
|
|
66
|
+
| Step | What it does | Skipped when |
|
|
67
|
+
| ------------------------ | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
68
|
+
| `triage-dedupe` | Finds the same or a successor item, and links it | The request neither may repeat an existing item nor rests on a premise that aged |
|
|
69
|
+
| `triage-request-info` | Asks for the facts the request is missing | The request states every fact its handling needs |
|
|
70
|
+
| `triage-investigate` | Reads internals, history and outside facts to find the answer | The documents and code as they stand answer the question |
|
|
71
|
+
| `triage-answer` | Answers, citing what shows the answer | The request asks no question |
|
|
72
|
+
| `triage-decompose` | Splits the request into child requests with their dependencies | The request is one piece of work |
|
|
73
|
+
| `triage-cluster` | Groups automated reports by signature | The request is not a set of automated reports |
|
|
74
|
+
| `triage-security-intake` | Takes a vulnerability report in privately | The request reports no exploitable weakness |
|
|
75
|
+
| `triage-handoff` | Gives a person the steps of an operation only they can run | The request needs no operation that only a person can run |
|
|
76
|
+
| `triage-owned-cleanup` | Removes authorized current-task temporary directories and verifies absence | The request is not the specific repository-local cleanup the step permits |
|
|
77
|
+
| `triage-close` | Records the outcome and each follow-up, and closes | Only `triage-security-intake` ran: the fix follows it, so the request stays open |
|
|
73
78
|
|
|
74
79
|
Invoked by name, the skill ends at this stage. It starts no other stage and
|
|
75
80
|
routes no follow-up: a request to carry a follow-up out goes to `qfai-run`.
|
|
@@ -94,9 +99,13 @@ Follow `.qfai/assistant/rule/shared-skill-operating-baseline.md#completion-contr
|
|
|
94
99
|
find changed when it started.
|
|
95
100
|
|
|
96
101
|
The report states the outcome `triage-close` recorded and lists each follow-up
|
|
97
|
-
request. It never says a change is done.
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
request. It never says a tracked change is done. `cleaned` says only that the
|
|
103
|
+
named temporary targets were removed and their absence and unchanged tracked
|
|
104
|
+
contents and index were verified; unfinished cleanup cannot use it.
|
|
105
|
+
Ask for the next action only when
|
|
106
|
+
proceeding requires the user's answer, as `.agents/rules/user-questions.md`
|
|
107
|
+
§ 6 sets out. A closure-only report needs no question. Under a no-question mode,
|
|
108
|
+
list any remaining actions instead.
|
|
100
109
|
|
|
101
110
|
## Default Autopilot Policy
|
|
102
111
|
|
|
@@ -105,6 +114,7 @@ no-question mode, list them in the report instead.
|
|
|
105
114
|
|
|
106
115
|
project_memory:
|
|
107
116
|
|
|
108
|
-
- Triage changes no tracked file;
|
|
117
|
+
- Triage changes no tracked file; only `triage-owned-cleanup` executes its bounded cleanup.
|
|
118
|
+
- Other work it finds is a follow-up request.
|
|
109
119
|
- A follow-up is recorded, never routed inside the run that found it.
|
|
110
120
|
- A security report stays private until the fix is ready to disclose.
|
|
@@ -106,10 +106,11 @@ Questions about this skill's own inputs or settings stay in its own output for
|
|
|
106
106
|
the user to answer. This skill does not write `open-questions.md`.
|
|
107
107
|
|
|
108
108
|
The completion message lists each decision the agents adopted, with its
|
|
109
|
-
reason and any disagreeing position. None of them is put as a question.
|
|
110
|
-
|
|
111
|
-
`.agents/rules/user-questions.md` § 6 sets out
|
|
112
|
-
|
|
109
|
+
reason and any disagreeing position. None of them is put as a question. Ask for
|
|
110
|
+
the next action only when proceeding requires the user's answer, as
|
|
111
|
+
`.agents/rules/user-questions.md` § 6 sets out. A completion-only report needs
|
|
112
|
+
no question. Under a no-question mode, list any remaining actions instead.
|
|
113
|
+
The applicable next actions are:
|
|
113
114
|
|
|
114
115
|
- Proceed (recommended): create a PR on your hosting platform, with the
|
|
115
116
|
verification report as its description.
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# Step 0 — Load context
|
|
2
2
|
|
|
3
|
+
`<paths.specsDir>` and `<paths.contractsDir>` are the directories `qfai.config.yaml` sets.
|
|
4
|
+
|
|
3
5
|
1. Read relevant **project policy** (if present):
|
|
4
|
-
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
6
|
+
- `<paths.specsDir>/01_policy/objective.md`
|
|
7
|
+
- `<paths.specsDir>/01_policy/initiative.md`
|
|
8
|
+
- `<paths.specsDir>/01_policy/principle.md`
|
|
9
|
+
- `<paths.contractsDir>/tech.md`
|
|
7
10
|
- `.qfai/assistant/rule/agent-selection.md`. From
|
|
8
11
|
`.qfai/assistant/rule/agent-selection.md` read the acting role's entry
|
|
9
12
|
when a role needs one, not the whole file
|
|
@@ -14,9 +17,9 @@
|
|
|
14
17
|
- `.qfai/assistant/rule/workflow.md` (or equivalent)
|
|
15
18
|
|
|
16
19
|
3. Read existing artifacts for the current work item (if present):
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
+
- `<paths.specsDir>/02_business-flow/`
|
|
21
|
+
- `<paths.contractsDir>/`
|
|
22
|
+
- `<paths.specsDir>/decisions.md`
|
|
20
23
|
|
|
21
24
|
Do not use discussion-pack artifacts as verification inputs. Verify reads normalized specs, contracts, tests and code only.
|
|
22
25
|
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
# Verify Output Contract — `.qfai/report/verify.json`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Verdict file
|
|
6
|
+
- Per-gate results
|
|
7
|
+
- CI-only checks
|
|
8
|
+
- Scope
|
|
9
|
+
- Example and rules
|
|
4
10
|
|
|
5
|
-
|
|
11
|
+
## Verdict file
|
|
6
12
|
|
|
7
|
-
`.qfai/
|
|
13
|
+
`/qfai-verify` MUST write `.qfai/report/verify.json` at the end of the run. This file is the machine-readable verdict; the stage report is the human-readable account. No `qfai` command reads it, so an absent `verify.json` does not fail `npx qfai validate`.
|
|
14
|
+
|
|
15
|
+
Canonical path: `.qfai/report/verify.json`. Create the `.qfai/report/` directory if absent — it is the same directory `validate.json` is written to.
|
|
8
16
|
|
|
9
17
|
| Field | Type | Required | Meaning |
|
|
10
18
|
| ------------ | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -15,8 +23,17 @@ Canonical path: `.qfai/report/verify.json` (NOT `.qfai/output/`). Create the `.q
|
|
|
15
23
|
| `summary` | string | no | One or two sentences an operator can read without opening the stage report. |
|
|
16
24
|
| `gates` | array of objects | no | Per-gate results: as set out below. Advisory; no reader gates on it today. |
|
|
17
25
|
|
|
26
|
+
When the scope includes acceptance scaffolds or unfinished BF/AC acceptance
|
|
27
|
+
bodies, an optional `summary` stays one or two short sentences naming remaining
|
|
28
|
+
work, its owner or UNASSIGNED, and the detailed human-report reference. The
|
|
29
|
+
five-field detail belongs in `verify-repo-gate`'s `## Report` section, not a
|
|
30
|
+
new JSON field or table inside `summary`. Empty-body exemptions, verdicts and
|
|
31
|
+
completion rules stay unchanged.
|
|
32
|
+
|
|
18
33
|
`status` is a closed two-value enum: `"PASS"` / `"FAIL"`. There is no `"WARN"` — a run with only `warning` / `info` findings is `"PASS"` (waivers apply to those severities only). Any `error` finding makes it `"FAIL"`.
|
|
19
34
|
|
|
35
|
+
## Per-gate results
|
|
36
|
+
|
|
20
37
|
Each entry of `gates` is `{ name, status, command }`, plus these optional fields:
|
|
21
38
|
|
|
22
39
|
| Field | Type | Meaning |
|
|
@@ -27,11 +44,51 @@ Each entry of `gates` is `{ name, status, command }`, plus these optional fields
|
|
|
27
44
|
| `check` | string | On a `"DELEGATED"` gate: the CI check that runs it. |
|
|
28
45
|
| `ci` | string | On a `"DELEGATED"` gate: `"green"`, `"red"` or `"pending"`, the state of that check when the file is written. |
|
|
29
46
|
|
|
30
|
-
|
|
47
|
+
## CI-only checks
|
|
48
|
+
|
|
49
|
+
A gate the project's Standard commands declare `CI only: <check name>` is
|
|
50
|
+
recorded `"DELEGATED"` with its `check` and `ci` for the candidate being evaluated.
|
|
51
|
+
`check` names the actual CI check and `ci` its observed state.
|
|
52
|
+
A `"red"` check makes the top-level `status` `"FAIL"` for that candidate.
|
|
53
|
+
A `"pending"` one does not, and `summary` names it. A runnable local gate is
|
|
54
|
+
never delegated to avoid running it. Retain an observed FAIL or
|
|
55
|
+
UNRUN; neither becomes PASS or DELEGATED because a verification commit is wanted.
|
|
56
|
+
|
|
57
|
+
A `"PASS"` verdict with pending delegated checks supports only the existing
|
|
58
|
+
verification-commit allowance under a user instruction or project policy
|
|
59
|
+
covering that commit and its paths. It does not establish formal completion or
|
|
60
|
+
permission to push, create a pull request or merge. Every nondelegated gate
|
|
61
|
+
must pass. A delegated red check stops transport of the same unchanged candidate.
|
|
62
|
+
Explicit CI-only delegation covering a transport commit may instead carry actual
|
|
63
|
+
changes addressing that failure through the existing planned fix into a new
|
|
64
|
+
candidate, while HEAD still names the failed commit. Preserve the prior head,
|
|
65
|
+
check, run and observed result as FAIL; never relabel that evidence pending.
|
|
66
|
+
Report the actual fix and, after committing, the new head and resume condition.
|
|
67
|
+
The new candidate remains unverified until its own CI results are observed.
|
|
68
|
+
|
|
69
|
+
The stage report records the target, current head, run ID or URL when available,
|
|
70
|
+
check, actual outcome and counts, blocker and resume condition. No run yet means
|
|
71
|
+
no result; invent neither. `ci: "green"` needs actual passing evidence for that
|
|
72
|
+
same target and head. Missing or mismatched evidence remains pending. Formal
|
|
73
|
+
completion or merge waits for every required check to pass on the current head.
|
|
74
|
+
Keep this evidence in the stage report and `summary`; add no verdict fields or states.
|
|
31
75
|
|
|
32
76
|
A gate that fails identically on the base, or did not run and is not delegated, still makes the top-level `status` `"FAIL"`. The fields let a reader tell it from a failure the run caused.
|
|
33
77
|
|
|
34
|
-
|
|
78
|
+
Keep the full CI receipt in the stage report, as
|
|
79
|
+
`.qfai/assistant/step/common-gate-run/STEP.md#ci-evidence` requires. A branch
|
|
80
|
+
overview or a confirmed closed cleanup SKIP does not replace actual verification
|
|
81
|
+
or turn it into a behavioral PASS. Preserve failures for the current head;
|
|
82
|
+
unknown identity or purpose remains unverified. The receipt adds no fields or
|
|
83
|
+
states to this contract.
|
|
84
|
+
|
|
85
|
+
## Scope
|
|
86
|
+
|
|
87
|
+
`scope` is a closed enum. Write the gate set this invocation covers through
|
|
88
|
+
execution or an explicitly declared matching CI-only check. Delegation never
|
|
89
|
+
claims that the profile already ran; its check must perform the required scan
|
|
90
|
+
and profile. A whole-repository scope still requires full validation. Write the
|
|
91
|
+
one that matches the stage you were invoked for:
|
|
35
92
|
|
|
36
93
|
| `scope` | Written by | validate profile |
|
|
37
94
|
| ------------- | ------------------------------------------------------------------- | ----------------------------------------------- |
|
|
@@ -42,6 +99,8 @@ A gate that fails identically on the base, or did not run and is not delegated,
|
|
|
42
99
|
There is no `implement` value: the enum is closed at these three, and a run after
|
|
43
100
|
`/qfai-implement` is recorded as `full`.
|
|
44
101
|
|
|
102
|
+
## Example and rules
|
|
103
|
+
|
|
45
104
|
Minimal conforming example for the prototyping gate:
|
|
46
105
|
|
|
47
106
|
```json
|
|
@@ -56,6 +115,12 @@ Minimal conforming example for the prototyping gate:
|
|
|
56
115
|
|
|
57
116
|
Rules:
|
|
58
117
|
|
|
59
|
-
-
|
|
60
|
-
-
|
|
118
|
+
- A PASS gate needs actual command output or matching CI evidence. The existing
|
|
119
|
+
top-level pending-DELEGATED allowance supports only the covered verification
|
|
120
|
+
commit described above. A `FAIL` verdict is a legitimate output; downstream
|
|
121
|
+
work stops as its gate requires.
|
|
122
|
+
- Never write a `scope` this invocation does not cover by execution or its
|
|
123
|
+
declared matching CI-only check. Writing `"prototyping"` for a `full` gate set
|
|
124
|
+
is a false verdict, not a workaround. A `--profile verify` gate is
|
|
125
|
+
`scope: "full"`, not `scope: "atdd"`; `atdd` covers the ATDD gate set only.
|
|
61
126
|
- Do not add a `version` / `schemaVersion` field. No reader validates one, and a second version series in a distributed artifact is exactly what the distributed-surface rule forbids: the npm package version is the only version this surface has.
|