qfai 1.8.4 → 1.8.7

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 (95) hide show
  1. package/README.md +39 -56
  2. package/assets/init/.qfai/assistant/agents/acceptance-test-engineer.md +6 -0
  3. package/assets/init/.qfai/assistant/agents/architecture-reviewer.md +6 -2
  4. package/assets/init/.qfai/assistant/agents/backend-engineer.md +6 -3
  5. package/assets/init/.qfai/assistant/agents/completion-reviewer.md +6 -0
  6. package/assets/init/.qfai/assistant/agents/delivery-planner.md +6 -0
  7. package/assets/init/.qfai/assistant/agents/devops-ci-engineer.md +6 -0
  8. package/assets/init/.qfai/assistant/agents/discovery-analyst.md +6 -0
  9. package/assets/init/.qfai/assistant/agents/doc-steward.md +6 -0
  10. package/assets/init/.qfai/assistant/agents/frontend-engineer.md +6 -3
  11. package/assets/init/.qfai/assistant/agents/implementation-reviewer.md +6 -1
  12. package/assets/init/.qfai/assistant/agents/orchestrator.md +6 -0
  13. package/assets/init/.qfai/assistant/agents/product-experience-architect.md +6 -2
  14. package/assets/init/.qfai/assistant/agents/product-surface-reviewer.md +11 -2
  15. package/assets/init/.qfai/assistant/agents/qa-gatekeeper.md +6 -0
  16. package/assets/init/.qfai/assistant/agents/qa-strategist.md +6 -0
  17. package/assets/init/.qfai/assistant/agents/requirements-analyst.md +6 -0
  18. package/assets/init/.qfai/assistant/agents/requirements-reviewer.md +6 -0
  19. package/assets/init/.qfai/assistant/agents/solution-architect.md +6 -2
  20. package/assets/init/.qfai/assistant/agents/test-design-analyst.md +6 -0
  21. package/assets/init/.qfai/assistant/instructions/requirements-decomposition.md +1 -1
  22. package/assets/init/.qfai/assistant/instructions/shared-skill-operating-baseline.md +13 -0
  23. package/assets/init/.qfai/assistant/instructions/workflow.md +2 -2
  24. package/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +3 -0
  25. package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +7 -6
  26. package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +12 -8
  27. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/design-dna-intake.md +30 -0
  28. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/discussion-artifact-rules.md +62 -0
  29. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/prototyping.yaml +4 -12
  30. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/31_reference_pool.md +6 -6
  31. package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +23 -12
  32. package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +67 -321
  33. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/generator-prompt.md +35 -0
  34. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/handoff.md +41 -0
  35. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/iteration-loop.md +51 -0
  36. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/reviewer-prompt.md +75 -0
  37. package/assets/init/.qfai/assistant/skills/qfai-prototyping/templates/contracts/prototype-handoff.sample.yaml +14 -0
  38. package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +19 -16
  39. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/contract-artifact-rules.md +30 -0
  40. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/review-cycle-playbook.md +5 -0
  41. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-phase-checklists.md +2 -2
  42. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-quality-gate.md +1 -1
  43. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/spec-traceability-rules.md +75 -0
  44. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/ui-design-contract-normalization.md +45 -0
  45. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/brand-design.sample.yaml +20 -0
  46. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/reference-pool.sample.yaml +15 -0
  47. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/04_Business-Flow.md +1 -1
  48. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/01_Spec.md +2 -2
  49. package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +11 -8
  50. package/assets/init/.qfai/assistant/steering/agent-routing.yml +17 -28
  51. package/assets/init/.qfai/assistant/steering/review-profiles.yml +0 -3
  52. package/assets/init/.qfai/assistant/steering/structure.md +1 -1
  53. package/assets/init/.qfai/assistant/steering/ui-definition-protocol.md +53 -49
  54. package/assets/uix-rev/comparison-review.md +3 -4
  55. package/dist/cli/index.cjs +11312 -12951
  56. package/dist/cli/index.cjs.map +1 -1
  57. package/dist/cli/index.mjs +11041 -12681
  58. package/dist/cli/index.mjs.map +1 -1
  59. package/dist/index.cjs +5941 -8100
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.d.cts +11 -370
  62. package/dist/index.d.ts +11 -370
  63. package/dist/index.mjs +5904 -8055
  64. package/dist/index.mjs.map +1 -1
  65. package/package.json +5 -6
  66. package/assets/init/.qfai/README.md +0 -117
  67. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/33_exploration_rubric.md +0 -27
  68. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/34_evaluator_calibration.md +0 -17
  69. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/design-system-compliance.md +0 -22
  70. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/evidence-requirements.md +0 -62
  71. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/iteration-cycle.md +0 -57
  72. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/l1-review-guide.md +0 -37
  73. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/l2-review-guide.md +0 -45
  74. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/reviewer-gate.md +0 -45
  75. package/assets/init/.qfai/assistant/skills/qfai-prototyping/templates/contracts/ui-0001-order-mockable.yaml +0 -67
  76. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/absorption-policy.sample.yaml +0 -7
  77. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/design-system.sample.yaml +0 -22
  78. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/evaluation-rubric.sample.yaml +0 -35
  79. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/evaluator-calibration.sample.yaml +0 -15
  80. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/selected-direction.sample.yaml +0 -7
  81. package/assets/init/.qfai/assistant/skills.local/README.md +0 -26
  82. package/assets/init/.qfai/contracts/README.md +0 -67
  83. package/assets/init/.qfai/contracts/api/README.md +0 -68
  84. package/assets/init/.qfai/contracts/db/README.md +0 -32
  85. package/assets/init/.qfai/contracts/design/README.md +0 -45
  86. package/assets/init/.qfai/contracts/ui/README.md +0 -162
  87. package/assets/init/.qfai/discussion/README.md +0 -160
  88. package/assets/init/.qfai/evidence/README.md +0 -99
  89. package/assets/init/.qfai/evidence/calibration.yaml +0 -26
  90. package/assets/init/.qfai/report/README.md +0 -26
  91. package/assets/init/.qfai/review/README.md +0 -128
  92. package/assets/init/.qfai/review_archive/.gitignore +0 -3
  93. package/assets/init/.qfai/review_archive/README.md +0 -30
  94. package/assets/init/.qfai/specs/README.md +0 -100
  95. package/assets/init/.qfai/specs/spec-XXXX/tdd/test-list.md +0 -4
