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
|
@@ -53,8 +53,8 @@ required guidance. A source fix or package version string alone does not prove
|
|
|
53
53
|
that a published package contains it.
|
|
54
54
|
|
|
55
55
|
Preview the refresh with that verified local launcher using
|
|
56
|
-
`npx qfai init --force --dry-run`. Review the
|
|
57
|
-
including any direct local edits, before `npx qfai init --force`. Review the
|
|
56
|
+
`npx qfai init --force --dry-run`. Review the paths marked `changed`, which it
|
|
57
|
+
would replace, including any direct local edits, before `npx qfai init --force`. Review the
|
|
58
58
|
resulting diff. Force refresh overwrites managed assistant and rule masters;
|
|
59
59
|
project specs, contracts, rule overlays, `skill.local/`, configuration overrides
|
|
60
60
|
and existing entry documents remain project-owned. Keep them intact; do not
|
|
@@ -72,6 +72,9 @@ condition holds, write nothing and record the reason in the stage report.
|
|
|
72
72
|
Do not skip the step. The planned independent review still runs, even when the
|
|
73
73
|
step is only two lines.
|
|
74
74
|
|
|
75
|
+
When a step ends, note its status for the step-status table of the final
|
|
76
|
+
report.
|
|
77
|
+
|
|
75
78
|
## The scope question
|
|
76
79
|
|
|
77
80
|
The scopes are the plan's, or the chosen candidate's after the candidate
|
|
@@ -104,7 +107,8 @@ Once the plan and its scope are known, and before the first stage:
|
|
|
104
107
|
- the files the work may change.
|
|
105
108
|
|
|
106
109
|
The announcement asks nothing and lists no skipped stage. Continue with the
|
|
107
|
-
policy check and the first stage in the same turn
|
|
110
|
+
policy check, where the route runs one, and the first stage in the same turn
|
|
111
|
+
without waiting for a reply.
|
|
108
112
|
Text that is not a request gets no plan and no announcement.
|
|
109
113
|
|
|
110
114
|
## Questions
|
|
@@ -268,12 +272,14 @@ ensure the whole index and worktree are clean. Unknown dirty files postpone
|
|
|
268
272
|
the switch; do not stash, reset or delete them to move on. A reviewer using
|
|
269
273
|
live files or checkout-dependent execution must finish. A read-only reviewer
|
|
270
274
|
using only `git show <fixed SHA>:<path>` may continue across a clean orchestrator switch;
|
|
271
|
-
the reviewer never switches the checkout. CI-only
|
|
272
|
-
existing DELEGATED commit allowance only under a user
|
|
273
|
-
policy covering that verification commit and its tracked
|
|
274
|
-
|
|
275
|
+
the reviewer never switches the checkout. Pending gates delegated (CI-only or
|
|
276
|
+
by instruction) use the existing DELEGATED commit allowance only under a user
|
|
277
|
+
instruction or project policy covering that verification commit and its tracked
|
|
278
|
+
paths. The project declares the gate CI-only, or the user's instruction for
|
|
279
|
+
this run delegates that gate to a named CI check, quoted as `verify-repo-gate` says.
|
|
280
|
+
Its actual check is named. Every nondelegated gate
|
|
275
281
|
must pass. A delegated red check stops transport of the same unchanged candidate.
|
|
276
|
-
Explicit CI-only
|
|
282
|
+
Explicit delegation (CI-only or by instruction) covering transport may instead carry actual changes
|
|
277
283
|
addressing that failure through the existing planned fix into a new candidate,
|
|
278
284
|
even while HEAD names the failed commit. Keep the prior head, check, run and
|
|
279
285
|
observed result as FAIL; never relabel that evidence pending. Report the actual
|
|
@@ -304,13 +310,13 @@ reset, a stash, a branch switch or a worktree removal.
|
|
|
304
310
|
|
|
305
311
|
## Final report
|
|
306
312
|
|
|
307
|
-
| The work ended | The report
|
|
308
|
-
| ------------------------------------- |
|
|
309
|
-
| Every stage ran and every gate passed | Done: the paths changed, each gate's verdict, and every decision taken without the user, with its reason
|
|
310
|
-
| At the chosen scope | The chosen stages complete, the stages not chosen, and a verdict for each gate that ran, never that a change is done
|
|
311
|
-
| At a closing step | The closure outcome and each follow-up request, never that a change is done
|
|
312
|
-
| With a gate failing | Each failing gate marked pre-existing or new, with its owner. Nothing reads as complete
|
|
313
|
-
| With delegated CI pending | The verification commit, pending checks and resume condition
|
|
313
|
+
| The work ended | The report |
|
|
314
|
+
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
315
|
+
| Every stage ran and every gate passed | Done: the paths changed, each gate's verdict, and every decision taken without the user, with its reason |
|
|
316
|
+
| At the chosen scope | The chosen stages complete, the stages not chosen, and a verdict for each gate that ran, never that a change is done |
|
|
317
|
+
| At a closing step | The closure outcome and each follow-up request, never that a change is done |
|
|
318
|
+
| With a gate failing | Each failing gate marked pre-existing or new, with its owner. Nothing reads as complete |
|
|
319
|
+
| With delegated CI pending | The verification commit, pending checks and resume condition: when `<check>` reports for `<head>`, follow `verify-repo-gate` `## After CI`; verification remains incomplete |
|
|
314
320
|
|
|
315
321
|
- For a CI wait, name the target, current head, run ID or URL when available,
|
|
316
322
|
check, actual outcome and counts, blocker and resume condition. State when no
|
|
@@ -319,6 +325,17 @@ reset, a stash, a branch switch or a worktree removal.
|
|
|
319
325
|
- Report repository outcome separately from external publication. A local commit
|
|
320
326
|
is not a push or pull request, and passing repository checks do not prove a
|
|
321
327
|
deployment, package publication or other external effect occurred.
|
|
328
|
+
- Name `common-policy-check` and its outcome, or that it did not run and why.
|
|
329
|
+
- Give a step-status table: one row per plan step in plan order, and one per
|
|
330
|
+
planned review, each with its status and, for every status but `ran`, the
|
|
331
|
+
reason. A status is `ran`; `passed`, a pass-through whose Passes when
|
|
332
|
+
condition held, so it wrote nothing; `delegated`, to CI or a person, with
|
|
333
|
+
where its result appears; `not run`, a reached step that did not run; or
|
|
334
|
+
`not reached`, a step outside the chosen scope or after the work stopped.
|
|
335
|
+
`passed` is not a gate verdict: a step whose gate ran and passed is `ran`, and
|
|
336
|
+
so is a step that ran and found nothing to do. A step whose gate is UNRUN is
|
|
337
|
+
`not run`, with the UNRUN reason; a step where some gates are delegated is
|
|
338
|
+
`ran`, and its gate verdicts show the delegation. No gate reads the table.
|
|
322
339
|
- A gate shows its verdict only.
|
|
323
340
|
- An external effect nobody requested is listed as not requested.
|
|
324
341
|
- The report does not restate the history of the work.
|
|
@@ -326,6 +343,12 @@ reset, a stash, a branch switch or a worktree removal.
|
|
|
326
343
|
in the shape `.agents/rules/user-questions.md` § 6 requires. A report that
|
|
327
344
|
only states completion needs no question. Under a no-question mode, list any
|
|
328
345
|
remaining actions without asking.
|
|
346
|
+
- When the report closes the user's last task and nothing waits on the user,
|
|
347
|
+
with no question, approval or choice open, follow
|
|
348
|
+
`.agents/rules/session-feedback.md` once, after the report. A report at a
|
|
349
|
+
chosen scope, at a halt, with a gate failing or CI pending, or with a question
|
|
350
|
+
is a pause and runs no review, and neither does a report after the review
|
|
351
|
+
already ran for the user's latest instruction.
|
|
329
352
|
|
|
330
353
|
## Work orders summary
|
|
331
354
|
|
|
@@ -14,11 +14,13 @@ are exact: an unknown key is refused.
|
|
|
14
14
|
|
|
15
15
|
## Calls
|
|
16
16
|
|
|
17
|
-
| Call
|
|
18
|
-
|
|
|
19
|
-
| `npx qfai workflow plan --in <file>`
|
|
20
|
-
| `npx qfai workflow plan --in -`
|
|
21
|
-
| `npx qfai workflow plan --route <route
|
|
17
|
+
| Call | When |
|
|
18
|
+
| ------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
19
|
+
| `npx qfai workflow plan --in <file>` | A request, with its extraction in a JSON file |
|
|
20
|
+
| `npx qfai workflow plan --in -` | The same, with the extraction on standard input |
|
|
21
|
+
| `npx qfai workflow plan --route <route> --in <file\|->` | The candidate chosen, with the extraction that gave the candidates |
|
|
22
|
+
| `npx qfai workflow plan --route <route>` | A branch destination |
|
|
23
|
+
| `npx qfai workflow plan --order` | An operation the session runs itself that deletes nothing, with no file |
|
|
22
24
|
|
|
23
25
|
- Each call prints one JSON document and writes no file.
|
|
24
26
|
- Exit 0 is a plan or candidates, 2 a refused input, and 1 an input file that
|
|
@@ -43,7 +45,9 @@ route, stage or step.
|
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
At `low` confidence, `alternatives` holds the one or two other readings, each
|
|
46
|
-
with `intent`, `entryFlags`, `qualifiers` and `signals`.
|
|
48
|
+
with `intent`, `entryFlags`, `qualifiers` and `signals`. The optional
|
|
49
|
+
`flows` lists the business flows the implementation works, as distinct
|
|
50
|
+
`BF-NNNN` IDs.
|
|
47
51
|
|
|
48
52
|
## Plan
|
|
49
53
|
|
|
@@ -94,22 +98,38 @@ The route, its stages in order with each step's file, and its points.
|
|
|
94
98
|
}
|
|
95
99
|
```
|
|
96
100
|
|
|
97
|
-
| Field | Meaning
|
|
98
|
-
| ---------------- |
|
|
99
|
-
| `rule` | The decision rule that chose the route; `null` when none held; absent for `--route`
|
|
100
|
-
| `review` | `spec` or `code`: the review that follows the stage; absent where none does
|
|
101
|
-
| `mode` | `settled` or `read-only` where the plan fixes how the step runs; otherwise `null`
|
|
102
|
-
| `passThrough` | The step runs, and writes nothing when it shows it has nothing to write
|
|
103
|
-
| `decisionPoints` | The steps that put each critical decision to the user before acting on it
|
|
104
|
-
| `releasePoint` | The step the user approves the release before, `end` for after the last stage, or `null`
|
|
105
|
-
| `branchPoints` | Each outcome with its destinations; `decision-table` means plan the step's new extraction
|
|
106
|
-
| `scopes` | How far the work may go, narrowest first; absent for `--route`
|
|
101
|
+
| Field | Meaning |
|
|
102
|
+
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
103
|
+
| `rule` | The decision rule that chose the route; `null` when none held; absent for `--route` |
|
|
104
|
+
| `review` | `spec` or `code`: the review that follows the stage; absent where none does |
|
|
105
|
+
| `mode` | `settled` or `read-only` where the plan fixes how the step runs; otherwise `null` |
|
|
106
|
+
| `passThrough` | The step runs, and writes nothing when it shows it has nothing to write |
|
|
107
|
+
| `decisionPoints` | The steps that put each critical decision to the user before acting on it; with the `decision` flag set, a plan that names none gets its first step that writes |
|
|
108
|
+
| `releasePoint` | The step the user approves the release before, `end` for after the last stage, or `null` |
|
|
109
|
+
| `branchPoints` | Each outcome with its destinations; `decision-table` means plan the step's new extraction |
|
|
110
|
+
| `scopes` | How far the work may go, narrowest first; absent for `--route` |
|
|
111
|
+
| `workOrders` | On an implement stage when the extraction lists `flows`: one `{ target }` per flow, in ascending ID order; absent otherwise |
|
|
112
|
+
|
|
113
|
+
A plan or a candidate from an extraction that names `spec` or `contract`, and
|
|
114
|
+
the plan `--route` returns with that `--in`, can hold a `spec` stage its route's
|
|
115
|
+
catalog row lacks, when no stage of the route is marked for
|
|
116
|
+
the `spec` review; run it like any other stage.
|
|
117
|
+
|
|
118
|
+
A stage with `workOrders` runs every one of its steps once per work order, for
|
|
119
|
+
that work order's `target` flow alone, before the next stage starts. Run the
|
|
120
|
+
work orders in the order listed; the implementation skill's parallelization
|
|
121
|
+
policy says when two may run at once. No work order adds a step, a stage or a
|
|
122
|
+
review. The stage's review runs once, after its last work order. A plan
|
|
123
|
+
`--route` returns has none: for a chosen candidate or a branch destination, give
|
|
124
|
+
each of its implement stages one work order per flow of the extraction's
|
|
125
|
+
`flows`, in ascending ID order.
|
|
107
126
|
|
|
108
127
|
## Candidates
|
|
109
128
|
|
|
110
129
|
A `low` extraction returns the distinct routes its readings reach, one to three,
|
|
111
130
|
in the order the decision rules reach them, the main reading's route
|
|
112
|
-
recommended.
|
|
131
|
+
recommended. Each candidate carries the `decisionPoints` its reading gives;
|
|
132
|
+
the plan `--route` returns for the chosen one takes them in place of its own.
|
|
113
133
|
|
|
114
134
|
```json
|
|
115
135
|
{
|
|
@@ -121,7 +141,8 @@ recommended.
|
|
|
121
141
|
"rule": 13,
|
|
122
142
|
"summary": "Settle the decision before any change. Stages: discussion, close.",
|
|
123
143
|
"recommended": false,
|
|
124
|
-
"scopes": [{ "scope": "broad", "stages": ["discussion", "close"], "recommended": true }]
|
|
144
|
+
"scopes": [{ "scope": "broad", "stages": ["discussion", "close"], "recommended": true }],
|
|
145
|
+
"decisionPoints": ["discussion-interview"]
|
|
125
146
|
},
|
|
126
147
|
{
|
|
127
148
|
"route": "route-d",
|
|
@@ -137,7 +158,8 @@ recommended.
|
|
|
137
158
|
"stages": ["spec", "prototype", "implement", "verify"],
|
|
138
159
|
"recommended": false
|
|
139
160
|
}
|
|
140
|
-
]
|
|
161
|
+
],
|
|
162
|
+
"decisionPoints": ["sdd-triage"]
|
|
141
163
|
}
|
|
142
164
|
]
|
|
143
165
|
}
|
|
@@ -153,11 +175,15 @@ the ids of the stages it runs in plan order, and `true` for the narrowest.
|
|
|
153
175
|
change note and the gates that end the route follow; when they reach the route's last stage
|
|
154
176
|
that writes code, every verify stage that ends the route follows.
|
|
155
177
|
- `medium` adds the change note and the gates to those stages; where `narrow`
|
|
156
|
-
already holds implementation, it equals `narrow`.
|
|
178
|
+
already holds implementation, it equals `narrow`. It is listed unless `broad`
|
|
179
|
+
adds only pass-through stages that write neither code nor tests and have no review.
|
|
180
|
+
- Documentation-only maintenance or procedure writing keeps the change note
|
|
181
|
+
and closing gates. A procedure plan therefore gets `broad` alone.
|
|
157
182
|
- A security intake plan gets `broad` alone.
|
|
158
183
|
- `broad` runs every stage.
|
|
159
184
|
|
|
160
|
-
A scope holding every stage is `broad`, and `medium` is left out when it equals `narrow`.
|
|
185
|
+
A scope holding every stage is `broad`, and `medium` is left out when it equals `narrow`. A scope is also left
|
|
186
|
+
out when the next wider one adds only such pass-through stages. An extraction with
|
|
161
187
|
no artifacts, or whose route writes nothing, gets `broad` alone. A candidate
|
|
162
188
|
keeps its scopes: `--route` returns none.
|
|
163
189
|
|
|
@@ -182,7 +208,7 @@ keeps its scopes: `--route` returns none.
|
|
|
182
208
|
field that is absent, `unknown` for a key the extraction does not take,
|
|
183
209
|
`wrong-type` for a value of another type, `wrong-value` for a value outside the
|
|
184
210
|
field's vocabulary, and `invalid` for the rules tying `alternatives` to
|
|
185
|
-
`confidence` or requiring `owned-temporary-cleanup` to use `intent: order` and
|
|
211
|
+
`confidence`, refusing an empty or repeated `flows`, or requiring `owned-temporary-cleanup` to use `intent: order` and
|
|
186
212
|
empty `artifacts`, including alternative readings. Each cause states what was
|
|
187
213
|
expected and received, or the field name. `unknown-route` for a route the catalog does
|
|
188
214
|
not name, `plan-invalid` for a plan that does not load, naming its `file` and
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Reached-step observations
|
|
2
|
+
|
|
3
|
+
Use this procedure at each existing stage boundary to compare reached scoped work with actual observations. Keep the comparison in the existing ignored human stage report or handoff. It is not a completion detector, new gate or evidence schema.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- Reach and termination
|
|
8
|
+
- The stage comparison
|
|
9
|
+
- Missing proof and observed omission
|
|
10
|
+
- Purpose and source binding
|
|
11
|
+
- No-write passes
|
|
12
|
+
- Gate observations
|
|
13
|
+
- Recover existing receipts safely
|
|
14
|
+
- Native read-only example
|
|
15
|
+
- Existing review and limits
|
|
16
|
+
|
|
17
|
+
## Reach and termination
|
|
18
|
+
|
|
19
|
+
Compare the finite set of steps whose turn was reached in the selected scope before a declared stop or termination. Name the selected scope, reached boundary and any declared stop. Legitimately excluded or unreached work is neither an omission nor completed work.
|
|
20
|
+
|
|
21
|
+
Preserve plan order, scope, stop conditions and pass-through. A branch outcome ends its old route at the declared point; later steps of that route are not fabricated as completed. Do not add a step to obtain proof or silently omit a reached obligation.
|
|
22
|
+
|
|
23
|
+
## The stage comparison
|
|
24
|
+
|
|
25
|
+
Use the existing stage report, not a new schema. For each reached step retain these human-readable observations:
|
|
26
|
+
|
|
27
|
+
| Observation | What to retain |
|
|
28
|
+
| ----------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
29
|
+
| Identity | Plan step, owner, purpose, target and source identity; include the full source head where applicable. |
|
|
30
|
+
| Work | Actual input reads, action or output and artifact references. A file path alone does not establish its contents or use. |
|
|
31
|
+
| Gate | Applicable Gate observations from the actual command and result, without borrowing an unrelated green result. |
|
|
32
|
+
| Assessment | Supported completion, an observed incomplete result, or UNVERIFIED with missing proof, owner and resume condition. |
|
|
33
|
+
|
|
34
|
+
List each step of the stage with its status, for the step-status table of the final report.
|
|
35
|
+
|
|
36
|
+
A supported comparison assesses this reached step only. It does not pass unrelated gates, complete later work or establish that an agent understood instructions.
|
|
37
|
+
|
|
38
|
+
## Missing proof and observed omission
|
|
39
|
+
|
|
40
|
+
A plan declaration or content-read receipt establishes neither procedural execution nor understanding or adherence. Missing evidence leaves completion UNVERIFIED: name the missing proof or blocker, owner and resume condition. Absence alone does not prove that an action was omitted.
|
|
41
|
+
|
|
42
|
+
Positive target-bound evidence that a required action was not performed is different. Report the observed omission and its evidence as an incomplete result, then resume the existing authorized owner procedure. Do not add a step, route, review or gate. An actor's target-bound record explicitly saying the required action was not performed can support an omission; an absent output file alone cannot.
|
|
43
|
+
|
|
44
|
+
Keep these two assessments distinct. Do not claim an omission merely because a report is missing, or hide positive omission evidence behind an unknown-proof label.
|
|
45
|
+
|
|
46
|
+
## Purpose and source binding
|
|
47
|
+
|
|
48
|
+
Check the target, source identity and purpose before consuming evidence or resuming writes. A wrong target, old source or wrong purpose leaves completion UNVERIFIED with the actual missing proof or blocker. A matching command name or totals are not enough proof.
|
|
49
|
+
|
|
50
|
+
An unrelated green build cannot complete a reached design step. If its required artifact or procedural proof is missing, leave that completion UNVERIFIED and name the owner and resume condition. Keep the build's actual result without using it for a different obligation.
|
|
51
|
+
|
|
52
|
+
Inspect available receipts against the reached step and current source. A successful read of an old artifact shows only what that source contains; it does not verify the current work.
|
|
53
|
+
|
|
54
|
+
## No-write passes
|
|
55
|
+
|
|
56
|
+
A reached pass-through step records the actual input reads and their source identity, the `Passes when` condition it checked, and its declared no-write reason. The step ran despite writing nothing; this is not a skip.
|
|
57
|
+
|
|
58
|
+
Retain applicable Gate observations for the planned independent review. A valid pass remains available to that review. Do not require an invented output for a step whose checked pass condition permits no write.
|
|
59
|
+
|
|
60
|
+
## Gate observations
|
|
61
|
+
|
|
62
|
+
Retain the actual command, purpose, status and observed result, including an available exit or signal outcome. For test commands retain actual executed case counts and their evidence. For non-test commands use execution/result evidence with no invented case counts.
|
|
63
|
+
|
|
64
|
+
Keep the artifact reference and any available outcome. Unknown exit, counts or evidence remain unknown. Actual FAIL, UNRUN and pending results cannot become PASS through step metadata, a declaration or a read receipt. Existing delegated transport is not formal completion; its pending result stays visible until actual evidence arrives.
|
|
65
|
+
|
|
66
|
+
UNVERIFIED is an assessment in the human comparison. It adds no state or field to the public verification output. Preserve the existing command result and required gates rather than replacing them with this assessment.
|
|
67
|
+
|
|
68
|
+
## Recover existing receipts safely
|
|
69
|
+
|
|
70
|
+
Inspect existing receipts and recover available target-bound proof before deciding what is genuinely owed. Do not repeat an irreversible or external action merely to manufacture evidence. A missing reference can often be repaired by linking a receipt that already exists.
|
|
71
|
+
|
|
72
|
+
If proof is unavailable or cannot be recovered safely, keep the blocker, owner and resume condition. Resume only genuinely owed work with existing covered authority through its current owner procedure. Gathering observations does not grant new action permission.
|
|
73
|
+
|
|
74
|
+
## Native read-only example
|
|
75
|
+
|
|
76
|
+
This optional example invokes existing native Git reads, not a new QFAI command.
|
|
77
|
+
Review the local checkout, full source identifier and tracked text artifact path before use.
|
|
78
|
+
Read only text already cleared for this report; do not dump secrets or publish its contents automatically.
|
|
79
|
+
Save the block in an owned temporary `.mjs` file and supply those three arguments in that order.
|
|
80
|
+
Binary verification and unreviewed inputs are outside this example.
|
|
81
|
+
|
|
82
|
+
The reads are bounded to 1 MiB of output and 10 seconds each. Repository override environment variables are excluded, optional index writes are disabled, and the status read uses no filesystem monitor. A bounded or failed read can leave partial evidence; do not treat it as a complete receipt.
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
import { spawnSync } from "node:child_process";
|
|
86
|
+
|
|
87
|
+
const [checkout, source, artifact] = process.argv.slice(2);
|
|
88
|
+
if (!checkout || !source || !artifact) {
|
|
89
|
+
process.stderr.write("Supply the reviewed checkout, source and tracked artifact.\n");
|
|
90
|
+
process.exit(1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (![40, 64].includes(source.length) || /[^0-9a-f]/i.test(source)) {
|
|
94
|
+
process.stderr.write("Supply a full 40- or 64-digit hexadecimal source identifier.\n");
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const env = Object.fromEntries(
|
|
99
|
+
Object.entries(process.env).filter(([key]) => !key.toUpperCase().startsWith("GIT_")),
|
|
100
|
+
);
|
|
101
|
+
const reads = [
|
|
102
|
+
["rev-parse", "--verify", "HEAD"],
|
|
103
|
+
["status", "--porcelain=v1", "--untracked-files=no"],
|
|
104
|
+
["show", `${source}:${artifact}`],
|
|
105
|
+
];
|
|
106
|
+
for (const args of reads) {
|
|
107
|
+
const result = spawnSync(
|
|
108
|
+
"git",
|
|
109
|
+
["--no-optional-locks", "-c", "core.fsmonitor=false", "-C", checkout, ...args],
|
|
110
|
+
{ encoding: "utf8", env, maxBuffer: 1024 * 1024, timeout: 10_000 },
|
|
111
|
+
);
|
|
112
|
+
process.stdout.write(`git ${args[0]} exit: ${result.status ?? "unavailable"}\n`);
|
|
113
|
+
process.stdout.write(result.stdout ?? "");
|
|
114
|
+
process.stderr.write(result.stderr ?? "");
|
|
115
|
+
if (result.error) process.stderr.write(`${result.error.message}\n`);
|
|
116
|
+
if (result.signal) process.stderr.write(`Signal: ${result.signal}\n`);
|
|
117
|
+
if (result.error || result.signal || result.status !== 0) process.exitCode = 1;
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The example reports raw read outcomes.
|
|
122
|
+
Its zero exit does not complete a plan step.
|
|
123
|
+
Compare the observed current HEAD with the requested source and the actual target/purpose before using the artifact.
|
|
124
|
+
A missing artifact read is failed evidence collection, not proof that its required action was omitted.
|
|
125
|
+
Successful reads and unchanged files do not establish a `Passes when` decision; the owner records that actual decision separately.
|
|
126
|
+
|
|
127
|
+
## Existing review and limits
|
|
128
|
+
|
|
129
|
+
The already-planned independent reviewer assesses the reached work it reviews against actual observations and reports unresolved proof without an extra review or gate. Preserve reviewer independence, count, route and plan order. The comparison changes none of the selected scope, termination, pass-through, authority or required gate obligations.
|
|
130
|
+
|
|
131
|
+
No engine, command, plan key, runtime schema, ledger, registry or automatic obedience detector is introduced.
|
|
132
|
+
Reports remain existing human artifacts.
|
|
133
|
+
A passing instruction fixture does not prove host understanding or adherence, and the native read example proves only its observed reads and outcomes.
|
|
134
|
+
Missing or stale observations can still leave work UNVERIFIED; no automatic or zero-cost conformance claim is made.
|
|
@@ -4,13 +4,16 @@ What `qfai-run` does at a step the plan marks with a release point, a decision p
|
|
|
4
4
|
|
|
5
5
|
## Release point
|
|
6
6
|
|
|
7
|
-
Before a step `releasePoint` names runs, ask the user to approve the release; where it is `end`, ask once the last stage's gates have passed
|
|
8
|
-
`
|
|
7
|
+
Before a step `releasePoint` names runs, ask the user to approve the release; where it is `end`, ask once the last stage's gates have passed.
|
|
8
|
+
Record the approval as step 7 of `SKILL.md` says: a `decisions.md` row the run writes, or, when the release change is produced outside this run, the final report, with the row appended by the next change that touches `decisions.md`.
|
|
9
|
+
Rerun the gates over any row written. `verify-commit` runs after that, so the commit holds any approval row written. Nothing after it
|
|
9
10
|
runs without the approval, which authorizes no push, merge, tag or publication.
|
|
10
11
|
|
|
11
|
-
After approval at a handoff release point, `qfai-run`
|
|
12
|
-
|
|
12
|
+
After approval at a handoff release point, `qfai-run` records the approval as
|
|
13
|
+
step 7 says before `triage-handoff` runs. Every triage step
|
|
13
14
|
still changes no tracked file. No handed-off operation runs on the user's behalf.
|
|
15
|
+
After approval at a release point before `triage-operate`, that step carries
|
|
16
|
+
out only what its `## A delegated release` section allows.
|
|
14
17
|
|
|
15
18
|
## Decision point
|
|
16
19
|
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import { accessSync, constants, readFileSync, statSync } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import process from "node:process";
|
|
5
|
+
|
|
6
|
+
function failure(label, error, recovery) {
|
|
7
|
+
const reason = error?.code ?? error?.name ?? "unavailable";
|
|
8
|
+
process.stderr.write(`${label}: ${reason}. ${recovery}\n`);
|
|
9
|
+
return 1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function run(command, args, cwd, label) {
|
|
13
|
+
const result = spawnSync(command, args, { cwd, shell: false, stdio: "inherit" });
|
|
14
|
+
if (result.error)
|
|
15
|
+
return failure(
|
|
16
|
+
`${label} could not start`,
|
|
17
|
+
result.error,
|
|
18
|
+
"Check that the executable is available and the target cwd is readable, then rerun dependency preparation.",
|
|
19
|
+
);
|
|
20
|
+
if (result.signal) {
|
|
21
|
+
process.stderr.write(
|
|
22
|
+
`${label} ended on signal ${result.signal}. Review the failed command output and resolve its cause before rerunning dependency preparation.\n`,
|
|
23
|
+
);
|
|
24
|
+
return 1;
|
|
25
|
+
}
|
|
26
|
+
if (result.status !== 0) {
|
|
27
|
+
process.stderr.write(
|
|
28
|
+
`${label} exited ${result.status ?? "without an exit code"}. Review the failed command output and resolve its cause before rerunning dependency preparation.\n`,
|
|
29
|
+
);
|
|
30
|
+
return result.status ?? 1;
|
|
31
|
+
}
|
|
32
|
+
return 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function filePresent(file) {
|
|
36
|
+
try {
|
|
37
|
+
return statSync(file).isFile();
|
|
38
|
+
} catch (error) {
|
|
39
|
+
if (error?.code === "ENOENT") return false;
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function prepare() {
|
|
45
|
+
const args = process.argv.slice(2);
|
|
46
|
+
if (args.length < 4 || args[0] !== "--cwd" || args[2] !== "--" || !args[3]) {
|
|
47
|
+
process.stderr.write("Supply --cwd <absolute-checkout> -- <executable> [argument...].\n");
|
|
48
|
+
return 1;
|
|
49
|
+
}
|
|
50
|
+
const cwd = args[1];
|
|
51
|
+
if (!path.isAbsolute(cwd)) {
|
|
52
|
+
process.stderr.write("The cwd must be an absolute project directory.\n");
|
|
53
|
+
return 1;
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
if (!statSync(cwd).isDirectory()) {
|
|
57
|
+
process.stderr.write("The cwd must be a readable project directory.\n");
|
|
58
|
+
return 1;
|
|
59
|
+
}
|
|
60
|
+
accessSync(cwd, constants.R_OK);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
return failure(
|
|
63
|
+
"Cannot read the cwd directory",
|
|
64
|
+
error,
|
|
65
|
+
"Supply a readable absolute checkout directory, then rerun dependency preparation.",
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const installed = run(args[3], args.slice(4), cwd, "Installation");
|
|
70
|
+
if (installed !== 0) return installed;
|
|
71
|
+
|
|
72
|
+
let proof = "local binary";
|
|
73
|
+
try {
|
|
74
|
+
if (!filePresent(path.join(cwd, "node_modules", ".bin", "qfai"))) {
|
|
75
|
+
const marker = [".pnp.cjs", ".pnp.loader.mjs"].some((name) =>
|
|
76
|
+
filePresent(path.join(cwd, name)),
|
|
77
|
+
);
|
|
78
|
+
if (!marker) {
|
|
79
|
+
process.stderr.write(
|
|
80
|
+
"The target checkout has no canonical qfai launcher. Check that the reviewed target declares qfai and that the installation prepares its canonical qfai launcher before rerunning dependency preparation.\n",
|
|
81
|
+
);
|
|
82
|
+
return 1;
|
|
83
|
+
}
|
|
84
|
+
const manifest = JSON.parse(readFileSync(path.join(cwd, "package.json"), "utf8"));
|
|
85
|
+
if (!manifest?.dependencies?.qfai && !manifest?.devDependencies?.qfai) {
|
|
86
|
+
process.stderr.write("The target PnP project must declare qfai as a dependency.\n");
|
|
87
|
+
return 1;
|
|
88
|
+
}
|
|
89
|
+
const confirmed = run(
|
|
90
|
+
"yarn",
|
|
91
|
+
["exec", "qfai", "--help"],
|
|
92
|
+
cwd,
|
|
93
|
+
"Canonical launcher confirmation",
|
|
94
|
+
);
|
|
95
|
+
if (confirmed !== 0) return confirmed;
|
|
96
|
+
proof = "Plug'n'Play";
|
|
97
|
+
}
|
|
98
|
+
} catch (error) {
|
|
99
|
+
return failure(
|
|
100
|
+
"Canonical qfai launcher proof failed",
|
|
101
|
+
error,
|
|
102
|
+
"Check the target package.json and canonical qfai launcher, then rerun dependency preparation.",
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
process.stdout.write(`Dependency preparation succeeded in ${cwd} (${proof}).\n`);
|
|
106
|
+
return 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
try {
|
|
110
|
+
process.exitCode = prepare();
|
|
111
|
+
} catch (error) {
|
|
112
|
+
process.exitCode = failure(
|
|
113
|
+
"Dependency preparation failed",
|
|
114
|
+
error,
|
|
115
|
+
"Check the target cwd and reviewed installation command, then rerun dependency preparation.",
|
|
116
|
+
);
|
|
117
|
+
}
|
|
@@ -30,7 +30,8 @@ No cycle runs when:
|
|
|
30
30
|
## The finder
|
|
31
31
|
|
|
32
32
|
The finder is a sub-agent, such as a `test-design-analyst`, that wrote none of
|
|
33
|
-
the BRs it reads. It
|
|
33
|
+
the BRs it reads. The orchestrator starts it; a stage worker starts none. It
|
|
34
|
+
reads:
|
|
34
35
|
|
|
35
36
|
- each BR whose Statement or Examples cell this invocation wrote or changed;
|
|
36
37
|
- the EXs each of those BRs cites;
|
|
@@ -53,7 +53,7 @@ Discussion UI/UX files are **non-normative** discovery / reference artifacts —
|
|
|
53
53
|
not only where the attribute is written out — a framework that builds the
|
|
54
54
|
attribute from a variable still writes the marker somewhere.
|
|
55
55
|
- **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.
|
|
56
|
-
- **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.
|
|
56
|
+
- **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.
|
|
57
57
|
- **A contract's ID comes from its directory.** `api/` holds `API` contracts,
|
|
58
58
|
`db/` `DB` and `ui/` `UI`; the QFAI repository's own `cli/` holds `CLI`
|
|
59
59
|
contracts. The ID is `<KIND>-NNNN`.
|
|
@@ -25,9 +25,10 @@ this flow's provenance names:
|
|
|
25
25
|
| `uiux/00_index.md`, `uiux/40_screen_contracts.md` | the screen-level sidecars |
|
|
26
26
|
|
|
27
27
|
`01_Context.md#Design Direction` is the decision the user made: the adopted
|
|
28
|
-
theme, what departs from it, and what stays ordinary.
|
|
29
|
-
|
|
30
|
-
which is the same rule an
|
|
28
|
+
theme, what departs from it, and what stays ordinary. For initial authoring of
|
|
29
|
+
a missing file, a UI-bearing pack that records no design direction leaves the
|
|
30
|
+
brand unchosen — stop and ask rather than pick one, which is the same rule an
|
|
31
|
+
imported specification gets.
|
|
31
32
|
|
|
32
33
|
Each registry entry carries what was adopted, what was rejected, and how it
|
|
33
34
|
was translated. The competitor registry feeds brand and tokens; the component
|
|
@@ -116,7 +117,19 @@ to touch a colour has nothing to be consistent with.
|
|
|
116
117
|
|
|
117
118
|
## When the file already exists
|
|
118
119
|
|
|
119
|
-
`npx qfai init`
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
`npx qfai init` writes no root `DESIGN.md`; the sample is shipped only as a
|
|
121
|
+
skill template. A root file that exists was authored by `common-design-md` or
|
|
122
|
+
copied from that template on purpose, and a project may have authored its own.
|
|
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, and a new WIP change request authorizes both. Apply
|
|
125
|
+
only the authorized change; preserve existing brand and tokens unless their
|
|
126
|
+
change is authorized and supported by recorded direction or named theme
|
|
127
|
+
values. Record the source of each changed value and leave unrelated content
|
|
128
|
+
unchanged. Stop without writing a value neither source supplies. Without that
|
|
129
|
+
authorization, validate the existing file without an overwrite; an inherited
|
|
130
|
+
DONE row authorizes no new change. An unreplaced sample is refused.
|
|
131
|
+
|
|
132
|
+
For an existing valid file, validation and authorized repairs that preserve
|
|
133
|
+
its brand and tokens require no new brand selection. An authorized brand or
|
|
134
|
+
token change still needs recorded direction or named theme values for each
|
|
135
|
+
changed value; without either source, stop without writing the change.
|
|
@@ -49,7 +49,7 @@ questions in open-questions.md. In --auto, ask nothing and stop dependent work.
|
|
|
49
49
|
A layer is a group of modules whose dependencies point one way: down. The section draws the layers as one `flowchart TD`, then lists them in the table from the uppermost down, and the two name the same layers and edges.
|
|
50
50
|
Implementation places new code by that table and reviewers judge a change against it, as the `Architecture` section of the spec traceability rules states.
|
|
51
51
|
2. Write 02_business-flow/business-flows.md and the affected business-flow-NNNN/business-flow.md files. Each flow's `## Flow` section is exactly one Mermaid flowchart or sequenceDiagram.
|
|
52
|
-
3. Allocate BF and US IDs from the highest existing ID in their scopes, counting retired IDs named in decisions rows. Add rows to the flow and story indexes.
|
|
52
|
+
3. Allocate BF and US IDs from the highest existing ID in their scopes, counting retired IDs named in decisions rows and the IDs open pull requests add. Add rows to the flow and story indexes.
|
|
53
53
|
|
|
54
54
|
## Stage 3: concrete stories
|
|
55
55
|
|
|
@@ -67,7 +67,7 @@ questions in open-questions.md. In --auto, ask nothing and stop dependent work.
|
|
|
67
67
|
|
|
68
68
|
## Concrete-abstract cycle
|
|
69
69
|
|
|
70
|
-
When Stage 4 wrote or changed a BR Statement or Examples cell, run the concrete-abstract cycle before the gate: a sub-agent that wrote none of the BRs raises findings against the tree, the session agent decides them, the adopted changes are applied, and the affected BRs are rewritten. At most two cycles run.
|
|
70
|
+
When Stage 4 wrote or changed a BR Statement or Examples cell, run the concrete-abstract cycle before the gate: a sub-agent that wrote none of the BRs, started by the orchestrator and never by a stage worker, raises findings against the tree, the session agent decides them, the adopted changes are applied, and the affected BRs are rewritten. At most two cycles run.
|
|
71
71
|
|
|
72
72
|
## Stage 5: gate, review, and completion
|
|
73
73
|
|
|
@@ -10,7 +10,7 @@ Use these checkpoints with the ordered stages of the SDD steps. A checked item r
|
|
|
10
10
|
- Only an approved change request, a declined change request, a critical decision the user made, and a justified `Test exception:` row are decision rows; a declined change request is a REJECTED `Change request:` row. Open questions are open-questions.md rows. An existing REJECTED row stays as it is.
|
|
11
11
|
- Both tables have exactly ID, Content, Approach, Status. Existing rows are unchanged except Status.
|
|
12
12
|
- Approval-required rows have the user's decision before any dependent write. Under --auto, pending approvals stopped the run without an invented approval.
|
|
13
|
-
- New IDs use highest-in-scope plus one, including retired IDs in decision rows.
|
|
13
|
+
- New IDs use highest-in-scope plus one, including retired IDs in decision rows and the IDs open pull requests add.
|
|
14
14
|
|
|
15
15
|
## Policy and business flow
|
|
16
16
|
|
|
@@ -56,7 +56,7 @@ Follow the cycle the `sdd-cycle` step sets out.
|
|
|
56
56
|
- Every affected BF passed npx qfai validate --profile sdd --fail-on error --flow BF-NNNN with error=0.
|
|
57
57
|
- Every document written passes its document schema. A failure was fixed by reshaping the document, not by adding to it.
|
|
58
58
|
- The log path and result for each BF are in the SDD report.
|
|
59
|
-
- Each entered design-writing stage has a pre-draft grilling checkpoint before its first mutation. The final report lists each decision a checkpoint adopted; unanswered critical decisions remain open and block completion.
|
|
59
|
+
- Each entered design-writing stage has a pre-draft grilling checkpoint before its first mutation. A checkpoint that finds no open decision holds no session. The final report lists each decision a checkpoint adopted; unanswered critical decisions remain open and block completion.
|
|
60
60
|
- Reviewers are independent of the authors, and every finding of the one review is fixed or answered.
|
|
61
61
|
- Rejected options remain excluded, or a documented reopening decision exists.
|
|
62
62
|
- Remaining risks and next actions are explicit in the SDD report.
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Pre-draft Grilling
|
|
2
2
|
|
|
3
|
-
Before an SDD stage makes a design decision, the session agent gathers the stage's open decisions into one frontier
|
|
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-must`, using the `qfai-grilling` method. It asks the user each critical decision the frontier holds.
|
|
5
|
+
|
|
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.
|
|
4
7
|
|
|
5
8
|
## Checkpoints
|
|
6
9
|
|
|
@@ -15,6 +18,7 @@ The checkpoint occurs before this invocation's first design mutation in that sta
|
|
|
15
18
|
|
|
16
19
|
## Roles and disposition
|
|
17
20
|
|
|
21
|
+
- The orchestrator starts the griller; a stage worker starts none.
|
|
18
22
|
- Include the decisions of every role routed to draft the stage's artifacts in one frontier. Keep grilling and the final review apart: the reviewer reviews no decision it recommended.
|
|
19
23
|
- Read existing policy, decisions, open questions, discussion provenance, and current contracts before asking. Do not ask the user for facts already recorded there.
|
|
20
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 approval.
|