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: [email protected].
About
CodexPermit is a project of Freewave.dev.
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:
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.
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.
The output of ingestion, for a single rule, looks roughly like this:
- Every clause carries a citation that resolves to verbatim source text.
- Cross-references (e.g. the "activity center" definition) are linked, not flattened.
- Use-specific modifiers and exemptions are kept as first-class structure so evaluation can show its work.
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.
- 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).
- 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.
- Use-specific modifier. No modifier in SJCC §18.40 applies to a detached accessory workshop of this footprint and height.
- 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).
- 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.
Three design choices make the system defensible under appeal:
- 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.
- 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.
- 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: [email protected].