con un clic
sdd-init
Bootstrap OpenSpec structure and SDD context for a project.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Bootstrap OpenSpec structure and SDD context for a project.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Review SDD task plans for execution blockers and return [OKAY] or [REJECT].
Mandatory step-0 requirements discovery for non-trivial work before any implementation or SDD routing decisions.
Resolve residual spec ambiguity in place before design, with a bounded taxonomy-driven clarification pass.
Guide a semver constitution amendment and Sync-Impact Report entry.
Execute SDD task lists with real-time progress tracking, sub-agent dispatch, and verification checkpoints.
Merge completed deltas into main specs and archive the change.
| name | sdd-init |
| description | Bootstrap OpenSpec structure and SDD context for a project. |
| metadata | {"author":"gentleman-programming","version":"1.0"} |
Initialize SDD for a project by detecting local conventions, creating the minimal OpenSpec structure when needed, and persisting startup context.
The orchestrator passes the artifact store mode (thoth-mem, openspec, or
hybrid). Follow the persistence contract for read/write rules per mode.
thoth-mem: persist initialization context to thoth-mem only — do NOT create
or modify openspec/ files.openspec: create or update OpenSpec structure only — do NOT call thoth-mem
save tools.hybrid: do both (default).openspec/ is not initializedopenspec/ exists but is stale: missing config.yaml mechanism sections
(constitution / consistency / requirements_quality / clarification /
handoffs), missing tasks.traceability / tasks.parallel_markers /
design.sub_artifacts / design.complexity_threshold / verify toggles, or a
missing openspec/memory/constitution.mdsdd-proposehybrid)Read the shared conventions before initializing.
Detect project stack and conventions from repository files:
package.json, go.mod, pyproject.toml,
requirements.txt, Cargo.toml, pom.xml, build.gradle,
composer.json.vitest.config.*, jest.config.*,
playwright.config.*, pytest.ini, tox.ini, go test conventions,
Cargo.toml test crates.biome.json, .eslintrc*, eslint.config.*,
.prettierrc*, ruff.toml, .golangci.*, rustfmt.toml..github/workflows/*, .gitlab-ci.yml,
azure-pipelines.yml, .circleci/config.yml.apps/, packages/,
services/, src/, cmd/, internal/.Build concise config context (max 10 lines) using detected values. Use
unknown for missing signals.
If the selected mode includes OpenSpec (openspec or hybrid), check
whether these already exist:
openspec/config.yamlopenspec/specs/openspec/changes/If the required OpenSpec paths already exist, do not dead-end. Compute whether the project is fully aligned or stale, then realign additively:
config.yaml already carries
every mechanism section / toggle AND openspec/memory/constitution.md
exists) -> report a no-op and return. Never overwrite by default.5a. Compute the per-piece absent set (detect each independently; treat a
partially-present openspec/ per-piece, not all-or-nothing):
- missing openspec/specs/
- missing openspec/changes/ (and changes/archive/)
- missing config.yaml mechanism sections: constitution,
consistency, requirements_quality, clarification, handoffs
- missing config.yaml toggles: rules.tasks.traceability,
rules.tasks.parallel_markers, rules.design.sub_artifacts,
rules.design.complexity_threshold,
rules.verify (test_command / build_command /
coverage_threshold)
- missing openspec/memory/constitution.md
5b. For each absent piece, additively create or merge ONLY that piece using
the canonical shapes defined in step 7 (config.yaml) and step 7a
(constitution.md). Merge missing config.yaml sections into the
existing file, preserving every present key and value verbatim. Never
rewrite a value that is already present. Never renumber or recreate an
existing constitution.md (see step 7a idempotency).
5c. Report exactly what was added (list each created path and each merged
config.yaml section / toggle). If the absent set was empty, report a
no-op instead.
If any required OpenSpec path is missing and mode includes OpenSpec, create only the minimum structure:
openspec/
├── config.yaml
├── specs/
└── changes/
└── archive/
Generate openspec/config.yaml dynamically with this shape:
```yaml
schema: spec-driven
context: |
Tech stack: {detected}
Architecture: {detected}
Testing: {detected}
Style: {detected}
rules:
proposal:
- Include rollback plan for risky changes
- Identify affected modules/packages
spec:
- Use RFC 2119 keywords (MUST, SHALL, SHOULD, MAY)
- Use Given/When/Then scenarios
design:
guidance:
- Document architecture decisions with rationale
- Require a File Changes section
sub_artifacts: false # optional design sub-artifacts (default off)
complexity_threshold: # author-evaluated eligibility triggers (OR)
affected_domains: 3
affected_files: 12
external_research: true
tasks:
guidance:
- Group tasks by phase with hierarchical numbering
- Keep tasks small enough to complete in one session
tdd: false # TDD ordering flag (sdd-tasks-format)
traceability: true # require [USN] + Spec: tag + Independent Test per task
parallel_markers: false # [P] emission + executing-plans consumption (default off)
apply:
guidance:
- Follow existing code patterns and conventions
test_command: ''
verify:
test_command: ''
build_command: ''
coverage_threshold: 0
archive:
- Warn before merging destructive deltas
# --- mechanism sections (spec-kit-rigor) ---
constitution:
path: openspec/memory/constitution.md
enforce_check: true # Constitution Check gate blocks on violation
version_policy: semver # MAJOR=remove/redefine, MINOR=add, PATCH=clarify
consistency:
enforce_block: true # CRITICAL findings block plan-review
require_coverage_percentage: true
requirements_quality:
enforce_block: true # incomplete checklist blocks tasks phase
dimensions: [completeness, clarity, measurability, testability]
clarification:
max_markers_per_spec: 3 # [NEEDS CLARIFICATION] cap enforced by plan-reviewer
handoffs:
surface_hints: true # surface SddPhaseContract.handoffHints at transitions
```
Mixing bare `- item` list entries with `key: value` scalars under one key is
invalid YAML; when a phase carries scalar toggles (`tasks`, `apply`,
`verify`), put its guidance strings under a `guidance:` subkey.
7a. Bootstrap the project constitution at openspec/memory/constitution.md
(mode includes OpenSpec):
- Absent -> create it at Version: 1.0.0 with Ratified/Last-Amended
dates, the five native principles (delegate-first coordination, read-only
role boundaries, governed persistence, multi-harness parity, evidence-led
verification) each with Statement/Rationale/Gate Implications, and an empty
## Sync-Impact Report section.
- Present -> preserve the existing content AND its existing version
unchanged; do NOT recreate or renumber it. This step is idempotent: a
second sdd-init run on a repo whose constitution.md is at 2.1.0
leaves it at 2.1.0.
- Semver bump policy (manual, by whoever edits the constitution): MAJOR
= a principle removed or redefined; MINOR = a principle added or guidance
materially expanded; PATCH = clarification/wording. Each edit also appends
a ## Sync-Impact Report entry. No tooled auto-bump exists.
- See _shared/openspec-convention.md (Constitution Governance) for the
canonical artifact and gate semantics.
Never create placeholder SDD artifacts (proposal.md, design.md,
tasks.md, or spec files) during initialization.
If the selected mode includes thoth-mem (thoth-mem or hybrid), persist
the detected context and initialization status with:
Use the memory tool binding for `mem_save` with the canonical topic key and
required metadata fields: `title`, `topic_key`, `type`, `project`,
`scope`, and `content`.
In hybrid mode, initialization is complete only when both OpenSpec setup
and thoth-mem persistence succeed.
Return:
ProjectModeDetected Context: stack, architecture, testing, style, CIOpenSpec Status: initialized, already initialized, or skipped by modeCreated Paths: list of directories/files created (if any)Topic Key: sdd-init/{project-name} when mode includes thoth-memNext Step: usually sdd-proposeopenspec/ already exists, backfill
only the absent pieces and NEVER overwrite a value that is already present.constitution.md is never renumbered or recreated; create it
only when absent and otherwise preserve its content and version unchanged.thoth-mem mode, never create openspec/ directories or files.config.yaml context concise (max 10 lines).