Background
Building a context compiler for AI coding agent dispatch surfaced a set of concepts that should be standardized in the RDL format:
-
Compression tiers — files have different value at different compression levels (full content, structural skeleton, NL summary, manifest entry, omitted). The tier assignment is task-dependent.
-
Scope tags — instruction sections tagged with domain scopes (backend, frontend, api, testing) enable per-task filtering. Format: HTML comments in markdown.
-
Tier utility matrices — different file types have different information density at each tier. A config file's skeleton is worthless but its full content is critical. A type file's skeleton carries 90% of the information.
-
Submodular value — context items aren't independent. Adding file A reduces the marginal value of file B if B re-exports A's types. The optimization is submodular, not knapsack.
Proposed RDL Extensions
1. Scope directive
# scope: backend, database
RULE:no-raw-sql
EFFECT:forbid
...
Rules tagged with scope are only included when the task's scope overlaps.
2. Tier directive
# tier: skeleton
# tier-utility: 0.9
RULE:type-definitions
Advisory hint for context compilers about how to compress this rule under budget pressure.
3. Budget pressure behavior
# pressure: drop-at-moderate
# pressure: keep-always
Explicit control over what gets dropped first when the context budget is tight.
Why standardize
Multiple tools consume RDL: dispatch agents, IDE plugins, MCP servers, CI checks. Standardizing compression and scoping directives means a single rule file works across all consumers with consistent behavior.
Background
Building a context compiler for AI coding agent dispatch surfaced a set of concepts that should be standardized in the RDL format:
Compression tiers — files have different value at different compression levels (full content, structural skeleton, NL summary, manifest entry, omitted). The tier assignment is task-dependent.
Scope tags — instruction sections tagged with domain scopes (backend, frontend, api, testing) enable per-task filtering. Format: HTML comments in markdown.
Tier utility matrices — different file types have different information density at each tier. A config file's skeleton is worthless but its full content is critical. A type file's skeleton carries 90% of the information.
Submodular value — context items aren't independent. Adding file A reduces the marginal value of file B if B re-exports A's types. The optimization is submodular, not knapsack.
Proposed RDL Extensions
1. Scope directive
Rules tagged with scope are only included when the task's scope overlaps.
2. Tier directive
Advisory hint for context compilers about how to compress this rule under budget pressure.
3. Budget pressure behavior
Explicit control over what gets dropped first when the context budget is tight.
Why standardize
Multiple tools consume RDL: dispatch agents, IDE plugins, MCP servers, CI checks. Standardizing compression and scoping directives means a single rule file works across all consumers with consistent behavior.