The supported entry point is [`inire.route`](../DOCS.md). Automatic mode selects among planner candidates and search attempts. Explicit modes run one worker through [`route_once`](../inire/router/_stack.py). Each worker builds its own collision world, obstacle-proximity map, cost evaluator, A* context, and negotiated-congestion driver.
1.**Bound coverage.** Count disjoint conflicting fixed-port pairs and test applicable vertical cuts. A cut estimates how many tracks fit through the available openings. The smaller bound limits the number of nets the run is trying to verify. Compatible unseeded point-terminal inputs may use inferred headings.
2.**Try constructive layouts.** Ordered bundles, bundle turnarounds, compact port jogs, column schedules, and local S-bends can produce paths before search. Column scheduling assigns ordered tracks to openings and checks adjacent transitions with the actual widths. Selective cost scoring tries weighted transitions when the span pass finds a layout with fragmented short shifts. A constructed layout goes through the ordinary seed materializer and verifier.
3.**Probe, then widen.** Short shifts in both axes may get a guide pass first. Column jogs can assign lanes and stagger 90-degree turns before the probe. The near-port probe uses up to 100 nodes per search and **two congestion iterations** with the standard arc proxy, respecting smaller caller limits. Alternate proxies retain the configured iteration budget. Direct passes reserve safe straight links, check whether the remaining ports are connected, and can change the lock order. A narrow unlocked probe can test whether a straight reservation blocks a nearby exit. A one-net residual can try a four-turn dogleg and two-net boards can try paired perimeter routes. The wider lookahead uses the smaller of 500 nodes and the caller's ceiling, with the configured iteration limit. Live callbacks and shuffled ordering affect the placement of some early stages.
4.**Recover unresolved nets.** Freeze verified incumbents as static geometry when the remaining ports stay connected. If hard locks disconnect the residual, pass the incumbents as movable seeds. For some unresolved shared portals, retry with different joint lane assignments. Complete locked candidates and improved joint retries get a whole-layout check. If needed, try whole-layout seed and lattice search, followed by a lattice retry at the caller's ceiling.
5.**Select and refine.** More verified net IDs wins. Lower cost breaks ties between candidates with identical verified IDs. Locally checked paths remain ineligible until their required layout check passes. If enabled, refine the selected layout and accept a replacement that preserves the verified ID set and improves the score.
Automatic uses the lattice worker directly for custom physical or polygonal proxy bends and when constrained triangulation is unavailable. [Topology planning](topological-routing.md) describes corridor ranking and seed realization.
The search key is an integer `(x, y, heading)` port. [Move generation](../inire/router/_astar_moves.py) proposes variable-length straights, 90-degree bends, and S-bends. Ray casts, visible corners, and corridor waypoints supply additional straight endpoints. [Admission](../inire/router/_astar_admission.py) checks state dominance, cost bounds, and collisions before enqueuing a move. [The search loop](../inire/router/_search.py) ranks candidates by accumulated cost plus a weighted heuristic. When an attempt runs out of budget, it can return the partial path with the best remaining heuristic.
[`PathFinder`](../inire/router/_router.py) materializes caller seeds, plans corridors when requested, and can bootstrap with greedy warm starts. During routing it removes a net's old geometry, searches with the current collision state, and installs the new result. The first pass can use a cheaper bend proxy. Later iterations raise the congestion penalty to give routes an incentive to separate.
At each iteration boundary, the driver rechecks reached-target paths against the installed geometry. It saves the layout with the most completed nets, then the fewest conflict edges and dynamic collisions. [Congestion policy](../inire/router/_congestion_policy.py) chooses which nets to reroute and stops on completed or stalled layouts. Late iterations with a small all-reached conflict graph can reroute just the conflicting set and carry forward expensive incumbents. After restoring the best snapshot, [pair-local search](../inire/router/_pair_local.py) tries both orders for an eligible final conflict pair with the other nets frozen. The driver verifies the proposed replacement in the live world and restores the incumbents if it fails.
The [collision world](../inire/geometry/collision.py) manages raw, clearance-adjusted, and width-specific static geometry. Dynamic paths use a grid and net envelopes to narrow candidate sets before exact polygon checks. [Static](../inire/geometry/static_obstacle_index.py) and [dynamic](../inire/geometry/dynamic_path_index.py) indices own their geometry and caches. The [danger map](../inire/router/danger_map.py) samples obstacle boundaries in a KD-tree. The [visibility planner](../inire/router/visibility.py) builds a lazy static corner index for tangent guidance and a separate graph for exact-corner queries.
Search may use proxy geometry. Verification uses physical components, checks static and dynamic clearance and self-collisions, and adds board containment to automatic trial verification. A mitred static buffer can overestimate clearance near corners. Physical distance resolves those candidates. Locked geometry exposes the unbuffered polygons so the receiving problem can apply its own clearance.
[`PathRefiner`](../inire/router/refiner.py) proposes shorter or cheaper replacements in windows of the selected path. With a finite window limit above one it tries bend-ended windows first, longest within each group. The one-window and unlimited modes use longest-first ordering. It scores candidate moves before building polygons. For a verified incumbent it checks the changed window against the board's collision world and the unchanged route. Final verification accounts for the installed result.