file-placement: exempt the pack -> engine-surface reach the contract mandates - #517
Merged
Merged
Conversation
…mandates A consumer repo had to waive `file-placement` for a local pack rule importing the checks helpers. It is the fourth copy of that waiver: this repo already carried three near-identical acceptances (`packs/`, `skills/`, `.claudinite/local/packs/canon-curation/`), each reasoning that pack check modules share the engine lib by construction. Neither end of that reference can move. The pack loader discovers packs at fixed paths and the engine is vendored canon a consumer does not own to restructure, so the distance is fixed by the contract — 4-5 in the canon home, 7 from a local pack beside a consumer's shared mount. A waiver every adopter must write is a rule flagging a constant, so the rule now knows the exemption instead of each project restating it. The exempted surface is `engineSurface()` from the engine lib — the same allow list `pack-independence` enforces, so "what a pack may import" and "what placement exempts" cannot drift apart. It stays narrow: a pack reaching into another pack, or deep into its own subtree, is judged normally, and ordinary code reaching into a pack is untouched. Documents it as the third exemption beside mandated-location and test-location, drops the three now-dead acceptances (world check stays at the same 7 pre-existing engine-internal advisories), and adds the pack test the rule never had. Closes #519 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B4FbiDdq7GwK6nZouxugAa
missingbulb
force-pushed
the
claude/file-placement-rule-strictness-63cryz
branch
from
July 28, 2026 10:19
55d9b44 to
6e4d010
Compare
This was referenced Jul 29, 2026
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.
A consumer repo waived
basics/file-placementfor a local pack rule importing the checks helpers:That is the fourth copy of the same waiver. This repo already carried three near-identical acceptances —
packs/,skills/, and.claudinite/local/packs/canon-curation/— each reasoning that pack check modules share the engine lib by construction.Why it's the rule, not the repos
Neither end of the reference can move. The pack loader discovers packs at fixed paths (
packs/,.claudinite/local/packs/), and the engine is vendored canon a consumer doesn't own to restructure. The distance is fixed by the contract:packs/basics/*.mjs→engine/checks/helpers/(canon home).claudinite/local/packs/<pack>/*.mjs→.claudinite/shared/engine/…(consumer)Every pack module ever written takes it, in every repo. A waiver each adopter has to write is a rule flagging a constant, so the rule now knows the exemption rather than each project restating it.
Changes
packs/basics/file-placement.mjs— a third exemption, keyed on the reference rather than the source file (unlike the mandated-location and test-location ones): a pack module reaching the engine surface. The surface isengineSurface()fromengine/checks/helpers/module-imports.mjs— the same allow listpack-independenceenforces — so "what a pack may import" and "what placement exempts" cannot drift apart.SHARED_SUBDIRhandles the consumer-mount prefix.packs/basics/skills/file-placement/SKILL.md— documents it as the third exemption, stated portably (a framework that mandates both where extensions live and what they may import) with the corpus instance named. Keeps the same narrowness the other two have..claudinite-checks.json— drops the three acceptances the change makes dead.packs-tests/basics/file-placement.test.mjs— the pack test this rule never had (8 cases). Seen failing before the rule change; the three exemption cases fail without it.Narrowness is pinned by test: a pack reaching into another pack, or deep into its own subtree, is still flagged, and ordinary code reaching into the engine surface is untouched.
Rejected alternative
Raising the distance threshold. It would need ≥8 to cover the consumer case, which guts the rule for everything it's good at.
Verification
node --testover all CI roots: 814 pass, 0 failcheck_the_world: 0 blocking, 7 advisory — identical tomain. All 7 are pre-existing engine-internal reaches (engine/hooks/andengine/scheduler/→engine/checks/helpers/), untouched by this change and never covered by the removed acceptances.The consumer repo can drop its exception once it baselines.
Generated by Claude Code