| name | embedded-memory |
| description | Use when hardware config detected, problem solved with evidence, or verification passed - writes to AGENTS.md for persistent project memory |
| license | MIT |
| version | 1.0.0-sp |
Embedded Memory Skill
v1.0.0-sp | 2026-04-13
Memory Types
| Type | AGENTS.md Section | Trigger |
|---|
hardware_config | hardware: | New hardware component detected |
solution_record | solutions: | Problem fixed + root cause + evidence |
verification_evidence | verifications: | Build-Flash-Monitor success |
Workflow
Memory Trigger → Extract Info → Update AGENTS.md → Verify
Operations
1. Read Memory (Session Start)
read AGENTS.md
Extract:
project: → Chip, framework, port
hardware: → LCD, IMU, pins
solutions: → Past fixes
verifications: → Passed tests
2. Write Hardware Config
Trigger: User mentions hardware component (LCD, IMU, sensor, etc.)
read AGENTS.md
edit AGENTS.md
add/update hardware section:
hardware:
lcd:
controller: ST7789
interface: SPI
resolution: 240x240
dma_limit: 4092
pins:
spi_mosi: GPIO11
spi_clk: GPIO10
spi_cs: GPIO9
Template: See templates/hardware_config.md
3. Write Solution Record
Trigger: Problem fixed with evidence (after embedded-verification)
read AGENTS.md
edit AGENTS.md
add solutions entry:
- date: 2026-04-13
problem: "LCD DMA overflow at >4092 bytes"
root_cause: "ESP32-S3 SPI DMA hardware limit"
fix: "Chunked transfer, 4092 bytes per chunk, loop until done"
evidence: "[idf.py monitor] Transfer complete, 240x240 full frame displayed"
tags: [dma, lcd, esp32-s3, chunked]
Template: See templates/solution_record.md
4. Write Verification Evidence
Trigger: Build-Flash-Monitor all passed
read AGENTS.md
edit AGENTS.md
add verifications entry:
- date: 2026-04-13
task: "ST7789 LCD driver initialization"
build: "idf.py build → SUCCESS (0 errors, 0 warnings)"
flash: "idf.py -p COM3 flash → DONE (Hash verified)"
monitor: "LCD init OK, SPI configured, display ON"
status: PASSED
Template: See templates/verification_evidence.md
AGENTS.md Structure
## 项目信息
project:
chip: ESP32-S3
framework: ESP-IDF v5.4
port: COM3
## 硬件配置 (hardware_config)
hardware:
lcd:
controller: ST7789
interface: SPI
resolution: 240x240
dma_limit: 4092
imu:
model: MPU6050
interface: I2C
address: 0x68
pins:
spi_mosi: GPIO11
spi_miso: GPIO12
spi_clk: GPIO10
spi_cs: GPIO9
## 问题解决记录 (solution_record)
solutions:
- date: 2026-04-13
problem: "LCD DMA overflow"
root_cause: "ESP32-S3 SPI DMA limit"
fix: "Chunked transfer"
evidence: "[monitor] Transfer complete"
tags: [dma, lcd]
## 验证证据 (verification_evidence)
verifications:
- date: 2026-04-13
task: "LCD driver init"
build: "SUCCESS"
flash: "DONE"
monitor: "OK"
status: PASSED
Extraction Patterns
Hardware Keywords
| Keyword | Extract |
|---|
| ESP32, S3, C3 | chip: ESP32-S3 |
| ST7789, ILI9341 | lcd.controller: ST7789 |
| SPI, I2C, UART | lcd.interface: SPI |
| 240x240, 320x240 | lcd.resolution: 240x240 |
| MPU6050, BMI270 | imu.model: MPU6050 |
| GPIO11, PIN_X | pins.spi_mosi: GPIO11 |
Problem Keywords
| Keyword | Extract |
|---|
| "Problem:", "Bug:", "Error:" | problem: ... |
| "Root cause:", "Caused by:" | root_cause: ... |
| "Fix:", "Solution:", "Changed:" | fix: ... |
| "[monitor]", "[log]", "Evidence:" | evidence: ... |
Verification Keywords
| Keyword | Extract |
|---|
| "SUCCESS", "Compiling complete" | build: SUCCESS |
| "DONE", "Hash verified" | flash: DONE |
| "OK", "init complete" | monitor: OK |
Integration with Embedded-SP
Memory skill invoked by:
embedded-brainstorming → Writes hardware_config
embedded-verification → Writes verification_evidence
- Manual trigger → Writes
solution_record
Flow:
embedded-brainstorming → hardware detected → write hardware_config
embedded-verification → build/flash/monitor pass → write verification_evidence
Problem fixed → root cause found → write solution_record
Scripts
agents_updater.py
Automated AGENTS.md updater with YAML parsing.
python scripts/agents_updater.py --type hardware_config --data '{"lcd": {"controller": "ST7789"}}'
python scripts/agents_updater.py --type solution_record --data '{"problem": "DMA overflow"}'
python scripts/agents_updater.py --type verification_evidence --data '{"task": "LCD init"}'
Rules
- NO memory without evidence → solution_record requires monitor output
- NO duplicate hardware → update existing entry, not add new
- NO stale memory → solutions older than 90 days, review for relevance
- Tag for search → always add tags for keyword matching
- Source attribution → include date and context
v1.0.0-sp | Based on NeuralMemory principles, adapted for embedded development