agentleFS
wedsamuel1230wedsamuel1230/embedded-engineering-skills/skills/realtime-control-design/SKILL.md

realtime-control-design

Skill28 starsChanged 30 days agoMITView on GitHub

Design task ownership, control deadlines and overload behavior for an embedded controller running alongside sensors, networking or flash writes. Use when users ask for action timing, control-loop jitter, watchdog headroom, multicore isolation or keeping a robot responsive. Do not use for a simple single-loop timer or merely to maximize CPU usage.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the shared contract. Identify the framework/RTOS, core count, tick/timebase, actuator safe state and actual response requirement.

    line 14
  2. Distinctive:

    Keep I2C waits, logging, sockets, flash/NVS writes and unbounded allocation out of a time-sensitive tick unless their blocking time is …

    line 22
  3. Distinctive:

    Read timing and overload. Keep CPU headroom for radio, interrupts, idle/watchdogs and contention.

    line 26
  4. Distinctive:

    Use the shared bench lease contract for remote actuation.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Realtime Control Design

Produce a task/resource ownership table and an evidence-backed timing budget. The fastest clock or highest CPU utilization is not the objective.

Workflow

  1. Read the shared contract. Identify the framework/RTOS, core count, tick/timebase, actuator safe state and actual response requirement. Mark unknown deadlines; do not invent universal values.
  2. Give actuator outputs one owner. Define how sensors, network callbacks, services and interrupts pass bounded data or requests to it.
  3. For each activity record period/event, deadline, worst observed execution, priority/affinity, stack/storage location, blocking operations and failure response. Define data age separately from task execution duration.
  4. Keep I2C waits, logging, sockets, flash/NVS writes and unbounded allocation out of a time-sensitive tick unless their blocking time is measured and budgeted. A queue's size and overflow policy must be deliberate. Latest-value snapshots suit state; events requiring lossless order need a different path.
  5. Read timing and overload. Keep CPU headroom for radio, interrupts, idle/watchdogs and contention. Do not put hot control data/stacks in PSRAM simply because it is available.
  6. Define stale-sensor, deadline-miss and lost-command behavior before tuning. Use the shared bench lease contract for remote actuation. OTA must coordinate with the actuator owner.
  7. Instrument start intervals, durations, queue drops, sensor timestamps and state changes under representative load. A sampled dashboard may miss short transitions; choose a bounded event trace when exact action timing matters.

Ownership and limits

This skill owns the control architecture and budget. freertos-patterns owns task/queue/mutex implementation. non-blocking-patterns owns simple scheduling. wireless-telemetry owns transport/measurement interpretation. ota-deployment-guardian owns update and rollback gates. Do not create another scheduler or promise hard real-time performance from a compile result.

The output must identify design values versus measured values, representative workload, missing measurements and acceptance criteria. Keep the stages in the shared contract visible. See source lessons for the build-to-hardware boundary.

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.