internal/assets/skills/sdd-spec/SKILL.md
Write SDD delta specs with requirements and scenarios. Trigger: orchestrator launches spec work for a change.
npx skillsauth add gentleman-programming/gentle-ai 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.
ORCHESTRATOR GATE: If you loaded this skill via the
skill()tool, you are the ORCHESTRATOR — STOP. Do NOT execute these instructions inline. Delegate to the dedicatedsdd-specsub-agent using your platform's delegation primitive (e.g.,task(...), sub-agent invocation, etc.). This skill is for EXECUTORS only.
If you ARE the sdd-spec sub-agent (NOT the orchestrator), the gate above does NOT apply to you. Continue with the phase work below. Do NOT delegate. Do NOT call the Skill tool. You are the executor — execute.
Generated technical artifacts default to English. Do not inherit the user's conversational language or the active persona's regional voice for SDD artifacts unless the user explicitly requests that artifact language or the project convention requires it.
If Spanish technical artifacts are explicitly requested, use neutral/professional Spanish unless the user explicitly asks for a regional variant.
Public/contextual comments follow the target context language by default. Explicit user language or tone overrides win; Spanish comments default to neutral/professional Spanish unless the user or target context clearly calls for regional tone.
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, REMOVED, or RENAMED from the system's behavior.
From the orchestrator:
engram | openspec | hybrid | none)Follow Section B (retrieval) and Section C (persistence) from
skills/_shared/sdd-phase-common.md.
sdd/{change-name}/proposal (required). If specs span multiple domains, concatenate into a single artifact with domain headers. Save as sdd/{change-name}/spec.skills/_shared/openspec-convention.md.Follow Section A from skills/_shared/sdd-phase-common.md.
Read the proposal's Capabilities section — this is your primary contract:
FOR EACH entry under "New Capabilities":
├── This becomes a NEW full spec: openspec/specs/<capability-name>/spec.md
└── Write a complete spec (not a delta) — no existing behavior to reference
FOR EACH entry under "Modified Capabilities":
├── This becomes a DELTA spec: openspec/changes/{change-name}/specs/<capability-name>/spec.md
└── Read existing openspec/specs/<capability-name>/spec.md first — your delta modifies it
If the proposal has no Capabilities section (older format), fall back to inferring from "Affected Areas". But always prefer the explicit Capabilities mapping when present.
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.
When writing a ## MODIFIED Requirements section, follow this exact workflow:
1. Locate the requirement in openspec/specs/{domain}/spec.md
2. COPY the ENTIRE requirement block — from `### Requirement:` through ALL its scenarios
3. PASTE it under `## MODIFIED Requirements`
4. EDIT the copy to reflect the new behavior
5. Add "(Previously: {one-line summary of what changed})" under the requirement text
Why copy-full-then-edit?
→ The archive step REPLACES the requirement in main specs with your MODIFIED block
→ If your block is partial, the archive will lose scenarios you didn't copy
→ Common pitfall: only writing the changed scenario and losing the rest
→ If adding NEW behavior WITHOUT changing existing behavior, use ADDED instead
# 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}
{Full updated requirement text — replaces the existing one entirely}
(Previously: {what it was before, in one line})
#### Scenario: {Unchanged scenario — keep if still valid}
- GIVEN {precondition}
- WHEN {action}
- THEN {outcome}
#### Scenario: {Updated or new scenario}
- GIVEN {updated precondition}
- WHEN {updated action}
- THEN {updated outcome}
## REMOVED Requirements
### Requirement: {Requirement Being Removed}
(Reason: {why this requirement is being deprecated/removed})
(Migration: {what replaces it, or "None" if no migration is needed})
## RENAMED Requirements
### Requirement: {Old Requirement Name} → {New Requirement Name}
(Reason: {why the requirement is being renamed})
(Migration: {how references/tests/docs should update, or "None" if no migration is needed})
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.
Follow Section C from skills/_shared/sdd-phase-common.md.
specsdd/{change-name}/specarchitectureReturn 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.yamlskills/_shared/sdd-phase-common.md.| 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 |
tools
Shared SDD references for installed skills. Not invokable.
tools
<!-- section:model-capable --> --- name: sdd-verify description: "Trigger: SDD verification phase, verify change. Execute tests and prove implementation matches specs, design, and tasks." disable-model-invocation: true user-invocable: false license: MIT metadata: author: gentleman-programming version: "3.0" delegate_only: true --- > **ORCHESTRATOR GATE**: If you loaded this skill via the `skill()` tool, you are > the ORCHESTRATOR — STOP. Do NOT execute these instructions inline. Delegate
tools
Create an SDD change proposal with intent, scope, and approach. Trigger: orchestrator launches proposal work for a change.
testing
Archive a completed SDD change by syncing delta specs. Trigger: orchestrator launches archive after implementation and verification.