Objective
Close the remaining generation-fidelity gap by giving CAD agents compact, calibrated drawing-to-candidate evidence and a bounded correction path, without weakening build123d-mcp's verified advantages in editing, validity, token cost, and runtime.
This epic is deliberately phased. Each phase must produce measured evidence and may be adopted, revised, or rejected independently. Do not proceed to a full benchmark sweep merely because an API or prompt is technically complete.
Why this is the next hypothesis
A controlled Opus 5 xhigh comparison found:
Metric
Official baseline / no MCP
build123d-mcp 0.3.81
Overall
0.627
0.639
Generation
0.631
0.596
Editing
0.621
0.706
Valid outputs
75/81
80/81
The generation deficit is concentrated. Six fixtures (102, 106, 116, 126, 145, 150) contribute +2.132 points to no-MCP while the net 49-fixture generation advantage is only +1.730; excluding those six, MCP is slightly ahead.
Trace review shows that the strongest no-MCP generations repeatedly:
calibrated drawing pixels from printed dimensions;
sampled complex silhouettes and undimensioned curves;
rendered matching orthographic projections;
overlaid candidate and reference views;
made global source rewrites when the representation was wrong.
Current MCP tools inspect the candidate itself. They do not provide a machine-readable, registered comparison between that candidate and the input drawing.
Prior work and lessons
This epic builds on, but must not repeat uncritically:
Design principles
Evidence, not verdicts. Do not return PASS, conforms, or an authoritative completion signal for drawing fidelity.
Drawing-derived and candidate-derived facts stay distinct. Never present model-inferred expectations as observations from the image.
Printed dimensions remain authoritative. Pixel calibration may estimate undimensioned geometry but must not override explicit callouts.
Compact output. Return the few largest actionable discrepancies, not raw CV dumps or unbounded contours.
Preserve model agency. MCP supplies measurements and controlled execution; the agent owns the design hypothesis.
Selective escalation. Normal generation remains lightweight. Global source rewrite or a second candidate is reserved for measured structural mismatch.
No benchmark-specific geometry. Fixture IDs belong only in evaluation plans, never runtime rules, skills, examples, or detector code.
No full sweep without a passed gate. Small paired tests precede broader validation.
Reference evaluation set
Use the existing frozen Opus 5 runs as historical baselines.
MCP-loss cases:
102, 106, 116, 126, 145, 150
MCP-winning controls:
The controls are mandatory: an intervention that improves complex contours by distracting the model on ordinary generation is not a success.
Phase 0 — Freeze evidence and contracts
Record exact baseline submissions, MCP version, model, effort, prompts, scores, validity, runtime, token usage, and per-fixture results.
Classify the 11 fixtures by dominant geometry, view arrangement, explicit dimensions, undimensioned contours, and observed failure mechanism.
Define separate schemas for drawing observations, candidate observations, registration, and discrepancies.
Define confidence/ambiguity semantics and failure behaviour.
Define an output token/size ceiling.
Pre-register the phase-1 test and decision rule before scoring treatments.
Exit gate:
Frozen comparison table and machine-readable provenance.
No schema field implies ground truth or certification.
Review demonstrates that printed dimensions cannot be silently overridden.
Phase 1 — Projection registration feasibility, offline first
Prototype and validate registration outside the public MCP surface:
Measure:
Registration success/failure rate.
False alignment rate.
Sensitivity to deliberate scale, translation, rotation, missing-hole, filled-void, and contour perturbations.
Runtime and memory.
Stability across repeated renders.
Whether discrepancy direction is correct, not merely whether a scalar changes.
Exit gate:
Reliable registration on the development/selfbench set and the 11 frozen inputs.
Synthetic perturbations are ranked in the correct direction.
Uncertain cases fail explicitly rather than returning a confident misleading comparison.
If this gate fails, stop. Do not expose an MCP tool.
Phase 2 — Compact drawing-comparison API
Expose one experimental workflow-level entry point, not a cluster of low-level CV tools.
Candidate contract:
Exit gate:
Detector and API tests pass.
Output remains compact enough for an agent correction loop.
Independent review finds no route by which a low-confidence alignment masquerades as a high-confidence discrepancy.
Phase 3 — Bounded Opus 5 comparison-only A/B
Intervention:
Build the first valid coarse candidate using the normal MCP workflow.
Run one drawing-aligned comparison.
Correct the single largest confirmed mismatch.
Permit one final comparison only after material geometry change.
Validate and export normally.
Do not add source injection, multiple candidates, semantic constructors, or inspect_part prompt changes in this phase.
Control: frozen current MCP prompt/tool surface.
Treatment: comparison-only addition.
Same Opus 5 model, xhigh effort, MCP version, fixture set, timeout, and concurrency.
Preserve logs, tool output, token usage, runtime, validity, and correction classification.
Score through the authoritative CADGenBench service.
Primary measures:
Paired CAD score delta.
Median paired delta.
Improved/tied/regressed counts.
Recovery on the six loss cases.
Regression on the five controls.
Secondary measures:
Validity.
Token/API-equivalent cost.
Runtime.
Comparison call success.
Fraction of discrepancies causing material geometry changes.
Fraction of those changes improving official score.
Phase-3 success gate:
Recover at least half of the six-fixture 2.132-point deficit, or demonstrate a comparably convincing paired effect after accounting for scorer noise.
Positive paired median.
Gains are not explained by one fixture.
No material validity regression.
No meaningful aggregate regression on controls.
Cost/runtime remain materially below no MCP.
Log review confirms the tool caused correct geometric corrections rather than redundant narration.
Phase 4 — Comparison-informed global reconstruction
Only if phase 3 passes.
Test canonical source as an actuator after a measured structural mismatch:
A/B:
Phase-3 comparison-only treatment versus comparison plus canonical reconstruction.
Same 11-fixture set and measurement contract.
Exit gate:
Additional paired improvement beyond phase 3.
Global rewrites correlate with measured structural mismatches.
No recurrence of the conditional-source regression pattern.
Failure recovery preserves validity and prior state.
Phase 5 — Candidate-side semantic feedback
Only after drawing comparison is useful.
Factor inspect_part separately:
Purpose:
Test whether candidate feature inventory adds value after the image-derived plan is grounded.
Determine whether model-authored expectations introduce errors or premature stopping.
Keep inspect_part evidence separate from drawing observations.
Exit gate:
Incremental paired improvement or a clear reduction in interface errors.
Expectation construction is usually correct.
No conformance-style stop-signal regression.
Phase 6 — Optional candidate branching
Only if comparison is a trustworthy selector and residual failures are early-hypothesis errors.
Exit gate:
Selection predicts the better official result often enough to justify cost.
Gain is not obtainable more cheaply through one reconstruction pass.
Phase 7 — Tool-surface and prompt integration
After functionality is proven:
Phase 8 — Full validation
Only after all preceding adopted phases pass their gates:
Freeze commits, dependencies, prompt, model, effort, and run metadata.
Run the full benchmark.
Package all fixtures correctly, including required empty directories.
Publish filtered accreditation logs and safe cost/time aggregates.
Compare overall, generation, editing, validity, tokens, cost, and runtime with both verified MCP 0.3.81 and official-baseline/no-MCP Opus 5.
Record negative as well as positive results in this epic.
Programme-level success criteria
Adopt the complete workflow only if it:
raises verified overall score beyond 0.639 by more than expected noise;
raises generation beyond the current MCP 0.596, with a target of exceeding no-MCP 0.631;
preserves the editing advantage near 0.706;
preserves approximately 80/81 validity or improves it;
retains a meaningful token/runtime advantage over no MCP;
generalizes beyond the six diagnostic fixtures.
Non-goals
Encoding benchmark fixture answers.
Replacing Opus's spatial reasoning with a deterministic image-to-CAD solver.
Returning a misleading fidelity certification.
Adding a large public computer-vision tool family.
Running all 81 fixtures before the sample gates pass.
Treating source access as geometric evidence.
Combining all interventions into one uninterpretable test.
Related
Objective
Close the remaining generation-fidelity gap by giving CAD agents compact, calibrated drawing-to-candidate evidence and a bounded correction path, without weakening build123d-mcp's verified advantages in editing, validity, token cost, and runtime.
This epic is deliberately phased. Each phase must produce measured evidence and may be adopted, revised, or rejected independently. Do not proceed to a full benchmark sweep merely because an API or prompt is technically complete.
Why this is the next hypothesis
A controlled Opus 5 xhigh comparison found:
The generation deficit is concentrated. Six fixtures (102, 106, 116, 126, 145, 150) contribute +2.132 points to no-MCP while the net 49-fixture generation advantage is only +1.730; excluding those six, MCP is slightly ahead.
Trace review shows that the strongest no-MCP generations repeatedly:
Current MCP tools inspect the candidate itself. They do not provide a machine-readable, registered comparison between that candidate and the input drawing.
Prior work and lessons
This epic builds on, but must not repeat uncritically:
inspect_partsupplies compact candidate-side evidence. Its generation A/B remains tracked in A/B test bounded inspect_part feedback during generation cadgenbench-build123d#57.verify_spec/suggest_spec— full-run evidence showed positive conformance verdicts could become premature stop signals. New comparison output must report evidence, not certify completion.design_audit— useful for parametric robustness, not for deciding whether the inferred design matches the drawing.Design principles
PASS,conforms, or an authoritative completion signal for drawing fidelity.Reference evaluation set
Use the existing frozen Opus 5 runs as historical baselines.
MCP-loss cases:
MCP-winning controls:
The controls are mandatory: an intervention that improves complex contours by distracting the model on ordinary generation is not a success.
Phase 0 — Freeze evidence and contracts
Exit gate:
Phase 1 — Projection registration feasibility, offline first
Prototype and validate registration outside the public MCP surface:
Measure:
Exit gate:
If this gate fails, stop. Do not expose an MCP tool.
Phase 2 — Compact drawing-comparison API
Expose one experimental workflow-level entry point, not a cluster of low-level CV tools.
Candidate contract:
drawing/view identity and registration confidence;
scale/orientation evidence;
a small number of ranked silhouette or interface discrepancies;
optional bounded overlay paths;
no completion verdict;
no hidden automatic correction.
Keep it experimental/off by default.
Bound image sizes, contour counts, output size, and runtime.
Isolate image processing so failure cannot destroy the CAD session.
Add adversarial tests for annotation ink, section hatching, partial views, multiple components, symmetry, and similar nearby contours.
Ensure tool descriptions distinguish evidence from instruction.
Exit gate:
Phase 3 — Bounded Opus 5 comparison-only A/B
Intervention:
Do not add source injection, multiple candidates, semantic constructors, or
inspect_partprompt changes in this phase.Primary measures:
Secondary measures:
Phase-3 success gate:
Phase 4 — Comparison-informed global reconstruction
Only if phase 3 passes.
Test canonical source as an actuator after a measured structural mismatch:
execute_file()for a complete candidate rewrite.A/B:
Exit gate:
Phase 5 — Candidate-side semantic feedback
Only after drawing comparison is useful.
Factor
inspect_partseparately:inspect_partcheckpoint.Purpose:
inspect_partevidence separate from drawing observations.Exit gate:
Phase 6 — Optional candidate branching
Only if comparison is a trustworthy selector and residual failures are early-hypothesis errors.
Exit gate:
Phase 7 — Tool-surface and prompt integration
After functionality is proven:
Phase 8 — Full validation
Only after all preceding adopted phases pass their gates:
Programme-level success criteria
Adopt the complete workflow only if it:
Non-goals
Related