Index of every page on this site: llms.txt
All skills
bity-labs avatar

/implement-with-tdd

@b53bf0f
by bity labsbity-labs/tstack9 stars
Run it yourself

Implement clear behavior using test-driven development. Use when the user wants to build something test-first, add behavior through red-green-refactor, or implement a well-specified change with tests.

  • 1 file
  • 2.3 KB
  • Updated 5 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/bity-labs/tstack/implement-with-tdd

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈55 tokens for metadata: the name and description. ≈533 when used: this file.

Description uses 2.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈221 characters, or 2.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Implement With TDD

Implement clear behavior one verified slice at a time.

Read These First

  1. docs/engineering/tdd.md — the loop and rules
  2. docs/engineering/testing.md — test philosophy
  3. docs/engineering/mocking.md — when and how to mock
  4. docs/engineering/interface-design.md — designing testable seams
  5. docs/coding-standards.md — repo-specific conventions
  6. docs/context.md — glossary and domain language
  7. Relevant docs/adr/ files for the area being touched

Workflow

1. Plan

Before writing code:

  • Understand the target behavior from the user's request.
  • Propose the interface changes needed (entrypoint, parameters, return type).
  • List the behaviors to test, in the order you will tackle them.
  • Flag any deep-module, boundary, or mocking concerns.

If the user is present (HITL), present the plan and wait for explicit approval before proceeding. If running unattended (AFK), proceed with the plan directly.

2. Tracer Bullet

One RED → GREEN cycle to prove the path:

  1. Write one test for the simplest behavior.
  2. Confirm it fails for the expected reason.
  3. Write the minimal code to pass.
  4. Confirm green.

3. Incremental Loop

For each remaining behavior, repeat:

  1. Red: write one failing test.
  2. Green: write the minimal code to pass.
  3. Confirm green before moving on.

Rules:

  • One test at a time.
  • Only enough code for the current test.
  • Do not anticipate future tests.
  • Stay on public interfaces. Do not test implementation details.
  • Follow docs/coding-standards.md for test naming, structure, and tooling.

4. Refactor

When the current set of tests passes:

  1. Propose one refactor at a time (naming, duplication, boundaries).
  2. Confirm green after each change.
  3. Stop when the code is clear enough for the current purpose.

Never refactor while RED.

Checklist Per Cycle

  • Test describes behavior, not implementation
  • Test uses public interface only
  • Test would survive an internal refactor
  • Implementation is minimal for this test
  • No speculative features added
  • Refactor only from GREEN

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at b53bf0f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Activeupdated 5 months ago

README badge

README badge for bity-labs/tstack/implement-with-tdd