seeded-determinism-and-golden-vectors

Enforces reproducible seeded content generation with frozen golden-vector fingerprint tables in Dart.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/zakariaf/NearlyStop --skill seeded-determinism-and-golden-vectors-zakariaf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: seeded-determinism-and-golden-vectors
Source: https://github.com/zakariaf/NearlyStop/tree/main/.claude/skills/seeded-determinism-and-golden-vectors
Command: npx skills add https://github.com/zakariaf/NearlyStop --skill seeded-determinism-and-golden-vectors-zakariaf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Generated content that must be identical on every device — a daily pick, a procedural layout, a shareable result — breaks when generators read wall clocks, use ambient randomness, or depend on unspecified PRNG behavior. This Skill enforces the discipline that makes output a pure function of an injected key, and pins it with a committed golden-vector table so regressions fail loudly instead of silently rewriting what users already saw. ## Core Features & Use Cases - Deterministic seed derivation: Hash the key with FNV-1a-64, XOR per-feature and per-mode salts, mix through SplitMix64, and draw from a PRNG the repo owns — never dart:math's Random. - Golden vector tables: Commit (key, params) → fingerprint rows computed from an independent oracle, covering boundaries, leap days, and historical keys, regenerated only by a reviewed local command while CI verifies but never blesses. - Versioned generator cutovers: Ship generator improvements as new versions with a cutover key, keeping old versions in the binary so stored outcomes referencing past content still reproduce. - Use Case: A Flutter app shows every user the same daily content. Use this Skill to build the generator as a pure function of an ISO date key, ban DateTime.now() and ambient Random() via the check script, and pin the output with fingerprint vectors so a refactor that reorders draws fails the build. ## Quick Start Apply the seeded-determinism rules to my Dart daily-content generator and create a golden vector table with an independent oracle for its fingerprints.

Frequently Asked Questions about seeded-determinism-and-golden-vectors

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

FAQPage Schema
How do I make a seeded random generator reproducible across devices in Dart?

Derive the seed by hashing the key with FNV-1a-64, XOR in per-feature and per-mode salts, then mix through SplitMix64 before drawing. Own the PRNG implementation rather than using dart:math's Random(seed), which has no documented cross-version stability guarantee.

What is a golden vector table and how does it differ from golden images?

A golden vector is a committed row mapping a key and params to an expected fingerprint, asserted exactly by dart test with no widget binding. Golden images are reference PNGs of rendered UI; vectors are data fingerprints for pure generators, and a fingerprint diff is one reviewable line.

Why does DateTime.now() break deterministic content generation?

A generator that reads a wall clock produces different output per run, making it untestable and impossible to reproduce from a bug report. The key must be injected as an argument, with wall-clock time entering the app once through an injected Clock at the composition root.

Does 64-bit integer hashing work in Dart web builds?

No. On the web, Dart integers compile to JavaScript doubles, so 64-bit wrap-around multiplication in FNV-1a-64 or SplitMix64 produces different numbers. Implement the hash and PRNG in 32-bit halves or with BigInt, or restrict the generator to native targets.

How do I update a shipped generator without breaking historical content?

Ship the improvement as a new generator version with a future cutover key, keeping the old version in the binary so stored outcomes still reproduce. Add new vector rows instead of overwriting old ones, and persist generatorVersion with every stored outcome.

Why should golden vector expected values come from an independent oracle?

Fixtures generated by the implementation under test enshrine that implementation's bugs and keep agreeing with them forever. Derive expected values from a second simpler implementation, hand computation, or a reference in another language so the table proves correctness, not just stability.