Skill: Decompose into Units
---
---
---
Show at start of this skill:
### Inception Progress
- [x] Intent created
- [x] Requirements gathered
- [ ] Generating artifacts... ← current
- [x] System Context
- [ ] Units ← this skill
- [ ] Stories
- [ ] Bolt Plan
- [ ] Artifacts reviewed (Checkpoint 3)
- [ ] Ready for Construction---
**NO INDIVIDUAL Checkpoint** - This skill is part of the batched artifact generation.
All artifacts (Context, Units, Stories, Bolts) are reviewed together at **Checkpoint 3** in the `review` skill.
---
Break the Intent into independently deployable Units of Work based on project type configuration.
---
---
**CRITICAL**: Before decomposing, understand what types of units to create.
project_type: full-stack-web # or backend-api, frontend-app, cli-tool, library unit_structure:
backend:
enabled: true
decomposition: domain-driven
default_bolt_type: ddd-construction-bolt
frontend:
enabled: true
decomposition: feature-based
default_bolt_type: simple-construction-bolt
naming_pattern: "{intent}-ui"**If project.yaml doesn't exist**, default to `backend-api` behavior (backend only).
---
**Skip this step if `backend.enabled: false`.**
Review requirements and context to identify:
**Skip this step if `backend.enabled: false`.**
For each potential unit, verify:
**CRITICAL**: Each FR from requirements.md must be assigned to exactly one unit.
## Requirement-to-Unit Mapping
- **FR-1**: {description} → `{unit-name}`
- **FR-2**: {description} → `{unit-name}`
- **FR-3**: {description} → `{unit-name}`This mapping ensures:
**Skip this step if `frontend.enabled: false`.**
When `frontend.enabled: true` in the project type configuration, create a frontend unit:
### Unit N: {intent}-ui
- **Purpose**: Frontend application (pages, components, state management)
- **Responsibility**: User interface and client-side logic
- **Assigned Requirements**: All user-facing FRs
- **Dependencies**: All backend service units
- **Interface**: Consumes APIs from backend units
- **Unit Type**: frontend
- **Default Bolt Type**: simple-construction-bolt**Frontend unit characteristics**:
**Include in unit-brief.md**:
---
unit: {UUU}-{intent}-ui
unit_type: frontend
default_bolt_type: simple-construction-bolt
---**Note**: The `unit` field uses the full folder name including the numeric prefix (e.g., `001-auth-service`, `002-auth-service-ui`). This matches the folder structure and enables direct path construction in scripts.
---
Present proposed decomposition with their assigned requirements:
## Proposed Units
### Unit 1: {unit-name}
- **Purpose**: {what it does}
- **Responsibility**: {single responsibility}
- **Assigned Requirements**: FR-1, FR-2
- **Dependencies**: {other units it depends on}
- **Interface**: {how other units interact with it}
### Unit 2: {unit-name}
- **Assigned Requirements**: FR-3, FR-4
...
### Unit N: {intent}-ui (if frontend enabled)
- **Purpose**: Frontend application
- **Unit Type**: frontend
- **Dependencies**: All backend units*(Default: `memory-bank/intents/{intent-name}/units.md`)*
Update `units.md` with all units for this intent
For each unit: `{schema.units}/{UUU}-{unit-name}/`
For each unit, create `{UUU}-{unit-name}/unit-brief.md` using `.specsmd/aidlc/templates/inception/unit-brief-template.md`
This brief is the **input for Construction Agent**. Include:
Example frontmatter:
---
unit: {UUU}-{unit-name}
intent: {NNN}-{intent-name}
phase: inception
status: draft
---**Note**: The `unit` field uses the full folder name including the numeric prefix. This matches the folder structure and enables direct path construction in scripts.
Story naming uses the story title (e.g., `001-user-signup.md`). No prefix field needed.
**For frontend units**, also include:
unit_type: frontend
default_bolt_type: simple-construction-boltFor each unit, verify:
---
## Unit Decomposition: {NNN}-{intent-name}
### Units Created
- [ ] **{UUU}-{unit-1}**: {purpose} - Dependencies: None - Stories: ~{n}
- [ ] **{UUU}-{unit-2}**: {purpose} - Dependencies: `{UUU}-{unit-1}` - Stories: ~{n}
### Dependency Graph
{UUU}-{unit-1} ──► {UUU}-{unit-2} ──► {UUU}-{unit-3}
│
▼
{UUU}-{unit-4}
### Artifacts Created
✅ `{intent-path}/units.md`
✅ `{intent-path}/units/{UUU}-{unit-1}/unit-brief.md`
✅ `{intent-path}/units/{UUU}-{unit-2}/unit-brief.md`
**No menu** - Skill complete, return to agent.
---
input: Intent requirements, system context, project.yaml, catalog.yaml
output: units.md, unit-brief.md for each unit (including frontend unit if enabled)
checkpoints: 0 (part of Checkpoint 3 batch)