Skip to main content

Module rules_sections

Module rules_sections 

Source
Expand description

Profile-aware rules section builders (#756).

Each function generates the text for one rules section, filtering tool references by the active ToolProfile. Power profile produces output identical to the previous static constants; Minimal/Standard/Custom omit tools the agent cannot call.

Folded-tool alignment (#509): ctx_symbolctx_search(action=symbol), ctx_semantic_searchctx_search(action=semantic).

Functions§

anti_section
Anti-patterns — only references tools the profile exposes.
ctx_call_fallback
ctx_call gateway fallback — shown when the profile hides tools the agent might need. Returns None for Power (all tools visible).
hook_covered_tools_section
Mandatory tool mapping on hook-covered hosts (Cursor with hooks). v8: strict mode — always prefer ctx_* even when hooks would cover native tools.
intent_section
Intent-to-tool playbook — only advertises tools the profile exposes.
litm_end_section
LITM end-of-instructions preference line — only lists enabled tools.
shadow_minimal_section
Shadow-mode exclusive tools (no native trigger to intercept).