regen-baseline

Regenerate tracked n2b baseline snapshots for fixture and rule outputs.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/aphrody-code/n2b --skill regen-baseline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: regen-baseline
Source: https://github.com/aphrody-code/n2b/tree/main/skills/regen-baseline
Command: npx skills add https://github.com/aphrody-code/n2b --skill regen-baseline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents failing tests and CI snapshots from blocking legitimate development changes by letting you regenerate the tracked output baselines in a controlled, validated way.

Core Features & Use Cases

  • Regenerates 7 tracked snapshots across fixture render formats (text, json, jsonl, md, sarif) and rule render formats (json, text).
  • Guards against stale binaries by refusing to run when n2b --version does not match the version declared in the repo’s Rust/Cargo manifests.
  • Enables human review by showing a git diff --stat summary so you can confirm only the expected output changes landed.
  • Use case: after upgrading the n2b CLI/reporting output or adding/changing rules, update the snapshots so the test suite reflects the new, correct behavior.

Quick Start

Run the regen script from the repo root to refresh the baseline snapshots tracked under tests/snapshots/baseline.

Frequently Asked Questions about regen-baseline

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

FAQPage Schema
How do I regenerate test snapshots after updating rules in CI?

You can regenerate baseline snapshots by running the regen script from the repository root, which refreshes tracked outputs across text, json, jsonl, md, and sarif formats after legitimate rule or renderer updates.

Why does my baseline snapshot regeneration fail with a version mismatch?

Baseline snapshot regeneration fails with a version mismatch because the script enforces an anti-stale requirement, refusing to run when the built binary version does not match the repository manifest version.

When do I need to regenerate baseline snapshots for fixture outputs?

You need to regenerate baseline snapshots for fixture outputs after legitimate changes such as version bumps, renderer updates, rule registry modifications, or fixture-driven finding changes during development and CI stabilization.

Does the snapshot regeneration process support human review of changes?

The snapshot regeneration process supports human review by showing a git diff stat summary so you can confirm only the expected output changes landed in the tracked baseline files.

What reporting formats are covered when regenerating baseline snapshots?

Regenerating baseline snapshots covers seven tracked formats across fixture renders including text, json, jsonl, md, sarif, and rule renders including json and text outputs.