@qazuor/claude-code-config 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1248 -0
- package/dist/bin.cjs +11886 -0
- package/dist/bin.cjs.map +1 -0
- package/dist/bin.d.cts +1 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +11869 -0
- package/dist/bin.js.map +1 -0
- package/dist/index.cjs +3887 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1325 -0
- package/dist/index.d.ts +1325 -0
- package/dist/index.js +3835 -0
- package/dist/index.js.map +1 -0
- package/package.json +86 -0
- package/templates/.log/notifications.log +1775 -0
- package/templates/agents/README.md +164 -0
- package/templates/agents/_registry.json +443 -0
- package/templates/agents/design/content-writer.md +353 -0
- package/templates/agents/design/ux-ui-designer.md +382 -0
- package/templates/agents/engineering/astro-engineer.md +293 -0
- package/templates/agents/engineering/db-drizzle-engineer.md +360 -0
- package/templates/agents/engineering/express-engineer.md +316 -0
- package/templates/agents/engineering/fastify-engineer.md +399 -0
- package/templates/agents/engineering/hono-engineer.md +263 -0
- package/templates/agents/engineering/mongoose-engineer.md +473 -0
- package/templates/agents/engineering/nestjs-engineer.md +429 -0
- package/templates/agents/engineering/nextjs-engineer.md +451 -0
- package/templates/agents/engineering/node-typescript-engineer.md +347 -0
- package/templates/agents/engineering/prisma-engineer.md +432 -0
- package/templates/agents/engineering/react-senior-dev.md +394 -0
- package/templates/agents/engineering/tanstack-start-engineer.md +447 -0
- package/templates/agents/engineering/tech-lead.md +269 -0
- package/templates/agents/product/product-functional.md +329 -0
- package/templates/agents/product/product-technical.md +578 -0
- package/templates/agents/quality/debugger.md +514 -0
- package/templates/agents/quality/qa-engineer.md +390 -0
- package/templates/agents/specialized/enrichment-agent.md +277 -0
- package/templates/agents/specialized/i18n-specialist.md +322 -0
- package/templates/agents/specialized/seo-ai-specialist.md +387 -0
- package/templates/agents/specialized/tech-writer.md +300 -0
- package/templates/code-style/.editorconfig +27 -0
- package/templates/code-style/.prettierignore +25 -0
- package/templates/code-style/.prettierrc +12 -0
- package/templates/code-style/biome.json +78 -0
- package/templates/code-style/commitlint.config.js +44 -0
- package/templates/commands/README.md +175 -0
- package/templates/commands/_registry.json +420 -0
- package/templates/commands/add-new-entity.md +211 -0
- package/templates/commands/audit/accessibility-audit.md +360 -0
- package/templates/commands/audit/performance-audit.md +290 -0
- package/templates/commands/audit/security-audit.md +231 -0
- package/templates/commands/code-check.md +127 -0
- package/templates/commands/five-why.md +225 -0
- package/templates/commands/formatting/format-markdown.md +197 -0
- package/templates/commands/git/commit.md +247 -0
- package/templates/commands/meta/create-agent.md +257 -0
- package/templates/commands/meta/create-command.md +312 -0
- package/templates/commands/meta/create-skill.md +321 -0
- package/templates/commands/meta/help.md +318 -0
- package/templates/commands/planning/check-completed-tasks.md +224 -0
- package/templates/commands/planning/cleanup-issues.md +248 -0
- package/templates/commands/planning/planning-cleanup.md +251 -0
- package/templates/commands/planning/sync-planning-github.md +133 -0
- package/templates/commands/planning/sync-todos-github.md +203 -0
- package/templates/commands/quality-check.md +211 -0
- package/templates/commands/run-tests.md +159 -0
- package/templates/commands/start-feature-plan.md +232 -0
- package/templates/commands/start-refactor-plan.md +244 -0
- package/templates/commands/sync-planning.md +176 -0
- package/templates/commands/update-docs.md +242 -0
- package/templates/docs/CHECKPOINT-SYSTEM.md +504 -0
- package/templates/docs/INDEX.md +677 -0
- package/templates/docs/RECOMMENDED-HOOKS.md +415 -0
- package/templates/docs/_registry.json +329 -0
- package/templates/docs/diagrams/README.md +220 -0
- package/templates/docs/diagrams/agent-hierarchy.mmd +55 -0
- package/templates/docs/diagrams/documentation-map.mmd +61 -0
- package/templates/docs/diagrams/tools-relationship.mmd +55 -0
- package/templates/docs/diagrams/workflow-decision-tree.mmd +38 -0
- package/templates/docs/doc-sync.md +533 -0
- package/templates/docs/examples/end-to-end-workflow.md +1505 -0
- package/templates/docs/glossary.md +495 -0
- package/templates/docs/guides/mockup-prompt-engineering.md +644 -0
- package/templates/docs/guides/mockup-setup.md +737 -0
- package/templates/docs/learnings/README.md +250 -0
- package/templates/docs/learnings/common-architectural-patterns.md +123 -0
- package/templates/docs/learnings/common-mistakes-to-avoid.md +149 -0
- package/templates/docs/learnings/markdown-formatting-standards.md +104 -0
- package/templates/docs/learnings/monorepo-command-execution.md +64 -0
- package/templates/docs/learnings/optimization-tips.md +146 -0
- package/templates/docs/learnings/planning-linear-sync-workflow.md +70 -0
- package/templates/docs/learnings/shell-compatibility-fish.md +46 -0
- package/templates/docs/learnings/test-organization-structure.md +68 -0
- package/templates/docs/mcp-installation.md +613 -0
- package/templates/docs/mcp-servers.md +989 -0
- package/templates/docs/notification-installation.md +570 -0
- package/templates/docs/quick-start.md +354 -0
- package/templates/docs/standards/architecture-patterns.md +1064 -0
- package/templates/docs/standards/atomic-commits.md +513 -0
- package/templates/docs/standards/code-standards.md +993 -0
- package/templates/docs/standards/design-standards.md +656 -0
- package/templates/docs/standards/documentation-standards.md +1160 -0
- package/templates/docs/standards/testing-standards.md +969 -0
- package/templates/docs/system-maintenance.md +604 -0
- package/templates/docs/templates/PDR-template.md +561 -0
- package/templates/docs/templates/TODOs-template.md +534 -0
- package/templates/docs/templates/tech-analysis-template.md +800 -0
- package/templates/docs/workflows/README.md +519 -0
- package/templates/docs/workflows/atomic-task-protocol.md +955 -0
- package/templates/docs/workflows/decision-tree.md +482 -0
- package/templates/docs/workflows/edge-cases.md +856 -0
- package/templates/docs/workflows/phase-1-planning.md +957 -0
- package/templates/docs/workflows/phase-2-implementation.md +896 -0
- package/templates/docs/workflows/phase-3-validation.md +792 -0
- package/templates/docs/workflows/phase-4-finalization.md +927 -0
- package/templates/docs/workflows/quick-fix-protocol.md +505 -0
- package/templates/docs/workflows/task-atomization.md +537 -0
- package/templates/docs/workflows/task-completion-protocol.md +448 -0
- package/templates/hooks/on-notification.sh +28 -0
- package/templates/schemas/checkpoint.schema.json +97 -0
- package/templates/schemas/code-registry.schema.json +84 -0
- package/templates/schemas/pdr.schema.json +314 -0
- package/templates/schemas/problems.schema.json +55 -0
- package/templates/schemas/tech-analysis.schema.json +404 -0
- package/templates/schemas/telemetry.schema.json +298 -0
- package/templates/schemas/todos.schema.json +234 -0
- package/templates/schemas/workflows.schema.json +69 -0
- package/templates/scripts/add-changelogs.sh +105 -0
- package/templates/scripts/generate-code-registry.ts +270 -0
- package/templates/scripts/health-check.sh +343 -0
- package/templates/scripts/sync-registry.sh +40 -0
- package/templates/scripts/telemetry-report.ts +36 -0
- package/templates/scripts/validate-docs.sh +224 -0
- package/templates/scripts/validate-registry.sh +225 -0
- package/templates/scripts/validate-schemas.ts +283 -0
- package/templates/scripts/validate-structure.sh +165 -0
- package/templates/scripts/worktree-cleanup.sh +81 -0
- package/templates/scripts/worktree-create.sh +63 -0
- package/templates/sessions/planning/.gitkeep +0 -0
- package/templates/sessions/planning/archived/.gitkeep +0 -0
- package/templates/settings.json +202 -0
- package/templates/settings.local.json +138 -0
- package/templates/skills/README.md +197 -0
- package/templates/skills/_registry.json +473 -0
- package/templates/skills/audit/accessibility-audit.md +309 -0
- package/templates/skills/audit/performance-audit.md +257 -0
- package/templates/skills/audit/security-audit.md +217 -0
- package/templates/skills/auth/nextauth-patterns.md +308 -0
- package/templates/skills/brand-guidelines.md +240 -0
- package/templates/skills/documentation/markdown-formatter.md +302 -0
- package/templates/skills/git/git-commit-helper.md +321 -0
- package/templates/skills/i18n/i18n-patterns.md +251 -0
- package/templates/skills/patterns/error-handling-patterns.md +242 -0
- package/templates/skills/patterns/tdd-methodology.md +342 -0
- package/templates/skills/qa/qa-criteria-validator.md +383 -0
- package/templates/skills/qa/web-app-testing.md +398 -0
- package/templates/skills/react/react-hook-form-patterns.md +359 -0
- package/templates/skills/state/redux-toolkit-patterns.md +272 -0
- package/templates/skills/state/tanstack-query-patterns.md +299 -0
- package/templates/skills/state/zustand-patterns.md +301 -0
- package/templates/skills/tech/mermaid-diagram-specialist.md +195 -0
- package/templates/skills/tech/shadcn-specialist.md +252 -0
- package/templates/skills/tech/vercel-specialist.md +297 -0
- package/templates/skills/testing/api-app-testing.md +254 -0
- package/templates/skills/testing/performance-testing.md +275 -0
- package/templates/skills/testing/security-testing.md +348 -0
- package/templates/skills/utils/add-memory.md +295 -0
- package/templates/skills/utils/json-data-auditor.md +283 -0
- package/templates/skills/utils/pdf-creator-editor.md +342 -0
- package/templates/tools/format-markdown.sh +185 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: start-feature-plan
|
|
3
|
+
description: Initialize comprehensive feature planning following the Four-Phase Workflow
|
|
4
|
+
type: planning
|
|
5
|
+
category: planning
|
|
6
|
+
config_required:
|
|
7
|
+
planning_path: "Base path for planning sessions (e.g., .claude/sessions/planning)"
|
|
8
|
+
issue_tracker: "Issue tracking system name (e.g., GitHub, Linear, Jira)"
|
|
9
|
+
pdr_template: "Path to PDR template file"
|
|
10
|
+
tech_analysis_template: "Path to technical analysis template"
|
|
11
|
+
todos_template: "Path to TODOs template file"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Start Feature Plan Command
|
|
15
|
+
|
|
16
|
+
Initialize comprehensive planning for a new feature following the Four-Phase Workflow. Creates structured planning session with complete documentation and atomic task breakdown.
|
|
17
|
+
|
|
18
|
+
## ⚙️ Configuration
|
|
19
|
+
|
|
20
|
+
| Setting | Description | Example |
|
|
21
|
+
|---------|-------------|---------|
|
|
22
|
+
| `planning_path` | Base directory for planning sessions | `{{PLANNING_PATH}}` |
|
|
23
|
+
| `issue_tracker` | Issue tracking system | `{{ISSUE_TRACKER}}` |
|
|
24
|
+
| `pdr_template` | PDR template location | `{{PDR_TEMPLATE}}` |
|
|
25
|
+
| `tech_analysis_template` | Technical analysis template | `{{TECH_ANALYSIS_TEMPLATE}}` |
|
|
26
|
+
| `todos_template` | TODOs template location | `{{TODOS_TEMPLATE}}` |
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
/start-feature-plan {feature_name}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Agent Delegation Policy
|
|
35
|
+
|
|
36
|
+
**CRITICAL:** Coordinating agent must ALWAYS delegate to specialized agents using Task tool. Never create planning documents directly.
|
|
37
|
+
|
|
38
|
+
**Required Agents:**
|
|
39
|
+
|
|
40
|
+
| Agent | Purpose | Deliverable |
|
|
41
|
+
|-------|---------|-------------|
|
|
42
|
+
| `product-functional` | Requirements analysis | PDR.md |
|
|
43
|
+
| `ui-ux-designer` | Interface design (optional) | Wireframes |
|
|
44
|
+
| `product-technical` | Technical architecture | tech-analysis.md |
|
|
45
|
+
| `product-technical` | Task breakdown | TODOs.md |
|
|
46
|
+
| `tech-lead` | Final review | Approval |
|
|
47
|
+
|
|
48
|
+
## Execution Flow
|
|
49
|
+
|
|
50
|
+
### Step 1: Initialize Planning Context
|
|
51
|
+
|
|
52
|
+
**Duration:** 2-3 minutes
|
|
53
|
+
|
|
54
|
+
**Process:**
|
|
55
|
+
|
|
56
|
+
1. Create session directory: `{{PLANNING_PATH}}/{feature_name}/`
|
|
57
|
+
2. Initialize files from templates:
|
|
58
|
+
- PDR.md
|
|
59
|
+
- tech-analysis.md
|
|
60
|
+
- TODOs.md
|
|
61
|
+
- wireframes/ (if UI-heavy)
|
|
62
|
+
|
|
63
|
+
### Step 2: Product Requirements (PDR)
|
|
64
|
+
|
|
65
|
+
**Agent:** `product-functional`
|
|
66
|
+
|
|
67
|
+
**Deliverable:** Complete PDR.md with:
|
|
68
|
+
|
|
69
|
+
- Feature overview and objectives
|
|
70
|
+
- Acceptance criteria (AC-001, AC-002, etc.)
|
|
71
|
+
- User stories and personas
|
|
72
|
+
- Business rules and constraints
|
|
73
|
+
- Success metrics
|
|
74
|
+
|
|
75
|
+
**USER CHECKPOINT:** Must obtain explicit approval before proceeding.
|
|
76
|
+
|
|
77
|
+
### Step 3: UI/UX Design (Optional)
|
|
78
|
+
|
|
79
|
+
**Agent:** `ui-ux-designer`
|
|
80
|
+
|
|
81
|
+
**Deliverable:**
|
|
82
|
+
|
|
83
|
+
- Wireframes in `wireframes/` directory
|
|
84
|
+
- UI component specifications
|
|
85
|
+
- Interaction flow diagrams
|
|
86
|
+
|
|
87
|
+
**Note:** Included in PDR approval process.
|
|
88
|
+
|
|
89
|
+
### Step 4: Technical Analysis
|
|
90
|
+
|
|
91
|
+
**Agent:** `product-technical`
|
|
92
|
+
|
|
93
|
+
**Prerequisites:** PDR approved
|
|
94
|
+
|
|
95
|
+
**Deliverable:** Complete tech-analysis.md with:
|
|
96
|
+
|
|
97
|
+
- Architecture overview
|
|
98
|
+
- Database schema changes
|
|
99
|
+
- API endpoint design
|
|
100
|
+
- Technology choices justification
|
|
101
|
+
- Risk assessment
|
|
102
|
+
|
|
103
|
+
**USER CHECKPOINT:** Must obtain explicit approval before proceeding.
|
|
104
|
+
|
|
105
|
+
### Step 5: Task Breakdown
|
|
106
|
+
|
|
107
|
+
**Agent:** `product-technical`
|
|
108
|
+
|
|
109
|
+
**Prerequisites:** Technical analysis approved
|
|
110
|
+
|
|
111
|
+
**Process:**
|
|
112
|
+
|
|
113
|
+
1. Break down into atomic tasks (1-2 hours each)
|
|
114
|
+
2. Identify dependencies
|
|
115
|
+
3. Prioritize implementation order
|
|
116
|
+
4. Estimate effort and complexity
|
|
117
|
+
|
|
118
|
+
**Deliverable:** Complete TODOs.md with prioritized task list.
|
|
119
|
+
|
|
120
|
+
### Step 6: Final Review
|
|
121
|
+
|
|
122
|
+
**Agent:** `tech-lead`
|
|
123
|
+
|
|
124
|
+
**Process:** Review all artifacts and approve planning phase.
|
|
125
|
+
|
|
126
|
+
## Planning Session Structure
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
{{PLANNING_PATH}}/{feature_name}/
|
|
130
|
+
├── PDR.md
|
|
131
|
+
├── tech-analysis.md
|
|
132
|
+
├── TODOs.md
|
|
133
|
+
├── wireframes/
|
|
134
|
+
└── notes/
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Quality Standards
|
|
138
|
+
|
|
139
|
+
### PDR Requirements
|
|
140
|
+
|
|
141
|
+
- Clear objectives and value proposition
|
|
142
|
+
- Specific, testable acceptance criteria
|
|
143
|
+
- Complete user stories with personas
|
|
144
|
+
- Edge cases and constraints documented
|
|
145
|
+
- Measurable success metrics
|
|
146
|
+
|
|
147
|
+
### Technical Analysis Requirements
|
|
148
|
+
|
|
149
|
+
- Architecture alignment with existing patterns
|
|
150
|
+
- Proper database design
|
|
151
|
+
- Type-safe API design
|
|
152
|
+
- Risk assessment with mitigation
|
|
153
|
+
- Technology choices justified
|
|
154
|
+
|
|
155
|
+
### Task Breakdown Requirements
|
|
156
|
+
|
|
157
|
+
- All tasks atomic (1-2 hours max)
|
|
158
|
+
- Clear dependencies mapped
|
|
159
|
+
- Testable completion criteria
|
|
160
|
+
- Priority ordering defined
|
|
161
|
+
- Realistic effort estimates
|
|
162
|
+
|
|
163
|
+
## Output Format
|
|
164
|
+
|
|
165
|
+
```text
|
|
166
|
+
✅ FEATURE PLANNING COMPLETE
|
|
167
|
+
|
|
168
|
+
Feature: {feature_name}
|
|
169
|
+
Planning Session: {{PLANNING_PATH}}/{feature_name}/
|
|
170
|
+
|
|
171
|
+
Documents Created:
|
|
172
|
+
✅ PDR.md - {n} acceptance criteria
|
|
173
|
+
✅ tech-analysis.md - Architecture complete
|
|
174
|
+
✅ TODOs.md - {n} atomic tasks
|
|
175
|
+
|
|
176
|
+
Planning Summary:
|
|
177
|
+
- Estimated Effort: {hours}
|
|
178
|
+
- Implementation Phases: {n}
|
|
179
|
+
- Critical Dependencies: {n}
|
|
180
|
+
- Risk Level: {level}
|
|
181
|
+
|
|
182
|
+
Ready for Phase 2: Implementation
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Critical Checkpoints
|
|
186
|
+
|
|
187
|
+
| Checkpoint | Agent | User Approval | Blocks Next Step |
|
|
188
|
+
|------------|-------|---------------|------------------|
|
|
189
|
+
| PDR Complete | product-functional | REQUIRED | Tech Analysis |
|
|
190
|
+
| Tech Analysis Complete | product-technical | REQUIRED | Task Breakdown |
|
|
191
|
+
| TODOs Complete | product-technical | OPTIONAL | Implementation |
|
|
192
|
+
|
|
193
|
+
## Common Patterns
|
|
194
|
+
|
|
195
|
+
### Database-Heavy Features
|
|
196
|
+
|
|
197
|
+
- Schema design first
|
|
198
|
+
- Migration strategy defined
|
|
199
|
+
- Performance considerations documented
|
|
200
|
+
|
|
201
|
+
### API-Heavy Features
|
|
202
|
+
|
|
203
|
+
- Endpoint design prioritized
|
|
204
|
+
- Authentication requirements clarified
|
|
205
|
+
- Documentation strategy defined
|
|
206
|
+
|
|
207
|
+
### UI-Heavy Features
|
|
208
|
+
|
|
209
|
+
- Component hierarchy designed
|
|
210
|
+
- State management planned
|
|
211
|
+
- Accessibility requirements documented
|
|
212
|
+
|
|
213
|
+
## Related Commands
|
|
214
|
+
|
|
215
|
+
- `/start-refactor-plan` - Planning for refactoring
|
|
216
|
+
- `/quality-check` - Validation before implementation
|
|
217
|
+
- `/sync-planning` - Sync to issue tracker
|
|
218
|
+
|
|
219
|
+
## When to Use
|
|
220
|
+
|
|
221
|
+
- **Required:** Before implementing new features
|
|
222
|
+
- **Required:** When starting significant functionality
|
|
223
|
+
- **Optional:** For complex bug fixes requiring architecture changes
|
|
224
|
+
- **Recommended:** When multiple developers will collaborate
|
|
225
|
+
|
|
226
|
+
## Post-Command Actions
|
|
227
|
+
|
|
228
|
+
1. Present planning artifacts to user
|
|
229
|
+
2. Wait for explicit approval at each checkpoint
|
|
230
|
+
3. Iterate based on feedback
|
|
231
|
+
4. Offer to sync to {{ISSUE_TRACKER}} after final approval
|
|
232
|
+
5. Begin Phase 2 implementation only after user confirmation
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: start-refactor-plan
|
|
3
|
+
description: Plan comprehensive refactoring with risk assessment and incremental steps
|
|
4
|
+
type: planning
|
|
5
|
+
category: planning
|
|
6
|
+
config_required:
|
|
7
|
+
refactor_path: "Base path for refactor sessions (e.g., .claude/sessions/refactor)"
|
|
8
|
+
test_coverage_min: "Minimum test coverage percentage (e.g., 90)"
|
|
9
|
+
issue_tracker: "Issue tracking system name"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Start Refactor Plan Command
|
|
13
|
+
|
|
14
|
+
Plan comprehensive refactoring work safely with risk assessment, incremental steps, and test validation strategy.
|
|
15
|
+
|
|
16
|
+
## ⚙️ Configuration
|
|
17
|
+
|
|
18
|
+
| Setting | Description | Example |
|
|
19
|
+
|---------|-------------|---------|
|
|
20
|
+
| `refactor_path` | Base directory for refactor sessions | `{{REFACTOR_PATH}}` |
|
|
21
|
+
| `test_coverage_min` | Minimum test coverage required | `{{TEST_COVERAGE_MIN}}%` |
|
|
22
|
+
| `issue_tracker` | Issue tracking system | `{{ISSUE_TRACKER}}` |
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
/start-refactor-plan {refactor_scope}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Execution Flow
|
|
31
|
+
|
|
32
|
+
### Step 1: Current Code Analysis
|
|
33
|
+
|
|
34
|
+
**Agent:** `debugger`
|
|
35
|
+
|
|
36
|
+
**Deliverable:** Current state analysis with:
|
|
37
|
+
|
|
38
|
+
- Code smells and technical debt
|
|
39
|
+
- Architecture and dependency mapping
|
|
40
|
+
- Existing behavior documentation
|
|
41
|
+
- Potential breaking points
|
|
42
|
+
|
|
43
|
+
**Analysis Areas:**
|
|
44
|
+
|
|
45
|
+
| Area | Focus |
|
|
46
|
+
|------|-------|
|
|
47
|
+
| Code Quality | Complexity, maintainability |
|
|
48
|
+
| Performance | Bottlenecks, inefficiencies |
|
|
49
|
+
| Security | Vulnerabilities, exposures |
|
|
50
|
+
| Architecture | Pattern violations, inconsistencies |
|
|
51
|
+
| Testing | Coverage gaps, test quality |
|
|
52
|
+
|
|
53
|
+
### Step 2: Architecture Validation
|
|
54
|
+
|
|
55
|
+
**Agent:** `architecture-validator`
|
|
56
|
+
|
|
57
|
+
**Deliverable:** Architecture assessment with:
|
|
58
|
+
|
|
59
|
+
- Pattern compliance review
|
|
60
|
+
- Layering violations
|
|
61
|
+
- Dependency management issues
|
|
62
|
+
- SOLID principles adherence
|
|
63
|
+
|
|
64
|
+
### Step 3: Refactor Strategy
|
|
65
|
+
|
|
66
|
+
**Agent:** `product-technical`
|
|
67
|
+
|
|
68
|
+
**Deliverable:** Complete strategy document with:
|
|
69
|
+
|
|
70
|
+
- Refactoring objectives and success criteria
|
|
71
|
+
- Safe refactoring boundaries
|
|
72
|
+
- Backwards compatibility strategy
|
|
73
|
+
- Rollback procedures
|
|
74
|
+
|
|
75
|
+
### Step 4: Incremental Steps
|
|
76
|
+
|
|
77
|
+
**Agent:** `product-technical`
|
|
78
|
+
|
|
79
|
+
**Requirements:** Each step must:
|
|
80
|
+
|
|
81
|
+
- Be ≤ 2 hours of work
|
|
82
|
+
- Preserve functionality
|
|
83
|
+
- Pass all tests
|
|
84
|
+
- Allow rollback
|
|
85
|
+
- Have clear validation criteria
|
|
86
|
+
|
|
87
|
+
**Deliverable:** Step-by-step plan with validation points.
|
|
88
|
+
|
|
89
|
+
### Step 5: Test Strategy
|
|
90
|
+
|
|
91
|
+
**Agent:** `qa-engineer` with `web-app-testing` skill
|
|
92
|
+
|
|
93
|
+
**Deliverable:** Testing strategy with:
|
|
94
|
+
|
|
95
|
+
- Pre-refactor baseline
|
|
96
|
+
- Step-by-step validation plan
|
|
97
|
+
- Regression test enhancements
|
|
98
|
+
- Performance benchmarks
|
|
99
|
+
|
|
100
|
+
### Step 6: Risk Assessment
|
|
101
|
+
|
|
102
|
+
**Agent:** `tech-lead`
|
|
103
|
+
|
|
104
|
+
**Deliverable:** Risk assessment and approval covering:
|
|
105
|
+
|
|
106
|
+
- Business continuity impact
|
|
107
|
+
- Technical complexity
|
|
108
|
+
- Resource requirements
|
|
109
|
+
- Timeline feasibility
|
|
110
|
+
- Rollback strategy validation
|
|
111
|
+
|
|
112
|
+
## Refactor Session Structure
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
{{REFACTOR_PATH}}/{refactor_scope}/
|
|
116
|
+
├── current-analysis.md
|
|
117
|
+
├── architecture-issues.md
|
|
118
|
+
├── refactor-strategy.md
|
|
119
|
+
├── refactor-steps.md
|
|
120
|
+
├── test-strategy.md
|
|
121
|
+
├── risk-assessment.md
|
|
122
|
+
└── checkpoints/
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Quality Standards
|
|
126
|
+
|
|
127
|
+
### Analysis Requirements
|
|
128
|
+
|
|
129
|
+
- Comprehensive coverage of all code in scope
|
|
130
|
+
- Issues categorized by type and severity
|
|
131
|
+
- All dependencies mapped
|
|
132
|
+
- Current behavior documented
|
|
133
|
+
- Risk points identified
|
|
134
|
+
|
|
135
|
+
### Planning Requirements
|
|
136
|
+
|
|
137
|
+
- Atomic steps (≤ 2 hours each)
|
|
138
|
+
- Test validation for every step
|
|
139
|
+
- Clear rollback strategy
|
|
140
|
+
- Dependency-aware ordering
|
|
141
|
+
- Risk mitigation for each risk
|
|
142
|
+
|
|
143
|
+
### Safety Requirements
|
|
144
|
+
|
|
145
|
+
- No breaking changes for users
|
|
146
|
+
- No performance degradation
|
|
147
|
+
- ≥ {{TEST_COVERAGE_MIN}}% coverage maintained
|
|
148
|
+
- All steps pass CI/CD
|
|
149
|
+
- All changes documented
|
|
150
|
+
|
|
151
|
+
## Output Format
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
✅ REFACTOR PLANNING COMPLETE
|
|
155
|
+
|
|
156
|
+
Refactor Scope: {refactor_scope}
|
|
157
|
+
Planning Session: {{REFACTOR_PATH}}/{refactor_scope}/
|
|
158
|
+
|
|
159
|
+
Analysis Summary:
|
|
160
|
+
- Files Analyzed: {n}
|
|
161
|
+
- Issues Identified: {n} (high/medium/low)
|
|
162
|
+
- Architecture Violations: {n}
|
|
163
|
+
- Test Coverage Gaps: {n}%
|
|
164
|
+
|
|
165
|
+
Refactor Plan:
|
|
166
|
+
- Total Steps: {n} atomic steps
|
|
167
|
+
- Estimated Duration: {hours}
|
|
168
|
+
- Checkpoints: {n} validation points
|
|
169
|
+
- Risk Level: {level}
|
|
170
|
+
|
|
171
|
+
Test Strategy:
|
|
172
|
+
- Tests to Add: {n}
|
|
173
|
+
- Regression Tests: {n} enhanced
|
|
174
|
+
- Performance Tests: {n} benchmarks
|
|
175
|
+
|
|
176
|
+
Ready for safe, incremental refactoring
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Refactor Categories
|
|
180
|
+
|
|
181
|
+
### Architecture Refactoring
|
|
182
|
+
|
|
183
|
+
**Patterns:**
|
|
184
|
+
|
|
185
|
+
- Layer separation improvements
|
|
186
|
+
- Dependency injection
|
|
187
|
+
- Interface abstraction
|
|
188
|
+
- Error handling standardization
|
|
189
|
+
|
|
190
|
+
**Safety:** Gradual migration, adapter patterns, step-by-step updates
|
|
191
|
+
|
|
192
|
+
### Performance Refactoring
|
|
193
|
+
|
|
194
|
+
**Patterns:**
|
|
195
|
+
|
|
196
|
+
- Database optimization
|
|
197
|
+
- Caching implementation
|
|
198
|
+
- Algorithm efficiency
|
|
199
|
+
- Memory optimization
|
|
200
|
+
|
|
201
|
+
**Safety:** Performance benchmarks, load testing, automatic rollback
|
|
202
|
+
|
|
203
|
+
### Code Quality Refactoring
|
|
204
|
+
|
|
205
|
+
**Patterns:**
|
|
206
|
+
|
|
207
|
+
- Code smell elimination
|
|
208
|
+
- Technical debt reduction
|
|
209
|
+
- Test coverage improvements
|
|
210
|
+
- Documentation enhancement
|
|
211
|
+
|
|
212
|
+
**Safety:** Behavior preservation testing, regression validation
|
|
213
|
+
|
|
214
|
+
## Step Validation
|
|
215
|
+
|
|
216
|
+
All steps must pass:
|
|
217
|
+
|
|
218
|
+
| Validation Type | Criteria |
|
|
219
|
+
|----------------|----------|
|
|
220
|
+
| Functional | Tests pass, no regressions, API contracts maintained |
|
|
221
|
+
| Performance | Response times maintained, memory acceptable, queries stable |
|
|
222
|
+
| Quality | ≥{{TEST_COVERAGE_MIN}}% coverage, linting passes, patterns followed |
|
|
223
|
+
|
|
224
|
+
## Related Commands
|
|
225
|
+
|
|
226
|
+
- `/start-feature-plan` - Planning for new features
|
|
227
|
+
- `/quality-check` - Validation after steps
|
|
228
|
+
- `/review-code` - Code quality analysis
|
|
229
|
+
- `/review-performance` - Performance assessment
|
|
230
|
+
|
|
231
|
+
## When to Use
|
|
232
|
+
|
|
233
|
+
- **Required:** Before major architectural changes
|
|
234
|
+
- **Required:** When technical debt impacts development
|
|
235
|
+
- **Recommended:** Before performance optimization
|
|
236
|
+
- **Required:** When refactoring affects multiple packages
|
|
237
|
+
|
|
238
|
+
## Post-Command Actions
|
|
239
|
+
|
|
240
|
+
1. Review refactor plan with user
|
|
241
|
+
2. Ensure team alignment on scope
|
|
242
|
+
3. Set up monitoring and rollback mechanisms
|
|
243
|
+
4. Execute step-by-step with validation after each
|
|
244
|
+
5. Offer to sync to {{ISSUE_TRACKER}}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync-planning
|
|
3
|
+
description: Synchronize planning session to issue tracker
|
|
4
|
+
type: planning
|
|
5
|
+
category: planning
|
|
6
|
+
config_required:
|
|
7
|
+
issue_tracker: "Issue tracking system (e.g., GitHub, Linear, Jira)"
|
|
8
|
+
issue_tracker_token_env: "Environment variable for auth token"
|
|
9
|
+
issue_tracker_owner_env: "Environment variable for owner/org"
|
|
10
|
+
issue_tracker_repo_env: "Environment variable for repository"
|
|
11
|
+
planning_path: "Base path for planning sessions"
|
|
12
|
+
tracking_file: "Path to tracking data file"
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Sync Planning to Issue Tracker
|
|
16
|
+
|
|
17
|
+
Synchronize planning session to issue tracker, creating parent and sub-issues for all tasks.
|
|
18
|
+
|
|
19
|
+
## ⚙️ Configuration
|
|
20
|
+
|
|
21
|
+
| Setting | Description | Example |
|
|
22
|
+
|---------|-------------|---------|
|
|
23
|
+
| `issue_tracker` | Issue tracking system | `{{ISSUE_TRACKER}}` |
|
|
24
|
+
| `issue_tracker_token_env` | Auth token environment variable | `{{ISSUE_TRACKER_TOKEN}}` |
|
|
25
|
+
| `issue_tracker_owner_env` | Owner/org environment variable | `{{ISSUE_TRACKER_OWNER}}` |
|
|
26
|
+
| `issue_tracker_repo_env` | Repository environment variable | `{{ISSUE_TRACKER_REPO}}` |
|
|
27
|
+
| `planning_path` | Planning sessions directory | `{{PLANNING_PATH}}` |
|
|
28
|
+
| `tracking_file` | Tracking data file path | `{{TRACKING_FILE}}` |
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
/sync-planning [session_path]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## When to Use
|
|
37
|
+
|
|
38
|
+
- After completing planning phase and getting approval
|
|
39
|
+
- To create trackable issues for feature planning
|
|
40
|
+
- When working across multiple devices
|
|
41
|
+
- Before starting implementation
|
|
42
|
+
|
|
43
|
+
## Process
|
|
44
|
+
|
|
45
|
+
### Step 1: Identify Session
|
|
46
|
+
|
|
47
|
+
Ask user which planning session to sync if not obvious from context.
|
|
48
|
+
|
|
49
|
+
Auto-detect if currently in planning directory.
|
|
50
|
+
|
|
51
|
+
**Expected path:** `{{PLANNING_PATH}}/{session-name}/`
|
|
52
|
+
|
|
53
|
+
### Step 2: Verify Required Files
|
|
54
|
+
|
|
55
|
+
Check that files exist:
|
|
56
|
+
|
|
57
|
+
- PDR.md (Product Requirements)
|
|
58
|
+
- TODOs.md (Task breakdown)
|
|
59
|
+
|
|
60
|
+
If missing, inform user and stop.
|
|
61
|
+
|
|
62
|
+
### Step 3: Get Configuration
|
|
63
|
+
|
|
64
|
+
Required environment variables:
|
|
65
|
+
|
|
66
|
+
- `{{ISSUE_TRACKER_TOKEN}}` - Authentication token
|
|
67
|
+
- `{{ISSUE_TRACKER_OWNER}}` - Owner/organization
|
|
68
|
+
- `{{ISSUE_TRACKER_REPO}}` - Repository name
|
|
69
|
+
|
|
70
|
+
If not available, ask user to provide them.
|
|
71
|
+
|
|
72
|
+
### Step 4: Execute Sync
|
|
73
|
+
|
|
74
|
+
Synchronize to {{ISSUE_TRACKER}}:
|
|
75
|
+
|
|
76
|
+
- Create parent issue for feature
|
|
77
|
+
- Create sub-issues for all tasks
|
|
78
|
+
- Update existing issues (idempotent)
|
|
79
|
+
- Enrich with planning context
|
|
80
|
+
|
|
81
|
+
### Step 5: Report Results
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
✅ Planning synced to {{ISSUE_TRACKER}} successfully!
|
|
85
|
+
|
|
86
|
+
Parent Issue: {title}
|
|
87
|
+
URL: {url}
|
|
88
|
+
Number: #{number}
|
|
89
|
+
|
|
90
|
+
Statistics:
|
|
91
|
+
• {n} tasks created
|
|
92
|
+
• {n} tasks updated
|
|
93
|
+
• {n} tasks skipped
|
|
94
|
+
• {n} failures
|
|
95
|
+
|
|
96
|
+
Next Steps:
|
|
97
|
+
1. TODOs.md updated with issue links
|
|
98
|
+
2. Commit changes (TODOs.md, {{TRACKING_FILE}})
|
|
99
|
+
3. View issues in {{ISSUE_TRACKER}}
|
|
100
|
+
4. Use /check-completed after task completion
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Step 6: Update TODOs.md
|
|
104
|
+
|
|
105
|
+
Automatically adds issue links to tasks:
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
### T-003-012: Task name
|
|
109
|
+
|
|
110
|
+
**Status:** [ ] Pending
|
|
111
|
+
**Issue:** [#{number}]({url})
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Step 7: Suggest Next Actions
|
|
115
|
+
|
|
116
|
+
1. Commit changes to TODOs.md and {{TRACKING_FILE}}
|
|
117
|
+
2. Push to remote
|
|
118
|
+
3. View issues in {{ISSUE_TRACKER}}
|
|
119
|
+
4. Update status with /check-completed
|
|
120
|
+
|
|
121
|
+
## Error Handling
|
|
122
|
+
|
|
123
|
+
| Error | Solution |
|
|
124
|
+
|-------|----------|
|
|
125
|
+
| Missing config | Set environment variables |
|
|
126
|
+
| Files not found | Complete planning first with /start-feature-plan |
|
|
127
|
+
| API errors | Verify token, permissions, rate limits |
|
|
128
|
+
| Duplicates | Sync updates existing issues safely |
|
|
129
|
+
|
|
130
|
+
## Advanced Options
|
|
131
|
+
|
|
132
|
+
### Dry Run Mode
|
|
133
|
+
|
|
134
|
+
Preview changes without creating issues:
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
{
|
|
138
|
+
dryRun: true
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Custom Tracking Path
|
|
143
|
+
|
|
144
|
+
Use custom location for tracking data:
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
{
|
|
148
|
+
trackingPath: '.custom-tracking/data.json'
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Skip Existing
|
|
153
|
+
|
|
154
|
+
Only create new issues, don't update:
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
{
|
|
158
|
+
updateExisting: false
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Important Notes
|
|
163
|
+
|
|
164
|
+
- **Idempotent:** Safe to run multiple times - updates, not duplicates
|
|
165
|
+
- **Tracking:** {{TRACKING_FILE}} stores mapping between tasks and issues
|
|
166
|
+
- **Commit tracking:** Always commit tracking file for cross-device sync
|
|
167
|
+
- **Status sync:** Task status determines issue state (open/closed)
|
|
168
|
+
- **Enrichment:** Issues enriched with planning context
|
|
169
|
+
- **Labels:** Auto-generated based on task type and priority
|
|
170
|
+
|
|
171
|
+
## Related Commands
|
|
172
|
+
|
|
173
|
+
- `/start-feature-plan` - Create planning session
|
|
174
|
+
- `/check-completed` - Auto-close completed tasks
|
|
175
|
+
- `/sync-todos` - Sync code TODO comments
|
|
176
|
+
- `/cleanup-issues` - Clean up stale issues
|