Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ docs/evaluation/** -text whitespace=cr-at-eol
examples/gpio-indicator/** -text
examples/** -text whitespace=cr-at-eol
docs/demos/** -text whitespace=cr-at-eol
# The recorded bring-up demos bind this test file's exact source bytes.
tests/examples/test_bringup.py text eol=lf
# These captured Rover inputs are already LF in Git. Keep their checkout bytes
# stable on Windows without rewriting existing CAD or archived source content.
projects/rover-pdb/buck-motor.kicad_sch text eol=lf
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
tests/test_package_smoke.py tests/test_toolchain.py tests/test_doctor.py
tests/test_cli_encoding.py tests/test_demo.py tests/test_demo_change.py tests/test_project.py
tests/test_evaluate.py tests/test_media_evidence.py tests/test_media_publication.py tests/test_check_readme.py
tests/test_check_examples.py
tests/test_check_examples.py tests/test_example_explorer.py tests/examples
tests/test_state.py tests/test_status_cli.py tests/test_update_guard.py
tests/test_transaction.py tests/test_cleanup.py tests/test_release.py
tests/test_stock.py tests/test_sch_io_multiline.py
Expand All @@ -55,6 +55,8 @@ jobs:
run: uv run --locked python tools/evaluate.py
- name: Example sources, exact-part coverage and recorded native artifacts
run: uv run --locked python tools/check_examples.py
- name: Native views, pins, evidence and identities in the offline explorer
run: uv run --locked python tools/build_example_explorer.py --verify
- name: Verify all four offline handovers against saved sources
run: |
uv run --locked pcb-copilot verify-report docs/demos/gpio-review --project examples/gpio-indicator
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Publish example explorer

on:
workflow_run:
workflows: [Software and package checks]
types: [completed]
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: example-explorer-pages
cancel-in-progress: false

jobs:
deploy:
if: >-
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') ||
(github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_repository.full_name == github.repository)
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
persist-credentials: false
- name: Require the current main revision
shell: bash
run: |
test "$(git rev-parse HEAD)" = "$(git ls-remote https://github.com/${{ github.repository }}.git refs/heads/main | cut -f1)"
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.11'
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
- name: Verify the exact retained site against saved example sources
run: |
uv sync --locked
uv run --locked python tools/build_example_explorer.py --verify
- uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
with:
path: docs/demos/example-explorer
- name: Publish the verified standalone explorer
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Software and package checks](https://github.com/devkyber/PCB/actions/workflows/checks.yml/badge.svg)](https://github.com/devkyber/PCB/actions/workflows/checks.yml)

![Three native KiCad examples: USB-C power entry, an I2C temperature sensor and an RS-485 interface](docs/media/examples-gallery.png)
[![Three native KiCad examples: USB-C power entry, an I2C temperature sensor and an RS-485 interface](docs/media/examples-gallery.png)](https://devkyber.github.io/PCB/)

Prepare scoped changes, check the candidate, inspect the native views, and apply
it explicitly. Keep manufacturer evidence and engineering decisions with the
Expand All @@ -13,18 +13,18 @@ design through to a gated manufacturing package.
**[Get started](docs/QUICKSTART.md)** · **[Explore the examples](examples/README.md)** ·
**[Make an offline handover](docs/HANDOVER.md)** · **[Read the workflow](docs/WORKFLOW.md)**

## Three new boards, with their working exposed
## Follow a signal through three native boards

[![A twelve-second walkthrough of the three new boards and their actual native schematics](docs/media/examples-gallery.gif)](docs/media/examples-gallery.mp4)

*Recorded native CAD renders and schematic captures of unbuilt prototypes.
The USB-C example retains eight connector manufacturing findings and has no
PPTC body model. [Source and artifact hashes](docs/media/examples-manifest.json)
All three report zero native ERC/DRC violations and zero unconnected items.
The USB-C PPTC body is not modeled. [Source and artifact hashes](docs/media/examples-manifest.json)
bind this gallery to the exact saved designs.*

| Example | Circuit and files | Current engineering boundary |
| --- | --- | --- |
| [USB-C power entry](examples/usb-c-power/README.md) | Independent CC resistors, PPTC, transient shunt and indicator. [Schematic](examples/usb-c-power/output/schematic.pdf) · [3D model](examples/usb-c-power/output/usb-c-power.glb) | Routed; ERC and pin-net parity pass. Eight connector annular-ring/NPTH-clearance findings block manufacturing review. No PD or current-advertisement detection. |
| [USB-C power entry](examples/usb-c-power/README.md) | Six-contact USB4125 power-only connector, independent CC resistors, PPTC and transient shunt. [Schematic](examples/usb-c-power/output/schematic.pdf) · [3D model](examples/usb-c-power/output/usb-c-power.glb) | Native ERC/DRC and parity pass. Manufacturer lands meet the unchanged geometry baseline. Physical fit, protection behavior, assembly and human decisions remain open; no PD or current sensing. |
| [I²C temperature sensor](examples/i2c-sensor/README.md) | MCP9808 MSOP, eight selectable addresses and ALERT. [Schematic](examples/i2c-sensor/output/schematic.pdf) · [3D model](examples/i2c-sensor/output/i2c-sensor.glb) | Native ERC/DRC and parity pass. Bus behavior, physical fit, supplier assembly and human decisions remain open. |
| [RS-485 interface](examples/rs485-interface/README.md) | THVD1450, explicit control defaults and removable termination. [Schematic](examples/rs485-interface/output/schematic.pdf) · [3D model](examples/rs485-interface/output/rs485-interface.glb) | Native ERC/DRC and parity pass. Short bench-link prototype; isolation, surge/EMC and hardware behavior are unqualified. |

Expand All @@ -33,6 +33,26 @@ archives, routed copper, native review views and a source-bound artifact
inventory. All remain **unbuilt DRAFTs**. The smaller
[GPIO indicator](examples/gpio-indicator/README.md) remains the first-run example.

The **[browser workbench](https://devkyber.github.io/PCB/)** needs no KiCad or
hardware connection. Search by reference or MPN, choose a numbered pin and
highlight its actual saved net. Inspect native copper, schematic and 3D views
beside the matching source evidence. The simplified net map omits pours and
exact pad shapes; the native copper views retain complete geometry.
[Download it for offline use or rebuild it](docs/EXPLORER.md).

Try the source-backed bring-up tools without hardware:

```sh
python examples/i2c-sensor/bringup.py demo
python examples/rs485-interface/bringup.py demo
```

The [sensor guide](examples/i2c-sensor/BRINGUP.md) covers identity, signed
big-endian temperature decoding, address shunts and ALERT configuration. The
[RS-485 guide](examples/rs485-interface/BRINGUP.md) covers termination load/power
bounds and explicit driver timing around the last UART stop bit. These are
checked calculations and transaction recipes, not recorded bench results.

## Get a first result

Use Git, **Python 3.11+** and
Expand Down Expand Up @@ -167,6 +187,7 @@ remain separate from the educational examples. Frozen boards under
| --- | --- |
| [Quickstart](docs/QUICKSTART.md) | Setup and first useful result |
| [Example catalog](examples/README.md) | Circuits, assumptions and native artifacts |
| [Interactive explorer](docs/EXPLORER.md) | Follow native pads/nets, inspect views and source evidence |
| [Handover](docs/HANDOVER.md) | Generate and verify offline review packets |
| [Workflow](docs/WORKFLOW.md) | Preview, apply, review and release |
| [Architecture](docs/ARCHITECTURE.md) | Ownership and implementation boundaries |
Expand Down
64 changes: 64 additions & 0 deletions docs/EXPLORER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Follow a signal through the examples

The [interactive explorer](https://devkyber.github.io/PCB/) combines the three
native KiCad examples in one browser workbench. It uses saved PCB pad and track
coordinates, actual schematic/3D/copper captures and archived manufacturer
evidence. It works without KiCad or a hardware connection.

Choose a board and search for a reference, part number, pin or net. Selecting a
component opens its exact MPN, native numbered pads and source documents.
Select a pin's net to highlight its contacts and routed segments. For example,
the sensor's SDA network connects J1 pin 4, R1 pin 2 and U1 pin 1. The pin labels
and net memberships come from saved CAD, checked against the project netmap.

The connectivity map simplifies pad shapes and omits filled zones and arcs.
Dashed routes are on the bottom copper layer; the map remains oriented from the
top. Use the native top/bottom copper images for full geometry. The bottom image
is mirrored as viewed from the underside. Neither surface replaces editable
CAD or a mechanical drawing. Download the embedded vector schematic for
readable circuit-scale inspection.

All boards remain unbuilt DRAFTs. The displayed ERC/DRC counts are retained
native reports; opening or verifying the explorer does not rerun them. Board
behavior, physical fit, supplier assembly and current human release decisions
remain open. The [complete handovers](HANDOVER.md) retain the full review.

## Run the saved explorer offline

Download [index.html](demos/example-explorer/index.html) using GitHub's raw-file
download control, then open the saved HTML in a browser. Images, vector PDFs,
scripts and circuit data are embedded; the workbench makes no network requests.
Clicking a manufacturer or review link opens the explicitly selected source.

For a local checkout, serve the same saved bundle with standard Python:

```sh
python -m http.server 8765 --bind 127.0.0.1 --directory docs/demos/example-explorer
```

Open `http://127.0.0.1:8765/`. No dependency installation is needed to view it.

## Rebuild and verify

```sh
uv run python tools/build_example_explorer.py --verify
# Requires KiCad Python and current example capture/review packets:
uv run python tools/build_example_explorer.py
```

The builder reads an isolated copy of the declared inputs with KiCad Python. It
reconciles every numbered electrical pad against the netmap, checks current
artifact/handovers, and embeds the captured native views with the complete input
ledger. It rechecks sources around transactional publication. Native extraction, verification or source
failures preserve the previous complete bundle.

Verification needs no KiCad. It checks the retained HTML hash, required source
artifact inventory, all embedded image/PDF bytes, component identities, evidence
metadata and URLs, native finding counts, pin-net maps and current input ledgers.
It rejects stale sources, linked paths and packet files replaced during the
check. Hashes establish recorded identities, not capture authenticity or the
quality of the engineering review.

GitHub Pages publishes only this verified standalone bundle after successful
main-branch software/package checks. Its [workflow](../.github/workflows/pages.yml)
uses GitHub's [custom Pages deployment actions](https://docs.github.com/en/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages).
5 changes: 5 additions & 0 deletions docs/QUICKSTART.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Quickstart

To inspect the examples before installing tools, open the
[interactive browser workbench](https://devkyber.github.io/PCB/). Search native
parts and pins, trace saved nets, and inspect the schematic/copper/3D views beside
their source evidence. It also works as a [downloaded offline file](EXPLORER.md).

Start with the small four-channel GPIO indicator, then try a checked schematic
change in a disposable copy. The example is an unbuilt educational `DRAFT`;
the demo records no owner approval or fabrication release.
Expand Down
13 changes: 10 additions & 3 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ Implemented next examples: [USB-C power](../examples/usb-c-power/README.md),
[I²C temperature](../examples/i2c-sensor/README.md) and
[RS-485](../examples/rs485-interface/README.md) each retain native CAD, exact
part evidence, routed copper, full-page visual review and hashed native outputs.
The USB-C footprint exposes eight unresolved manufacturing-geometry findings;
the other two have clean native ERC/DRC and parity. These are still unbuilt
prototypes with open supplier assembly and human decisions.
USB-C revision B resolves the original connector conflict with an official
six-contact power-only footprint, retaining manufacturer lands and the existing
geometry rules. All three have clean native ERC/DRC and parity. The sensor and
RS-485 guides include tested, source-backed offline bring-up tools. These remain
unbuilt prototypes with open supplier assembly, physical and human decisions.

Done when the procedure reproduces offline from the archived inputs and the
remaining engineering results have measured evidence. Owner boards and frozen
Expand Down Expand Up @@ -81,6 +83,11 @@ and board view together with scoped findings and the captured source ledger.
The verifier checks packet bytes, embedded native images/review consistency,
and optional current-project identity without requiring KiCad.

The [interactive example explorer](EXPLORER.md) also exposes current native
pad/net membership, selected-part identities, evidence and board views in one
standalone browser workbench. Its verifier rejects substituted embedded media,
misstated component facts and stale source ledgers.

Use the existing CLI and native-candidate workflow as the integration boundary.
Document one complete agent-assisted task: read requirements and source
evidence, prepare a scoped candidate, inspect the check results and rendered
Expand Down
Loading
Loading