package/README.md CHANGED
@@ -17,13 +17,14 @@ The agent reads the repository, produces the required artifacts, and iterates un
17
17
 
18
18
  ## Release status
19
19
 
20
- - Current package version: `1.7.15`
21
- - Release posture: v1.7.15 enforces runtime truthfulness.
22
- - Prototyping is UI-only; `full-harness` is measurement-driven iteration accumulation for UI-bearing surfaces only.
20
+ - Release posture: runtime truthfulness is enforced.
21
+ - Prototyping is UI-only; v2.0 (spec-0017) runs a single-thread evolution loop
22
+ driven by `qfai prototyping iterate --cycle <n>`, with deterministic stop
23
+ conditions (exit codes 0/64/65/2). The v1.x mode tier and full-harness
24
+ machinery are removed.
23
25
  - Runtime observation is observed-only (no synthetic 200 / API / DB prototyping coverage).
24
- - Browser QA is mandatory per screen in full-harness, and `actionsWired` reports action coverage rather than finding count.
26
+ - 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).
25
27
  - Calibration SSOT is the calibration pack referenced by `calibrationRef.packPath`.
26
- - 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.
27
28
 
28
29
  ## Quick start
29
30
 
@@ -57,13 +58,19 @@ npx qfai report
57
58
  - Produces a human-readable report (`report.md` by default) or an internal JSON export (`report.json`) from `validate.json`; use `--base-url` to link file paths in Markdown to your repository viewer.
58
59
  - `npx qfai doctor`
59
60
  - Diagnoses configuration discovery, path resolution, glob scanning, and `validate.json` inputs before running validate/report; use `--fail-on` to enforce failures in CI.
