.qfai/assistant/skills/qfai-prototyping/SKILL.md
Implement a minimum runnable skeleton for ALL specs and block DONE until evidence + validate gate pass.
npx skillsauth add aganesy/qfai qfai-prototypingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
[DRIFT-PROTOCOL:MANDATORY]
Run prototyping as an all-spec stage. Scope is fixed to ALL specs resolved from .qfai/specs/spec-*.
This stage is complete only when all specs pass the minimum contract:
When invoked without explicit spec selection, the agent MUST perform automatic spec detection.
Detect changed specs by integrating these sources (union logic: changed_specs = A ∪ B ∪ C ∪ D):
| Source | Method | Fallback |
| --------------------- | ------------------------------------------------------------------ | ------------------------ |
| A: Branch Diff | git diff --name-only <baseBranch>..HEAD (default: origin/main) | Skip if git unavailable |
| B: Local Changes | git diff --name-only + git diff --name-only --staged | Skip if git unavailable |
| C: Evidence Mtime | Compare evidence file mtime vs spec file mtime | Skip if no evidence file |
| D: delta.md Parse | Extract change context from spec-*/09_delta.md | Skip if no delta.md |
Extract spec-IDs from paths matching .qfai/specs/spec-*/ in the diff output.
changed > stale > unchanged.qfai/specs/_policies/** modified): Flag all specs as potentially impacted; require user confirmationskeleton):
interactive, default):
uiFidelity is produced in prototyping.json.interactive).
REVISE.This skill is static-first: validation relies on static checks and file-based analysis by default. No runtime execution (browser, live API, DB connection) is required unless full-harness mode is activated.
The full-harness iteration loop proceeds through four phases per cycle:
Every full-harness run MUST produce:
captured / skipped / failed status (3-state vocabulary).qfai validate at each iteration.qfai.config.yaml under prototyping.calibration.For projects with surface: non-ui, prototyping obligations are n/a.
Non-UI surfaces skip UI route checks, screen rendering, and visual fidelity gates.
Evidence should record surface: non-ui and mark UI-specific rows as n/a in the Coverage Matrix.
Mode selection follows this precedence:
prototyping.yaml with recommended_mode → propose the recommended mode to the user for confirmation.standard mode (default).After mode determination, record in evidence:
mode_source: how the mode was selected (user-specified / discussion-recommendation / default).effective_mode: the mode in effect (low-cost / standard / full-harness).rationale: why this mode was chosen.| Mode | Scope | Evidence Expectations | | ---------------- | --------------------------------------- | --------------------- | | low-cost | Static checks only (L1/L2) | L1/L2 | | standard | Static + optional light runtime (L2/L3) | L2/L3 | | full-harness | Static + runtime-heavy (L3/L4/L5) | L3/L4/L5 |
.qfai/** artifact, read and follow the relevant directory README template and sample:
.qfai/require/README.md.qfai/specs/README.md.qfai/contracts/**/README.md.qfai/evidence/README.mdWhen unsure, read inputs in this order:
.qfai/assistant/instructions/*.qfai/assistant/steering/*.qfai/specs/spec-*/01_Spec.md (Primary SSOT / Consumer View).qfai/contracts/ui/**, .qfai/specs/_policies/05_Contracts.md, and each spec-*/11_Contracts.md.qfai/specs/spec-*/09_delta.md (Decision Records).qfai/specs/spec-*/01_Spec.md.qfai/contracts/ui/**01_Spec.md Escalation Hook signals ambiguity / conflict / missing constraint / trade-off.qfai/specs/_policies/01_Objective.md, .qfai/specs/_policies/07_Constraints.md, .qfai/specs/_policies/08_Decisions.md_policies/** by default.This section is mandatory and overrides conflicting fallback text.
Simulation mode allowed.Subagents: simulated (reason: <why unavailable>)User approval: <quote or reference>Every major artifact in this stage MUST include this table:
| Step | Role (sub-agent) | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE) | | ---- | ---------------- | ---------- | ------------ | ------------- | -------------------- | | 1 | <role> | <task> | <refs> | <refs> | PASS/REVISE |
completion-reviewer.test-layers.md and plan,PASS or REVISE..qfai/assistant/steering/agent-routing.yml.completion-reviewerproduct-surface-reviewer when the target is UI-bearing.qa-gatekeeper when runtime, coverage, or evidence gates are in scope.Task title: <short>
Role: <sub-agent role>
Goal: <what to decide/produce>
Inputs (refs):
- <file/section>
Constraints:
- must: enforce Drift Protocol
- must: verify plan/test-layer adherence (`test-layers.md` + plan)
- must: verify `qfai validate --fail-on error` evidence
- must_not: accept floor/ratio as hard gate
Output format:
- <headings / bullet schema>
Quality bar:
- PASS if ...
- REVISE if ...
Result: PASS | REVISE
Findings:
- <issue>
Required fixes:
- <action>
Evidence checked:
- <refs>
Before implementation, refresh and verify:
.qfai/assistant/steering/manifest.md.qfai/assistant/steering/product.md.qfai/assistant/steering/structure.md.qfai/assistant/steering/tech.mdIf facts are missing, record Open Questions and ask the user.
[RE-OPEN] Decision Record with explicit approval..qfai/specs/spec-*; do not shrink to one spec..qfai/contracts/**./qfai-discussion..qfai/evidence/.Before declaring completion, you MUST:
Build the minimum runnable vertical slice for all specs so /qfai-atdd can proceed without hidden scope gaps.
/qfai-atdd)..qfai/evidence/.prototyping.json includes uiFidelity for L2 reporting.PASS or actionable REVISE)..qfai/specs/spec-*._policies/05_Contracts.md and/or spec-*/11_Contracts.md.uiRoutesapiEndpointsdbObjectsProcess specs in dependency order (foundation first, then business modules):
REVISE.Check the full declared list from preflight and record all results:
404 is forbidden).If any check fails, completion is blocked.
Create/update both artifacts in .qfai/evidence/:
specs[] with specId, declared, checked, missingruntimeGate.ui[] and runtimeGate.api[]uiFidelity.version, uiFidelity.mode, uiFidelity.screens[] for L2meta.generatedAt, meta.toolVersion, meta.commands[]uiFidelity is a stage DoD requirement in this skill.
Validator compatibility remains backward-compatible: existing required fields stay unchanged.
When declaring DONE, include:
.qfai/specs/spec-* are covered in Coverage Matrix.prototyping.json includes uiFidelity for L2 output.REVISE if present).qfai validate --fail-on error passes.When complete, provide a final user-facing completion message and list actions.
/qfai-atdd.
Action: implement acceptance tests against the all-spec prototype runtime behavior./qfai-verify.
Action: run full validation/report flow and publish gate evidence./qfai-prototyping.
Action: fix missing matrix rows, 404 findings, or unresolved contract mapping gaps. Specify --mode full-harness if runtime-heavy verification is needed.testing
# /qfai-prototyping-full-harness [DRIFT-PROTOCOL:MANDATORY] Premium prototyping skill with planner/generator/evaluator iteration loop. Full-harness mode is an **explicit, non-default** path activated only via `qfai prototyping --mode full-harness` or discussion artifact recommendation. > This skill defines a real execution workflow — it is NOT a routing-only redirect. ## When to Use - Projects requiring L3–L5 fidelity evidence (production-ready prototypes). - Evaluation needs: weighted mult
testing
# /qfai-prototyping-full-harness [DRIFT-PROTOCOL:MANDATORY] Premium prototyping skill with planner/generator/evaluator iteration loop. Full-harness mode is an **explicit, non-default** path activated only via `qfai prototyping --mode full-harness` or discussion artifact recommendation. > This skill defines a real execution workflow — it is NOT a routing-only redirect. ## When to Use - Projects requiring L3–L5 fidelity evidence (production-ready prototypes). - Evaluation needs: weighted mult
testing
Run and document quality gates (repo + qfai validate/report), fix until PASS.
testing
Create and update layered SDD artifacts ( policies + spec-XXXX) in one workflow.