Repository navigation
feat(scripts): instruction lint and the blind-review prompt (T801 t9) - #191
Merged
Merged
Conversation
Adds scripts/check-instructions.mjs (dead references and retired names fail; duplicate sentences, size budgets and growth warn), its tests, and .github/prompts/instruction-hygiene.prompt.md (plan T801, Gap 6).
Retired names match inside URLs; sentences keep inner punctuation; fences inside blockquotes and nested lists are skipped; multi-backtick code spans are read; word growth also warns.
Indented code (4 spaces, no list) opens no fence; a fence in a blockquote or list item ends when that container ends.
bketelsen
approved these changes
Nov 4, 2026
This was referenced Nov 4, 2026
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Plan T801, task t9 (section "Gap 6: instruction hygiene"). Adds the tools for a monthly instruction-hygiene review; Odrade runs them on pi-pocket-config and her runbooks (outside the graph).
scripts/check-instructions.mjs(+scripts/lib/instruction-hygiene.mjs): lint for Markdown instruction files.~/…,/var/home/…,./…/../…path, or a bare relative path whose first segment exists under--rootor the file's folder, that does not exist; and any name from--retired/--retired-file(word-bounded, sobketelsen/stomp#4matches andbketelsen/stompeddoes not).--min-words, default 8) in 2 or more files; over a--budgetJSON limit (closed schema, unknown keys exit 2); line growth since--base <ref>.test/check-instructions.test.mjs: 20 tests..github/prompts/instruction-hygiene.prompt.md, indexed in.github/prompts/README.md: blind review — current file text only (no history, blame, diffs, PR threads or authors), a reviewer from another model family (Claude-written files →openai/gpt-6.1-sol), read-only, at most 15 items, each with quotes andfile:line.package.json:check:instructionsscript. Not added toverify: the lint is a periodic tool, not a gate.Risk tier
Risk tier: 1 — a new read-only local script, its tests and a runbook; no workflow, authority, policy or existing script changes.
Verification
node --test test/check-instructions.test.mjs: 20/20 pass at7907b49.make ci: 94/94 tests pass; docs, organization and scripts gates green.87084ba): removed the dead-referenceaddRecord, emptied the retired-name loop, and disabled the growth warning (node --test test/check-instructions.test.mjs). Result: 6 tests fail —dead docs/missing.md reference fails when docs exists,home-relative dead and present paths,retired name respects boundaries and retired-file works,double-backtick code spans normalize outer spaces,base ref reports line growth,base ref reports word growth at the same line count; 10 pass (the negative cases). Restored; worktree removed.openai/gpt-6.1-sol, codergithub-copilot/mai-code-2-flash), round 1 at96da47a: Not ready, 5 blockers, all accepted and fixed in87084bawith tests — retired names inside URLs, sentence split at inner dots (false duplicates), fences inside blockquotes and nested lists, multi-backtick code spans, word growth with the same line count.87084ba: 4 fixes confirmed; 1 new blocker (the container-fence fix hid text after indented code and after an ended blockquote). Fixed indec9360: fences track quote depth and list content indent and end with their container. Revert test for it (scratch worktree atdec9360,scripts/lib/instruction-hygiene.mjstaken from87084ba): 3 tests fail —four-space fence does not hide an following reference,ended blockquote fence does not hide an following reference,fence in a list item and ended list item are handled.dec9360: the earlier fix confirmed; 1 new blocker (a single list indent lost the parent item when a nested list ended, so a valid fence in the parent was checked). Fixed in7907b49with a stack of list content indents. Revert test (lib fromdec9360):a fence in the parent item after a nested list ends is skipped, and text after the list is checkedfails.7907b49: Ready, Blocking: none (revieweropenai/gpt-6.1-sol; budget used: 1 review + 3 re-reviews).--root ~ --retired bketelsen/stompon~/.pi/agent/AGENTS.md, the agent profiles,~/.pi/agent/skillsand Odrade's plans: 66 files, 2 errors (abketelsen/stompmention in a profile, a dead~/projects/odradepath), 22 duplicate-sentence warnings. On core'sAGENTS.md,docs/README.mdand.github/prompts: 0 errors, 0 warnings.Docs housekeeping
.github/prompts/README.md