mit einem Klick
writing-plans
// Use when an approved spec exists and you need a bite-sized, file-level implementation plan before any code is written. Produces a plan ready for executing-plans or subagent dispatch.
// Use when an approved spec exists and you need a bite-sized, file-level implementation plan before any code is written. Produces a plan ready for executing-plans or subagent dispatch.
Use before any creative work — designing a new amdsmi_* API, adding a CLI command, building a feature, or modifying behavior. Explores intent, requirements, and design before any code is written.
Use when facing 2+ independent problems with no shared state — e.g., unrelated test failures in different subsystems, multiple independent bug investigations, parallel research tasks. Dispatch one focused subagent per domain instead of investigating sequentially.
Use when a written implementation plan exists at docs/dev/plans/ and you need to execute it task-by-task in the current session with verification at each step.
Use when finishing an amd-smi development branch — consolidating commits into logical groups with clean messages AND deciding how to integrate the work (merge to develop, push and open PR, keep as-is, or discard). Covers commit restructuring plus the merge/PR/cleanup workflow.
Use when encountering any bug, test failure, build failure, or unexpected behavior in amd-smi — before proposing any fix. Enforces root-cause investigation before symptom patching.
Use when implementing any amd-smi feature, bug fix, or behavior change — before writing implementation code. Enforces strict RED-GREEN-REFACTOR: failing test first, watch it fail, minimal code to pass, refactor.
| name | writing-plans |
| description | Use when an approved spec exists and you need a bite-sized, file-level implementation plan before any code is written. Produces a plan ready for executing-plans or subagent dispatch. |
Translate an approved spec into a concrete plan an engineer (or fresh subagent) with zero project context can execute task-by-task. DRY. YAGNI. TDD. Frequent commits.
Announce at start: "I'm using the writing-plans skill to create the implementation plan."
Save plans to: docs/dev/plans/YYYY-MM-DD-<feature-name>.md
docs/dev/specs/YYYY-MM-DD-<topic>-design.mdproject-layout rule)If no spec exists, STOP and invoke the brainstorming skill first.
If the spec covers multiple independent subsystems, it should have been split during brainstorming. If it wasn't, push back: each plan must produce working, testable software on its own. Suggest splitting before writing the plan.
Before writing tasks, map every file that will be created or modified and what each is responsible for. This locks in decomposition decisions.
For amd-smi work, this map almost always includes:
| Layer | Typical Files |
|---|---|
| Public header | include/amd_smi/amdsmi.h |
| C++ impl | src/amd_smi/amd_smi.cc, rocm_smi/src/*.cc |
| Wrapper | py-interface/amdsmi_wrapper.py (auto-generated — task = run tools/update_wrapper.sh) |
| Python API | py-interface/amdsmi_interface.py |
| CLI | amdsmi_cli/amdsmi_commands.py, amdsmi_parser.py, amdsmi_helpers.py |
| Tests | tests/amd_smi_test/, tests/python_unittest/ |
| Docs | docs/, CHANGELOG.md |
| Build | CMakeLists.txt, RPM/, DEBIAN/ |
Tasks should follow the cascade order so each commit builds independently.
Every plan starts with:
# <Feature Name> Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL — use `executing-plans` (or the `amdsmi-development` agent's subagent dispatch) to implement task-by-task. Steps use checkbox (`- [ ]`) syntax.
**Goal:** <one sentence>
**Spec:** <link to spec file>
**Architecture:** <2-3 sentences>
**Cascade layers touched:** <list>
---
Each task is a self-contained unit producing a single commit. Steps within a task are 2–5 minute actions.
### Task N: <Component Name>
**Files:**
- Create: `exact/path/to/file.cc`
- Modify: `exact/path/to/existing.h:42-58`
- Test: `tests/amd_smi_test/test_file.cc`
- [ ] **Step 1: Write the failing test**
```cpp
TEST_F(AmdSmiTest, AmdsmiGetNewFeature) {
amdsmi_status_t status = amdsmi_get_gpu_new_feature(handle, &out);
EXPECT_EQ(status, AMDSMI_STATUS_SUCCESS);
}
```
- [ ] **Step 2: Run test — verify it fails**
```bash
cd build && make -j$(nproc) amdsmitst
./tests/amd_smi_test/amdsmitst --gtest_filter=AmdSmiTest.AmdsmiGetNewFeature
```
Expected: FAIL — symbol not defined.
- [ ] **Step 3: Implement** (show full code, no `// ...existing...`)
- [ ] **Step 4: Run test — verify it passes**
- [ ] **Step 5: Commit**
```bash
git add include/amd_smi/amdsmi.h src/amd_smi/amd_smi.cc tests/amd_smi_test/test_file.cc
git commit -s -m "[AMD-SMI] Add amdsmi_get_gpu_new_feature"
```
The following are plan failures. Never write them:
TBD, TODO, implement later, fill in detailsEvery step that changes code must show the code.
After writing the complete plan, re-read it against the spec:
clear_layers() in Task 3 and clearAllLayers() in Task 7 is a bug)Fix inline. Move on.
After saving the plan, offer the user a choice:
Plan saved to
docs/dev/plans/<filename>.md. Two execution options:
- Subagent-driven (recommended for multi-task plans) — invoke the
amdsmi-developmentagent or planning agent, fresh subagent per task with review between tasks- Inline execution — execute tasks in this session using the
executing-plansskill, batched with checkpointsWhich approach?
If the planning agent dispatched this skill, return the plan path and the recommended execution mode rather than offering interactively.