Expand description
Injected-context linter (#960) — keeps lean-ctx’s OWN injected context (the rules block + advertised tool descriptions) high-signal.
The Nisi/WorkOS “Case” talk is the motivation: comprehensive prose and
re-teaching what a competent model already knows degrades reasoning and
burns a finite attention budget; only the non-obvious gotcha earns its
tokens. This linter encodes that discipline so it can be enforced in CI and
surfaced in doctor.
Two severities:
Severity::Error— exact-duplicate rule lines and low-signal re-teaching phrases in the rules block. These ride every turn, are fully under our control, and must fail the gate.Severity::Warn— verbose or duplicated tool descriptions. Surfaced for triage so the ~28-tool surface can be trimmed incrementally without blocking unrelated work.
Structs§
- Lint
Finding - One linter finding against the injected context.
Enums§
Functions§
- error_
count - Number of gating (Error) findings.
- lint_
injected_ context - Lints the live injected context this install would emit (rules + tool schemas).
- lint_
rules_ text - Lints a rules-block text for re-teaching phrases (Error) and exact-duplicate content lines (Error).
- lint_
tool_ descriptions - Lints advertised tool descriptions for byte-identical copies (Error) and gotcha-budget overruns (Warn).