The charter schema defines what a valid Gator charter looks like: the structure that validators, tests and other models can rely on, in any governed repository.
Version charter-schema-v1 is the official local schema, codified from working Gator charters. It is stable enough for local validator implementations, cross-model consistency checks, external experiments that use Gator charters, and research that compares charter quality across repositories.
It covers the charter file structure, the function-entry structure, the INDEX.md dispatch table, and the minimum structure of the cross-cutting charter. It does not define how a model discovers module boundaries, how tripwires are found, or how the first charter set is formed. That is the Charter formation process, in this Docs list.
| Design principle | Meaning |
|---|---|
| Structural, not qualitative | The schema checks shape and minimum expectations, not whether a charter is insightful. |
| Stable enough for tooling | External validators and experiments can rely on the basic format. |
| Flexible notation | Both ASCII (<- / ->) and Unicode (← / →) arrows are accepted. |
| Skeleton-friendly | A thin but structurally valid charter is still a charter. |
Charter files live in .gator/charters/. _template.md and README.md are excluded from validation.
| Section | Enforcement | Notes |
|---|---|---|
# Charter: [Name] | Error | First line of the file |
**Covers**: | Error | Exempt for cross-cutting charters |
## Owns | Error | Must exist |
## Does Not Own | Error | Must exist |
--- separator | Error | At least one, before any function entries |
## Before Changing This Module | Warn | Recommended when function entries exist |
## Connections | Warn | Recommended when function entries exist |
Each function entry starts with ### inside a charter file.
| Element | Enforcement | Format |
|---|---|---|
| Heading | Error | ### name(args) or free-form after ### . Disambiguate duplicate names with [filename.ext] when needed. |
| File line | Warn | A File: line is recommended |
| Description | Warn | At least one non-annotation line after the heading |
| Access patterns | Optional | @reads:, @writes:, Models:, Filesystem:, Session R:, Session W: |
| Callers | Optional | ← or <- prefix |
| Callees | Optional | → or -> prefix |
| Tripwires | Optional | ! prefix |
Every .gator/charters/ directory should have an INDEX.md: the dispatch table that tells a model which charters to read before it changes a given path.
| Element | Required | Format |
|---|---|---|
| Title | Yes | # Charter Index |
| Cross-cutting pointer | No | An “always read first” line pointing to cross-cutting.md |
| Dispatch table | Yes | A Markdown table that maps code paths to charter files |
If a cross-cutting charter exists, it holds the multi-module invariants: the rules that break during a refactor because the relationship between modules was violated.
| Element | Required | Format |
|---|---|---|
At least one TRIPWIRE or Pattern section | Yes | ## TRIPWIRE: or ## Pattern: heading |
## Owns | Yes | The multi-module invariants in scope |
## Does Not Own | Yes | Module-specific logic, which belongs in the module charters |
| Severity | Meaning | Exit code |
|---|---|---|
| Error | Schema violation: a required element is missing or malformed | Causes exit 1 |
| Warn | Suspicious but not broken: an optional-but-recommended element is missing | No effect |
| Info | Suggestion: the entry is sparse but valid | No effect |
See also charters/README.md for notation, philosophy and anti-patterns, and charters/_template.md for a blank charter.