dot_config/opencode/skills/sdd-spec/SKILL.md
Write specifications with requirements and scenarios (delta specs for changes). Trigger: When the orchestrator launches you to write or update specs for a change.
npx skillsauth add adacosdev/dotfiles sdd-specInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a sub-agent responsible for writing SPECIFICATIONS. You take the proposal and produce delta specs — structured requirements and scenarios that describe what's being ADDED, MODIFIED, or REMOVED from the system's behavior.
From the orchestrator:
engram | openspec | hybrid | none)Read and follow skills/_shared/persistence-contract.md for mode resolution rules.
If mode is engram:
Read dependencies (two-step — search returns truncated previews):
mem_search(query: "sdd/{change-name}/proposal", project: "{project}") → get observation IDmem_get_observation(id: {id from step 1}) → full proposal content (REQUIRED)If specs span multiple domains, concatenate into a single artifact with domain headers.
Save your artifact:
mem_save(
title: "sdd/{change-name}/spec",
topic_key: "sdd/{change-name}/spec",
type: "architecture",
project: "{project}",
content: "{your full spec markdown — all domains concatenated}"
)
topic_key enables upserts — saving again updates, not duplicates.
(See skills/_shared/engram-convention.md for full naming conventions.)
If mode is openspec: Read and follow skills/_shared/openspec-convention.md.
If mode is hybrid: Follow BOTH conventions — persist to Engram (single concatenated artifact) AND write domain files to filesystem.
If mode is none: Return result only. Never create or modify project files.
Do this FIRST, before any other work.
mem_search(query: "skill-registry", project: "{project}") → if found, mem_get_observation(id) for the full registry.atl/skill-registry.md from the project rootFrom the registry, identify and read any skills whose triggers match your task. Also read any project convention files listed in the registry.
From the proposal's "Affected Areas", determine which spec domains are touched. Group changes by domain (e.g., auth/, payments/, ui/).
IF mode is openspec or hybrid: If openspec/specs/{domain}/spec.md exists, read it to understand CURRENT behavior. Your delta specs describe CHANGES to this behavior.
IF mode is engram: Existing specs were already retrieved from Engram in the Persistence Contract. Skip filesystem reads.
IF mode is none: Skip — no existing specs to read.
IF mode is openspec or hybrid: Create specs inside the change folder:
openspec/changes/{change-name}/
├── proposal.md ← (already exists)
└── specs/
└── {domain}/
└── spec.md ← Delta spec
IF mode is engram or none: Do NOT create any openspec/ directories or files. Compose the spec content in memory — you will persist it in Step 5.
# Delta for {Domain}
## ADDED Requirements
### Requirement: {Requirement Name}
{Description using RFC 2119 keywords: MUST, SHALL, SHOULD, MAY}
The system {MUST/SHALL/SHOULD} {do something specific}.
#### Scenario: {Happy path scenario}
- GIVEN {precondition}
- WHEN {action}
- THEN {expected outcome}
- AND {additional outcome, if any}
#### Scenario: {Edge case scenario}
- GIVEN {precondition}
- WHEN {action}
- THEN {expected outcome}
## MODIFIED Requirements
### Requirement: {Existing Requirement Name}
{New description — replaces the existing one}
(Previously: {what it was before})
#### Scenario: {Updated scenario}
- GIVEN {updated precondition}
- WHEN {updated action}
- THEN {updated outcome}
## REMOVED Requirements
### Requirement: {Requirement Being Removed}
(Reason: {why this requirement is being deprecated/removed})
If this is a completely new domain, create a FULL spec (not a delta):
# {Domain} Specification
## Purpose
{High-level description of this spec's domain.}
## Requirements
### Requirement: {Name}
The system {MUST/SHALL/SHOULD} {behavior}.
#### Scenario: {Name}
- GIVEN {precondition}
- WHEN {action}
- THEN {outcome}
This step is MANDATORY — do NOT skip it.
If mode is engram:
mem_save(
title: "sdd/{change-name}/spec",
topic_key: "sdd/{change-name}/spec",
type: "architecture",
project: "{project}",
content: "{your full spec markdown from Step 4 — all domains concatenated}"
)
If mode is openspec or hybrid: the file was already written in Step 4.
If mode is hybrid: also call mem_save as above (write to BOTH backends).
If you skip this step, the next phase (sdd-tasks) will NOT be able to find your specs and the pipeline BREAKS.
Return to the orchestrator:
## Specs Created
**Change**: {change-name}
### Specs Written
| Domain | Type | Requirements | Scenarios |
|--------|------|-------------|-----------|
| {domain} | Delta/New | {N added, M modified, K removed} | {total scenarios} |
### Coverage
- Happy paths: {covered/missing}
- Edge cases: {covered/missing}
- Error states: {covered/missing}
### Next Step
Ready for design (sdd-design). If design already exists, ready for tasks (sdd-tasks).
rules.specs from openspec/config.yamlstatus, executive_summary, detailed_report (optional), artifacts, next_recommended, and risks| Keyword | Meaning | |---------|---------| | MUST / SHALL | Absolute requirement | | MUST NOT / SHALL NOT | Absolute prohibition | | SHOULD | Recommended, but exceptions may exist with justification | | SHOULD NOT | Not recommended, but may be acceptable with justification | | MAY | Optional |
documentation
Create or update the skill registry for the current project. Scans user skills and project conventions, writes .atl/skill-registry.md, and saves to engram if available. Trigger: When user says "update skills", "skill registry", "actualizar skills", "update registry", or after installing/removing skills.
documentation
Creates new AI agent skills following the Agent Skills spec. Trigger: When user asks to create a new skill, add agent instructions, or document patterns for AI.
testing
Validate that implementation matches specs, design, and tasks. Trigger: When the orchestrator launches you to verify a completed (or partially completed) change.
testing
Break down a change into an implementation task checklist. Trigger: When the orchestrator launches you to create or update the task breakdown for a change.