Answers questions about construction drawings and shows where each answer came from. See SPEC.md and API.md.
uv sync --extra extract --extra app # full stack; plain `uv sync` is enough for the answer engine
uv run pytest # real-data tests skip when the preview is not downloaded
uv run python scripts/license_check.py # fails on AGPL/GPL dependencies
Q=data/preview/junction-dataset-preview/questions.jsonl
# Step 0
uv run python scripts/check_spec_numbers.py $Q
uv run python scripts/cubicasa_exclusion.py data/preview > excluded_ids.txt
# Scoreboard. Tune on train; held-out numbers are for the deck only.
uv run python scripts/coverage.py $Q --split train
uv run constructor-batch $Q --split train --details runs/train.jsonl
# App: API server on :8000, then the UI (see app/README.md)
uv run --extra extract --extra app uvicorn constructor.server:app --port 8000 --reload --reload-dir constructor
cd app && npm install && npm run devThe extractors cache one JSON per drawing in cache/, keyed by extractor VERSION. Bump VERSION in
constructor/extractors/<kind>.py whenever an extractor's output changes, or the old cache is served.
Model keys go in VERDA_INFERENCE_KEY (Nemotron) and GEMINI_API_KEY (Gemini; optional, improves
raster marks, question mapping and answer language), environment only, never in the repo. Paid
extraction runs only from the app's Prepare button or with constructor-batch --allow-paid; responses
are cached in cache/vlm/ and cache/gemini/, so reruns are free. constructor-batch --llm adds the
Gemini mapping fallback to the scoreboard.
From the repository root (keys are read from the environment, else from .instructions):
npm run backend # API on :8000, full dataset (CONSTRUCTOR_DATA overrides)
npm run frontend # app (Vite)
npm run dev # both
npm test # backend tests, frontend typecheck and tests