Discipline for long-running development against existing documentation, with persistent tracking (PLAN, WORKLOG, TIMELINE, LESSONS, PATTERNS, stages/ under docs/sdd-power/), a validator, a session-start state digest, a base of mistakes and verified solutions, and critical verification of the documentation itself. Use ALWAYS when the user says \"initialize the project\", \"set up sdd-power\", \"/sdd-power init\", \"start development from the docs/from the spec\", \"continue development\", \"wh...
$npx -y skills add kravcovtech/sdd-power --skill en --agent claude-code
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of En?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/kravcovtech-sdd-power-sdd-power)
---
name: sdd-power
description: "Discipline for long-running development against existing documentation, with persistent tracking (PLAN, WORKLOG, TIMELINE, LESSONS, PATTERNS, stages/ under docs/sdd-power/), a validator, a session-start state digest, a base of mistakes and verified solutions, and critical verification of the documentation itself. Use ALWAYS when the user says \"initialize the project\", \"set up sdd-power\", \"/sdd-power init\", \"start development from the docs/from the spec\", \"continue development\", \"where did we stop\", \"what is done and what is left\", \"check against the plan\", \"update the plan and the log\", \"check the tracking\", \"close the stage\", \"record a lesson/decision\"; mentions PLAN.md, WORKLOG.md, TIMELINE.md, LESSONS.md, PATTERNS.md, stages/ or docs/sdd-power; complains that the documentation is stale or diverges from the code; starts multi-session development. Trigger without explicit words too, if the project has docs/sdd-power, an sdd-power anchor in CLAUDE.md, or an \"sdd-power: digest\" summary in context. Do NOT use for one-off small fixes within a single session, or for writing a spec from scratch."
---
# SDD Power
A skill for long-running development against existing documentation. It treats three problems:
1. **State is lost between sessions** — cured by tracking files kept in sync with the code.
2. **Blind trust in the documentation** — cured by verification with objective criteria for what counts as an error.
3. **Experience doesn't accumulate** — the same mistakes repeat, good solutions get reinvented. Cured by two bases: LESSONS (mistakes we don't repeat) and PATTERNS (solutions we do) — plus a shared per-stack library across all projects.
**The main rule: the tracking exists on disk or it doesn't exist at all.** A plan in the chat disappears with the session; the work isn't done until the files are in `docs/sdd-power/`. That's why the infrastructure is deployed **as the first action** — before studying the docs, the plan and the questions.
**Economy without losing precision.** Project state is read through the `brief` digest (≈ one third of the volume of reading the files in full). The whole of PLAN.md — only when planning, re-syncing and closing a stage. Rules whose violation can be caught mechanically live in the validator and the hooks, not in prose.
**Language of the tracking files.** The scripts parse both the English field labels of these templates and the Russian ones of the root skill, so an English project validates as it should. Diagnostics from `sdd.sh` (`brief`, `validate`) are printed in Russian — read them as data; everything you write into the tracking files stays English, after the templates in `assets/`.
---
## Step 1: initialization and the digest (always first)
The script is `scripts/sdd.sh` in this skill's directory (its path is given when the skill is loaded). Not sure of the path:
```bash
SDD=$(dirname "$(find ~/.claude "$APPDATA/Claude" "$HOME/AppData/Roaming/Claude" /mnt/skills -maxdepth 8 -path '*sdd-power/scripts/sdd.sh' 2>/dev/null | head -1)")
```
**Project initialization** — one command, equally for a new project, for existing code without tracking, and for a project with an older version of the tracking. Idempotent: it doesn't overwrite existing files and doesn't touch unrelated files with similar names:
```bash
bash "$SDD/sdd.sh" setup --name "<project>" [--docs "docs/spec.md docs/api.md"] [--stack django] [--mode tickets] [--hooks] [--lang en]
```
It deploys `docs/sdd-power/`, places an anchor in CLAUDE.md (and AGENTS.md), detects the stack, records a documentation snapshot (or offers candidates), installs the hooks with `--hooks` (updating ones already installed to the skill's version) and prints the digest at the end. On "/sdd-power init" or "initialize the project" — run `setup`.
`--lang en` makes `setup` lay down the English templates and write English markers into the files (`— closed`, `## Stage composition`, `snapshot of`). Called from this skill's directory it is the default; pass it explicitly if you installed the skill under a different name.
| Command | When |
|---|---|
| `brief` | at the start of every session and after `/compact`: tracking problems, documentation drift, commits that bypassed the tracking, the current stage and the next task, what's open in the plan, LESSONS, PATTERNS, the stack library |
| `validate` | the full list of findings; after manual edits and before closing a stage |
| `next` | the current stage, its DoD, the next task and a draft WORKLOG entry |
| `snapshot --docs "…"` | record a documentation snapshot (after a re-sync — record it again) |
| `stage <ID> <slug>` · `archive-tasks <ID>` | closing a stage |
| `promote --kind lesson\|pattern --text "…"` · `library` | the shared stack library |
Options: `--root DIR` (the git root by default), `--code remote` (code lives only on a server), `--docs` may repeat (a file with spaces, or outside the project, goes in its own option), `--gitignore` (keep the tracking out of git — then everything the team needs must reach the code, the docs or CLAUDE.md), `--strict` (exit code 1 on errors — for CI).
**Hooks (`setup --hooks`) — offer them to the user on the first `setup` if they aren't installed.** Without them, the digest and the commit check rest on discipline alone — and in projects without hooks the tracking drifted from the work fastest; `brief` keeps reminding while they're missing. They copy the scripts into the project's `.claude/sdd-power/` and register in `.claude/settings.json`: **SessionStart** — the `brief` digest lands in context by itself at the start of a session and after `/compact` (don't run it again); **PostToolUse on git commit** — if a commit isn't accompanied by a WORKLOG entry carrying its SHA, or entries since the previous commit are still marked "not committed", the hook returns the reason, and you add the entry or fill in the SHA. A housekeeping commit without an entry — put `[skip-sdd]` in the message.
**The gate.** The first reply in a session contains the output of `setup` or `brief` (or builds on the hook's digest). No output — you talked about the infrastructure instead of deploying it. If CLAUDE.md has the sdd-power anchor but there's no hook digest in context, or it says "digest NOT built" — run `brief` manually and tell the user the hook didn't fire: a missing digest is a failure, not an empty project.
**A project without git** — `setup` sees that: stage tags, the SHA check and the commit hook are switched off. **Tracking inside a git worktree** — `brief` warns if the main branch doesn't have it: merge the branch, otherwise other sessions work without tracking.
**No project on disk** (the tracking files arrived as attachments) — deploy in the working folder, put the supplied files in their places (`setup` won't clobber them) and work in continuation mode; hand the files back to the user at the end.
---
## Step 2: documentation and mode
**Where the docs are.** If the user named the path — that's it. If not, `setup` prints candidates (`docs/`, `spec/`, README, `*.md`); unambiguous — work with it and say so; several or none — ask: working from the wrong docs is worse than one question.
| What `setup` / `brief` showed | Mode |
|---|---|
| "new project", files are empty templates | **Initialization** → read `references/init.md` |
| the tracking has substance | **Continuation** |
| the tracking contradicts the code | **Continuation**, starting by restoring accuracy |
**A ticket-driven project** (work arrives as client tasks DP-025, TASK-005 with reports in `reports/`, rather than from a single spec; `setup` will hint at it) — `setup --mode tickets`. A ticket = a stage: `## Stage N. <name> (DP-025)`, "Basis" is the ticket's report or spec, and the ticket goes in the WORKLOG entry heading. A new ticket — first the stage in PLAN and the row in TIMELINE, then the work. A snapshot of the general docs is optional; the ticket spec you work from goes into `snapshot`.
---
## Continuation mode
The start of every session, before any code:
1. **The digest** — from the hook or `sdd.sh brief`. Every item in it calls for an action: incomplete infrastructure → `setup`; **the docs changed since the snapshot** → don't continue from memory: compare the changed sections against the plan, update the tasks, record the re-sync in WORKLOG, `snapshot`; **tracking errors** → fix them before any code (details — `validate`); **commits without a WORKLOG entry** (work done by hand, in the IDE or by another session — the commit hook only sees commits made from Claude sessions) → check their diff against the plan, mark what's done in PLAN and write one re-sync entry in WORKLOG with their SHAs: the commit bookmark only moves across accounted commits, so an unaccounted one shows up in every digest; **"NOT READ" / "didn't fire"** → that section wasn't checked by the digest, not checked and found empty: read the corresponding file yourself and don't conclude "nothing to do".
2. **The knowledge bases** — LESSONS and PATTERNS from the digest. If the digest said "showing X of Y" — read the file in full: it exists precisely so that you don't repeat a mistake already analysed or reinvent a solution already verified.
3. **Reconcile with the code.** The files can lie: work may have been done without you. Found a divergence — bring the files up to date first, record it in WORKLOG, then continue.
4. **Deal with `[~]`.** "In progress" means the previous session broke off: don't trust the status, check the code — finish it, roll it back or re-decompose it. Unfinished work taken for done is the most expensive kind of mistake.
5. Tell the user in 1–3 sentences: where you stopped and what's next.
Read PLAN.md in full when you plan, re-sync the plan with the docs, close a stage, or the digest wasn't enough for the task. For closed stages read `stages/<ID>-<name>.md`, not the WORKLOG feed. Don't remember the details of the current task — re-read the files: cheaper than doing the work twice.
---
## A critical attitude to the documentation
The docs are the main reference point, but they are not infallible. Distinguish errors from your own preferences, otherwise "criticality" turns into unauthorized deviation.
**An error** is only what is provable: an internal contradiction; a contradiction with the actual code, API, data schema or dependency version; a technically impossible solution; a typo with an unambiguously recoverable reading.
**Not an error:** "I would do it differently", "that's not the convention", "there's a better way" — those are proposals in PLAN.md → "Improvement proposals". The decision to change the approach is the user's.
| Finding | Action |
|---|---|
| A typo, the fix is unambiguous | Fix it → WORKLOG + "Documentation discrepancies" in PLAN → continue |
| Architecture, behaviour, API contracts, or several options | Stop on that task, lay out the options, ask; while waiting, take independent tasks |
| A matter of taste | Follow the docs, record it under "Improvement proposals" |
A confirmed discrepancy is a candidate for LESSONS.md and must reach the documentation itself: propose a fix to the source (or make it, if the user delegated that) — the table in PLAN is a journal of findings, not where the truth lives. Numbers from the docs are a snapshot as of the `snapshot` date. Borderline cases — `references/docs-verification.md`.
---
## The tracking files
| File | Answers the question | Nature |
|---|---|---|
| **PLAN.md** | What is there to do? | Living document, rewritten |
| **WORKLOG.md** | What was done, and why? | Append-only, newest on top |
| **TIMELINE.md** | Where are we overall? | Table of stages |
| **LESSONS.md** | Which mistakes don't we repeat? | Curated, ≤ 20 rules / 20 KB |
| **PATTERNS.md** | Which solutions do we repeat? | Curated, ≤ 25 solutions / 10 KB |
| **stages/\<ID\>-\<name\>.md** | What does a closed stage amount to? | Written once, at closing |
The roles don't overlap — don't duplicate the same thing across files. The formats are in `assets/*.template.md`; the validator works from them, so don't invent your own.
**The knowledge base** (in detail — `references/knowledge.md`; read it before writing into LESSONS/PATTERNS and when you hit a budget):
- a mistake that could repeat elsewhere → a rule in LESSONS with a **Reason** (a link to WORKLOG/a commit/a discrepancy);
- a solution worked and the situation will recur → a line in PATTERNS with a **Sample** in the code and what it was **Verified** by;
- nothing goes into the base without proof; a violation that can be caught mechanically → a test or a linter instead of an entry;
- shared across all projects on the stack → `sdd.sh promote`.
---
## Closing a stage
All tasks of the stage are `[x]` → read `references/stage-close.md` and perform the ritual before moving on: the DoD in full → verification (completeness / correctness / coherence) → `stage` with a verdict on the decisions → topping up LESSONS/PATTERNS → `archive-tasks` → the `stage/<ID>` tag → TIMELINE → `validate`.
---
## Update rules
- **Update the files at the same moment as the code.** A step is finished → an entry in WORKLOG, a checkbox in PLAN, a status in TIMELINE. "I'll write it up later" is the main reason systems like this die.
- **The commit SHA goes into WORKLOG** (or "committed with the code", if the entry is committed together with the code). It is the bridge between the decision journal and the history; the commit hook watches for it. "not committed" is a temporary marker: if the work reached a commit later — replace it with the SHA (the only edit of an old entry that is allowed); `validate` shows such entries.
- **A WORKLOG entry heading carries the task number, the stage, or the ticket from the stage heading.** An entry with no link to the plan counts, to the validator, as work outside the plan.
- **If it's only waiting for a date — "Observations".** Indexing, a measurement in N weeks, watching a metric don't hold a stage open: a row under "Observations" in PLAN.md with a date, and the stage closes; `brief` will flag the date when it arrives.
- **The "Last updated" date in PLAN and "Updated" in TIMELINE** change together with the WORKLOG entry: the validator compares them against the latest entry.
- **Closed a task — walk the PLAN.md tables:** a discrepancy → "fixed", a question → "resolved", a finding → done. Don't reuse row numbers.
- **Any change goes into all affected files at once**, with the reason in WORKLOG.
- **The project's own task journal** (`/task-start`, client reports) — WORKLOG doesn't duplicate it: decisions, plus the link to the report in the "Task / report" field.
- **A WORKLOG entry is ~20 lines / ~4 KB.** "Decisions and reasons" holds only what isn't obvious from the code; the rest is visible in the diff behind the SHA.
- **Work requested outside the plan** (the user asked to "change the layout") — first a task or a stage in PLAN.md with `Basis: user request of <date>`, then the code. The validator catches stages and numbers that aren't in the plan.
## The criterion for a finished step
1. **Working behaviour confirmed by an observable result** — a test, command output, verified behaviour. "Should work" is not proof. Nothing to verify with — `[~]` with a "not verified" note, and tell the user.
2. The code matches the docs — or a documented, justified deviation.
3. PLAN, WORKLOG, TIMELINE updated **on disk**; the task number is in the WORKLOG entry; a lesson or a solution went into LESSONS/PATTERNS if one appeared.
At the end of a step — 1–2 sentences to the user: what was done and what's next.
## Hold the scope
Unrelated things you notice (duplication, dead code, missing tests) don't get fixed along the way — a sprawling diff can't be reviewed, and it breaks "one task, one commit". File a task in PLAN ("Noticed along the way") and move on. The exception is a finding that blocks the current task: fix it minimally and record why in WORKLOG.
## Alongside superpowers
The rules for working together sit in the CLAUDE.md anchor (written by `setup`) and take precedence over other skills' instructions: the plan, the journal and the readiness criterion come from sdd-power alone; `writing-plans`, `executing-plans`, `verification-before-completion` are not invoked; `subagent-driven-development` — one invocation per large stage; a skill already loaded in the session isn't invoked again.
## What not to do
- Don't keep the tracking in your reply instead of the files, and don't postpone `setup` "until the plan is confirmed".
- Don't start coding before studying the docs and getting the plan confirmed; don't deviate from the docs without a proven error.
- Don't mark a task done without observable confirmation.
- Don't write into the knowledge bases without proof; don't turn LESSONS into a bug journal.
- Don't re-read in full what the digest already gave you; don't run `brief` again if it came from the hook.
- Don't ask for confirmation at every step: the user confirms the plan and architectural forks.
- Don't deploy the ceremony for a one-off small fix.