A California residential permit-drawing skeleton — detached ADU or single-family house, 14 to 18 sheets — from one JSON file (or one guided conversation) to editable DXF, a title-blocked PDF set, and a 3D model, in seconds.
California counties publish free "pre-approved" ADU plans and describe them, in their own words, as approximately 85% complete — the drafter finishes and stamps. CodeFrame generates a skeleton with the same sheet index as those county standard plans for your project's geometry: deterministic, dimensioned, editable. You keep the judgment, the liability, and the client.
For the contractor who builds it, the same config yields a Takeoff Skeleton: the quantities that are arithmetic on the stated values, each traced to its fields, with everything the config does not state marked BY CONTRACTOR — not an estimate, not a bid.
One command emits the sheet list a CA plan checker expects — the same skeleton the LA / San Diego County pre-approved sets use:
| Sheet | Contents |
|---|---|
| A0.0 Cover Sheet | Project data with lot coverage, owner/contact band, applicable codes with the stated code cycle, design criteria, deferred submittals, sheet index, vicinity-map box |
| A0.1 General Notes | Code references, drafting conventions, project notes, titled note blocks, area summary |
| A0.2 Code Compliance | Requirement vs. provided vs. status, computed from stated values (egress, ceiling height, smoke/CO, attic vent) |
| A1.0 Site Plan | Lot, setbacks, existing structures, stated driveway and walks, sewer lateral, meters and service drop, placement dims, north arrow, graphic scale, impervious/pervious area table |
| A2.0 Floor Plan | Dimension chains, clear room dims, bath-fixture dims, doors by style (swing, bifold, slider, pocket), schedule tags, fixtures, smoke/CO symbols, egress callouts, room labels with size / ceiling / area, wall poché by stud type with a legend, keynote tags; door and window schedules beside the plan; a notes column with sheet notes and the keynote legend |
| A2.1 Electrical Plan | Only when devices are stated: the plan with ghosted fixtures under receptacle, switch, light, fan and panel symbols at stated points, smoke/CO alarms, a legend; no circuiting |
| A2.2 Plumbing Plan | Only when pipe runs are stated: cold, hot, waste, vent and gas runs on their own linetypes with stated sizes, cleanouts, hose bibbs, vents through roof, meters and points of connection, a legend; no sizing, no isometric |
| A2.3 Mechanical Plan | Only when equipment or ducts are stated: furnace, water heater, condenser, fans and hood, supply/return ducts hidden in the attic with registers, exhaust, dryer, flue and refrigerant runs to their roof jacks, wall caps and flue caps, a legend; no airflow or duct design |
| A3.0 / A3.1 Elevations | Two per sheet: TOP PLATE and FINISHED FLOOR datums, FINISHED GRADE as the heaviest line, plate and ridge dims, door head dim, framed openings with sash lines from the stated window style, fascia band, stucco / siding / board-and-batten finish, shingle or standing-seam roofing, gable vents, marks under every opening, keynote tags |
| A4.0 Roof Plan | Outline, ridge, slope callouts, stated roof and ridge vents, attic ventilation calc (required area computed; provided summed from stated net free areas, else BY DRAFTER) |
| A5.0 Schedules | Door and window schedules with deterministic marks, feet-inches sizes — only when they would not fit beside or under the floor plan |
| A6.0 Sections | Transverse cuts keyed to the floor plan: room names, double plates, slab and footings in concrete stipple with earth beside them when a foundation is stated |
| S0.0 Structural Notes | Design basis, conventional-construction path (CRC R301.1.3) |
| S1.0 Foundation Plan | Slab-on-grade footings, hold-downs, grid bubbles, ghosted fixtures, split-circle callouts to the S3 details, stated braced-wall panels with tags and a schedule skeleton, anchor-bolt and vapor-retarder notes |
| S2.0 Roof Framing Plan | Rafter/truss layout with span arrow and callouts, grid bubbles, stated header sizes at openings; deferred-submittal note for trusses |
| S3.0 / S3.1 Typical Details | Slab-edge footing, bearing footing, hold-down, eave (hurricane tie) and ridge connections, header at openings, garage separation at the slab step, slab edge at the garage door — six a sheet, drawn from your stated values, sizes BY DRAFTER |
Every DXF is editable model-space geometry on conventional layers; the PDF is Arch D sheets at true architectural scales with a right-edge title strip (firm block, project data, revisions, stamp box, sheet number); a STEP 3D massing model rides along for owner communication. Every sheet is stamped PRELIMINARY — NOT FOR CONSTRUCTION.
A complete generated set is committed at
examples/sample-output/poppy-1br/ —
open the PDF and judge for yourself.
| Example | Program | Mirrors |
|---|---|---|
manzanita_studio_adu.json |
400 sf studio, rafter roof | Sacramento Shelf-Ready Studio scale |
poppy_one_bedroom_adu.json |
748 sf 1BR, trussed — sized under the 750 sf impact-fee threshold | San Jose pre-approved program scale |
sequoia_two_bedroom_adu.json |
800 sf 2BR, egress in both bedrooms | LA County Standard Plan C scale |
madrone_three_bedroom_house.json |
1,800 sf 3BR/2BA house with an attached 2-car garage, gas furnace and water heater in the garage, plumbing and mechanical plans, 18 sheets | A California tract house on a 50 x 100 lot |
python -m codeframe generate examples/poppy_one_bedroom_adu.jsonCodeFrame is two layers with a hard boundary (terms in
CONTEXT.md):
- Agent Layer — a Claude Code skill that interviews you about the project, writes the Project Config, and runs generation. It never draws geometry.
- Deterministic Core — a plain Python package that turns a Project Config into drawings with no AI involvement. Same input, byte-identical output, pinned by golden tests. Runs standalone from the CLI.
The Project Config (one JSON file) is the single source of truth. Geometry is always explicit — footprint, wall positions, opening offsets, hold-down points, member sizes — never inferred, never auto-laid-out, never sized by the tool. If a dimension isn't stated, CodeFrame won't invent it. Corrections happen by editing the config and regenerating, so the drawings and the record of intent never drift apart.
generate writes one DXF per view, drawing_set.pdf (Arch D sheets with
title blocks), drawing_set.dxf (the same sheets as paperspace layouts
over one model space, for editing the set in CAD), and model_3d.step
when FreeCAD is installed. takeoff writes takeoff.csv and
takeoff.json from the same config for the Contractor: slab and footing
volumes, studs at the stated spacing, rafters as the framing plan lays
them out, net wall and roof areas, doors and windows by size, pipe and
duct lengths along the stated runs — and a BY CONTRACTOR line, with the
reason, for anything the config does not state.
Requires Python 3.11+. FreeCAD is optional (enables the 3D model).
git clone https://github.com/vicenteliu/CodeFrame.git
cd CodeFrame
python -m pip install -e ".[dev]"
python -m codeframe validate examples/poppy_one_bedroom_adu.json
python -m codeframe check examples/poppy_one_bedroom_adu.json # advisory layout warnings
python -m codeframe generate examples/poppy_one_bedroom_adu.json
open outputs/poppy-1br/drawing_set.pdf
python -m codeframe takeoff examples/poppy_one_bedroom_adu.json # quantities from stated valuesThe interview workflow lives in skills/codeframe-drawings/; it depends on the
layout-review gate in skills/codeframe-layout-review/. The contractor's
walk through the takeoff is skills/codeframe-takeoff/:
mkdir -p .claude/skills
ln -s ../../skills/codeframe-drawings .claude/skills/codeframe-drawings
ln -s ../../skills/codeframe-layout-review .claude/skills/codeframe-layout-review
ln -s ../../skills/codeframe-takeoff .claude/skills/codeframe-takeoff
claude # then: "I need permit drawings for a backyard studio"
# or: "what does the Poppy set call for?"Deliberately narrow so that what it does generate is dependable:
- California detached ADUs and accessory structures — single story, wood frame, rectangular footprint, gable roofs.
- Structural sheets are prescriptive-path skeletons: all member and footing sizes are your inputs, drawn and annotated, never calculated. Braced-wall design, structural calcs, Title 24, and MEP stay with you and your consultants.
- Geometry checks only. The code-compliance sheet is arithmetic on stated values with CRC citations — useful triage, not an approval.
CodeFrame is looking for 1–3 practicing California ADU drafters or designers to run it on a real project. You get the generated skeleton and direct support; we get to find out where it saves you time and where it falls short. Open a GitHub issue with a sentence about your practice to get started.
pytest # full suite; FreeCAD-dependent tests skip if absent
UPDATE_GOLDEN=1 pytest # bless intentional output changesCONTEXT.md Ubiquitous language (canonical domain terms)
docs/ Vision, architecture, roadmap, ADRs, research, disclaimer
examples/ Example Project Configs + a committed sample output set
skills/ Agent Layer (Claude Code skills)
src/codeframe/ Deterministic Core (Python package)
tests/ Test suite incl. golden DXF/PDF/STEP snapshots
Feature work follows the developer skill in skills/codeframe-feature/
(grill, one commit per item, goldens, page-through, docs in step); reading
a real drawing set for what to borrow follows skills/codeframe-reference-audit/
(register, inventory, measure against the regenerated flagship, propose).
Architecture decisions live in docs/adr/; the market/requirements survey
behind the sheet index is in
docs/research/2026-07-09-pilot-appeal-survey.md.
Pre-alpha, under active development. CodeFrame is not a licensed design
professional and its outputs are not permit sets or construction
documents — a qualified professional must review, complete, and take
responsibility for every drawing before any use. See
docs/disclaimer.md.
Source-available for evaluation; all rights reserved. Licensing undecided —
see LICENSE.



