Agent skill

From diegopacheco/ai-playground · View interactive version

Agent skill is an AI agent skill from the GitHub repository diegopacheco/ai-playground. Verified Spec-Driven Development (VSDD) workflow. Fuses SDD + TDD + VDD into a single AI-orchestrated pipeline. Enforces: Spec Crystallization -> Test-First Implementation -> Adversarial Refinement -> Formal Hardening -> Convergence. Use when user invokes /vsdd.

How to use this skill

Skill file

VSDD — Verified Spec-Driven Development Skill

Global Context

Rules

Phase 1 — Spec Crystallization

Step 1a: Behavioral Specification

Write spec.md containing:

Step 1b: Verification Architecture

Append to spec.md:

Step 1c: Spec Review Gate

Use a fresh Agent subagent (subagent_type: "general-purpose") as the Adversary to review spec.md. The Adversary prompt must include:

Iterate spec.md until the Adversary returns NO FLAWS FOUND or only nitpicks about wording.

Present the final spec to the user for approval before proceeding.

Phase 2 — Test-First Implementation (TDD Core)

Step 2a: Test Suite Generation

Write tests FIRST. No implementation code yet.

Step 2b: Red Gate

Run the full test suite. ALL tests must fail. If any test passes without implementation, flag it — the test is suspect. Fix or remove it.

Step 2c: Minimal Implementation

Implement using strict TDD discipline:

  1. Pick the next failing test.
  2. Write the smallest code that makes it pass.
  3. Run the full suite — nothing else should break.
  4. Repeat until all tests are green.

Architecture must respect the Purity Boundary Map from Phase 1b: pure core functions with no side effects, effectful shell handles I/O.

Step 2d: Refactor

After all tests are green, refactor for clarity and adherence to non-functional requirements. Tests are the safety net — if refactoring breaks something, fix it immediately.

Present the implementation to the user for review before proceeding.

Phase 3 — Adversarial Refinement (VDD Roast)

Spawn a fresh Agent subagent (subagent_type: "general-purpose") as the Adversary. Provide the full spec, test suite, and implementation. The Adversary prompt must include:

Phase 4 — Feedback Integration Loop

Process the Adversary's feedback:

Repeat Phase 3-4 loop until the Adversary's critique contains only nitpicks or NO FLAWS FOUND.

Phase 5 — Formal Hardening

Step 5a: Property-Based Testing Verification

Run the property-based tests with high iteration counts. Report results.

Step 5b: Mutation Testing (if tooling available)

If mutation testing tools are available for the chosen language, run them. Report mutation kill rate. If mutations survive, add tests to cover the gaps.

Step 5c: Static Analysis

Run language-appropriate static analysis / linting. Fix any findings.

Step 5d: Purity Boundary Audit

Verify the purity boundaries from Phase 1b are intact. Flag any side effects that crept into the pure core during development.

Write results to review/verification-report.md.

Phase 6 — Convergence

Write review/convergence-report.md with a summary table:

| Dimension | Status | Evidence |

|-----------|--------|----------|

| Spec | Converged / Not Converged | Adversary found no spec-level flaws |

| Tests | Converged / Not Converged | All tests pass, mutation kill rate, no tautological tests |

| Implementation | Converged / Not Converged | Adversary forced to invent problems |

| Verification | Converged / Not Converged | Property tests pass, static analysis clean, purity intact |

If all four dimensions show "Converged", the software is Zero-Slop.

Present the convergence report to the user.

Traceability

Every artifact must link back through the VSDD Contract Chain:

Spec Requirement → Verification Property → Test Case → Implementation → Adversarial Review

At any point, it must be possible to ask "Why does this line of code exist?" and trace it to a spec requirement.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.