flamingo-pcb
AGENTS.md10 starsChanged 37 days agoMITView on GitHub
Flamingo is prompt-first PCB CAD you drive over MCP. This file is for a future Codex session working in this repo or using Flamingo to design a board. See README.md for the human-facing overview and docs/superpowers/specs/2026-07-16-flamingo-design.md for the full design spec. - Serves the live UI at http://localhost:4242, streams board changes over /ws, and exposes the MCP endpoint at /mcp. - .mcp.json (repo root) wires the flamingo MCP server to /mcp — its 37 tools are available only while the…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 60
Net classes: every net belongs to a class (default default: 0.25mm track, 0.2mm clearance, 0.3/0.6mm via).
- Very specific: line 99
Search is keyword/relevance-ranked, not parametric.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flamingo — notes for Codex
Flamingo is prompt-first PCB CAD you drive over MCP. This file is for a future
Codex session working in this repo or using Flamingo to design a
board. See README.md for the human-facing overview and
docs/superpowers/specs/2026-07-16-flamingo-design.md for the full design spec.
Running the server
npm install && npm run build
node packages/server/dist/cli.js serve board.flamingo # prints "Flamingo v0.1.0 serving …"- Serves the live UI at
http://localhost:4242, streams board changes over/ws, and exposes the MCP endpoint at/mcp. .mcp.json(repo root) wires theflamingoMCP server to/mcp— its 37 tools are available only while the server is running. Start the server first, then use the tools.- Port override:
FLAMINGO_PORT. Autoroute timeout override:FLAMINGO_ROUTE_TIMEOUT_MS(default 300000). - Desktop app tabs: the Mac app opens each board in its own native tab,
each with its own server + MCP endpoint (ports scanned up from 4242, kept
stable per project across relaunches). On open it writes the board's MCP URL
into the project folder's
.mcp.json, so a Codex session started in that folder connects to that board automatically — separate sessions can drive separate boards concurrently.
Design workflow (tool names)
prompt → parts → place → connect → route → drc → export
- Choose parts.
parts_searchthenparts_get. Alwaysparts_getbefore wiring a part — it lists the real pad numbers you'll reference.datasheet_getdownloads the part's datasheet PDF (global cache~/.flamingo/datasheets/, plus a copy into the board'sdatasheets/dir) — read it before stating any specs. - Lay out.
new_board(2/4/6 layers) →set_board_outline(rect withcornerRadius, polygon, or raw path) →place_component/move_component. - Connect.
connect_pins(net +REFDES.PADrefs) builds nets.create_net_class+assign_net_classset track width / clearance / via sizes per net. - Board features.
add_zone(copper pour),add_mounting_hole,add_silk_text,add_keepout.remove_itemby id. - Route.
autoroute(Freerouting;passes, optionalnets).unroute/get_ratsnestto iterate. - Check.
run_drcreturns violations as data (never a tool error). - Export.
export_fabwritesgerbers.zip+bom.csv+cpl.csv(+board.render.svg) for JLCPCB.
screenshot renders a PNG whenever you want to see the board. get_board_state
/ describe_connections give text summaries. undo / redo walk the op log.
Conventions
- Units & axes: millimetres, y-up. Rotations are degrees CCW.
- Pin refs:
REFDES.PAD, e.g.U1.14,R1.1. Pad numbers are strings and come straight from the LCSC footprint (they can be names likeA6,B4A9, not just1..N). - Net classes: every net belongs to a class (default
default: 0.25mm track, 0.2mm clearance, 0.3/0.6mm via). Assign power/signal classes to override. Clearance for a pad/track pair ismax(rule floor, either net's class clearance). - DRC ruleset is chosen by layer count (
jlcpcb-2l/4l/6l, inpackages/engine/src/drc/rules.ts); the 2-layer copper-clearance floor is 0.127mm. - Component
valueis the bare value only (4.7k,100nF,SGM3732) — it becomes the BOM Comment, and JLCPCB flags one LCSC part appearing under different Comments. Per-instance context ("I2C pull-up on SDA", "warm channel") goes inrole, which never reaches the BOM. Enforced by thebom-comment-conflictDRC check.
Stock check (part of DRC)
run_drcandexport_fabcheck live JLCPCB assembly stock (jlcpcb.com parts library — the stock that matters for JLC assembly; not LCSC retail and not the stale EasyEDAstockfield) for every placed part with an LCSC id.stock-out(stock < quantity the board needs) is a gating violation — export refuses just like a geometry violation;waiveDrc: truewaives it.stock-low(< 100 boards buildable) andstock-unknown(part not in the JLC library, or lookup failed) are non-gating advisories — printed in the report, never blocking, so network failures can't brick an export.- Lookups are cached in memory for 10 min;
FLAMINGO_STOCK_CHECK=offdisables the check entirely.
DRC, zones, and export (important)
- DRC gates export.
export_fabfills all copper zones (fillAllZones) and runs the full ruleset on that filled board; it refuses to write files on any violation. PasswaiveDrc: trueto override (waived violations are reported). run_drcalso checks the filled board. Zones are filled on a working copy first (the live doc's stored zones and the undo log are untouched), so its report matches the export gate exactly -- no zone-outline noise. The browser overlay may still show stale markers if the UI last ran DRC before a fill; trust the tool report.
parts_search caveat
Search is keyword/relevance-ranked, not parametric. An exact or near-exact
MPN (0603WAF1002T5E) or a specific LCSC id works far better than a parametric
query like "10k 0603". Prefer known-good LCSC ids when you have them, and
always confirm stock + pads with parts_get before placing.
Freerouting requirements
autoroute needs a Java runtime on PATH/JAVA_HOME (brew install
openjdk on macOS). freerouting.jar is auto-downloaded to
~/.flamingo/freerouting.jar on first use. Routing a real board can take a
minute or more — be patient and don't assume a hang.
Caches
- Part footprints/info:
~/.flamingo/parts/(EasyEDA API responses). freerouting.jar:~/.flamingo/freerouting.jar.
Build & test
npm run build # tsc per package + vite build for the ui
npm test # vitest run across all packages
npx tsx packages/server/scripts/e2e-esp32.ts # real end-to-end pipeline checkThe E2E script drives only the public MCP tools against a real server with live parts and real Freerouting, then validates the exported Gerbers with tracespace and checks the BOM/CPL — it must exit 0.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

