software-design-doc
Scannednpx machina-cli add skill RJTPP/agent-software-doc-skills/software-design-doc --openclawSoftware Design Description
Create or review an SDD using an IEEE 1016-inspired structure while staying pragmatic for project context.
Resources
- Use references/sdd-completeness-checklist.md for completeness gates and required content coverage.
- Use references/sdd-template.md as the default SDD structure.
- Use references/sdd-template-implementation-deep.md when detail profile is
implementation-deep. - Use references/viewpoint-mapping.md to choose viewpoints and map them to concrete views.
- Use references/copyright-safety.md for copyright/standards guardrails.
- Use references/quality-attribute-scenarios.md for quality-attribute scenario patterns.
- Use scripts/check_sdd_structure.py to validate required headings and core formalization sections.
- Use scripts/count_text_size.py to inspect file size quickly (
chars,words,lines) and optional Markdown heading breakdown (--by-heading).
Mandatory preflight sequence:
- Read available context first (PRD/SDD/repo docs relevant to the request).
- Optionally run a size check for large docs:
python3 scripts/count_text_size.py <path> --by-headingor scan all docs:python3 scripts/count_text_size.py --glob "**/*.md". - Recommend mode, detail profile, and interaction option from that context.
- Ask for user confirmation before drafting.
Do not start drafting until preflight confirmation is received, unless user explicitly uses /fast or /assume.
Copyright and Standards Safety (Mandatory)
- Treat IEEE 1016-2009 as a conceptual reference only.
- Use original wording in all generated outputs.
- Do not reproduce or closely paraphrase any copyrighted standard text, tables, or figures.
- Do not provide clause text on request; provide section-alignment guidance and ask the user to consult their licensed standard copy for normative wording.
- When referring to IEEE structure, cite section identifiers only (for example
Clause 4), not normative text. - If a disclaimer is needed, include one concise line only (for example,
IEEE 1016-inspired internal guidance, unofficial.).
Defaults
- Mode:
draft+review. - Completeness strictness:
pragmatic. - Detail profile:
ieee-pragmatic. - Codebase inspection: enabled when repository context is available.
- Output files:
docs/SDD.mddocs/SDD-gap-report.md
If the user specifies a different mode, follow the user preference. If the user specifies a different output path, only accept a safe relative path inside the project folder.
Mode shortcuts accepted in user prompts:
/deor/draft+review->draft+review/dor/draft-only->draft-only/ror/review-only->review-only
Mode resolution precedence:
- Explicit shortcut token in the prompt (
/de,/d,/r, or long form) - Clear natural-language intent (for example
review only) - Default to
draft+review
Interaction options:
/ask(default): confirm scope/mode/inputs before drafting and request missing critical info./fast: proceed immediately with reasonable assumptions, then list assumptions in the output./assume: proceed with assumptions even if inputs are incomplete, and clearly mark assumption-based sections.
Detail profile options:
ieee-pragmatic(default): strict base structure with concise implementation guidance.implementation-deep: keep all base sections and add deeper implementation sections.
If user asks for detailed, implementation handoff, architecture deep dive, ERD/data dictionary, or full design package, use implementation-deep.
Output Path Safety (Mandatory)
- Only write outputs within the repository root (project folder).
- Allow custom subpaths when they remain inside the repository (for example
docs/reviews/v2/SDD.md). - Reject absolute paths and any path containing parent traversal (
..). - Never write to sensitive paths (for example
.git/,.github/workflows/,/etc/, home directories). - Never build shell commands by interpolating user-provided paths.
Input Contract
Expect at least one of:
- project requirements/PRD context, or
- an existing SDD to review/update.
If neither is available, stop and ask for missing inputs before drafting. Do not invent project-specific architecture details.
Useful optional inputs:
- architecture constraints,
- technology stack constraints,
- required viewpoints,
- completeness strictness override,
- explicit output path inside the project folder.
Before drafting, perform an intake check:
- Confirm mode, detail profile, and output path.
- Confirm whether repository inspection should be used.
- Identify missing critical inputs (PRD context, existing SDD, key constraints).
If critical inputs are missing, ask concise clarification questions first.
Only skip clarification when user explicitly uses /fast or /assume.
Modes
draft+review (default)
- Draft or update
docs/SDD.md. - Run completeness/gap analysis.
- Write both SDD and gap report files.
draft-only
- Draft or update
docs/SDD.md. - Skip gap report unless requested.
review-only
- Do not rewrite source SDD unless user asks.
- Produce
docs/SDD-gap-report.mdwith concrete remediation actions.
Required Workflow
- Discover context
- Inspect repository docs and key code structure by default.
- Identify available artifacts: PRD, existing SDD, architecture notes, APIs, schemas.
- Identify stakeholders and concerns
- Extract explicit and implied design stakeholders.
- Convert requirements/risks/NFRs into design concerns.
- Select viewpoints
- Choose only viewpoints that address identified concerns.
- Mark omitted viewpoints as
Not Applicablewith justification.
- Draft or update SDD
- Use section order from
references/sdd-template.md(or deep template) as the canonical default. - Use original wording; do not quote or mirror copyrighted standards text.
- Preserve required headings; reordering is allowed when it improves clarity for the project context.
- Keep core architecture sections at the architectural abstraction level (layers/components/responsibilities), not file-by-file implementation listings.
- Put concrete file/module paths in implementation-oriented sections (
12.*, appendices, or traceability mappings) when needed. - Include Mermaid diagrams when they improve clarity.
- Always include the core-3 formal artifacts:
## 4. Architecture Overview### 5.1 Viewpoint-to-View Mapping### 6.1 Design Element Catalog (Formal Definitions)with fields:Component,Responsibility,Inputs,Outputs,Dependencies,Public Functions
- Optional enhancements:
- Include quality-attribute scenarios using
Stimulus,Environment,Response,Measurementwhen quality concerns are material. - Include a short future-evolution note in
6.5and/or11.xwhen persistent data is currently absent/static. - If optional enhancements are omitted, add a concise
N/A rationale.
- Include quality-attribute scenarios using
- If detail profile is
implementation-deep, include extension sections:## 11. Data Design## 12. Component Design## 13. Human Interface Design## 14. Requirements Traceability Matrix## 15. Appendices## 16. Design Decisions (Locked)
- Run pragmatic completeness pass
- Check coverage against core IEEE-inspired structure themes without reproducing standard text.
- Check concern-to-view coverage and missing decisions.
- Ensure architecture/viewpoint/element formalization is explicit and reviewable.
- Check consistency of terminology, component names, version references, and cited artifacts across the document.
- Allow justified simplification for project scale.
- Write outputs
- Ensure parent directory exists.
- Resolve output paths safely inside repository root only.
- For
draft+reviewordraft-only, writedocs/SDD.mdby default. - For
draft+revieworreview-only, writedocs/SDD-gap-report.mdby default. - In
review-only, do not modify source SDD unless explicitly requested.
- Validate generated outputs
- Run
python3 scripts/check_sdd_structure.py --mode <draft+review|draft-only|review-only> --docs-dir <output-dir> --profile <ieee-pragmatic|implementation-deep>. - For evals/CI strictness, run with
--require-all-subsections. - Section completeness is strict by default; use
--allow-soft-sectionsonly when section checks should be advisory. - In
review-only, use--allow-input-sddif source SDD is colocated with generated gap report. - Treat checker hard-fail results as blockers and revise outputs before finalizing.
Canonical Base Section Set (Template Order)
Use these headings as the default template sequence:
## Document Control## 1. Introduction## 2. System Overview## 3. Stakeholders and Design Concerns## 4. Architecture Overview## 5. Viewpoints and Views## 6. Design Elements and Constraints## 7. Traceability## 8. Design Rationale## 9. Risks and Mitigations## 10. Summary
Gap Report Format
Use these headings in order:
# SDD Gap Report## Scope and Inputs## Missing Required Content## Weak or Implicit Rationale## Traceability Gaps## Recommended Fixes (Priority Ordered)## Coverage Summary
Pragmatic Completeness Rules
- Treat mapped core content areas as required unless genuinely out of scope.
- Treat core architecture/view/element formalization (
4,5.1,6.1with formal fields) as required. - Treat quality scenarios and future-evolution notes as recommended enhancements; allow omission with concise
N/A rationale. - If an item is omitted, provide a short
N/A rationale. - Favor correctness and implementability over ceremonial detail.
- Keep terminology consistent with the project domain.
- Prefer
UX consistency/visual design constraintsover vague labels such asaesthetics. - Prefer
single consolidated stylesheetovermonolithic stylesheet. - If the user asks for exact IEEE wording, decline and provide a non-verbatim summary.
Output Quality Bar
- SDD sections are complete enough for implementation handoff.
- Architecture overview is explicit and includes logical plus deployment/runtime depiction.
- Viewpoint choices are explicit with viewpoint-to-view mapping.
- Design elements are formally defined with component fields.
- Terminology, component names, and version/references are internally consistent across sections.
- Gap report recommendations are actionable and prioritized.
- No machine-specific assumptions or absolute local-only dependencies in document content.
Example Requests That Should Trigger This Skill
- "Write an SDD with an IEEE 1016-inspired structure from this PRD and repo structure."
- "Review this SDD and list standards gaps with fixes."
- "Update our SDD after moving from monolith to microservices."
- "Map PRD requirements to design sections and identify missing architecture details."
Source
git clone https://github.com/RJTPP/agent-software-doc-skills/blob/main/skills/software-design-doc/SKILL.mdView on GitHub Overview
This skill helps teams draft, review, and update Software Design Descriptions using an IEEE 1016-inspired structure with explicit architecture/views/elements formalization and output structure validation. It supports writing from PRDs, assessing completeness, aligning to IEEE concepts, mapping requirements, producing architecture/interface/data sections, and generating gap reports with remediation actions, including updates after architecture changes.
How This Skill Works
Begin by reading the relevant PRD and repository context, then select an appropriate SDD structure (default sdd-template or deep variant for detailed designs). Use viewpoint-mapping to assign viewpoints to concrete views, and map PRD requirements to design content. Validate the document with scripting tools (check_sdd_structure.py and count_text_size.py), then produce docs/SDD.md and docs/SDD-gap-report.md with the required sections and remediation actions.
When to Use It
- Draft a new SDD from a PRD or architectural concept
- Assess SDD quality, completeness, and conformance to IEEE-inspired structure
- Align an existing SDD to IEEE 1016 concepts and viewpoints
- Map PRD requirements to design sections (architecture/interface/data)
- Generate a gap report with remediation actions or perform SDD gap-analysis after architecture changes
Quick Start
- Step 1: Read the PRD and relevant repo/docs context for the request
- Step 2: Confirm mode/detail profile and interaction option with the user
- Step 3: Draft SDD sections using the default template and validate structure with scripts
Best Practices
- Start from the default SDD template (references/sdd-template.md) and map PRD requirements to the corresponding design sections
- Use viewpoint-mapping.md to select appropriate viewpoints and map them to concrete views
- Run preflight validation with scripts/check_sdd_structure.py to ensure required headings and core sections exist
- Use scripts/count_text_size.py to gauge doc size and optional heading breakdown for large docs
- Document remediation actions clearly in the gap report and track updates after architecture changes
Example Use Cases
- Draft an SDD for a new authentication service within a microservices architecture
- Review and improve an SDD for a payments workflow, focusing on data design and interfaces
- Align an SDD for a mobile app with offline data synchronization to IEEE concepts
- Create a gap report to remediate missing security requirements in an existing SDD
- Update an SDD after introducing a new data lake architecture to reflect interface changes