Kaiber
Generate, edit, and beat-sync AI video with leading models in one workspace.
fsd-writer
Generates or updates a Functional Specification Document (FSD) for any kind of system — embedded, cloud back-end, mobile, networking, SDR, or hybrid. Converts rough project descriptions into structured FSDs with requirements, test cases, and traceability. Supports initial generation and increment...
Full skill instructions
A general-purpose skill that turns a rough, unstructured project description into a structured Functional Specification Document (FSD) in Markdown, or surgically updates an existing FSD with new requirements, corrections, or expansions.
This skill:
It supports embedded systems, networking, SDR, IoT, cloud backends, mobile apps, multi-service orchestrations, and hybrid hardware/software projects.
Start a new FSD from scratch.
/fsd-writer
<rough description text>
Behavior:
Update, expand, refactor, or correct an already existing FSD.
/fsd-writer update <path-to-existing-fsd>
<delta description — changes, additions, clarifications, new constraints>
If no path is given, search the project for an existing FSD:
Documents/*-fsd.mdDocuments/*-FSD.mddocs/*-fsd.md*-fsd.mdBehavior:
Use when the rough description is too thin to infer architecture safely: fewer than ~3 sentences, no codebase to explore, or no clarity on protocol/platform/operator. The default behaviour for Mode A is to ask 1-3 questions per round and infer aggressively; Mode C escalates that into a depth-first interview that resolves the design tree branch by branch.
/fsd-writer --grill
<rough description text>
Behaviour:
CLAUDE.md — explore, do not ask (see Section 4.3).(assumed) markers on architecture-critical fields.Mode C is for the initial interview only. Once the FSD exists, switch to Mode B (evolve) for incremental changes.
This skill uses the following Claude Code tools:
| Tool | When |
|---|---|
| Read | Read existing FSD (evolve mode), read project files for context |
| Glob | Find existing FSD files, scan project structure for architecture clues |
| Grep | Search for protocols, frameworks, dependencies in project source |
| Write | Create new FSD file (initial mode) or full rewrite |
| Edit | Surgical updates to existing FSD sections (evolve mode) |
| AskUserQuestion | Clarifying questions when critical info is missing |
| Task (Explore) | Deep codebase exploration when the project has existing source code |
Before writing the FSD, the skill should gather context from the project when source code exists:
**/*.c, **/*.h, **/*.py, **/*.ts,
**/Cargo.toml, **/package.json, **/CMakeLists.txt, **/go.mod, etc.sdkconfig.defaults, platformio.ini,
docker-compose.yml, Makefile, build configs.When updating an existing FSD:
old_string / new_string pairs.The skill must ask clarifying questions when critical architecture-affecting information is missing. "Critical" means it affects:
Use the AskUserQuestion tool with:
Example (good — recommendation up front):
Q: How does the device connect?
Recommended: WiFi — matches the dashboard requirement and existing infra.
Other options: BLE, LoRa, Cellular, USB-only.
Example (bad — options without a pick):
Q: How does the device connect? WiFi / BLE / LoRa / Cellular / USB-only?
Multi-question rounds (Mode A only):
Questions:
1. How does the device connect?
Recommended: WiFi. Other: BLE, LoRa, Cellular, USB-only.
2. Do you need OTA firmware updates?
Recommended: Yes (WiFi). Other: Yes (BLE DFU), No.
3. Who is the primary operator?
Recommended: Installer/technician. Other: End user, Automated backend.
Explore before asking. Before asking ANY question, check whether it is answerable from project artefacts:
sdkconfig.defaults, platformio.ini, package.json,
Cargo.toml, CMakeLists.txt, docker-compose.yml.README.md, CLAUDE.md, and any existing FSD or design docs.If the answer is in the codebase, explore — do not ask the user. Asking a question whose answer is already in the repo wastes attention and signals that the skill did not gather context (Section 3.1).
Infer silently only when:
Safe inferences:
When inferring, mark the inference in the FSD with (assumed) or group them in
Section 5: Risks, Assumptions & Dependencies.
The skill dynamically scales FSD depth based on inferred system complexity (Low / Medium / High). Complexity is inferred from component count, protocol count, external integrations, real-time constraints, and domain.
For the full complexity tiers table, complexity signals, and per-section scaling behavior matrix, read references/complexity-scaling.md.
Given the rough description, the skill must extract or infer the following:
Derive a short, descriptive name:
Extract in 2-4 sentences: what problem is solved, for whom, in what environment.
Identify major components:
If components are implied but not explicit, infer and mark as assumptions.
Convert each described behavior into a stated requirement:
references/canonical-fsd-structure.md): FR-x.y/NFR-x.y [Must/Should/May]
(the lightweight default), or stable clause IDs + generated traceability (a
finer-grained, higher-assurance alternative for large FSDs — every assertion gets
a stable ID, tests cite it, code is @fsd-tagged, a tool generates the matrix).Example:
"Device sends sensor readings every minute and on threshold events."
Becomes:
Extract or infer key NFRs with priorities:
Each interface becomes its own L1 chapter (Part B) — there is no global Interface Specifications section in the Parts scheme. Per interface chapter:
references/canonical-fsd-structure.md).At minimum define:
Each phase must include: Scope, Deliverables, Exit Criteria, Dependencies.
Extract or infer:
If not covered in the description, provide a generic but plausible set for the domain.
From extracted requirements:
Give every FSD a layered component architecture (§2.4) that the test strategy falls out of (§x.0 Test Architecture, in the V&V chapter under Part E):
references/canonical-fsd-structure.md (the Parts scheme).references/test-architecture.md ("Source layout mirrors the
layers").Platform-independent — contents differ for embedded / cloud / mobile. For the
profiles, the diagram convention (and the Mermaid layout gotcha), and the matrix,
read references/test-architecture.md.
FSDs are organized by architectural layer, not by document-section type. After
the front matter (§1 Overview, §2 Architecture incl. §2.4 Component Layering, §3
Phases, §4 Risks), the body is grouped under unnumbered Part dividers that
mirror the §2.4 layers — Part A Application logic (L2), Part B Interfaces
(L1), Part C Foundation/transport (L0), Part D Cross-cutting concerns,
Part E Operations & Verification — followed by Appendices and an optional
Related ([[wikilinks]]) section.
Each interface, feature, and concern is its own self-contained chapter
(requirements + interface + behavior + failure modes together); chapters are
numbered flat across the whole document; depth is capped at four heading levels
(####). There is no global Functional Requirements or Interface
Specifications section — those dissolve into the component chapters.
For Low-complexity projects the Part dividers may be dropped (list the few
chapters directly, still in layer order). For the full skeleton, the
chapter-internal structure, section-inclusion rules, complexity scaling, and the
migration map from the older flat layout, read
references/canonical-fsd-structure.md.
Every FSD must carry traceability — but as a pointer to generated artifacts, never a hand-filled status table.
Rules:
FR/NFR item or a stable
clause (§6.4 conventions) — must be stated with a stable ID in its component
chapter and referenced by >= 1 test in the specs.GAP is
computed, not typed into the FSD.references/test-architecture.md §4).# (unnumbered); chapters are ## (numbered
flat across the document); sub-sections ###/####. Cap depth at #### —
four levels. Keep chapter numbering sequential with no gaps across all Parts.(assumed) inline for inferred details.If the user does not specify a target path:
Documents/<project-name-kebab-case>-fsd.md
Create the Documents/ directory if it does not exist.
Examples:
Documents/esp32-ble-hid-keyboard-fsd.mdDocuments/multi-tenant-billing-api-fsd.mdDocuments/offline-first-notes-app-fsd.mdIf the user provides a path, use it exactly. Do not relocate or rename the file.
When updating, write to the same file that was read. Confirm the path before writing if it was auto-detected.
For a complete example FSD snippet (medium-complexity BLE HID Keyboard project) showing expected tone, structure, and detail level, read references/example-output.md.
When updating an existing FSD, follow strict rules for what to preserve, update, add, and remove. Key principles: never renumber existing IDs, keep the traceability matrix generated (never hand-edited), flag contradictions before overwriting. For the complete evolve mode rules (preserve/update/add/remove/conflict resolution), read references/evolve-mode.md.
After generating or updating an FSD, the skill must verify:
<placeholder> or TODO text remains (flag to user if unresolvable).####.Report any checklist failures to the user before finalizing.
The skill core is domain-neutral. Some domains have recurring components,
detection signals, layer profiles, and standard test libraries; these live in
domain packs under references/domains/<domain>.md and are loaded only when
the project matches that domain — keeping the core applicable to any system.
references/domains/<domain>.md and apply it:
its layer profile (concrete L0/L1/L2 contents for §2.4 — which becomes the
body's Part/chapter spine), its tier names (for the §x.0 Test Architecture),
and its standard test libraries (feature detection → test specs to fold into
the V&V specs and the generated traceability matrix).references/test-architecture.md still apply; pick
tier names that fit the platform (e.g. cloud: unit / integration / staging).| Pack | Domain | File |
|---|---|---|
esp32 | ESP32 firmware (ESP-IDF / Arduino-ESP32): WiFi, BLE, MQTT, OTA, NVS, captive portal, watchdog, logging | references/domains/esp32.md |
Create references/domains/<domain>.md following the same shape: detection
signals · layer profile (§2.4) · tier names (§x.0 Test Architecture) · standard test libraries
(a feature-detection table pointing to spec files under
references/domains/<domain>/). Then add a row to the table above.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience