| name | draton-language-guard |
| description | Protect Draton canonical language rules, syntax philosophy, and parser-doc-example alignment. Use when Codex changes syntax, parser behavior, typechecker behavior, language examples, migration notes, contributor rules, or any implementation that might introduce competing canonical syntax or drift away from documented Draton language policy. |
Draton Language Guard
Read the language policy before editing syntax-facing code. Reject changes that introduce competing canonical syntax, inline type noise as the new default, or docs that disagree with implementation behavior.
Workflow
- Read references/core-docs.md and open the specific repo docs it points to.
- Identify whether the task touches parser behavior, typechecker behavior, examples, docs, or contributor guidance.
- Preserve these invariants:
- Keep
let as the canonical variable declaration form.
- Keep explicit
return as the canonical control-flow style.
- Keep
import { ... } from module.path as the canonical import syntax.
- Keep
class as structure and layer as capability grouping.
- Keep
@type optional and authoritative rather than inline mandatory noise.
- If behavior changes are user-visible, coordinate with
$draton-doc-sync.
- If code changed, coordinate with
$draton-verification.
Decision rules
- Prefer the smallest philosophy-preserving fix.
- Treat compatibility syntax as migration support only, not as an equal design direction.
- Update docs and examples in the same task when syntax-facing behavior changes.
- If parser or typechecker behavior contradicts docs, make them converge before considering the task done.
Resources