sdd-adopt
Adopt SDD in an existing repository. Creates only what is missing — structure directories, AGENTS.md, CLAUDE.md, host-appropriate CI/issue/PR templates — without writing specifications or application code.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- sdd-adopt
- description
- Adopt SDD in an existing repository. Creates only what is missing — structure directories, AGENTS.md, CLAUDE.md, host-appropriate CI/issue/PR templates — without writing specifications or application code.
- user-invocable
- false
- disable-model-invocation
- false
03 SKILL.md 正文
SDD Adopt
Bring a pre-existing project up to the structure the SDD workflow requires. Create structure and constitution documents; do not write specifications or application code.
Invocation
Codex:
Use the sdd-adopt skill.
Claude Code — internal skill, not directly invocable. Reached by following this file from its entry command:
/sdd-bootstrap:bootstrap
project-root defaults to the repository root when omitted.
Process
-
Run
scripts/check-sdd-structure.sh [project-root](or.ps1on Windows) and treat its output as the source of truth.- Lines prefixed
missing:are required items that must be created. - Lines prefixed
advisory:are recommended items; confirm with the user before creating. - Lines prefixed
drift:identify spec-local ADR directories to relocate. - Lines prefixed
host:declare the detected VCS host (GitHub / GitLab / local). - If the script exits 0 with no
missing:,advisory:, ordrift:lines, report "already compliant" and stop.
- Lines prefixed
-
Create missing directories mechanically. Place a
.gitkeepin each empty directory so it is tracked by Git.- Required:
reports/implementation/,reports/quality-gate/,docs/adr/,docs/review-tickets/ - Advisory (confirm with user):
contracts/schemas/,docs/architecture/
- Required:
-
Create
AGENTS.mdwhen absent. Populate it from thesdd-bootstrap-interviewerskill's bundledtemplates/AGENTS.template.md, substituting facts read from the repository (README, build files, test layout). Record every unknown product decision as an Open Question; never invent answers. -
Create
CLAUDE.mdfrom the bundledtemplates/CLAUDE.template.mdwhen absent. -
Use the
host:output fromcheck-sdd-structureto select templates.- GitHub → create GitHub Actions workflow (
ci-github.template.yml→.github/workflows/), Issue templates (.github/ISSUE_TEMPLATE/), and a PR template (.github/pull_request_template.md). - GitLab → create GitLab CI (
ci-gitlab.template.yml→.gitlab-ci.yml), Issue templates (.gitlab/issue_templates/), and MR templates (.gitlab/merge_request_templates/). - Never create
.github/templates on a GitLab host or.gitlab/templates on a GitHub host. localor unknown host → skip CI/issue/PR templates; report the gap.
- GitHub → create GitHub Actions workflow (
-
Relocate ADR drift. For each
drift:line identifying aspecs/*/adr/directory:- Move each ADR file to
docs/adr/NNNN-<slug>.mdusing a 4-digit repository-wide sequence (continue from the highest existing number indocs/adr/). - Update every reference to the old path across all Git-tracked files (grep and replace).
- List each move in the Handoff.
- Move each ADR file to
-
Never overwrite an existing file. When an existing file conflicts with the SDD constitution, report the conflict and leave the file unchanged.
Boundaries
- Do not generate feature specifications; that is
sdd-bootstrap-interviewer's job. - Do not modify application source code or tests.
- Do not commit, push, or create a PR/MR unless explicitly requested.
Handoff
Report:
- Files created and directories created (with
.gitkeep). - ADRs moved (old path → new path).
- Host detected and templates applied.
- Conflicts (existing files that were not overwritten).
- Open Questions recorded in
AGENTS.md. - Next step: run
sdd-bootstrap-interviewerinfeature(or other) mode to generate specifications.
04 同仓库更多 Skills
status
Show a read-only Jira-style six-view SDD dashboard in the initiating parent's Sites or Claude Artifacts, with source freshness and failure visibility.
verify-review-reservation
Recheck the bounded identity-ledger reservation invariant after lock, hash-check or publication changes.
aws-cdk
Authors, deploys, and troubleshoots AWS infrastructure using CDK with TypeScript or Python. Covers best practices, stack architecture, and construct patterns. Applies when writing CDK constructs, bootstrapping environments, running cdk deploy/synth/diff, fixing CDK or CloudFormation errors, planning stack structure, importing existing resources, resolving drift, or refactoring stacks without resource replacement.
quality-gate
Independently verify an Implementation Complete task with a Default-FAIL verification contract, deterministic checks, and an isolated critical reviewer, then decide whether it is Done.
ship
Implement approved SDD tasks through the quality gate to Done — the second of the two-command workflow. Run after /sdd-bootstrap:bootstrap and human task approval.
ship
Implement approved SDD tasks through the quality gate to Done — the second of the two-command workflow. Run after /sdd-bootstrap:bootstrap and human task approval.