Language: This skill is written in English for universal compatibility. Always respond in the user's language unless explicitly requested otherwise. If uncertain about the user's language, ask for clarification.
Enhance Workflow
Add enhancement requirements to existing arch document and update the design accordingly.
💡 Recommended Model
Opus Required - Consistency analysis with existing design is critical
→ Existing arch + new requirements + conflict validation = complex analysis
🔄 Tool Fallback
| Tool | Alternative when unavailable |
|---|---|
| Read/Grep | Request file path from user → ask for copy-paste |
| AskQuestion | "Please select: 1) OptionA 2) OptionB 3) OptionC" format |
| Task | Use step-by-step analysis without sub-agents, request user confirmation at each step |
📁 Document Structure
projectRoot/
└── docs/
└── {serviceName}/
├── spec.md # Original requirements
├── requirements-v2.md # ← Enhancement requirements (spec output)
├── arch.md # ← Existing design (synced state recommended)
└── trace.md
⚠️ Prerequisites
- •Existing arch.md is up-to-date (sync completed after debug)
- •Enhancement requirements refined through spec
Phase 0: Skill Entry
0-0. Model Guidance
⚠️ This skill strongly recommends using the Opus model. Consistency analysis with existing design is critical, requiring a high-performance model.
Input:
- •Enhancement requirements (requirements-v2.md or similar)
- •Existing arch.md (synced state recommended)
Output: Updated arch.md
0-1. Collect Input Information
{
"title": "Feature Enhancement Design",
"questions": [
{
"id": "has_enhance_req",
"prompt": "Do you have an enhancement requirements document? (generated by spec)",
"options": [
{"id": "yes", "label": "Yes - I will provide via @filepath"},
{"id": "no", "label": "No - Need requirements refinement first"}
]
}
]
}
- •
no→ Guide to spec skill - •
yes→ Request file path
{
"title": "Existing Design Document",
"questions": [
{
"id": "has_arch",
"prompt": "Do you have an existing arch.md?",
"options": [
{"id": "yes", "label": "Yes - I will provide via @filepath"},
{"id": "no", "label": "No - This is a new feature"}
]
},
{
"id": "is_synced",
"prompt": "Is arch.md up-to-date (debuges reflected)?",
"options": [
{"id": "yes", "label": "Yes - It's up-to-date"},
{"id": "no", "label": "No - Sync required"},
{"id": "unsure", "label": "Not sure"}
]
}
]
}
- •
is_synced: no→ Recommend running sync first - •
has_arch: no→ Guide to regular arch skill (new feature)
0-2. Infer serviceName
Extract serviceName from input file path:
- •Input:
docs/alert/arch.md - •Extract:
serviceName = "alert"
0-3. Git Commit Strategy
{
"title": "Git Commit Before Modification",
"questions": [
{
"id": "git_strategy",
"prompt": "Would you like to commit the current arch.md before modification?",
"options": [
{"id": "commit", "label": "Yes - Commit then proceed (recommended)"},
{"id": "skip", "label": "No - Proceed directly"}
]
}
]
}
- •
commitselected:bashgit add docs/{serviceName}/arch.md git commit -m "backup: arch.md before enhance" - •
skipselected: Proceed directly to Phase 1
Phase 1: Document Analysis
1-1. Analyze Existing Architect
Extract core information from existing design:
| Section | Information to Extract |
|---|---|
| Summary | Current Goal, Non-goals |
| Scope | Current implementation scope |
| Architecture | Component structure, DB schema |
| Code Mapping | Current file/class/method structure |
| API Spec | Current API list |
1-2. Analyze Enhancement Requirements
Extract from enhancement requirements:
| Item | Content |
|---|---|
| New features | Features to implement |
| Modified features | Existing feature modifications |
| Removed features | Features no longer needed |
| Non-functional requirements | Performance/security improvements |
1-3. Impact Analysis
## Impact Analysis
### Additions Required
| Item | Content | Affected Sections |
|------|---------|------------------|
| New API | {endpoint} | API Spec, Code Mapping |
| New table | {table name} | DB Schema, Architecture |
### Modifications Required
| Item | Current | After | Affected Sections |
|------|---------|-------|------------------|
| API change | {current spec} | {new spec} | API Spec |
| Schema change | {current columns} | {new columns} | DB Schema |
### Deletions
| Item | Reason |
|------|--------|
| {item to delete} | {reason} |
Phase 2: Enhancement Design (Sub-agent Collaboration)
2-A: Invoke Domain Architect
Use Task tool to call domain-architect sub-agent:
Task(
subagent_type: "domain-architect",
description: "Enhancement design based on existing design",
prompt: """
Existing arch.md: {existing design content}
Enhancement requirements: {enhancement requirements}
Provide enhancement design that maintains consistency with existing design.
- Maintain existing patterns/structure
- Minimize changes
- Consider migration
"""
)
2-B: Invoke Best Practice Advisor
Use Task tool to call best-practice-advisor sub-agent:
Task(
subagent_type: "best-practice-advisor",
description: "Enhancement best practices",
prompt: """
Enhancement requirements: {enhancement requirements}
Provide ideal design for this enhancement.
(No knowledge of existing design - no context)
"""
)
2-C: Collaboration (Same as arch skill)
Round 1-2 collaboration → User checkpoint → Decision
Phase 3: Integration with Existing Architect
3-1. Integration Strategy
| Change Type | Integration Method |
|---|---|
| Addition | Add new items to relevant sections |
| Modification | Replace existing items with new content |
| Deletion | Apply |
3-2. Section-by-Section Integration
Summary Section:
- •Modify/expand Goal
- •Update Non-goals
Scope Section:
- •Add In scope items
- •Review Out of scope
Architecture Impact Section:
- •Add/modify Components
- •Add/modify DB Schema
Code Mapping Section:
- •Add new file/class/method
- •Mark modifications to existing items
API Spec Section:
- •Add new endpoints
- •Modify existing endpoints
Implementation Plan Section:
- •Add enhancement implementation steps
3-3. Enhancement Marking
Mark integrated content as enhancement:
## 6. API Specification
### Existing APIs
(Keep existing content)
### 🆕 Enhanced APIs (v2 - {date})
| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/v1/alerts/batch | POST | Batch alert processing (enhancement) |
Phase 4: Quality Gate Validation
Perform same quality validation as Phase 5.5 in arch skill:
Required Validation Items
| Item | Validation Criteria |
|---|---|
| Existing feature impact | Check existing API/schema compatibility |
| New feature completeness | Verify all enhancement requirements reflected |
| Migration | Verify migration plan for DB changes |
Phase 5: Save and Complete
5-1. Update arch.md
Save existing arch.md with integrated enhancement content.
5-2. Add Sync History
---
## Sync History
| Date | Type | Source | Changes |
|------|------|--------|---------|
| {date} | enhance | requirements-v2 | {enhancement summary} |
5-3. Completion Report
## Enhancement Design Complete
### Summary
| Item | Content |
|------|---------|
| Service | {serviceName} |
| Enhancement Requirements | {requirements file} |
| Modified Sections | {section list} |
### Key Changes
- **Added**: {added features/APIs/tables}
- **Modified**: {modified items}
- **Removed**: {removed items}
### Files
- Updated: `docs/{serviceName}/arch.md`
### Next Steps
1. Review arch.md
2. Start implementation with `build` skill
Integration Flow
[spec] → existing spec.md
(Enhancement needed)
↓
[spec] → requirements-v2.md (enhancement requirements)
↓
[enhance] ← synced arch.md
↓
Updated arch.md
↓
[build] → Enhancement implementation
Important Notes
- •
Run sync first (recommended)
- •Existing arch must be up-to-date for accurate analysis
- •
Existing feature compatibility
- •Must verify enhancement doesn't break existing features
- •Explicitly warn on breaking changes
- •
Incremental enhancement
- •Avoid too many changes at once
- •Recommend step-by-step enhancement
- •
Consider migration
- •Migration plan required for DB schema changes
- •Validate data compatibility