# Embedded Implementation

> Use when implementation plan is ready - executes plan task-by-task with two-stage review (hardware spec then MISRA C)

- **Type:** Skill
- **Install:** `agentstack add skill-lhbsaa-embedded-dev-skill-embedded-implementation`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [lhbsaa](https://agentstack.voostack.com/s/lhbsaa)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [lhbsaa](https://github.com/lhbsaa)
- **Source:** https://github.com/lhbsaa/embedded-dev-skill/tree/main/skills/embedded-implementation

## Install

```sh
agentstack add skill-lhbsaa-embedded-dev-skill-embedded-implementation
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Embedded Implementation

## Overview

Execute implementation plan with two-stage review after each task.

**Core principle:** Fresh subagent per task + hardware validation + code quality review = high quality.

**Context:** Run after `embedded-driver-design` creates plan.

## Two-Stage Review Process

```
Task Execution → Hardware Validator → Code Quality Reviewer → Commit
     ↓                ↓                     ↓
  Generate code    DMA/GPIO check        MISRA C check
```

**Stage 1: Hardware Validator**
- Use `prompts/hardware-validator.md`
- Checks: DMA -plan.md
```

Extract ALL tasks with full text and context.

### 2. Create Todo List

```
todowrite todos=[{task: "Task 1: Header file", status: "pending"}, ...]
```

### 3. Execute Per Task

For each task:

```
#### Task N Execution

1. Mark todo: in_progress

2. Get task text and context (already extracted)

3. Dispatch implementation (use prompts/driver-generator.md)
   - Generate code
   - Build verification

4. Stage 1 Review: Hardware Validator
   - Use prompts/hardware-validator.md
   - Check DMA, interface, init sequence
   
5. If Stage 1 FAILS:
   - Fix issues
   - Re-review
   - Don't proceed until APPROVED

6. Stage 2 Review: Code Quality
   - Use prompts/code-quality.md
   - Check MISRA C, DRY, YAGNI
   
7. If Stage 2 FAILS:
   - Fix issues
   - Re-review
   - Don't proceed until APPROVED

8. Both stages APPROVED:
   - Mark todo: completed
   - Commit changes
```

### 4. After All Tasks

```
Dispatch final review for entire implementation
```

### 5. Transition to Verification

```
All tasks complete. Invoking embedded-verification for build-flash-monitor loop.
```

**REQUIRED:** Invoke `embedded-verification` next.

## Implementation Prompt

Use `prompts/driver-generator.md` for code generation:

| Input | From |
|-------|------|
| Chip family | Design spec |
| Interface | Design spec |
| Controller | Design spec |
| Task requirements | Plan task text |

## Status Handling

| Status | Meaning | Action |
|--------|---------|--------|
| `DONE` | Code built successfully | Proceed to Stage 1 review |
| `DONE_WITH_CONCERNS` | Completed with doubts | Review concerns before proceeding |
| `NEEDS_DATASHEET` | Missing init sequence | Provide datasheet, re-dispatch |
| `BLOCKED` | Cannot proceed | Analyze blocker, escalate if needed |

## Review Output Format

### Stage 1 (Hardware)
```markdown
Hardware Validation: APPROVED / FIX REQUIRED
Issues: [list or "None"]
```

### Stage 2 (Code Quality)
```markdown
Code Quality: APPROVED / FIX REQUIRED
MISRA C: N/M rules passed
Issues: [list or "None"]
```

## Red Flags - STOP

- Skipping Stage 1 review (hardware)
- Skipping Stage 2 review (code quality)
- Proceeding with unfixed issues
- "Just commit it" without reviews
- Starting Stage 2 before Stage 1 APPROVED
- Moving to next task while review has open issues

**ALL mean: STOP. Complete reviews first.**

## Anti-Patterns

| Bad Practice | Correct Approach |
|--------------|------------------|
| Skip hardware review | DMA overflow causes corruption |
| Skip code quality review | MISRA violations shipped |
| Multiple fixes at once | Fix one, review, repeat |
| "Close enough" on reviews | APPROVED only, no exceptions |

## Output

After all tasks:
```
Tasks: N/M completed
Reviews: All approved
Status: READY FOR VERIFICATION
Next: embedded-verification
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [lhbsaa](https://github.com/lhbsaa)
- **Source:** [lhbsaa/embedded-dev-skill](https://github.com/lhbsaa/embedded-dev-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-lhbsaa-embedded-dev-skill-embedded-implementation
- Seller: https://agentstack.voostack.com/s/lhbsaa
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
