trove-tdd
Write a focused regression test that fails before the fix and passes after. Use when the user asks for TDD, a failing test, or a regression test, or when a bug has a cheap local test target. Skip when the test path is expensive, integration-heavy, or unclear.
- License 许可
- MIT
- 所属仓库
- bravew/trove
- 最近更新
- 2026-11-12
- Stars
- ★ 10
- Forks
- 1
01 前言 Front Matter
- name
- trove-tdd
- metadata
- { "trove-category": "code", "trove-category-label": "Code" }
- description
- Write a focused regression test that fails before the fix and passes after. Use when the user asks for TDD, a failing test, or a regression test, or when a bug has a cheap local test target. Skip when the test path is expensive, integration-heavy, or unclear.
- when_to_use
- write a failing test; regression test; tdd this
- user-invocable
- true
02 资源文件 1
- 其他SKILL.md.tmpl1.7 KB
03 SKILL.md 正文
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run build:skills -->
Session Init
This skill ships Trove conventions. Prefer existing project patterns over generic best practices when they conflict.
trove-tdd
Write the test that fails for the right reason before you change the code. The test encodes intended behavior, not the current implementation.
Workflow
- Understand the intended behavior — what should be true that currently isn't.
- Choose the narrowest check that exercises it (unit over integration over E2E).
- Write a test that fails before the fix, for the reason you expect.
- Run it and confirm it fails on that reason — not a typo or a missing import.
- Make the smallest fix.
- Re-run; confirm it passes.
- Run nearby tests to catch fallout.
When to skip (escape hatch)
Prefer no new test over a bad test. Skip — and say why — when:
- The only path is a slow E2E flow or a broad harness with heavy setup.
- Reproducing it needs brittle mocks that would assert implementation detail, not behavior.
- The test target is genuinely unclear.
A bad test is one that passes when the bug is present, asserts on incidental implementation, or is so slow/flaky it gets disabled. Don't write it to look thorough.
Output
Report the evidence, not just the outcome: name the run that failed before the fix and the run that passed after (e.g. pnpm test reducer.test.ts red → green). If you skipped the test, state the reason in one line.
04 同仓库更多 Skills
using-trove
Skill discipline anchor for the Trove marketplace. Loaded once per session; routes the agent to the right trove-* skill before code, planning, review, or git actions.
trove-write-skill
Skill authoring workflow. Use when creating or updating a Codex or Trove skill, including rubrics, tasks, metadata, and validation.
trove-worktree
Git worktree workflow for spikes, risky experiments, and broad refactors that should not disturb the user's current branch.
trove-why
Reconstruct design rationale and decision history from evidence — source control, issue tracker (Linear), docs (Notion), chat (Slack), error tracking (Sentry) — with calibrated confidence. Use for "why does X work this way", "why did we pick Y", regressions, and postmortems. Use trove-explain for how it works now.
trove-verify
Completion verification workflow. Use before claiming done, fixed, complete, ready, or shipped.
trove-unslop
Cut AI tells from writing — PR descriptions, release notes, specs, commit bodies, and replies. Use before finalizing prose, or when the user asks to clean up, de-slop, or make text sound human.