Barrel-import lint guard
Auto-generated from the source archive. Do not edit by hand — rerun
catalyst-changelog-syncinstead.
What changed
Section titled “What changed”- New
pnpm hr:lint-barrelscommand: a deterministic lint that enforces barrel-import discipline (HR-BARRELS-001/002) across backend and frontend. - It runs in three places — a
PostToolUsehook, a pre-commit hook, and a full-project CI/audit mode. - Exit codes follow catalog severity (blocking violations fail, informational ones only warn); generated files are reported separately and never fail the run.
Why it matters
Section titled “Why it matters”Barrel discipline used to be advisory, and it drifted — deep-path imports slipped in after the rule existed. The guard makes it enforceable: a blocking violation now stops a commit, and when the AI writes a deep-path import the hook hands it the rule, the line, and the barrel to use instead. It resolves every specifier (path aliases and relative paths) to compare governed units, scans imports, exports and jest.mock calls, and checks the @bridges two-surface policy structurally.