golden-fixture-discipline

Authors deterministic golden and regression test fixtures for mechanical pipeline extensions.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/NarenKarthikBM/specseyal --skill golden-fixture-discipline-narenkarthikbm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golden-fixture-discipline
Source: https://github.com/NarenKarthikBM/specseyal/tree/main/.claude/skills/golden-fixture-discipline
Command: npx skills add https://github.com/NarenKarthikBM/specseyal --skill golden-fixture-discipline-narenkarthikbm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Golden and regression fixtures often pass today but flake tomorrow because they assert approximate output, cover only the happy path, or depend on ambient repo state. This Skill enforces a discipline for authoring committed, byte-stable fixtures that actually prove the guards and branches they claim to cover. ## Core Features & Use Cases - Byte-Stable Assertions: Pins canonical JSON key order and explicitly sorted iteration order so expected output is byte-identical across runs and machines. - Both-Branch Guard Coverage: Requires a negative/inverse fixture for every guard (stale vs. fresh, ceiling-hit vs. no-ceiling-hit, success vs. fallback), including fixtures that manufacture the actual failure condition before asserting recovery. - Composition and Coherence Fixtures: Adds cross-stage fixtures where one capability's output feeds another's input, and joint assertions when multiple products must share one identifier such as a provenance header or generation-id. - Use Case: When extending a deterministic pipeline stage (e.g., a graphify-backed context generator), author one named fixture per live consumer, per branch, and per composition point so regressions surface immediately in CI. ## Quick Start Ask the agent to author a golden fixture for the new pipeline stage, covering both the passing and failing branches of its staleness guard with byte-identical expected output.

Frequently Asked Questions about golden-fixture-discipline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write golden test fixtures that don't flake?

Assert byte-identical output rather than semantic approximation by pinning canonical JSON key order and an explicitly sorted node or record iteration order. Remove any dependence on filesystem enumeration order, wall-clock time, or ambient repo state so re-running anywhere yields the same bytes.

How to test both branches of a guard or staleness check?

Author the negative or failing branch as its own committed fixture, never only the passing one. Pair every positive fixture with its inverse — stale vs. fresh, ceiling-hit vs. no-ceiling-hit — so the path where the guard must fire is actually proven.

How do I test that a guard detects and recovers from failures?

Manufacture the actual failure condition inside the fixture's own input, such as a stale survivor or an over-the-cap loop. Then assert the guard both catches the bad state and completes the recovery step, not merely flags it.

Why do isolated stage tests miss regressions in pipelines?

Fixtures that test each stage in isolation cannot catch regressions that only appear when stages run in sequence. When one stage consumes another's output, commit a composition fixture that runs both and asserts the combined result.

When should I not use golden fixture testing?

Golden fixtures fit mechanical, deterministic pipeline extensions where output must be byte-stable. They are a poor fit for nondeterministic outputs such as LLM generations or time-dependent results, where property-based or semantic assertions are more appropriate.