qfai 1.8.6 → 1.8.8

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.
Files changed (88) hide show
  1. package/README.md +47 -57
  2. package/assets/init/.qfai/assistant/instructions/requirements-decomposition.md +1 -1
  3. package/assets/init/.qfai/assistant/instructions/workflow.md +2 -2
  4. package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +6 -6
  5. package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +7 -8
  6. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/design-dna-intake.md +5 -4
  7. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/discussion-artifact-rules.md +62 -0
  8. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/prototyping.yaml +3 -12
  9. package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +12 -10
  10. package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +69 -188
  11. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/generator-prompt.md +35 -0
  12. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/handoff.md +40 -0
  13. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/iteration-loop.md +51 -0
  14. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/reviewer-prompt.md +74 -0
  15. package/assets/init/.qfai/assistant/skills/qfai-prototyping/templates/contracts/prototype-handoff.sample.yaml +13 -38
  16. package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +127 -234
  17. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/contract-artifact-rules.md +30 -0
  18. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/review-cycle-playbook.md +5 -0
  19. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-execution-playbook.md +31 -7
  20. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-phase-checklists.md +18 -2
  21. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-quality-gate.md +12 -1
  22. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-triage.md +137 -0
  23. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/spec-traceability-rules.md +75 -0
  24. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/ui-design-contract-normalization.md +21 -10
  25. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/brand-design.sample.yaml +0 -1
  26. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/reference-pool.sample.yaml +0 -1
  27. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/04_Business-Flow.md +1 -1
  28. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/10_delta.md +17 -0
  29. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/11_Slice-Policy.md +116 -19
  30. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/01_Spec.md +8 -2
  31. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/09_delta.md +12 -0
  32. package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +8 -8
  33. package/assets/init/.qfai/assistant/skills/web-research/SKILL.md +2 -3
  34. package/assets/init/.qfai/assistant/steering/agent-routing.yml +16 -28
  35. package/assets/init/.qfai/assistant/steering/cli-ux-guidelines.md +1 -1
  36. package/assets/init/.qfai/assistant/steering/manifest.md +28 -40
  37. package/assets/init/.qfai/assistant/steering/product.md +24 -49
  38. package/assets/init/.qfai/assistant/steering/research-first-protocol.md +3 -3
  39. package/assets/init/.qfai/assistant/steering/review-profiles.yml +0 -3
  40. package/assets/init/.qfai/assistant/steering/structure.md +21 -28
  41. package/assets/init/.qfai/assistant/steering/tech.md +21 -33
  42. package/assets/init/.qfai/assistant/steering/ui-definition-protocol.md +1 -1
  43. package/assets/init/root/.github/workflows/qfai-validate.yml +1 -1
  44. package/assets/uix-rev/comparison-review.md +3 -4
  45. package/dist/cli/index.cjs +4212 -6979
  46. package/dist/cli/index.cjs.map +1 -1
  47. package/dist/cli/index.mjs +4056 -6824
  48. package/dist/cli/index.mjs.map +1 -1
  49. package/dist/index.cjs +6046 -8603
  50. package/dist/index.cjs.map +1 -1
  51. package/dist/index.d.cts +16 -377
  52. package/dist/index.d.ts +16 -377
  53. package/dist/index.mjs +3351 -5900
  54. package/dist/index.mjs.map +1 -1
  55. package/package.json +6 -6
  56. package/assets/init/.qfai/README.md +0 -117
  57. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/33_exploration_rubric.md +0 -46
  58. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/34_evaluator_calibration.md +0 -21
  59. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/design-differentiation.md +0 -17
  60. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/design-system-compliance.md +0 -22
  61. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/evidence-requirements.md +0 -70
  62. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/iteration-cycle.md +0 -68
  63. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/l1-review-guide.md +0 -37
  64. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/l2-review-guide.md +0 -44
  65. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/prototype-workspace.md +0 -45
  66. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/reviewer-gate.md +0 -45
  67. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/surface-framing.md +0 -38
  68. package/assets/init/.qfai/assistant/skills/qfai-prototyping/templates/contracts/design-system.sample.yaml +0 -19
  69. package/assets/init/.qfai/assistant/skills/qfai-prototyping/templates/contracts/selected-direction.sample.yaml +0 -8
  70. package/assets/init/.qfai/assistant/skills/qfai-prototyping/templates/contracts/ui-0001-order-mockable.yaml +0 -67
  71. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/absorption-policy.sample.yaml +0 -7
  72. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/evaluation-rubric.sample.yaml +0 -35
  73. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/evaluator-calibration.sample.yaml +0 -15
  74. package/assets/init/.qfai/assistant/skills.local/README.md +0 -26
  75. package/assets/init/.qfai/contracts/README.md +0 -67
  76. package/assets/init/.qfai/contracts/api/README.md +0 -68
  77. package/assets/init/.qfai/contracts/db/README.md +0 -32
  78. package/assets/init/.qfai/contracts/design/README.md +0 -48
  79. package/assets/init/.qfai/contracts/ui/README.md +0 -162
  80. package/assets/init/.qfai/discussion/README.md +0 -160
  81. package/assets/init/.qfai/evidence/README.md +0 -99
  82. package/assets/init/.qfai/evidence/calibration.yaml +0 -26
  83. package/assets/init/.qfai/report/README.md +0 -26
  84. package/assets/init/.qfai/review/README.md +0 -128
  85. package/assets/init/.qfai/review_archive/.gitignore +0 -3
  86. package/assets/init/.qfai/review_archive/README.md +0 -30
  87. package/assets/init/.qfai/specs/README.md +0 -100
  88. package/assets/init/.qfai/specs/spec-XXXX/tdd/test-list.md +0 -4
