Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions docs/autopcb-routing-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# AutoPCB Routing Integration Boundary

Date: 2026-08-19

Solverang should support AutoPCB as a continuous-refinement engine, not as a PCB route authority.

## Intended role

AutoPCB owns:

- discrete topology;
- layer and via-stack legality;
- route transactions;
- exact DRC and certificates;
- final route acceptance.

Solverang owns local continuous optimization problems after AutoPCB has selected a discrete route structure.

Examples:

- bend coordinate relaxation;
- length and skew tuning;
- differential-pair symmetry residuals;
- smooth clearance-margin objectives;
- local placement-route co-optimization;
- meander pitch and amplitude solving;
- via-position micro-adjustment inside a legal window.

## Boundary contract

The AutoPCB adapter should compile a verified route fragment into a Solverang problem:

```text
RouteFragment + RefinementWindow + ResidualSpec
-> SolverangProblem
-> CandidateGeometryDelta
-> AutoPCB RouteTransaction
-> verified commit or rejection
```

Solverang output must never be written directly to a PCB route. It is a candidate delta only.

## Required Solverang support

The useful API surface for AutoPCB is:

1. deterministic solve configuration and seed recording;
2. residual diagnostics suitable for route-event logs;
3. sparse Jacobian support for many local variables;
4. bounded variables or projection hooks for legal geometric windows;
5. finite-difference verification for generated Jacobians;
6. an adapter-friendly problem/result serialization format.

## Non-goals

Solverang should not model:

- PCB rule precedence;
- copper primitive pair DRC;
- via-stack fabrication semantics;
- global net ordering;
- route acceptance.

Those remain AutoPCB route-kernel responsibilities.

## First implementation slice

Add an `autopcb-refinement` example problem once AutoPCB exposes typed route-fragment windows. Until then, this document is the integration contract for keeping the two projects aligned.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the AutoPCB example outside Solverang

If this implementation step is followed, Solverang will gain an AutoPCB-specific problem coupled to typed PCB route fragments, contradicting the repository requirement that Solverang remain physics-neutral. Keep the example in AutoPCB's adapter repository, or replace it here with a domain-neutral bounded-refinement example.

AGENTS.md reference: AGENTS.md:L13-L13

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the current-state ledger for this PR

This PR establishes a new integration contract and concrete follow-up work, but STATUS.md remains dated August 16 and describes an unrelated milestone without this compatibility boundary or next step. Update the ledger so the required handoff state accompanies this documentation change.

AGENTS.md reference: AGENTS.md:L3-L3

Useful? React with 👍 / 👎.

Loading