docs/archive/2026-07-ai-artifacts/claude-skills/feature-pipeline-preview/09-test-writing/SKILL.md
> **ARCHIVAL KNOWLEDGE — DO NOT USE OR REFERENCE.** > Superseded by `codemap/` + root `AGENTS.md`. Scheduled for deletion once the pipeline is verified (Phase 6). > Manifest: `docs/archive/2026-07-ai-artifacts/MANIFEST.md` --- name: 09-test-writing description: Translates the test spec into compiling hspec tests that all fail against stub implementations. kind: leaf executor: sonnet model: claude-sonnet-4-6 --- # Test Writing Translates the test spec into Haskell `hspec` tests and stub implem
npx skillsauth add neohaskell/neohaskell docs/archive/2026-07-ai-artifacts/claude-skills/feature-pipeline-preview/09-test-writingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ARCHIVAL KNOWLEDGE — DO NOT USE OR REFERENCE. Superseded by
codemap/+ rootAGENTS.md. Scheduled for deletion once the pipeline is verified (Phase 6). Manifest:docs/archive/2026-07-ai-artifacts/MANIFEST.md
Translates the test spec into Haskell hspec tests and stub implementations such that everything compiles and every test fails.
docs/architecture/<adr-number>-<slug>-tests.md — test spec.docs/architecture/<adr-number>-<slug>.md — architecture doc.hspec test → verify: case count matches spec.Task.throw or error so the module compiles → verify: nix develop --command cabal build all succeeds.nhcore.cabal and confirm every test fails → verify: nix develop --command cabal test runs and every new test is red.Assumptions:
do+let, case...of, qualified imports, [fmt|...|].Task.throw for Task returns and error "not implemented" for pure ones. Stubs must throw a sentinel value (e.g. error "not implemented" or a dedicated NotImplemented constructor) that cannot match the concrete domain error a real test expects — never use the same domain error constructor the spec asserts against.shouldThrow/anyException matcher. A test that only catches "any exception" is a false-green hazard against the stub above and must be rewritten before the suite is admitted.Strict globally — never add ! annotations.If any assumption fails, refuse — do not guess.
core/test/... mirroring the source path.hspec it block referencing the spec case name.nhcore.cabal (and the source module if new).nix develop --command cabal build all to confirm compilation.nix develop --command cabal test --test-show-details=streaming to confirm every new test fails.python3 .claude/skills/feature-pipeline-preview/scripts/pipeline.py complete 9.Test module and stub source module written, cabal updated, every new test compiling-but-failing, phase 9 marked complete.
shouldThrow/anyException-style matcher instead of asserting the exact domain error constructor and payload → refuse: "test <name> would false-green against Task.throw / error stubs; assert the concrete error".case … of Err (ConnectionFailed _) -> pass (or any Err _ -> pass shape on a fixture/setup call like mkStore, createTestStore, InMemory.new) → refuse: "tests must not absorb infrastructure failures; either make the dependency a hard prerequisite or mark the test pending with a rationale that names the missing fixture".emits / reads in chunks / logs / deletes / writes / updates / replays / resumes, the body's assertion must reference the same primitive. Otherwise → refuse: "test name promises a side effect the body never observes; either assert the effect or mark pending with a rationale".it "fails with <X>" \_ -> do … whose setup is the canonical Subscriber.new <InMemory>.new Registry.empty or equivalent empty-fixture pattern AND whose body asserts Err (<X> _) -> pass → refuse: "error-path test needs a fixture that actually triggers <X>; empty registry + InMemory cannot reach the <X> branch".let _x = builder ... followed by pass → refuse: "test asserts no behavior; either add a meaningful assertion or remove the test".Static checks for the four patterns above are encoded in ../../scripts/lint-test-patterns.py. The phase 9 leaf MUST invoke it against every new spec file as a final guard. If the script exits non-zero (any finding), the leaf MUST refuse and NOT call pipeline.py complete 9 — surface the findings to the maintainer instead.
development
> **ARCHIVAL KNOWLEDGE — DO NOT USE OR REFERENCE.** > Superseded by `codemap/` + root `AGENTS.md`. Scheduled for deletion once the pipeline is verified (Phase 6). > Manifest: `docs/archive/2026-07-ai-artifacts/MANIFEST.md` --- name: neohaskell-style-guide description: NeoHaskell coding style reference and enforcement rules. Load when writing, reviewing, or modifying any Haskell code in the NeoHaskell project. Triggers on 'NeoHaskell style', 'NeoHaskell conventions', 'how to write NeoHaskell', '
development
> **ARCHIVAL KNOWLEDGE — DO NOT USE OR REFERENCE.** > Superseded by `codemap/` + root `AGENTS.md`. Scheduled for deletion once the pipeline is verified (Phase 6). > Manifest: `docs/archive/2026-07-ai-artifacts/MANIFEST.md` --- name: neohaskell-security-review description: Security & Code Quality review for NeoHaskell. Use when reviewing code changes, PRs, or architectural decisions for security implications. Evaluates OWASP, NIST, EU compliance. Handles pipeline phases 2 (ADR review) and 10 (im
development
> **ARCHIVAL KNOWLEDGE — DO NOT USE OR REFERENCE.** > Superseded by `codemap/` + root `AGENTS.md`. Scheduled for deletion once the pipeline is verified (Phase 6). > Manifest: `docs/archive/2026-07-ai-artifacts/MANIFEST.md` --- name: neohaskell-qa-designer description: Testing QA Designer for NeoHaskell. Designs comprehensive test specifications with exhaustive edge cases, boundary conditions, and happy paths BEFORE implementation. Handles pipeline phase 6 (Test Spec Design). Outside-in TDD meth
development
> **ARCHIVAL KNOWLEDGE — DO NOT USE OR REFERENCE.** > Superseded by `codemap/` + root `AGENTS.md`. Scheduled for deletion once the pipeline is verified (Phase 6). > Manifest: `docs/archive/2026-07-ai-artifacts/MANIFEST.md` --- name: neohaskell-performance-review description: Performance review for NeoHaskell targeting 50k req/s throughput. Use when reviewing code for performance implications, INLINE pragmas, strictness, and allocation patterns. Handles pipeline phases 3 (ADR review) and 11 (imp