projects/ janelia/ Mouse Joystick/ Sources/ camera-gpio-interface-pcb/ .agents/ AGENTS.md/

Archived page

Camera GPIO Interface PCB Agent Guidance

.agents/AGENTS.md of camera-gpio-interface-pcb, rendered; the Markdown is beside it.

This file is the canonical project guidance for agent sessions in this repository.

Session Start

Read this file first.

If AGENT_MEMORY_REPO is set and points at a directory, read $AGENT_MEMORY_REPO/AGENTS.md before planning or editing.

Then read, in this order:

If sibling checkouts exist, also read:

If .agents/handoff.local.md exists, read it before planning or editing.

If the task is multi-step, risky, or likely to span more than one session, read .agents/PLANS.md and keep it updated as work progresses.

Repository Purpose

This repository owns the KiCad implementation and board-specific notes for camera-gpio-interface-pcb: three FLIR Blackfly S GPIO channels on pluggable screw terminals, two BNC inputs from a pyControl breakout, four 3.3 V BNC outputs to a Neuropixels OneBox, an InstrumentPort-Digital-50 with every camera line tapped, and USB power. No MCU, no firmware.

Board Rules

Development Environment

Prefer Makefile targets:

The pinned Guix channel in .guix/channels.scm carries KiCad 10.0.6, the version the design blocks were saved with, so this repository has no local KiCad overlay. The sibling ../kicad-libs checkout is used through ORB_WEAVER_KICAD_LIBS when present; the orb-weaver-kicad-libs channel pin only selects the packaged helper commands. Bump pins deliberately, not as cleanup.

docs/generated/ and the block between the <!-- BEGIN/END GENERATED BOARD DOCUMENTATION --> markers in README.md are written by make docs. Never hand-edit either.

Netclass profiles applied 2026-09-25 with ../kicad-libs/bin/orb-weaver-kicad-apply-netclasses: instrument-taps and hv-power-24v (its HV classes match nothing here; it supplies PWR_5V, PWR_3V3 and the _LOCAL variants), plus the board-local kicad/netclass-profiles/camera-gpio-narrow-rails.json, which puts PWR_5V_NARROW and PWR_3V3_NARROW (0.20 mm track, 0.20 mm clearance, 0.6/0.3 mm via) one priority step above the shared rail classes so /+5V and /+3.3V can enter the 0.5 mm-pitch SOT-666 and DRY6 pads they feed. The shared widths cannot reach those pins (docs/autoroute-log.md, run 2); a class that is wider than the pin it must connect to gets a narrower local class rather than a hand-routed neck. Re-apply any of the three if --check reports drift; the helper preserves unrelated classes and patterns.

Validation

For schematic and layout work, run KiCad ERC and DRC through the managed environment once the design is mature enough for them to be meaningful, and compare the exported netlist against the plan's tables after edits; ERC alone did not catch earlier electrical findings on mouse-joystick-pcb.

ORB_WEAVER_KICAD_LIBS must resolve for KiCad to find the database, footprint and design-block libraries.

Board Manifest

kicad/board-manifest.yaml is the board's manifest (kicad-libs decision D20, derived 2026-10-02): every placed block with its anchor from docs/generated/mechanical-datums.json, each port mapped to the label it meets in its parent sheet or open with a reason, the board-authored sheets, the netclass profiles and every net's class. After placing, wiring or moving a block run make mechanical-datums, then make board-manifest-derive (keeps the written meanings and reasons) and make board-manifest-check; make board-manifest-render regenerates the block between the markers at the top of docs/interface-map.md, which is a rendering of the manifest and is never edited by hand; the narrative below the block is. A port the manifest neither maps nor leaves open with a reason is an error, not a note.

make compose makes the project agree with the manifest (D28), creating the sheet instances, pin connections and PCB groups it lacks and never moving or renaming; make compose-check is the dry run. make refresh-block INSTANCE= brings one placed block up to its library block and reports what changed (D22). kicad/board.yaml with subsystem recipes is the board's source (D27) when one is written: make expand writes the manifest from it and make expand-check compares. The Makefile targets come from kicad-libs templates/kicad-repo/Makefile and call the sibling checkout's launchers.

Publication Layers

This repository is mirrored to GitHub for the rig's researchers, so it has two layers (decided 2026-10-12):

A new document goes into exactly one of the two lists. LICENSES/NOTICE.md keeps its kicad-libs URL: it is the CC-BY-SA attribution for the embedded symbols, footprints and blocks.