Agent Skill
2/7/2026

qfai-tdd-refactor

Refactor code without behavior change after tests are green.

A
aganesy
1GitHub Stars
1Views
npx skills add aganesy/QFAI

SKILL.md

Nameqfai-tdd-refactor
DescriptionRefactor code without behavior change after tests are green.
<!-- QFAI Skill Body (SSOT) - This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills). - Keep wrappers thin and route users to this skill body. -->

name: qfai-tdd-refactor title: QFAI TDD Refactor (Deprecated Wrapper) description: "Deprecated wrapper. Legacy red/green/refactor chain is no longer a completion gate." argument-hint: "[optional notes]" allowed-tools: [Read] roles: [Reviewer] mode: approval-gated


/qfai-tdd-refactor - Deprecated Wrapper

[DRIFT-PROTOCOL:MANDATORY]

Deprecation Notice (MUST)

  • This command is deprecated.
  • Fixed response: "This command is deprecated. Use /qfai-atdd and /qfai-verify."
  • Completion gate is qfai validate --fail-on error with evidence.
  • scenario.feature and coverage ledgers are legacy optional artifacts and not completion gates.
  • Canonical execution entry is .qfai/specs/spec-*/01_Spec.md; policy escalation, if needed, follows its _policies hook.
  • Canonical policy source: .qfai/assistant/steering/test-layers.md.

Sub-agent Delegation (MANDATORY)

Orchestrator Protocol (MUST)

  • Orchestrator must return only the fixed deprecation notice.
  • Orchestrator MUST NOT generate artifacts or modify repository files.
  • Orchestrator MUST NOT self-approve beyond wrapper completion.

Capability Probe (MUST)

  1. Keep this wrapper in notice-only mode.
  2. Do not delegate artifact generation tasks.
  3. Do not run mutating commands for spec/test/review/report outputs.

Simulation mode (Opt-in only)

  • Simulation mode allowed only with explicit user approval.
  • Even in simulation mode, output remains the same fixed deprecation notice.

Work Orders Summary

StepRole (sub-agent)Task titleInput (refs)Output (refs)Status (PASS/REVISE)
1ReviewerWrapper compliance check.qfai/assistant/skills/qfai-tdd-refactor/SKILL.mdcompletion messagePASS/REVISE

Reviewer Gate (MUST)

  • Reviewer checks Drift Protocol compliance and alignment with .qfai/assistant/steering/test-layers.md.
  • Test volume floors/ratios are not gates; they are signals.
  • Completion requires reviewer result PASS; otherwise REVISE.

CRITICAL CONSTRAINTS (Read First)

  • This wrapper is notice-only and must not perform real TDD refactor execution.
  • Do not require coverage ledgers or scenario.feature as completion conditions.
  • Do not create or update .qfai/specs/**, .qfai/tests/**, .qfai/review/**, or .qfai/report/**.
  • Route users to canonical active flows (/qfai-atdd, /qfai-verify).

Completion Contract (Shared)

Before declaring completion, you MUST:

  • return the fixed deprecation notice;
  • provide canonical next routes;
  • avoid artifact generation and repository mutations.

Evidence (MANDATORY)

  • No artifact evidence is generated by this wrapper.
  • Evidence is the final completion message only.

FINAL CHECKLIST (Check Last)

  • CRITICAL CONSTRAINTS were followed.
  • The fixed deprecation notice was returned.
  • Canonical next routes were provided.
  • No repository artifacts were created or modified.
  • Reviewer returned PASS.

Completion Checklist (MUST)

  • This skill's Definition of Done is satisfied.
  • Required artifacts were produced or updated (if applicable).
  • Diagram artifacts follow Mermaid fence rules (if diagrams were used).
  • Open questions were logged to the proper OQ file (if applicable).
  • The completion message was presented to the user.
  • Next actions were enumerated for all available options.

Completion Message & Next Actions (MUST)

When this skill is complete, provide a final user-facing completion message and enumerate all actionable next steps.

  • Primary (recommended): /qfai-atdd. Action: Maintain runnable acceptance tests that satisfy SSOT coverage obligations.
  • Gate confirmation: /qfai-verify. Action: Run local quality gates and confirm qfai validate --fail-on error passes.
  • Spec updates: /qfai-sdd. Action: Update spec artifacts first when implementation scope changed.
Skills Info
Original Name:qfai-tdd-refactorAuthor:aganesy