package/README.md CHANGED
@@ -18,11 +18,12 @@ The agent reads the repository, produces the required artifacts, and iterates un
18
18
  ## Release status
19
19
 
20
20
  - Release posture: runtime truthfulness is enforced.
21
- - Prototyping is UI-only; `full-harness` is measurement-driven iteration accumulation for UI-bearing surfaces only.
21
+ - Prototyping is UI-only and runs a single-thread evolution loop driven by
22
+ `qfai prototyping iterate --cycle <n>`, with deterministic stop conditions
23
+ (exit codes 0 continue / 64 convergence / 65 max-iterations / 2 input error).
22
24
  - Runtime observation is observed-only (no synthetic 200 / API / DB prototyping coverage).
23
- - Browser QA is mandatory per screen in full-harness, and `actionsWired` reports action coverage rather than finding count.
25
+ - Per-iter evidence is `screenshot.png` + `index.html` per declared screen plus a single `review.json` (4-axis ordinal, prose critique, anti-slop detection, pivot directive).
24
26
  - Calibration SSOT is the calibration pack referenced by `calibrationRef.packPath`.
25
- - Current repo note: some repo-wide `qfai validate --fail-on error` blockers still come from historical review/evidence/ATDD/TDD artifacts and are being cleaned incrementally.
26
27
 
27
28
  ## Quick start
28
29
 
@@ -60,19 +61,15 @@ npx qfai report
60
61
  primary spec, UI contracts, design contract readiness, active agent-wrapper
61
62
  integrations, shipped role-input readiness, Playwright CLI launcher
62
63
  resolution/probing, and target URL reachability.
63
- Note: prototyping evidence (`.qfai/evidence/prototyping.json`) is produced by the AI workflow / skills
64
- (`/qfai-prototyping` — any mode; modes differ only in `maxCycles`, see spec-0012), not by a general-purpose end-user CLI flow.
64
+ Note: prototyping evidence (`.qfai/evidence/prototyping/prototyping.json`) is produced by the AI workflow
65
+ (`/qfai-prototyping`), not by a general-purpose end-user CLI flow.
65
66
  Use `npx qfai prototyping preflight --target-url <url>` for a focused
66
- prototyping preflight before the skill starts; it now surfaces blocking
67
- `QFAI-DCON-*` design-contract issues alongside runtime assumptions, resolves
68
- a runnable Playwright CLI launcher (project wrapper / local bin / PATH /
69
- `npx --no-install`), and still treats the first real delegation failure as a
70
- runtime hard-stop.
71
- Use `npx qfai prototyping round-start --round <r5|r3|r2|r1> --candidates <csv> --target-url <url> --mode <mode>`
72
- to generate the round-scoped review bundle and command plans the AI evaluator sub-agent consumes, then use
73
- `round-harvest`, `round-narrow`, `round-absorb`, and `round-reimplement-verify` to advance the candidate funnel.
74
- `qfai validate` consumes the resulting evidence files, including `mode.effective` and `fullHarness` metadata when present.
75
- Traceability refs inside prototyping evidence must use repo-root-relative concrete artifact refs (for example `.qfai/specs/spec-0001/01_Spec.md#L3` or `.qfai/evidence/render.json#/screens/0`).
67
+ prototyping preflight before the skill starts; it surfaces blocking
68
+ `QFAI-DCON-*` design-contract issues alongside runtime assumptions and resolves a runnable Playwright CLI launcher.
69
+ Use `npx qfai prototyping iterate --cycle <n> --target-url <url>` to drive each cycle of the single-thread
70
+ evolution loop. Exit codes: 0 (continue), 64 (convergence), 65 (max-iterations), 2 (input error).
71
+ Traceability refs inside prototyping evidence must use repo-root-relative concrete artifact refs
72
+ (for example `.qfai/specs/spec-0001/01_Spec.md#L3` or `.qfai/evidence/prototyping/iter-03/home.png`).
76
73
  Absolute paths are invalid. The same strict ref grammar is enforced for top-level and leaf evidence-bearing fields, including
