원클릭으로
sdd-init
// SDD step 0. Analyse the project codebase and create docs/project.md with tech stack, architecture, and conventions. Run once before starting SDD in a new project. If docs/project.md already exists, asks whether to regenerate it.
// SDD step 0. Analyse the project codebase and create docs/project.md with tech stack, architecture, and conventions. Run once before starting SDD in a new project. If docs/project.md already exists, asks whether to regenerate it.
SDD step 1. Analyse a feature request and produce a detailed feature.md spec. Use when the user describes a new feature they want to build. Asks for missing details before writing the spec.
SDD step 3. Read feature.md and produce a detailed implementation plan.md tailored to the project's tech stack and architecture. Use after /sdd-feature has produced feature.md.
SDD step 2 (optional, repeatable). Read an existing feature.md and refine it by updating or enhancing requirements based on user input. Use when requirements have changed, new edge cases are discovered, or the spec needs clarification before planning or re-planning. Run before /sdd-plan if plan.md already exists.
SDD fast path. Runs the full pipeline — analyse → plan → implement → review → archive — with a single confirmation gate before implementation begins. Stops automatically if Critical or Major issues are found in review. Use when you want to ship a well-understood feature with minimal interruptions.
SDD step 7. Archive feature.md and plan.md into docs/specs-archive/<yyyymmddHHMM>-<feature-name>/ directory, then update docs/project.md with the new feature, and any architecture decisions made. Use after /sdd-review is complete and the feature is ready to merge.
SDD step 5. Reviews the implemented feature code against language and framework best practices, checks for code duplication, security vulnerabilities, performance issues, test coverage, and alignment with feature.md acceptance criteria. Use after /sdd-implement or on any existing feature implementation.
| name | sdd-init |
| description | SDD step 0. Analyse the project codebase and create docs/project.md with tech stack, architecture, and conventions. Run once before starting SDD in a new project. If docs/project.md already exists, asks whether to regenerate it. |
You are a senior software architect analysing a project to produce its context document.
Check whether docs/project.md already exists.
If it exists: Ask the user:
"
docs/project.mdalready exists. Do you want to regenerate it? This will overwrite the current file."
Wait for confirmation. If the user says no, stop and tell them to edit the file manually. If the user confirms, proceed with the full process below.
If it does not exist: Proceed immediately.
Scan the project root and source tree for build and configuration files to auto-detect as much as possible:
| What to find | Where to look |
|---|---|
| Language & version | pom.xml (<java.version>), build.gradle/build.gradle.kts (jvmToolchain, sourceCompatibility), .java-version, pyproject.toml, package.json (engines), go.mod, Cargo.toml |
| Framework | pom.xml / build.gradle dependencies — Spring Boot, Quarkus, Micronaut, FastAPI, Express, Django, Rails, etc. |
| Build tool | Presence of pom.xml (Maven), gradlew (Gradle), package.json (npm/yarn/pnpm), Makefile, pyproject.toml (Poetry/Hatch) |
| Database | Dependencies or config files — spring.datasource in application.properties/application.yml, DATABASE_URL in .env.example, docker-compose services |
| ORM / data access | Dependencies — Hibernate/JPA, Spring Data, SQLAlchemy, Prisma, TypeORM, GORM, Diesel |
| Migrations | Dependencies or directories — Flyway, Liquibase, Alembic, db/migrate/ (Rails), Prisma migrate |
| Messaging | Dependencies or docker-compose services — Kafka, RabbitMQ, SQS, Redis Streams |
| Testing libraries | Test-scope dependencies — JUnit 5, Mockito, Testcontainers, RestAssured, pytest, Jest, Vitest, RSpec |
| Other libraries | Remaining notable dependencies — Spring Security, MapStruct, Lombok, Resilience4j, OpenAPI, etc. |
Read docker-compose.yml or docker-compose.yaml if present — it often reveals the database, messaging, and cache stack.
Explore the source tree structure:
src/main/java, src/, app/, lib/)controller, service, repository → Layereddomain, application, infrastructure, adapter → Hexagonal / Cleanorder, payment, user) each containing layers → Modular Monolithcom.example.myapp)GlobalExceptionHandler, middleware, error boundary, or equivalent)/api/v1)SecurityConfig, auth annotations, JWT setup)Some information cannot be reliably detected. Ask the user the following questions in a single grouped message — do not ask them one at a time:
I've analysed the project. Before I write docs/project.md, I need a few details:
1. **Project name and mission:** What does this application do, and who uses it?
(1-2 sentences is enough — this is the "why we exist" paragraph.)
2. **Architecture pattern:** Based on the source layout, I think this uses [detected pattern].
Is that right, or would you describe it differently?
3. **Key conventions:** Are there any conventions AI Agent should follow that aren't obvious from the code?
For example: naming rules, auth requirements per endpoint, error response format, pagination style.
4. **Approved dependencies:** Are there any constraints on what libraries can be added?
(If not, I'll list the detected dependencies as approved by default.)
Adjust or omit questions 2–4 if you already have high confidence from the codebase scan.
Wait for the user's answers before writing the file.
Create docs/ if it does not exist. Write docs/project.md with this structure, filled in from your analysis and the user's answers:
# Project: <Name>
## Mission
<One paragraph on what this application does and who it serves.>
## Tech Stack
- Language: <language and version>
- Framework: <framework and version>
- Build tool: <tool>
- Database: <database and version if known>
- ORM: <ORM / data access library>
- Migrations: <migration tool, or "none">
- Messaging: <messaging system, or "none">
- Testing: <testing libraries>
- Other: <other notable libraries>
## Architecture
<Describe the pattern: Layered / Hexagonal / DDD / Modular Monolith / Microservices>
<Describe the package structure with an example, e.g.:>
< com.example.<module>.<layer> → com.example.user.controller, com.example.user.service>
## Conventions
- Package naming: <convention>
- REST base path: <base path, e.g. /api/v1>
- Error handling: <mechanism, e.g. centralised exception handler, error middleware, global error boundary>
- Authentication: <default auth requirement, e.g. all endpoints require auth unless annotated @Public>
- <Any other conventions the user provided>
## Approved Dependencies
<Bulleted list of libraries approved for use. Anything outside this list requires a flag before adding.>
Do not leave any placeholder text (angle-bracket tokens) in the output — fill every field or omit the line if genuinely unknown.
After writing the file:
docs/project.md and update anything that looks wrong/sdd-feature <feature description> to start their first feature