Demo: City Plan Review
Run a city-side ADU plan review locally. You are a city plan checker reviewing an ADU permit submittal for code compliance.
How to Invoke
The user provides:
- Plan binder — either a PDF path or a directory of pre-extracted PNGs
- City name — e.g., "Placentia", "Buena Park", "Long Beach"
- (Optional) Project address
Example invocations:
- "Review this ADU plan set for Placentia:
test-assets/city-flow/mock-session/pages-png/"
- "Run city review on
test-assets/01-extract-test/pages-png/ for Buena Park"
- "Review
path/to/plans.pdf for the City of Long Beach"
Input Resolution
Determine what the user gave you:
If a directory of PNGs (e.g., pages-png/page-01.png, page-02.png, ...):
- Use directly. Skip PDF extraction.
- Check for pre-existing
sheet-manifest.json in the same directory or parent. If found, load it and skip manifest building.
- Check for pre-existing
title-blocks/ directory. If found, use those for manifest building.
If a PDF file:
Output Directory
Create demo-output/city-review-<city>-<timestamp>/ in the workspace root. All output files go here.
Workflow
Phase 1: Sheet Manifest (~30-90 sec)
Follow the adu-targeted-page-viewer skill workflow:
- Read page 1 (cover sheet) visually. Extract the sheet index.
- If page count matches index count, map 1:1 in order.
- If mismatch, read title blocks to resolve (crop bottom-right 20% of each page, or use pre-cropped title blocks if available).
- Write
sheet-manifest.json to the output directory.
Phase 2: Sheet-by-Sheet Review (~3-5 min)
Review sheets in parallel using subagents. Group by discipline:
Subagent A — Administrative + Architectural:
- Cover sheet (CS): stamps, signatures, governing codes list, sheet index accuracy, project data
- Floor plan (A-series): room dimensions, fixture counts, egress, accessibility
Subagent B — Site + Civil:
- Site plan: setbacks, lot coverage, FAR, parking, utility connections shown, easements
- Grading/drainage: slopes shown, drainage direction, "For Reference Only" stamp
Subagent C — Elevations + Fire/Life Safety:
- Elevations: height compliance, fire separation distance (< 5' from property line = 1-hour rated), roof plan consistency
- Building sections: insulation, foundation-to-wall connection
Launch all three concurrently. Each subagent reads the relevant PNGs and produces findings.
For each finding, record:
check: What was checked
status: PASS | FAIL | UNCLEAR | NOT_APPLICABLE
confidence: HIGH | MEDIUM | LOW
observation: What was actually seen on the plan
code_ref: Code section (CRC, CBC, Gov. Code, municipal code)
sheet_id and page_number
Write all findings to sheet_findings.json.
Phase 3: Code Verification (concurrent, ~60-90 sec)
Launch two parallel subagents:
3A — State Law Verification:
- Load reference files from
adu-skill-development/skill/california-adu/references/
- For each FAIL and UNCLEAR finding, verify the code citation
- Check for ADU-specific exceptions (Gov. Code § 66310-66342)
- Write
state_compliance.json
3B — City Rules:
- Check if
adu-skill-development/skill/<city-slug>-adu/ exists
- If yes (onboarded city): Load the city skill reference files. Fast, offline.
- If no: Run the
adu-city-research skill — Discovery (WebSearch) then Extraction (WebFetch)
- Check findings against city-specific amendments, standard details, IBs
- Write
city_compliance.json
Phase 4: Draft Corrections Letter (~2 min)
Merge all inputs and generate the corrections letter:
For each finding, apply the filter:
- Confirmed by code → include with citation
- Confirmed but LOW visual confidence → include with
[VERIFY] flag
- No code basis found → drop it (no false positives)
- Structural/engineering adequacy →
[REVIEWER: ...] blank for human
- Subjective judgment → drop it (prohibited for ADUs per Gov. Code § 66314(b)(1))
Write two outputs:
draft_corrections.json — structured, each item with code citation, confidence, reviewer_action
draft_corrections.md — formatted markdown corrections letter ready to read
Write review_summary.json — stats on items found, confidence breakdown, coverage
Phase 5: Present Results
After all phases complete, present to the user:
- Summary: how many items found, confidence breakdown
- The full
draft_corrections.md content
- Note which items need
[VERIFY] or [REVIEWER] attention
- List output files written
Key Rules
- No false positives. Drop findings without code basis. It's better to miss something than to flag something incorrectly.
- Reviewer blanks > AI guesses. For structural and engineering items, use
[REVIEWER: ...] instead of guessing.
- Objective standards only. ADUs can only be subject to objective, measurable standards (Gov. Code § 66314(b)(1)). Never flag subjective design issues.
- State preemption. If a city rule is more restrictive than state law, flag the conflict — state law prevails.
- Two confidence dimensions. Report both code confidence (is this legally required?) and visual confidence (am I correct about what I see?).
Test Data
Ready-to-use test data for demos:
| Test Set |
City |
Path |
| 1232 N Jefferson |
Placentia |
test-assets/city-flow/mock-session/pages-png/ (15 pages, title blocks in ../title-blocks/) |
| Same project |
Placentia |
test-assets/01-extract-test/pages-png/ (15 pages, same project) |
Pre-built mock session data (for comparison): test-assets/city-flow/mock-session/sheet-manifest.json
Sub-Skills Referenced
| Skill |
Location |
Role |
adu-targeted-page-viewer |
adu-skill-development/skill/adu-targeted-page-viewer/ |
PDF extraction + sheet manifest |
california-adu |
adu-skill-development/skill/california-adu/ |
State law (28 reference files) |
adu-city-research |
.claude/skills/adu-city-research/ |
Web research for non-onboarded cities |
placentia-adu |
adu-skill-development/skill/placentia-adu/ |
Placentia-specific rules (onboarded) |
buena-park-adu |
adu-skill-development/skill/buena-park-adu/ |
Buena Park-specific rules (onboarded) |
1---2name: demo-city-review3description: Local demo: City-side ADU plan review. Point this at a plan binder (PDF or pre-extracted PNGs) and a city name. It reviews the plans sheet-by-sheet against state and city code, then generates a draft corrections letter. Fire-and-forget — no human-in-the-loop pause. Triggers on: 'Review this ADU plan set for [City]' or 'Run the city review on [path]'.4---56# Demo: City Plan Review78Run a city-side ADU plan review locally. You are a city plan checker reviewing an ADU permit submittal for code compliance.910## How to Invoke1112The user provides:131. **Plan binder** — either a PDF path or a directory of pre-extracted PNGs142. **City name** — e.g., "Placentia", "Buena Park", "Long Beach"153. (Optional) **Project address**1617Example invocations:18- "Review this ADU plan set for Placentia: `test-assets/city-flow/mock-session/pages-png/`"19- "Run city review on `test-assets/01-extract-test/pages-png/` for Buena Park"20- "Review `path/to/plans.pdf` for the City of Long Beach"2122## Input Resolution2324Determine what the user gave you:2526**If a directory of PNGs** (e.g., `pages-png/page-01.png`, `page-02.png`, ...):27- Use directly. Skip PDF extraction.28- Check for pre-existing `sheet-manifest.json` in the same directory or parent. If found, load it and skip manifest building.29- Check for pre-existing `title-blocks/` directory. If found, use those for manifest building.3031**If a PDF file**:32- Check if `pdftoppm` is installed: `which pdftoppm`33- If not: `brew install poppler` (macOS) or tell the user to install it34- Extract pages: create a `pages-png/` directory next to the PDF and run:35 ```36 pdftoppm -png -r 200 "<input.pdf>" "<output-dir>/pages-png/page"37 ```38- Rename outputs to `page-01.png`, `page-02.png`, etc. (pdftoppm outputs `page-01.png` format already with the prefix)3940## Output Directory4142Create `demo-output/city-review-<city>-<timestamp>/` in the workspace root. All output files go here.4344## Workflow4546### Phase 1: Sheet Manifest (~30-90 sec)4748Follow the `adu-targeted-page-viewer` skill workflow:49501. Read page 1 (cover sheet) visually. Extract the sheet index.512. If page count matches index count, map 1:1 in order.523. If mismatch, read title blocks to resolve (crop bottom-right 20% of each page, or use pre-cropped title blocks if available).534. Write `sheet-manifest.json` to the output directory.5455### Phase 2: Sheet-by-Sheet Review (~3-5 min)5657Review sheets in parallel using subagents. Group by discipline:5859**Subagent A — Administrative + Architectural:**60- Cover sheet (CS): stamps, signatures, governing codes list, sheet index accuracy, project data61- Floor plan (A-series): room dimensions, fixture counts, egress, accessibility6263**Subagent B — Site + Civil:**64- Site plan: setbacks, lot coverage, FAR, parking, utility connections shown, easements65- Grading/drainage: slopes shown, drainage direction, "For Reference Only" stamp6667**Subagent C — Elevations + Fire/Life Safety:**68- Elevations: height compliance, fire separation distance (< 5' from property line = 1-hour rated), roof plan consistency69- Building sections: insulation, foundation-to-wall connection7071Launch all three concurrently. Each subagent reads the relevant PNGs and produces findings.7273For each finding, record:74- `check`: What was checked75- `status`: PASS | FAIL | UNCLEAR | NOT_APPLICABLE76- `confidence`: HIGH | MEDIUM | LOW77- `observation`: What was actually seen on the plan78- `code_ref`: Code section (CRC, CBC, Gov. Code, municipal code)79- `sheet_id` and `page_number`8081Write all findings to `sheet_findings.json`.8283### Phase 3: Code Verification (concurrent, ~60-90 sec)8485Launch two parallel subagents:8687**3A — State Law Verification:**88- Load reference files from `adu-skill-development/skill/california-adu/references/`89- For each FAIL and UNCLEAR finding, verify the code citation90- Check for ADU-specific exceptions (Gov. Code § 66310-66342)91- Write `state_compliance.json`9293**3B — City Rules:**94- Check if `adu-skill-development/skill/<city-slug>-adu/` exists95 - **If yes** (onboarded city): Load the city skill reference files. Fast, offline.96 - **If no**: Run the `adu-city-research` skill — Discovery (WebSearch) then Extraction (WebFetch)97- Check findings against city-specific amendments, standard details, IBs98- Write `city_compliance.json`99100### Phase 4: Draft Corrections Letter (~2 min)101102Merge all inputs and generate the corrections letter:1031041. For each finding, apply the filter:105 - Confirmed by code → **include** with citation106 - Confirmed but LOW visual confidence → include with `[VERIFY]` flag107 - No code basis found → **drop it** (no false positives)108 - Structural/engineering adequacy → `[REVIEWER: ...]` blank for human109 - Subjective judgment → **drop it** (prohibited for ADUs per Gov. Code § 66314(b)(1))1101112. Write two outputs:112 - `draft_corrections.json` — structured, each item with code citation, confidence, reviewer_action113 - `draft_corrections.md` — formatted markdown corrections letter ready to read1141153. Write `review_summary.json` — stats on items found, confidence breakdown, coverage116117### Phase 5: Present Results118119After all phases complete, present to the user:120- Summary: how many items found, confidence breakdown121- The full `draft_corrections.md` content122- Note which items need `[VERIFY]` or `[REVIEWER]` attention123- List output files written124125## Key Rules126127- **No false positives.** Drop findings without code basis. It's better to miss something than to flag something incorrectly.128- **Reviewer blanks > AI guesses.** For structural and engineering items, use `[REVIEWER: ...]` instead of guessing.129- **Objective standards only.** ADUs can only be subject to objective, measurable standards (Gov. Code § 66314(b)(1)). Never flag subjective design issues.130- **State preemption.** If a city rule is more restrictive than state law, flag the conflict — state law prevails.131- **Two confidence dimensions.** Report both code confidence (is this legally required?) and visual confidence (am I correct about what I see?).132133## Test Data134135Ready-to-use test data for demos:136137| Test Set | City | Path |138|----------|------|------|139| 1232 N Jefferson | Placentia | `test-assets/city-flow/mock-session/pages-png/` (15 pages, title blocks in `../title-blocks/`) |140| Same project | Placentia | `test-assets/01-extract-test/pages-png/` (15 pages, same project) |141142Pre-built mock session data (for comparison): `test-assets/city-flow/mock-session/sheet-manifest.json`143144## Sub-Skills Referenced145146| Skill | Location | Role |147|-------|----------|------|148| `adu-targeted-page-viewer` | `adu-skill-development/skill/adu-targeted-page-viewer/` | PDF extraction + sheet manifest |149| `california-adu` | `adu-skill-development/skill/california-adu/` | State law (28 reference files) |150| `adu-city-research` | `.claude/skills/adu-city-research/` | Web research for non-onboarded cities |151| `placentia-adu` | `adu-skill-development/skill/placentia-adu/` | Placentia-specific rules (onboarded) |152| `buena-park-adu` | `adu-skill-development/skill/buena-park-adu/` | Buena Park-specific rules (onboarded) |