Skip to content

Schemas

Location: .lexicon/manifest.toml

schema_version = "1.0"
[project]
name = "my-lib"
description = "A Rust library"
repo_type = "library" # library | binary | workspace
domain = "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_case
conformance_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 = true
test_deletion_requires_approval = true
SectionFieldTypeDescription
projectnamestringProject identifier
projectdescriptionstringShort description
projectrepo_typeenumlibrary, binary, or workspace
projectdomainstringWhat the project does
preferencesnaming_conventionenumkebab_case or snake_case
preferencesconformance_styleenumtrait_based or factory_based
policyai_may_editstring[]Glob patterns AI may freely edit
policyai_requires_reviewstring[]Glob patterns requiring review
policyai_protectedstring[]Glob patterns AI must not edit
policygate_weakening_requires_approvalboolRequire approval for gate weakening
policytest_deletion_requires_approvalboolRequire approval for test deletion

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

Location: specs/scoring/model.toml

schema_version = "1.0"
[[dimensions]]
id = "correctness"
label = "Correctness"
weight = 30
category = "required" # required | scored | advisory
source = "gate" # gate | test_suite | coverage | manual
[thresholds]
pass = 0.8
warn = 0.6
FieldTypeDescription
idstringUnique identifier
labelstringHuman-readable name
weightu32Weight in score calculation
categoryenumrequired, scored, or advisory
sourceenumgate, test_suite, coverage, or manual
FieldTypeDefaultDescription
passf640.8Score at or above = Pass
warnf640.6Score at or above but below pass = Warn

Location: specs/gates.toml

schema_version = "1.0"
[[gates]]
id = "fmt"
label = "Format Check"
command = "cargo fmt -- --check"
category = "required" # required | scored | advisory
timeout_secs = 60
allow_skip = false
FieldTypeDescription
idstringUnique identifier
labelstringHuman-readable name
commandstringShell command to execute
categoryenumrequired, scored, or advisory
timeout_secsu64?Timeout in seconds (optional)
allow_skipboolWhether the gate may be skipped

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.