一键导入
sdlc-decompose
Identify distinct software components from design artifacts and create per-component directories. Use when transitioning from Design to Code phase.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Identify distinct software components from design artifacts and create per-component directories. Use when transitioning from Design to Code phase.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Interactive requirements elicitation for the Specification phase. Use when defining, reviewing, or modifying stakeholders, goals, user stories, requirements, assumptions, or constraints. Also performs gap analysis on existing artifacts.
Create a phased implementation plan from design artifacts. Populates tasks.md with short tasks grouped into incremental development phases, each ending with a deployable/testable system. Use after SDLC-decompose, before coding begins.
Execute a development task from the implementation plan. Selects the next pending task when invoked bare, or uses user-provided context to identify the task otherwise. Derives actual scope from specification/design/decisions, implements with tests, handles design gaps, and updates task status. Use during the Code phase.
Apply a user-reported fix, bug correction, or change to one or more components. Gathers context interactively, identifies affected components, builds informative context from design artifacts and decisions, implements the fix with tests, and handles design gaps. Use during the Code phase or later.
Draft or update design documents based on approved specification. Use when translating requirements into technical specifications. Covers architecture, data model, API design, and design completeness assessment.
Project-wide status dashboard across all SDLC phases. Use when the user wants an overview of the entire project state. Aggregates artifact counts, statuses, phase gate readiness, traceability health, and assessment freshness into a single report.
| name | SDLC-decompose |
| description | Identify distinct software components from design artifacts and create per-component directories. Use when transitioning from Design to Code phase. |
You are working at the Design → Code transition, analyzing design artifacts to identify distinct software components, creating per-component directories in the Code phase, and documenting them in the Code phase instructions.
Before doing anything else, read the ### Current State subsection under ## Project Overview in CLAUDE.md and determine which phase the project is in. Then follow the matching case below:
Project not initialized — the Current State lacks a real project description (e.g., mentions "not yet been initialized" or "base scaffold"). Stop, recommend /SDLC-init, and do not proceed.
Project is in the Specification phase — the Current State mentions "Specification phase", lists specification artifacts being drafted, or no phase beyond Specification has been started. Stop, recommend /SDLC-elicit to continue refining specification or /SDLC-design to start the design phase, and do not proceed.
Project is in the Design phase — the Current State indicates the project is in the Design phase (e.g., mentions "Design phase", "architecture", "design documents being worked on", or no phase beyond Design has been started).
Evaluate the Design → Code phase gate preconditions:
architecture.md, data-model.md, and api-design.md are draftedThen respond based on the results:
/SDLC-design to continue drafting, and do not proceed./SDLC-design before decomposition. Proceed only on explicit user confirmation.Project has advanced beyond Design — the Current State indicates the project is in Code or Deploy phase. Warn that reorganizing components can heavily impact downstream tasks and existing code (task assignments, directory structure, imports, build configuration, and deployment pipelines may all need updating). If the user confirms, proceed but flag downstream dependencies that could be affected.
2-design/CLAUDE.design.md (phase instructions and decisions index).2-design/architecture.md — the primary source for component identification.2-design/api-design.md — look for communication interfaces between components.2-design/data-model.md — understand which components own which data.3-code/CLAUDE.code.md — understand the current state of the Components section.3-code/ to avoid overwriting existing structure.decisions/.The goal of this step is to identify parts of the system that benefit from being organized as separate codebases — with their own directory tree, dependencies, build toolchain, or test suite. Separating these parts makes it easier to develop, build, and test each one independently, and keeps the repository structure aligned with the system's architectural boundaries.
A component is a cohesive unit of software with:
Identification heuristics (apply in order of strength):
For each identified component, collect:
backend, frontend, tts-engine)REQ-* IDs it covers (from the requirement traceability section of the architecture or from cross-referencing the design)DEC-* apply to this componentPresent the identified components to the user in a table:
| Component | Responsibility | Technology | Interfaces |
|---|---|---|---|
| ... | ... | ... | ... |
For each component, briefly explain which heuristic(s) matched and what evidence from the design artifacts supports the identification.
If any component boundary is ambiguous (e.g., a module could be part of a larger component or independent), present the alternatives and ask the user to decide.
Wait for user approval before proceeding. The user may merge, split, rename, or redefine components.
For each approved component, create a directory and a CLAUDE.component.md inside it:
3-code/<component-name>/CLAUDE.component.md
The CLAUDE.component.md file should contain:
# <Component Display Name>
**Responsibility**: <one-line summary from architecture>
**Technology**: <primary language/framework and key libraries>
## Interfaces
- <protocol> with <other-component>: <brief description>
## Requirements Addressed
| File | Type | Priority | Summary |
|------|------|----------|---------|
| [REQ-*](../../1-spec/requirements/REQ-*.md) | ... | ... | ... |
## Relevant Decisions
| File | Title | Trigger |
|------|-------|---------|
| [DEC-*](../../decisions/DEC-*.md) | ... | ... |
Do not move or restructure existing files in 2-design/. The shared design documents (architecture.md, data-model.md, api-design.md) remain in their phase directory. Component directories in 3-code/ supplement them with component-specific focus.
Replace the placeholder content in the ## Components section with an entry for each component. Use this format:
### <Component Display Name>
- **Directory**: [`<component-name>/`](<component-name>/)
- **Technology**: <primary language/framework>
- **Responsibility**: <one-line summary from architecture>
Keep the section concise — it is a navigation aid, not a design document.
After the component structure is created and CLAUDE.code.md is updated, inform the user that the next step is implementation planning via /SDLC-implementation-plan. This skill reads the design artifacts and component definitions to produce a phased sequence of short development tasks in 3-code/tasks.md, each phase ending with a deployable or testable system.
After applying approved changes, update the ### Current State subsection under ## Project Overview in CLAUDE.md to note the component decomposition (e.g., "3 components identified: backend, frontend, tts-engine; per-component directories created").
2-design/ top level.CLAUDE.component.md in 3-code/. Actual source code, build configuration, and test scaffolding are added during implementation.CLAUDE.code.md, do not remove or modify content outside the sections this skill manages.