sd-write-spec

Writes IEEE 830-style FR and NFR requirement documents from intent and discovery inputs.

3|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/runlegion/legion --skill sd-write-spec-runlegion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sd-write-spec
Source: https://github.com/runlegion/legion/tree/main/plugin/skills/sd-write-spec
Command: npx skills add https://github.com/runlegion/legion --skill sd-write-spec-runlegion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Turning discovery-layer judgment (intents, insights, journeys, blueprints) into a buildable specification is error-prone: requirements get invented, ambiguities get silently resolved, and traceability is lost. This Skill derives a complete, traceable requirement set in one pass so a downstream executor can build without guessing. ## Core Features & Use Cases - Traceable requirement derivation: Every SHALL cites its earning source via a traces_to grammar (settled proposals, supported insights, moments of truth, boundary rules), and unproven ground routes to RESEARCH documents instead of becoming requirements. - Two input modes: Intent-only mode for system work, and service-design mode that additionally consumes ecosystem, persona, journey, blueprint, and Discovery documents. - Escalation over invention: Contradictions and gaps are escalated to the caller rather than resolved in-body, and missing or schema-invalid inputs park the run. - Instrumentation: Emits uncertainty predictions for set coverage and each RESEARCH hypothesis, witnessed later by the crit step. - Use Case: Given a settled intent document for a CLI surface, generate the full FR/NFR set with typed ids (FR-CMD-001, NFR-CMD-001), validate samples against the store schemas, batch-create the documents, and report escalations. ## Quick Start Ask the agent to write the spec for a scope by naming its intent document and surface, for example: write the requirement set for intent INT-AUTH on the auth surface.

Frequently Asked Questions about sd-write-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a software requirement specification from discovery documents?

Provide the intent document (and, for product work, the ecosystem, personas, journeys, blueprints, and Discovery). The skill derives FR and NFR documents in one pass, each traced to the source that earned it, and creates them in the document store with typed ids.

What is the difference between intent-only and service-design mode?

Intent-only mode specs system work from the intent alone, using its proposals, current_state, actors, boundaries, and open questions. Service-design mode adds the landed ecosystem, persona, journey, blueprint, and Discovery documents, with insight verdicts determining what earns a SHALL.

What happens when a requirement has no evidence to support it?

Unproven ground never becomes a SHALL. A needs_pressure_test proposal or blocked insight routes to a RESEARCH document with an UNTESTED finding, and the dependent FR names the dependency in its description.

Does the skill resolve contradictions found in the input documents?

No. Contradictions and silent gaps are escalated to the caller, never resolved in-body. The set is landed as far as it goes, the gap is named in the affected requirement, and the report carries every escalation.

Why must every requirement include a traces_to field?

The traces_to string names the source tokens that earned the requirement plus the priority derivation, so a rule-following executor can act without having done the upstream thinking. A SHALL with no valid earner is a stop, not a requirement.

When should this skill not be used?

Do not use it to write issues (that is the downstream issue-writer's job), to land constraint documents (the doc-type does not exist), or to move requirements past draft status, since acceptance belongs to the separate crit step.