CodexPermit

Machine-readable interpretation of municipal land-use codes.

What this is

CodexPermit is a research effort building a hybrid symbolic-neural system that reads municipal land-use and building codes into a verified structured representation, then evaluates permit applications against that representation with citation-grounded outputs. The goal is a tool a planning department can use for first-pass application review: faster than manual triage, defensible under administrative appeal.

Status

Active research prototype. Not generally available. Currently developing with a design-partner jurisdiction in Washington State.

For planning departments

If you run a planning or community development department and would like to follow this work or discuss a future pilot, get in touch: hello@codexpermit.com.

About

CodexPermit is a project of Freewave.dev.

Technical preview

How it works

The figures and examples below describe intended system behavior. Code ingestion (Step 1) is in active development against San Juan County, Washington as our design-partner jurisdiction. Steps 2 and 3 are research targets for our planned Phase I work.

1. The problem

Municipal land-use codes are not structured data. They are dense prose with deep cross-reference. A single rule about a building setback, for example, typically depends on at least four other parts of the same code: a definition of the parcel feature it measures from, a land-use designation that selects the base value, a performance standard that may modify it, and one or more overlay districts that exempt or extend it.

Take San Juan County, Washington, as a representative example. Title 18 of the County Code — the Unified Development Code — organizes land-use rules across these chapters:

SJCC §18.10 Introductory Provisions SJCC §18.20 Definitions SJCC §18.30 Land Use Designations SJCC §18.35 Overlay District Regulations ← critical areas, mineral resource lands, airport, fairgrounds SJCC §18.40 Performance and Use-Specific Standards SJCC §18.50 Shoreline Master Program SJCC §18.60 Development Standards ← setbacks, dimensional standards (§18.60.050) SJCC §18.70 Land Divisions SJCC §18.90 Legislative Actions & Site-Specific Redesignations

The setback rules in §18.60.050 illustrate the cross-reference problem clearly. Measurement of a road setback depends on whether the parcel falls inside or outside an "activity center" — outside, the measurement runs from the centerline of the existing road; inside, from the margin line of the right-of-way. Determining which applies requires resolving definitions in Chapter 18.20, the land-use designation in Chapter 18.30, and any modifying performance standard in Chapter 18.40. Overlay districts in Chapter 18.35 (critical areas) and Chapter 18.50 (shoreline) can further alter the result, and Eastsound-specific standards live separately in §18.60.240.

A planner doing first-pass review on a routine application performs this resolution by hand — reading across multiple chapters, holding the conditional logic in working memory, and producing a verdict (approve, deny, or request revision) along with a written rationale that cites the rules applied. The work is repetitive, error-prone under time pressure, and grows slower the more amendments the code accumulates.

Why current AI tools fail at this. Off-the-shelf large language models produce confident-sounding answers about code questions but routinely cite sections that don't exist or hallucinate rule text. For a decision that can be appealed to a hearing examiner, a confident wrong answer is materially worse than no answer.

2. Step 1: Code ingestion

The first stage of CodexPermit converts a jurisdiction's code from unstructured text into a structured rule representation. Each rule is extracted with its conditions, its cross-references resolved end-to-end, its inherited definitions linked, and — critically — a verbatim citation preserved for every assertion.

Municipal code (unstructured) Ingestion Step 1 Structured representation (rules + citations) Evaluation Step 2 Verdict + citations Permit application
The CodexPermit pipeline. Step 1 (Ingestion) runs once per jurisdiction and produces a reusable structured representation; Step 2 (Evaluation) runs per application.

The output of ingestion, for a single rule, looks roughly like this:

{ "rule_id": "SJCC-18.60.050-setback-road-base", "source_citation": "SJCC §18.60.050", "verbatim_text": "...", "conditions": [ { "field": "in_activity_center", "operator": "=", "value": false, "definition_source": "SJCC §18.30" } ], "measurement": { "from": "centerline_of_existing_road", "definition_source": "SJCC §18.20" }, "modifiers": [ { "source_citation": "SJCC §18.40", "applies_when": "use_is_telecommunications_facility" } ], "exemptions": [ { "source_citation": "SJCC §18.60.050", "applies_to": ["fences", "mailboxes", "wells", "pump_houses", "septic_drainfields"] } ] }

