Change Creation Skill
Purpose
Create a complete change specification package consisting of:
- Change directory:
changes/YYYY/MM/DD/<change-name>/ - Specification:
SPEC.mdwith proper frontmatter, type-specific sections, and domain updates - Implementation plan:
PLAN.mdwith dynamically generated phases - INDEX.md update with new change entry
Key Principles
Skills vs Agents Separation
| Context | Responsibility |
|---|---|
| Skills (main context) | All planning, spec creation, domain docs - interactive, needs user input |
| Agents (subagent) | Execution only - non-interactive, implements approved plans |
This skill handles all spec and plan creation. Implementation agents only execute the approved plan.
Domain Documentation During Planning
Domain documentation is specified in SPEC.md during planning, not discovered during implementation:
- Glossary terms are explicitly listed
- Definition specs are identified upfront
- Architecture changes are noted
Implementation simply executes these specifications.
Dynamic Phase Generation
Plans are generated dynamically based on:
- Project components from
sdd/sdd-settings.yaml(delegate to theproject-settingsskill for the settings schema — it returns the component list withname,type, and type-specific settings) - Which components are affected by the change
- Dependency order between components
- Contextual agent assignment
Input
Schema: schemas/input.schema.json
Accepts change metadata (name, type, title, domain), optional workflow context, and content from spec solicitation or external integration.
Output
Schema: schemas/output.schema.json
Returns paths to created SPEC.md and PLAN.md files, and whether the index was updated.
Workflow
Step 1: Validate Inputs
-
Validate
nameis a valid directory name:- Lowercase letters, numbers, hyphens only
- No spaces or special characters
- Not empty
-
Validate
typeis one of:feature,bugfix,refactor,epic -
Ensure required parameters are provided:
name,type,title,description,domain
Step 2: Generate Date Path
- Get current date
- Format as
YYYY/MM/DD - Full path:
changes/YYYY/MM/DD/<name>/
Step 3: Read Plugin Version and Settings
- Read SDD plugin version from
.claude-plugin/plugin.json - Read project components from
sdd/sdd-settings.yaml - Identify affected components (from input or infer from description)
Step 4: Create Change Directory
mkdir -p changes/YYYY/MM/DD/<name>/
Step 5: Create SPEC.md
Create changes/YYYY/MM/DD/<name>/SPEC.md using type-specific template.
Common Frontmatter (all types)
---
title: <title>
type: <type>
status: active
domain: <domain>
issue: <issue or "TBD">
created: YYYY-MM-DD
updated: YYYY-MM-DD
sdd_version: <plugin_version>
affected_components:
- <component-1>
- <component-2>
decomposition_id: <uuid> # Only if provided
---
Type-Specific Content
Use the template for the change type. Each template is a complete markdown document to use as the SPEC.md body (after the frontmatter above).
| Type | Template | Notes |
|---|---|---|
feature | templates/spec-feature.md | Thorough, self-sufficient technical spec |
bugfix | templates/spec-bugfix.md | Focused on symptoms, root cause, and fix |
refactor | templates/spec-refactor.md | Current state, proposed design, behavior preservation |
epic | templates/spec-epic.md | Parent spec with child change breakdown |
Epic Directory Structure:
After creating the epic's own SPEC.md and PLAN.md, create child change directories:
changes/YYYY/MM/DD/<epic-name>/
├── SPEC.md
├── PLAN.md
└── changes/
├── <child-change-1>/
│ ├── SPEC.md
│ └── PLAN.md
└── <child-change-2>/
├── SPEC.md
└── PLAN.md
Each child change uses the standard feature spec template with parent_epic: ../SPEC.md in frontmatter.
Step 6: Create PLAN.md with Dynamic Phases
Create changes/YYYY/MM/DD/<name>/PLAN.md using dynamic phase generation.
Phase Generation Algorithm
- Read project components from
sdd/sdd-settings.yaml - Filter to affected components (from SPEC.md
affected_components) - Order by dependency graph: Invoke
techpacks.dependencyOrderfor the active tech pack to get the topological order of component types. Filter to only affected components while preserving dependency order. - Assign agents: Invoke
techpacks.readManifestand readcomponents.<type>.agentfor each affected component type. For standards, invoketechpacks.routeSkills(phase: plan-generation, component_type: <type>). - Add final phases: Read
lifecycle.testing.agentandlifecycle.verification.agentfrom the manifest.
Plan Frontmatter
---
title: <title> - Implementation Plan
change: <name>
type: <type>
spec: ./SPEC.md
status: draft
created: YYYY-MM-DD
sdd_version: <plugin_version>
---
Plan Content
Use the template for the change type. Each template is a complete markdown document to use as the PLAN.md body (after the frontmatter above).
| Type | Template | Notes |
|---|---|---|
feature | templates/plan-feature.md | Dynamic phases based on affected components |
bugfix | templates/plan-bugfix.md | 4 phases: investigation, fix, test, review |
refactor | templates/plan-refactor.md | 4 phases: preparation, refactor, test, review |
epic | templates/plan-epic.md | Change order and dependency graph |
Step 7: Update INDEX.md
Add entry to changes/INDEX.md:
- Find the
## Active Changessection (create if missing) - Add entry with type indicator:
Note: Links are relative within the- [<title>](YYYY/MM/DD/<name>/SPEC.md) - <type> - <description>changes/directory.
Step 8: Return Result
Return:
spec_path: changes/YYYY/MM/DD/<name>/SPEC.md
plan_path: changes/YYYY/MM/DD/<name>/PLAN.md
index_updated: true
PR Size Guidelines
Each phase should result in a reviewable PR:
| Metric | Target | Maximum |
|---|---|---|
| Lines changed | < 400 | 800 |
| Files changed | < 15 | 30 |
| Acceptance criteria | < 5 | 8 |
If a phase exceeds limits:
- Split into sub-phases (e.g., Phase 2a, Phase 2b)
- Each sub-phase gets its own PR
- Document splits in plan
Epic Lifecycle
Epics group multiple feature-type changes under a single goal. The creation workflow (Steps 1-8 above) handles epic SPEC.md and PLAN.md generation using the epic type templates. This section covers epic-specific tracking, implementation, and failure handling.
Workflow Tracking
Epics are tracked in sdd/workflows/<id>-<name>/workflow.yaml:
items:
- id: 01-user-management
title: User Management
type: epic
status: pending
children:
- id: 01-registration
change_id: user-auth-1
title: Registration
type: feature
status: pending
- Epic items have
type: epicand achildrenarray - Only leaf features get change_ids (epics don't)
- Epic status is derived from child statuses
Implementing an Epic
For each child change, in dependency order:
- Branch:
git checkout -b epic/<epic-name>/<change-name> - Implement: Follow the child change's PLAN.md (standard feature implementation)
- Test: Ensure all tests pass
- PR: Create PR with change scope (one PR per child change)
- Review: Get approval
- Merge: Merge to main
- Update: Mark change complete in epic PLAN.md
Handling Failures
If a child change