agentleFS
SensorsIotSensorsIot/Embedded-AI-Harness/.claude/skills/build/SKILL.md

build

Skill235 starsChanged 3 months agoMITView on GitHub

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, reconcile, and the change-request procedure. Use this skill whenever the user wants to build or continue building a harnessed project, asks "what's next" or "where are we", wants a feature added (change request), mentions test design, the test plan, xfail, audit, coverage gaps, reconciling drifted code, or "run the loop" — and for Phase 2 work when invoked via /commission.

163 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use backprop, finances and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • JuliusBrusseeSkill

    backprop

    Bug → spec protocol. When a bug is found or a test fails, trace the cause, decide whether a new §V invariant would catch recurrence, append to §B. This is the one non-obvious thing SDD does that plan-then-execute doesn't. Triggers on test failure, bug report, post-mortem, or explicit user ask.

    Also in 4 projects that use this

  • GerardoRdz96Skill

    finances

    Use when Gera talks about his money — logging an expense ("I spent X on Y"), checking where he stands this pay-period, closing a period, planning debt payoff, onboarding his financial picture, or asking for budgeting/finance opinions. Servy's financial brain. Triggers — "I spent", "log this expense", "where am I this period", "close the period", "how's my budget", "debt plan", "should I pay off", "finances onboard", "/finances".

    Also in 3 projects that use this

  • cpiprintSkill

    favicon

    Generate favicons from a source image

    Also in 3 projects that use this

  • madeehahassanSkill

    Go-Live

    Pre-launch checklist. Use before making any app public, sharing a link externally, or announcing a product launch. Adapts to Claude Code, claude.ai, and Cowork.

    Also in 3 projects that use this

  • JuliusBrusseeSkill

    deepen

    Optional design-improvement pass for when you have spare usage to drain. Finds the shallowest modules in the code the spec touches, researches a deeper design, and proposes refactors that shrink interfaces and hide decisions — behavior held constant, tests green before and after. Proposes §I/§V/§T edits, never silent rewrites. Triggers when the user says "deepen this", "improve the design", "this module feels shallow", "pull complexity down", "use spare budget on the codebase", or invokes /ck:deepen. Leans on the codebase-design skill's deep-module vocabulary when present.

    Also in 3 projects that use this

  • synaptiaiSkill

    gate

    Create a BDSK review_gate artifact. Defines a checkpoint that controls whether generated output may proceed toward acceptance. Use when defining quality, security, or scope gates for execution plans.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 149 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read testing/test-plan.yaml and the FSD, derive the position, and open with it — unprompted.

    line 78
  2. Very specific:

    Test design (the two opening questions, the four kinds in three waves, the two shapes — atomic and workflow — and their numbering, seams, …

    line 139
  3. Very specific:

    Contracts flow down; spec defects flow up: When a declaration or an executable test proves a contract unsatisfiable, this skill *reports* …

    line 157

“Common” is measured: kept by at least 6 in 10 of the 149 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Build — the loop's driver (Method skill)

AI Closed-Loop Programming: open-loop AI coding generates and hopes; AICLP feeds back reality — the code runs on real hardware, tests derived from the FSD measure it against the spec, the error corrects the next iteration. The loop exits at zero: tests green.

Control loopHere
SetpointThe FSD — what must be true
PlantFirmware on the real chip
SensorTests derived from the FSD, run on the testbench
Error signalFailing tests
ControllerThe AI, correcting until error = 0

This skill drives Phases 2 and 3 of the journey. /commission and /build are two doors into it; the phase is derived from state, never chosen by the command typed.

Each phase ends at a gate — not a milestone. A milestone is a marker you pass; a gate has to open, and it can send you back. Every gate is derived, never declared, and every one is checked: the owning skill states its deliverables and the check that opens it.

Run the check in a fresh checker that did not author the work — the project's generated gate file plus the repo, nothing else, and never memory or a summary of the session's own work (references/gate-checks.md). If any requirement of the gate is unmet, name it, loop back to the step that owns it, fix it, and re-run the whole check with a new checker — not only the part that failed. Never carry a known deficiency forward, and never enter a phase whose predecessor's gate is still shut.

This is the loop's own discipline applied to itself: a deficiency waved through is found later at many times the cost, and every result produced after it is suspect — nobody can tell whether a red belongs to the new work or to what was let past. "Mostly done" is a shut gate.

PhaseGateChecked by
0 · Definition (/define)Load defined — every Must/Should carries a verification contract; three planes exist/define §12.5 + finalisation.md §1
1 · Harness (/harness)AI harnessed — a /build session opens, states its position, and acts without asking/harness Exit — dry run of the next session
2 · CommissioningDUT ready — the testbench is commissioned, the DUT is connected and verified, and the forward path delivers code to it; a failing test means the code, not the setup/commission Exit — four checks, six records
3 · BuildReady for shipment — every requirement met, journey green, reconcile emptythis skill §4 audit + §5 reconcile
⚑ ShipmentShipped — release published and the journey green on the released bytesthe release-verify job (§6)

What each gate demands of the four artefact layers

The layers are not all produced in one phase, and a gate only demands what its phase owes:

LayerLives inProduced inDemanded by
Verification contractthe FSD, beside the requirementPhase 0Load defined — every Must/Should has one
Test case (declaration)testing/test-plan.yamljourney tests in Phase 1; each requirement's own during BuildAI harnessed (journey tests present) · then per requirement in the chain
Executable (impl: filled)tests/{host,target,bench}/Phase 3, before the codeReady for shipment — every declared test executable
Result (status + commit)back in the plan entryevery run in Phase 3; once more at releaseReady for shipment (all successful) · Shipped (journey green on the released bytes)

A declaration without an executable is the backlog; an executable without a result is not done; a result without a commit is not evidence. The gate that demands each is the one that will not open without it.

0. Open every session by saying where the project is

Read testing/test-plan.yaml and the FSD, derive the position, and open with it — unprompted. The user asking "so what do I do next?" means this skill failed to lead.

  • Debugging agenda has open items → Phase 2. Lead commissioning: next unproven project-side part, how to prove it (../commission/SKILL.md owns the phase and its four checks; the testbench is depended on, never proven by a project).
  • Agenda burned down, requirements unmet → Phase 3. Derive the wave first, then name the next act from the chain below, per requirement — never an average that hides the requirement that has nothing.
  • All requirements met, reconcile empty, journey green → announce Ready for shipment and stop; the tag is the user's act, never this skill's.

Phase 3 runs in three waves, and the wave is derived from the plan — gates, authoring lock, and the capability-declaration exception in references/test-design.md §5:

WaveWritesOpen whileLocked behind it
1 · Build the running prototypestandard tests + featuresany standard test red or unwrittendeviations, negatives
2 · Cover the normal variantsdeviation testsjourney + all standard greennegatives
3 · Build the error handlingnegative + adversarial securityall standard + deviation green—

The position report names the wave and what the gate is waiting on: "Wave 1 — 12/15 standard green, journey step 4 red; deviations locked." Work a user requests from a locked wave is declined with the gate as the reason — the same posture as the intake rule.

What exists (per requirement)PositionThe next act
requirement without contractcontract stepsend it up to /define — writing the contract is the quality gate
contract, no declared testdeclaration stepdeclare it in the plan; report equipment that does not exist and interfaces nobody has decided
declared, not executableexecutable stepwrite it, xfail/WILL_FAIL while the feature is absent
executable, feature absentcode stepdispatch to the dev skill; the XPASS is the landing signal
code with no testsoff the chainthe retrofit — references/test-lifecycle.md §3, both steps mandatory

1. The chain — order is not negotiable

contract (in FSD, by /define)  →  test declared in the plan  →
executable test (xfail)        →  code  →  build  →  flash  →
verify on the testbench        →  record result + commit    →  green

Per requirement, never as project phases. One requirement walks the whole chain before the next starts. Batching every contract, then every declaration, then all the code reads the same on paper and is a different project in practice: the plan looks finished while nothing is verified.

  • The executable test is written before or alongside the code — never after. A test written after the code asserts what the code happens to do, including the bug.
  • Mark tests for absent features expected-to-fail (xfail / WILL_FAIL). The suite stays green, the test exists, and the XPASS announces the feature landing. A permanently red suite is worse than no suite.
  • The cheap tier is exempt from all ordering: host tests run in full, every time, before every hardware session. A red one is a reason not to start.
  • The journey tests are the gate for every hardware session: while a journey step fails, later results are unreadable — a dozen reds, one cause.

Test design (the two opening questions, the four kinds in three waves, the two shapes — atomic and workflow — and their numbering, seams, controllability): references/test-design.md. Status semantics, computed blocking, the retrofit, gap categories: references/test-lifecycle.md.

2. Dispatch — the loop's muscles

This skill designs, declares, sequences, and interprets. It does not compile, flash, or drive instruments — it dispatches:

ActSkill
Amend the WHAT (new/changed requirement, contract fix)/define update mode
Code · build · flash · monitoresp-idf-handling / esp-pio-handling
Verify: WiFi, MQTT, BLE, logging, RFtestbench-* skills
Run the bench suite, operator promptstestbench-test-handling
CI, release workflowsetup-action

Contracts flow down; spec defects flow up. When a declaration or an executable test proves a contract unsatisfiable, this skill reports the finding and /define amends the spec. This skill never edits the WHAT.

3. Change request — how any new feature enters

No code without a clause. Work no requirement covers is refused and routed through Definition first — the full procedure, including impact analysis and the done-criterion (requirement met AND the journey still runs), is references/change-request.md.

4. Audit — "are we actually done?"

Report the lifecycle state of every requirement and the gaps by the four categories of references/test-lifecycle.md §2 — specification defects, verification gaps, implementation gaps, execution/evidence gaps — each list naming who resolves it. A requirement is met when every test that verifies it is successful, including its prohibited-outcome checks. Derived, never stored; expect most requirements below met mid-project — that is information, not failure.

5. Reconcile — both directions, both lists empty

  • Declared in the plan, absent from the code → the backlog.
  • Implemented, absent from the plan → a test verifying something nobody wrote down, or a duplicate in the making. This is the direction people forget.

Behaviour found in code that no clause covers is proposed upward: document it (a clause) or delete it (orphaned code) — the developer chooses, never this skill.

6. Shipment — the loop never ships

  • Dev builds are identified by git describe; no tags are ever minted during Build. The tag namespace holds only releases.
  • git tag means "release this commit" and is the user's act, taken when this skill has announced Ready for shipment.
  • The release workflow rebuilds the tagged commit in the pinned container, then the verify job flashes the released artifact to the testbench and runs the journey once. Shipped = release published AND the journey green on the exact bytes users download. A red journey publishes nothing.
  • Testbench powered off at verify time is an unmet precondition: not done with the reason, never failed. Power it on, re-run the job.

7. Reference index

FileCovers
references/test-design.mdThe two opening questions, clause inventory, controllability, the four kinds gated in three waves, atomic vs workflow tests and the JRN-/TC- numbering, bring-up vs debugging aids, cleanup, seams
references/test-lifecycle.mdTest status, computed blocking, what artefacts prove, the code-exists retrofit, gap categories
references/test-architecture.mdLayering, tier taxonomy, component × tier matrix
references/change-request.mdIntake rule, routing, impact analysis, the done-criterion
references/gate-checks.mdThe fresh-checker protocol, what each gate file contains, and what the five gates demand
references/domains/esp32/Proposed test-case libraries (WiFi, MQTT, BLE, OTA, NVS, …) — a pack proposes, never adopts

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.