/harness
Phase 1 of AI Closed-Loop Programming — harness the AI for a project: the one-time setup that straps the AI to this particular load so the loop can run. Sequences Definition (via /define) when no FSD exists, then installs the three planes, the testing standard, the test plan
$ npx -y skills add SensorsIot/Embedded-AI-Harness --skill harness --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/harness
Context preview
The summary Claude sees to decide when to auto-load this skill.
Phase 1 of AI Closed-Loop Programming — harness the AI for a project: the one-time setup that straps the AI to this particular load so the loop can run. Sequences Definition (via /define) when no FSD exists, then installs the three planes, the testing standard, the test plan
SKILL.md
harness.SKILL.mdname: harness
description: >
Phase 1 of AI Closed-Loop Programming — harness the AI for a project: the
one-time setup that straps the AI to this particular load so the loop can
run. Sequences Definition (via /define) when no FSD exists, then installs
the three planes, the testing standard, the test plan seeded with the
journey tests, declared testbench capabilities, firmware integration, CI
with release verification, and the devcontainer with its per-repo runner.
Use this skill for a new project, "set up this project", "harness this
project", "integrate with the testbench", or when a project has an FSD but
none of the machinery to build against it. Exit gate: AI harnessed.
Harness — Phase 1 sequencer
Runs **once per project**. This skill owns only the **order** and the checklist of what "harnessed" means; every step delegates to the skill that does the work. A harness is the coupling between horse and load: after this phase, a `/build` session can open, state its position, and act.
The sequence
| # | Step | Delegate to | |---|------|-------------| | 1 | **Definition first.** No FSD → run Phase 0 now: `/define` (grill → create). FSD exists → verify every Must/Should carries a verification contract; missing ones are the first act | `/define` | | 2 | Three planes installed or bound: FSD home, `docs/Method/`, `docs/UserDocumentation/` + `docs/00-Overview.md` at the docs root | `/define` planes mode | | 3 | Testing standard stamped (setup/teardown/evidence rules + shared procedures, one file) | `/define` templates | | 4 | `testing/test-plan.yaml` created; **capabilities declared** — bench capabilities copied from what the bench reports (`available: yes` as declared — a project never proves them), plus this project's own peers and equipment. Blocked is computed from these, never typed | this skill | | 5 | Firmware integration — **only the modules the FSD requires.** UDP logging always (the loop's eyes inside the DUT); WiFi provisioning, OTA, BLE hooks only when the FSD carries the corresponding requirements. A module the spec never asked for is silent pack adoption | `testbench-integration` | | 6 | CI: build on push, release on tag **plus the release-verify job** (flash the released artifact to the testbench, run the journey; red journey = no release) | `setup-action` | | 7 | Devcontainer and toolchain, with the **GitHub Actions runner inside it** — see below | `esp-idf-handling` / `esp-pio-handling` (project + toolchain setup) | | 8 | **Generate this project's gate checks** — one file per gate under `testing/gates/`, filled with this project's paths, ids, DUT, capabilities, markers and CI. A generic checklist cannot catch a project-specific omission | this skill · `../build/references/gate-checks.md` | | 9 | **Close with the two questions only the user can answer** — see below | this skill |
Step 5 — a skeleton, and the DUT is not touched
**The DUT is completely out of Phase 1.** Not flashed, not reset, not read. No `chip/info`, no serial monitor, no esptool, no slot claimed. The board belongs to `/commission`, which discovers it, verifies it is the unit the FSD names, and proves the forward path to it. A harness session that has touched the DUT has done Phase 2's work without Phase 2's gate watching.
**The firmware is a skeleton that proves the pipeline, nothing more.** It compiles, it produces an artifact, and it emits one marker. It implements no requirement and verifies no requirement — those are `/build`'s waves, run against the journey. The gate asks only that CI went green once and that no module exists which the FSD never asked for; both are satisfied by a composition root and a printed marker.
The pull that breaks this is always the same shape: **the skeleton needs a hardware fact to compile.** Flash size, partition offsets, a pin, a clock. The answer is never to go and read it off the chip — that is Phase 2 arriving early because Phase 0 left a hole. **Send it back to `/define`**: a constraint the build depends on belongs in the FSD, and a spec that omits one will pull hardware work forward into whichever phase first hits the wall.
Symptoms that Phase 1 has drifted:
- a capability whose `observed:` evidence could only have come from the board
- a host test that asserts product behaviour rather than that the tier runs
- a build fixed by measuring the hardware instead of by amending the spec
Step 7 — the runner lives in the project's devcontainer
One project, one container — no separate infrastructure. The devcontainer already holds the pytest bench tier, TestbenchDriver, discovery, and slot config, which is everything the verify job needs (it downloads an artifact and speaks HTTP; it never builds). **Installation is automated; registration is a human grant** — a registered runner accepts and executes workflow code that then physically drives the bench, a standing outward-facing authority like the release tag itself. This skill installs the runner and the registration script, states what registering means, and waits for the user's yes. Register **per-repo**, labels `[self-hosted, testbench]`, ephemeral registration in a restart loop, verify job triggered by tag push only, approval required for outside contributors. Declare it as a capability:
release-verification:
what: tag-triggered journey run against the released artifact
available: yes # the container runs 24/7; the bench may not — an absent
# bench at verify time is an unmet precondition (not done)Step 9 — the two unharvestable questions
Asked at the end, when the user knows the system's shape — and never harvestable from any document:
1. **What has to be debugged before testing starts?** Which **project-side** parts — this board, its wiring, its peers and simulators — have never been observed doing their job here. Becomes the **debugging agenda** that `/commission` burns down. **The testbench is not on this list**: a proje
Read more
name: harness description: > Phase 1 of AI Closed-Loop Programming — harness the AI for a project: the one-time setup that straps the AI to this particular load so the loop can run. Sequences Definition (via /define) when no FSD exists, then installs the three planes, the testing standard, the test plan seeded with the journey tests, declared testbench capabilities, firmware integration, CI with release verification, and the devcontainer with its per-repo runner. Use this skill for a new project, "set up this project", "harness this project", "integrate with the testbench", or when a project has an FSD but none of the machinery to build against it. Exit gate: AI harnessed.
Harness — Phase 1 sequencer
Runs **once per project**. This skill owns only the **order** and the checklist of what "harnessed" means; every step delegates to the skill that does the work. A harness is the coupling between horse and load: after this phase, a `/build` session can open, state its position, and act.
The sequence
| # | Step | Delegate to | |---|------|-------------| | 1 | **Definition first.** No FSD → run Phase 0 now: `/define` (grill → create). FSD exists → verify every Must/Should carries a verification contract; missing ones are the first act | `/define` | | 2 | Three planes installed or bound: FSD home, `docs/Method/`, `docs/UserDocumentation/` + `docs/00-Overview.md` at the docs root | `/define` planes mode | | 3 | Testing standard stamped (setup/teardown/evidence rules + shared procedures, one file) | `/define` templates | | 4 | `testing/test-plan.yaml` created; **capabilities declared** — bench capabilities copied from what the bench reports (`available: yes` as declared — a project never proves them), plus this project's own peers and equipment. Blocked is computed from these, never typed | this skill | | 5 | Firmware integration — **only the modules the FSD requires.** UDP logging always (the loop's eyes inside the DUT); WiFi provisioning, OTA, BLE hooks only when the FSD carries the corresponding requirements. A module the spec never asked for is silent pack adoption | `testbench-integration` | | 6 | CI: build on push, release on tag **plus the release-verify job** (flash the released artifact to the testbench, run the journey; red journey = no release) | `setup-action` | | 7 | Devcontainer and toolchain, with the **GitHub Actions runner inside it** — see below | `esp-idf-handling` / `esp-pio-handling` (project + toolchain setup) | | 8 | **Generate this project's gate checks** — one file per gate under `testing/gates/`, filled with this project's paths, ids, DUT, capabilities, markers and CI. A generic checklist cannot catch a project-specific omission | this skill · `../build/references/gate-checks.md` | | 9 | **Close with the two questions only the user can answer** — see below | this skill |
Step 5 — a skeleton, and the DUT is not touched
**The DUT is completely out of Phase 1.** Not flashed, not reset, not read. No `chip/info`, no serial monitor, no esptool, no slot claimed. The board belongs to `/commission`, which discovers it, verifies it is the unit the FSD names, and proves the forward path to it. A harness session that has touched the DUT has done Phase 2's work without Phase 2's gate watching.
**The firmware is a skeleton that proves the pipeline, nothing more.** It compiles, it produces an artifact, and it emits one marker. It implements no requirement and verifies no requirement — those are `/build`'s waves, run against the journey. The gate asks only that CI went green once and that no module exists which the FSD never asked for; both are satisfied by a composition root and a printed marker.
The pull that breaks this is always the same shape: **the skeleton needs a hardware fact to compile.** Flash size, partition offsets, a pin, a clock. The answer is never to go and read it off the chip — that is Phase 2 arriving early because Phase 0 left a hole. **Send it back to `/define`**: a constraint the build depends on belongs in the FSD, and a spec that omits one will pull hardware work forward into whichever phase first hits the wall.
Symptoms that Phase 1 has drifted:
- a capability whose `observed:` evidence could only have come from the board
- a host test that asserts product behaviour rather than that the tier runs
- a build fixed by measuring the hardware instead of by amending the spec
Step 7 — the runner lives in the project's devcontainer
One project, one container — no separate infrastructure. The devcontainer already holds the pytest bench tier, TestbenchDriver, discovery, and slot config, which is everything the verify job needs (it downloads an artifact and speaks HTTP; it never builds). **Installation is automated; registration is a human grant** — a registered runner accepts and executes workflow code that then physically drives the bench, a standing outward-facing authority like the release tag itself. This skill installs the runner and the registration script, states what registering means, and waits for the user's yes. Register **per-repo**, labels `[self-hosted, testbench]`, ephemeral registration in a restart loop, verify job triggered by tag push only, approval required for outside contributors. Declare it as a capability:
release-verification:
what: tag-triggered journey run against the released artifact
available: yes # the container runs 24/7; the bench may not — an absent
# bench at verify time is an unmet precondition (not done)Step 9 — the two unharvestable questions
Asked at the end, when the user knows the system's shape — and never harvestable from any document:
1. **What has to be debugged before testing starts?** Which **project-side** parts — this board, its wiring, its peers and simulators — have never been observed doing their job here. Becomes the **debugging agenda** that `/commission` burns down. **The testbench is not on this list**: a proje
Other skills on embedded-ai-harness.
- /build
Phase 3 of AI Closed-Loop Programming — the Build phase, and the driver of the whole loop: locate the project on the chain, name the next act, design and declare tests, dispatch code/flash/verify, correct until the tests run clean. Owns the test plan, test design, audit,
Open skill - /commission
Phase 2 of AI Closed-Loop Programming — Commissioning: prove the project's OWN never-seen-working parts (its board, its wiring, its peers/simulators), so that a failing test means the code and not the setup. The workbench itself is never commissioned by a project — its quality
Open skill - /define
Phase 0 of AI Closed-Loop Programming — Definition: engineers the WHAT the loop converges on. Writes and evolves the FSD — atomic, falsifiable, provenance-tagged requirements each carrying its verification contract — plus architecture, data model, interface definitions, state
Open skill - /esp-idf-handling
Complete ESP-IDF lifecycle: project setup, build, flash, monitor, and OTA. Automatically detects whether a workbench is available or the device is connected locally via USB. Covers sdkconfig, partition tables, esptool, RFC2217 remote flashing, GPIO download mode, OTA updates,
Open skill - /esp-pio-handling
PlatformIO lifecycle for ESP32 firmware: platformio.ini, environment selection, build, upload and serial monitor, on local USB or through the workbench. Covers what differs from ESP-IDF — the .pio/build layout, the boot_app0 image an Arduino-framework build needs, and RFC2217
Open skill - /grill-me
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
Open skill