3. Step 2: Application evaluation

Given an incoming permit application and the structured representation produced in Step 1, Step 2 evaluates the application against the applicable rules and produces a verdict together with a full citation chain. Consider a worked example.

Permit application — illustrative

Parcel
Orcas Island, outside Eastsound UGA
Proposed use
Detached accessory workshop
Footprint
240 sq ft
Height
14 ft to ridge
Road setback (proposed)
15 ft from existing road centerline
Shoreline?
Parcel does not abut marine shoreline

The evaluation walks the structured rule, resolves each condition against the application's data, applies modifiers in order, and assembles a verdict with citations.

Verdict
Needs revision — proposed setback below required minimum
  1. Parcel is outside an activity center. Per SJCC §18.30, the Eastsound UGA boundary excludes this parcel. Measurement therefore runs from the existing road centerline rather than the right-of-way margin (SJCC §18.60.050).
  2. Applicable base setback. For the parcel's land-use designation, SJCC §18.60.050 requires a road setback of at least [N] feet from centerline. The proposed 15 ft is below this minimum.
  3. Use-specific modifier. No modifier in SJCC §18.40 applies to a detached accessory workshop of this footprint and height.
  4. Exemptions checked, none applicable. The accessory workshop is not in the exempt category list (SJCC §18.60.050: fences, mailboxes, wells, pump houses, septic drainfields).
  5. Overlays checked. Parcel does not abut marine shoreline; no shoreline overlay applies under SJCC §18.50. Critical-area overlay under SJCC §18.35 requires a separate determination not derivable from the application as submitted — routed to human review.

The verdict is not "rejected." It is "needs revision, here is precisely why, here is what the applicant must change, and here is the one question that requires a human." A planner reviewing this output can confirm the citation chain in seconds rather than rebuilding it from scratch.

4. Step 3: Audit and appeal defense

The hardest part of this problem is not generating an answer. It is generating an answer that survives appeal. CodexPermit's design treats audit as a first-class concern, not an afterthought.

Verdict: needs revision cited by 5 rules below Activity center? SJCC §18.30 Base setback SJCC §18.60.050 Use modifier SJCC §18.40 Exemptions SJCC §18.60.050 Critical area SJCC §18.35 Definition SJCC §18.20 "Centerline" SJCC §18.20
Each branch of the verdict expands into a specific cited rule; cited rules expand further into definitions or modifiers. The orange node indicates a determination the system defers to a human reviewer rather than guessing.

Three design choices make the system defensible under appeal:

  1. Every output traces to verbatim source. The structured representation produced in Step 1 stores citations alongside rule text. The evaluation engine in Step 2 cannot emit a conclusion that lacks a resolvable citation; any attempt to do so is treated as a hard error.
  2. Ambiguity is routed, not guessed. When an application's data cannot determine which branch of a rule applies — a vague narrative, a missing parcel attribute, a judgment term that depends on context the application does not carry — the rule is marked for human review rather than resolved by the model. Conservative routing is the system's default behavior.
  3. Adversarial inputs are stress-tested. Phase I evaluation includes a held-out set of deliberately ambiguous applications and edge cases drawn from real appeal decisions. The system's false-citation rate — the rate at which it produces a citation that does not resolve to verbatim source — is a measured quantity, targeted below 1%.

5. Where we are

CodexPermit is in early-stage development. Step 1 (code ingestion against the San Juan County Title 18 corpus) is the current active work. Steps 2 and 3, as described above, are the research targets for our planned Phase I project.

If you are a planning director, community development administrator, or municipal-code attorney with views on this approach — what would help, what concerns you, what failure modes we have not anticipated — we would welcome the conversation: hello@codexpermit.com.