Learn-skills.dev software-engineering-docs
Generate and maintain structured software engineering documentation for new or existing applications. Use when asked to create, update, or normalize requirements.md, use_cases.md, specification.md, architecture.md, uml.md, or tests.md from source code and existing docs, and when enforcing consistency and domain boundaries (for example, preventing endpoint-level details in high-level requirements).
git clone https://github.com/NeverSight/learn-skills.dev
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/ahernandezmiro/software-engineering-docs/software-engineering-docs" ~/.claude/skills/neversight-learn-skills-dev-software-engineering-docs && rm -rf "$T"
data/skills-md/ahernandezmiro/software-engineering-docs/software-engineering-docs/SKILL.mdSoftware Engineering Docs
Overview
Produce consistent, engineering-grade documentation from codebases and existing docs without documenting line-level implementation details. Keep requirements business-focused, keep interfaces and contracts explicit, and keep diagrams aligned with stated system boundaries.
Workflow Decision
Choose exactly one mode before writing:
modefull-generation
- Use when docs are missing, incomplete, or untrusted.
- Scan repository context, derive the system model, then generate all required docs.
modedoc-grounded-retrieval
- Use when docs already exist and the user asks questions or asks for targeted updates.
- Read existing docs first, extract relevant sections, reconcile conflicts, and answer/update with explicit cross-file references.
Core Rules
- Do not document implementation internals that should remain in code.
- Keep functional requirements at capability level. Avoid endpoint URLs, SQL, class names, or handler names in
.requirements.md - Put interface and integration contracts in
, not inspecification.md
.requirements.md - Keep all diagrams and narratives consistent with one shared system model.
- Use stable IDs across files:
- Functional requirements:
FR-### - Non-functional requirements:
NFR-### - Use cases:
UC-### - Contracts:
CON-### - External systems:
SYS-###
Step 1: Build Project Context
For existing applications, inspect:
- Product docs (
,README
, ADRs)docs/ - Domain model (entities/value objects/events)
- Boundary code (controllers/routes/consumers/producers)
- Integration points (queues, DBs, third-party services)
- Test structure (unit/integration/e2e coverage patterns)
Use
scripts/project_inventory.sh to collect a fast baseline inventory, then validate findings with targeted file reads.
Step 2: Build Canonical System Model
Before generating docs, define:
- Primary actors
- Internal systems/services and responsibilities
- External systems and contracts
- Core domain entities
- Primary business flows
- Quality attributes (security, reliability, scalability, observability, performance)
Treat this system model as the single source for all generated documents.
Step 3: Generate Documentation Set
Use
references/templates.md and generate documents in this order:
requirements.md
- Include: goals, scope,
,FR-*
, constraints, acceptance criteria at capability level.NFR-* - Exclude: endpoint paths, payload schemas, table names, framework-specific details.
use_cases.md
- Include all
stories with actor, trigger, preconditions, main flow, alternates, exceptions, success guarantees.UC-* - Include system interaction diagrams (Mermaid sequence/flowchart).
specification.md
- Include architecture style rationale (for example TDD/DDD/EDA/CQRS where applicable).
- Define high-level operational contracts
between systems.CON-* - For each contract include: purpose, inputs/outputs, preconditions, postconditions, failure modes, idempotency/retry notes.
architecture.md
- Include context/container-level system diagram.
- Include each system responsibility, ownership boundary, and dependency relation.
uml.md
- Include UML class/domain diagrams for significant entities.
- Include attributes and behavior-level methods only when domain-relevant.
- Omit persistence/ORM/tooling noise.
(if applicable)tests.md
- Map
/FR-*
to validation strategy.NFR-* - Summarize coverage by test level (unit/integration/e2e/non-functional).
- List critical scenarios and quality gates.
Step 4: Enforce Consistency Gates
Apply checks from
references/quality-gates.md before finalizing:
- Every
is covered by at least oneFR-*
.UC-* - Every
maps to one or moreUC-*
or internal operations.CON-* - Every external interaction in diagrams is represented in
.specification.md
map to measurable verification notes inNFR-*
.tests.md- No contradiction in terminology for systems/entities/actors across files.
- No endpoint-level details in
.requirements.md
Step 5: Doc-Grounded Retrieval and Update
When docs already exist and user asks for focused outputs:
- Read only relevant sections from existing docs first.
- Build a short trace map (
).requirement -> use case -> contract -> test - Return or update only the needed sections.
- Preserve existing IDs unless user asks for refactoring.
- If docs conflict, prefer newest authoritative file and call out the conflict explicitly.
References
Load only as needed:
references/templates.mdreferences/quality-gates.mdreferences/diagram-patterns.md