qfai 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +327 -55
- package/assets/defaults/agent-routing/qfai-triage.yml +9 -0
- package/assets/defaults/workflows/change-tooling.yml +0 -4
- package/assets/defaults/workflows/run-owned-cleanup.yml +12 -0
- package/assets/init/.claude/settings.json +27 -9
- package/assets/init/.codex/hooks.json +20 -8
- package/assets/init/.qfai/assistant/agent/frontend-engineer.md +5 -0
- package/assets/init/.qfai/assistant/agent/implementation-reviewer.md +14 -1
- package/assets/init/.qfai/assistant/agent/product-experience-architect.md +4 -0
- package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +7 -0
- package/assets/init/.qfai/assistant/agent/qa-gatekeeper.md +29 -0
- package/assets/init/.qfai/assistant/agent/requirements-analyst.md +8 -0
- package/assets/init/.qfai/assistant/rule/communication.md +18 -8
- package/assets/init/.qfai/assistant/rule/constitution.md +5 -4
- package/assets/init/.qfai/assistant/rule/drift-protocol.md +72 -5
- package/assets/init/.qfai/assistant/rule/references/asset-authoring.md +72 -0
- package/assets/init/.qfai/assistant/rule/references/context-summary.md +30 -0
- package/assets/init/.qfai/assistant/rule/references/gate-failure-autorepair.md +42 -0
- package/assets/init/.qfai/assistant/rule/references/griller-recommendations.md +23 -0
- package/assets/init/.qfai/assistant/rule/references/host-backstops.md +60 -0
- package/assets/init/.qfai/assistant/rule/references/placeholder-scan.md +25 -0
- package/assets/init/.qfai/assistant/rule/references/reviewer-findings.md +41 -0
- package/assets/init/.qfai/assistant/rule/references/reviewer-remit.md +35 -0
- package/assets/init/.qfai/assistant/rule/references/worker-edit-boundary.md +48 -0
- package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +39 -162
- package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +14 -145
- package/assets/init/.qfai/assistant/rule/stage-cost.md +1 -1
- package/assets/init/.qfai/assistant/rule/test-layers.md +42 -0
- package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +6 -1
- package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +11 -45
- package/assets/init/.qfai/assistant/skill/qfai-configure/references/principles.md +25 -0
- package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-completion-matrix.md +12 -9
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md +2 -4
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/platform_baselines.md +11 -0
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/review_audit_playbook.md +11 -0
- package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux_best_practices.md +13 -42
- package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/00_index.md +0 -16
- package/assets/init/.qfai/assistant/skill/qfai-grill/SKILL.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +16 -88
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/delegated-session.md +58 -0
- package/assets/init/.qfai/assistant/skill/qfai-grilling/references/session-record.md +42 -0
- package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +17 -4
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/credential-reuse.md +9 -0
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/cross-spec-ownership.md +41 -0
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/oracle-strength.md +6 -1
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +9 -1
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/red-admissibility.md +47 -1
- package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +4 -3
- package/assets/init/.qfai/assistant/skill/qfai-maintain/SKILL.md +4 -4
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +16 -10
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-guide.md +10 -260
- package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-placement.md +273 -0
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +5 -4
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/design-md-spec.md +14 -5
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +10 -0
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/handoff.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/iteration-loop.md +3 -4
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +12 -5
- package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +33 -4
- package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +34 -36
- package/assets/init/.qfai/assistant/skill/qfai-run/references/evidence-delivery.md +322 -0
- package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +67 -24
- package/assets/init/.qfai/assistant/skill/qfai-run/references/operator-screens.md +246 -5
- package/assets/init/.qfai/assistant/skill/qfai-run/references/plan.md +29 -5
- package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +43 -0
- package/assets/init/.qfai/assistant/skill/qfai-sdd/SKILL.md +5 -4
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/concrete-abstract-cycle.md +10 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +22 -9
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-anti-patterns.md +41 -6
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md +11 -5
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-brand-catalog.md +17 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/requirements-decomposition.md +10 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +34 -9
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-phase-checklists.md +4 -4
- 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 +177 -7
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +29 -5
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +130 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-design-contract-normalization.md +4 -30
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/change-request.md +39 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/db-contract.sample.sql +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/ui-contract.sample.yaml +52 -5
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/03_contract/cli/cli-NNNN-title.md +2 -2
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/03_contract/tech.md +1 -1
- package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +7 -0
- package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +30 -20
- package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +6 -5
- package/assets/init/.qfai/assistant/skill/qfai-verify/references/context-load.md +9 -6
- package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +92 -13
- package/assets/init/.qfai/assistant/skill/web-research/SKILL.md +37 -31
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/brave-search/config.toml +2 -4
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/brave-search/mcp-config.json +9 -5
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/firecrawl/.mcp.json +1 -2
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/firecrawl/config.toml +3 -3
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/firecrawl/mcp-config.json +11 -8
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/playwright/config.toml +1 -1
- package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/playwright/mcp-config.json +7 -3
- package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +17 -7
- package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +126 -13
- package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +3 -2
- package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +1 -0
- package/assets/init/.qfai/assistant/step/discussion-research/STEP.md +2 -0
- package/assets/init/.qfai/assistant/step/discussion-uiux/STEP.md +12 -4
- package/assets/init/.qfai/assistant/step/implement-backport/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/implement-benchmark/STEP.md +7 -4
- package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +11 -1
- package/assets/init/.qfai/assistant/step/implement-diagnose/STEP.md +2 -0
- package/assets/init/.qfai/assistant/step/implement-oracle-parity/STEP.md +2 -2
- package/assets/init/.qfai/assistant/step/implement-quarantine/STEP.md +3 -3
- package/assets/init/.qfai/assistant/step/implement-refactor/STEP.md +2 -2
- package/assets/init/.qfai/assistant/step/implement-regression-fix/STEP.md +4 -3
- package/assets/init/.qfai/assistant/step/implement-retire/STEP.md +6 -3
- package/assets/init/.qfai/assistant/step/implement-revert/STEP.md +4 -3
- package/assets/init/.qfai/assistant/step/implement-scaffold/STEP.md +3 -3
- package/assets/init/.qfai/assistant/step/implement-seam/STEP.md +9 -6
- package/assets/init/.qfai/assistant/step/implement-stress-harness/STEP.md +1 -1
- package/assets/init/.qfai/assistant/step/implement-sweep/STEP.md +4 -3
- package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +42 -6
- package/assets/init/.qfai/assistant/step/implement-test-fix/STEP.md +2 -0
- package/assets/init/.qfai/assistant/step/implement-tooling/STEP.md +22 -2
- package/assets/init/.qfai/assistant/step/maintain-edit/STEP.md +18 -14
- package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +4 -3
- package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +4 -0
- package/assets/init/.qfai/assistant/step/prototyping-preflight/STEP.md +1 -3
- package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +11 -0
- package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +4 -0
- package/assets/init/.qfai/assistant/step/sdd-gate/STEP.md +4 -0
- package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +10 -0
- package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +37 -11
- package/assets/init/.qfai/assistant/step/triage-answer/STEP.md +5 -4
- package/assets/init/.qfai/assistant/step/triage-close/STEP.md +33 -23
- package/assets/init/.qfai/assistant/step/triage-cluster/STEP.md +5 -3
- package/assets/init/.qfai/assistant/step/triage-decompose/STEP.md +2 -0
- package/assets/init/.qfai/assistant/step/triage-dedupe/STEP.md +4 -0
- package/assets/init/.qfai/assistant/step/triage-handoff/STEP.md +13 -4
- package/assets/init/.qfai/assistant/step/triage-investigate/STEP.md +8 -5
- package/assets/init/.qfai/assistant/step/triage-owned-cleanup/STEP.md +86 -0
- package/assets/init/.qfai/assistant/step/triage-request-info/STEP.md +2 -0
- package/assets/init/.qfai/assistant/step/triage-security-intake/STEP.md +6 -3
- package/assets/init/.qfai/assistant/step/verify-change-note/STEP.md +9 -5
- package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +39 -6
- package/assets/init/.qfai/assistant/step/verify-external/STEP.md +5 -2
- package/assets/init/.qfai/assistant/step/verify-qfai-gate/STEP.md +10 -2
- package/assets/init/.qfai/assistant/step/verify-release-notes/STEP.md +1 -0
- package/assets/init/.qfai/assistant/step/verify-repeat-run/STEP.md +7 -5
- package/assets/init/.qfai/assistant/step/verify-repo-gate/STEP.md +136 -28
- package/assets/init/.qfai/waivers.yml +1 -1
- package/assets/init/root/.agents/rules/ai-readable-markdown.md +98 -0
- package/assets/init/root/.agents/rules/api-budget.md +191 -13
- package/assets/init/root/.agents/rules/documentation-clarity.md +192 -35
- package/assets/init/root/.agents/rules/grilling.md +4 -4
- package/assets/init/root/.agents/rules/interface-clarity.md +5 -5
- package/assets/init/root/.agents/rules/minimal-implementation.md +11 -3
- package/assets/init/root/.agents/rules/reminders.json +27 -14
- package/assets/init/root/.agents/rules/session-feedback.md +136 -0
- package/assets/init/root/.agents/rules/temporary-files.md +47 -5
- package/assets/init/root/.agents/rules/untrusted-content.md +3 -3
- package/assets/init/root/.agents/rules/user-questions.md +74 -36
- package/assets/init/root/.gitattributes +9 -0
- package/assets/init/root/.github/workflows/qfai-docs.yml +44 -12
- package/assets/init/root/.github/workflows/qfai-tests.yml +58 -15
- package/assets/init/root/.github/workflows/qfai-validate.yml +49 -42
- package/assets/init/root/AGENTS.md +23 -21
- package/assets/mdschema/story/03_contract/tech.mdschema.yml +7 -3
- package/assets/sandbox-templates/default-deny.yaml +9 -5
- package/assets/schemas/workflow/extraction.schema.json +85 -5
- package/assets/schemas/workflow/plan.schema.json +9 -2
- package/assets/scripts/check-mdschema.mjs +172 -5
- package/assets/uix-rev/comparison-review.md +1 -1
- package/assets/uix-rev/contracts-review.md +1 -2
- package/dist/cli/index.cjs +6499 -7688
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +6449 -7641
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.cjs +5548 -7823
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -666
- package/dist/index.d.ts +40 -666
- package/dist/index.mjs +5397 -7648
- package/dist/index.mjs.map +1 -1
- package/docs/MIGRATION-2.0.0.md +1 -1
- package/package.json +5 -7
- package/assets/init/root/CLAUDE.md +0 -45
|
@@ -4,70 +4,11 @@ Use this document to keep SKILL bodies compact. Skill files should reference thi
|
|
|
4
4
|
|
|
5
5
|
## Asset Authoring Shape (Mandatory)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- **Keep in `SKILL.md`**: what the skill is for, its non-goals, its hard constraints, the phase/step order, and the gate conditions. Enough for an agent to know what it must do and when it is done.
|
|
10
|
-
- **Move out**: command sets, table schemas, field-by-field contracts, worked procedures, checklists and rationale. These go under the owning tree's own directory:
|
|
11
|
-
- `references/` — normative detail the body cites (`references/<topic>.md`)
|
|
12
|
-
- `templates/` — artifacts the file produces, as fillable skeletons
|
|
13
|
-
- `examples/` — worked instances that illustrate, and bind, nothing
|
|
14
|
-
- **One topic per file.** Do not replace an oversized `SKILL.md` with an oversized `references/everything.md`; that is the same problem one directory down. Split by topic and keep each file readable on its own — a reader who followed one pointer should not have to scan past three unrelated subjects to reach the one they came for.
|
|
15
|
-
- **Every pointer resolves.** A line that moves detail out must name the file (and anchor, when the file covers more than one topic) so the reader is never left guessing where the rule went.
|
|
16
|
-
|
|
17
|
-
A hard line ceiling backs this up: **800 lines per assistant asset file**, for every `.qfai/assistant/**/*.{md,yml,yaml}` file, counted as `content.split(/\r?\n/).length` — blank lines included. `npx qfai doctor` measures it and reports every file over the ceiling as `assets.lineBudget`. The ceiling is a backstop, not the rule: a file approaching it is a signal to move a section out, not
|
|
18
|
-
to raise the number.
|
|
19
|
-
|
|
20
|
-
It was raised from 500 once, and on measurement rather than on the "this file is long" claim the number exists to refuse: three skill bodies had converged on that ceiling, and the changes in flight against one of them added 161 lines to a body already at 498 — eleven of them crossing the ceiling on their own. The detail those bodies carry is required to sit in the body rather than behind
|
|
21
|
-
a pointer, so splitting could not absorb it. Converging on the limit was itself the signal — a body at the ceiling stops shedding topics and starts packing them into longer lines, and a line count cannot see that. Raise it again only against evidence of that kind.
|
|
22
|
-
|
|
23
|
-
**A width ceiling makes the count honest: 400 characters per line.** A count of lines bounds reading cost only while a line is a roughly constant unit of reading, and packing broke that — one line in the shipped tree ran 9,104 characters against a median of 118, and cost the budget one unit. The two are read together, because each permits what the other refuses: width alone allows a thin
|
|
24
|
-
file of a thousand short lines, and the count alone allows a packed one.
|
|
25
|
-
|
|
26
|
-
Two shapes are not measured, and for the same reason — the author cannot make them narrower:
|
|
27
|
-
|
|
28
|
-
| not measured | why |
|
|
29
|
-
| -------------- | --------------------------------------------------------- |
|
|
30
|
-
| a table row | markdown gives it no continuation, so it cannot wrap |
|
|
31
|
-
| a fenced block | its content is a command, a diagram or a sample, verbatim |
|
|
32
|
-
|
|
33
|
-
A table is found by its delimiter row, not by a leading pipe: that pipe is optional, so a table written without one is still a table, and a paragraph that opens with one is still a paragraph. Rows a blank line has cut off from their delimiter are prose, because that is how they render.
|
|
34
|
-
|
|
35
|
-
Some shipped files predate the ceiling and carry a recorded width of their own. It is the width each arrives with, so `npx qfai doctor` does not report a fresh tree for content you received rather than wrote. That record belongs to the package and shrinks there; it is not a per-project allowance, and it never loosens the ceiling on an asset you write. **Everything you author is held
|
|
36
|
-
at 400.**
|
|
37
|
-
|
|
38
|
-
The exemption from the line ceiling does not carry here. Its reason is about a file's length, not about how wide one line may be.
|
|
39
|
-
|
|
40
|
-
No shipped prose asset has a line-ceiling exemption. Agent definitions are
|
|
41
|
-
individual cards under `assistant/agent/`, so their count does not lengthen
|
|
42
|
-
one roster file.
|
|
43
|
-
|
|
44
|
-
### The owning tree is the one the file sits in
|
|
45
|
-
|
|
46
|
-
The ceiling applies to **every** shipped assistant prose asset, including
|
|
47
|
-
rules and cards. A rule at the ceiling moves topic detail to
|
|
48
|
-
`rule/references/<topic>.md`; a skill uses its own `references/` directory.
|
|
49
|
-
The tree that owns the file owns its detail.
|
|
50
|
-
|
|
51
|
-
For a prose asset, raising the ceiling or claiming an exemption is not the remedy. An exemption claims no split is possible, and a Markdown file whose tree has a `references/` home available cannot make that claim.
|
|
52
|
-
|
|
53
|
-
### Machine-readable assets split in their own format, or say why they cannot
|
|
54
|
-
|
|
55
|
-
The ceiling is measured over YAML assets too — package routing and review-profile defaults and the shipped contract templates. The split above is not open to them: a validator parses those files as structured data, or a skill copies one whole into a project, so an entry moved into a Markdown sibling under `references/` leaves the parsed document and stops meaning anything. Prose about the
|
|
56
|
-
file may move there; the file's own items may not.
|
|
57
|
-
|
|
58
|
-
So for a machine-readable asset at the ceiling the remedy is, in order:
|
|
59
|
-
|
|
60
|
-
1. **Split it in its own format** — a sibling of the same kind that the loader or schema already reads, so every item stays parsed.
|
|
61
|
-
2. **Record an exemption** where the document has to stay whole — a file generated from another asset, one the schema admits only as a single document — naming what makes the split impossible. "This file is long" is not that reason, and a prose asset may not use this step.
|
|
7
|
+
Read `.qfai/assistant/rule/references/asset-authoring.md` when you write or change a file under `.qfai/assistant/**` or another shipped asset, including its citation paths. It holds the shape every asset takes, which tree owns a file, how machine-readable assets split, and the form of a citation path. Not needed for a run that only reads assets or edits project files.
|
|
62
8
|
|
|
63
9
|
## Citation Path Form (Mandatory)
|
|
64
10
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- **Cite a shared rule by its full path from the project root.** Write the path from the project root, with `#anchor` appended when one applies: `.qfai/assistant/rule/drift-protocol.md`. Not the bare filename, not a relative climb. That form resolves from every directory in the tree,
|
|
68
|
-
and the only one that still resolves when read with the cwd at the project root — which is where an agent's cwd is.
|
|
69
|
-
- **The same holds when a rule cites another one**, including a sibling in its own directory. A bare name works there only by accident of where the citing file sits; it stops working the moment the text is quoted elsewhere.
|
|
70
|
-
- **Within a skill's own directory, keep pointers relative to that directory**: `references/<topic>.md`, `templates/<name>.md`. Those name the skill's own parts, not a shared document, and the surrounding text already establishes which skill is meant.
|
|
11
|
+
The form of a citation path is in `.qfai/assistant/rule/references/asset-authoring.md`, read under the same condition as the section above.
|
|
71
12
|
|
|
72
13
|
## User Questions (AskUserQuestion Protocol)
|
|
73
14
|
|
|
@@ -255,9 +196,9 @@ the policy check. The mode is `workflow.mode` in `qfai.config.yaml`. An absent k
|
|
|
255
196
|
needs the operator's answer.
|
|
256
197
|
- A QFAI work order binds the stage to its target: one business flow, or one
|
|
257
198
|
new-story slot. The stage works on that target and no other.
|
|
258
|
-
- The
|
|
259
|
-
|
|
260
|
-
|
|
199
|
+
- The session report names the agent instance that authored the work and
|
|
200
|
+
each independent reviewer. The author never counts as the work's
|
|
201
|
+
independent reviewer.
|
|
261
202
|
- These statements add to the constitution. They except no article.
|
|
262
203
|
|
|
263
204
|
## Running Steps (Mandatory)
|
|
@@ -327,12 +268,12 @@ writes nothing and states why; the stage's review reads that statement.
|
|
|
327
268
|
|
|
328
269
|
## Default Autopilot Policy inside a run
|
|
329
270
|
|
|
330
|
-
Inside a run,
|
|
331
|
-
satisfied by one kind of authorization the run records:
|
|
271
|
+
Inside a run, record the authorization for each bucket in the session report:
|
|
332
272
|
|
|
333
|
-
- An `ask-user` item is satisfied only by
|
|
334
|
-
|
|
335
|
-
|
|
273
|
+
- An `ask-user` item is satisfied only by the operator's answer to it.
|
|
274
|
+
Name that answer and its source; an agent's choice is not an operator answer.
|
|
275
|
+
- A `hard-required` input is satisfied by the operator's request or by the
|
|
276
|
+
run's binding. Name the request or work order that supplies it.
|
|
336
277
|
- An `auto-decide` item needs no authorization.
|
|
337
278
|
- `--auto` satisfies nothing. It answers no `ask-user` item and supplies no
|
|
338
279
|
`hard-required` input.
|
|
@@ -351,69 +292,11 @@ can resolve stops at preflight.
|
|
|
351
292
|
|
|
352
293
|
## Gate Failure Autorepair Protocol
|
|
353
294
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
- inspect exit code, logs, `validate.json`, and cited files before reporting — in `validate.json`, read `counts` for the verdict and `issues[].code` for each finding; the array is `issues`, not `findings` (keys: `.qfai/assistant/skill/qfai-verify/references/validate-json-schema.md`);
|
|
357
|
-
- classify each finding as skill-owned artifact, upstream spec/contract, code/test defect, environment/tooling, or user decision;
|
|
358
|
-
- fix skill-owned artifacts and code/test defects autonomously when the fix is local and non-destructive;
|
|
359
|
-
- **upstream spec/contract findings: never repair.** STOP and follow `.qfai/assistant/rule/drift-protocol.md` (Change Request + owner-skill rerun) — **even when the fix looks local and non-destructive, and even when it is one token and obviously correct**. "Local and non-destructive" is a permission for the two classes above it; it is not a test that upstream artifacts can pass.
|
|
360
|
-
Ownership, not size, decides;
|
|
361
|
-
- environment/tooling findings: repair the environment when it is yours to repair (install a missing dev dependency, regenerate a lockfile, create a scratch directory). Stop for anything needing credentials, network access you do not have, or a change to CI configuration or the host machine;
|
|
362
|
-
- user decision findings: never decide by default. Record the question, state the option you would take and why, and stop — a decision taken silently to keep a gate green is the same failure as repairing upstream, one layer up;
|
|
363
|
-
- rerun the same failing gate after each fix batch, **and once with no intervening change** when the failure looks nondeterministic — see `#nondeterministic-gates` below. The confirmation rerun is bounded at one: after it the finding is classified, not re-rolled;
|
|
364
|
-
- do not weaken profiles, lower `--fail-on`, waive errors, invent evidence, or skip required reviewers;
|
|
365
|
-
- stop for destructive changes, **any upstream spec/contract finding**, ambiguous product/spec decisions, missing permissions/tools, or repeated no-progress failures — the stop list is closed over the classification above, so every class the agent is told to use has a defined next action;
|
|
366
|
-
|
|
367
|
-
When stopping, report: cause, attempted fixes, remaining blocker, user action, retry gate, and **the work counts — how many items are complete, how many are blocked, and by which finding**.
|
|
368
|
-
|
|
369
|
-
The counts are not decoration. Restating the ownership rule does not change the incentive that breaks it: an agent facing "repair five upstream defects or report most of the batch as blocked" reaches for the repair because the alternative reads as failure. `26 items: 21 complete, 5 blocked on DB-0007` is a report of work done, and it is what makes STOP a credible answer rather than a
|
|
370
|
-
surrender. Blocked is a status, not a verdict on the run.
|
|
371
|
-
|
|
372
|
-
### Nondeterministic gates
|
|
373
|
-
|
|
374
|
-
A gate whose answer varies on identical inputs is a finding in its own right, not a run to discard. The protocol classifies it as `environment/tooling`; what follows is what that class obliges.
|
|
375
|
-
|
|
376
|
-
**When a gate fails and a rerun with no intervening change passes**, all of the following are REQUIRED. A clean rerun on its own is not evidence for that gate.
|
|
377
|
-
|
|
378
|
-
- **Record it as an `environment/tooling` finding.** Not as a pass, and not as a code/test defect — nothing was fixed between the two runs.
|
|
379
|
-
- **Disclose every run.** Report the results of all runs of that gate, in order, with their commands. Reporting only the run that passed is [selective reporting](#selective-reporting-is-invented-evidence) and is forbidden: the evidence rules are satisfied by a clean run's command and output, so nothing else stops it.
|
|
380
|
-
- **Re-run the failing selectors in isolation** and report that result too. A selector that passes alone and fails in the suite is the signature of shared state, not of a defect in that test.
|
|
381
|
-
- **Name the suspected cause**, concretely: a contended port, a shared database or schema, an `os.tmpdir()` path, an un-namespaced cache or queue, ordering between workers. "Flaky" is not a cause.
|
|
382
|
-
|
|
383
|
-
Do not fix the flake by rerunning until green, and do not fix it by weakening the test. Either the shared resource is isolated per worker or the run is serialised — both are real changes with a real cost, which is the point.
|
|
384
|
-
|
|
385
|
-
A gate reported this way has **not passed**. It is a blocker with a named cause, and it goes in the stop report like any other.
|
|
386
|
-
|
|
387
|
-
#### Selective reporting is invented evidence
|
|
388
|
-
|
|
389
|
-
Reporting the clean run and omitting the red ones satisfies every existing evidence rule — a real command, a real result, freshly obtained — and still misrepresents what happened. Which of N runs is reported is itself part of the evidence, so omitting runs of the same gate is on the same footing as inventing one.
|
|
295
|
+
Read `.qfai/assistant/rule/references/gate-failure-autorepair.md` when a gate command fails or its result cannot be trusted. It holds the repair loop (inspect, classify, fix, rerun), the findings that are never repaired, when to stop and what to report, and how a gate that does not give the same answer twice is handled. Not needed while every gate passes.
|
|
390
296
|
|
|
391
297
|
## Context Summary Contract
|
|
392
298
|
|
|
393
|
-
|
|
394
|
-
needed to continue.
|
|
395
|
-
|
|
396
|
-
Every summary that replaces earlier context keeps these six:
|
|
397
|
-
|
|
398
|
-
1. Difficulties that came up, and how each was resolved.
|
|
399
|
-
2. Options raised, tried or set aside, and why.
|
|
400
|
-
3. Everything asked for, decided, agreed, ruled out or established as a constraint — in the exact words.
|
|
401
|
-
4. Where things stand: what is covered, settled or complete.
|
|
402
|
-
5. What is still open, promised or expected next.
|
|
403
|
-
6. Details that are hard to reconstruct: names, numbers, dates, exact wording, references.
|
|
404
|
-
|
|
405
|
-
It also keeps the stage state. None of it can be recovered from the code, and a summary that keeps the six and drops it still misleads the next window.
|
|
406
|
-
|
|
407
|
-
| Stage state | What goes wrong when it is dropped |
|
|
408
|
-
| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
409
|
-
| The execution ledger and the row in progress | Finished rows are worked again, or a row in `red` is taken for untouched |
|
|
410
|
-
| Every open question, with its ID and status | A question stays open with nobody tracking it, or is answered twice |
|
|
411
|
-
| The clarification budget spent in this invocation, and the questions it was spent on | The next window asks what the user already answered, or asks past the cap |
|
|
412
|
-
| Every assumption recorded under `--auto` or after the budget ran out, with its label | A labelled assumption is read back as a decision someone took |
|
|
413
|
-
| Whether the stage's review has run, and each finding's fix or answer | The review runs a second time, or an answered finding is raised again (`.qfai/assistant/rule/review-convergence.md`) |
|
|
414
|
-
| A grilling session's decision tree, its current frontier, and the answers already settled | An answered question is asked again, or a question is put before the one it depends on (`.agents/rules/grilling.md`) |
|
|
415
|
-
|
|
416
|
-
Keep what the user said close to their own words. Your own reasoning may be condensed to what it concluded, as long as nothing listed above is dropped. Be complete on these items even when that makes the summary longer.
|
|
299
|
+
Read `.qfai/assistant/rule/references/context-summary.md` when you hand work to a sub-agent or summarize a context for the next stage. It holds what a summary that replaces earlier context must keep. Not needed when no summary is written.
|
|
417
300
|
|
|
418
301
|
## Completion Contract (Shared)
|
|
419
302
|
|
|
@@ -433,22 +316,8 @@ report instead of the completion claim.
|
|
|
433
316
|
|
|
434
317
|
### What the placeholder scan does not flag
|
|
435
318
|
|
|
436
|
-
|
|
437
|
-
table header, and a question row containing the fields required by its register. Story-tree `open-questions.md` uses
|
|
438
|
-
`ID | Content | Approach | Status`; an empty register contains the heading and table header without a question row.
|
|
439
|
-
Discussion registers use their own template fields. A register row's Status is structure too: `TODO` in the Status cell of a
|
|
440
|
-
`decisions.md` or `open-questions.md` row is the row's state, not a placeholder. Article II and `.qfai/assistant/rule/workflow.md` both end an
|
|
441
|
-
unverifiable fact by recording an Open Question, so the tracked record they prescribe must never be reported as an
|
|
442
|
-
unresolved placeholder. Everywhere else the two strings are still scanned: a bare `OQ` or `OPEN QUESTION` left as a
|
|
443
|
-
value in generated spec prose or a contract field, or a row missing a required field, is a hit like any other token.
|
|
444
|
-
|
|
445
|
-
**A documented `TBD` is a compliant record.** `.qfai/assistant/rule/constitution.md` Article II and `.qfai/assistant/rule/thinking.md` require writing `TBD` together with a note of what evidence is missing, and `.qfai/assistant/rule/thinking.md` requires raising the matching Open Question for the same fact. Both halves together are the finished form, not an
|
|
446
|
-
unfinished one; do not report it and do not delete it — deleting it destroys the record of the missing evidence, which is the whole point of the marker. A `TBD` missing either half — no note, or no Open Question — is a hit.
|
|
319
|
+
Read `.qfai/assistant/rule/references/placeholder-scan.md` when the placeholder scan reports a hit or you decide a hit is not a defect. It lists what the scan does not flag and what a surviving hit obligates. Not needed while the scan reports nothing.
|
|
447
320
|
|
|
448
321
|
### What a surviving hit obligates
|
|
449
322
|
|
|
450
|
-
|
|
451
|
-
calls it. List every hit the re-scan still finds alongside the completion claim — file, line, token — and state for each one whether it is deferred with rationale or recorded as an Open Question. A completion claim that omits a surviving hit is invalid evidence under the rules above. Completion is blocked while a surviving hit is neither of the two.
|
|
452
|
-
|
|
453
|
-
**Severity floor on the verdict.** _Deferred with rationale_ and _recorded as an Open Question_ are NOT available for a hit that stands in for a concrete security defect, data loss or corruption, or a correctness defect that would break a released contract. Such a hit is cleared only by a named fix or by dropping the item from scope; recording it and declaring completion anyway is
|
|
454
|
-
prohibited, exactly as `.qfai/assistant/rule/shared-skill-delegation-baseline.md` withholds that same exit for that same class. While neither of the two remaining verdicts applies, completion stays blocked.
|
|
323
|
+
The obligation a surviving hit carries is in `.qfai/assistant/rule/references/placeholder-scan.md`, read under the condition above.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Stage Cost
|
|
2
2
|
|
|
3
|
-
What a stage costs, and the
|
|
3
|
+
What a stage costs, and the settings that change it: how deeply a model reasons
|
|
4
4
|
per step, how long the stage is given, and how much of a file an edit rewrites.
|
|
5
5
|
|
|
6
6
|
None of them is a cap. Where a hard limit is wanted, it is the per-request
|
|
@@ -26,6 +26,9 @@ locations; a file outside the selection does not establish coverage.
|
|
|
26
26
|
|
|
27
27
|
Exercise one unit's observable decisions without real infrastructure. A
|
|
28
28
|
`QFAI:EX-NNNN-NNNN-NN` annotation links a behavioral unit test to its example.
|
|
29
|
+
The annotation counts only on the comment line directly before the `it(`,
|
|
30
|
+
`test(` or `describe(` it marks, or the equivalent test declaration of another
|
|
31
|
+
framework; a file header or a comment inside a test body covers nothing.
|
|
29
32
|
|
|
30
33
|
### L2 Component
|
|
31
34
|
|
|
@@ -91,6 +94,45 @@ EX may need an additional focused test even when its parent AC or BF is
|
|
|
91
94
|
covered. Keep independently observable cases in separate tests so a failure
|
|
92
95
|
points to the behavior that changed.
|
|
93
96
|
|
|
97
|
+
## Test-suite sizing
|
|
98
|
+
|
|
99
|
+
Every source change still carries test coverage, and every obligation still
|
|
100
|
+
has its test. This section sizes that coverage. It never removes any.
|
|
101
|
+
|
|
102
|
+
- **Size a new test file like the ones next to it.** Aim for roughly one
|
|
103
|
+
focused test per stated behaviour.
|
|
104
|
+
- **Choose a process-per-case suite, never inherit one.** A suite that spawns a
|
|
105
|
+
process for every case is the shape that makes a CI lane expensive. Pick it
|
|
106
|
+
for the suite in hand, not because the file beside it has it.
|
|
107
|
+
- **A scratch check is not a deliverable.** Verify the work in progress any way
|
|
108
|
+
you like. Do not turn a scratch check into a permanent test file. Scratch
|
|
109
|
+
files go where `.agents/rules/temporary-files.md` puts them.
|
|
110
|
+
|
|
111
|
+
These are review signals, not gates. No validator reads them.
|
|
112
|
+
|
|
113
|
+
## End-to-end test cost
|
|
114
|
+
|
|
115
|
+
An end-to-end test is the slowest test a project runs, and a failing one costs
|
|
116
|
+
the most. A test that cannot find an element waits for its whole timeout, and
|
|
117
|
+
waits again for every retry. One failure costs the timeout times the attempts,
|
|
118
|
+
and a red suite with no limit runs until the job is killed. The number of
|
|
119
|
+
failures sets the bill more than the number of tests does.
|
|
120
|
+
|
|
121
|
+
- **Set a failure limit.** Stop the run after a small number of failures.
|
|
122
|
+
- **Set a job time limit** well below the CI platform's default.
|
|
123
|
+
- **Lower the test timeout** to what a passing test needs. Allow at most one
|
|
124
|
+
retry in CI.
|
|
125
|
+
- **Do not share one database across parallel workers.** Concurrent tests
|
|
126
|
+
change each other's data, so one commit gives different results and a
|
|
127
|
+
failure cannot be told from noise. Give each worker its own data, or run one
|
|
128
|
+
worker.
|
|
129
|
+
- **Record traces only on a retry in CI,** not on every test.
|
|
130
|
+
- **Hold a count ceiling that only moves down.** Count end-to-end tests per
|
|
131
|
+
business flow, not per story or example. Prove an acceptance criterion or an
|
|
132
|
+
example in a lower layer.
|
|
133
|
+
|
|
134
|
+
These are review signals, not gates. No validator reads them.
|
|
135
|
+
|
|
94
136
|
## Test stub detection
|
|
95
137
|
|
|
96
138
|
A test is incomplete if its body contains a placeholder, skips the
|
|
@@ -27,6 +27,8 @@ A downstream skill reads the UI definition in this order.
|
|
|
27
27
|
- primary tasks
|
|
28
28
|
- states
|
|
29
29
|
- actions
|
|
30
|
+
- supplements (the text shown beyond title, group headings and labels, each with
|
|
31
|
+
its reason) and, when written, structure (the groups and headings, in order)
|
|
30
32
|
|
|
31
33
|
3. **Brand SSOT**
|
|
32
34
|
- root `DESIGN.md` (front-matter + `# Brand Philosophy` body), the only
|
|
@@ -36,6 +38,10 @@ A downstream skill reads the UI definition in this order.
|
|
|
36
38
|
prototyping loop ran): the final prototype, procurement and implementation
|
|
37
39
|
notes
|
|
38
40
|
|
|
41
|
+
The supplements and structure are required input: implementation adds no text the
|
|
42
|
+
contract does not declare, and surface review compares the rendered text with them.
|
|
43
|
+
A screen that lacks them is returned to `/qfai-sdd`.
|
|
44
|
+
|
|
39
45
|
The paths that render a user-visible surface are declared by `uiux.surfacePaths`
|
|
40
46
|
in `qfai.config.yaml`, and nowhere else.
|
|
41
47
|
|
|
@@ -51,6 +57,5 @@ in `qfai.config.yaml`, and nowhere else.
|
|
|
51
57
|
## Forbidden Fallbacks
|
|
52
58
|
|
|
53
59
|
- Do not infer downstream UI behavior from discussion-pack sidecars.
|
|
54
|
-
- Do not use retired design contract files.
|
|
55
60
|
- Do not use HTML mock sections as downstream source of truth.
|
|
56
61
|
- Do not treat a competitor reference as a selected design direction.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qfai-configure
|
|
3
3
|
title: QFAI Configure (Tune qfai.config.yaml)
|
|
4
|
-
description: "Analyze the repository and tune qfai.config.yaml test globs and project overrides."
|
|
4
|
+
description: "Analyze the repository and tune qfai.config.yaml test globs and project overrides. Use when asked to configure QFAI for a repository, or to fix test globs that match the wrong files or none."
|
|
5
5
|
argument-hint: "[--auto]"
|
|
6
6
|
allowed-tools: [Read, Glob, Write, Edit, TodoWrite, Task, Agent]
|
|
7
7
|
roles:
|
|
@@ -25,7 +25,7 @@ QFAI Skill Body (SSOT)
|
|
|
25
25
|
|
|
26
26
|
## /qfai-configure - Configure QFAI for this repository
|
|
27
27
|
|
|
28
|
-
[DRIFT-PROTOCOL:
|
|
28
|
+
[DRIFT-PROTOCOL:REQUIRED]
|
|
29
29
|
|
|
30
30
|
## User Questions (AskUserQuestion Protocol)
|
|
31
31
|
|
|
@@ -69,18 +69,6 @@ When unsure, read inputs in this order:
|
|
|
69
69
|
|
|
70
70
|
Follow `.qfai/assistant/rule/shared-skill-delegation-baseline.md`.
|
|
71
71
|
|
|
72
|
-
### Orchestrator Protocol
|
|
73
|
-
|
|
74
|
-
- No additional overrides.
|
|
75
|
-
|
|
76
|
-
### Capability Probe
|
|
77
|
-
|
|
78
|
-
- No additional overrides.
|
|
79
|
-
|
|
80
|
-
### Delegation Failure (Hard Stop)
|
|
81
|
-
|
|
82
|
-
- No additional overrides.
|
|
83
|
-
|
|
84
72
|
### Work Orders Summary (evidence)
|
|
85
73
|
|
|
86
74
|
Use the shared schema.
|
|
@@ -179,30 +167,13 @@ The final report includes:
|
|
|
179
167
|
- gaps and open risks ("none" is acceptable if justified)
|
|
180
168
|
- the final status (PASS/FAIL) and who confirmed it
|
|
181
169
|
|
|
182
|
-
##
|
|
183
|
-
|
|
184
|
-
These principles are inspired by "constitution / articles" patterns used by other agent frameworks, but adapted to QFAI.
|
|
185
|
-
|
|
186
|
-
1. **SDD First (Specification is the source of truth)**
|
|
187
|
-
If there is a conflict between code and spec, treat the spec as authoritative and either (a) fix code or (b) raise an explicit Open Question to change the spec.
|
|
170
|
+
## Working principles
|
|
188
171
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
4. **Minimize scope, but never hide gaps**
|
|
196
|
-
Keep changes minimal, but do not "paper over" missing decisions. If something blocks correctness, stop and ask.
|
|
197
|
-
|
|
198
|
-
5. **Quality gates are the decision mechanism**
|
|
199
|
-
Use tests/lint/typecheck/build/pack verification (whatever the repo defines) as the primary guardrail. Fix until PASS.
|
|
200
|
-
|
|
201
|
-
6. **Make it runnable**
|
|
202
|
-
Outputs must be executable in terminal/CI. Provide copy-paste commands.
|
|
203
|
-
|
|
204
|
-
7. **User time is expensive**
|
|
205
|
-
Ask only the questions that are truly blocking. Everything else: make reasonable assumptions and label them clearly.
|
|
172
|
+
Read `references/principles.md` when a choice is not settled by a step below.
|
|
173
|
+
It holds the seven principles the steps follow: the specification is the
|
|
174
|
+
source of truth, traceability, evidence over confidence, minimal scope without
|
|
175
|
+
hidden gaps, quality gates, runnable output, and the user's time. A choice a step
|
|
176
|
+
settles needs no reading of it.
|
|
206
177
|
|
|
207
178
|
## README Rule
|
|
208
179
|
|
|
@@ -244,11 +215,6 @@ Return:
|
|
|
244
215
|
- proposed globs + rationale + evidence refs
|
|
245
216
|
```
|
|
246
217
|
|
|
247
|
-
### Failure rule
|
|
248
|
-
|
|
249
|
-
- A delegation the orchestrator chose to make is its own capability check.
|
|
250
|
-
- A failed delegation is handled as `.qfai/assistant/rule/shared-skill-delegation-baseline.md` sets out. Do not simulate roles.
|
|
251
|
-
|
|
252
218
|
## Completion Separation (mandatory)
|
|
253
219
|
|
|
254
220
|
- Config changes (`devops-ci-engineer`) and their approval (`qa-gatekeeper`) must be separate.
|
|
@@ -327,7 +293,7 @@ Fill policy templates with repo evidence.
|
|
|
327
293
|
- Keep existing content when already accurate.
|
|
328
294
|
- When evidence is missing, write `TBD` and record what is missing.
|
|
329
295
|
- Do not invent facts.
|
|
330
|
-
- Fill `03_contract/tech.md` in its template's shape: a Stack row for the runtime, the platform and each tool detected, each runtime dependency with its reason, and the quality-gate commands under Standard commands, one labelled item each. It holds no rule and no constraint; a constraint goes to `01_policy/constraint.md`.
|
|
296
|
+
- Fill `03_contract/tech.md` in its template's shape: a Stack row for the runtime, the platform and each tool detected, with one row per test layer whose Choice names the tool, the files it was observed in, and why it fits; each runtime dependency with its reason, and the quality-gate commands under Standard commands, one labelled item each. It holds no rule and no constraint; a constraint goes to `01_policy/constraint.md`.
|
|
331
297
|
- Fill `## Architecture` of `03_contract/tech.md` from the codebase: one row per layer the module layout shows, what it is responsible for, and the layers its imports reach, or `-`. Name layers, never paths. Implementation places new code by this table and reviewers judge a change against it, so write the import directions the code has.
|
|
332
298
|
- A layer is a group of modules whose imports point one way: an upper layer uses the layers below it, and a lower layer never imports an upper one.
|
|
333
299
|
- Draw the layers first, as one `mermaid` `flowchart TD` with a node per layer and an `Upper --> Lower` edge per import direction. Then write the table rows from the uppermost layer down, so each Depends on names only rows below it. `npx qfai validate` reports a diagram and a table that disagree.
|
|
@@ -338,10 +304,10 @@ Edit:
|
|
|
338
304
|
|
|
339
305
|
- `validation.traceability.testFileGlobs`
|
|
340
306
|
- `validation.traceability.testFileExcludeGlobs` (only if needed)
|
|
341
|
-
- `routing` or `reviewProfiles` only when the
|
|
307
|
+
- `routing` or `reviewProfiles` only when the user asks to change one; each matching entry replaces the shipped default as a whole
|
|
342
308
|
- `uiux.surfacePaths`: the repository-relative globs of the paths observed to render a user-visible surface, or `[]` when the repository renders none. Keep an existing value unless the user asks to change it. An absent key leaves the UI impact decision unevaluable.
|
|
343
309
|
|
|
344
|
-
Keep all other config keys unchanged.
|
|
310
|
+
Keep all other config keys unchanged. Add no key the package already defaults, `paths.specsDir` included; a value the project set stays.
|
|
345
311
|
|
|
346
312
|
## Step 5 - Evidence sampling
|
|
347
313
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Working principles
|
|
2
|
+
|
|
3
|
+
The seven principles behind the steps of this skill. Read them when a choice is
|
|
4
|
+
not settled by a step.
|
|
5
|
+
|
|
6
|
+
1. **SDD First (Specification is the source of truth)**
|
|
7
|
+
If there is a conflict between code and spec, treat the spec as authoritative and either (a) fix code or (b) raise an explicit Open Question to change the spec.
|
|
8
|
+
|
|
9
|
+
2. **Traceability is mandatory**
|
|
10
|
+
Every meaningful change must connect a business flow, story, acceptance criterion, example, test, code, and verification evidence. BF is covered by E2E tests, AC by integration or API tests, and EX by a selected non-E2E test. Full rule: `.qfai/assistant/rule/constitution.md` Article V.
|
|
11
|
+
|
|
12
|
+
3. **Evidence over confidence**
|
|
13
|
+
Prefer observable proof (logs, commands, file diffs, test results). If you cannot verify, say so and record it.
|
|
14
|
+
|
|
15
|
+
4. **Minimize scope, but never hide gaps**
|
|
16
|
+
Keep changes minimal, but do not "paper over" missing decisions. If something blocks correctness, stop and ask.
|
|
17
|
+
|
|
18
|
+
5. **Quality gates are the decision mechanism**
|
|
19
|
+
Use tests/lint/typecheck/build/pack verification (whatever the repo defines) as the primary guardrail. Fix until PASS.
|
|
20
|
+
|
|
21
|
+
6. **Make it runnable**
|
|
22
|
+
Outputs must be executable in terminal/CI. Provide copy-paste commands.
|
|
23
|
+
|
|
24
|
+
7. **User time is expensive**
|
|
25
|
+
Ask only the questions that are truly blocking. Everything else: make reasonable assumptions and label them clearly.
|
|
@@ -23,7 +23,7 @@ mode: interactive-by-default
|
|
|
23
23
|
|
|
24
24
|
## /qfai-discussion - Exploration Planner
|
|
25
25
|
|
|
26
|
-
[DRIFT-PROTOCOL:
|
|
26
|
+
[DRIFT-PROTOCOL:REQUIRED]
|
|
27
27
|
|
|
28
28
|
Run the entry check of
|
|
29
29
|
`.qfai/assistant/rule/shared-skill-operating-baseline.md#workflow-run-entry-check-mandatory`
|
package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-completion-matrix.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Use this file for the full completion logic behind `/qfai-discussion`.
|
|
4
4
|
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- All Packs
|
|
8
|
+
- UI-bearing Packs
|
|
9
|
+
- CLI Packs
|
|
10
|
+
- Non-UI Packs
|
|
11
|
+
- Notes
|
|
12
|
+
|
|
5
13
|
## All Packs
|
|
6
14
|
|
|
7
15
|
Blocking for every pack, UI-bearing or not:
|
|
@@ -66,12 +74,9 @@ Completion is blocked until all are true:
|
|
|
66
74
|
ordinary. This is the one visual decision made here, because no later stage asks the user for
|
|
67
75
|
it: `/qfai-sdd`'s `common-design-md` step authors tokens from whatever is recorded. A direction taken without the
|
|
68
76
|
user carries `chosen_by: assumption` and an open entry in `11_OQ-Register.md`.
|
|
69
|
-
6. No forbidden legacy sidecar exists under `uiux/` (see
|
|
70
|
-
`templates/uiux/00_index.md#Forbidden Legacy Files`).
|
|
71
77
|
|
|
72
78
|
Evaluation axes are global constants (4-step ordinal: weak / acceptable / strong /
|
|
73
|
-
exceptional) and are NOT authored as discussion sidecars
|
|
74
|
-
taste-interview, option-comparison or selected-anchor sidecar is required or permitted.
|
|
79
|
+
exceptional) and are NOT authored as discussion sidecars.
|
|
75
80
|
|
|
76
81
|
## CLI Packs
|
|
77
82
|
|
|
@@ -85,11 +90,9 @@ so conditions 1 and 5 above do not apply to it:
|
|
|
85
90
|
`validators/designContractReadiness.ts` skips `QFAI-DCON-030`/`-033`/`-034` for it.
|
|
86
91
|
- No design direction either: nothing downstream reads a theme for a surface that renders
|
|
87
92
|
no tokens.
|
|
88
|
-
- Conditions 2, 3, 4
|
|
89
|
-
full screen-contract schema, unranked exploration directions,
|
|
90
|
-
|
|
91
|
-
- `route:` on a `cli` screen contract names the command invocation, not a web path (see
|
|
92
|
-
`ui-bearing-playbook.md#visual-prototyping-surfaces-vs-cli`).
|
|
93
|
+
- Conditions 2, 3, 4 and 7 apply unchanged: all three canonical `uiux/` sidecars, the
|
|
94
|
+
full screen-contract schema, unranked exploration directions, and zero open OQs.
|
|
95
|
+
- `route:` on a `cli` screen contract names the command invocation, not a web path, as the `cli` section of the UI-bearing playbook sets out.
|
|
93
96
|
- No `prototyping.yaml`: `cli` is not a valid prototyping execution surface.
|
|
94
97
|
- `primary_surface: cli` with a visual `secondary_surfaces` entry is NOT a cli-only pack —
|
|
95
98
|
conditions 1 and 2 stay blocking for it.
|
|
@@ -74,7 +74,5 @@ shadows:
|
|
|
74
74
|
|
|
75
75
|
Trend Scan is **not** a sidecar file. Trend Scan lives at
|
|
76
76
|
`04_Sources.md#Trend Scan` (part of the core nine-file discussion pack).
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
constants and are not authored as discussion sidecars. UI-bearing
|
|
80
|
-
completion checks read Trend Scan from `04_Sources.md`.
|
|
77
|
+
Evaluation axes are global constants and are not authored as discussion
|
|
78
|
+
sidecars. UI-bearing completion checks read Trend Scan from `04_Sources.md`.
|
package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/platform_baselines.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Use this file only when the current discussion needs platform-specific detail.
|
|
4
4
|
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- Cross-Platform Baseline
|
|
8
|
+
- Web
|
|
9
|
+
- Mobile
|
|
10
|
+
- Desktop
|
|
11
|
+
- CLI
|
|
12
|
+
- States
|
|
13
|
+
- Dark Mode
|
|
14
|
+
- Motion
|
|
15
|
+
|
|
5
16
|
## Cross-Platform Baseline
|
|
6
17
|
|
|
7
18
|
- Keep the same conceptual model across surfaces.
|
package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/review_audit_playbook.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Use this file when the core checklist is not enough.
|
|
4
4
|
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- Heuristic Review Pass
|
|
8
|
+
- Layout And Information Architecture
|
|
9
|
+
- Forms And Actions
|
|
10
|
+
- Screen States
|
|
11
|
+
- Accessibility Audit
|
|
12
|
+
- Anti-Pattern Red Flags
|
|
13
|
+
- Documentation Expectations For QFAI
|
|
14
|
+
- Recommended Audit Order
|
|
15
|
+
|
|
5
16
|
## Heuristic Review Pass
|
|
6
17
|
|
|
7
18
|
Review the design direction against these durable heuristics:
|
package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux_best_practices.md
CHANGED
|
@@ -5,6 +5,15 @@ This file is the compact, durable core for `qfai-discussion`.
|
|
|
5
5
|
It is intentionally not an encyclopedia. Keep this file short, decision-oriented, and stable.
|
|
6
6
|
Move volatile or bulky detail into the `ui_ux/` sidecar references and research current material at run time.
|
|
7
7
|
|
|
8
|
+
## Contents
|
|
9
|
+
|
|
10
|
+
- Why This File Is Compact
|
|
11
|
+
- How To Use This Reference
|
|
12
|
+
- Core Decision Rules
|
|
13
|
+
- QFAI-Specific Authoring Guidance
|
|
14
|
+
- Compact Review Checklist
|
|
15
|
+
- Anti-Bloat Rules For Future Edits
|
|
16
|
+
|
|
8
17
|
## Why This File Is Compact
|
|
9
18
|
|
|
10
19
|
- OpenAI recommends versioned prompts, variables, concise examples, and eval-backed iteration rather than piling all guidance into one prompt.
|
|
@@ -18,10 +27,7 @@ Move volatile or bulky detail into the `ui_ux/` sidecar references and research
|
|
|
18
27
|
## How To Use This Reference
|
|
19
28
|
|
|
20
29
|
1. Read this file first for durable decision rules.
|
|
21
|
-
2. Open only the appendix
|
|
22
|
-
- `ui_ux/platform_baselines.md`
|
|
23
|
-
- `ui_ux/review_audit_playbook.md`
|
|
24
|
-
- `ui_ux/trend_scan_playbook.md`
|
|
30
|
+
2. Open only the appendix the `discussion-uiux` step names for the current task.
|
|
25
31
|
3. For trends, platform release details, or fast-moving conventions, do web research during the current discussion run and cite sources in `04_Sources.md`.
|
|
26
32
|
|
|
27
33
|
## Core Decision Rules
|
|
@@ -107,16 +113,10 @@ resolves through:
|
|
|
107
113
|
|
|
108
114
|
Those three are the entire canonical sidecar family. Evaluation axes are global constants
|
|
109
115
|
(4-step ordinal: weak / acceptable / strong / exceptional) fixed by the review validation the
|
|
110
|
-
QFAI CLI applies — not by any file in this tree. The
|
|
111
|
-
|
|
112
|
-
for the reviewer prompt; editing it does not change the set the CLI accepts. Axes are not
|
|
116
|
+
QFAI CLI applies — not by any file in this tree. The reviewer prompt that
|
|
117
|
+
`/qfai-prototyping` ships restates that axis set; editing it does not change the set the CLI accepts. Axes are not
|
|
113
118
|
authored as discussion sidecars. Discussion is planner-first: it carries exploration directions
|
|
114
|
-
unranked and does not select a single visual winner
|
|
115
|
-
override, option-comparison or selected-anchor sidecar. Do NOT create
|
|
116
|
-
`10_implementation_strategy.md`, `11_design_taste_interview.md`, the `20-24`
|
|
117
|
-
design-evaluation family, `30_option_comparison.md`, or `31_selected_anchor_screen.md` —
|
|
118
|
-
those filenames are forbidden, see `templates/uiux/00_index.md#Forbidden Legacy Files`, and
|
|
119
|
-
creating them fails validation.
|
|
119
|
+
unranked and does not select a single visual winner.
|
|
120
120
|
|
|
121
121
|
### What must be explicit in the discussion pack
|
|
122
122
|
|
|
@@ -175,29 +175,6 @@ Use this as the first-pass gate before deeper review.
|
|
|
175
175
|
- Are comparisons and rejections traceable?
|
|
176
176
|
- Can prototyping and SDD proceed without guessing the intended UX?
|
|
177
177
|
|
|
178
|
-
## When To Open The Appendices
|
|
179
|
-
|
|
180
|
-
Open `ui_ux/platform_baselines.md` when you need:
|
|
181
|
-
|
|
182
|
-
- touch target sizes
|
|
183
|
-
- breakpoint heuristics
|
|
184
|
-
- platform navigation baselines
|
|
185
|
-
- dark mode and cross-platform adaptation notes
|
|
186
|
-
|
|
187
|
-
Open `ui_ux/review_audit_playbook.md` when you need:
|
|
188
|
-
|
|
189
|
-
- heuristic review structure
|
|
190
|
-
- anti-pattern checklists
|
|
191
|
-
- screen-spec documentation rules
|
|
192
|
-
- audit/testing guidance
|
|
193
|
-
|
|
194
|
-
Open `ui_ux/trend_scan_playbook.md` when you need:
|
|
195
|
-
|
|
196
|
-
- trend-scan category coverage
|
|
197
|
-
- freshness and citation rules
|
|
198
|
-
- how to translate references into local decisions
|
|
199
|
-
- how to keep trends from overwhelming product-specific needs
|
|
200
|
-
|
|
201
178
|
## Anti-Bloat Rules For Future Edits
|
|
202
179
|
|
|
203
180
|
- Do not add long font-scale tables, full platform encyclopedias, or year-stamped trend lists to this file.
|
|
@@ -205,9 +182,3 @@ Open `ui_ux/trend_scan_playbook.md` when you need:
|
|
|
205
182
|
- Do not repeat the same concept across multiple theoretical frameworks unless the duplication changes an actual QFAI decision.
|
|
206
183
|
- Prefer one sharp rule plus a short verification cue over paragraph-heavy explanation.
|
|
207
184
|
- If a section is mostly lookup material, move it to an appendix.
|
|
208
|
-
|
|
209
|
-
## Appendix Index
|
|
210
|
-
|
|
211
|
-
- [Platform Baselines](ui_ux/platform_baselines.md)
|
|
212
|
-
- [Review Audit Playbook](ui_ux/review_audit_playbook.md)
|
|
213
|
-
- [Trend Scan Playbook](ui_ux/trend_scan_playbook.md)
|