.qfai/assistant/skills/qfai-implement/SKILL.md
Unified implementation skill that orchestrates the full TDD micro-cycle (Red/Green/Refactor) one test at a time using test-list.md as the execution ledger.
npx skillsauth add aganesy/qfai qfai-implementInstall 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]
When no explicit argument is given, detect the candidate spec and constrain execution to one spec only.
test-list.md..qfai/specs/spec-XXXX/tdd/test-list.md.todo -> red -> green -> refactor -> done.exception status can be reached from any active status when an anomaly is detected.green -> red is not allowed).done) are skipped on re-execution.done, report "nothing to do" and exit.Execute the TDD micro-cycle for each pending item in test-list.md, transitioning each through Red -> Green -> Refactor -> Done, producing tested production code aligned with the spec.
/qfai-sdd)./qfai-atdd)./qfai-verify).The execution ledger at .qfai/specs/spec-XXXX/tdd/test-list.md tracks progress with these required columns:
| Column | Description |
| --------- | -------------------------------------------------------- |
| TDD-ID | Unique identifier for the TDD item (e.g., TDD-0001) |
| TC-Refs | References to test cases from 06_Test-Cases.md |
| Layer | Test layer (Unit, Integration, etc.) |
| Test file | Path to the test file |
| Selector | Test selector/description for targeted execution |
| Status | Current lifecycle status |
| DR-ID | Decision Record ID for exception items (blank otherwise) |
| Evidence | RED/GREEN command+result pairs proving the TDD cycle |
Valid status values: todo, red, green, refactor, done, exception.
Allowed transitions:
todo -> red (write a failing test)red -> green (make the test pass with minimal code)green -> refactor (improve code quality while keeping tests green)refactor -> done (item complete)exception (anomaly detected; record DR-ID in DR-ID column)Backward transitions are prohibited. Attempting green -> red must produce:
"Backward transition prohibited: green -> red".
When transitioning to exception:
"exception status requires DR-ID in DR-ID column".test-list.md and select the first item with Status = todo.red.exception and record the anomaly.green.refactor.completion-reviewer) and code quality review (implementation-reviewer).done.test-list.md with final statuses.done, report "All items complete".exception, report them with their DR-IDs.test-list.md, determines the next pending item, and delegates each TDD phase.test-list.md status after each phase completes.This skill delegates through the centralized routing policy in .qfai/assistant/steering/agent-routing.yml.
delivery-planner
test-list.md, selects the next pending item, enforces Red-Green-Refactor ordering, and decides parallel safetyfrontend-engineer / backend-engineer
qa-gatekeeper
implementation-reviewer
completion-reviewer
product-surface-reviewer
All agent-to-agent transitions follow these contracts:
delivery-planner selects the next item and assigns it to the appropriate implementation agent.qa-gatekeeper.qa-gatekeeper confirms or rejects the RED/GREEN observation.completion-reviewer for spec alignment and to implementation-reviewer for code quality review.product-surface-reviewer is added when the item affects UI behavior or rendered output.done.Simulation mode allowed.Subagents: simulated (reason: <why unavailable>)User approval: <quote or reference>Every major artifact in this stage MUST include this table schema:
| Step | Role (sub-agent) | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE) |
| ---- | ---------------- | ---------- | ------------ | ------------- | -------------------- |
| 1 | role | task | refs | refs | PASS/REVISE |
.qfai/assistant/steering/test-layers.md.PASS; otherwise apply REVISE.test-list.md order.delivery-planner is the sole authority for authorizing parallel dispatch.delivery-planner for sequential flowAn item in test-list.md may transition to done only when ALL of the following are satisfied:
TDD-ID has been selected and is in progressqa-gatekeeper confirmed the test failed for the expected reason (watch it fail)qa-gatekeeper confirmed the test passes after implementation (watch it pass)completion-reviewer returned PASS (spec / completion review gate)implementation-reviewer returned PASS (code quality review gate)test-list.md Status and Evidence columns are updated with fresh evidenceThe skill may declare "this spec's implementation is complete" only when:
06_Test-Cases.md with applicable layer are present in test-list.mddone or valid exception (with DR-ID)Completion MUST NOT be declared when any of the following are true:
completion-reviewer or implementation-reviewer) has not been run or returned FAILtodo, red, green, or refactor status still exist (for spec-level completion)Create/update: .qfai/evidence/implement-spec-XXXX.md
Required sections:
Each TDD item MUST have fresh evidence containing at minimum:
TDD-ID — the item identifierTC-ref — reference to the test case(s)RED command — the exact command executed to observe failureRED result — the failure output (result completeness is best-effort; truncated output is acceptable)GREEN command — the exact command executed to observe successGREEN result — the success outputRefactor verify command — the exact command re-executed after refactorRefactor verify result — the output confirming GREEN is maintainedSpec review — completion-reviewer result (PASS or FAIL)Code quality review — implementation-reviewer result (PASS or FAIL)test-list.md statuses are accurate.When this skill is complete, provide a final user-facing completion message and enumerate all actionable next steps.
/qfai-verify.
Action: run qfai validate --fail-on error and confirm all gates pass./qfai-sdd.
Action: update spec artifacts if implementation revealed scope changes./qfai-atdd.
Action: ensure acceptance test coverage aligns with implementation.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.