Skip to content

RDL extension: Context Compilation Directives for agent dispatch #8

@zenprocess

Description

@zenprocess

Background

Building a context compiler for AI coding agent dispatch surfaced a set of concepts that should be standardized in the RDL format:

  1. 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.

  2. Scope tags — instruction sections tagged with domain scopes (backend, frontend, api, testing) enable per-task filtering. Format: HTML comments in markdown.

  3. 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.

  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions