Expand description
The committed LEAN-CTX.md rule artifacts as (relative_path, content)
pairs — the single source shared by the regenerator (gen_rules example)
and the drift gate (tests/rules_drift.rs) so the project copy and the
rust/ copy can never disagree.
Content is forced to the default profile (non-shadow, compression Off) so
the committed bytes are independent of the developer’s local lean-ctx config
and stay deterministic (#498). The live writer
(hooks::ensure_project_agents_integration) renders with the user’s config
instead — that is each user’s own copy, not this repo’s checked-in artifact.
Constants§
- ARTIFACT_
PATHS - Project-relative paths of every committed dedicated-rules artifact. Add new real rule artifacts here — not docs examples or templates.
Functions§
- artifacts
(relative_path, content)for every artifact the generator writes. All artifacts share one canonical body today; the shape leaves room for per-path bodies later without changing callers.- canonical_
body - Canonical body of a project
LEAN-CTX.md: the owner banner, the long-form rules block (non-shadow, compressionOff), and a trailing newline. Inverse of what the drift gate reads back. Longform becauseLEAN-CTX.mdis opened on demand (AGENTS.md pointer), never auto-loaded — it can afford the verbose teaching sections the injected profiles fold away (#578).