Skip to main content

Module rule_artifacts

Module rule_artifacts 

Source
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 default dedicated rules block (non-shadow, compression Off), and a trailing newline. Inverse of what the drift gate reads back.