Repository navigation
Description
docs/design/ltm--loops-that-matter.md is the entry point for LTM (linked from docs/README.md, docs/architecture.md, the engine's CLAUDE.md, and an engine warning message), but large parts of it describe older code.
It needs one pass that checks each section against the current tree and rewrites what has drifted.
Known problems
- It names
build_partial_equation, which no longer exists; the builders arebuild_partial_equation_shapedandbuild_partial_equation_shaped_with_live_refinltm_augment.rs. - It describes
recompute_module_input_edge_seriesas the discovery-time recompute for edges into a module.
That function is now an adapter kept for tests; production goes throughrecompute_module_input_edge_series_for, cached byModuleOverrideCache(ltm_finding.rs), which the doc never mentions. - "Module Classification" presents Infrastructure / DynamicModule / Passthrough as a code-level taxonomy.
No such type exists; the decision is spread acrossmodel_ltm_variables,modules_carry_state, and the module pathway map.
Whether the prose still matches what they decide is unchecked. - About ten passages narrate history ("now fires only for", "Before this fix") or cite PR review-comment ids (
r3353459409and others), which the evergreen-docs rule forbids.
Checking that names exist is not enough: the second and third items pass a name check and are still wrong.
The sections on how array references are classified were already checked against the code; the rest (two modes, module handling, polarity, discovery, arrays, pinned loops, test coverage) were not.
Why it matters
A reader following the doc to the adapter will draw wrong conclusions about where production behavior lives.
No CI check covers identifiers inside backticks in docs/design/, so this drift is invisible.
Fix
A doc-only PR: go section by section, confirm each named function and each behavioral claim against the code, fix the items above, and rewrite the narration as standing statements.
Optional, and probably not worth it: a scripts/check-docs.py rule that every backticked identifier in docs/design/ resolves somewhere in src/ (it would catch only the first kind of problem).
Pointers
docs/design/ltm--loops-that-matter.mdsrc/simlin-engine/src/ltm_finding.rs,ltm_augment.rs,db/ltm/mod.rs,ltm/graph.rs
Activity
[-]docs: full verification pass of ltm--loops-that-matter.md against the LTM code (build_partial_equation is gone; recompute passage describes the adapter, not ModuleOverrideCache; module-role taxonomy is prose-only)[/-][+]doc: LTM design doc is out of date with the code[/+]