Expand description
Rules + SKILL.md injection for every supported agent, split by concern
(GL#440): content (payloads), targets (agent catalog), detect
(installation checks), write (atomic file surgery), skills (SKILL.md).
This hub owns the shared types and the orchestration entry points.
Content is delegated to core::rules_canonical — all rule text lives
there as pub const sections. Markers (START_MARK, END_MARK,
RULES_VERSION) are also re-exported from canonical.
Re-exports§
pub use crate::core::rules_canonical::END_MARK;pub use crate::core::rules_canonical::RULES_VERSION;pub use crate::core::rules_canonical::START_MARK;
Structs§
Constants§
- GEMINI_
DEDICATED_ CONTEXT_ FILENAME - The
context.fileNameentry registered for Gemini in dedicated mode.
Functions§
- any_
rules_ marker_ present - Returns
trueif a lean-ctx rules marker is present in any supported agent’s rules file. - canonical_
rules_ block - Forwarding functions — content is delegated to
core::rules_canonical. - check_
rules_ freshness - Check if the rules file for a given MCP client is up-to-date.
- collect_
rules_ status - expected_
blocks_ by_ target - The canonical rules block lean-ctx would write for each target, keyed by the target’s display name.
- gemini_
dedicated_ rules_ path - inject_
all_ rules - inject_
rules_ for_ agent - Inject global rules for a single agent (by CLI key like “opencode”, “cursor”, etc.).
- install_
all_ skills - Install SKILL.md for all detected agents.
Returns
Vec<(display_name, was_new_or_updated)>. - install_
skill_ for_ agent - Install SKILL.md for a specific agent. Returns the installed path.
- opencode_
dedicated_ rules_ path - rules_
dedicated_ markdown - rules_
shared_ content