Local demo: Contractor corrections analysis and response — two-phase flow with a human-in-the-loop pause. Phase 1 reads the corrections letter, researches codes, views plan sheets, and generates questions for the contractor. The agent STOPS and presents questions to the user. After the user provides answers, Phase 2 generates the full response package (response letter, professional scope, corrections report, sheet annotations). Triggers on: 'Analyze these corrections' or 'Run the contractor flow on [path]'.
Run the contractor-side corrections analysis and response locally. You are helping a contractor understand and respond to a city corrections letter on their ADU permit.
This is a two-phase flow with a pause in the middle. Phase 1 produces questions. You STOP and present them. The user answers. Then Phase 2 generates deliverables.
The user provides:
Example invocations:
test-assets/corrections/. Plans: test-assets/01-extract-test/pages-png/"path/to/corrections-p1.png and path/to/corrections-p2.png. Plan binder: path/to/plans.pdf"Corrections letter:
Plan binder:
sheet-manifest.json and title-blocks/.pdftoppm -png -r 200 "<input.pdf>" "<output-dir>/pages-png/page"Create demo-output/contractor-<city>-<timestamp>/ in the workspace root. All output files go here.
Read the corrections letter pages visually. Extract:
Write corrections_parsed.json to output directory.
Run concurrently with Step 1.1.
Follow the adu-targeted-page-viewer skill workflow:
sheet-manifest.jsonAfter Steps 1.1 and 1.2 complete, launch three concurrent subagents:
Subagent A — State Law Researcher:
adu-skill-development/skill/california-adu/references/Subagent B — City Research:
adu-skill-development/skill/<city-slug>-adu/ exists
adu-city-research — WebSearch for URLs, then WebFetch to extract contentSubagent C — Sheet Viewer:
sheet_observations.jsonMerge all research and categorize each correction item:
| Category | Meaning |
|---|---|
AUTO_FIXABLE | Drafter fixes: labels, notes, formatting, checklists |
NEEDS_CONTRACTOR_INPUT | Requires specific facts from the contractor (pipe sizes, elevations, materials) |
NEEDS_PROFESSIONAL | Requires licensed professional work (structural calcs, fire-rated details, stamps) |
For each item, document:
Write corrections_categorized.json.
For NEEDS_CONTRACTOR_INPUT items, generate specific questions:
Write contractor_questions.json.
Also write state_law_findings.json (from Subagent A) and any city research files.
After Phase 1 completes, you MUST stop and wait for the user.
Present the results in this format:
Project: [address], [city] — [permit number] Corrections: [N] items parsed from [review round] Breakdown: [X] auto-fixable, [Y] need your input, [Z] need professional work
For each question group (organized by correction item):
Item [#] — [summary] [research context — why this matters, what the code says]
- [question text]
- Options: [if choice type]
- [question text] ...
Answer the questions above and I'll generate your response package.
You can also say:
test-assets/mock-session/contractor_answers.json)Wait for the user's response before proceeding to Phase 2.
Triggered when the user provides answers. Three ways this happens:
test-assets/mock-session/contractor_answers.jsonWrite contractor_answers.json to the output directory (even if loaded from mock).
Read all Phase 1 outputs from the output directory:
corrections_categorized.json — the backbone, read firstcontractor_answers.json — map answers to itemssheet-manifest.json — for sheet referencescorrections_parsed.json — for original wordingFollow the adu-corrections-complete skill specification. Generate all four:
1. response_letter.md — Professional letter to the building department
2. professional_scope.md — Work breakdown by professional
3. corrections_report.md — Status dashboard / checklist
4. sheet_annotations.json — Per-sheet markup instructions
After generating all deliverables, present to the user:
response_letter.md content (this is the main deliverable they care about)Ready-to-use test data for the Placentia demo project:
| Asset | Path |
|---|---|
| Corrections letter (2 pages) | test-assets/corrections/1232-n-jefferson-corrections-p1.png and p2.png |
| Plan pages (15 PNGs) | test-assets/01-extract-test/pages-png/ |
| Mock session data | test-assets/mock-session/ (all Phase 1 outputs pre-built) |
| Mock contractor answers | test-assets/mock-session/contractor_answers.json |
| Real agent output (comparison) | test-assets/correction-01/ |
Quick demo path (skips Phase 1, tests Phase 2 only):
test-assets/mock-session/"| 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 | .Codex/skills/adu-city-research/ | Web research for non-onboarded cities |
adu-corrections-complete | adu-skill-development/skill/adu-corrections-complete/ | Phase 2 output spec |
placentia-adu | adu-skill-development/skill/placentia-adu/ | Placentia-specific rules |
buena-park-adu | adu-skill-development/skill/buena-park-adu/ | Buena Park-specific rules |