원클릭으로
sdd-init
Trigger: sdd init, iniciar sdd, openspec init. Initialize SDD context, testing capabilities, registry, and persistence.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Trigger: sdd init, iniciar sdd, openspec init. Initialize SDD context, testing capabilities, registry, and persistence.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Generate repository wiki pages mapping architecture, specs, and status. Trigger: orchestrator launches sdd-document.
Shared SDD references for installed skills. Not invokable.
Read-only generalist screening contract for selective 4R review.
Read-only targeted correction validator for a bounded review lineage.
Write SDD delta specs with requirements and scenarios. Trigger: orchestrator launches spec work for a change.
Create pull requests with branch, validation, and publication checks. Trigger: creating, opening, or preparing PRs for review.
| name | sdd-init |
| description | Trigger: sdd init, iniciar sdd, openspec init. Initialize SDD context, testing capabilities, registry, and persistence. |
| disable-model-invocation | true |
| user-invocable | false |
| license | MIT |
| metadata | {"author":"manuel-retamozo-garcia","version":"3.0","delegate_only":true} |
| runtime_capabilities | {"execute":true,"mcp":false,"write":true} |
ORCHESTRATOR GATE: If you loaded this skill via the
skill()tool, you are the ORCHESTRATOR — STOP. Do NOT execute these instructions inline. Delegate to the dedicatedsdd-initsub-agent using your platform's delegation primitive (e.g.,task(...), sub-agent invocation, etc.). This skill is for EXECUTORS only.
Run this phase when the orchestrator/user asks to initialize SDD in a project. You are the phase executor: do the work yourself, do not delegate, and do not behave like the orchestrator.
openspec mode, follow ../_shared/openspec-convention.md and write file artifacts.openspec mode, treat OpenSpec files on disk as canonical workflow state for continuation and recovery; never rely on conversation history.none mode, return detected context only; write no SDD artifacts except the skill registry cache if required.openspec/config.yaml testing: when mode is openspec..ospec/cache/skill-registry.cache.json.openspec/ already exists, report what exists and ask before updating it.| Input | Action |
|---|---|
mode=openspec | Create/update openspec bootstrap files only. |
mode=none | Return detected context only; write no SDD artifacts except the skill registry cache if required. |
| strict TDD marker/config found | Use that value. |
| no marker/config but test runner exists | Default strict_tdd: true. |
| no test runner | Set strict_tdd: false and explain unavailable. |
existing code detected AND openspec/specs/ empty AND no baseline block | Activate brownfield branch: write baseline block, return next_recommended: sdd-baseline. |
baseline block already present (any status) | Preserve it unchanged; if status is pending or partial, return next_recommended: sdd-baseline. |
baseline.status: done | Brownfield branch does not activate; fall back to standard next_recommended logic. |
target_dir + Multirepo Detection)Run this resolution BEFORE any of the Execution Steps below. It resolves the base path and gates federated workspaces. No artifact is written until this resolution passes.
target_dirtarget_dir from the ## Parameters prompt block (the target_dir: <path> line),
using the same injection pattern as ## Project Standards. There is no env var and no
dynamic frontmatter field.## Parameters block is absent or the target_dir key is missing, fall
back to the current working directory (cwd). This is the backward-compatible default.target_dir is present, fs.stat the path:
ENOENT), STOP immediately and return status: blocked with a
question_gate(invalid-path) describing the non-existent path. Do NOT create files at
any location — the invalid-path gate fires before any artifact write.After resolving a valid base path, scan its immediate children (depth-1 only, no recursion):
.git (no .git of its own) AND has two or more (≥2) immediate children that each contain .git (directory OR file), treat it as a
workspace container and STOP: return status: blocked with a question_gate listing
exactly two options — federated (initialize as a federated workspace) and normal
(initialize as a single repo). Never auto-select the federated path. This gate fires
before any artifact write; no files are created until the user responds..git (single-repo), the container gate does NOT trigger and
init falls through to the normal flow unchanged..git (threshold is ≥2), the gate does NOT fire
and init continues as a normal single-repo init.package.json, go.mod, pyproject.toml, CI, lint/test config) and summarize stack/conventions.openspec/config.yaml, detected runner fallback, or no-runner fallback..ospec/cache/skill-registry.cache.json using the skill-registry scan rules.scale: <solo|team|enterprise> line from the ## Parameters prompt block (the orchestrator asks the user once at first init; absent → default team, ask nothing yourself). Write scale: {value} into openspec/config.yaml and materialize its preset:
solo: keep everything advisory — no extra blocks; routing prefers lite for trivial/small; clarify fires only on residual_ambiguity; 4R stays out of default route gates.team (default): current defaults unchanged; the Change Collision Gate applies (it is always-on when other active changes exist); traceability trailers stay advisory.enterprise: uncomment/write strict_tdd: true (when a runner exists), traceability: { trailers: required }, and mentorship: { mode: balanced }; keep 4R in the standard route gates; recommend declaring quality_gates: with on_fail: halt.
On re-init with an existing scale: key, preserve it unchanged (same rule as the baseline block).openspec/, docs/, and dotfiles AND openspec/specs/ is empty AND openspec/config.yaml has no baseline block, write the baseline block with status: pending, empty domains_pending, domains_done, stale_domains, and last_checked: "". On re-init, if a baseline block already exists, preserve it unchanged.Return a structured result with these fields:
status: success | blocked | partialexecutive_summary: one-sentence description of what was initializedartifacts: OpenSpec paths and registry paths writtennext_recommended: sdd-foundation for empty projects, otherwise sdd-explore or sdd-newrisks: warnings about detected stack, Strict TDD status, or persistence setupskill_resolution: injected, fallback-registry, fallback-path, or noneInclude project, stack, persistence mode, Strict TDD status, testing capability table, and saved paths in the detailed body.
../_shared/openspec-convention.md — openspec layout and rules.