yapnr

CI macOS Docs License: AGPL-3.0-or-later Python 3.11 pre-commit: prek

yapnr

Yet another place and route engine for printed circuit boards.

Animation: yapnr places and routes a TLC555 LED flasher, from unplaced footprints to a
    compact, fully routed board; the gloss pass smooths its copper, and the board passes KiCad's
    DRC

The 555 flasher (a TLC555 astable blinker, 10 parts, 2 layers) from the regression ladder: from unplaced footprints to 100 % routed, with the placement starts and routes it was chosen from, then the gloss pass (the copper it replaces in red, its new copper in green), ending on KiCad’s clean DRC verdict. Recorded with the opt-in compact placement and gloss (PNR_COMPACT=1, PNR_GLOSS=1; both off by default).

Animation, side by side: an LED chaser placed and routed twice, its LEDs placed freely
    on the left and held in one line on the right, each LED's series resistor beside it, which
    the placer moves and turns as a whole

Left: LEDs placed freely. Right: the same chaser with its LEDs held in a line group; compact placement keeps each LED’s series resistor flush beside it, and the placer moves and turns the whole row. Both with compact placement and gloss, as above.

yapnr places components and routes copper for KiCad boards. It uses a mechanical, Monte-Carlo-driven search: hierarchical block synthesis, power-first placement, native KiCad routing and DRC in the loop, and electrical contracts (current, pairs, plane access) declared next to the design.

The engine is being migrated here from the Splanc repository, where it was developed to lay out the Splanc Mini board. The migration plan and progress are in docs/ and WORKLOG.md. The papers and open-source projects it builds on are listed in Foundations and references.

Status

Alpha: this repository holds the build, CI and documentation scaffolding, a command-line stub, the migration plan, and the engine imported from Splanc at its original paths under hardware/: its committed history and its newer, uncommitted state (manifest). The package restructuring follows. KiCad 10 only.

Quick start

With Bazelisk installed as bazel:

bazel run //:yapnr -- --version   # the CLI
bazel run //:doctor               # environment report
bazel test //...                  # unit tests and repository checks
bazel run //docs:build            # documentation -> docs/site/html/

See DEVELOPERS.md for setup (including the headless KiCad copy on macOS) and CONTRIBUTING.md for the contribution policy.

Container image

ghcr.io/studio-fug/yapnr bundles KiCad 10, CPython 3.11 with CPU-only torch, and yapnr, for linux/amd64 and linux/arm64, so running yapnr needs Docker and nothing else:

docker run --rm ghcr.io/studio-fug/yapnr:edge doctor

edge follows main; release tags (X.Y.Z, X.Y, latest) start with v0.1.0. See docs/containers.md for projects, UID mapping, resource limits and Apple Silicon, and docs/releases.md for versioning and releases.

License

Copyright (C) 2026 Kevin Balke. Licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later); see LICENSE. Third-party material is listed in THIRD_PARTY.md.

Design with an agent

Ask your agent “Please use Studio-Fug/yapnr to design X” and have it read AGENTS.md. Start yapnr agent chat in an interactive container; the execution guide covers authentication, resource limits, resumption and the open assembly-validation gates.