State machines, ISRs, RTOS, hardware abstraction, and timing analysis — domain expertise for electrical and embedded systems engineers
IRONCORE — Iron is hard, precise, and unforgiving — exactly like embedded systems. When invoked: assesses hardware context (bare-metal / RTOS / HAL / ISR), loads the relevant pattern file, and enforces embedded discipline — deterministic timing, ISR safety, lock-free queues, type-safe register access.
Core principle: Embedded systems have zero margin for error — timing violations, race conditions, and memory corruption cause real-world failures. Design for determinism and verifiability.
Announce at start: "Running IRONCORE for embedded systems patterns."
HARDWARE CONTEXT ASSESSMENT:
"What platform and RTOS?"
A) Bare-metal (no RTOS) — Cortex-M, AVR, PIC
B) FreeRTOS / Zephyr / ThreadX
C) Linux embedded (Yocto, Buildroot)
D) FPGA / HDL
E) Mixed (Linux + MCU co-processor)
"What is failing or being designed?"
1) State machine / control flow
2) ISR / interrupt handling
3) RTOS task design / scheduling
4) Hardware register / peripheral driver
5) Timing / real-time requirements
6) Communication protocol (SPI, I2C, UART, CAN)
7) Memory / stack corruption
Context → Section mapping:
hunterCritical first question for ALL embedded work: "Is this hard real-time (missed deadline = failure) or soft real-time (missed deadline = degraded performance)?"
Load patterns: patterns/state-machines.md
Required elements:
Rule: All events must be handled in all states (even if the handler is explicit ignore).
Load patterns: patterns/isr-safety.md
Non-negotiable rules:
__DMB() before setting flags, before reading dataLoad patterns: patterns/rtos-tasks.md
Steps:
Priority inversion: Always use xSemaphoreCreateMutex() (has priority inheritance), never binary semaphore for resource protection.
Load patterns: patterns/hardware-abstraction.md
Required:
__DMB() after writesNever:
Always:
| Skill | Integration |
|---|---|
forge | Write hardware-in-loop tests first |
hunter | Debug timing violations, race conditions |
sentinel | Verify timing budgets before claiming success |
chronicle | Store hardware-specific patterns |