Skip to content

file-placement: exempt the pack -> engine-surface reach the contract mandates - #517

Merged
missingbulb merged 1 commit into
mainfrom
claude/file-placement-rule-strictness-63cryz
Jul 28, 2026
Merged

file-placement: exempt the pack -> engine-surface reach the contract mandates#517
missingbulb merged 1 commit into
mainfrom
claude/file-placement-rule-strictness-63cryz

Conversation

@missingbulb

Copy link
Copy Markdown
Owner

A consumer repo waived basics/file-placement for a local pack rule importing the checks helpers:

".claudinite/local/packs/tldr/ci-excludes-claudinite.mjs" — "a pack rule importing the shared
checks engine's helpers is a structural cross-cutting dependency every pack rule takes…"

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:

distance
packs/basics/*.mjsengine/checks/helpers/ (canon home) 5
.claudinite/local/packs/<pack>/*.mjs.claudinite/shared/engine/… (consumer) 7

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 is engineSurface() from engine/checks/helpers/module-imports.mjs — the same allow list pack-independence enforces — so "what a pack may import" and "what placement exempts" cannot drift apart. SHARED_SUBDIR handles 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 --test over all CI roots: 814 pass, 0 fail
  • check_the_world: 0 blocking, 7 advisory — identical to main. All 7 are pre-existing engine-internal reaches (engine/hooks/ and engine/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

…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
missingbulb force-pushed the claude/file-placement-rule-strictness-63cryz branch from 55d9b44 to 6e4d010 Compare July 28, 2026 10:19
@missingbulb
missingbulb merged commit 9a7611d into main Jul 28, 2026
1 check passed
@missingbulb
missingbulb deleted the claude/file-placement-rule-strictness-63cryz branch July 28, 2026 10:25
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.

2 participants