Skip to content

v0.2.0 — section variants and scan enhancements

Choose a tag to compare

@smorin smorin released this 16 Apr 21:50
· 56 commits to main since this release

Highlights

PRD §0.13 (Section Variants) and §0.14 (Scan Enhancements) — bundled as four slices on main.

group:variant section markers (PRD §0.13)

  • New ID syntax: # toggle:start ID=db:postgres groups variants under db.
  • -S group flips a 2-variant pair (active ↔ commented).
  • -S group:variant activates one variant, comments every sibling.
  • -S group --force on|off applies the same state to every variant of the group.
  • Errors when -S group targets a 3+ variant group without a :variant qualifier.

--pair validation flag (PRD §0.13.4)

  • Pre-execution guard that errors when the targeted group does not contain exactly 2 variants.
  • No file mutations occur on failure.

Variant-aware --scan (PRD §0.14.1–§0.14.2, §0.14.4)

  • Per-file table now includes a TYPE column (solo / pair / group).
  • --scan -R recursive summary aggregates per group across files.
  • --scan -S <group> shows the detailed variant-by-variant view with file refs.
  • --scan --json emits a nested { sections: [...] } tree with variants grouped under their parent.

--scan --check validation (PRD §0.14.3)

  • Reports unclosed toggle:start markers, duplicate IDs in a single file, cross-file variant gaps, and (with --pair) pair-mismatches.
  • Exits non-zero on any error finding; warnings do not fail the run.

Repo cleanup

  • Removed the unrunnable task-master npm scaffolding (package.json, scripts/dev.js, etc.) which closed 17 Dependabot alerts in unused npm transitives.

Stats

  • 22 commits since v0.1.0 (P01–P04 + repo cleanup)
  • Tests: 7 doc + 90 unit + 111 integration = 208 passing
  • clippy -D warnings clean

Compatibility

Existing solo-section workflows are unchanged. The TYPE column and nested JSON shape are new — any tooling that parsed the old flat --scan --json array will need to read .sections[] instead.