Skip to content
Skills Library
Programming · Testing

tdd-workflow

/tdd-workflow

Test-first workflow for TS Inspector. Write a fixture and a failing node:test, watch it fail, make the smallest change to pass, then refactor. Use when adding a check, a parser, a panel, a command option, or when fixing a bug.

Licence
MIT
Last repository change
07.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 07.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Test-first workflow for TS Inspector. Write a fixture and a failing node:test, watch it fail, make the smallest change to pass, then refactor. Use when adding a check, a parser, a panel, a command option, or when fixing a bug.

Original author description

Test-first workflow for TS Inspector. Write a fixture and a failing node:test, watch it fail, make the smallest change to pass, then refactor. Use when adding a check, a parser, a panel, a command option, or when fixing a bug.

How it works

  1. Cycle
  2. Rules
Original SKILL.md headings · 28 lines, 249 words
SKILL.md preview
---
name: tdd-workflow
description: Test-first workflow for TS Inspector. Write a fixture and a failing node:test, watch it fail, make the smallest change to pass, then refactor. Use when adding a check, a parser, a panel, a command option, or when fixing a bug.
license: MIT
metadata:
  origin: adapted from ECC skills/tdd-workflow
---

# TDD workflow

## Cycle

1. **Name the behaviour.** One sentence: "A PMT with a CRC error raises a priority 1 CRC error on its PID."
2. **Make the input.** Add a generator to `scripts/make_fixtures.py` that writes the smallest `.ts` that shows the behaviour. Run `python3 scripts/make_fixtures.py`. Never commit a private capture.
3. **Write the test.** Add it to the suite that owns the area: `test/core.test.js`, `test/analyse.test.js`, `test/timeline.test.js`, `test/cli.test.js`, and so on. For a new fixture, add `test/golden/<name>.json` with the expected counts.
4. **Run it and see it fail** for the right reason:

   ```sh
   node --test --test-name-pattern "CRC error" test
   ```

   A test that passes before the change proves nothing. Fix the test.
5. **Make it pass** with the smallest change in `src/`.
6. **Refactor**, then run the whole suite: `node --test test`.
7. **Record the evidence** in your report: the failing line from step 4 and the pass count from step 6.

## Rules

- A bug fix starts with a test that reproduces the bug.
- Test behaviour through the public function (`inspect`, `analyse`, the command), not private helpers.
- Golden files change only when the expected behaviour changes. Say why in the commit body.
- Tests that need `vendor/` use `{ skip: !HAVE }`. CI has no `vendor/`.
- Keep each test under about a second. `test/perf.test.js` is the only throughput test.
- Malformed input gets its own test: truncated packet, bad section length, wrong sync byte. The result is an error row, not an exception.

Versions

RepositoryScoreLicence
This page · hamza-u/ts-inspector100MIT
drvoss/everything-copilot-cli100MIT
momochenisme/speclink100MIT
travisjneuman/.claude100MIT
Reprograme/redevkit100MIT
kookr-ai/kookr100Apache-2.0
madappgang/magus100MIT
aAAaqwq/AGI-Super-Team100MIT
affaan-m/ECC100MIT

Database snapshot: 13.11.2026 · package version 172c65a3c9de (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100red-green-refactor
    Guides the red-green-refactor TDD workflow: write a failing test first, implement the minimum code to make it pass, then refactor while keeping tests green. Use when a user asks to practice TDD, write tests first, follow red-green-refactor, do test-driven development, write…
  • 100st-tdd
    Fix a bug by first writing a focused test that fails for the right reason, then making the smallest change that makes it pass. Use when the user asks for TDD or a regression test, when a bug has a cheap local test target, or for /st-tdd.
  • 100acp-test-first
    Use when the user asks to fix a bug, add behavior, or change behavior in a project that has a test framework, AND the change can be expressed as an observable input/output contract. Writes a failing test first, then makes the smallest change to pass it.
  • 100test-driven-development
    Use when implementing any feature, bugfix, refactor, or behavior change, before writing the implementation code — write the failing test first, watch it fail, write minimal code to pass, then refactor. Also use when writing or changing tests, adding mocks, or when code feels…
  • 100ds-tdd
    Fix a bug by first writing a focused test that fails for the right reason, then making the smallest change that makes it pass. Use when the user asks for TDD or a regression test, when a bug has a cheap local test target, or for /ds-tdd.
  • 100ds-tdd
    Fix a bug by first writing a focused test that fails for the right reason, then making the smallest change that makes it pass. Use when the user asks for TDD or a regression test, when a bug has a cheap local test target, or for /ds-tdd.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.