Skip to content

bibcheck: split modes into sibling files and extract splitter script#13

Open
nsmiller2501 wants to merge 2 commits into
scunning1975:mainfrom
nsmiller2501:followup/bibcheck-mode-split-and-splitter
Open

bibcheck: split modes into sibling files and extract splitter script#13
nsmiller2501 wants to merge 2 commits into
scunning1975:mainfrom
nsmiller2501:followup/bibcheck-mode-split-and-splitter

Conversation

@nsmiller2501
Copy link
Copy Markdown

@nsmiller2501 nsmiller2501 commented May 23, 2026

Summary

Two small follow-up changes to /bibcheck. (1) Splits the two operating modes (per-citation, per-field) into sibling files so SKILL.md only carries shared context. (2) Extracts the inline .bib splitter into a standalone script under scripts/split_bib.py.

Both changes are intended to reduce per-invocation token cost without altering audit behavior.

What changed

  • New mode_per_citation.md: holds the Step 3a prompt template + consolidator pass for the default --by-citation mode.
  • New mode_per_field.md: holds the Step 3b prompt template + consolidator pass for --by-field.
  • SKILL.md shrinks from 144 → 97 lines, pointing into whichever mode file is selected. Since only one mode fires per invocation, the unused mode no longer occupies the loaded context.
  • New scripts/split_bib.py: the previously inline .bib splitting logic, extracted to a reusable script. SKILL.md now invokes it via ~/.claude/skills/bibcheck/scripts/split_bib.py and references it in allowed-tools.

Why

  • Mode split: only one mode runs per invocation. Carrying the other mode's prompt template in SKILL.md is dead weight on every call.
  • Script extraction: keeps the deterministic .bib-chunking logic out of the LLM context entirely and makes it independently testable / re-runnable.

Testing

  • Verified mode_per_citation.md and mode_per_field.md carry the exact prompt templates and consolidator instructions that previously lived in SKILL.md.
  • Confirmed SKILL.md references the new sibling files and the extracted script path.
  • Ran split_bib.py against a sample .bib to confirm chunking output matches the prior inline behavior.
  • No behavior change in audit output expected — this is a context/file-layout refactor only.

Move Step 3a (per-citation) and Step 3b (per-field) prompt
templates and consolidator passes into mode_per_citation.md and
mode_per_field.md. Only one mode fires per invocation, so the
split saves loaded tokens on every run.

SKILL.md drops 144 -> 97 lines (under the 100-line rubric cap).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant