Schemas
manifest.toml
Section titled “manifest.toml”Location: .lexicon/manifest.toml
schema_version = "1.0"
[project]name = "my-lib"description = "A Rust library"repo_type = "library" # library | binary | workspacedomain = "key-value store"created_at = "2025-01-15T00:00:00Z"updated_at = "2025-01-15T00:00:00Z"
[preferences]naming_convention = "kebab_case" # kebab_case | snake_caseconformance_style = "trait_based" # trait_based | factory_based
[policy]ai_may_edit = ["src/**/*.rs", "tests/**/*.rs"]ai_requires_review = ["specs/**/*.toml", "CLAUDE.md"]ai_protected = [".lexicon/manifest.toml", "specs/gates.toml"]gate_weakening_requires_approval = truetest_deletion_requires_approval = trueFields
Section titled “Fields”| Section | Field | Type | Description |
|---|---|---|---|
| project | name | string | Project identifier |
| project | description | string | Short description |
| project | repo_type | enum | library, binary, or workspace |
| project | domain | string | What the project does |
| preferences | naming_convention | enum | kebab_case or snake_case |
| preferences | conformance_style | enum | trait_based or factory_based |
| policy | ai_may_edit | string[] | Glob patterns AI may freely edit |
| policy | ai_requires_review | string[] | Glob patterns requiring review |
| policy | ai_protected | string[] | Glob patterns AI must not edit |
| policy | gate_weakening_requires_approval | bool | Require approval for gate weakening |
| policy | test_deletion_requires_approval | bool | Require approval for test deletion |
Contract TOML
Section titled “Contract TOML”Location: specs/contracts/<id>.toml
See Contracts for the full field reference and example.
Top-level fields: schema_version, id, title, status, stability, scope, capabilities, non_goals, implementation_notes, test_expectations, created_at, updated_at.
Array-of-table sections:
[[invariants]]—id,description,severity(required/advisory)[[required_semantics]]—id,description,test_tags[[forbidden_semantics]]—id,description,test_tags[[edge_cases]]—id,scenario,expected_behavior[[examples]]—title,description,code(optional)[[history]]—version,date,description,author
Scoring Model TOML
Section titled “Scoring Model TOML”Location: specs/scoring/model.toml
schema_version = "1.0"
[[dimensions]]id = "correctness"label = "Correctness"weight = 30category = "required" # required | scored | advisorysource = "gate" # gate | test_suite | coverage | manual
[thresholds]pass = 0.8warn = 0.6Dimension Fields
Section titled “Dimension Fields”| Field | Type | Description |
|---|---|---|
id | string | Unique identifier |
label | string | Human-readable name |
weight | u32 | Weight in score calculation |
category | enum | required, scored, or advisory |
source | enum | gate, test_suite, coverage, or manual |
Threshold Fields
Section titled “Threshold Fields”| Field | Type | Default | Description |
|---|---|---|---|
pass | f64 | 0.8 | Score at or above = Pass |
warn | f64 | 0.6 | Score at or above but below pass = Warn |
Gates TOML
Section titled “Gates TOML”Location: specs/gates.toml
schema_version = "1.0"
[[gates]]id = "fmt"label = "Format Check"command = "cargo fmt -- --check"category = "required" # required | scored | advisorytimeout_secs = 60allow_skip = falseGate Fields
Section titled “Gate Fields”| Field | Type | Description |
|---|---|---|
id | string | Unique identifier |
label | string | Human-readable name |
command | string | Shell command to execute |
category | enum | required, scored, or advisory |
timeout_secs | u64? | Timeout in seconds (optional) |
allow_skip | bool | Whether the gate may be skipped |
Audit Record JSON
Section titled “Audit Record JSON”Location: .lexicon/audit/<timestamp>-<uuid>.json
{ "schema_version": "1.0", "id": "550e8400-e29b-41d4-a716-446655440000", "action": "verify_run", "actor": "system", "before_hash": null, "after_hash": null, "delta_summary": "Verify: 4 gates, 4 passed", "score_before": null, "score_after": 0.925, "gates_passed": true, "timestamp": "2025-01-15T12:00:00Z"}See Audit Records for field descriptions.