skills/sdd-apply/SKILL.md
Implements SDD plan tasks following specs and design, marking progress in tasks.md as it goes. Trigger: /sdd-apply <change-name>, implement change, apply SDD tasks, write code for change.
npx skillsauth add fearovex/claude-config sdd-applyInstall 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.
Implements the plan tasks following specs and design, marking progress as it goes.
Triggers: /sdd-apply <change-name>, implement change, write code, apply changes, sdd apply
The implementation phase converts the task plan into real code. The implementer follows the specs (WHAT to do) and the design (HOW to do it), marking tasks as completed in real time.
Project-local → global, in order:
1. .claude/skills/sdd-apply/SKILL.md (project-local — highest priority)
2. ~/.claude/skills/sdd-apply/SKILL.md (global catalog — fallback)
See docs/SKILL-RESOLUTION.md for the full algorithm.
0a. Project context — follow skills/_shared/sdd-phase-common.md Section F (Project Context Load). Non-blocking.
0b. Spec context preload — follow skills/_shared/sdd-phase-common.md Section G (Spec Context Preload). Non-blocking.
0c. Tech skill preload:
design.md File Change Matrix via mem_search/mem_get_observation. If every file extension is in [.md, .yaml, .yml] → documentation-only. Report "Tech skill preload: skipped (documentation-only change)" and skip the rest of Step 0c.ai-context/stack.md — extract technology keywords (case-insensitive, free text).config.yaml at project root — read project.stack keys."Tech skill preload: skipped (no stack source found)" and skip.| Keyword(s) | Skill path |
|---------------------------|-----------------------------------------------|
| always (non-doc changes) | ~/.claude/skills/solid-ddd/SKILL.md |
| react native, expo | ~/.claude/skills/react-native/SKILL.md |
| react | ~/.claude/skills/react-19/SKILL.md |
| next, nextjs, next.js | ~/.claude/skills/nextjs-15/SKILL.md |
| typescript, ts | ~/.claude/skills/typescript/SKILL.md |
| zustand | ~/.claude/skills/zustand-5/SKILL.md |
| tailwind | ~/.claude/skills/tailwind-4/SKILL.md |
| go, golang | ~/.claude/skills/go-testing/SKILL.md |
Order matters: react native/expo come before react. The always row is skipped when the scope guard triggered.
"<skill-name>: skipped (file not found at <path>)". This step MUST NOT produce status: blocked or status: failed."Technology skills loaded: [typescript, react-19, tailwind-4]" (or "none").0d. Initialize retry counter:
apply_max_retries from project config.yaml if present. Otherwise default to 3.attempt_counter = {} (in-memory, per-invocation). Each /sdd-apply run starts fresh.attempt_counter[task_id] >= max_attempts before a new attempt → task immediately [BLOCKED], phase halts. User must resolve and re-run /sdd-apply to resume.Read in this order:
mem_search(query: "sdd/{change-name}/tasks") → mem_get_observation(id). Engram unreachable → orchestrator passes inline.sdd/{change-name}/spec.sdd/{change-name}/design.config.yaml (if present) — read diagnosis_commands and rules.ai-context/conventions.md — code conventions.Check three sources in priority order:
Source 1 — explicit config (highest priority): read config.yaml for tdd key.
tdd: true or tdd.enabled: true → TDD ON. Report "TDD mode: ON (source: config)". Skip Sources 2 and 3.tdd: false or tdd.enabled: false → TDD OFF. Report "TDD mode: OFF (explicitly disabled in config)". Skip Sources 2 and 3.Source 2 — testing skills in project CLAUDE.md (playwright, pytest, vitest, jest, etc.) → signal_count++.
Source 3 — test file patterns in codebase (*.test.*, *.spec.*, test_*, *_test.*) → signal_count++.
| signal_count | TDD | Report |
|----------------|-----|---------------------------------------------------------|
| ≥ 2 | ON | "TDD mode: ON (source: testing skill + test files)" |
| 1 | OFF | "TDD mode: OFF ([signal found] but insufficient signals)" |
| 0 | OFF | "TDD mode: OFF" |
This step MUST NOT install frameworks, create test files, or modify config.
The orchestrator specifies which tasks to implement (e.g. "Phase 1, tasks 1.1–1.3"). Implement ONLY those. Do not advance to the next ones without confirmation.
Before any file change for an assigned task: a DIAGNOSIS block MUST be written.
No file write or edit is permitted until then.
4.1 Read every file to be modified in its current state. For file-creation tasks, read related files used as pattern references.
4.2 Run diagnostic commands from config.yaml diagnosis_commands if present (read-only expected). Non-zero exit recorded as failure in the Risk field but does NOT block. Absent → use auto-detected read-only commands relevant to the task or none. Note "diagnosis_commands: not configured".
4.3 Write the DIAGNOSIS block in the task output:
DIAGNOSIS — Task X.Y:
1. Files to be modified: [list of paths]
2. Diagnostic command outputs:
- [command]: [output summary]
(or "none applicable" / "diagnosis_commands: not configured")
3. Current behavior observation: [what the code actually does now]
4. Relevant data/state: [key data values, config, environment state]
5. Hypothesis: "The bug/issue is [X] because [Y].
Changing [Z] will achieve [expected behavior] because [rationale]."
6. Risk: [what could go wrong with this change]
For file-creation tasks: field 3 describes the gap (what is absent); field 5 describes what the new file is intended to do and why.
4.4 Contradiction check — if diagnosis reveals the current state contradicts task assumptions, produce a MUST_RESOLVE warning and pause:
⚠️ MUST_RESOLVE — Diagnosis finding:
Task X.Y assumes [A], but current state shows [B].
This may indicate the task description is based on incorrect assumptions.
Confirm how to proceed:
Option 1: [proceed with updated understanding]
Option 2: [revise task description]
Multiple contradictions → list each in the same MUST_RESOLVE block and wait for one combined confirmation. No contradictions → proceed to Step 5.
5a. Warning check before each task — inspect the task entry in tasks.md.
| Marker | Behavior |
|-----------------------------------------|----------|
| [WARNING: MUST_RESOLVE] no Answer: | STOP. Present blocking gate (template below). Wait for user. Record answer + ISO timestamp. NEVER offer "Ready to continue?" or any bypass. |
| [WARNING: MUST_RESOLVE] + Answer: | Already resolved. Proceed. |
| [WARNING: ADVISORY] | Log "ℹ️ ADVISORY — Task X.Y: [text]" and proceed. NEVER request user input. |
Blocking gate template:
⛔ BLOCKED — Task X.Y has an unresolved MUST_RESOLVE warning:
[warning text from tasks.md]
You must answer before implementation can proceed:
→ [Question from tasks.md or derived from warning]
Type your answer to continue.
After answer received, append to the task in tasks.md:
Answer: [exact text of the user's answer]
Answered: [ISO 8601 timestamp, e.g., 2026-03-10T14:35:00Z]
5b. Standard flow (TDD not active) — per task:
tasks.md → extract task_id (e.g., 1.1).attempt_counter[task_id] undefined → set to 0.attempt_counter[task_id] >= max_attempts → mark [BLOCKED], halt phase, report, STOP.attempt_counter[task_id]++. Record file_snapshot (files this attempt will modify).[x] in tasks.md, optionally reset counter to 0, next task.file_snapshot_after and error output.
[BLOCKED] with "Identical strategy attempted twice — manual intervention required". Halt, report, STOP.>= max_attempts → [BLOCKED], halt, report, STOP. Otherwise re-attempt with a different approach (loop to step 6).Same-Strategy Detection — two attempts are the same strategy when modified-file sets are identical AND content changes per file are identical:
def is_same_strategy(previous, current):
if set(previous.files) != set(current.files): return False
for path in previous.files:
if previous.files[path] != current.files[path]: return False
return True
If unsure → count as different (conservative default).
5c. TDD flow (TDD active) — per task:
task_id.DEVIATION: behavior was already implemented.[x] only after REFACTOR is done.BLOCKED — marking tasks.md (before halting or reporting):
Change - [ ] X.Y description to - [BLOCKED] X.Y description and append:
- [BLOCKED] Task X.Y — description
- Attempts: N/max_attempts
- Tried:
1. [files modified + error]
2. [files modified + error]
3. [files modified + error]
- Last error: [error message from the final attempt]
- Resolution required: [specific, actionable instruction for the user]
Same-strategy blocks MUST note "Identical strategy detected" in the relevant attempt summary.
BLOCKED — reporting to user (after tasks.md update):
⛔ Task X.Y BLOCKED after N attempts.
What was tried:
1. [attempt 1 summary]
2. [attempt 2 summary]
3. [attempt 3 summary]
Last error: [error from final attempt]
tasks.md updated. Manual intervention required.
Resume after resolving: /sdd-apply <change-name>
After this report, NEVER continue to the next task or phase.
If implementation reveals a design problem:
"DEVIATION: [what and why]".status: blocked.## Progress: [completed]/[total] tasks
Mark each completed task:
- [x] 1.1 Create `src/types/auth.types.ts` ✓
- [x] 1.2 Create `src/schemas/auth.schema.ts` ✓
- [ ] 1.3 Modify `src/config/jwt.config.ts`
Apply ai-context/conventions.md strictly when present; otherwise follow existing
code patterns. Technology skills + solid-ddd are loaded automatically in Step 0c.
Before marking any code task [x], evaluate each criterion. Mark one of:
✅ (satisfied) | ❌ VIOLATION | N/A — [reason].
QUALITY_VIOLATION: SRP — <description>.QUALITY_VIOLATION: OCP — <description>.QUALITY_VIOLATION: DIP — <description>.QUALITY_VIOLATION: Domain model — <description>. N/A if task does not touch domain code.QUALITY_VIOLATION: Layer separation — <description>.QUALITY_VIOLATION: Scope creep — <description>. Escalate to DEVIATION if it contradicts a spec scenario.QUALITY_VIOLATION: Naming — <description>.Reporting rules:
N/A — [one-line reason] — criterion does not apply.QUALITY_VIOLATION: <principle> — <description> — fix BEFORE marking [x]. If the fix requires scope outside this task → DEVIATION + status: warning.QUALITY_VIOLATION notes in the phase summary.DEVIATION and MUST set status: warning.No over-engineering: implement the minimum to pass spec scenarios; do not add features not in the proposal; do not refactor code outside the change.
{
"status": "ok|warning|blocked|failed",
"summary": "Implemented [N] tasks of [total]. Phase [X] complete. [TDD mode: active — RED/GREEN/REFACTOR cycle used per task.]",
"tdd_mode": true,
"artifacts": [
"src/services/auth.service.ts — created",
"src/types/auth.types.ts — created",
"engram:sdd/{change-name}/tasks — updated"
],
"deviations": ["DEVIATION in task 2.1: [description and reason]"],
"next_recommended": ["sdd-apply (Phase 2) — if more phases remain", "/sdd-verify <change-name> — verify against specs before committing"],
"risks": []
}
tdd_mode is true when TDD was active, false otherwise. When true, the
summary mentions TDD.
Implementation complete — next step: when all phases are done, the only permitted next-step suggestion is:
Continue with verification? Reply **yes** to proceed or **no** to pause.
_(Manual: `/sdd-verify <change-name>`)_
The summary MUST NOT suggest /commit or git commit at any phase.
MUST_RESOLVE warnings MUST block execution until an explicit user answer is received. No skip option.ADVISORY warnings MUST be logged but MUST NOT interrupt flow or request input.business
Turns an already-investigated customer issue into a short, non-technical engineering-to-CS brief: one natural message that leads with the finding (root cause, real scope, open question), ready to paste into Slack for the support team. Trigger: /support-brief, support brief, brief for support, resumen soporte.
development
Parks the current Claude Code session before going to sleep. Analyzes the conversation, writes a handoff document to docs/handoffs/ in the current project, mirrors the same summary to engram tagged with the session ID, and prints the exact `claude --resume <id>` command for tomorrow. Zero interaction — runs end-to-end on a single invocation. Trigger: /night-park, night park, park session, me voy a dormir, guardar sesion.
testing
Interactive creator for a project feature: scaffolds the domain knowledge markdown at ai-context/features/<slug>.md AND the antenna skill at .claude/skills/<slug>/SKILL.md, both from the canonical templates. Also registers the antenna in the project's CLAUDE.md. Trigger: /feature-define <name>, define feature, documentar funcionalidad, nueva feature.
data-ai
Generates a short, non-technical, informal English summary of an already-investigated customer issue, ready to paste into Slack/email for support, CX, or ops teammates. Trigger: /customer-summary, customer summary, resumir customer issue, slack summary.