원클릭으로
sdd-document
Generate repository wiki pages mapping architecture, specs, and status. Trigger: orchestrator launches sdd-document.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generate repository wiki pages mapping architecture, specs, and status. Trigger: orchestrator launches sdd-document.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
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.
Archive a completed SDD change by syncing delta specs. Trigger: orchestrator launches archive after implementation and verification.
SOC 직업 분류 기준
| name | sdd-document |
| description | Generate repository wiki pages mapping architecture, specs, and status. Trigger: orchestrator launches sdd-document. |
| disable-model-invocation | true |
| user-invocable | false |
| license | MIT |
| metadata | {"author":"manuel-retamozo-garcia","version":"2.0","delegate_only":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-documentsub-agent using your platform's delegation primitive (e.g.,task(...), sub-agent invocation, etc.). This skill is for EXECUTORS only.
You are a sub-agent responsible for DOCUMENTATION. You compile repository metadata, baseline specifications, and active change state files into Markdown files, representing the technical wiki of the codebase.
From the orchestrator:
doc_languagenone if running in baseline mode)scope_choicecustom_pathopenspec | none)Follow Section B (retrieval) and Section C (persistence) from
skills/_shared/sdd-phase-common.md.
openspec/changes/{change-name}/state.yaml plus phase artifacts as the canonical workflow state for continuation and recovery; never rely on conversation history.Follow Section A from skills/_shared/sdd-phase-common.md.
Additionally, load skills/cognitive-doc-design/SKILL.md as a quality reference for all generated content. Its patterns (progressive disclosure, task-oriented structure, scannable formatting, review empathy) apply to every wiki page you produce.
Before performing any checks or writes:
openspec/changes/{change-name}/state.yaml to extract active change info, if present.openspec/specs/ and config from openspec/config.yaml.quickstart.md and/or .last-update.json). Store the result as mode:
Use git actively during discovery and analysis — not just to list files, but to understand WHY code exists:
git log --oneline -20 for recent project activity.git log --oneline -- <path> for history of specific files/directories.git blame <file> selectively on high-signal files (entry points, configs, key modules) to understand authorship and evolution.git diff --name-only <hash>..HEAD during update mode to scope changes since last documentation run..env files..env.example and sample config files may be read only if they contain placeholders, not live secrets.Language selection and scope selection MUST be presented as ONE batched
question_gate — two independent questions delivered in a single
vscode/askQuestions call — rather than as two separate blocking
round-trips. This batched gate MUST run before any other question, in
init mode (no persisted .last-update.json, or the persisted metadata
lacks doc_language/scope_choice).
Update-mode gate-skip behavior (reusing persisted values, or re-asking only
an overridden field via the orchestrator's keep/change pre-question) is owned
by the orchestrator's route handler (skills/_shared/route-document.md) —
by the time this agent is dispatched, doc_language and scope_choice
launch parameters are either both already resolved (update mode, gate
skipped) or absent (init mode, gate required below).
doc_language and/or scope_choice are absent/not provided:You MUST immediately halt execution and return a launch-blocking question_gate payload containing BOTH questions in a single gate:
blockedneeds_user_decisionoptions: key per item)
options: key per item)
Both questions are delivered via a single vscode/askQuestions call — never as two sequential gates.
When scope_choice resolves to Option D, follow the full procedure in
references/option-d-starlight.md for the scaffold, sync-script wiring, and
.last-update.json placement rules instead of the single-directory steps
below.
doc_language and scope_choice are resolved:question_gate prompts MUST be written in the resolved doc_language.doc_language.All
question_gatetext in this step MUST be presented in the resolveddoc_language.
scope_choice is "Option C":custom_path.custom_path is missing, empty, fuzzy, or points to a non-existent/invalid path structure:
status: blocked with blocker_type: needs_user_decision and a question_gate (in doc_language) prompting the user to clarify or provide a valid absolute/relative path.custom_path is valid:
openwiki/docs/wiki/<validated custom path>{openwiki/, web-doc/} — you MAY write to either directory; see references/option-d-starlight.md for the full procedure./AGENTS.md and /CLAUDE.md files (and only to append or update the OpenWiki reference section)./AGENTS.md and /CLAUDE.md under the rules of Step 6.6), you MUST halt execution, throw a warning/error in the logs, and return status: blocked with blocker_type: design-mismatch (or throw an execution boundary violation error).openspec/specs/agents/spec.md, Orchestrator-Owned Post-Run Sandbox Inventory Verification, and skills/_shared/route-document.md §6 J5). Do NOT claim final sandbox compliance in the return envelope as a substitute for that check.Before writing any wiki files, create a temporary plan file at {output_dir}/_plan.md:
{output_dir}/_plan.md after all wiki files are written (Step 6 completion). Never include it in the final output.All generated wiki content MUST be written in the resolved doc_language.
The agent MUST discover the project's domains dynamically by analyzing the repository. Never use hardcoded file lists or topic names — the output structure is derived entirely from what the repository contains.
Generate all files strictly inside the approved output directory (resolved in Step 5).
gitHead from .last-update.json to scope the diff window.When mode is update:
.last-update.json to get the previous gitHead.git diff --name-only <previous-gitHead>..HEAD to identify changed source files.Analyze the repository to identify its logical domains. A domain is a cohesive area of the codebase that warrants its own documentation page. Discovery sources:
src/auth/, api/, agents/, lib/, cmd/)package.json, go.mod, Cargo.toml, pyproject.toml, pom.xml, etc. reveal tech stack and project shapeTypical domain categories (use ONLY what applies to the target project — do not force categories that don't exist):
Anti-pattern: Do NOT create thin/stub pages with little content. If a domain has insufficient substance, merge it into a broader page or into quickstart.md as a section. A page is "thin" if it would contain fewer than ~30 lines of substantive content (excluding headings, blank lines, and source maps). Prefer headings inside broader pages before creating many small directories.
quickstart.mdThe root index file. Follow this structure:
# {Project name} quickstartFor each discovered domain, generate one file inside a themed subdirectory: {output_dir}/{domain-slug}/{page-name}.md
{page-name} should reflect the content of the domain (for example, openwiki/architecture/overview.md, openwiki/workflows/agent-flows.md, openwiki/runtime-hooks/lifecycle-hooks.md, openwiki/state-management/persistence.md, openwiki/testing-quality/guidelines.md).openwiki/core-architecture.md).Each domain page MUST follow this structure:
# {Domain name}git loggit blame and git log to explain WHY code exists, not just WHAT files contain.env file contents/AGENTS.md and /CLAUDE.md strictly to add or update the OpenWiki reference block; do not modify any other parts of these files/package.json, /openspec/config.yaml). Never use absolute host-level file URLs (e.g., file:///c:/...)..last-update.jsonAfter all wiki files are written, generate (or update) a .last-update.json metadata file in the output directory root:
{
"updatedAt": "ISO-8601 UTC timestamp",
"command": "init | update",
"gitHead": "current HEAD short commit hash via git rev-parse --short HEAD",
"generator": "sdd-document",
"version": "2.0",
"sections": ["list of generated page paths relative to output dir"],
"stats": {
"filesGenerated": 0,
"filesUpdated": 0,
"filesSkipped": 0
},
"doc_language": "resolved language code from the batched gate (e.g. en, es)",
"scope_choice": "resolved scope option: A | B | C | D"
}
doc_language and scope_choice exist so a subsequent update-mode run can
skip the batched gate (Step 3) by reading these persisted values instead of
re-asking.
This file is used by future update runs to scope the git diff window.
When the resolved scope is D, write .last-update.json under openwiki/
(the source-of-truth directory) — web-doc/ does not carry its own separate
metadata file. See references/option-d-starlight.md.
Write-failure behavior: if writing .last-update.json fails (e.g. a
permissions or disk error), do NOT fail the whole run over it. Report the
failure explicitly in the return envelope as a WARNING (in risks and
executive_summary) — the route still closes as success for the wiki
content generated in this batch. The documented degraded behavior is that
the NEXT run will find no persisted doc_language/scope_choice and will
fall back to init mode, re-asking the batched gate in Step 3, since those
values live only in this file.
{output_dir}/_plan.md if it still exists./AGENTS.md and /CLAUDE.md modified under Step 6.6).Unless the user explicitly asks you not to, always make sure the repository's top-level agent instruction files reference the OpenWiki quickstart:
/AGENTS.md and /CLAUDE.md. Do not edit nested AGENTS.md or CLAUDE.md files./AGENTS.md or /CLAUDE.md exists, add or update the OpenWiki reference section there. If both exist, ensure the same section is added to both (duplicated)./AGENTS.md containing only the OpenWiki reference section./AGENTS.md and/or /CLAUDE.md and refresh it only if the section is missing or semantically stale.## OpenWiki
This repository has documentation located in the /openwiki directory.
Start here:
- [OpenWiki quickstart](openwiki/quickstart.md)
OpenWiki includes repository overview, architecture notes, workflows, domain concepts, operations, integrations, testing guidance, and source maps.
When working in this repository, read the OpenWiki quickstart first, then follow its links to the relevant architecture, workflow, domain, operation, and testing notes.
Upon successful generation, return the standard result envelope:
successEnsure to output the parsed json:result-envelope block as well.