Guides quality-first TDD for new behavior, bug fixes, and test changes. Selects the smallest test layer, proves a distinct regression risk, and runs bounded RED-GREEN-REFACTOR verification.
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.github/skills/common/common-tdd/SKILL.mdA passing test is insufficient; the test must prove an owned behavior and a distinct plausible fault.
NOT RUN; never manufacture fake RED by deleting guards or falsifying logs.frozen_snapshot_red. Preserve unrelated existing code; do not delete it merely because it predates the test.Before writing tests for any file, check if a test file already exists in the folder. If it does, add new parameterized test cases to that file. Never generate a separate sidecar file with identical mock setups.
If <stem>.test.js exists, migrate and replace it with <stem>.test.ts instead of coexisting (GUARD-TS-DUAL-EXT). Compare against existing suite; ensure scenario is not already covered upstream or in nearby layers. Preserve justified cross-layer tests when layers catch distinct regression risks.
Create one Test Intent Record per behavior/risk (see references/quality-contract.md for schema):
id, requirements, owner, contract (observable contract — outward side effect), fault (distinct plausible fault, risk-sensitive), layer (smallest honest layer: unit, integration, contract, e2e), cases (minimal equivalence classes; use a parameterized test for equivalent inputs), command (exact focused single-run command), oracle (independent oracle ref, basis, owner, rationale; never copied solely from implementation), boundaries (real vs mocked).local-untrusted trust; they cannot replace human review of oracle independence.expected_red, frozen_snapshot_red, not_run, invalid_red, unexpected_green, or verification_infra_failed. Setup errors (syntax, import, missing modules, broken fixture) are invalid_red, NOT behavioral RED. On unexpected_green, inspect existing coverage and remove redundant or weak case before writing production code.expected_red; rerun same command.git rev-parse HEAD + dirty identity). Build, lint, and typecheck recorded (PASS, FAIL, NOT RUN, NOT APPLICABLE with scope reasons).NOT APPLICABLE.add tests after, too small, passed first run, run the full suite again, mock every collaborator, or implementation is the oracle. Urgency, manual testing, test count, or coverage target never bypasses intent record, expected RED, bounded command, or fault proof.GUARD-UNIV-NAME); no ticket IDs, TODO, or FIXME markers.GUARD-UNIV-IDENTITY-FIXTURE): Never bind active operands (discount, rebate, fee, tax, mov_threshold) to 0, 0.0, "", or empty collections while asserting non-zero business outcomes.&&/|| guards (e.g. market checks + feature flags), assert each clause independently flips the result.GUARD-UNIV-TAUTOLOGY): expect(x).toBe(x), assert.Equal(t, x, x), boolean literals.GUARD-UNIV-SKIP, GUARD-UNIV-FOCUS): Never commit it.skip, it.only, fit, fdescribe, or @Ignore.await promise assertions (GUARD-TS-FLOATING-ASSERT), never assert only in catch without try failure guard (GUARD-TS-CATCH-ONLY), never wrap assertions in unverified conditionals (GUARD-TS-CONDITIONAL-ASSERT), and ban test double self-mocking (GUARD-TS-SELF-MOCK, GUARD-TS-MOCKED-SUT).See references/quality-contract.md for full taxonomy, schemas, and anti-pattern examples.
HoangNguyen0403/agent-skills-standard
11c8bd1
Also appears in
since Nov 2, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.