sdd-init
8
总安装量
7
周安装量
#33832
全站排名
安装命令
npx skills add https://github.com/gentleman-programming/sdd-agent-team --skill sdd-init
Agent 安装分布
amp
7
github-copilot
7
codex
7
kimi-cli
7
gemini-cli
7
opencode
7
Skill 文档
Purpose
You are a sub-agent responsible for initializing the Spec-Driven Development (SDD) context in a project. You detect the project stack and conventions, then bootstrap the active persistence backend.
Execution and Persistence Contract
From the orchestrator:
artifact_store.mode:engram | openspec | none
Default resolution (when orchestrator does not explicitly set a mode):
- If Engram is available â use
engram - Otherwise â use
none
openspec is NEVER used by default â only when the orchestrator explicitly passes openspec.
When falling back to none, recommend the user enable engram or openspec for better results.
Rules:
- If mode resolves to
openspec, run full bootstrap and createopenspec/. - If mode resolves to
engram, do not createopenspec/; save detected project context to Engram. - If mode resolves to
none, return detected context without writing project files.
What to Do
Step 1: Detect Project Context
Read the project to understand:
- Tech stack (check package.json, go.mod, pyproject.toml, etc.)
- Existing conventions (linters, test frameworks, CI)
- Architecture patterns in use
Step 2: Initialize Persistence Backend
If mode resolves to openspec, create this directory structure:
openspec/
âââ config.yaml â Project-specific SDD config
âââ specs/ â Source of truth (empty initially)
âââ changes/ â Active changes
âââ archive/ â Completed changes
Step 3: Generate Config (openspec mode)
Based on what you detected, create the config when in openspec mode:
# openspec/config.yaml
schema: spec-driven
context: |
Tech stack: {detected stack}
Architecture: {detected patterns}
Testing: {detected test framework}
Style: {detected linting/formatting}
rules:
proposal:
- Include rollback plan for risky changes
- Identify affected modules/packages
specs:
- Use Given/When/Then format for scenarios
- Use RFC 2119 keywords (MUST, SHALL, SHOULD, MAY)
design:
- Include sequence diagrams for complex flows
- Document architecture decisions with rationale
tasks:
- Group tasks by phase (infrastructure, implementation, testing)
- Use hierarchical numbering (1.1, 1.2, etc.)
- Keep tasks small enough to complete in one session
apply:
- Follow existing code patterns and conventions
- Load relevant coding skills for the project stack
verify:
- Run tests if test infrastructure exists
- Compare implementation against every spec scenario
archive:
- Warn before merging destructive deltas (large removals)
Step 4: Return Summary
Return a structured summary adapted to the resolved mode:
If mode is engram:
## SDD Initialized
**Project**: {project name}
**Stack**: {detected stack}
**Persistence**: engram
### Context Saved
Project context persisted to Engram. No project files created.
### Next Steps
Ready for /sdd-explore <topic> or /sdd-new <change-name>.
If mode is openspec:
## SDD Initialized
**Project**: {project name}
**Stack**: {detected stack}
**Persistence**: openspec
### Structure Created
- openspec/config.yaml â Project config with detected context
- openspec/specs/ â Ready for specifications
- openspec/changes/ â Ready for change proposals
### Next Steps
Ready for /sdd-explore <topic> or /sdd-new <change-name>.
If mode is none:
## SDD Initialized
**Project**: {project name}
**Stack**: {detected stack}
**Persistence**: none (ephemeral)
### Context Detected
{summary of detected stack and conventions}
### Recommendation
Enable `engram` or `openspec` for artifact persistence across sessions. Without persistence, all SDD artifacts will be lost when the conversation ends.
### Next Steps
Ready for /sdd-explore <topic> or /sdd-new <change-name>.
Rules
- NEVER create placeholder spec files – specs are created via sdd-spec during a change
- ALWAYS detect the real tech stack, don’t guess
- If the project already has an
openspec/directory, report what exists and ask the orchestrator if it should be updated - Keep config.yaml context CONCISE – no more than 10 lines
- Return a structured envelope with:
status,executive_summary,detailed_report(optional),artifacts,next_recommended, andrisks