app
AI Flow
Public Made by Adomby adom
Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board.
← Commit history
0.1.43: local STEP processing on cadquery-ocp-novtk (398 MB instead of 1.3 GB)
12 files changed
+32−24
Cargo.lock+10−10@@ -4,7 +4,7 @@ version = 4 [[package]] name = "adom-aiflow"-version = "0.1.42"+version = "0.1.43" dependencies = [ "aiflow-analyze", "aiflow-board",@@ -24,7 +24,7 @@ dependencies = [ [[package]] name = "aiflow-analyze"-version = "0.1.42"+version = "0.1.43" dependencies = [ "serde", "serde_json",@@ -33,7 +33,7 @@ dependencies = [ [[package]] name = "aiflow-board"-version = "0.1.42"+version = "0.1.43" dependencies = [ "serde", "serde_json",@@ -41,7 +41,7 @@ dependencies = [ [[package]] name = "aiflow-bridge"-version = "0.1.42"+version = "0.1.43" dependencies = [ "aiflow-board", "serde",@@ -50,7 +50,7 @@ dependencies = [ [[package]] name = "aiflow-copper"-version = "0.1.42"+version = "0.1.43" dependencies = [ "aiflow-board", "aiflow-grid",@@ -60,7 +60,7 @@ dependencies = [ [[package]] name = "aiflow-grid"-version = "0.1.42"+version = "0.1.43" dependencies = [ "aiflow-board", "serde",@@ -69,7 +69,7 @@ dependencies = [ [[package]] name = "aiflow-place"-version = "0.1.42"+version = "0.1.43" dependencies = [ "aiflow-board", "serde",@@ -78,7 +78,7 @@ dependencies = [ [[package]] name = "aiflow-pours"-version = "0.1.42"+version = "0.1.43" dependencies = [ "aiflow-board", "aiflow-copper",@@ -88,7 +88,7 @@ dependencies = [ [[package]] name = "aiflow-router"-version = "0.1.42"+version = "0.1.43" dependencies = [ "aiflow-board", "aiflow-grid",@@ -98,7 +98,7 @@ dependencies = [ [[package]] name = "aiflow-run"-version = "0.1.42"+version = "0.1.43" dependencies = [ "serde", "serde_json",
Cargo.toml+1−1@@ -14,7 +14,7 @@ members = [ ] [workspace.package]-version = "0.1.42"+version = "0.1.43" edition = "2021" license = "MIT" repository = "https://wiki.adom.inc/adom/adom-aiflow"
SKILL.md+1−1@@ -142,7 +142,7 @@ Before placement, declare `step components` and run `components` with your `--ru Use manufacturer drawings and permitted CAD as reference checks. Third-party downloads may be private reference-only; never redistribute them without permission, or call extracted/recolored/etched geometry independently authored. Compare independently generated geometry with dimensional and visual evidence. Publish only reusable assets on global pages; board-only definitions stay in the project. -MPN marking is on by default for ICs: every IC's model carries its laser-etched MPN and `finish` checks it (`components --etch off` declines for a run). Mark with `adom-aiflow-etch --in <model.step> --mpn <MPN> --out <model.step>`: it uses adom/adom-chip-laser but keeps the model's own colours (the service alone repaints the part black and grey), lays the text along the part's longest top-face direction, stands Y-up vendor models upright first (`--up y`), and writes a FLAT mark (each glyph's top face only, about a fifth of the triangles of the service's extruded glyphs). Until the service does these itself (adom/adom-chip-laser#2) the tool needs OpenCascade locally, about 1.3 GB: ask the user, then run it with `AIFLOW_ALLOW_LOCAL_OCC=1`; STEP geometry otherwise belongs on the shared services. Use `--mark dark` on light bodies. Component-page heroes add the footprint art per eda-component-hero (see aiflow-sourcing). Keep the plain model; cache a separate MPN-marked STEP, GLB and reviewed thumbnails when enabled, with input hash, generator version/parameters, text/mode and native-render evidence. Protect pin-1, polarity and functional features. Marking is an identification aid, not a claim of real factory markings. Do not regenerate a valid shared cache, and do not claim KiCad/Fusion/Altium parity until each named viewer was checked.+MPN marking is on by default for ICs: every IC's model carries its laser-etched MPN and `finish` checks it (`components --etch off` declines for a run). Mark with `adom-aiflow-etch --in <model.step> --mpn <MPN> --out <model.step>`: it uses adom/adom-chip-laser but keeps the model's own colours (the service alone repaints the part black and grey), lays the text along the part's longest top-face direction, stands Y-up vendor models upright first (`--up y`), and writes a FLAT mark (each glyph's top face only, about a fifth of the triangles of the service's extruded glyphs). Until the service does these itself (adom/adom-chip-laser#2) the tool needs OpenCascade locally: it installs the lightweight `cadquery-ocp-novtk` build (about 0.4 GB; the full `cadquery-ocp` with VTK is about 1.3 GB and VTK is never needed to process STEP files). Ask the user, then run it with `AIFLOW_ALLOW_LOCAL_OCC=1`. Shared services come first; the local build is the fallback when they are busy or cannot do the job. Use `--mark dark` on light bodies. Component-page heroes add the footprint art per eda-component-hero (see aiflow-sourcing). Keep the plain model; cache a separate MPN-marked STEP, GLB and reviewed thumbnails when enabled, with input hash, generator version/parameters, text/mode and native-render evidence. Protect pin-1, polarity and functional features. Marking is an identification aid, not a claim of real factory markings. Do not regenerate a valid shared cache, and do not claim KiCad/Fusion/Altium parity until each named viewer was checked. ## Provenance is required for shared component assets
bin/adom-aiflow⋯ 1 unchanged line ⋯
docs/component-sourcing.md+1−1@@ -14,7 +14,7 @@ Before placement, declare `step components` and run `components` with your `--ru Use manufacturer drawings and permitted CAD as reference checks. Third-party downloads may be private reference-only; never redistribute them without permission, or call extracted/recolored/etched geometry independently authored. Compare independently generated geometry with dimensional and visual evidence. Publish only reusable assets on global pages; board-only definitions stay in the project. -MPN marking is on by default for ICs: every IC's model carries its laser-etched MPN and `finish` checks it (`components --etch off` declines for a run). Mark with `adom-aiflow-etch --in <model.step> --mpn <MPN> --out <model.step>`: it uses adom/adom-chip-laser but keeps the model's own colours (the service alone repaints the part black and grey), lays the text along the part's longest top-face direction, stands Y-up vendor models upright first (`--up y`), and writes a FLAT mark (each glyph's top face only, about a fifth of the triangles of the service's extruded glyphs). Until the service does these itself (adom/adom-chip-laser#2) the tool needs OpenCascade locally, about 1.3 GB: ask the user, then run it with `AIFLOW_ALLOW_LOCAL_OCC=1`; STEP geometry otherwise belongs on the shared services. Use `--mark dark` on light bodies. Component-page heroes add the footprint art per eda-component-hero (see aiflow-sourcing). Keep the plain model; cache a separate MPN-marked STEP, GLB and reviewed thumbnails when enabled, with input hash, generator version/parameters, text/mode and native-render evidence. Protect pin-1, polarity and functional features. Marking is an identification aid, not a claim of real factory markings. Do not regenerate a valid shared cache, and do not claim KiCad/Fusion/Altium parity until each named viewer was checked.+MPN marking is on by default for ICs: every IC's model carries its laser-etched MPN and `finish` checks it (`components --etch off` declines for a run). Mark with `adom-aiflow-etch --in <model.step> --mpn <MPN> --out <model.step>`: it uses adom/adom-chip-laser but keeps the model's own colours (the service alone repaints the part black and grey), lays the text along the part's longest top-face direction, stands Y-up vendor models upright first (`--up y`), and writes a FLAT mark (each glyph's top face only, about a fifth of the triangles of the service's extruded glyphs). Until the service does these itself (adom/adom-chip-laser#2) the tool needs OpenCascade locally: it installs the lightweight `cadquery-ocp-novtk` build (about 0.4 GB; the full `cadquery-ocp` with VTK is about 1.3 GB and VTK is never needed to process STEP files). Ask the user, then run it with `AIFLOW_ALLOW_LOCAL_OCC=1`. Shared services come first; the local build is the fallback when they are busy or cannot do the job. Use `--mark dark` on light bodies. Component-page heroes add the footprint art per eda-component-hero (see aiflow-sourcing). Keep the plain model; cache a separate MPN-marked STEP, GLB and reviewed thumbnails when enabled, with input hash, generator version/parameters, text/mode and native-render evidence. Protect pin-1, polarity and functional features. Marking is an identification aid, not a claim of real factory markings. Do not regenerate a valid shared cache, and do not claim KiCad/Fusion/Altium parity until each named viewer was checked. ## Provenance is required for shared component assets
docs/release-0.1.43.mdadded+3@@ -0,0 +1,3 @@+# AI Flow 0.1.43++- **Local STEP processing uses the lightweight OpenCascade build.** `adom-aiflow-etch` now installs `cadquery-ocp-novtk` (398 MB) instead of `cadquery-ocp` (1.3 GB): the difference is the VTK visualisation library, which processing STEP files never uses, and the no-VTK build has everything the etch needs (XCAF colours and names, transforms, face extraction). Same result on the TPS54202 test part. The shared step2glb service still comes first; aiflow-sourcing now suggests this build whenever a STEP needs local work and the service is busy, and asks before installing it.
flows/board.json+1−1@@ -28,7 +28,7 @@ "Use portable project/library model paths, preserve placement and routing, rerun kicad_model_check and inspect the saved board in native KiCad 3D. Report reference coverage, reused/created page URLs, unresolved identities and missing CAD separately. A successful download or wiki publication alone does not close a missing-model finding.", "Judge quality per component, not per board screenshot: publish a linked visual register with top, bottom and oblique views. Check dimensions, units, terminal count and pitch, pin-1/polarity, body/pad alignment, standoff, materials and visible details. File resolution alone is not quality. Record pass, needs-work, reference-only or unknown with evidence and limits.", "Prefer manufacturer CAD when the source permits the intended redistribution. Keep third-party/Ultra Librarian downloads as private reference-only inputs unless redistribution is explicitly permitted. Compare independently generated models against manufacturer drawings and permitted reference views; retain dimensional deviations and source hashes. Converting, extracting, recoloring, or etching a restricted model does not make it independently authored or license-cleared.",- "MPN marking is ON by default for ICs (John, 2026-09-30): every IC's 3D model carries its MPN laser-etched on the top face, and finish checks it; passives are optional. Run `adom-aiflow-etch --in <model.step> --mpn <MPN> --out <model.step>` (adom/adom-chip-laser service plus a colour-preserving merge; the mark is flat, top faces only). It needs OpenCascade locally (about 1.3 GB) until the service keeps colours, turns the part and writes flat marks itself: ask the user before `AIFLOW_ALLOW_LOCAL_OCC=1`. Do not post a STEP to the service and use its output directly: the service repaints the whole part black and grey (adom/adom-chip-laser#2). Keep the plain model beside the marked one; `components --etch off` declines for a run. Marking is an identification aid, not the part's factory top mark.",+ "MPN marking is ON by default for ICs (John, 2026-09-30): every IC's 3D model carries its MPN laser-etched on the top face, and finish checks it; passives are optional. Run `adom-aiflow-etch --in <model.step> --mpn <MPN> --out <model.step>` (adom/adom-chip-laser service plus a colour-preserving merge; the mark is flat, top faces only). It needs OpenCascade locally, the lightweight cadquery-ocp-novtk build (about 0.4 GB, no VTK), until the service keeps colours, turns the part and writes flat marks itself: ask the user before `AIFLOW_ALLOW_LOCAL_OCC=1`. Do not post a STEP to the service and use its output directly: the service repaints the whole part black and grey (adom/adom-chip-laser#2). Keep the plain model beside the marked one; `components --etch off` declines for a run. Marking is an identification aid, not the part's factory top mark.", "Cache reviewed artifacts on the existing global component page: source/plain STEP, optional MPN STEP, GLB, thumbnails and machine-readable provenance. Record input hash, generator/tool version, parameters, units, transforms, marking text/mode, reference evidence and review results. Cache keys must change when geometry, text or generator parameters change. Keep board-only transforms and mappings in the board project. Never claim cross-EDA parity without rendering the variant in the named native viewers.", "When publishing or improving a component page, make per-file provenance mandatory even though creating a new page is optional. Record original source URL/file and revision, retrieval date, source and output SHA-256, authoring classification (manufacturer-supplied, source-derived, AI-created, or unknown), generator/version and parameters, units/transforms, redistribution evidence and limitations. For AI-created geometry cite the actual datasheet page/figure/table and dimensions used, list simplifications and reference comparisons, and never present copied/extracted CAD as independent work. State which checks ran and which remain unverified; retain plain and marked variant lineage. Put a readable provenance section on the page plus a machine-readable asset record and a link to that component's issue tracker. Unknown provenance stays unknown, not a fabricated source. Reuse/improve existing pages first; offer new global-page publication only for reusable components, keeping board-specific records in the project.", "Fit the mark along the LONGEST usable top-face direction at the largest legible size (a SOT-23-6 gets 0.22 mm along its long axis against 0.14 mm across it); the service only writes across X, so turn the part first (adom-aiflow-etch does). Stand Y-up vendor models upright first (`--up y`), or the mark lands on a side face. Use a light mark on dark epoxy and a dark mark on light bodies (`--mark dark`). Look at the result: colours intact, text inside the top face, clear of pin-1 and polarity features; a mark across a polarity stripe or off the face is worse than none, so leave that part unmarked and say why.",
package.json+1−1@@ -1,7 +1,7 @@ { "slug": "adom-aiflow", "type": "app",- "version": "0.1.42",+ "version": "0.1.43", "title": "AI Flow", "description": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. One Rust binary with a crate per step (placement helpers, a grid router with Kelvin taps, pours with keepouts, KiCad's DRC gate, live landing through the KiCad Bridge, copper measurement, current and thermal analysis) and a finish line that refuses an unfinished board. Every command answers with hints for the AI; every turn, its thinking time and every rework loop go into run.jsonl, so Claude, Codex and any other engine are compared on the same flow. KiCad today; Altium, Fusion and Adom's own web apps next.", "summary": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. The AI thinks its way from placement through routing, pours, current and thermal analysis to a delivered video; the binary does the fast, deterministic parts of every step, hands back hints, and keeps a ledger of every turn, every return to an earlier step, and the clock from the prompt to done.",
page.json+1−1@@ -1,7 +1,7 @@ { "slug": "adom-aiflow", "type": "app",- "version": "0.1.42",+ "version": "0.1.43", "title": "AI Flow", "description": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. One Rust binary with a crate per step (placement helpers, a grid router with Kelvin taps, pours with keepouts, KiCad's DRC gate, live landing through the KiCad Bridge, copper measurement, current and thermal analysis) and a finish line that refuses an unfinished board. Every command answers with hints for the AI; every turn, its thinking time and every rework loop go into run.jsonl, so Claude, Codex and any other engine are compared on the same flow. KiCad today; Altium, Fusion and Adom's own web apps next.", "summary": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. The AI thinks its way from placement through routing, pours, current and thermal analysis to a delivered video; the binary does the fast, deterministic parts of every step, hands back hints, and keeps a ledger of every turn, every return to an earlier step, and the clock from the prompt to done.",
skills/adom-aiflow/SKILL.md+1−1@@ -142,7 +142,7 @@ Before placement, declare `step components` and run `components` with your `--ru Use manufacturer drawings and permitted CAD as reference checks. Third-party downloads may be private reference-only; never redistribute them without permission, or call extracted/recolored/etched geometry independently authored. Compare independently generated geometry with dimensional and visual evidence. Publish only reusable assets on global pages; board-only definitions stay in the project. -MPN marking is on by default for ICs: every IC's model carries its laser-etched MPN and `finish` checks it (`components --etch off` declines for a run). Mark with `adom-aiflow-etch --in <model.step> --mpn <MPN> --out <model.step>`: it uses adom/adom-chip-laser but keeps the model's own colours (the service alone repaints the part black and grey), lays the text along the part's longest top-face direction, stands Y-up vendor models upright first (`--up y`), and writes a FLAT mark (each glyph's top face only, about a fifth of the triangles of the service's extruded glyphs). Until the service does these itself (adom/adom-chip-laser#2) the tool needs OpenCascade locally, about 1.3 GB: ask the user, then run it with `AIFLOW_ALLOW_LOCAL_OCC=1`; STEP geometry otherwise belongs on the shared services. Use `--mark dark` on light bodies. Component-page heroes add the footprint art per eda-component-hero (see aiflow-sourcing). Keep the plain model; cache a separate MPN-marked STEP, GLB and reviewed thumbnails when enabled, with input hash, generator version/parameters, text/mode and native-render evidence. Protect pin-1, polarity and functional features. Marking is an identification aid, not a claim of real factory markings. Do not regenerate a valid shared cache, and do not claim KiCad/Fusion/Altium parity until each named viewer was checked.+MPN marking is on by default for ICs: every IC's model carries its laser-etched MPN and `finish` checks it (`components --etch off` declines for a run). Mark with `adom-aiflow-etch --in <model.step> --mpn <MPN> --out <model.step>`: it uses adom/adom-chip-laser but keeps the model's own colours (the service alone repaints the part black and grey), lays the text along the part's longest top-face direction, stands Y-up vendor models upright first (`--up y`), and writes a FLAT mark (each glyph's top face only, about a fifth of the triangles of the service's extruded glyphs). Until the service does these itself (adom/adom-chip-laser#2) the tool needs OpenCascade locally: it installs the lightweight `cadquery-ocp-novtk` build (about 0.4 GB; the full `cadquery-ocp` with VTK is about 1.3 GB and VTK is never needed to process STEP files). Ask the user, then run it with `AIFLOW_ALLOW_LOCAL_OCC=1`. Shared services come first; the local build is the fallback when they are busy or cannot do the job. Use `--mark dark` on light bodies. Component-page heroes add the footprint art per eda-component-hero (see aiflow-sourcing). Keep the plain model; cache a separate MPN-marked STEP, GLB and reviewed thumbnails when enabled, with input hash, generator version/parameters, text/mode and native-render evidence. Protect pin-1, polarity and functional features. Marking is an identification aid, not a claim of real factory markings. Do not regenerate a valid shared cache, and do not claim KiCad/Fusion/Altium parity until each named viewer was checked. ## Provenance is required for shared component assets
skills/aiflow-sourcing/SKILL.md+4@@ -110,3 +110,7 @@ step2glb thumbnail part.step # look at it ## Component wiki pages: the hero is annotated and etched Whenever a component page is created or its model changes (here, or through molecule-publish's "create missing component pages" stage), the page's hero GLB follows `eda-component-hero` (adom/eda-engineering): the part with its laser-etched MPN (`adom-aiflow-etch`, colours kept, along the long axis), teal dashed copper-pad outlines from the real pads at alpha 0.50, the footprint silkscreen at 0.30, and pin labels at 0.50, as separate nonphysical nodes in the verified Z-up seating frame with pin 1 and polarity matching the footprint (use its `tools/component-reference-overlay.py`). The plain STEP and the board GLB stay clean (no footprint art); publish the marked STEP as an extra variant with provenance. Check the published hero by looking at it: top, oblique, underside and the pin-1 corner. A plain grey thumbnail as a component hero is not done.++## Processing STEP files locally++The shared step2glb service comes first, but it is often busy. When a STEP needs local work (turning, merging, reading colours and names through XCAF), suggest the lightweight `cadquery-ocp-novtk` build of OpenCascade's Python bindings in its own venv: about 0.4 GB, against about 1.3 GB for the full `cadquery-ocp`, whose VTK visualisation library STEP processing never uses. Ask the user before installing it, and say how to remove it (delete the venv). `adom-aiflow-etch` does exactly this.
tools/laser-etch/adom-aiflow-etch+8−7@@ -1,20 +1,21 @@ #!/usr/bin/env bash # adom-aiflow-etch: colour-preserving, long-axis, FLAT MPN laser etch of a part STEP (see etch_part.py). # The etch itself runs on the adom-chip-laser service; turning the part and merging the mark need-# OpenCascade (OCP). Adom's rule: STEP geometry work happens on the shared services, and OpenCascade-# is installed locally only when the service cannot do the job. The service does not yet keep colours,-# turn the part or write a flat mark (adom/adom-chip-laser#2), so this local path is opt-in:-# AIFLOW_ALLOW_LOCAL_OCC=1 adom-aiflow-etch ... (makes a ~1.3 GB venv once, removable)+# OpenCascade (OCP). The shared services come first; the local fallback is the lightweight+# `cadquery-ocp-novtk` build (about 0.4 GB, no VTK visualisation library, which STEP processing never+# needs; the full `cadquery-ocp` is about 1.3 GB). The service does not yet keep colours, turn the part+# or write a flat mark (adom/adom-chip-laser#2), so the tool asks before installing it:+# AIFLOW_ALLOW_LOCAL_OCC=1 adom-aiflow-etch ... (makes the venv once; delete it to remove) set -euo pipefail HERE="$(cd "$(dirname "$(readlink -f "$0")")" && pwd)" VENV="${AIFLOW_OCC_VENV:-$HOME/.local/share/adom-aiflow/occ}" if [ ! -x "$VENV/bin/python" ] || ! "$VENV/bin/python" -c "import OCP" 2>/dev/null; then if [ "${AIFLOW_ALLOW_LOCAL_OCC:-}" != "1" ]; then- echo "ERROR: adom-aiflow-etch needs OpenCascade (OCP) locally, about 1.3 GB, because the adom-chip-laser service does not yet keep a model's colours, turn it to its long axis or write a flat mark (adom/adom-chip-laser#2)." >&2+ echo "ERROR: adom-aiflow-etch needs OpenCascade (OCP) locally, the lightweight cadquery-ocp-novtk build (about 0.4 GB), because the adom-chip-laser service does not yet keep a model's colours, turn it to its long axis or write a flat mark (adom/adom-chip-laser#2)." >&2 echo "Hint: ask the user first. With their OK: AIFLOW_ALLOW_LOCAL_OCC=1 adom-aiflow-etch ... (venv at $VENV; delete it when done). Or leave the part unmarked with components --etch off." >&2 exit 2 fi- echo "adom-aiflow-etch: setting up OCP in $VENV (about 1.3 GB, once; delete the folder to remove it)" >&2- python3 -m venv "$VENV" && "$VENV/bin/pip" -q install cadquery-ocp >&2+ echo "adom-aiflow-etch: setting up OCP (cadquery-ocp-novtk, about 0.4 GB) in $VENV once; delete the folder to remove it" >&2+ python3 -m venv "$VENV" && "$VENV/bin/pip" -q install cadquery-ocp-novtk >&2 fi exec "$VENV/bin/python" "$HERE/etch_part.py" "$@"