agentleFS
Yesterday-AIYesterday-AI/ytstack/skills/test-driven-development/SKILL.md

test-driven-development

Skill2 starsChanged 29 days agoMITView on GitHub

Test-first implementation of the current task through the vendored superpowers test-driven-development procedure, with the task plan's files and verification command injected. Use during task execution for any feature, bugfix or refactor, before writing implementation code. Not without a task plan (plan-task or quick-task first).

190 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-code-review, chinese-commit-conventions and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • Leodorareluctant259Skill

    chinese-commit-conventions

    中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化

    Also in 8 projects that use this

  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 19 projects that use this

  • LLl0k0laDSkill

    using-agent-skills

    Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.

    Also in 39 projects that use this

  • LLl0k0laDSkill

    git-workflow-and-versioning

    Use when making any code change. Use when committing, branching, resolving conflicts, or when you need to organize work across multiple parallel streams.

    Also in 47 projects that use this

  • MrCipherSmithSkill

    constraint-driven-development

    Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.

    Also in 15 projects that use this

  • +3 more from Leodorareluctant259
  • +3 more from LLl0k0laD

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 178 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After the vendored procedure completes (test passes + refactor done):

    line 55
  2. Very specific:

    Do NOT run ytstack:summarize-task automatically.

    line 56
  3. Very specific:

    If a behavior decision was made during TDD that was not in the plan, append a note to the task-plan's body or log to KNOWLEDGE.md if it …

    line 57

“Common” is measured: kept by at least 6 in 10 of the 178 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ytstack:test-driven-development

Thin wrapper around the vendored superpowers test-driven-development skill (vendor/superpowers/skills/test-driven-development/SKILL.md). Injects the current task's plan (Files + Verification sections) as context, then inlines the vendored procedure verbatim. Vendor is single source of truth.

ytstack context (resolved at render time)

# ytstack resolver (M016): checkout = where this shell runs, via the shared lib.
_LIB="${CLAUDE_SKILL_DIR}/../../hooks/lib/git-ctx.sh"
if [ -f "$_LIB" ]; then
  . "$_LIB"; yt_git_ctx "$PWD"; yt_resolve_yt_dir >/dev/null
  _PROJECT_DIR="$YT_TOPLEVEL"; _YT_DIR="$YT_DIR"; _YT_SCOPE="$YT_SCOPE"; _IS_GIT="$YT_IS_GIT"; _PROJECT_KEY="$YT_REPO_KEY"
else
  # Host did not substitute CLAUDE_SKILL_DIR (e.g. Codex adapter): project scope only.
  _IS_GIT=$([ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true ] && echo yes || echo no)
  _PROJECT_DIR=$(git rev-parse --show-toplevel 2>/dev/null || pwd -P)
  _YT_DIR=""; _YT_SCOPE=none; _PROJECT_KEY=""
  [ -d "$_PROJECT_DIR/.ytstack" ] && { _YT_DIR="$_PROJECT_DIR/.ytstack"; _YT_SCOPE=project; }
fi
cd "$_PROJECT_DIR" 2>/dev/null || true
_PROJECT_SLUG=$(basename "$_PROJECT_DIR")
_M=none; _S=none; _T=none
if [ -n "$_YT_DIR" ] && [ -f "$_YT_DIR/STATE.md" ]; then
  _M=$(sed -n 's/^current_milestone: *//p' "$_YT_DIR/STATE.md" | head -1)
  _S=$(sed -n 's/^active_slice: *//p' "$_YT_DIR/STATE.md" | head -1)
  _T=$(sed -n 's/^active_task: *//p' "$_YT_DIR/STATE.md" | head -1)
fi
_TASK_PLAN="$_YT_DIR/$_M-$_S-$_T-PLAN.md"
echo "HAS_YTSTACK: $([ -n "$_YT_DIR" ] && echo yes || echo no)"
echo "ACTIVE_TASK: $_M-$_S-$_T"
echo "TASK_PLAN: $_TASK_PLAN"
echo "TASK_PLAN_EXISTS: $([ -f "$_TASK_PLAN" ] && echo yes || echo no)"

ytstack invocation notes

You are invoked inside a ytstack project. The work unit is the current task (_M-_S-_T above) whose plan file at TASK_PLAN contains the ## Files section (what to touch) and ## Verification section (how to know it passes). The vendored TDD procedure uses these: the RED test targets the behavior described in the task-plan body; the verification command is the one specified in the plan's Verification section.

HARD-GATE: if HAS_YTSTACK=no or TASK_PLAN_EXISTS=no, abort with: "Run ytstack:plan-task first to produce the task-plan." Do not invoke the vendored procedure; TDD without a target task-plan is guessing.

After the vendored procedure completes (test passes + refactor done):

  • Do NOT run ytstack:summarize-task automatically; the user triggers that when ready.
  • If a behavior decision was made during TDD that was not in the plan, append a note to the task-plan's body or log to KNOWLEDGE.md if it generalizes.

Vendored procedure (inlined verbatim)

cat "${CLAUDE_SKILL_DIR}/../../vendor/superpowers/skills/test-driven-development/SKILL.md"

Namespace note (ytstack)

The text above is upstream superpowers content (v7.0.2) rendered inside ytstack. Read superpowers:<skill> as ytstack:<skill> (for example superpowers:verification-before-completion is ytstack:verification-before-completion) and invoke the ytstack-namespaced skill via the Skill tool. Relative links such as writing-good-tests.md resolve under vendor/superpowers/skills/test-driven-development/ in the ytstack plugin directory (${CLAUDE_SKILL_DIR}/../../vendor/superpowers/skills/test-driven-development/); read them from there when you need them. In the GREEN step, apply ytstack:minimal-code (the minimal-code ladder injected at session start when PREFERENCES minimal_code is on): the smallest change that passes, never cutting validation, auth, boundary error handling or accessibility.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.