Skip to content
cccskills
FreePublished on GitHub

tdd

Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348 stars(GitHub 348 + cccskills 0)

Run score Not tested

See how to install

Files included (4)

  • SKILL.md3.6 KB
  • agents/openai.yaml43 B
  • scripts/test-match9.1 KB
  • tests/test_test_match.py8.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

TDD Bug Fix

When fixing a bug with a clear, cheap test path, make the broken behavior executable before changing production code. The goal is a focused regression test that fails before the fix and passes after it.

Do not force a test when it would be impractical. If the available test would require broad harness setup, brittle mocks, slow end-to-end infrastructure, production-only state, vague reproduction steps, or large unrelated fixture churn, skip adding a new test and use the closest useful verification instead.

Run scripts/test-match <pattern> [suite] from this skill folder for a selected Hspec example. The default suite is nhcore-test-core. It rejects empty selections and retains a bounded transcript. Follow Regression evidence when capturing the failing and passing observations. For broader suites, doctests or testbed checks, use NeoHaskell tests.

Workflow

  1. Understand the bug. Identify the intended behavior, current behavior, affected path, and smallest observable reproduction.
  2. Choose the narrowest executable check. Prefer the closest unit, component, integration, or regression test already used for that codepath. If no practical test path is obvious, do not create one from scratch just to satisfy the workflow.
  3. Write the failing test first. Add the smallest focused test that would have caught the bug. The test should encode intended behavior, not mirror the current implementation.
  4. Run the new test before fixing. Confirm it fails for the intended reason. If it passes or fails for an unrelated reason, correct the test or reproduction before editing the implementation.
  5. Fix the bug. Make the smallest production change that satisfies the intended behavior while preserving nearby contracts.
  6. Rerun the regression test. Confirm the test now passes.

If a Failing Test Is Impractical

Use the closest executable regression check instead: a targeted script, manual reproduction command, browser automation, snapshot comparison, log assertion, or focused integration check.

Prefer no new test over a bad test. A bad test is one that mostly tests mocks, encodes current implementation details, depends on timing or unrelated global state, needs expensive infrastructure for a small fix, or would be deleted immediately after proving the fix.

Guardrails

  • Avoid tautological tests. Derive expected results independently from the contract, not by calling the implementation again or copying its logic. Assertions on test-built fixtures alone do not test the implementation. The check must fail for a plausible violation of the intended behavior.
  • Do not change tests merely to match a wrong implementation.
  • Do not weaken existing assertions unless the expected behavior has genuinely changed and the reason is clear.
  • Keep the regression test focused on the bug. Avoid broad fixture churn or unrelated coverage expansion.
  • If the bug is flaky, make the test deterministic where possible and document the signal being locked down.
  • If the bug exposes a broader class of failures, first land the focused regression path, then consider additional sibling coverage.

Final Response

Report the evidence, not just the outcome:

  • Name the failing-before test or executable check and the failure it produced.
  • Name the passing-after test run and any nearby validation performed.
  • If failing-before evidence could not be demonstrated, state why and describe the closest regression check used instead.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

arena

Free

Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

Inspect or supervise a PR or stack through review and CI to merge-ready, using current GitHub evidence and the requested mode.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

Vet a perf measurement (limiter, tuning, limits, errors, repeatability, relevance, and whether the work happened) before you report or act on it. Use when you benchmark or report a measured speedup or regression, including complete framework flows and compilation of projects that consume the framework.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

bro

Free

Restate the last message in plain human language, with no jargon.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

Build or adapt a local harness to drive, inspect, and profile an interactive CLI or TUI without external services. Use for CLI UX checks, startup regressions, memory leaks, hangs, prompt flows, or terminal demos.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

See all skills by neohaskell

Report a problem with this skill