qfai 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -3
- package/assets/init/.claude/settings.json +35 -1
- package/assets/init/.codex/hooks.json +24 -0
- package/assets/init/.github/instructions/code-review.instructions.md +1 -1
- package/assets/init/.qfai/assistant/agent/architecture-reviewer.md +2 -2
- package/assets/init/.qfai/assistant/agent/fullstack-engineer.md +32 -4
- package/assets/init/.qfai/assistant/agent/implementation-reviewer.md +4 -4
- package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +7 -3
- package/assets/init/.qfai/assistant/agent/requirements-reviewer.md +2 -2
- package/assets/init/.qfai/assistant/rule/agent-selection.md +1 -1
- package/assets/init/.qfai/assistant/rule/communication.md +1 -1
- package/assets/init/.qfai/assistant/rule/constitution.md +77 -242
- package/assets/init/.qfai/assistant/rule/drift-protocol.md +30 -164
- package/assets/init/.qfai/assistant/rule/references/asset-authoring.md +3 -2
- package/assets/init/.qfai/assistant/rule/references/gate-failure-autorepair.md +2 -2
- package/assets/init/.qfai/assistant/rule/references/placeholder-scan.md +2 -3
- package/assets/init/.qfai/assistant/rule/references/reviewer-findings.md +3 -3
- package/assets/init/.qfai/assistant/rule/references/worker-edit-boundary.md +12 -3
- package/assets/init/.qfai/assistant/rule/review-convergence.md +6 -6
- package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +6 -6
- package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +17 -17
- package/assets/init/.qfai/assistant/rule/test-layers.md +1 -1
- package/assets/init/.qfai/assistant/rule/thinking.md +2 -2
- package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +5 -5
- package/assets/init/.qfai/assistant/rule/ui-procurement.md +1 -1
- package/assets/init/.qfai/assistant/rule/workflow.md +12 -12
- package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +12 -14
- package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +2 -4
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/03_Story-Workshop.md +1 -2
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/50_review_input_bundle.md +4 -3
- package/assets/init/.qfai/assistant/skill/qfai-grill/SKILL.md +1 -3
- package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +30 -43
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/confirmation-sheet.md +71 -0
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/delegated-session.md +18 -1
- package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +2 -4
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +3 -3
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +35 -2
- package/assets/init/.qfai/assistant/skill/qfai-maintain/SKILL.md +2 -4
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +0 -2
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-guide.md +2 -3
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +5 -6
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +75 -4
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/handoff.md +2 -1
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/iteration-loop.md +58 -3
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +11 -2
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +41 -10
- package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +7 -8
- package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +12 -7
- package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/SKILL.md +10 -12
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/concrete-abstract-cycle.md +25 -27
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +8 -10
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-anti-patterns.md +36 -3
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md +8 -9
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/requirements-decomposition.md +6 -6
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +6 -6
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-phase-checklists.md +5 -5
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-pre-draft-grilling.md +5 -5
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-quality-gate.md +3 -3
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md +115 -199
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +25 -25
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +23 -113
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-design-contract-normalization.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/ui-contract.sample.yaml +8 -7
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/03_contract/tech.md +1 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions/page-NNNN.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +59 -31
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/open-questions.md +15 -11
- package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +1 -3
- package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +2 -4
- package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +1 -1
- package/assets/init/.qfai/assistant/skill/web-research/SKILL.md +1 -3
- package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +9 -9
- package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +2 -2
- package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +3 -3
- package/assets/init/.qfai/assistant/step/common-policy-check/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +6 -4
- package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +7 -7
- package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +43 -0
- package/assets/init/.qfai/assistant/step/implement-acceptance/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +11 -13
- package/assets/init/.qfai/assistant/step/implement-procedure/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/implement-regression-fix/STEP.md +2 -2
- package/assets/init/.qfai/assistant/step/implement-scaffold/STEP.md +5 -5
- package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +7 -8
- package/assets/init/.qfai/assistant/step/maintain-edit/STEP.md +17 -17
- package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +89 -12
- package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +16 -15
- package/assets/init/.qfai/assistant/step/sdd-cycle/STEP.md +7 -8
- package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +25 -4
- package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +6 -6
- package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +66 -75
- package/assets/init/.qfai/assistant/step/triage-operate/STEP.md +29 -15
- package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +2 -4
- package/assets/init/.qfai/assistant/step/verify-context/STEP.md +1 -1
- package/assets/init/root/.agents/rules/ai-readable-markdown.md +8 -1
- package/assets/init/root/.agents/rules/delegation-steering.md +69 -0
- package/assets/init/root/.agents/rules/grilling.md +72 -43
- package/assets/init/root/.agents/rules/minimal-implementation.md +5 -5
- package/assets/init/root/.agents/rules/reply-forms.md +191 -0
- package/assets/init/root/.agents/rules/session-feedback.md +104 -27
- package/assets/init/root/.agents/rules/user-questions.md +6 -1
- package/assets/init/root/.gitattributes +5 -6
- package/assets/init/root/AGENTS.md +4 -2
- package/assets/mdschema/story/03_contract/tech.mdschema.yml +1 -1
- package/assets/mdschema/story/decisions/page-NNNN.mdschema.yml +3 -3
- package/assets/mdschema/story/decisions.mdschema.yml +4 -4
- package/assets/mdschema/story/open-questions.mdschema.yml +3 -3
- package/assets/schemas/workflow/extraction.schema.json +0 -2
- package/dist/cli/index.cjs +3749 -3029
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +3718 -3006
- package/dist/cli/index.mjs.map +1 -1
- package/dist/hook/turn-end.cjs +1022 -0
- package/dist/hook/turn-end.cjs.map +1 -0
- package/dist/hook/turn-end.d.cts +2 -0
- package/dist/hook/turn-end.d.ts +2 -0
- package/dist/hook/turn-end.mjs +998 -0
- package/dist/hook/turn-end.mjs.map +1 -0
- package/dist/index.cjs +3626 -3577
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.mjs +3544 -3498
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/change-request.md +0 -52
|
@@ -68,24 +68,23 @@ no EX is appended for it, and no row is written.
|
|
|
68
68
|
|
|
69
69
|
The age of the target decides the route.
|
|
70
70
|
|
|
71
|
-
| Target | Route
|
|
72
|
-
| --------------------------------------------------- |
|
|
73
|
-
| An AC, EX or BR this invocation wrote | Changed directly, with no approval. An AC it wrote is split the same way, with no approval, and each EX re-cites the criterion it exercises
|
|
74
|
-
| An item that existed when the invocation started | Changed directly
|
|
75
|
-
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
protocol
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
as
|
|
83
|
-
`.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md#a-change-to-the-story-tree`
|
|
71
|
+
| Target | Route |
|
|
72
|
+
| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
73
|
+
| An AC, EX or BR this invocation wrote | Changed directly, with no approval. An AC it wrote is split the same way, with no approval, and each EX re-cites the criterion it exercises |
|
|
74
|
+
| An item that existed when the invocation started | Changed directly when the user's request in this session names that change; otherwise put to the user as a critical decision, and the item stays unchanged until the user answers |
|
|
75
|
+
| Creating, splitting, merging or retiring a BF or US | Put to the user, even when this invocation wrote the item |
|
|
76
|
+
|
|
77
|
+
An answer covers only the change it described. The drift protocol decides a
|
|
78
|
+
proposed change and its affected set as written
|
|
79
|
+
(`.qfai/assistant/rule/drift-protocol.md#when-drift-is-detected`). The decision
|
|
80
|
+
is recorded only when it passes the recording test, as
|
|
81
|
+
`.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md#critical-decisions-and-no-question-mode`
|
|
84
82
|
sets out.
|
|
85
83
|
|
|
86
|
-
Under `--contract`, a finding that only a story change answers
|
|
87
|
-
a
|
|
88
|
-
unchanged, and the contract is repaired only
|
|
84
|
+
Under `--contract`, a finding that only a story change answers is put to the
|
|
85
|
+
user as a critical decision naming the story file. Until the user answers, the
|
|
86
|
+
story file stays byte for byte unchanged, and the contract is repaired only
|
|
87
|
+
within the triaged scope.
|
|
89
88
|
|
|
90
89
|
After the cycle's changes are applied, rewrite each BR they affect from its
|
|
91
90
|
updated EXs.
|
|
@@ -97,17 +96,15 @@ updated EXs.
|
|
|
97
96
|
- No third cycle runs, even when the second adopted one.
|
|
98
97
|
|
|
99
98
|
A finding still undecided when the session ends becomes one `open-questions.md`
|
|
100
|
-
row
|
|
101
|
-
its target IDs. The per-flow gate reports that row as `QFAI-SPACK-102`
|
|
102
|
-
|
|
99
|
+
row whose Content opens `Unadjudicated:`, followed by the finding and
|
|
100
|
+
its target IDs. The per-flow gate reports that row as `QFAI-SPACK-102` while it
|
|
101
|
+
exists.
|
|
103
102
|
|
|
104
103
|
Under `--auto` nothing is asked. A finding that would go to the user becomes
|
|
105
104
|
that row in the cycle that raised it.
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
`open-questions.md`, and that row is what authorizes the change. Until then the
|
|
110
|
-
per-flow gate holds the flow, so no later stage builds on it.
|
|
106
|
+
While the row exists the per-flow gate holds the flow, so no later stage builds
|
|
107
|
+
on it.
|
|
111
108
|
|
|
112
109
|
No other record is written. A finding the session decided, and one it dropped,
|
|
113
110
|
append no row.
|
|
@@ -118,13 +115,14 @@ Within a session, the finder does not raise a finding again when either holds:
|
|
|
118
115
|
|
|
119
116
|
- It has the kind and target IDs of a finding the session already decided, and
|
|
120
117
|
its case is equal to that case, includes it, or is included in it.
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
|
|
118
|
+
- A change the user declined already answers it. A declined change is the user
|
|
119
|
+
deciding that finding, and its `Declined:` row in `decisions.md` bars the
|
|
120
|
+
finding it answers.
|
|
124
121
|
|
|
125
122
|
Matching never goes by wording. A declined change for `BR-0006-0001` and
|
|
126
123
|
`EX-0002-0003-02` whose case is "an order of 20 000 in euros" also bars "an order
|
|
127
124
|
of 20 000 in any currency other than the default", however either is worded. It
|
|
128
125
|
does not bar a finding on the same IDs for an order of exactly 10 000.
|
|
129
126
|
|
|
130
|
-
A decision
|
|
127
|
+
A later decision row whose Approach opens `Reopens DEC-…` with the declined
|
|
128
|
+
row's ID lifts it.
|
|
@@ -37,13 +37,12 @@ Discussion UI/UX files are **non-normative** discovery / reference artifacts —
|
|
|
37
37
|
the validate lane, under `QFAI-AUD-001`. The shipped `ui-contract.sample.yaml`
|
|
38
38
|
carries filled entries; replace them with the screen's own rather than
|
|
39
39
|
emptying the list.
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
keys; they do not replace them.
|
|
40
|
+
- A screen may describe its copy in the optional `supplements` and `structure`.
|
|
41
|
+
Check each proposed text against the screen's tasks and the information the
|
|
42
|
+
user needs there. A text that only repeats a heading, an action or a
|
|
43
|
+
condition the user already has is left out. Validate does not check these
|
|
44
|
+
keys; it checks that every plain text in the UI source carries a `qfai-text`
|
|
45
|
+
reason comment.
|
|
47
46
|
- UI contracts must be mockable for prototypes: define stable `elements` and
|
|
48
47
|
`actions` with enough inspection-target text for Playwright evidence.
|
|
49
48
|
- **The `prototype` mapping is optional, and what it declares is checked.** A
|
|
@@ -65,7 +64,6 @@ Discussion UI/UX files are **non-normative** discovery / reference artifacts —
|
|
|
65
64
|
not only where the attribute is written out — a framework that builds the
|
|
66
65
|
attribute from a variable still writes the marker somewhere.
|
|
67
66
|
- **Every entry under `screens` is a screen, once.** Each UI-bearing contract declares one full `UI-NNNN` ID and a nonempty `screens[]` list. Each screen has an ID and route, unique within its contract. The prototyping cycle covers all declared UI-bearing contract IDs; filenames do not select a legacy spec tier. `QFAI-CONTRACT-042` names malformed screen entries.
|
|
68
|
-
- **Every screen states the text it shows.** A screen declares `supplements` (`[]` when it shows none) and may declare `structure`. `QFAI-CONTRACT-043` names a key that is absent or malformed, `QFAI-CONTRACT-044` an id the screen does not declare, and `QFAI-CONTRACT-045` a text shown twice; and, with `--rendered`, `QFAI-CONTRACT-046` to `QFAI-CONTRACT-048` compare rendered text with the lists.
|
|
69
67
|
- **A contract's ID comes from its directory.** `api/` holds `API` contracts,
|
|
70
68
|
`db/` `DB` and `ui/` `UI`; the QFAI repository's own `cli/` holds `CLI`
|
|
71
69
|
contracts. The ID is `<KIND>-NNNN`.
|
|
@@ -285,8 +283,8 @@ For each affected AC, EX, and BR, name the contract that realizes it. Resolve ev
|
|
|
285
283
|
|
|
286
284
|
A `--contract` rerun reads all existing flows that reference the changed contract or its paired contracts. After each
|
|
287
285
|
contract repair, recompute the affected set and recheck every obligation in it until a pass writes nothing and adds no
|
|
288
|
-
flow. Read scope can expand; write scope stays within the
|
|
289
|
-
|
|
286
|
+
flow. Read scope can expand; write scope stays within the triaged scope. If a repair needs a contract or story edit
|
|
287
|
+
outside it that is a critical decision, put it to the user and stop the dependent edit. A confirm-only review is read-only and
|
|
290
288
|
cannot close a mismatch.
|
|
291
289
|
|
|
292
290
|
## Review checklist
|
|
@@ -23,6 +23,7 @@ naming the pattern is what works.
|
|
|
23
23
|
- Motion and transitions
|
|
24
24
|
- Copy in the UI
|
|
25
25
|
- Copy that adds no meaning
|
|
26
|
+
- Claims nobody has confirmed
|
|
26
27
|
- Information architecture and flow
|
|
27
28
|
- States and accessibility
|
|
28
29
|
- Implementation defaults
|
|
@@ -39,6 +40,16 @@ naming the pattern is what works.
|
|
|
39
40
|
- **Replacing a pattern.** Its usual substitute is in
|
|
40
41
|
[Displacement](#displacement). Moving from one to the other is the same
|
|
41
42
|
defect.
|
|
43
|
+
- **Checking product fit.** Where the design direction, root `DESIGN.md` or a
|
|
44
|
+
screen is reviewed, ask one more question: if another product's name
|
|
45
|
+
replaced this one, would the screen still fit? A yes is a finding that names
|
|
46
|
+
where the direction should become specific to this product: the copy, the
|
|
47
|
+
one distinctive element, or the visual. It is a reviewer's judgement, not a
|
|
48
|
+
detection, and it adds no `lap-*` entry.
|
|
49
|
+
- **A claim nobody has confirmed.** Whether writing root `DESIGN.md`, building
|
|
50
|
+
a screen or reviewing one, follow
|
|
51
|
+
[Claims nobody has confirmed](#claims-nobody-has-confirmed) before deleting
|
|
52
|
+
or rewriting one.
|
|
42
53
|
- Within each aspect, the pattern named most often comes first.
|
|
43
54
|
|
|
44
55
|
## Where the list stops
|
|
@@ -59,6 +70,9 @@ naming the pattern is what works.
|
|
|
59
70
|
through the criterion on explanatory text, because those patterns are about
|
|
60
71
|
what the text tells the user, not about a brand. No entry here is a `lap-*`
|
|
61
72
|
detection.
|
|
73
|
+
- The audit that opens a restyle applies every section, identity included: it
|
|
74
|
+
reads screens the project already runs, which root `DESIGN.md` did not
|
|
75
|
+
produce.
|
|
62
76
|
|
|
63
77
|
## Color and background
|
|
64
78
|
|
|
@@ -274,9 +288,9 @@ naming the pattern is what works.
|
|
|
274
288
|
|
|
275
289
|
## Copy that adds no meaning
|
|
276
290
|
|
|
277
|
-
These patterns are judged against the screen's tasks
|
|
278
|
-
|
|
279
|
-
visual direction does not exempt them. A disclosure about demo data, cost, storage
|
|
291
|
+
These patterns are judged against the screen's tasks, in SDD, in implementation
|
|
292
|
+
and in every surface review; in UI source, also against the `qfai-text` reason
|
|
293
|
+
each plain text carries. A chosen visual direction does not exempt them. A disclosure about demo data, cost, storage
|
|
280
294
|
or transmission that is true and shown where the user decides is not one of them:
|
|
281
295
|
judge where it sits and what it lets the user do, not the word.
|
|
282
296
|
|
|
@@ -287,6 +301,25 @@ judge where it sits and what it lets the user do, not the word.
|
|
|
287
301
|
- Production copy carries a development instruction, implementation commentary,
|
|
288
302
|
or a demo note repeated on screen after screen.
|
|
289
303
|
|
|
304
|
+
## Claims nobody has confirmed
|
|
305
|
+
|
|
306
|
+
A metric, a customer count, a testimonial or a "trusted by" row that is
|
|
307
|
+
already on the screen, or in material the user supplied, and that the
|
|
308
|
+
project's documents do not support is not deleted and not rewritten into
|
|
309
|
+
something more specific: deleting it can lose a real fact, and rewriting it
|
|
310
|
+
invents one. A claim an agent writes itself stays the _invented proof_
|
|
311
|
+
pattern in _Copy in the UI_: never write one.
|
|
312
|
+
|
|
313
|
+
- Put each such claim to the user under the question protocol.
|
|
314
|
+
- A claim the user confirms keeps its wording, or becomes specific with the
|
|
315
|
+
facts the user gives. A claim the user rejects is removed.
|
|
316
|
+
- With no user present, the claim stays as it is, becomes one row in
|
|
317
|
+
`open-questions.md` under `paths.specsDir`, and the final report lists it.
|
|
318
|
+
- Inside the prototyping loop, the claim and the user's answer go to the final
|
|
319
|
+
report instead of `open-questions.md`. A `prototype` iteration applies the
|
|
320
|
+
answer to the prototype. A restyle changes no displayed text, so there a
|
|
321
|
+
claim to remove or reword is reported as a change the contract needs.
|
|
322
|
+
|
|
290
323
|
## Information architecture and flow
|
|
291
324
|
|
|
292
325
|
- Sections follow the stock order: hero, logos, three features, stats or
|
|
@@ -121,15 +121,14 @@ to touch a colour has nothing to be consistent with.
|
|
|
121
121
|
skill template. A root file that exists was authored by `common-design-md` or
|
|
122
122
|
copied from that template on purpose, and a project may have authored its own.
|
|
123
123
|
Write a missing file from the recorded direction. Repair an existing file only when SDD triage names its exact path
|
|
124
|
-
and the requested change
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
For an existing valid file, validation and authorized repairs that preserve
|
|
124
|
+
and the requested change. Apply only that change; preserve existing brand and
|
|
125
|
+
tokens unless the user decided their change and it is supported by recorded
|
|
126
|
+
direction or named theme values. Record the source of each changed value and
|
|
127
|
+
leave unrelated content unchanged. Stop without writing a value neither source
|
|
128
|
+
supplies. Without such a triaged change, validate the existing file without an
|
|
129
|
+
overwrite. An unreplaced sample is refused.
|
|
130
|
+
|
|
131
|
+
For an existing valid file, validation and triaged repairs that preserve
|
|
133
132
|
its brand and tokens require no new brand selection. An authorized brand or
|
|
134
133
|
token change still needs recorded direction or named theme values for each
|
|
135
134
|
changed value; without either source, stop without writing the change.
|
|
@@ -11,7 +11,7 @@ Use source-backed discussion requirements to write one connected, testable story
|
|
|
11
11
|
## Source and ownership
|
|
12
12
|
|
|
13
13
|
1. Read the selected discussion pack's source registry, requirement index, open questions, decision record, and completed reviews. Each requirement must trace to a source ID. Record a missing source or unresolved product choice in `<paths.specsDir>/open-questions.md` and stop the dependent write.
|
|
14
|
-
2. Reuse an existing policy, business flow, or story when it still expresses the requirement. Put
|
|
14
|
+
2. Reuse an existing policy, business flow, or story when it still expresses the requirement. Put an operation that is a critical decision to the user, as the triage reference says, and record the decision in `<paths.specsDir>/decisions.md` only when it passes the recording test.
|
|
15
15
|
3. Write broad intent in `01_policy/` as criteria, then each observable process in `02_business-flow/business-flow-NNNN/business-flow.md`. Keep each flow's story index and three-file story directories beneath it. Every file takes its template's shape exactly, as the `Document shapes` section of the spec traceability rules sets out.
|
|
16
16
|
4. Write one observable outcome per AC, as one named Gherkin `Scenario:` under its ID comment. Give each AC at least one concrete EX, and give each EX exactly one AC reference. Include normal, failure, boundary, and authorization paths relevant to the requirement.
|
|
17
17
|
5. Once the examples exist, write independently falsifiable BRs in the contracts that enforce them. Each BR cites at least one full EX ID; every EX has a BR. A shared BR is defined once, in the contract that enforces it, and no other contract cites it.
|
|
@@ -28,13 +28,13 @@ Use source-backed discussion requirements to write one connected, testable story
|
|
|
28
28
|
A capacity-only sibling may represent the same actual actor goal within the
|
|
29
29
|
same BF when requested AC or EX additions exceed the source story's remaining
|
|
30
30
|
capacity. Prefer preserving published cases and IDs, and place only new,
|
|
31
|
-
cohesive incoming cases
|
|
32
|
-
retired-inclusive capacity
|
|
33
|
-
|
|
34
|
-
permission.
|
|
31
|
+
cohesive incoming cases there, once the user has decided the partition. Confirm
|
|
32
|
+
retired-inclusive capacity before writing; this exception invents no new
|
|
33
|
+
product outcome and decides no future creation or move.
|
|
35
34
|
|
|
36
35
|
Allocate each ID as the highest ID of its kind in its defined scope plus one, counting retired IDs. Never reuse an ID. The scopes and widths are in the `ID allocation` section of the triage reference.
|
|
37
36
|
|
|
38
37
|
## Ambiguity
|
|
39
38
|
|
|
40
|
-
Leave unresolved choices in `open-questions.md` with an owner and a next action in Approach. Append decisions and questions once
|
|
39
|
+
Leave unresolved choices in `open-questions.md` with an owner and a next action in Approach. Append decisions and questions once; a decision row keeps its ID and is never removed, though its wording may be restated, and a question row is never edited; delete a question row when a decision settles it.
|
|
40
|
+
Do not silently turn discussion alternatives into requirements or duplicate a fact across policy, story, and contract files.
|
|
@@ -5,7 +5,7 @@ Use this sequence for /qfai-sdd. The shipped templates under ../templates/spec/
|
|
|
5
5
|
## Stage 0: source inventory
|
|
6
6
|
|
|
7
7
|
1. Use the launcher established by
|
|
8
|
-
`.qfai/assistant/rule/shared-skill-operating-baseline.md#canonical-qfai-launcher
|
|
8
|
+
`.qfai/assistant/rule/shared-skill-operating-baseline.md#canonical-qfai-launcher`.
|
|
9
9
|
Record its resolved package path and version in the SDD report. Check that
|
|
10
10
|
the installed Stage 0 instructions support the procedure being used.
|
|
11
11
|
2. Run `npx qfai sdd preflight` and read its `selectedInputPath` and `source`.
|
|
@@ -37,9 +37,9 @@ Use this sequence for /qfai-sdd. The shipped templates under ../templates/spec/
|
|
|
37
37
|
## Stage 1: triage and decisions
|
|
38
38
|
|
|
39
39
|
Follow the triage reference. Classify each requirement against existing policy, flow, story, example, and contract content.
|
|
40
|
-
Identify every affected flow. Put each
|
|
41
|
-
protocol before a dependent write, and append
|
|
42
|
-
questions in open-questions.md. In --auto, ask nothing and stop dependent work.
|
|
40
|
+
Identify every affected flow. Put each critical decision to the user through the shared user-question
|
|
41
|
+
protocol before a dependent write, and append a decisions.md row only when the decision passes the recording test;
|
|
42
|
+
record unresolved questions in open-questions.md. In --auto, ask nothing and stop dependent work.
|
|
43
43
|
|
|
44
44
|
## Stage 2: policy and flow
|
|
45
45
|
|
|
@@ -82,9 +82,9 @@ For a contract-scoped change, apply the same gate to every existing BF whose obl
|
|
|
82
82
|
|
|
83
83
|
The --contract selector accepts an existing contract ID or a repository-relative path under <paths.contractsDir>. Stop
|
|
84
84
|
on an unknown target. Read the named contract, its paired contracts, and the AC and EX of every flow that cites them.
|
|
85
|
-
Reconcile those existing obligations with the changed contract. After each
|
|
85
|
+
Reconcile those existing obligations with the changed contract. After each contract write, expand the
|
|
86
86
|
affected-flow set and repeat until no new flow or contract write appears. Do not edit a story to make a contract-only
|
|
87
|
-
change appear valid;
|
|
87
|
+
change appear valid; put the story change to the user first. A confirm-only request checks without repair. If an
|
|
88
88
|
activated API contract still has no owning flow, leave it planned and report the gap.
|
|
89
89
|
|
|
90
90
|
## Parallel work
|
|
@@ -7,10 +7,10 @@ Use these checkpoints with the ordered stages of the SDD steps. A checked item r
|
|
|
7
7
|
- The selected source is the preflight result's selectedInputPath, or an explicit user requirement named in the SDD report.
|
|
8
8
|
- The selected discussion pack and applicable completed reviews were read and dispositioned. A disagreement was resolved in an SDD-owned artifact.
|
|
9
9
|
- Every requirement has an affected policy, BF, US, EX, or contract path, or an open question that prevents a dependent write.
|
|
10
|
-
- Only
|
|
11
|
-
- Both tables have exactly ID, Content, Approach
|
|
12
|
-
-
|
|
13
|
-
- New IDs use highest-in-scope plus one, including retired IDs
|
|
10
|
+
- Only a decision the user made that passes the recording test, approvals included, and a justified `Test exception:` row are decision rows; a rejected option is a `Declined:` row. Open questions are open-questions.md rows.
|
|
11
|
+
- Both tables have exactly ID, Content, Approach. New rows take timestamp IDs; existing decision rows keep their IDs and are never removed, though their wording may be restated, and a question row was only deleted when a decision or a replacing question names it.
|
|
12
|
+
- Critical decisions have the user's answer before any dependent write. Under --auto, pending decisions stopped the run without an invented answer.
|
|
13
|
+
- New IDs use highest-in-scope plus one, including retired IDs and the IDs open pull requests add.
|
|
14
14
|
|
|
15
15
|
## Policy and business flow
|
|
16
16
|
|
|
@@ -49,7 +49,7 @@ Follow the cycle the `sdd-cycle` step sets out.
|
|
|
49
49
|
- A finding resting on product intent nothing written states went to the user. A proposed EX that no existing BR, existing AC or the request implies was dropped.
|
|
50
50
|
- Each adopted change took the route its target's age allows, and the affected BRs were rewritten from their updated EXs.
|
|
51
51
|
- No more than two cycles ran, and a cycle that adopted nothing ended the loop. A finding still undecided at the end is one `Unadjudicated:` open-question row, and no other record was written.
|
|
52
|
-
- No decided finding, and none a declined change
|
|
52
|
+
- No decided finding, and none a declined change answers, was raised again.
|
|
53
53
|
|
|
54
54
|
## Validation and review
|
|
55
55
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Pre-draft Grilling
|
|
2
2
|
|
|
3
3
|
Before an SDD stage makes a design decision, the session agent gathers the stage's open decisions into one frontier.
|
|
4
|
-
When the frontier holds a design decision the repository cannot settle, the agent settles the frontier in a delegated grilling session under `.qfai/assistant/rule/review-convergence.md#agent-to-agent-grilling
|
|
4
|
+
When the frontier holds a design decision the repository cannot settle, the agent settles the frontier in a delegated grilling session under `.qfai/assistant/rule/review-convergence.md#agent-to-agent-grilling`, using the `qfai-grilling` method. It asks the user each critical decision the frontier holds.
|
|
5
5
|
|
|
6
6
|
When the request, the story tree, the contracts and the recorded decisions already settle every decision of the stage, the frontier is empty. Then no session is held and no griller starts. The stage writes what is settled, and its final report lists no adopted decision for the checkpoint.
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ When the request, the story tree, the contracts and the recorded decisions alrea
|
|
|
9
9
|
|
|
10
10
|
| Stage | Decisions to settle before the write |
|
|
11
11
|
| -------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
12
|
-
| Triage and records | Which existing BF or US expresses the request, which operation is justified, and which
|
|
12
|
+
| Triage and records | Which existing BF or US expresses the request, which operation is justified, and which critical decisions it holds. |
|
|
13
13
|
| Policy and flows | Which objective, principle, boundary, or process outcome belongs in each file. |
|
|
14
14
|
| Stories and examples | Which actor outcome, failure, boundary, and concrete example is required. |
|
|
15
15
|
| Contracts and rules | Which contract owns each BR, whether its EX is already written, and whether the contract can realize the obligation. |
|
|
@@ -21,11 +21,11 @@ The checkpoint occurs before this invocation's first design mutation in that sta
|
|
|
21
21
|
- The session agent starts the griller.
|
|
22
22
|
- One frontier holds every decision the stage's drafts need. Keep grilling and the final review apart: the reviewer reviews no decision it recommended.
|
|
23
23
|
- Read existing policy, decisions, open questions, discussion provenance, and current contracts before asking. Do not ask the user for facts already recorded there.
|
|
24
|
-
- The session identifies options and failure cases and gives an evidence-based recommendation. A critical product decision goes to the user; an agent's preference cannot supply
|
|
24
|
+
- The session identifies options and failure cases and gives an evidence-based recommendation. A critical product decision goes to the user; an agent's preference cannot supply the user's answer.
|
|
25
25
|
- Settle a critical question before the affected author writes.
|
|
26
|
-
- The stage's final report lists each decision a checkpoint adopted, with its reason. A skipped checkpoint fails the gate; it is not an implicit
|
|
26
|
+
- The stage's final report lists each decision a checkpoint adopted, with its reason. A skipped checkpoint fails the gate; it is not an implicit answer.
|
|
27
27
|
|
|
28
|
-
Each decision record
|
|
28
|
+
Each decision record is a short decision record in the form stated at the top of
|
|
29
29
|
`.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md`.
|
|
30
30
|
|
|
31
31
|
Pre-draft grilling settles a premise before drafting. The independent reviewer gate then checks the written artifact, its traceability, and its validation evidence. Both are required.
|
|
@@ -9,8 +9,8 @@ The gate checks the story-tree files against their shipped templates, the docume
|
|
|
9
9
|
- 02_business-flow/business-flows.md indexes real BF directories. Each business-flow.md has exactly one Mermaid flowchart or sequenceDiagram, in `## Flow`.
|
|
10
10
|
- Each story directory holds exactly 01_User-story.md, 02_Acceptance-Criteria.md, and 03_Example.md.
|
|
11
11
|
- The story tree was written from its paired templates under ../templates/spec/ and holds no heading, section, content kind or history they do not show, as the `Document shapes` section of the spec traceability rules sets out.
|
|
12
|
-
- decisions.md and open-questions.md have
|
|
13
|
-
-
|
|
12
|
+
- decisions.md and open-questions.md have three cells per row: ID, Content, Approach. No existing decision row was removed or renumbered (its wording may be restated), and no existing question row was edited.
|
|
13
|
+
- A decision row records a decision the user made that passes the recording test, with who decided it, when, and the option chosen. No row records a decision the agent took. Unanswered critical decisions have open-question rows and prevent completion.
|
|
14
14
|
|
|
15
15
|
## Traceability and contracts
|
|
16
16
|
|
|
@@ -42,4 +42,4 @@ Do not use a sibling's in-flight findings to hold or clear the current flow. Rec
|
|
|
42
42
|
- The final report lists each decision a checkpoint adopted, with its reason.
|
|
43
43
|
- Reviewers are independent of authors, and every finding of the one review is fixed or answered under `.qfai/assistant/rule/review-convergence.md`.
|
|
44
44
|
- Evidence records the source, changed IDs and files, contract executability, commands, reviewer verdicts, rejected options excluded, and remaining risks.
|
|
45
|
-
- No
|
|
45
|
+
- No critical decision is treated as answered from silence, --auto, or a generic instruction to continue.
|