SDD System
This skill is the entry point for the Compounding Engineering framework. It handles initialization, feature lifecycle management, and global status.
Core Responsibilities
- Project Initialization: Setup
.sdd/ directory, project_rules.md, and Knowledge Base directories.
- Feature Lifecycle: Manage features from creation through request → design → plan → impl → complete → learn.
- Global Status: Display the "Big Picture" (Current Stage + Active Feature + Velocity + Knowledge Stats).
- Coordination: Verify
.sdd/ directory structure integrity (all required subdirectories and context.json exist and are well-formed).
Commands
/sdd-init [project principles]: Initialize a new Compounding Engineering project. Optional args define the project's guiding principles (e.g., /sdd-init product should be testable, high-quality and implement by MVP never overdesign).
/sdd-status: Display current project health, active stage, active feature, and recent lessons learned.
/sdd-nuke: (Dangerous) Reset internal state but keep learned patterns and lessons.
Initialization Logic
When /sdd-init is called:
Step 1: Create Directory Structure
Check for .sdd/ directory and create the full structure:
context/ — context.json, project_rules.md
spec/ — Feature-scoped spec subdirectories
plan/ — Feature-scoped plan subdirectories
features/ — Feature snapshot archive (spec + plan per feature)
knowledge/index.json — Lightweight knowledge index (initialize as { "patterns": {}, "lessons": {} })
knowledge/patterns/ — Reusable design/code patterns
knowledge/lessons/ — Lessons learned from past work
data/, logs/, temp/
Step 2: Project Discovery
Before generating config files, gather project context. This information is critical — downstream skills (design, planning, guardrails, implementation) all depend on context.json and project_rules.md to make informed decisions.
a) Auto-detect from codebase — scan the working directory for project markers:
- Package/dependency files (
package.json, Cargo.toml, go.mod, pyproject.toml, Gemfile, pom.xml, build.gradle, *.csproj, etc.) → infer language, framework, build tools
- Existing directory structure → infer architecture style and conventions
- Config files (
.eslintrc, tsconfig.json, Makefile, Dockerfile, etc.) → infer tooling
- Test directories/files → infer testing framework and strategy
b) Present findings and ask the user to confirm or adjust:
- Tech stack: Language(s), framework(s), build tool(s), package manager — "I detected X. Is this correct?"
- Architecture style: Inferred from directory structure, or ask if unclear — "How is your project organized?" (e.g., feature-first, layer-first, module-based, monorepo, flat, etc.)
- Directory conventions: Where source code, tests, configs live — "Your source appears to be in
src/, tests in tests/. Correct?"
- Testing strategy (if applicable): Detected test framework and approach — "I see Jest/pytest/etc. What types of tests does this project use?" If no test framework is detected, ask whether the user plans to have tests — don't assume.
- Verify commands (if applicable): Only ask about commands that are relevant to the project. A Python script might have no build step; a prototype might have no tests. Only document commands that actually exist.
If auto-detection finds nothing (empty or new project), ask the user directly. Keep the conversation concise — ask all questions in one message, not one at a time.
CRITICAL INSTRUCTION: DO NOT PROCEED TO STEP 3 YET. Stop your response here and wait for the user to answer your questions. Only proceed to Step 3 in your next response after the user has confirmed or adjusted the project discovery findings.
c) If user provided args (e.g., /sdd-init MVP-first, testable, no overdesign): Remember to incorporate them as the "General Principles" section in project_rules.md when you generate it later.
Step 3: Generate Configuration (Only AFTER User Confirmation)
- Generate
context.json from template, populated with the discovered values:
- JSON Writing Rule: All string values MUST have special characters properly escaped (
\", \\, \n, \t, control chars). Validate JSON is well-formed before writing to disk.
- Generate
project_rules.md tailored to the project:
- Tech Stack: Fill the Tech Stack section with confirmed languages, frameworks, runtimes, databases, and tooling. For multi-stack projects, group by service/component (e.g.,
frontend, backend, infra). This is the single source of truth for tech stack — do NOT store in context.json.
- Architecture: Based on confirmed architecture style and directory conventions — this is where the full architecture rules live; do NOT duplicate in
context.json
- Coding Standards: Based on detected language/framework conventions
- Testing: Based on detected test framework and confirmed strategy
- Verify Commands (if any): Document whatever build/test/lint commands exist so
sdd-implementer can run per-task verification. Omit this section entirely if the project has no such commands.
- Start from the template in
templates/project_rules.md, then fill in project-specific details
Step 4: Report
Report: "Project initialized. Here's what I configured:" — show a summary of the Tech Stack section from project_rules.md and key sections (Architecture, Testing, Verify Commands). Then: "Ready for /sdd-request."
Feature Lifecycle
Each feature follows this lifecycle, tracked via context.json.current_stage:
init → request → request-complete → design → design-complete → plan → plan-complete → impl → impl-complete
Starting a Feature
Executed by sdd-request-engine — see sdd-request-engine/SKILL.md Step 2 for the canonical implementation.
- User provides feature name/intent via
/sdd-request.
sdd-request-engine reads context.json.feature_counter, generates the feature ID, creates directories, and sets current_stage to "request".
Completing a Feature
- All tasks in
tasks.json reach "done" or "verified" status.
/sdd-impl-finish triggers mandatory knowledge extraction (reads .sdd/logs/session.md for cross-session history).
- MOVE (not copy)
.sdd/spec/<feature-id>/ and .sdd/plan/<feature-id>/ into .sdd/features/<feature-id>/.
- Move feature ID from
current_feature to completed_features.
- Reset
current_stage to "init" and current_feature to null.
- Clear
.sdd/logs/session.md.
Status Display
When /sdd-status is called, display:
- Active Feature:
context.json.current_feature (or "None")
- Current Stage:
context.json.current_stage
- Completed Features: Count of
context.json.completed_features
- Knowledge Stats: Number of patterns in
knowledge/patterns/, lessons in knowledge/lessons/
- Active Patterns:
context.json.active_patterns
- Applied Lessons:
context.json.applied_lessons
Integration
- Consumes:
sdd-knowledge-base (for status and knowledge stats).
- Directs: Users to
/sdd-design or /sdd-plan based on current_stage.
1---2name: sdd-system3description: Project Manager: Initialization, Status Tracking, and High-Level Coordination.4---56# SDD System78This skill is the entry point for the Compounding Engineering framework. It handles initialization, feature lifecycle management, and global status.910## Core Responsibilities11121. **Project Initialization**: Setup `.sdd/` directory, `project_rules.md`, and Knowledge Base directories.132. **Feature Lifecycle**: Manage features from creation through request → design → plan → impl → complete → learn.143. **Global Status**: Display the "Big Picture" (Current Stage + Active Feature + Velocity + Knowledge Stats).154. **Coordination**: Verify `.sdd/` directory structure integrity (all required subdirectories and `context.json` exist and are well-formed).1617## Commands1819- `/sdd-init [project principles]`: Initialize a new Compounding Engineering project. Optional args define the project's guiding principles (e.g., `/sdd-init product should be testable, high-quality and implement by MVP never overdesign`).20- `/sdd-status`: Display current project health, active stage, active feature, and recent lessons learned.21- `/sdd-nuke`: (Dangerous) Reset internal state but keep learned patterns and lessons.2223## Initialization Logic2425When `/sdd-init` is called:2627### Step 1: Create Directory Structure28Check for `.sdd/` directory and create the full structure:29- `context/` — `context.json`, `project_rules.md`30- `spec/` — Feature-scoped spec subdirectories31- `plan/` — Feature-scoped plan subdirectories32- `features/` — Feature snapshot archive (spec + plan per feature)33- `knowledge/index.json` — Lightweight knowledge index (initialize as `{ "patterns": {}, "lessons": {} }`)34- `knowledge/patterns/` — Reusable design/code patterns35- `knowledge/lessons/` — Lessons learned from past work36- `data/`, `logs/`, `temp/`3738### Step 2: Project Discovery39Before generating config files, gather project context. This information is critical — downstream skills (design, planning, guardrails, implementation) all depend on `context.json` and `project_rules.md` to make informed decisions.4041**a) Auto-detect from codebase** — scan the working directory for project markers:42- Package/dependency files (`package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, `Gemfile`, `pom.xml`, `build.gradle`, `*.csproj`, etc.) → infer language, framework, build tools43- Existing directory structure → infer architecture style and conventions44- Config files (`.eslintrc`, `tsconfig.json`, `Makefile`, `Dockerfile`, etc.) → infer tooling45- Test directories/files → infer testing framework and strategy4647**b) Present findings and ask the user to confirm or adjust:**481. **Tech stack**: Language(s), framework(s), build tool(s), package manager — "I detected X. Is this correct?"492. **Architecture style**: Inferred from directory structure, or ask if unclear — "How is your project organized?" (e.g., feature-first, layer-first, module-based, monorepo, flat, etc.)503. **Directory conventions**: Where source code, tests, configs live — "Your source appears to be in `src/`, tests in `tests/`. Correct?"514. **Testing strategy** (if applicable): Detected test framework and approach — "I see Jest/pytest/etc. What types of tests does this project use?" If no test framework is detected, ask whether the user plans to have tests — don't assume.525. **Verify commands** (if applicable): Only ask about commands that are relevant to the project. A Python script might have no build step; a prototype might have no tests. Only document commands that actually exist.5354If auto-detection finds nothing (empty or new project), ask the user directly. Keep the conversation concise — ask all questions in one message, not one at a time.5556**CRITICAL INSTRUCTION: DO NOT PROCEED TO STEP 3 YET.** Stop your response here and wait for the user to answer your questions. Only proceed to Step 3 in your next response after the user has confirmed or adjusted the project discovery findings.5758**c) If user provided args** (e.g., `/sdd-init MVP-first, testable, no overdesign`): Remember to incorporate them as the "General Principles" section in `project_rules.md` when you generate it later.5960### Step 3: Generate Configuration (Only AFTER User Confirmation)611. Generate `context.json` from template, populated with the discovered values:62 - **JSON Writing Rule**: All string values MUST have special characters properly escaped (`\"`, `\\`, `\n`, `\t`, control chars). Validate JSON is well-formed before writing to disk.632. Generate `project_rules.md` tailored to the project:64 - **Tech Stack**: Fill the Tech Stack section with confirmed languages, frameworks, runtimes, databases, and tooling. For multi-stack projects, group by service/component (e.g., `frontend`, `backend`, `infra`). This is the **single source of truth** for tech stack — do NOT store in `context.json`.65 - **Architecture**: Based on confirmed architecture style and directory conventions — this is where the full architecture rules live; **do NOT duplicate in `context.json`**66 - **Coding Standards**: Based on detected language/framework conventions67 - **Testing**: Based on detected test framework and confirmed strategy68 - **Verify Commands** (if any): Document whatever build/test/lint commands exist so `sdd-implementer` can run per-task verification. Omit this section entirely if the project has no such commands.69 - Start from the template in `templates/project_rules.md`, then fill in project-specific details7071### Step 4: Report72Report: "Project initialized. Here's what I configured:" — show a summary of the **Tech Stack** section from `project_rules.md` and key sections (Architecture, Testing, Verify Commands). Then: "Ready for `/sdd-request`."7374## Feature Lifecycle7576Each feature follows this lifecycle, tracked via `context.json.current_stage`:7778```79init → request → request-complete → design → design-complete → plan → plan-complete → impl → impl-complete80```8182### Starting a Feature83> **Executed by `sdd-request-engine`** — see `sdd-request-engine/SKILL.md` Step 2 for the canonical implementation.84851. User provides feature name/intent via `/sdd-request`.862. `sdd-request-engine` reads `context.json.feature_counter`, generates the feature ID, creates directories, and sets `current_stage` to `"request"`.8788### Completing a Feature891. All tasks in `tasks.json` reach `"done"` or `"verified"` status.902. `/sdd-impl-finish` triggers mandatory knowledge extraction (reads `.sdd/logs/session.md` for cross-session history).913. **MOVE** (not copy) `.sdd/spec/<feature-id>/` and `.sdd/plan/<feature-id>/` into `.sdd/features/<feature-id>/`.924. Move feature ID from `current_feature` to `completed_features`.935. Reset `current_stage` to `"init"` and `current_feature` to `null`.946. Clear `.sdd/logs/session.md`.9596## Status Display9798When `/sdd-status` is called, display:99- **Active Feature**: `context.json.current_feature` (or "None")100- **Current Stage**: `context.json.current_stage`101- **Completed Features**: Count of `context.json.completed_features`102- **Knowledge Stats**: Number of patterns in `knowledge/patterns/`, lessons in `knowledge/lessons/`103- **Active Patterns**: `context.json.active_patterns`104- **Applied Lessons**: `context.json.applied_lessons`105106## Integration107108- **Consumes**: `sdd-knowledge-base` (for status and knowledge stats).109- **Directs**: Users to `/sdd-design` or `/sdd-plan` based on `current_stage`.