77
74
  `runtimeGate.evidenceRefs`, `runtimeGate.ui[].declaredRef`, `runtimeGate.ui[].renderEvidenceRefs[]`,
78
75
  `runtimeGate.ui[].browserQaEvidenceRefs[]`, `specs[].coverageRefs[].declaredRef`, `specs[].coverageRefs[].observedRefs[]`,
@@ -96,9 +93,9 @@ npx qfai report
96
93
 
97
94
  `qfai validate` enforces spec-to-test traceability with directory-based rules.
98
95
 
99
- - `tests/e2e/**`: annotate all covered user stories with `QFAI:SPEC-XXXX:US-YYYY`.
100
- - `tests/integration/**`: annotate all covered test cases with `QFAI:SPEC-XXXX:TC-YYYY`.
101
- - `tests/api/**`: annotate all covered API contracts with `QFAI:CON-API-XXXX`.
96
+ - `tests/e2e/**`: annotate all covered user stories with concrete IDs such as `QFAI:SPEC-0001:US-0001`.
97
+ - `tests/integration/**`: annotate all covered test cases with concrete IDs such as `QFAI:SPEC-0001:TC-0001`.
98
+ - `tests/api/**`: annotate all covered API contracts with concrete IDs such as `QFAI:CON-API-0001`.
102
99
  - `tests/api/**` and `tests/e2e/**` must not use `TC` annotations.
103
100
  - `AC` annotations are not required in code; AC coverage is treated as indirect through full `TC` coverage.
104
101
 
@@ -111,7 +108,7 @@ The agent reads QFAI assets under `.qfai/assistant/` and produces or updates SDD
111
108
  ### Where the skills live
112
109
 
113
110
  - QFAI canonical skills (SSOT): `.qfai/assistant/skills/**` (may be overwritten when you re-run `qfai init --force`).
114
- - Your local overrides: `.qfai/assistant/skills.local/**` (never overwritten by QFAI; prefer this for project-specific customizations).
111
+ - QFAI no longer creates local override scaffolds. Project-specific guidance should live in your repository's normal agent docs or be created explicitly by your AI workflow.
115
112
 
116
113
  ### Minimal custom skill set
117
114
 
