diff --git a/.claude/skills/foxhunt/isv-slot-scaffolder/SKILL.md b/.claude/skills/foxhunt/isv-slot-scaffolder/SKILL.md new file mode 100644 index 000000000..cb929c946 --- /dev/null +++ b/.claude/skills/foxhunt/isv-slot-scaffolder/SKILL.md @@ -0,0 +1,76 @@ +--- +name: isv-slot-scaffolder +description: Scaffolds new ISV slots — generates crates/.../spN_isv_slots.rs with named constants in [START..END), bumps ISV_TOTAL_DIM at canonical location, registers slots for fold-boundary reset, emits the canonical commit message shape. Use when adding ISV-driven adaptive bounds for a new SP. +--- + +# Foxhunt ISV Slot Scaffolder + +Templatizes the ISV-slot scaffolding step that runs early in every SP that introduces adaptive bounds. + +## When to invoke + +- "Add ISV slots for SP-N". +- "Scaffold spN_isv_slots.rs". + +## Reference: canonical example + +The most recent example is commit `c146c4fff`: + +``` +feat(sp15): scaffold sp15_isv_slots.rs with 46 slots [397..443) — ISV_TOTAL_DIM 396→443 +``` + +Reproduce that shape exactly. The plan must: + +1. Discover the current `ISV_TOTAL_DIM` value (grep for `ISV_TOTAL_DIM` in `crates/`). +2. Discover the next free index (= current `ISV_TOTAL_DIM`). +3. Receive a list of `(SLOT_NAME, purpose)` from the user. +4. Compute the new range `[START..END)` and new `ISV_TOTAL_DIM`. + +## Inputs you must collect first + +1. SP number (N). +2. List of slot names + purposes. Names are `SCREAMING_SNAKE_CASE`. +3. Optional: explicit indices (else assigned sequentially from current `ISV_TOTAL_DIM`). + +## What this skill produces + +1. New file `crates//src/isv/sp_isv_slots.rs`: + +```rust +//! SP- ISV slots — [..) +//! +//! Adaptive bounds and signals for SP-. +//! Source pearl: . + +pub const ISV_: usize = ; +pub const ISV_: usize = +1; +// ... + +pub const SP_SLOTS_START: usize = ; +pub const SP_SLOTS_END: usize = ; +``` + +2. Edit at canonical `ISV_TOTAL_DIM` site: + +```rust +pub const ISV_TOTAL_DIM: usize = ; // bumped from by SP- (+ slots) +``` + +3. Edit at fold-boundary reset registration site to register `SP_SLOTS_START..SP_SLOTS_END`. + +4. Suggested commit message (use heredoc): + +``` +feat(sp): scaffold sp_isv_slots.rs with slots [..) — ISV_TOTAL_DIM +``` + +## Discipline + +- All slots must be referenced by at least one consumer in a follow-up commit (per `feedback_wire_everything_up.md`). +- Slot names must be domain-meaningful — no `SP15_X1`, `SP15_X2` placeholders. +- ISV_TOTAL_DIM bump must match the slot count exactly. Verify before committing. + +## After scaffolding + +Suggest invoking `foxhunt-isv-discipline-auditor` to verify the new slots aren't shadowing existing ones with semantically-similar purposes.