Repository navigation
refactor(tooling): remove stale prompt cruft and capture hook step - #152
Merged
Merged
Conversation
Trim AGENTS.md from 262 to 234 lines. The memory-of-failures section restated a 60-line size rule the file itself broke, so the six maintenance passes move to lode/infrastructure/instruction-file-maintenance.md and the file keeps three rules plus a pointer. Correct the leverage-advisor memory file, which claimed session-health.sh stats did not exist. It does. Drop the plan IDs that no longer resolve. Restore the missing hook step in the script-discovery build phase. The extraction from the old prompt dropped it, leaving 5b to jump to 5d. Add scripts/readme-table-diff.sh to the routing check and state the bash 4.0 floor. Rewrite the build-validator rule wall in plain prose with reasons. Remove three empty skill directories and the duplicated prompts/deterministic.md. Co-Authored-By: Claude
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.
Executive Summary
Two verified defects in the always-loaded instruction surface, plus one lost build step.
AGENTS.mdtold every session to cut the file past 60 lines and was itself 262 lines. A size rule the file visibly breaks teaches a model that the rules are aspirational. The 42-line maintenance method moves to a lode file, andAGENTS.mdkeeps three rules plus a pointer..claude/agent-memory/leverage-advisor/session-2026-04-11.mdasserted thatscripts/session-health.sh statsdid not exist. It exists and has for months, so the memory steered later sessions away from a working script. It also named an agent and three plan IDs that no longer resolve.Separately,
.claude/skills/script-discovery/references/build-phase.mdjumped from 5b to 5d. The hook-registration step was lost when that skill was extracted from a saved prompt, so the skill could build a script and never wire its guardrail.No performance measurement applies. This change touches no source code.
Code Changes
AGENTS.md: drop "Exercise abstract thinking", a restatement of trained behavior. Replace the six maintenance passes with three rules and a pointer. 262 lines become 234.lode/infrastructure/instruction-file-maintenance.md: new file that owns the six passes and the stop condition. Entry added tolode/lode-map.md..claude/skills/script-discovery/references/build-phase.md: new 5c step covers the hook, the ask-tiersettings.jsonedit, and the opencode guardrail parity that CIlintenforces. 5d now namesscripts/readme-table-diff.sh. 5a states the bash 4.0 floor..claude/agents/build-validator.md: rule wall rewritten as plain prose with reasons. The opencode mirror is regenerated..claude/agent-memory/leverage-advisor/session-2026-04-11.md: corrected against the scripts and plans that exist today.prompts/deterministic.md, whose build steps now live in the skill, and three empty skill directories that held only.DS_Store.Tests and Tooling
Build and tests did not run. The change set holds no
.csfiles, socheck.shcannot move its outcome.Checks that did run:
scripts/internal/analyzer-release-check.sh: clean, 214 source IDs, 0 unshipped.scripts/readme-table-diff.sh --analyzer: no drift.scripts/internal/opencode-agents.sh sync: 16 generated, 0 differences.scripts/lode-check.shon both lode files: 0 style hits.scripts/internal/precommit.sh: PII scan clean.scripts/lint-shell.sh: not applicable, no shell file changed.Review Guide
Read
AGENTS.mdsection "Instruction Files as a Memory of Failures" againstlode/infrastructure/instruction-file-maintenance.md. The split is the substance: the always-loaded file keeps the rules, and the method moves out.Check the 5c text against
.claude/hooks/and.opencode/plugins/e128-guardrails/index.ts. It describes the contract those files implement, so a mismatch there is a defect.Rollback
Revert the merge commit. The removed directories and the removed prompt file restore with it. No state, migration, or cache depends on this change.
🤖 Generated with Claude Code