qfai 2.1.2 → 2.2.1
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 +46 -6
- package/assets/defaults/agent-routing/qfai-implement.yml +9 -0
- package/assets/defaults/agent-routing/qfai-triage.yml +9 -0
- package/assets/defaults/workflows/answer-in-session.yml +8 -0
- package/assets/defaults/workflows/bump-dependency.yml +4 -1
- package/assets/defaults/workflows/decide-design.yml +5 -1
- package/assets/defaults/workflows/quarantine-flaky.yml +3 -0
- package/assets/defaults/workflows/rename-concept.yml +30 -0
- package/assets/defaults/workflows/repair-consistency.yml +1 -0
- package/assets/defaults/workflows/resolve-conflicts.yml +14 -0
- package/assets/defaults/workflows/retire-feature.yml +26 -0
- package/assets/defaults/workflows/run-operation.yml +11 -0
- package/assets/defaults/workflows/run-release.yml +12 -0
- package/assets/defaults/workflows/write-procedure.yml +18 -0
- package/assets/graph/codegraph-native.mjs +174 -0
- package/assets/graph/graphify-native.py +72 -0
- package/assets/init/.claude/settings.json +11 -29
- package/assets/init/.codex/hooks.json +9 -21
- package/assets/init/.qfai/assistant/agent/backend-engineer.md +1 -1
- package/assets/init/.qfai/assistant/agent/frontend-engineer.md +1 -1
- package/assets/init/.qfai/assistant/agent/implementation-reviewer.md +5 -0
- package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +8 -3
- package/assets/init/.qfai/assistant/rule/constitution.md +36 -18
- package/assets/init/.qfai/assistant/rule/drift-protocol.md +80 -1
- package/assets/init/.qfai/assistant/rule/references/codex-delegation.md +27 -0
- package/assets/init/.qfai/assistant/rule/references/gate-failure-autorepair.md +1 -1
- package/assets/init/.qfai/assistant/rule/references/griller-recommendations.md +21 -9
- package/assets/init/.qfai/assistant/rule/review-convergence.md +34 -15
- package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +12 -2
- package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +14 -7
- package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +2 -1
- package/assets/init/.qfai/assistant/rule/workflow.md +2 -1
- package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +11 -2
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-completion-matrix.md +32 -10
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md +17 -0
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/trend_scan_playbook.md +3 -1
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/01_Context.md +4 -1
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/04_Sources.md +5 -1
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/00_index.md +4 -1
- package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +30 -20
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/delegated-session.md +4 -3
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/session-record.md +8 -2
- package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +9 -2
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +10 -0
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/red-admissibility.md +35 -0
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/test-runner-recipes.md +445 -0
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +3 -3
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +10 -9
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +33 -2
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/handoff.md +77 -2
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/iteration-loop.md +12 -3
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +3 -1
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +31 -5
- package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +48 -46
- package/assets/init/.qfai/assistant/skill/qfai-run/references/codex-cloud-install.md +80 -0
- package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +202 -126
- package/assets/init/.qfai/assistant/skill/qfai-run/references/operator-screens.md +38 -15
- package/assets/init/.qfai/assistant/skill/qfai-run/references/plan.md +48 -22
- package/assets/init/.qfai/assistant/skill/qfai-run/references/reached-step-observations.md +134 -0
- package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +7 -4
- package/assets/init/.qfai/assistant/skill/qfai-run/scripts/codex-cloud-install.mjs +117 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/concrete-abstract-cycle.md +2 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md +20 -7
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-phase-checklists.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-pre-draft-grilling.md +5 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-quality-gate.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md +111 -7
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +58 -8
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/change-request.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions/page-NNNN.md +6 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +18 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/open-questions.md +13 -0
- package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +10 -7
- package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +22 -16
- package/assets/init/.qfai/assistant/skill/web-research/SKILL.md +1 -1
- package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +33 -16
- package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +37 -8
- package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +25 -4
- package/assets/init/.qfai/assistant/step/common-policy-check/STEP.md +1 -0
- package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +68 -15
- package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +25 -10
- package/assets/init/.qfai/assistant/step/discussion-oq/STEP.md +17 -1
- package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +23 -3
- package/assets/init/.qfai/assistant/step/discussion-uiux/STEP.md +9 -1
- package/assets/init/.qfai/assistant/step/implement-acceptance/STEP.md +3 -0
- package/assets/init/.qfai/assistant/step/implement-credentials/STEP.md +4 -0
- package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +33 -3
- package/assets/init/.qfai/assistant/step/implement-diagnose/STEP.md +12 -3
- package/assets/init/.qfai/assistant/step/implement-procedure/STEP.md +98 -0
- package/assets/init/.qfai/assistant/step/implement-quarantine/STEP.md +21 -4
- package/assets/init/.qfai/assistant/step/implement-refactor/STEP.md +25 -5
- package/assets/init/.qfai/assistant/step/implement-regression-fix/STEP.md +3 -3
- package/assets/init/.qfai/assistant/step/implement-retire/STEP.md +26 -0
- package/assets/init/.qfai/assistant/step/implement-scaffold/STEP.md +28 -5
- package/assets/init/.qfai/assistant/step/implement-stress-harness/STEP.md +33 -2
- package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +20 -5
- package/assets/init/.qfai/assistant/step/maintain-edit/STEP.md +70 -6
- package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +39 -6
- package/assets/init/.qfai/assistant/step/prototyping-handoff/STEP.md +12 -3
- package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +56 -6
- package/assets/init/.qfai/assistant/step/prototyping-preflight/STEP.md +13 -0
- package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +8 -0
- package/assets/init/.qfai/assistant/step/sdd-cycle/STEP.md +9 -4
- package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +22 -1
- package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +52 -14
- package/assets/init/.qfai/assistant/step/triage-answer/STEP.md +2 -2
- package/assets/init/.qfai/assistant/step/triage-close/STEP.md +7 -2
- package/assets/init/.qfai/assistant/step/triage-handoff/STEP.md +6 -0
- package/assets/init/.qfai/assistant/step/triage-operate/STEP.md +123 -0
- package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +35 -10
- package/assets/init/.qfai/assistant/step/verify-qfai-gate/STEP.md +8 -1
- package/assets/init/.qfai/assistant/step/verify-repeat-run/STEP.md +40 -0
- package/assets/init/.qfai/assistant/step/verify-repo-gate/STEP.md +77 -7
- package/assets/init/root/.agents/rules/api-budget.md +8 -3
- package/assets/init/root/.agents/rules/document-schema.md +17 -0
- package/assets/init/root/.agents/rules/documentation-clarity.md +1 -1
- package/assets/init/root/.agents/rules/graph-exploration.md +164 -0
- package/assets/init/root/.agents/rules/grilling.md +100 -43
- package/assets/init/root/.agents/rules/reminders.json +20 -32
- package/assets/init/root/.agents/rules/session-feedback.md +6 -11
- package/assets/init/root/.agents/rules/untrusted-content.md +2 -2
- package/assets/init/root/.agents/rules/user-questions.md +24 -14
- package/assets/init/root/.gitattributes +2 -0
- package/assets/init/root/.github/workflows/qfai-docs.yml +2 -2
- package/assets/init/root/.github/workflows/qfai-tests.yml +88 -35
- package/assets/init/root/.github/workflows/qfai-validate.yml +2 -2
- package/assets/init/root/AGENTS.md +1 -0
- package/assets/mdschema/manifest.yml +3 -0
- package/assets/mdschema/story/03_contract/tech.mdschema.yml +1 -1
- package/assets/mdschema/story/decisions/page-NNNN.mdschema.yml +32 -0
- package/assets/mdschema/story/decisions.mdschema.yml +12 -0
- package/assets/schemas/workflow/extraction.schema.json +98 -2
- package/assets/schemas/workflow/plan.schema.json +34 -1
- package/assets/scripts/check-mdschema.mjs +497 -39
- package/dist/cli/index.cjs +7667 -3515
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +8872 -4702
- package/dist/cli/index.mjs.map +1 -1
- package/dist/graph/cli.cjs +1568 -0
- package/dist/graph/cli.cjs.map +1 -0
- package/dist/graph/cli.d.cts +9 -0
- package/dist/graph/cli.d.ts +9 -0
- package/dist/graph/cli.mjs +1541 -0
- package/dist/graph/cli.mjs.map +1 -0
- package/dist/graph/hook.cjs +817 -0
- package/dist/graph/hook.cjs.map +1 -0
- package/dist/graph/hook.d.cts +9 -0
- package/dist/graph/hook.d.ts +9 -0
- package/dist/graph/hook.mjs +792 -0
- package/dist/graph/hook.mjs.map +1 -0
- package/dist/index.cjs +6436 -3012
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +185 -1
- package/dist/index.d.ts +185 -1
- package/dist/index.mjs +6620 -3197
- package/dist/index.mjs.map +1 -1
- package/dist/process-C21nTvkT.d.cts +12 -0
- package/dist/process-C21nTvkT.d.ts +12 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: common-design-md
|
|
3
3
|
owner: common
|
|
4
|
-
purpose: "Author
|
|
4
|
+
purpose: "Author a missing root DESIGN.md or repair its authorized part from the recorded design direction, validate it, and check it again before anything is built from it."
|
|
5
5
|
requires: []
|
|
6
6
|
roles: [product-experience-architect]
|
|
7
7
|
routing-profile: default
|
|
@@ -17,8 +17,8 @@ checks every literal of every iteration against them.
|
|
|
17
17
|
|
|
18
18
|
Only to a flow on a visual prototyping surface: its classified surface set —
|
|
19
19
|
`primary_surface` and every `secondary_surfaces` entry — names `web`, `mobile`,
|
|
20
|
-
`desktop` or `mixed`. A cli-only target
|
|
21
|
-
for it.
|
|
20
|
+
`desktop` or `mixed`. A cli-only target writes no root `DESIGN.md` and leaves
|
|
21
|
+
any existing file unchanged; skip this step for it.
|
|
22
22
|
|
|
23
23
|
## Reads
|
|
24
24
|
|
|
@@ -41,18 +41,30 @@ for it.
|
|
|
41
41
|
|
|
42
42
|
## Author and validate
|
|
43
43
|
|
|
44
|
-
1. **Stop on an unchosen brand.**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
1. **Stop on an unchosen brand.** For initial authoring
|
|
45
|
+
of a missing file, a pack that records no design direction leaves the brand
|
|
46
|
+
unchosen. Brand intent is `hard-required`: ask for it, and under `--auto`
|
|
47
|
+
stop and name it. Never adopt the sample design. For an existing valid file,
|
|
48
|
+
validation and authorized repairs that preserve its brand and tokens
|
|
49
|
+
require no new brand selection. A brand or token change needs the
|
|
50
|
+
authorization and source values in step 2.
|
|
51
|
+
2. **Bound an existing-file repair.** Write a missing file from the recorded
|
|
52
|
+
direction. For an existing file, SDD triage must name its exact path and the
|
|
53
|
+
requested change, and a new WIP change request must authorize both. Apply
|
|
54
|
+
only the authorized change; preserve existing brand and tokens unless their
|
|
55
|
+
change is authorized and supported by recorded direction or named theme
|
|
56
|
+
values. Stop without writing unsupported values. Without that authorization,
|
|
57
|
+
validate the existing file without an overwrite; an inherited DONE row
|
|
58
|
+
authorizes no new change. An unreplaced sample is refused.
|
|
59
|
+
3. **Author a missing file or the authorized fields of an existing file**,
|
|
60
|
+
following
|
|
51
61
|
`.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md#output-mapping`:
|
|
52
62
|
the intent fields first, then the archetype, then `brand.theme`, then the
|
|
53
63
|
`visual.*` tokens taken from the named theme's published values
|
|
54
64
|
(`.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md#taking-the-values-from-the-theme`).
|
|
55
|
-
Do not compose token values by taste.
|
|
65
|
+
Do not compose token values by taste. For a repair, record the source of each
|
|
66
|
+
changed value and leave unrelated content unchanged. Validation without an
|
|
67
|
+
authorized change writes nothing and does not repeat brand selection.
|
|
56
68
|
4. **Parse and validate.** `parseDesignMd(text)` must succeed; pass its `data`
|
|
57
69
|
to `validateDesignMd` and halt on any issue. Both are exported from the
|
|
58
70
|
`qfai` package entry.
|
|
@@ -61,7 +73,8 @@ for it.
|
|
|
61
73
|
`.qfai/assistant/skill/qfai-sdd/references/design-anti-patterns.md` and its
|
|
62
74
|
Displacement section. A token that prescribes a listed pattern fails unless
|
|
63
75
|
`01_Context.md#Design Direction` asks for it. Name the pattern in the
|
|
64
|
-
finding
|
|
76
|
+
finding. For an existing-file repair, stop unless the authorized change
|
|
77
|
+
includes its replacement. Replace the value and check the file again.
|
|
65
78
|
|
|
66
79
|
## Check before building
|
|
67
80
|
|
|
@@ -77,7 +90,8 @@ Before anything is generated from `DESIGN.md`:
|
|
|
77
90
|
3. On any of these, stop and fix `DESIGN.md` through § Author and validate.
|
|
78
91
|
|
|
79
92
|
Once a prototyping loop has started, `DESIGN.md` is read-only for it. To change
|
|
80
|
-
it,
|
|
93
|
+
it, return to SDD for a triaged and authorized repair; the next iteration is
|
|
94
|
+
built from the validated result.
|
|
81
95
|
|
|
82
96
|
## Passes when
|
|
83
97
|
|
|
@@ -89,13 +103,16 @@ for. The pass names the surface set and the validation result.
|
|
|
89
103
|
|
|
90
104
|
## Writes
|
|
91
105
|
|
|
92
|
-
- Root `DESIGN.md`, only
|
|
106
|
+
- Root `DESIGN.md`, when missing or only within an authorized existing-file
|
|
107
|
+
change.
|
|
93
108
|
- In the stage report: the source of each brand field and the validation
|
|
94
|
-
result.
|
|
109
|
+
result; for a repair, the authorization and source of each changed value.
|
|
95
110
|
|
|
96
111
|
## Gate
|
|
97
112
|
|
|
98
113
|
`DESIGN.md` parses and validates with no issue, no value was written that
|
|
99
114
|
the recorded direction or the named theme does not supply, and no token
|
|
100
115
|
prescribes a pattern from `design-anti-patterns.md` that the recorded direction
|
|
101
|
-
does not ask for.
|
|
116
|
+
does not ask for. An existing-file repair changes only its authorized part
|
|
117
|
+
and preserves unrelated content. A reviewer fails the gate by naming the pattern.
|
|
118
|
+
An unauthorized change also fails the gate.
|
|
@@ -35,7 +35,9 @@ Neither is restated here.
|
|
|
35
35
|
|
|
36
36
|
1. **Determine applicable gates before resolving commands.** Use the calling
|
|
37
37
|
stage's scope and the project's declared scope. Do not narrow the gate set
|
|
38
|
-
from the diff alone
|
|
38
|
+
from the diff alone: a gate that looks unrelated to the change, such as a
|
|
39
|
+
test gate for a change to documents only, is still run and its result
|
|
40
|
+
recorded. Decide whether the conditional `Build` (if relevant)
|
|
39
41
|
and `Pack / distribution` (if distributed) gates apply from those scopes.
|
|
40
42
|
When a condition is false, omit its gate from `gates` and record the reason
|
|
41
43
|
in the stage report. A required gate with a missing command, launcher or
|
|
@@ -52,7 +54,8 @@ Neither is restated here.
|
|
|
52
54
|
An entry written `CI only: <check name>` instead of a command is not run
|
|
53
55
|
here: record the gate DELEGATED with that check name. Record its `ci` state
|
|
54
56
|
as `green`, `red` or `pending` from the pull request when one exists; with no
|
|
55
|
-
result yet, record `pending`.
|
|
57
|
+
result yet, record `pending`. Where the user's instruction for this run
|
|
58
|
+
delegates that gate to a named CI check, record it the same way, as `verify-repo-gate` says.
|
|
56
59
|
4. **Run it** on the tree the stage will hand to its reviewer, in the
|
|
57
60
|
environment the `Runtime` and `Platform` rows declare.
|
|
58
61
|
5. **Report** in the stage report: the exact
|
|
@@ -159,12 +162,12 @@ This human receipt changes no gate status or JSON field and adds no runner.
|
|
|
159
162
|
|
|
160
163
|
## Outcomes
|
|
161
164
|
|
|
162
|
-
| Outcome | Means
|
|
163
|
-
| ----------- |
|
|
164
|
-
| `PASS` | The command ran on the reviewed tree and exited 0 with zero errors
|
|
165
|
-
| `FAIL` | The command ran and reported an error or a non-zero exit
|
|
166
|
-
| `UNRUN` | No command, no launcher, or no environment to run it in
|
|
167
|
-
| `DELEGATED` | The project runs the gate in CI only, by the check its entry names |
|
|
165
|
+
| Outcome | Means |
|
|
166
|
+
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
167
|
+
| `PASS` | The command ran on the reviewed tree and exited 0 with zero errors |
|
|
168
|
+
| `FAIL` | The command ran and reported an error or a non-zero exit |
|
|
169
|
+
| `UNRUN` | No command, no launcher, or no environment to run it in |
|
|
170
|
+
| `DELEGATED` | The project runs the gate in CI only, by the check its entry names, or the user's instruction for this run delegates that gate to a named CI check |
|
|
168
171
|
|
|
169
172
|
Only `PASS` satisfies a gate here. A `DELEGATED` gate is satisfied by its CI
|
|
170
173
|
check, which runs on the pull request: it is not a pass, and it is not a
|
|
@@ -188,3 +191,29 @@ not read from a stale one.
|
|
|
188
191
|
The comparison is between the failing tests or findings, not the exit code.
|
|
189
192
|
The result stays `FAIL`; a baseline of `same` explains it and never turns it
|
|
190
193
|
into a pass. The run did not cause it, so it is reported and not repaired.
|
|
194
|
+
|
|
195
|
+
### A suite whose result depends on timing or load
|
|
196
|
+
|
|
197
|
+
A browser suite or another timing-dependent suite can fail differently from run
|
|
198
|
+
to run, so one base run made under other conditions is not a fair comparison.
|
|
199
|
+
|
|
200
|
+
- Run the gate on the base commit under the conditions of the run it is
|
|
201
|
+
compared with, and record the parallelism and the load of both runs in the
|
|
202
|
+
stage report. A comparison whose conditions are not recorded is not made.
|
|
203
|
+
- Count a chain of failures once. A failure is folded into a chain only when
|
|
204
|
+
it follows an earlier failure of the same file and reads as a consequence of
|
|
205
|
+
it, such as a closed browser or a timeout. Match a failure with the base by
|
|
206
|
+
test identity, and a folded chain by its file.
|
|
207
|
+
- Run alone the files that hold a failure the base run did not show. A failure
|
|
208
|
+
that passes alone but fails in the suite on the changed branch, and not on the
|
|
209
|
+
base under the same conditions, is reported as a possible order or
|
|
210
|
+
shared-state effect of the change, with a suspected cause, as
|
|
211
|
+
`.qfai/assistant/rule/references/gate-failure-autorepair.md#nondeterministic-gates`
|
|
212
|
+
says. It is left out of the comparison only after a full-suite rerun of the
|
|
213
|
+
changed branch under the same conditions that does not show it. Record every
|
|
214
|
+
run in order.
|
|
215
|
+
- The baseline is still `same`, `different` or `unrun`, and the result is still
|
|
216
|
+
`FAIL`. A failure left out is not in the base set, so the `reason` of the gate
|
|
217
|
+
and the final report list each one with its result run alone and in the
|
|
218
|
+
full-suite rerun, and the user who decides whether to commit sees that list.
|
|
219
|
+
No other state or field is recorded.
|
|
@@ -44,8 +44,9 @@ Each decision record carries the four labelled Approach items stated at the top
|
|
|
44
44
|
|
|
45
45
|
## One session
|
|
46
46
|
|
|
47
|
-
The stage holds one session per run
|
|
48
|
-
`## Grilling Session`, and is written before
|
|
47
|
+
The stage holds one session per run, except a reopened node, below. The row
|
|
48
|
+
goes in the stage report, under `## Grilling Session`, and is written before
|
|
49
|
+
the first authored file:
|
|
49
50
|
|
|
50
51
|
```text
|
|
51
52
|
| Ended | Ended at | Authoring began | Frontier | Lookups | Decisions | Escalated |
|
|
@@ -53,5 +54,25 @@ The stage holds one session per run. The row goes in the stage report, under
|
|
|
53
54
|
| confirmed | <ISO8601> | <ISO8601> | empty | none in flight | <n> | <n> |
|
|
54
55
|
```
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
The authoring endings are `confirmed`, `user-closed`, `no-question`, and
|
|
58
|
+
conditionally `adopted`. For `adopted`, verify
|
|
59
|
+
`.agents/rules/grilling.md#explicit-delegation-for-a-discussion`: actual user
|
|
60
|
+
delegation with source, scope and authority; actual griller-to-author rounds
|
|
61
|
+
with reasons and dissent; no open node or running lookup; all consumed required
|
|
62
|
+
inputs present; and actual human authority for every reserved decision.
|
|
63
|
+
Record these in the stage evidence, not as a fictional human option answer.
|
|
64
|
+
`Ended at` and `Authoring began` are actual timestamps, with authoring later.
|
|
65
|
+
A missing hard-required consumed input authorizes no authoring ending.
|
|
66
|
+
Allowing authoring is not a completion or validation receipt.
|
|
67
|
+
|
|
68
|
+
## A reopened node
|
|
69
|
+
|
|
70
|
+
A critical decision found while authoring reopens the session for that node
|
|
71
|
+
only, for one round to the user. Append one row for that round under the same
|
|
72
|
+
header, with its own `Ended`, `Ended at` and `Authoring began`, before authoring
|
|
73
|
+
resumes. The earlier rows stay as written. A stopped round is reported, not written.
|
|
74
|
+
|
|
75
|
+
The round runs until no node it opened is left open, or until what is still
|
|
76
|
+
open is recorded as labelled assumptions or `11_OQ-Register.md` entries. Under
|
|
77
|
+
a no-question mode the row's `Ended` is `no-question`, and the decision is
|
|
78
|
+
registered in `11_OQ-Register.md`.
|
|
@@ -12,6 +12,7 @@ Design, tests and code fit a project only when its facts are current. The
|
|
|
12
12
|
contract this step serves is
|
|
13
13
|
`.qfai/assistant/rule/workflow.md#policy-check-mandatory`:
|
|
14
14
|
it runs once per run, at the start, and no affected work continues on stale policy.
|
|
15
|
+
The ultra-light routes `answer-in-session` and `run-operation` do not run it.
|
|
15
16
|
|
|
16
17
|
## Reads
|
|
17
18
|
|
|
@@ -22,12 +22,44 @@ them; it is the procedure that applies them.
|
|
|
22
22
|
|
|
23
23
|
## Reads
|
|
24
24
|
|
|
25
|
-
- **The reviewer set.** In a route,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
- **The reviewer set.** In a route, each review takes exactly these reviewers,
|
|
26
|
+
each once in that review, with no threshold to judge:
|
|
27
|
+
- one reviewer for its kind: `requirements-reviewer` for the specification
|
|
28
|
+
review, `implementation-reviewer` for the code review of the whole diff;
|
|
29
|
+
- `architecture-reviewer` too, only when the target holds a contract change
|
|
30
|
+
no earlier review of the route read;
|
|
31
|
+
- `product-surface-reviewer` too, only when the target holds a screen change
|
|
32
|
+
no earlier review of the route read: an edit to a UI contract's screen, or
|
|
33
|
+
to the code, tests or styles that render one, or to a path `uiux.surfacePaths`
|
|
34
|
+
declares. An uncertain case counts as a screen change
|
|
35
|
+
(`.qfai/assistant/skill/qfai-implement/references/ui-affecting.md#routing`);
|
|
36
|
+
- no other reviewer. A stage the plan marks with no review gets none.
|
|
37
|
+
|
|
38
|
+
A review whose target's only edits resolve the conflicts of a merge or a
|
|
39
|
+
branch update between sides that were each already reviewed gets no
|
|
40
|
+
reviewer. A side is reviewed when it is on the default branch or a review of
|
|
41
|
+
this route or its pull request covered its commits. A resolution that adds
|
|
42
|
+
content neither side had is not conflict-only. The stage report names the
|
|
43
|
+
merge and why no reviewer ran. In the `resolve-conflicts` route, a
|
|
44
|
+
resolution that touches a story-tree file, a contract, or `decisions.md` or
|
|
45
|
+
`open-questions.md` is not exempt: it gets the code review, and
|
|
46
|
+
`architecture-reviewer` too for a contract. A parent skill invoked by name
|
|
47
|
+
uses the reviewers its own `## Review` section names, such as `qfai-discussion`'s.
|
|
48
|
+
|
|
49
|
+
In a route, a code review whose target replaces at most five lines, a
|
|
50
|
+
replaced line counting once, and no line added or removed, each changing
|
|
51
|
+
only a literal value such as a version, a number, a name or a flag in a
|
|
52
|
+
configuration or build file, gets no reviewer. A change to code, tests, a
|
|
53
|
+
story-tree or contract file, a screen or a file's structure is not
|
|
54
|
+
literal-only, and neither is a change that touches permissions, secrets,
|
|
55
|
+
credentials or tokens; a URL, host, registry, image or action reference; a
|
|
56
|
+
dependency or tool version resolved from the network; a workflow trigger; a
|
|
57
|
+
setting that turns a check, lint rule, type check, gate or test on or off;
|
|
58
|
+
any text inside a shell command, script or recipe; or a package's own
|
|
59
|
+
version, or any value a release, tag or publish job reads. The stage report
|
|
60
|
+
and the final report both name the skip, the changed lines and why no
|
|
61
|
+
reviewer ran.
|
|
62
|
+
|
|
31
63
|
- **The review target.** The specification review: every path and ID the
|
|
32
64
|
stage it follows wrote or changed, and the source it was written from. The
|
|
33
65
|
code review: the route's whole diff against the revision the route started
|
|
@@ -43,17 +75,30 @@ them; it is the procedure that applies them.
|
|
|
43
75
|
focus. Put the answers an earlier stage recorded on the same artifact into
|
|
44
76
|
this review's request before dispatching reviewers, under
|
|
45
77
|
`.qfai/assistant/rule/review-convergence.md#answered-demands-must`.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
78
|
+
For the code review, name each test the run recorded `red: ci-deferred`:
|
|
79
|
+
the reviewer reads it against the code before the fix and confirms that
|
|
80
|
+
its assertion fails there
|
|
81
|
+
(`.qfai/assistant/skill/qfai-implement/references/red-admissibility.md#ci-only-test-gate`).
|
|
82
|
+
2. **Dispatch.** The orchestrator sends each reviewer a work order in the
|
|
83
|
+
shared template, never a stage worker. An agent that authored, edited or
|
|
84
|
+
recommended a decision in the reviewed artifact is not its independent
|
|
85
|
+
reviewer. The session report names its authors, editors and decision
|
|
86
|
+
recommenders, and the independent reviewers.
|
|
50
87
|
Each reviewer returns a verdict, `PASS` or `REVISE`, and its
|
|
51
88
|
findings, in the shared reviewer response template.
|
|
52
89
|
3. **Address every finding** once: fix it in its owning source with the
|
|
53
90
|
smallest edit that resolves it, or record a reasoned answer beside it, and
|
|
54
91
|
rerun the tests a fix touches. An upstream finding is not repaired here:
|
|
55
|
-
stop under `.qfai/assistant/rule/drift-protocol.md`.
|
|
56
|
-
4. **
|
|
92
|
+
stop under `.qfai/assistant/rule/drift-protocol.md`.
|
|
93
|
+
4. **Re-review a behaviour fix** once. A fix that changes behaviour (code, a
|
|
94
|
+
test's assertions or a contract statement, not wording alone) goes back to
|
|
95
|
+
the reviewer whose finding it fixed: each reviewer whose findings had a
|
|
96
|
+
behaviour fix re-reviews the combined diff of those fixes, once, and reads
|
|
97
|
+
nothing else. Fix or answer each finding of that re-review as step 3 says, with no further
|
|
98
|
+
re-review. A fix that changes wording only gets no re-review. No other
|
|
99
|
+
reviewer is rerun.
|
|
100
|
+
5. **Complete** once every reviewer has responded, each behaviour fix has had
|
|
101
|
+
its one re-review, and every finding is fixed or
|
|
57
102
|
answered. A finding the author cannot fix goes in the stage's final report;
|
|
58
103
|
a critical decision goes to the user
|
|
59
104
|
(`.qfai/assistant/rule/review-convergence.md#one-review`).
|
|
@@ -61,11 +106,19 @@ them; it is the procedure that applies them.
|
|
|
61
106
|
## Writes
|
|
62
107
|
|
|
63
108
|
- In the stage report: each reviewer's verdict, the findings, and how each was
|
|
64
|
-
fixed or answered
|
|
109
|
+
fixed or answered, and for each behaviour fix its re-review's verdict and
|
|
110
|
+
findings.
|
|
111
|
+
- For a code review skipped as a small literal-only change: the skip, the
|
|
112
|
+
changed lines and why no reviewer ran, in the stage report and in the final
|
|
113
|
+
report.
|
|
65
114
|
|
|
66
115
|
## Gate
|
|
67
116
|
|
|
68
|
-
Every routed reviewer responded once,
|
|
69
|
-
|
|
117
|
+
Every routed reviewer responded once, each behaviour fix had its one focused
|
|
118
|
+
re-review, every finding is fixed or answered, and
|
|
119
|
+
the stage report names each verdict and each answer, or says why the review
|
|
120
|
+
dispatched no reviewer. For a code review skipped as a small literal-only
|
|
121
|
+
change, the stage report names the skip, the changed lines and why, and records
|
|
122
|
+
the skip for the final report. A finding the author
|
|
70
123
|
cannot fix is in the stage's final report, and a critical decision has gone to
|
|
71
124
|
the user.
|
|
@@ -10,8 +10,10 @@ routing-profile: default
|
|
|
10
10
|
# discussion-interview
|
|
11
11
|
|
|
12
12
|
The core interview for concept, scope, stakeholders and constraints. It is a
|
|
13
|
-
user session:
|
|
14
|
-
|
|
13
|
+
user session by default: every decision is put to the user. The only delegated
|
|
14
|
+
exception is `.agents/rules/grilling.md#explicit-delegation-for-a-discussion`,
|
|
15
|
+
with actual user authority recorded before agent-to-agent rounds.
|
|
16
|
+
An interview with no method is the agent deciding and reporting.
|
|
15
17
|
|
|
16
18
|
## Reads
|
|
17
19
|
|
|
@@ -48,7 +50,9 @@ is in place.
|
|
|
48
50
|
a `visual.*` token tree for one. The design direction belongs in this session
|
|
49
51
|
because `discussion-pack` records it after the pack is authored, and a
|
|
50
52
|
user-owned visual choice asked there is asked after the thing it governs is
|
|
51
|
-
written.
|
|
53
|
+
written. Skip the design-DNA questions when the classification declares
|
|
54
|
+
`design_direction: inherit`, under the conditions of
|
|
55
|
+
`.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md#inheriting-the-current-designmd`.
|
|
52
56
|
4. The research findings are inputs to the session's tree, not a later fill-in:
|
|
53
57
|
a decision settled before the research that bears on it is settled against
|
|
54
58
|
evidence nobody had, and the method reads a fact rather than asking about it.
|
|
@@ -78,13 +82,14 @@ Where each outcome is recorded is
|
|
|
78
82
|
|
|
79
83
|
## How the session ends
|
|
80
84
|
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
The default user session reaches four of the five endings. An explicitly
|
|
86
|
+
delegated discussion may also end `adopted` under the master's conditions:
|
|
83
87
|
|
|
84
88
|
| Ended | What the user did | Authoring |
|
|
85
89
|
| ------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
86
90
|
| `confirmed` | Confirmed on the session's own condition: no node open — the frontier empty **and** no fact lookup still running | Starts |
|
|
87
91
|
| `user-closed` | Said `proceed`, `done`, or words to that effect | Starts. Lookups already running are finished and each decision still open becomes a labelled assumption, except one a document requires the user to make and record |
|
|
92
|
+
| `adopted` | Explicitly delegated judgment for this scope | Starts only after the recorded delegation conditions are met; no open node, lookup or unsupported human decision remains |
|
|
88
93
|
| `no-question` | Nothing — `--auto` reached nobody | Starts. Every node still open is registered — a decision, and a fact only the user holds, which nothing else can supply, and the open count is then what blocks completion |
|
|
89
94
|
| `stopped` | Said `stop` | **Does not start.** Report every open decision as open and end the run |
|
|
90
95
|
|
|
@@ -101,11 +106,14 @@ still there, so a decision they own is put again rather than assumed. The
|
|
|
101
106
|
run consumes, and this is a decision the run is not permitted to take. The
|
|
102
107
|
visual direction is the case here —
|
|
103
108
|
`.qfai/assistant/skill/qfai-discussion/references/design-dna-intake.md` says
|
|
104
|
-
only the user may choose a theme
|
|
109
|
+
only the user may choose a theme by default. Only an actual specifically
|
|
110
|
+
applicable user instruction can override that request under the master's
|
|
111
|
+
authority conditions; the agents' choice is never labelled `chosen_by: user`.
|
|
112
|
+
The rule states the same bound from its side:
|
|
105
113
|
closing the questions waives the agent's own uncertainty, never an
|
|
106
114
|
authorization the user has not given.
|
|
107
115
|
|
|
108
|
-
**`--auto` is the other case
|
|
116
|
+
**`--auto` without qualifying explicit delegation is the other case.** Nobody is
|
|
109
117
|
there to put the question to, so the documented path holds: take the most
|
|
110
118
|
conventional candidate, record it `chosen_by: assumption`, open it in
|
|
111
119
|
`11_OQ-Register.md`, and author — the open count is what blocks completion.
|
|
@@ -128,6 +136,11 @@ off that row. Without it a skipped session and a completed one present the same
|
|
|
128
136
|
pack — nine files, every topic covered, every open question registered — so
|
|
129
137
|
the reviewer would have to block every run or accept a claim it cannot check.
|
|
130
138
|
|
|
139
|
+
The agent that holds the session writes the row, `Ended at` included. Where
|
|
140
|
+
another agent authors the pack, write the row before delegating, and pass the
|
|
141
|
+
row to the pack author, who copies it unchanged into the stage report it
|
|
142
|
+
writes and does not reconstruct it.
|
|
143
|
+
|
|
131
144
|
A `stopped` session writes no row: the ending is reported, and no later step
|
|
132
145
|
runs.
|
|
133
146
|
|
|
@@ -135,9 +148,11 @@ runs.
|
|
|
135
148
|
|
|
136
149
|
The reviewer confirms:
|
|
137
150
|
|
|
138
|
-
- the stage report's `## Grilling Session`
|
|
139
|
-
|
|
140
|
-
`
|
|
151
|
+
- every row of the stage report's `## Grilling Session` table has its
|
|
152
|
+
`Ended at` before its own `Authoring began` (for a reopened row, when
|
|
153
|
+
authoring resumed), with `Ended` one of `confirmed`, `user-closed`,
|
|
154
|
+
`no-question`, or `adopted` with the recorded explicit-delegation conditions
|
|
155
|
+
verified;
|
|
141
156
|
- every decision the session settled is recorded where
|
|
142
157
|
`.qfai/assistant/skill/qfai-discussion/references/oq-and-deferred-rules.md`
|
|
143
158
|
says;
|
|
@@ -16,9 +16,25 @@ discussion from completing, so a decision nobody took cannot close the pack.
|
|
|
16
16
|
|
|
17
17
|
The same as `discussion-pack`: this run's stage report holds the
|
|
18
18
|
`## Grilling Session` row, its `Ended at` is written, and `Ended` is
|
|
19
|
-
`confirmed`, `user-closed
|
|
19
|
+
`confirmed`, `user-closed`, `no-question`, or `adopted` meeting
|
|
20
|
+
`.agents/rules/grilling.md#explicit-delegation-for-a-discussion`.
|
|
21
|
+
Check the actual delegation and rounds, required inputs, empty tree and
|
|
22
|
+
human authority in the stage evidence; the ending label alone is insufficient.
|
|
23
|
+
Without that row, or with
|
|
20
24
|
`Ended: stopped`, write nothing and stop.
|
|
21
25
|
|
|
26
|
+
## A critical decision found while authoring
|
|
27
|
+
|
|
28
|
+
A decision found while registering that is critical under
|
|
29
|
+
`.agents/rules/grilling.md#critical-decisions` reopens the session for that
|
|
30
|
+
node only. Stop writing, ask the user one round on that node, record the round
|
|
31
|
+
as `.qfai/assistant/step/common-grilling-record/STEP.md#a-reopened-node` says,
|
|
32
|
+
then resume. The rest of the session's record stays as it is.
|
|
33
|
+
Recording the decision as an assumption is allowed only under a no-question
|
|
34
|
+
mode, labelled beside its open question.
|
|
35
|
+
A stop in that round ends the run as `stopped` does: no row is written,
|
|
36
|
+
writing stops, and the report names the pack files already written and the open node.
|
|
37
|
+
|
|
22
38
|
## Reads
|
|
23
39
|
|
|
24
40
|
- `.qfai/assistant/skill/qfai-discussion/references/oq-and-deferred-rules.md`
|
|
@@ -16,11 +16,27 @@ conversational summaries, are the handoff.
|
|
|
16
16
|
|
|
17
17
|
**Authoring the pack** does not start until the session has ended. This run's
|
|
18
18
|
stage report holds the `## Grilling Session` row, its `Ended at` is written,
|
|
19
|
-
and `Ended` is `confirmed`, `user-closed
|
|
19
|
+
and `Ended` is `confirmed`, `user-closed`, `no-question`, or `adopted` meeting
|
|
20
|
+
`.agents/rules/grilling.md#explicit-delegation-for-a-discussion`.
|
|
21
|
+
Check the actual delegation and rounds, required inputs, empty tree and
|
|
22
|
+
human authority in the stage evidence; the ending label alone is insufficient.
|
|
23
|
+
Without that row,
|
|
20
24
|
or with `Ended: stopped`, write no pack file and stop. A pack drafted
|
|
21
25
|
mid-session records a design that was still being decided, and the draft is
|
|
22
26
|
what the rest of the run then defends.
|
|
23
27
|
|
|
28
|
+
## A critical decision found while authoring
|
|
29
|
+
|
|
30
|
+
A decision found while authoring that is critical under
|
|
31
|
+
`.agents/rules/grilling.md#critical-decisions` reopens the session for that
|
|
32
|
+
node only. Stop writing the pack, ask the user one round on that node, record
|
|
33
|
+
the round as `.qfai/assistant/step/common-grilling-record/STEP.md#a-reopened-node`
|
|
34
|
+
says, then resume. The rest of the session's record stays as it is.
|
|
35
|
+
Recording the decision as an assumption is allowed only under a no-question
|
|
36
|
+
mode, labelled beside its open question.
|
|
37
|
+
A stop in that round ends the run as `stopped` does: no row is written,
|
|
38
|
+
writing stops, and the report names the pack files already written and the open node.
|
|
39
|
+
|
|
24
40
|
## Passes when
|
|
25
41
|
|
|
26
42
|
Read first: the pack under work and the interview's answers. The step passes
|
|
@@ -75,7 +91,10 @@ and the `uiux/` sidecars. Root DESIGN.md is not a discussion output.
|
|
|
75
91
|
choice is made in the session, not here; this step writes it down. Required
|
|
76
92
|
when any classified surface — primary or secondary — is `web`, `mobile`,
|
|
77
93
|
`desktop` or `mixed`; skip for cli-only and non-ui targets. The answers, not
|
|
78
|
-
a rendered brand file, are the handoff.
|
|
94
|
+
a rendered brand file, are the handoff. A pack whose classification declares
|
|
95
|
+
`design_direction: inherit` records no direction and skips the registries
|
|
96
|
+
and the 40/50 sidecars, under the conditions of
|
|
97
|
+
`.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md#inheriting-the-current-designmd`.
|
|
79
98
|
8. Generate `prototyping.yaml` only for a visual prototyping surface; a cli-only pack emits none.
|
|
80
99
|
Write it where the pack targets `web`, `mobile`, `desktop` or `mixed` and an
|
|
81
100
|
explicit prototyping recommendation is useful. `/qfai-prototyping` rejects
|
|
@@ -104,7 +123,8 @@ Decide whether the target is UI-bearing with
|
|
|
104
123
|
`/qfai-sdd`'s `common-design-md` step turns into root `DESIGN.md` front matter and
|
|
105
124
|
its `# Brand Philosophy` body, so an entry left blank leaves a brand field
|
|
106
125
|
with nothing behind it. A registry `reference` resolves to a URL, repository
|
|
107
|
-
path, or `SRC-ID`.
|
|
126
|
+
path, or `SRC-ID`. A pack declaring `design_direction: inherit` owes neither
|
|
127
|
+
registry nor the Trend Scan (see step 7).
|
|
108
128
|
|
|
109
129
|
Discussion is planner-first: carry the screen explorations unranked and do not
|
|
110
130
|
finalize the design system here. The brand direction is the exception — which
|
|
@@ -16,7 +16,11 @@ read, without forcing an early visual direction.
|
|
|
16
16
|
|
|
17
17
|
The same as `discussion-pack`: this run's stage report holds the
|
|
18
18
|
`## Grilling Session` row, its `Ended at` is written, and `Ended` is
|
|
19
|
-
`confirmed`, `user-closed
|
|
19
|
+
`confirmed`, `user-closed`, `no-question`, or `adopted` meeting
|
|
20
|
+
`.agents/rules/grilling.md#explicit-delegation-for-a-discussion`.
|
|
21
|
+
Check the actual delegation and rounds, required inputs, empty tree and
|
|
22
|
+
human authority in the stage evidence; the ending label alone is insufficient.
|
|
23
|
+
Without that row, or with
|
|
20
24
|
`Ended: stopped`, write nothing and stop.
|
|
21
25
|
|
|
22
26
|
## Reads
|
|
@@ -48,6 +52,10 @@ including `cli`:
|
|
|
48
52
|
- `uiux/40_screen_contracts.md`
|
|
49
53
|
- `uiux/50_review_input_bundle.md`
|
|
50
54
|
|
|
55
|
+
A pack whose classification declares `design_direction: inherit` may leave out
|
|
56
|
+
the last two, and writes no Trend Scan or competitor references; the playbook
|
|
57
|
+
above says when the declaration is allowed.
|
|
58
|
+
|
|
51
59
|
## Procedure
|
|
52
60
|
|
|
53
61
|
1. Write `40_screen_contracts.md` with every screen contract in the template's
|
|
@@ -24,6 +24,9 @@ step writes the assertions those bodies owe.
|
|
|
24
24
|
contracts, under `paths.contractsDir`.
|
|
25
25
|
- The worker session setup `implement-credentials` wrote, when a test needs an
|
|
26
26
|
authenticated actor.
|
|
27
|
+
- When a test depends on business time, shares a database or server with
|
|
28
|
+
other workers, or feeds a required CI check:
|
|
29
|
+
`.qfai/assistant/skill/qfai-implement/references/test-runner-recipes.md`.
|
|
27
30
|
|
|
28
31
|
## Writes
|
|
29
32
|
|
|
@@ -31,6 +31,10 @@ in scope needs an authenticated actor.
|
|
|
31
31
|
Follow `.qfai/assistant/skill/qfai-implement/references/credential-reuse.md`.
|
|
32
32
|
It holds the seven session-reuse rules, the rule for a caller-injected
|
|
33
33
|
environment and a worked example. Keep actors and sessions isolated by worker.
|
|
34
|
+
For a Playwright or Vitest suite, the optional recipes in
|
|
35
|
+
`.qfai/assistant/skill/qfai-implement/references/test-runner-recipes.md` put
|
|
36
|
+
the rules into code, with the business data, shared-state, credential
|
|
37
|
+
directory and CI aggregate patterns around them.
|
|
34
38
|
|
|
35
39
|
## Passes when
|
|
36
40
|
|
|
@@ -45,15 +45,45 @@ into the repository, so steps 5 and 6 are replaced by the upgrade procedure in
|
|
|
45
45
|
the section "Keeping QFAI itself up to date" of `node_modules/qfai/README.md`:
|
|
46
46
|
`init --force`, the retired files the release notes list, then `doctor` and
|
|
47
47
|
`validate`. `init --force` replaces the skills and steps in use, so read the
|
|
48
|
-
next step from disk after it runs.
|
|
48
|
+
next step from disk after it runs. What `doctor` and `validate` report is part
|
|
49
|
+
of the update: this step writes a new required key in `qfai.config.yaml`, and a
|
|
50
|
+
finding that names a spec contract moves the work as the next section says.
|
|
51
|
+
|
|
52
|
+
## When a finding names a contract
|
|
53
|
+
|
|
54
|
+
When `validate`, or another check the update runs, reports a finding that
|
|
55
|
+
names a spec contract to change, leave the contract unchanged. Finish every
|
|
56
|
+
other part of the update first, so the contract finding is the only open item.
|
|
57
|
+
Then get the change approved as `.qfai/assistant/rule/drift-protocol.md`
|
|
58
|
+
describes:
|
|
59
|
+
|
|
60
|
+
1. Put the finding, the contract it names and the fix it states to the
|
|
61
|
+
operator as a critical decision: return `awaiting_input` and change nothing
|
|
62
|
+
more. The attempt holding the answer carries on.
|
|
63
|
+
2. On approval, append one `Change request:` row to `decisions.md` under
|
|
64
|
+
`paths.specsDir`. Its Content names the contract's path, and its Approach
|
|
65
|
+
records the finding, the fix, who approved it and when. The row starts at
|
|
66
|
+
WIP.
|
|
67
|
+
3. Report `branch: { outcome: contract-finding }` citing that row's DEC ID.
|
|
68
|
+
The work moves to `apply-settled`, whose `spec` stage edits the contract
|
|
69
|
+
under its change request. Its settled triage applies the cited row.
|
|
70
|
+
|
|
71
|
+
On a decline, append the row at REJECTED, leave the contract as it is and
|
|
72
|
+
report the finding as unresolved, with no branch. When the operator cannot be
|
|
73
|
+
asked, write no row and report the change as the decision still needed.
|
|
49
74
|
|
|
50
75
|
## What it writes
|
|
51
76
|
|
|
52
77
|
- The actual changed paths for the manifest, lockfile and any adapted call,
|
|
53
|
-
listed in the stage report.
|
|
78
|
+
listed in the stage report. When the dependency is `qfai` itself, they also
|
|
79
|
+
include a new key in `qfai.config.yaml`.
|
|
80
|
+
- On a contract finding the operator answered, the change request row in
|
|
81
|
+
`decisions.md`, and its DEC ID in the stage report.
|
|
54
82
|
- A record of the versions, the breaking changes read and how each was met, in the stage report.
|
|
55
83
|
|
|
56
84
|
## Gate
|
|
57
85
|
|
|
58
86
|
The step is done when the target version is installed, the runtime check and
|
|
59
|
-
every breaking change are recorded as met, and the relevant suite passes
|
|
87
|
+
every breaking change are recorded as met, and the relevant suite passes, or
|
|
88
|
+
when every other part of the update is met and recorded and the only finding
|
|
89
|
+
left is the contract one, which it reports as `contract-finding`.
|
|
@@ -71,8 +71,15 @@ test that should have caught it, before any production code changes:
|
|
|
71
71
|
`implement-tdd`, which appends the EX and annotates the test.
|
|
72
72
|
2. Run that test alone and observe its assertion fail for the reported
|
|
73
73
|
behaviour (Red). A load error, a missing dependency or a broken fixture is
|
|
74
|
-
not a Red.
|
|
75
|
-
|
|
74
|
+
not a Red. Where the Test entry of the Standard commands is
|
|
75
|
+
`CI only: <check name>`, or the user's instruction for this run delegates
|
|
76
|
+
that gate to a named CI check, do not run it: record `red: ci-deferred`,
|
|
77
|
+
quoting that instruction, as
|
|
78
|
+
`.qfai/assistant/skill/qfai-implement/references/red-admissibility.md#ci-only-test-gate`
|
|
79
|
+
states, and the route's code review reads the test against the code
|
|
80
|
+
before the fix.
|
|
81
|
+
3. Record the test path, the command and the failure in the stage report. For
|
|
82
|
+
a `ci-deferred` Red, record the test path, its selector and the check name.
|
|
76
83
|
|
|
77
84
|
A verdict that moves the work to another route leaves no new test behind:
|
|
78
85
|
remove the test written here.
|
|
@@ -125,5 +132,7 @@ Inside a workflow run, the result carries:
|
|
|
125
132
|
|
|
126
133
|
The step is done when one verdict is recorded with the observation that
|
|
127
134
|
supports it, and no tracked file changed but the failing test. That
|
|
128
|
-
observation is the reproduction: on a `fix` route the test's observed Red,
|
|
135
|
+
observation is the reproduction: on a `fix` route the test's observed Red, or
|
|
136
|
+
its `ci-deferred` Red where the Test entry is `CI only: <check name>` or the
|
|
137
|
+
user's instruction for this run delegates that gate to a named CI check, and
|
|
129
138
|
for `needs-info` the attempts that could not reproduce it.
|