60
- Note: prototyping evidence (`.qfai/evidence/prototyping.json`) is produced by the AI workflow / skills
61
- (`/qfai-prototyping` any mode; modes differ only in `maxCycles`, see spec-0012), not by a general-purpose end-user CLI flow.
62
- Use `npx qfai prototyping round-start --round <r5|r3|r2|r1> --candidates <csv> --target-url <url> --mode <mode>`
63
- to generate the round-scoped review bundle and command plans the AI evaluator sub-agent consumes, then use
64
- `round-harvest`, `round-narrow`, `round-absorb`, and `round-reimplement-verify` to advance the candidate funnel.
65
- `qfai validate` consumes the resulting evidence files, including `mode.effective` and `fullHarness` metadata when present.
66
- 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`).
61
+ Use `--profile prototyping` to add prototyping-specific preflight checks for the
62
+ primary spec, UI contracts, design contract readiness, active agent-wrapper
63
+ integrations, shipped role-input readiness, Playwright CLI launcher
64
+ resolution/probing, and target URL reachability.
65
+ Note: prototyping evidence (`.qfai/evidence/prototyping/prototyping.json` v3.0) is produced by the AI workflow
66
+ (`/qfai-prototyping` v2.0, see spec-0017), not by a general-purpose end-user CLI flow.
67
+ Use `npx qfai prototyping preflight --target-url <url>` for a focused
68
+ prototyping preflight before the skill starts; it surfaces blocking
69
+ `QFAI-DCON-*` design-contract issues alongside runtime assumptions and resolves a runnable Playwright CLI launcher.
70
+ Use `npx qfai prototyping iterate --cycle <n> --target-url <url>` to drive each cycle of the v2.0 single-thread
71
+ evolution loop. Exit codes: 0 (continue), 64 (convergence), 65 (max-iterations), 2 (input error).
72
+ Traceability refs inside prototyping evidence must use repo-root-relative concrete artifact refs
73
+ (for example `.qfai/specs/spec-0017/01_Spec.md#L3` or `.qfai/evidence/prototyping/iter-03/home.png`).
67
74
  Absolute paths are invalid. The same strict ref grammar is enforced for top-level and leaf evidence-bearing fields, including
68
75
  `runtimeGate.evidenceRefs`, `runtimeGate.ui[].declaredRef`, `runtimeGate.ui[].renderEvidenceRefs[]`,
69
76
  `runtimeGate.ui[].browserQaEvidenceRefs[]`, `specs[].coverageRefs[].declaredRef`, `specs[].coverageRefs[].observedRefs[]`,
@@ -87,9 +94,9 @@ npx qfai report
87
94
 
88
95
  `qfai validate` enforces spec-to-test traceability with directory-based rules.
89
96
 
90
- - `tests/e2e/**`: annotate all covered user stories with `QFAI:SPEC-XXXX:US-YYYY`.
91
- - `tests/integration/**`: annotate all covered test cases with `QFAI:SPEC-XXXX:TC-YYYY`.
92
- - `tests/api/**`: annotate all covered API contracts with `QFAI:CON-API-XXXX`.
97
+ - `tests/e2e/**`: annotate all covered user stories with concrete IDs such as `QFAI:SPEC-0001:US-0001`.
98
+ - `tests/integration/**`: annotate all covered test cases with concrete IDs such as `QFAI:SPEC-0001:TC-0001`.
99
+ - `tests/api/**`: annotate all covered API contracts with concrete IDs such as `QFAI:CON-API-0001`.
93
100
  - `tests/api/**` and `tests/e2e/**` must not use `TC` annotations.
94
101
  - `AC` annotations are not required in code; AC coverage is treated as indirect through full `TC` coverage.
95
102
 
@@ -102,7 +109,7 @@ The agent reads QFAI assets under `.qfai/assistant/` and produces or updates SDD
102
109
  ### Where the skills live
103
110
 
104
111
  - QFAI canonical skills (SSOT): `.qfai/assistant/skills/**` (may be overwritten when you re-run `qfai init --force`).
105
- - Your local overrides: `.qfai/assistant/skills.local/**` (never overwritten by QFAI; prefer this for project-specific customizations).
112
+ - 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.
106
113
 
107
114
  ### Minimal custom skill set
108
115
 
