Evidence
grep -rln "from mcp_server\.core\." mcp_server/infrastructure/*.py (measured on this branch, chore/issue-pgstore-split-1384-lines, base origin/main @ 1ba020a) returns 6 files, not the 3 CLAUDE.md's "Code Style" section documents as known/tracked:
mcp_server/infrastructure/pg_store_memory_reheat.py (core.write_class)
mcp_server/infrastructure/pg_store_near_dup.py (core.near_dup_calibration)
mcp_server/infrastructure/pg_store_write.py (core.temporal_normalize — relocated verbatim from pg_store.py by #<this-PR>, pre-existing since ba249989, 2026-07-29)
mcp_server/infrastructure/sqlite_store.py (core.temporal_normalize — same violation, SQLite backend parity)
mcp_server/infrastructure/wiki_schema_reader.py (already documented)
mcp_server/infrastructure/wiki_store.py (already documented — one of these two is likely wiki_classifier.py/wiki_schema_loader.py under a since-renamed path; re-verify against the current 3-item list)
CLAUDE.md's Code Style section names only wiki_axis_registry.py, wiki_classifier.py, wiki_schema_loader.py as tracked pre-existing violations (found 2026-07-14 during #114). The pg_store_*.py family (near_dup, memory_reheat, write) and sqlite_store.py are not in that list.
Root cause
temporal_normalize.py / temporal_timezones.py / temporal.py (date parsing, zero I/O, no domain/business logic) and near_dup_calibration.py / write_class.py (pure classification, zero I/O) are placed under core/ in docs/module-inventory.md, but every one of their infrastructure-layer callers needs them purely as stdlib-adjacent utilities with no dependency on core's business rules. They read as misplaced under shared/'s stated criterion ("Pure utility functions ... no dependencies on other project layers") rather than a genuine core/infrastructure boundary crossing.
Why not fixed in this PR
Out of blast radius: this PR (chore/issue-pgstore-split-1384-lines) is a behavior-preserving line-count split of pg_store.py — it relocates the core.temporal_normalize import verbatim, introducing no new violation. Fixing this properly means moving 5 modules (temporal.py, temporal_normalize.py, temporal_timezones.py, near_dup_calibration.py, write_class.py) to shared/ and re-verifying every consumer (including sqlite_store.py, untouched by this PR, and the wiki_* files already tracked separately) — a distinct architectural change, not a mechanical split.
Suggested fix
- Re-audit whether
temporal.py/temporal_normalize.py/temporal_timezones.py/near_dup_calibration.py/write_class.py truly belong in core/ per docs/module-inventory.md's own dependency-rule table, or should move to shared/.
- If moved: update
docs/module-inventory.md's per-layer catalogue and re-run the layer grep (grep -rn "from mcp_server.infrastructure" mcp_server/core/ plus the reverse direction) as part of that PR's own gate.
- If kept in
core/ deliberately: extend CLAUDE.md's "3 pre-existing violations" list to the full current count (6, per the grep above) so the documented exception list matches reality.
Evidence
grep -rln "from mcp_server\.core\." mcp_server/infrastructure/*.py(measured on this branch,chore/issue-pgstore-split-1384-lines, baseorigin/main@ 1ba020a) returns 6 files, not the 3 CLAUDE.md's "Code Style" section documents as known/tracked:CLAUDE.md's Code Style section names only
wiki_axis_registry.py,wiki_classifier.py,wiki_schema_loader.pyas tracked pre-existing violations (found 2026-07-14 during #114). Thepg_store_*.pyfamily (near_dup, memory_reheat, write) andsqlite_store.pyare not in that list.Root cause
temporal_normalize.py/temporal_timezones.py/temporal.py(date parsing, zero I/O, no domain/business logic) andnear_dup_calibration.py/write_class.py(pure classification, zero I/O) are placed undercore/indocs/module-inventory.md, but every one of their infrastructure-layer callers needs them purely as stdlib-adjacent utilities with no dependency on core's business rules. They read as misplaced undershared/'s stated criterion ("Pure utility functions ... no dependencies on other project layers") rather than a genuine core/infrastructure boundary crossing.Why not fixed in this PR
Out of blast radius: this PR (
chore/issue-pgstore-split-1384-lines) is a behavior-preserving line-count split ofpg_store.py— it relocates thecore.temporal_normalizeimport verbatim, introducing no new violation. Fixing this properly means moving 5 modules (temporal.py,temporal_normalize.py,temporal_timezones.py,near_dup_calibration.py,write_class.py) toshared/and re-verifying every consumer (includingsqlite_store.py, untouched by this PR, and the wiki_* files already tracked separately) — a distinct architectural change, not a mechanical split.Suggested fix
temporal.py/temporal_normalize.py/temporal_timezones.py/near_dup_calibration.py/write_class.pytruly belong incore/perdocs/module-inventory.md's own dependency-rule table, or should move toshared/.docs/module-inventory.md's per-layer catalogue and re-run the layer grep (grep -rn "from mcp_server.infrastructure" mcp_server/core/plus the reverse direction) as part of that PR's own gate.core/deliberately: extend CLAUDE.md's "3 pre-existing violations" list to the full current count (6, per the grep above) so the documented exception list matches reality.