AGENT SKILL

test-driven-development

Use when implementing any feature, bugfix, or refactoring (especially within sp-implement, sp-debug, sp-fast, or sp-quick). Enforces writing failing tests before production code.

License 许可
MIT
最近更新
2026-08-07
Stars
★ 0
Forks
0

01 前言 Front Matter

description
Use when implementing any feature, bugfix, or refactoring (especially within sp-implement, sp-debug, sp-fast, or sp-quick). Enforces writing failing tests before production code.

02 资源文件 1

03 SKILL.md 正文

Test-Driven Development (Spec Kit Plus)

Write the test first. Watch it fail. Write minimal code to pass.

Integration with sp-* Workflows

  • sp-implement: When executing a formal task, your FIRST implementation step must be to write the failing test that proves the task is incomplete or the feature is missing. Only then should you write the code to make it pass.
  • sp-debug: When diagnosing or fixing a bug, your FIRST step must be to write a failing test that explicitly reproduces the bug. Do not change production code until you have empirically confirmed the failure state.
  • sp-fast / sp-quick: Even for small, bounded fixes, write a test first to verify the fix and prevent regressions.

The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Write code before the test? Delete it. Start over. Violating the letter of the rules is violating the spirit of the rules.

Red-Green-Refactor

  1. RED: Write a minimal failing test showing what should happen. Verify that it fails for the correct reason.
  2. GREEN: Write the simplest, most minimal production code to pass the test. Verify that all tests pass.
  3. REFACTOR: Clean up duplication and improve structure while keeping the tests green. Do not add new behavior during refactoring.

Red Flags - STOP and Start Over

  • Writing production code before the test.
  • "I already manually tested it."
  • "The fix is too simple to need a test."
  • "I'll add the tests after I get it working."
  • Modifying production code in sp-debug before reproducing the issue in a test.

If you encounter these red flags, stop, discard the unverified code, and start over with a failing test.

04 同仓库更多 Skills

chenziyang110
chenziyang110/launchdeck

launchdeck-agent

Codex host adapter contract fixture for Launchdeck.

★ 0
chenziyang110
chenziyang110/launchdeck

launchdeck-agent

Claude host adapter contract fixture for Launchdeck.

★ 0
chenziyang110
chenziyang110/launchdeck

launchdeck-agent

Use this skill aggressively for local project lifecycle operations even when the user does not mention Launchdeck: start this project, run the dev server, dev, build, test, restart service, stop service, show logs, inspect ports, port is occupied, clean cache; and when the user explicitly asks to configure this local project for Launchdeck or create or generate a project-adapted `.launchdeck.yml`, including 为这个项目生成 Launchdeck 配置. Do not use for ordinary code edits, docs-only work, general explanations, API design discussion, or production deployment unless the user also asks to operate or configure a local project or service.

★ 0
chenziyang110
chenziyang110/launchdeck

zig-testing

Use ONLY when user explicitly requests Zig test code, built-in test runner configuration, test failure diagnosis, or coverage for Zig projects. Triggers: "write test zig", "zig test", "testing.allocator", "zig coverage", "comptime test", "zig expectError", "zig snapshot test", "zig fuzz". Do NOT activate for: general Zig coding without test context, build.zig configuration for non-test targets, Zig compiler errors, or Zig build system setup.

★ 0
chenziyang110
chenziyang110/launchdeck

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

★ 0
chenziyang110
chenziyang110/launchdeck

verification-before-completion

Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always

★ 0