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.
- Author
- hamza-u ↗
- Repository
- ts-inspector ↗
- Licence
- MIT
- Last repository change
- 07.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 07.11.2026, without references to retired models or APIs.
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
- Cycle
- Rules
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
| Repository | Score | Licence |
|---|---|---|
| This page · hamza-u/ts-inspector | 100 | MIT |
| drvoss/everything-copilot-cli | 100 | MIT |
| momochenisme/speclink | 100 | MIT |
| travisjneuman/.claude | 100 | MIT |
| Reprograme/redevkit | 100 | MIT |
| kookr-ai/kookr | 100 | Apache-2.0 |
| madappgang/magus | 100 | MIT |
| aAAaqwq/AGI-Super-Team | 100 | MIT |
| affaan-m/ECC | 100 | MIT |
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.