Repository navigation
fix(rules): SD022 skips plans and roadmaps, which name paths still to come - #1209
hyperpolymath wants to merge 1 commit into
Conversation
… come SD022 reads a `src/<dir>/` reference to a directory that exists nowhere as rename drift. A plan or roadmap lists files a work package will create, so every such path is absent by design. On bactrian#37 it fired three times on docs/status/BACTRIAN-ULTRAPLAN.adoc (src/driver/, src/ppx/, src/frontend/ under a work package's "Files:" line). Plans are the mirror of CHANGELOG.md, which SD022 already skips: one records the tree as it was, the other the tree as it will be, and neither describes the current layout. planning_doc?/1 recognises them by name: a file-name segment ending in PLAN or equal to ROADMAP, or a plan/plans/roadmap directory. Current-state docs stay in scope; the new test checks that EXPLAINME.adoc with the same text is still flagged. The new test fails before the change (all four plan docs flagged) and passes after; test/structural_drift_test.exs, test/rules and test/soundness_test.exs: 1037 tests, 0 failures. Formatted with Elixir 1.17.3 locally; the CI format job runs 1.19.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZkGCWGEyedTtdEHAPT
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
|
Generated by Claude Code |



What
SD022 (
structural_drift) reads asrc/<dir>/reference to a directory that exists nowhere as drift left behind by a rename. A plan or roadmap lists files a work package will create, so every such path is absent by design.On bactrian#37 it fired three times on
docs/status/BACTRIAN-ULTRAPLAN.adoc. The paths weresrc/driver/,src/ppx/andsrc/frontend/, all under a work package's "Files:" line.Fix
Plans are the mirror of
CHANGELOG.md, which SD022 already skips. A changelog records the tree as it was, and a plan records the tree as it will be. Neither describes the current layout, so neither can show rename drift.planning_doc?/1recognises a plan by name only. It matches when:PLAN(PLAN, ULTRAPLAN, IMPLEMENTATION-PLAN), orROADMAP, orplan,plansorroadmap.Docs that describe the current state stay in scope.
Evidence
test/structural_drift_test.exs:EXPLAINME.adoc, which holds the same text, is still flagged.test/structural_drift_test.exs,test/rulesandtest/soundness_test.exsgive 1037 tests, 0 failures.scripts/gen-rules-praxis.sh --check: OK.scripts/check-readme-claims.sh: OK.tests/rules-praxis-test.sh: 22 passed.mix format --check-formatted: OK.Generated by Claude Code