@@ -115,9 +122,11 @@ QFAI includes a small set of custom skills (stored under `.qfai/assistant/skills
115
122
  as 15 required markdown files under `.qfai/discussion/discussion-<ts>/`.
116
123
  UI-bearing discussion packs may include `prototyping.yaml` as an optional recommendation artifact; non-ui discussion packs typically omit it.
117
124
  - **qfai-sdd**: Unified SDD entrypoint with discussion-pack preflight guard (missing/incomplete/blocking OQ causes stop + next action guidance).
118
- - **qfai-prototyping**: Build a contract-aligned UI prototype using the Playwright CLI + AI
119
- evaluator harness (spec-0012). Modes (`low-cost`/`standard`/`full-harness`) run the same
120
- strictest review cycle; only `maxCycles` (1/3/20) differs.
125
+ - **qfai-prototyping** (v2.0, spec-0017): Single-thread design evolution loop. One prototype iterated
126
+ through up to 15 cycles of generate -> capture -> review with a 4-axis ordinal rubric, anti-slop
127
+ detection, prose critique, and explicit pivot permission. Stops deterministically when all four
128
+ axes hit `exceptional` (exit 64) or the iteration budget is exhausted (exit 65). The v1.x funnel,
129
+ mode tier, polish/branch cycles, and 100/100 completion gate are removed.
121
130
  - **qfai-atdd**: Implement acceptance tests driven by specs/scenarios.
122
131
  - **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.
123
132
  - **qfai-verify**: Run full-scan local quality gates (`validate --fail-on error`, `report`, repo gates) and produce reviewer-approved evidence under `.qfai/evidence/`.
@@ -220,9 +229,9 @@ Notes.
220
229
  - `validate.json`, `report.json`, `doctor.json`, and `run-*` JSON logs are internal exports and are not a stable external contract; prefer `report.md` for integrations that must survive tool upgrades.
221
230
  - Scenario files are expected to use the Gherkin extension `*.feature` (not `*.md`).
222
231
  - `prototyping.calibration.packPath` points to the calibration pack SSOT; runtime and validator both resolve thresholds and iteration parameters from that pack.
223
- - `prototyping.calibration.thresholds`, `maxIterations`, `plateauDelta`, and `plateauLookback` are unsupported public config fields in v1.7.15.
232
+ - `prototyping.calibration.thresholds`, `maxIterations`, `plateauDelta`, and `plateauLookback` are unsupported public config fields.
224
233
  Put calibration values in the referenced pack instead of `qfai.config.yaml`.
225
- - Observability modules (`src/core/observability/`) exist as foundation code but are **not integrated into blocking validation** in v1.7.14. They are reserved for future operational instrumentation.
234
+ - Observability modules (`src/core/observability/`) exist as foundation code but are **not yet integrated into blocking validation**. They are reserved for future operational instrumentation.
226
235
 
227
236
  ## Specifications and contracts (SDD)
228
237
 
@@ -251,7 +260,7 @@ flowchart LR
251
260
  - Contracts SSOT: `.qfai/contracts/**`
252
261
  - Report outputs (`.qfai/report/**`) are derived artifacts and not SSOT.
253
262
 
254
- ## Minimal tutorial (v1.7.7)
263
+ ## Minimal tutorial
255
264
 
256
265
  1. `npx qfai init`
257
266
  2. Run `/qfai-discussion` to structure scope, open questions, and produce a discussion pack under `.qfai/discussion/discussion-<ts>/`.
@@ -368,10 +377,7 @@ Typical customizations.
368
377
  │ │ │ │ └── SKILL.md
369
378
  │ │ │ └── qfai-verify
370
379
  │ │ │ └── SKILL.md
371
- │ │ ├── skills.local
372
- │ │ │ └── README.md
373
380
  │ │ ├── steering
374
- │ │ │ ├── README.md
375
381
  │ │ │ ├── agent-catalog.yml
376
382
  │ │ │ ├── agent-routing.yml
377
383
  │ │ │ ├── review-gate.rules.yml
@@ -379,40 +385,14 @@ Typical customizations.
379
385
  │ │ │ ├── product.md
380
386
  │ │ │ ├── structure.md
381
387
  │ │ │ └── tech.md
382
- └── README.md
383
- │ ├── discussion
384
- │ │ ├── README.md
385
- │ │ └── discussion-YYYYMMDDhhmmssSSS
386
- │ │ ├── 01_Context.md
387
- │ │ ├── ...
388
- │ │ ├── 14_Review-Request.md
389
- │ │ ├── 99_delta.md
390
- │ │ └── prototyping.yaml
391
- │ ├── contracts
392
- │ │ ├── api
393
- │ │ │ └── README.md
394
- │ │ ├── db
395
- │ │ │ └── README.md
396
- │ │ ├── ui
397
- │ │ │ └── README.md
398
- │ │ └── README.md
399
- │ ├── report
400
- │ │ ├── .gitignore
401
- │ │ ├── README.md
402
- │ │ └── run-20260218123456789
403
- │ │ ├── run.json
404
- │ │ ├── validator.json
405
- │ │ ├── traceability.json
406
- │ │ └── summary.md
407
- │ ├── review
408
- │ │ ├── .gitignore
409
- │ │ └── README.md
410
- │ ├── specs
411
- │ │ └── README.md
412
- │ └── README.md
388
+ │ └── waivers.yml
413
389
  └── qfai.config.yaml
414
390
  ```
415
391
 
392
+ `qfai init` does not seed `.qfai` workflow artifacts such as specs, discussions,
393
+ contracts, evidence, reports, reviews, placeholder spec directories, or artifact
394
+ README files. Those files are created later by QFAI skills when real work exists.
395
+
416
396
  Integration wrappers are also generated for immediate use:
417
397
 
418
398
  - Agents/Codex VS Code: `.agents/skills/**`
@@ -424,6 +404,9 @@ Integration wrappers are also generated for immediate use:
424
404
 
425
405
  `npx qfai init` installs canonical skills under `.qfai/assistant/skills/**` (SSOT)
426
406
  and generates thin wrapper assets for Agents/Codex VS Code / Copilot / Claude Code / Codex.
407
+ Canonical agent markdown under `.qfai/assistant/agents/**` uses a shared YAML frontmatter
408
+ subset (`name`, `description`, `tools`) compatible with Claude Code and GitHub Copilot,
409
+ while Codex consumes mirrored `.codex/agents/*.toml` profiles.
427
410
  If wrapper assets drift from canonical skills, rerun `npx qfai init --force` to resync.
428
411
 
429
412
  ## Contributing (for QFAI maintainers)
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: acceptance-test-engineer
3
+ description: "Implement E2E, API, and integration acceptance coverage with explicit traceability."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Acceptance Test Engineer
2
8
 
3
9
  ## Mission
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: architecture-reviewer
3
+ description: "Review architecture and contract decisions for consistency, safety, and rejected-option protection."
4
+ tools: [Read, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Architecture Reviewer
2
8
 
3
9
  ## Mission
@@ -22,8 +28,6 @@
22
28
  - .qfai/specs/spec-\*/09_delta.md
23
29
  - .github/instructions/code-review.instructions.md
24
30
  - .github/instructions/principles.instructions.md
25
- - .instruction/00_universal/development-principles-checklist.md
26
- - .instruction/01_specialties/design.md
27
31
  - Architecture decisions, diagrams, and `.qfai/contracts/**`
28
32
 
29
33
  ## Deliverables
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: backend-engineer
3
+ description: "Implement backend behavior aligned with specs, API and DB contracts, and operational constraints."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Backend Engineer
2
8
 
3
9
  ## Mission
@@ -21,9 +27,6 @@
21
27
  - .qfai/specs/spec-\*/09_delta.md
22
28
  - .qfai/specs/spec-\*/01_Spec.md
23
29
  - .github/instructions/principles.instructions.md
24
- - .instruction/00_universal/development-principles-checklist.md
25
- - .instruction/01_specialties/implementation.md
26
- - .instruction/01_specialties/design.md
27
30
  - .qfai/contracts/api/\*\*
28
31
  - .qfai/contracts/db/\*\*
29
32
 
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: completion-reviewer
3
+ description: "Independently audit completion contract, prompt DoD, and drift-protocol compliance."
4
+ tools: [Read, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Completion Reviewer
2
8
 
3
9
  ## Mission
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: delivery-planner
3
+ description: "Create phased delivery plans, ownership splits, risk controls, and rerun policies."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Delivery Planner
2
8
 
3
9
  ## Mission
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: devops-ci-engineer
3
+ description: "Run quality gates and capture reproducible CI and runtime evidence."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # DevOps CI Engineer
2
8
 
3
9
  ## Mission
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: discovery-analyst
3
+ description: "Gather pre-knowledge, ask focused questions, and facilitate decision-making."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Discovery Analyst
2
8
 
3
9
  ## Mission
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: doc-steward
3
+ description: "Keep docs, changelog, and migration notes synchronized with implementation and workflow changes."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Doc Steward
2
8
 
3
9
  ## Mission
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: frontend-engineer
3
+ description: "Implement frontend behavior aligned with the selected direction, finalized design system, screen contracts, and product experience decisions."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Frontend Engineer
2
8
 
3
9
  ## Mission
@@ -20,9 +26,6 @@
20
26
  - .qfai/specs/spec-\*/09_delta.md
21
27
  - .qfai/specs/spec-\*/01_Spec.md
22
28
  - .github/instructions/principles.instructions.md
23
- - .instruction/00_universal/development-principles-checklist.md
24
- - .instruction/01_specialties/implementation.md
25
- - .instruction/01_specialties/design.md
26
29
  - .qfai/contracts/ui/\*\*
27
30
  - UI evidence artifacts when available
28
31
 
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: implementation-reviewer
3
+ description: "Review code changes for correctness, maintainability, backend safety, and implementation risk."
4
+ tools: [Read, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Implementation Reviewer
2
8
 
3
9
  ## Mission
@@ -23,7 +29,6 @@
23
29
  - .qfai/specs/spec-\*/09_delta.md
24
30
  - .github/instructions/code-review.instructions.md
25
31
  - .github/instructions/principles.instructions.md
26
- - .instruction/00_universal/development-principles-checklist.md
27
32
  - Diff of changed files
28
33
  - `.qfai/contracts/api/**` and `.qfai/contracts/db/**`
29
34
 
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: orchestrator
3
+ description: "Plan, delegate, integrate, and enforce stage gates without self-authoring."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Orchestrator
2
8
 
3
9
  ## Mission
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: product-experience-architect
3
+ description: "Own UX, visual design, navigation, screen transitions, and integrated experience direction."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Product Experience Architect
2
8
 
3
9
  ## Mission
@@ -22,8 +28,6 @@
22
28
  - .qfai/specs/spec-\*/09_delta.md
23
29
  - .qfai/specs/spec-\*/01_Spec.md
24
30
  - .github/instructions/principles.instructions.md
25
- - .instruction/00_universal/development-principles-checklist.md
26
- - .instruction/01_specialties/design.md
27
31
  - Exploration brief, reference pool, evaluation rubric, evaluator calibration, selected direction, finalized design system,
28
32
  screen contracts, optional tokens, optional fallback HTML/CSS mock, and Mermaid flows
29
33
  - Runtime screenshots or rendered evidence when available
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: product-surface-reviewer
3
+ description: "Review UI implementation, usability, design coherence, and service-level product-surface quality."
4
+ tools: [Read, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Product Surface Reviewer
2
8
 
3
9
  ## Mission
@@ -11,6 +17,10 @@
11
17
  - Audit visual design, token alignment, and service-level UX coherence.
12
18
  - Reconcile sidecar artifacts (selected anchor, strategy, screen contracts), design tokens, mermaid flows, and rendered output consistency.
13
19
  HTML mock is optional fallback evidence only. Design tokens are supporting input.
20
+ - For UI implementation, compare rendered output against `.qfai/contracts/design/prototype-handoff.yaml`, canonical prototype screenshots, HTML snapshots, and `.qfai/prototypes/winner/index.html`.
21
+ - Reject prototype parity when implementation loses CTA hierarchy, spacing rhythm, information density,
22
+ surface framing intent, transition clarity, state coverage, or component character captured by the winning
23
+ prototype.
14
24
  - Review UI changes for KISS and YAGNI at the surface layer: avoid needless states, controls, flows, animations, and configuration that are not justified by the product goal.
15
25
  - Check naming, structure, and responsibility split of UI components for clarity, cohesion, and minimal surprise.
16
26
  - Validate docs/UX consistency so usage text, labels, error states, and user flows match the intended product behavior.
@@ -24,9 +34,8 @@
24
34
  - .qfai/specs/spec-\*/09_delta.md
25
35
  - .github/instructions/code-review.instructions.md
26
36
  - .github/instructions/principles.instructions.md
27
- - .instruction/00_universal/development-principles-checklist.md
28
- - .instruction/01_specialties/design.md
29
37
  - UI contract files under `.qfai/contracts/ui/`
38
+ - Prototype handoff contract under `.qfai/contracts/design/prototype-handoff.yaml` when available
30
39
  - Runtime screenshots / HTML evidence / relevant diffs
31
40
 
32
41
  ## Deliverables
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: qa-gatekeeper
3
+ description: "Enforce validate, coverage, runtime-proof, and prototyping evidence gates before completion."
4
+ tools: [Read, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # QA Gatekeeper
2
8
 
3
9
  ## Mission
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: qa-strategist
3
+ description: "Own QA strategy, quality posture, traceability expectations, and failure-handling design."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # QA Strategist
2
8
 
3
9
  ## Mission
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: requirements-analyst
3
+ description: "Produce testable requirements, option sets, and explicit open-question ledgers."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Requirements Analyst
2
8
 
3
9
  ## Mission
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: requirements-reviewer
3
+ description: "Review requirements, options, and open-question handling for completeness, neutrality, and safe deferral."
4
+ tools: [Read, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Requirements Reviewer
2
8
 
3
9
  ## Mission
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: solution-architect
3
+ description: "Define architecture and contract decisions aligned with specs, constraints, and rejected-option history."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Solution Architect
2
8
 
3
9
  ## Mission
@@ -23,8 +29,6 @@
23
29
  - .qfai/discussion/discussion-\*/04_Sources.md
24
30
  - .qfai/discussion/discussion-\*/06_REQ.md
25
31
  - .github/instructions/principles.instructions.md
26
- - .instruction/00_universal/development-principles-checklist.md
27
- - .instruction/01_specialties/design.md
28
32
  - Existing architecture docs and `.qfai/contracts/**`
29
33
 
30
34
  ## Deliverables
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: test-design-analyst
3
+ description: "Define test structure, coverage obligations, traceability, and test-scope boundaries."
4
+ tools: [Read, Write, Edit, Glob, Grep, Bash]
5
+ ---
6
+
1
7
  # Test Design Analyst
2
8
 
3
9
  ## Mission
@@ -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
 
@@ -39,6 +39,19 @@ Rules:
39
39
  - Do not reintroduce options marked as rejected in `09_delta.md`.
40
40
  - If a rejected option must be reconsidered, create a `[RE-OPEN]` decision record that references the prior DR-ID, states what changed, and includes explicit approval.
41
41
 
42
+ ## Gate Failure Autorepair Protocol
43
+
44
+ When validate, doctor, test, lint, typecheck, build, capture, or report gates fail:
45
+
46
+ - inspect exit code, logs, `validate.json`, and cited files before reporting;
47
+ - classify each finding as skill-owned artifact, upstream spec/contract, code/test defect, environment/tooling, or user decision;
48
+ - fix skill-owned artifacts and code/test defects autonomously when the fix is local and non-destructive;
49
+ - rerun the same failing gate after each fix batch;
50
+ - do not weaken profiles, lower `--fail-on`, waive errors, invent evidence, or skip required reviewers;
51
+ - stop only for destructive changes, ambiguous product/spec decisions, missing permissions/tools, or repeated no-progress failures.
52
+
53
+ When stopping, report: cause, attempted fixes, remaining blocker, user action, and retry gate.
54
+
42
55
  ## Completion Contract (Shared)
43
56
 
44
57
  Before declaring completion, you MUST:
@@ -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
 
@@ -60,6 +60,8 @@ When unsure, read inputs in this order:
60
60
  - `.qfai/specs/<spec-id>/scenario.feature`
61
61
  - coverage ledger files
62
62
 
63
+ Do not read discussion-pack UI/UX sidecars. UI-bearing acceptance tests consume only specs and contracts normalized by `/qfai-sdd`.
64
+
63
65
  ## Read Set Contract (Mandatory)
64
66
 
65
67
  - Default Mode:
@@ -162,6 +164,7 @@ Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#delta-re
162
164
  ## Completion Contract (Shared)
163
165
 
164
166
  Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#completion-contract-shared`.
167
+ Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#gate-failure-autorepair-protocol` for validate, doctor, and quality-gate failures.
165
168
 
166
169
  ## Goal
167
170
 
@@ -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
 
@@ -131,6 +131,7 @@ Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#delta-re
131
131
  ## Completion Contract (Shared)
132
132
 
133
133
  Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#completion-contract-shared`.
134
+ Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#gate-failure-autorepair-protocol` for validate, doctor, and quality-gate failures.
134
135
 
135
136
  ## Goal
136
137
 
@@ -243,7 +244,7 @@ These principles are inspired by "constitution / articles" patterns used by othe
243
244
 
244
245
  ## README Rule
245
246
 
246
- 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.
247
248
 
248
249
  - READMEs are reference guides. Follow their structure, templates, and checklists.
249
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
 
@@ -64,17 +62,23 @@ UI-bearing packs must produce the following sidecars as primary truth:
64
62
  9. Generate `prototyping.yaml` only when the latest discussion pack is UI-bearing and an explicit prototyping recommendation is useful.
65
63
  10. Request review and record the Reviewer result.
66
64
 
65
+ For UI-bearing targets, follow `references/design-dna-intake.md` while authoring the UI/UX sidecars. Keep this `SKILL.md` compact; put detailed interview prompts and examples in the reference file.
66
+
67
67
  ## UI-bearing Authoring Requirements
68
68
 
69
- - `30_exploration_brief.md` must define product intent, must-preserve interactions, brand signals, and differentiation targets.
70
- - `31_reference_pool.md` must define exploration references, adopted points, rejected points, and local translation.
71
- - `32_design_anti_goals.md` must contain explicit anti-goals and recurrence prevention notes.
72
- - `33_exploration_rubric.md` must define design quality, originality, craft, and functionality grading criteria.
73
- - `34_evaluator_calibration.md` must include good critique examples, too-lenient examples, blandness-fail examples, and originality-fail examples.
74
- - `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 v2.0 reviewer.
72
+ - `50_review_input_bundle.md` must document review inputs for downstream skills.
73
+
74
+ v1.x sidecars `33_exploration_rubric.md` and `34_evaluator_calibration.md`
75
+ are removed in spec-0017 P4 (axes are global constants in
76
+ `core/prototyping/iteration.ts#OrdinalScore`, ordinal 4-step scale).
75
77
 
76
78
  ## Completion Contract (Shared)
77
79
 
80
+ Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#gate-failure-autorepair-protocol` for validate, doctor, and quality-gate failures.
81
+
78
82
  Before declaring completion, you MUST:
79
83
 
80
84
  - verify all 15 mandatory output files exist and are populated;
@@ -0,0 +1,30 @@
1
+ # Design DNA Intake
2
+
3
+ Use this reference only for UI-bearing discussion packs.
4
+
5
+ ## Interview Targets
6
+
7
+ - Brand personality: list 3-5 traits the product should express.
8
+ - Audience emotion: define what users should feel after the primary task.
9
+ - Category conventions: name the expected layout and interaction patterns for this market.
10
+ - Differentiation targets: state what must feel unlike generic SaaS, generic shadcn, or direct competitors.
11
+ - Anti-template constraints: name default visual patterns that must not survive into prototyping.
12
+ - Reference strategy: collect competitor, adjacent, aspirational, template-seed, and anti-pattern references.
13
+
14
+ ## Reference Rules
15
+
16
+ - Treat templates as seeds, not winners.
17
+ - Capture both adopted and rejected points for every reference.
18
+ - Translate references into local product rules instead of copying visual surfaces.
19
+ - Record copy risk as `low`, `medium`, or `high`.
20
+ - Record template usage policy as `none`, `reference-only`, or `implementation-seed`.
21
+
22
+ ## Output Mapping
23
+
24
+ - Put product intent and brand signals in `30_exploration_brief.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
+ v1.x sidecars `33_exploration_rubric.md` and `34_evaluator_calibration.md`
29
+ are removed in spec-0017 P4. Evaluation axes are now global constants in
30
+ `core/prototyping/iteration.ts#OrdinalScore`.