@@ -123,10 +120,22 @@ QFAI includes a small set of custom skills (stored under `.qfai/assistant/skills
123
120
  - **qfai-discussion**: Run a unified structured discussion that produces and maintains the latest discussion pack
124
121
  as 15 required markdown files under `.qfai/discussion/discussion-<ts>/`.
125
122
  UI-bearing discussion packs may include `prototyping.yaml` as an optional recommendation artifact; non-ui discussion packs typically omit it.
126
- - **qfai-sdd**: Unified SDD entrypoint with discussion-pack preflight guard (missing/incomplete/blocking OQ causes stop + next action guidance).
127
- - **qfai-prototyping**: Build a contract-aligned UI prototype using the Playwright CLI + AI
128
- evaluator harness (spec-0012). Modes (`low-cost`/`standard`/`full-harness`) run the same
129
- strictest review cycle; only `maxCycles` (1/3/20) differs.
123
+ - **qfai-sdd**: Unified SDD entrypoint with discussion-pack preflight guard
124
+ (missing/incomplete/blocking OQ causes stop + next action guidance).
125
+ After preflight, the skill runs a mandatory **Stage 1 Triage** that classifies
126
+ every incoming requirement into one of 8 first-class operations
127
+ (CREATE / UPDATE:APPEND / UPDATE:MODIFY / UPDATE:REMOVE / DELETE / SPLIT /
128
+ MERGE / SUPERSEDE) with an **append-first** bias: existing active specs
129
+ absorb the change unless there is zero subject-token overlap.
130
+ CREATE / DELETE / SPLIT / MERGE / SUPERSEDE / UPDATE:REMOVE require explicit
131
+ `AskUserQuestion` approval, and CREATE rows must register a new `CAP-NNNN`
132
+ in `.qfai/specs/_policies/03_Capabilities.md` before the row is accepted
133
+ (`QFAI-TRIAGE-006`). Every `01_Spec.md` declares a lifecycle
134
+ `Status: active | superseded | deprecated | removed` (`QFAI-STATUS-001..006`).
135
+ - **qfai-prototyping**: Single-thread design evolution loop. One prototype iterated through up to
136
+ 15 cycles of generate -> capture -> review with a 4-axis ordinal rubric, anti-slop detection,
137
+ prose critique, and explicit pivot permission. Stops deterministically when all four axes hit
138
+ `exceptional` (exit 64) or the iteration budget is exhausted (exit 65).
130
139
  - **qfai-atdd**: Implement acceptance tests driven by specs/scenarios.
131
140
  - **qfai-implement**: Unified TDD micro-cycle (Red/Green/Refactor) one test at a time using `test-list.md` as the execution ledger, including ledger status updates and exception closure.
132
141
  - **qfai-verify**: Run full-scan local quality gates (`validate --fail-on error`, `report`, repo gates) and produce reviewer-approved evidence under `.qfai/evidence/`.
@@ -283,6 +292,16 @@ Release gate behavior:
283
292
  - A: Include all required sections (`Change Summary`, `Rationale`, `Candidates Considered`, `Adopted`, `Rejected`, `Impact`, `Follow-ups`) and include both `DO NOT` and `Temptation` in `Rejected`.
284
293
  - Q: release_candidate validation fails due open questions.
285
294
  - A: Keep specs definition-only, use `.qfai/report/run-*` as execution logs, and convert open OQ to `resolved` or `deferred` with evidence.
295
+ - Q: `qfai validate` reports `QFAI-STATUS-001` ("Status bullet が見つかりません") on every spec.
296
+ - A: Each `01_Spec.md` must declare `- Status: active | superseded | deprecated | removed` (introduced in 1.8.8).
297
+ Add `Status: active` for currently-authoritative specs; superseded specs need a `- Superseded-by: spec-NNNN` companion bullet,
298
+ and deprecated/removed specs need `- Deprecated-at: YYYY-MM-DD`. The previous `QFAI-STATUS-001` (status-leak guard) was renamed to `QFAI-STATUSLEAK-001` to free the namespace.
299
+ - Q: `/qfai-sdd` is asking for `AskUserQuestion` approval that earlier versions never asked for.
300
+ - A: Stage 1 Triage classifies each requirement into one of 8 first-class operations and gates approval-required ops
301
+ (CREATE / DELETE / SPLIT / MERGE / SUPERSEDE / UPDATE:REMOVE) on explicit user confirmation. Append-first means UPDATE:APPEND on an existing active spec is the default;
302
+ CREATE additionally requires a new `CAP-NNNN` row in `.qfai/specs/_policies/03_Capabilities.md` before the row is accepted (`QFAI-TRIAGE-006`).
303
+ - Q: `delta.md` validation reports `QFAI-TRIAGE-001` ("Change Summary はあるが Triage がありません") as a warning.
304
+ - A: 1.8.8 introduced a `## Triage` section requirement. Existing operational deltas without it currently fail soft (warning); future minor versions will promote this to an error after operational backfill.
286
305
 
287
306
  ## Continuous integration
288
307
 
@@ -377,10 +396,7 @@ Typical customizations.
377
396
  │ │ │ │ └── SKILL.md
378
397
  │ │ │ └── qfai-verify
379
398
  │ │ │ └── SKILL.md
380
- │ │ ├── skills.local
381
- │ │ │ └── README.md
382
399
  │ │ ├── steering
383
- │ │ │ ├── README.md
384
400
  │ │ │ ├── agent-catalog.yml
385
401
  │ │ │ ├── agent-routing.yml
386
402
  │ │ │ ├── review-gate.rules.yml
@@ -388,40 +404,14 @@ Typical customizations.
388
404
  │ │ │ ├── product.md
389
405
  │ │ │ ├── structure.md
390
406
  │ │ │ └── tech.md
391
- └── README.md
392
- │ ├── discussion
393
- │ │ ├── README.md
394
- │ │ └── discussion-YYYYMMDDhhmmssSSS
395
- │ │ ├── 01_Context.md
396
- │ │ ├── ...
397
- │ │ ├── 14_Review-Request.md
398
- │ │ ├── 99_delta.md
399
- │ │ └── prototyping.yaml
400
- │ ├── contracts
401
- │ │ ├── api
402
- │ │ │ └── README.md
403
- │ │ ├── db
404
- │ │ │ └── README.md
405
- │ │ ├── ui
406
- │ │ │ └── README.md
407
- │ │ └── README.md
408
- │ ├── report
409
- │ │ ├── .gitignore
410
- │ │ ├── README.md
411
- │ │ └── run-20260218123456789
412
- │ │ ├── run.json
413
- │ │ ├── validator.json
414
- │ │ ├── traceability.json
415
- │ │ └── summary.md
416
- │ ├── review
417
- │ │ ├── .gitignore
418
- │ │ └── README.md
419
- │ ├── specs
420
- │ │ └── README.md
421
- │ └── README.md
407
+ │ └── waivers.yml
422
408
  └── qfai.config.yaml
423
409
  ```
424
410
 
411
+ `qfai init` does not seed `.qfai` workflow artifacts such as specs, discussions,
412
+ contracts, evidence, reports, reviews, placeholder spec directories, or artifact
413
+ README files. Those files are created later by QFAI skills when real work exists.
414
+
425
415
  Integration wrappers are also generated for immediate use:
426
416
 
427
417
  - Agents/Codex VS Code: `.agents/skills/**`
@@ -41,7 +41,7 @@ This document is the decision rule SSOT for AI and humans when answering:
41
41
  ### Rule 3 - Keep ambiguity explicit
42
42
 
43
43
  - Unknowns remain explicit as Open Questions.
44
- - Resolved answers are promoted to `_policies` or `spec-XXXX` artifacts, then OQ status is updated.
44
+ - Resolved answers are promoted to `_policies` or target spec artifacts, then OQ status is updated.
45
45
 
46
46
  ## How to decompose (mechanical procedure)
47
47
 
@@ -49,7 +49,7 @@ Do not proceed without a declared Change Type.
49
49
  0. Steering refresh (project memory bootstrap)
50
50
  1. Discussion (optional): clarify idea → requirement seed
51
51
  2. Requirements: discussion pack in `.qfai/discussion/`
52
- 3. Specification (SDD): unified preflight + `_policies` / `spec-XXXX/01..10`
52
+ 3. Specification (SDD): unified preflight + `_policies` / `spec-*/01..10`
53
53
  4. Prototyping (optional): contract-aligned implementation skeleton
54
54
  5. Acceptance tests (ATDD): runnable E2E/API/Integration tests derived from specs/contracts obligations (`US` / `TC` / `CON-API`)
55
55
  6. Verify: run quality gates and provide evidence
@@ -59,7 +59,7 @@ Stage 3 (`/qfai-sdd`) target policy:
59
59
  - With argument (`/qfai-sdd <spec-id-or-name>`): scope is the matched single spec only.
60
60
  - Without argument (`/qfai-sdd`): scope is all capabilities from `.qfai/specs/_policies/03_Capabilities.md` in order.
61
61
  - `/qfai-sdd` must create or refresh `.qfai/specs/_policies/11_Slice-Policy.md` before deciding whether a spec change is CREATE / UPDATE / DELETE.
62
- - For no-argument batch runs, execute Contracts-first and Outline once, then delegate Slice/Plan/Delta in parallel per `spec-XXXX`.
62
+ - For no-argument batch runs, execute Contracts-first and Outline once, then delegate Slice/Plan/Delta in parallel per target spec.
63
63
 
64
64
  Prototyping stage policy:
65
65
 
@@ -40,11 +40,11 @@ Skill-specific examples:
40
40
 
41
41
  - Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#format-ssot-mandatory`.
42
42
 
43
- - Before writing or editing any `.qfai/**` artifact, read and follow the relevant directory README template and sample:
44
- - `.qfai/discussion/README.md`
45
- - `.qfai/specs/README.md`
46
- - `.qfai/contracts/**/README.md`
47
- - `.qfai/evidence/README.md`
43
+ - Before writing or editing any `.qfai/**` artifact, read the relevant skill-local reference or template:
44
+ - `.qfai/assistant/skills/qfai-discussion/references/discussion-artifact-rules.md`
45
+ - `.qfai/assistant/skills/qfai-sdd/references/spec-traceability-rules.md`
46
+ - `.qfai/assistant/skills/qfai-sdd/references/contract-artifact-rules.md`
47
+ - `.qfai/assistant/skills/qfai-prototyping/references/evidence-requirements.md`
48
48
 
49
49
  ## Inputs Priority (Preflight)
50
50
 
@@ -244,7 +244,7 @@ These principles are inspired by "constitution / articles" patterns used by othe
244
244
 
245
245
  ## README Rule
246
246
 
247
- Do not edit any `.qfai/**/README.md` file; raise an Open Question instead.
247
+ Do not create `.qfai/**/README.md` files as scaffold or format documentation; keep artifact guidance in skill references/templates.
248
248
 
249
249
  - READMEs are reference guides. Follow their structure, templates, and checklists.
250
250
 
@@ -46,8 +46,6 @@ UI-bearing packs must produce the following sidecars as primary truth:
46
46
  - `uiux/30_exploration_brief.md`
47
47
  - `uiux/31_reference_pool.md`
48
48
  - `uiux/32_design_anti_goals.md`
49
- - `uiux/33_exploration_rubric.md`
50
- - `uiux/34_evaluator_calibration.md`
51
49
  - `uiux/40_screen_contracts.md`
52
50
  - `uiux/50_review_input_bundle.md`
53
51
 
@@ -68,12 +66,13 @@ For UI-bearing targets, follow `references/design-dna-intake.md` while authoring
68
66
 
69
67
  ## UI-bearing Authoring Requirements
70
68
 
71
- - `30_exploration_brief.md` must define product intent, must-preserve interactions, brand signals, and differentiation targets.
72
- - `31_reference_pool.md` must define exploration references, adopted points, rejected points, local translation, copy risk, and template usage policy.
73
- - `32_design_anti_goals.md` must contain explicit anti-goals and recurrence prevention notes.
74
- - `33_exploration_rubric.md` must define design quality, originality, craft, functionality, brand memorability, category distinctiveness, template dependency risk, and localization-fit grading criteria.
75
- - `34_evaluator_calibration.md` must include good critique examples, too-lenient examples, blandness-fail examples, originality-fail examples, and template-copy fail examples.
76
- - `50_review_input_bundle.md` must document best-of-history handling so later iterations are not automatically preferred.
69
+ - `30_exploration_brief.md` must define product intent, brand signals, and differentiation targets.
70
+ - `31_reference_pool.md` must define exploration references with adopted points, rejected points, and copy risk framed as **deviate-from** inputs (not imitate-this) for downstream `/qfai-prototyping` reviewer.
71
+ - `32_design_anti_goals.md` must contain explicit anti-goals; this also feeds the global anti-slop pattern list consulted by the prototyping reviewer.
72
+ - `50_review_input_bundle.md` must document review inputs for downstream skills.
73
+
74
+ Evaluation axes are global constants (4-step ordinal: weak / acceptable /
75
+ strong / exceptional) and are not authored as discussion sidecars.
77
76
 
78
77
  ## Completion Contract (Shared)
79
78
 
@@ -22,7 +22,8 @@ Use this reference only for UI-bearing discussion packs.
22
22
  ## Output Mapping
23
23
 
24
24
  - Put product intent and brand signals in `30_exploration_brief.md`.
25
- - Put all reference decisions in `31_reference_pool.md`.
26
- - Put prohibited visual directions in `32_design_anti_goals.md`.
27
- - Put brand and template-risk scoring in `33_exploration_rubric.md`.
28
- - Put examples of good critique and weak critique in `34_evaluator_calibration.md`.
25
+ - Put all reference decisions in `31_reference_pool.md` (deviate-from input, not imitate).
26
+ - Put prohibited visual directions in `32_design_anti_goals.md` (also feeds reviewer anti-slop).
27
+
28
+ Evaluation axes are global constants (4-step ordinal: weak / acceptable /
29
+ strong / exceptional) and are not authored as discussion sidecars.
@@ -0,0 +1,62 @@
1
+ # Discussion Artifact Rules
2
+
3
+ Use this file when `/qfai-discussion` creates or reviews `.qfai/discussion/discussion-*` packs.
4
+
5
+ ## Required Pack
6
+
7
+ Each pack uses immutable timestamp naming: `.qfai/discussion/discussion-YYYYMMDDhhmmssSSS/`.
8
+
9
+ Required files:
10
+
11
+ - `01_Context.md`
12
+ - `02_Inception-Deck.md`
13
+ - `03_Story-Workshop.md`
14
+ - `04_Sources.md`
15
+ - `05_Scope.md`
16
+ - `06_REQ.md`
17
+ - `07_NFR.md`
18
+ - `08_Glossary.md`
19
+ - `09_Constraints.md`
20
+ - `10_Policy.md`
21
+ - `11_OQ-Register.md`
22
+ - `12_OQ-Resolution-Log.md`
23
+ - `13_Deferred.md`
24
+ - `14_Review-Request.md`
25
+ - `99_delta.md`
26
+
27
+ UI-bearing discussion packs may include `prototyping.yaml` as an optional recommendation artifact; non-ui discussion packs typically omit it. For `ui_bearing: false`, typically omit `prototyping.yaml`. Current discussion-pack readiness does not block on missing `prototyping.yaml`.
28
+
29
+ ## Rules
30
+
31
+ - Run interview and requirement capture until `Disposition: open` is zero in `11_OQ-Register.md`.
32
+ - OQ `Gate` values are `discussion`, `sdd`, `atdd`, `tdd`, or `ops`.
33
+ - `deferred` is allowed only when `13_Deferred.md` has complete metadata.
34
+ - Discussion outputs are rationale and intake logs; do not duplicate `.qfai/specs/**` SSOT.
35
+ - `03_Story-Workshop.md` must include at least one Mermaid diagram.
36
+ - Use Mermaid fences only for diagrams.
37
+ - `14_Review-Request.md` must reference `.qfai/assistant/steering/agent-routing.yml` and `review-profiles.yml`.
38
+
39
+ ## UI/UX Exploration Family
40
+
41
+ For UI-bearing packs, use:
42
+
43
+ - `04_Sources.md` for trend translation and competitive reference registry
44
+ - `uiux/30_exploration_brief.md`
45
+ - `uiux/31_reference_pool.md`
46
+ - `uiux/32_design_anti_goals.md`
47
+ - `uiux/40_screen_contracts.md`
48
+
49
+ Discussion is exploration-first and must not choose a single visual winner or final design system. Those are downstream prototyping outputs.
50
+
51
+ ## `prototyping.yaml`
52
+
53
+ When `prototyping.yaml` is present, use the single-thread schema:
54
+
55
+ ```yaml
56
+ prototyping:
57
+ surface: web # web | mobile | desktop | mixed
58
+ ```
59
+
60
+ Mode-tier fields (`recommended_mode` / `allowed_modes` / `mode_expectations`)
61
+ are not supported. The single-thread evolution loop fixes iteration count
62
+ globally to 15.
@@ -1,17 +1,8 @@
1
1
  prototyping:
2
- recommended_mode: full-harness
3
- rationale: >
4
- Fill this with a concrete reason tied to the full-harness evidence obligations.
5
- allowed_modes:
6
- - full-harness
2
+ # Single-thread evolution loop. Iteration count is fixed at 15 globally
3
+ # (no per-mode override).
7
4
  # Replace `web` with one of the prototyping-supported surfaces if needed:
8
5
  # web | mobile | desktop | mixed
9
6
  # (discussion classification also allows `cli` and `non-ui`, but those are
10
- # not valid prototyping execution surfaces; see
11
- # `packages/qfai/src/core/prototyping/surfacePolicy.ts` — PROTOTYPING_SUPPORTED_SURFACES.)
7
+ # not valid prototyping execution surfaces.)
12
8
  surface: web
13
- mode_expectations:
14
- full-harness:
15
- expected_iterations: "2+"
16
- process: "measure -> score -> fix code -> re-run"
17
- calibration_ref: "qfai.config.yaml#prototyping.calibration"
@@ -60,7 +60,7 @@ Skill-specific examples:
60
60
 
61
61
  - This skill processes **one test at a time** from `test-list.md`.
62
62
  - Each item goes through the full TDD micro-cycle: write a **failing test** first, then make it pass, then refactor.
63
- - The execution ledger is located at `.qfai/specs/spec-XXXX/tdd/test-list.md`.
63
+ - The execution ledger is located at `.qfai/specs/<spec-id>/tdd/test-list.md`.
64
64
  - Items are processed **serially** by default. Parallel processing is allowed only when items target independent SUT slices with no shared state.
65
65
  - Status transitions follow a strict forward-only lifecycle: `todo` -> `red` -> `green` -> `refactor` -> `done`.
66
66
  - The `exception` status can be reached from any active status when an anomaly is detected.
@@ -79,12 +79,14 @@ Execute the TDD micro-cycle for each pending item in `test-list.md`, transitioni
79
79
  - Read order: `01_Spec.md` → `03_Acceptance-Criteria.md` → `05_Examples.md` →
80
80
  `.qfai/contracts/design/exploration-brief.yaml` →
81
81
  `.qfai/contracts/design/reference-pool.yaml` → `.qfai/contracts/design/brand-design.yaml` →
82
- `.qfai/contracts/design/evaluation-rubric.yaml` `.qfai/contracts/design/evaluator-calibration.yaml`
83
- `.qfai/contracts/design/selected-direction.yaml` → `.qfai/contracts/design/design-system.yaml` →
82
+ `.qfai/contracts/design/design-system.yaml` (extracted from final iter)
84
83
  `.qfai/contracts/design/prototype-handoff.yaml` → `.qfai/contracts/ui/*.yaml` →
85
- canonical prototype screenshots / HTML snapshots → `.qfai/prototypes/winner/index.html`.
86
- - Do not read discussion-pack UI/UX sidecars, fallback mocks, or legacy design aliases.
87
- - Prototype code is analysis input, not production source. Reimplement with project-native patterns while preserving `prototype-handoff.yaml` `mustPreserve`; adapt `mayAdapt`; do not copy `mustNotCopy`.
84
+ canonical prototype evidence under `.qfai/evidence/prototyping/iter-NN/<screen>.{png,html}` →
85
+ `.qfai/prototypes/final/index.html`.
86
+ - Do not read discussion-pack UI/UX sidecars or fallback mocks.
87
+ - Prototype HTML is analysis input, not production source. Reimplement with project-native
88
+ patterns while preserving the visual identity captured in `prototype-handoff.yaml`
89
+ `implementationNotes` (free-form prose).
88
90
  - UI-affecting items require product-surface-reviewer prototype parity review before `done`.
89
91
  - If code intent and rendered output diverge, treat the rendered/HTML result as the blocking review input and reconcile before DONE.
90
92
 
@@ -97,7 +99,7 @@ Execute the TDD micro-cycle for each pending item in `test-list.md`, transitioni
97
99
 
98
100
  ## Execution Ledger: test-list.md
99
101
 
100
- The execution ledger at `.qfai/specs/spec-XXXX/tdd/test-list.md` tracks progress with these required columns:
102
+ The execution ledger at `.qfai/specs/<spec-id>/tdd/test-list.md` tracks progress with these required columns:
101
103
 
102
104
  | Column | Description |
103
105
  | --------- | -------------------------------------------------------- |
@@ -294,11 +296,11 @@ Completion MUST NOT be declared when any of the following are true:
294
296
  - Items with `todo`, `red`, `green`, or `refactor` status still exist (for spec-level completion)
295
297
  - Parallel slices were used but integration verify has not been run post-merge
296
298
  - Checkpoint boundary was reached but verification was not executed
297
- - `it.todo(...)` / `test.todo(...)` / `describe.todo(...)` stubs remain in any file covered by `validation.traceability.testFileGlobs` (`QFAI-TEST-001`, spec-0012). Implement the body or delete the stub — an opt-out via `validation.testStrategy.forbidTestTodoStubs: false` is permitted only with an accompanying waiver DR-ID.
299
+ - `it.todo(...)` / `test.todo(...)` / `describe.todo(...)` stubs remain in any file covered by `validation.traceability.testFileGlobs` (`QFAI-TEST-001`). Implement the body or delete the stub — an opt-out via `validation.testStrategy.forbidTestTodoStubs: false` is permitted only with an accompanying waiver DR-ID.
298
300
 
299
301
  ## Evidence (MANDATORY)
300
302
 
301
- Create/update: `.qfai/evidence/implement-spec-XXXX.md`
303
+ Create/update: `.qfai/evidence/implement-<spec-id>.md`
302
304
 
303
305
  Required sections:
304
306
 
@@ -342,7 +344,7 @@ Each TDD item MUST have fresh evidence containing at minimum:
342
344
  - [ ] No backward transitions occurred.
343
345
  - [ ] Exception items have DR-IDs recorded.
344
346
  - [ ] All tests pass.
345
- - [ ] `qfai validate --profile tdd --fail-on error` passes with zero `QFAI-TEST-001` findings (no `it.todo` / `test.todo` / `describe.todo` stubs remain; spec-0012).
347
+ - [ ] `qfai validate --profile tdd --fail-on error` passes with zero `QFAI-TEST-001` findings (no `it.todo` / `test.todo` / `describe.todo` stubs remain).
346
348
 
347
349
  ## Completion Checklist (MUST)
348
350