- Python 100%
| archive | ||
| control | ||
| experiments | ||
| fixtures/source_images | ||
| runs | ||
| tests | ||
| tools | ||
| .gitignore | ||
| AGENTS.md | ||
| pytest.ini | ||
| README.md | ||
| requirements-dev.txt | ||
| requirements.txt | ||
SketchExtract Codex Control Pack v0.1
This control pack defines the first agentic workflow for converting an arbitrary floor-plan image into a reviewable CAD reconstruction.
The user does not have to follow SketchMark or any special symbol language.
Primary input classes:
- hand-drawn floor plans;
- BTI / cadastral / inventory-style plans;
- scanned or photographed architectural plans;
- PDF or screenshot floor plans.
Primary target:
- reconstruct the area of interest (AOI);
- preserve auxiliary enclosed spaces inside or adjacent to the AOI;
- recognize walls and wall geometry;
- recognize openings;
- bind each opening to its host wall;
- distinguish doors, including double-leaf doors;
- identify windows / viewing-window candidates;
- interpret written dimensions and wall-thickness information;
- reconstruct metric geometry;
- produce an editable CAD-ready layout;
- record every uncertainty, assumption, default and conflict in a reconstruction legend.
Core operating model
The model performs the interpretation. Each major stage writes durable artifacts to disk.
Reasoning between stages is disposable. Stage artifacts are durable.
A later stage should read the smallest set of earlier artifacts it needs. The final aggregation stage rereads the summaries and authoritative artifacts before producing the final model.
Pipeline
source image
↓
01 global scene scan
↓
02 AOI selection
↓
03 focused AOI interpretation
↓
04 opening + annotation interpretation
↓
05 constraint model
↓
06 metric reconstruction
↓
07 validation / focused reinspection / reconciliation
↓
08 final aggregation + CAD preparation
Important separation
Three kinds of information must remain distinguishable:
- Observed — directly visible in the source.
- Inferred — interpreted from visible evidence and context.
- Defaulted / assumed — introduced by a domain rule because the source does not state the value.
A default or assumption must never be silently presented as an observation.
Output philosophy
The goal is a useful editable drawing, not perfect autonomous certainty.
When the model cannot resolve an ambiguity reliably, it should:
- choose no value if the ambiguity is material;
- preserve the competing hypotheses;
- write the issue into the reconstruction legend;
- optionally produce a best-effort CAD preview only when the uncertain choice is clearly marked.
See:
control/methodologies/floor_plan_reconstruction_v1.mdcontrol/profiles/ct_room_profile_v1.mdcontrol/templates/run_layout.md
Repository interaction modes
Development work follows AGENTS.md and remains in DEVELOPMENT MODE. Pipeline execution
is explicit and follows this chain:
AGENTS.md → control/AGENT_EXECUTION.md → playbook → methodology → skills
→ contracts → tools → runs
control/ is the canonical pipeline control plane. tools/ contains deterministic support
utilities. tests/ is development/test infrastructure. experiments/ contains current
non-canonical experiments, while archive/ contains historical evidence only. fixtures/
contains reusable example inputs. runs/ contains generated execution artifacts and is not
control-plane source.
Development checks
Install dependencies with .venv/bin/python -m pip install -r requirements-dev.txt,
then run pytest -q. Before verified materialization, run
.venv/bin/python tools/control_preflight.py <run-dir> --mode reconstruct-and-materialize.