AGENT SKILL

tdd

Change behavior test-first with Tau's run_tests tool, then verify the affected tests and a mutation check. Use it when changing behavior. Covers the cycle and survivor handling, not test design.

License 许可
MIT
所属仓库
sQVe/tau
最近更新
2026-11-13
Stars
★ 3
Forks
0

01 前言 Front Matter

name
tdd
description
Change behavior test-first with Tau's run_tests tool, then verify the affected tests and a mutation check. Use it when changing behavior. Covers the cycle and survivor handling, not test design.

03 SKILL.md 正文

TDD

Use this skill when you change behavior and run_tests is available.

Hard rules

  • Run tests with run_tests, not bash, so Tau observes RED and GREEN. They are observations, not permission to edit.
  • Give each test a unique full name within its file. Duplicate, skipped, missing, and load-error tests cannot establish RED.
  • Read why a test failed. A failure does not prove the assertion is useful. Do not weaken an assertion to make the code pass.
  • Hints never block work. Git hooks and CI still run, separately from TDD observations.

Procedure

  1. For a behavior change, write a failing test next to the code, importing the production module normally. If the module does not exist, create it empty, so an unresolved import is not taken for RED.

  2. Call run_tests with scope: "focused". Do not restructure tests or widen the selection to make the tool run.

  3. Read the runner report. Implement the change. Rerun focused with the same files and names until it passes. You may change the label, but keep the selection.

  4. Refactor and format. Call run_tests with scope: "affected" on the changed source and test files once on the current inputs. Do not run the repository's full check; the PR step runs it.

  5. After the affected tests pass, run mutation_check with mode: "changed" once, with the base your task names, or no base. Skip this step, and say so, when the repository has no mutation.argv. Also skip it, and say so, when your task says the slice manager runs the check. Report a tool error on its own line and stop the step. Survivors are advice. Fix at most 3 behaviors in one round: write a test that kills the survivor, or simplify redundant code it points at. After that round, rerun the affected tests and mutation_check at most once. Then list what is left as open, with file and line. Give no reason per mutant.

    Place a killing test in the owner's existing behavior test file, or add a row to its decision table. When the owner has no test file yet, use its normal test file next to it, as step 1 says. Never name a test file after a campaign or a test technique, such as mutationKills.test.ts or a slice name. Write no test for a survivor in wording, layout text, or transport encoding that no caller can observe. List it with the other open survivors, with no reason. It does not count toward the limit of 3 behaviors.

  6. Report the test outcome and its freshness as separate facts. When the freshness is stale or unknown, rerun on the current inputs before you claim current verification.

Tau keeps one active behavior per session and directory. A full pass starts the next cycle. Tau detects external edits only when a test run or a write, edit, or bash call returns. These checks are not atomic snapshots.

04 同仓库更多 Skills

sQVe
sQVe/tau

benchmark-checklist

Check evidence before measuring performance or reporting a speedup, regression, or comparison.

★ 3
sQVe
sQVe/tau

worktree

Create or open a Git worktree for a ticket or task with Grove and open it as a herdr-app space. Use it when asked to create, add, start, or open a worktree, optionally followed by a handover.

★ 3
sQVe
sQVe/tau

update-branch

Rebase the current branch onto its base, resolve conflicts, and update the PR when asked. Use it for "rebase onto main", "fix conflicts", "the PR has conflicts", or when a rebase or merge stops on a conflict.

★ 3
sQVe
sQVe/tau

triage-findings

Verify review findings or comments the user asked you to act on, fix the supported ones in scope, and report each one as Fixed, Not worth changing, Incorrect, or Blocked. Use it for "triage these findings", "fix these review comments", or "act on the findings I approved". `code-review`, `pr`, and `start-slice` also start it after a review of the user's own work.

★ 3
sQVe
sQVe/tau

tracker

Write Linear tickets by Tau's rules. Pick the type and template, route it, search for duplicates, and use checked tools for ticket writes and the two allowed status changes. Use it for "file a bug", "create a ticket", or "add a follow-up ticket". It does not split designs or start slices.

★ 3
sQVe
sQVe/tau

start-slice

Start one slice of a planned design. Creates its branch and its agent tickets in Linear, then delegates the work. Picks the next slice from order, dependencies, and merge state, and reports the branch, base, and agent tickets it created. Use it for "start the next slice", "start ENG-123", or "begin this ticket as a slice". It does not split a design into slices.

Skill与智能体开发
★ 3