@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,248 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cleanup-issues
|
|
3
|
+
description: Clean up stale, closed, or orphaned issues from workflow automation
|
|
4
|
+
type: planning
|
|
5
|
+
category: planning
|
|
6
|
+
config_required:
|
|
7
|
+
issue_tracker: "Issue tracking system name"
|
|
8
|
+
issue_tracker_token_env: "Auth token environment variable"
|
|
9
|
+
issue_tracker_owner_env: "Owner/org environment variable"
|
|
10
|
+
issue_tracker_repo_env: "Repository environment variable"
|
|
11
|
+
tracking_file: "Issue tracking data file"
|
|
12
|
+
closed_days_default: "Default days for closed issue cleanup (e.g., 30)"
|
|
13
|
+
stale_days_default: "Default days for stale issue detection (e.g., 90)"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Cleanup Issues
|
|
17
|
+
|
|
18
|
+
Clean up stale, closed, or orphaned issues created by workflow automation.
|
|
19
|
+
|
|
20
|
+
## ⚙️ Configuration
|
|
21
|
+
|
|
22
|
+
| Setting | Description | Example |
|
|
23
|
+
|---------|-------------|---------|
|
|
24
|
+
| `issue_tracker` | Issue tracking system | `{{ISSUE_TRACKER}}` |
|
|
25
|
+
| `issue_tracker_token_env` | Auth token variable | `{{ISSUE_TRACKER_TOKEN}}` |
|
|
26
|
+
| `issue_tracker_owner_env` | Owner variable | `{{ISSUE_TRACKER_OWNER}}` |
|
|
27
|
+
| `issue_tracker_repo_env` | Repository variable | `{{ISSUE_TRACKER_REPO}}` |
|
|
28
|
+
| `tracking_file` | Tracking data file | `{{TRACKING_FILE}}` |
|
|
29
|
+
| `closed_days_default` | Days for closed cleanup | `{{CLOSED_DAYS}}` |
|
|
30
|
+
| `stale_days_default` | Days for stale detection | `{{STALE_DAYS}}` |
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
/cleanup-issues [--closed-days N] [--stale-days N]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## When to Use
|
|
39
|
+
|
|
40
|
+
- After completing major feature
|
|
41
|
+
- To remove stale/obsolete issues
|
|
42
|
+
- When cleaning up cancelled features
|
|
43
|
+
- During project maintenance
|
|
44
|
+
- Before milestones or releases
|
|
45
|
+
|
|
46
|
+
## Process
|
|
47
|
+
|
|
48
|
+
### Step 1: Identify Scope
|
|
49
|
+
|
|
50
|
+
Cleanup options:
|
|
51
|
+
|
|
52
|
+
- **Closed issues:** Closed > N days ago
|
|
53
|
+
- **Orphaned issues:** No planning session/TODO
|
|
54
|
+
- **Stale issues:** No activity for N days
|
|
55
|
+
- **Specific session:** Single planning session
|
|
56
|
+
- **All issues:** Full cleanup (requires confirmation)
|
|
57
|
+
|
|
58
|
+
### Step 2: Get Configuration
|
|
59
|
+
|
|
60
|
+
Required:
|
|
61
|
+
|
|
62
|
+
- `{{ISSUE_TRACKER_TOKEN}}`
|
|
63
|
+
- `{{ISSUE_TRACKER_OWNER}}`
|
|
64
|
+
- `{{ISSUE_TRACKER_REPO}}`
|
|
65
|
+
|
|
66
|
+
### Step 3: Scan Candidates
|
|
67
|
+
|
|
68
|
+
Scan for cleanup candidates:
|
|
69
|
+
|
|
70
|
+
- Closed issues older than threshold
|
|
71
|
+
- Stale issues with no activity
|
|
72
|
+
- Orphaned issues (no source)
|
|
73
|
+
|
|
74
|
+
### Step 4: Preview Cleanup
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
🔍 Cleanup Preview
|
|
78
|
+
|
|
79
|
+
Issues to clean:
|
|
80
|
+
• {n} closed (>{n} days ago)
|
|
81
|
+
• {n} stale (no activity >{n} days)
|
|
82
|
+
• {n} orphaned (no source)
|
|
83
|
+
|
|
84
|
+
Details:
|
|
85
|
+
|
|
86
|
+
Closed Issues:
|
|
87
|
+
• #{n}: Task name (closed {n} days ago)
|
|
88
|
+
|
|
89
|
+
Stale Issues:
|
|
90
|
+
• #{n}: TODO in old file (no updates {n} days)
|
|
91
|
+
|
|
92
|
+
Orphaned Issues:
|
|
93
|
+
• #{n}: Task with deleted session
|
|
94
|
+
• #{n}: TODO from removed code
|
|
95
|
+
|
|
96
|
+
⚠️ WARNING: Permanently removes issue references from tracking.
|
|
97
|
+
Issues remain in {{ISSUE_TRACKER}} (can be manually deleted).
|
|
98
|
+
|
|
99
|
+
Continue? (yes/no)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Step 5: Execute Cleanup
|
|
103
|
+
|
|
104
|
+
If confirmed:
|
|
105
|
+
|
|
106
|
+
- Remove references from tracking
|
|
107
|
+
- Archive issue data
|
|
108
|
+
- Update tracking file
|
|
109
|
+
|
|
110
|
+
### Step 6: Report Results
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
✅ Cleanup completed!
|
|
114
|
+
|
|
115
|
+
Statistics:
|
|
116
|
+
• {n} references removed
|
|
117
|
+
• {n} issues archived
|
|
118
|
+
• {n} skipped
|
|
119
|
+
• {n} failed
|
|
120
|
+
|
|
121
|
+
Updated Files:
|
|
122
|
+
• {{TRACKING_FILE}} (updated)
|
|
123
|
+
• {{TRACKING_FILE}}.archive (archived)
|
|
124
|
+
|
|
125
|
+
Next Steps:
|
|
126
|
+
1. Review archived references
|
|
127
|
+
2. Manually delete issues if needed
|
|
128
|
+
3. Commit tracking files
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Error Handling
|
|
132
|
+
|
|
133
|
+
| Error | Solution |
|
|
134
|
+
|-------|----------|
|
|
135
|
+
| Missing config | Set environment variables |
|
|
136
|
+
| No issues found | Issue tracker is clean |
|
|
137
|
+
| Confirmation required | Type 'yes' to confirm |
|
|
138
|
+
| API errors | Check token and permissions |
|
|
139
|
+
|
|
140
|
+
## Advanced Options
|
|
141
|
+
|
|
142
|
+
### Specific Session
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
{ sessionPath: '{{PLANNING_PATH}}/{session}' }
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Archive Instead of Delete
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
{ archiveIssues: true }
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Custom Thresholds
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
{
|
|
158
|
+
closedDays: 7,
|
|
159
|
+
staleDays: 60
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Delete from Tracker
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
{
|
|
167
|
+
deleteFromTracker: true,
|
|
168
|
+
requireConfirmation: true
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Cleanup Strategies
|
|
173
|
+
|
|
174
|
+
### Conservative
|
|
175
|
+
|
|
176
|
+
For important history:
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
{
|
|
180
|
+
closedDays: 180, // 6 months
|
|
181
|
+
staleDays: 365, // 1 year
|
|
182
|
+
includeOrphaned: false,
|
|
183
|
+
archiveIssues: true
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Aggressive
|
|
188
|
+
|
|
189
|
+
For active projects:
|
|
190
|
+
|
|
191
|
+
```typescript
|
|
192
|
+
{
|
|
193
|
+
closedDays: 14, // 2 weeks
|
|
194
|
+
staleDays: 30, // 1 month
|
|
195
|
+
includeOrphaned: true,
|
|
196
|
+
deleteFromTracker: true
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Orphan-Only
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
{ orphanedOnly: true }
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## What Gets Cleaned
|
|
207
|
+
|
|
208
|
+
### Closed Issues
|
|
209
|
+
|
|
210
|
+
Must meet ALL:
|
|
211
|
+
|
|
212
|
+
- Issue closed
|
|
213
|
+
- Closed > N days ago
|
|
214
|
+
- No recent activity
|
|
215
|
+
- Not pinned/locked
|
|
216
|
+
|
|
217
|
+
### Stale Issues
|
|
218
|
+
|
|
219
|
+
Must meet ALL:
|
|
220
|
+
|
|
221
|
+
- Issue open
|
|
222
|
+
- No activity > N days
|
|
223
|
+
- Not labeled 'keep' or 'important'
|
|
224
|
+
- Not in active milestone
|
|
225
|
+
|
|
226
|
+
### Orphaned Issues
|
|
227
|
+
|
|
228
|
+
Must meet ANY:
|
|
229
|
+
|
|
230
|
+
- Planning session deleted
|
|
231
|
+
- TODO comment removed
|
|
232
|
+
- Tracking reference corrupted
|
|
233
|
+
- Source file deleted
|
|
234
|
+
|
|
235
|
+
## Important Notes
|
|
236
|
+
|
|
237
|
+
- **Dry run first:** Always preview before cleanup
|
|
238
|
+
- **Archive by default:** References archived, not deleted
|
|
239
|
+
- **Issues remain:** Tracker issues not deleted unless specified
|
|
240
|
+
- **Recoverable:** Archives can be restored
|
|
241
|
+
- **Safe:** Won't delete issues with recent activity
|
|
242
|
+
- **Backup:** Consider backing up tracking file first
|
|
243
|
+
|
|
244
|
+
## Related Commands
|
|
245
|
+
|
|
246
|
+
- `/sync-planning` - Sync planning to tracker
|
|
247
|
+
- `/sync-todos` - Sync code TODOs
|
|
248
|
+
- `/check-completed` - Auto-close completed
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planning-cleanup
|
|
3
|
+
description: Archive completed planning sessions to keep workspace organized
|
|
4
|
+
type: planning
|
|
5
|
+
category: planning
|
|
6
|
+
config_required:
|
|
7
|
+
planning_path: "Base path for planning sessions"
|
|
8
|
+
archive_path: "Path for archived sessions (organized by year/month)"
|
|
9
|
+
registry_file: "Code registry file path"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Planning Cleanup Command
|
|
13
|
+
|
|
14
|
+
Archive completed planning sessions to keep workspace organized.
|
|
15
|
+
|
|
16
|
+
## ⚙️ Configuration
|
|
17
|
+
|
|
18
|
+
| Setting | Description | Example |
|
|
19
|
+
|---------|-------------|---------|
|
|
20
|
+
| `planning_path` | Active planning sessions directory | `{{PLANNING_PATH}}` |
|
|
21
|
+
| `archive_path` | Archive directory | `{{ARCHIVE_PATH}}` |
|
|
22
|
+
| `registry_file` | Code registry file | `{{REGISTRY_FILE}}` |
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
### Interactive Mode (Default)
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
/planning-cleanup
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Flow:** Scan → Show list → User selects → Confirm → Archive → Report
|
|
33
|
+
|
|
34
|
+
### Auto Mode
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
/planning-cleanup --auto
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Flow:** Scan → Archive ALL → Report
|
|
41
|
+
|
|
42
|
+
### Dry-Run Mode
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
/planning-cleanup --dry-run
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Flow:** Show what WOULD be archived → No changes
|
|
49
|
+
|
|
50
|
+
## Process
|
|
51
|
+
|
|
52
|
+
### 1. Detection
|
|
53
|
+
|
|
54
|
+
**Completed session criteria:**
|
|
55
|
+
|
|
56
|
+
- Status in {{REGISTRY_FILE}} is "completed"
|
|
57
|
+
- OR all tasks in TODOs.md marked completed
|
|
58
|
+
- OR checkpoint shows final phase completed
|
|
59
|
+
|
|
60
|
+
### 2. Selection (Interactive)
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
Found 2 completed planning sessions:
|
|
64
|
+
|
|
65
|
+
[ ] P-001-feature-name (completed: 2024-10-28)
|
|
66
|
+
- 15 tasks completed
|
|
67
|
+
- Duration: 45 hours
|
|
68
|
+
|
|
69
|
+
Select sessions to archive (space to toggle, enter to confirm):
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 3. Archive
|
|
73
|
+
|
|
74
|
+
For each session:
|
|
75
|
+
|
|
76
|
+
1. Create archive directory: `{{ARCHIVE_PATH}}/{year}/{month}/{session}/`
|
|
77
|
+
2. Move all files
|
|
78
|
+
3. Generate COMPLETION-REPORT.md
|
|
79
|
+
4. Update {{REGISTRY_FILE}}
|
|
80
|
+
|
|
81
|
+
### 4. Report
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
✅ Archive Complete
|
|
85
|
+
|
|
86
|
+
Archived Sessions: {n}
|
|
87
|
+
- {session-1} → archived/{year}/{month}/
|
|
88
|
+
- {session-2} → archived/{year}/{month}/
|
|
89
|
+
|
|
90
|
+
Updated:
|
|
91
|
+
- {{REGISTRY_FILE}} ({n} sessions marked archived)
|
|
92
|
+
- Active sessions: {n} remaining
|
|
93
|
+
|
|
94
|
+
Location: {{ARCHIVE_PATH}}/{year}/{month}/
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## File Structure
|
|
98
|
+
|
|
99
|
+
**Before:**
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
{{PLANNING_PATH}}/
|
|
103
|
+
├── {{REGISTRY_FILE}}
|
|
104
|
+
├── P-001-feature-name/
|
|
105
|
+
├── P-002-other-feature/
|
|
106
|
+
└── P-003-active-feature/
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**After:**
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
{{PLANNING_PATH}}/
|
|
113
|
+
├── {{REGISTRY_FILE}} (updated)
|
|
114
|
+
├── P-003-active-feature/
|
|
115
|
+
└── archived/
|
|
116
|
+
└── {year}/
|
|
117
|
+
└── {month}/
|
|
118
|
+
├── P-001-feature-name/
|
|
119
|
+
│ ├── PDR.md
|
|
120
|
+
│ ├── TODOs.md
|
|
121
|
+
│ └── COMPLETION-REPORT.md (new)
|
|
122
|
+
└── P-002-other-feature/
|
|
123
|
+
└── ...
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Completion Report
|
|
127
|
+
|
|
128
|
+
Generated for each archived session:
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
# Completion Report: {Code} - {Title}
|
|
132
|
+
|
|
133
|
+
**Completed:** {date}
|
|
134
|
+
**Duration:** {actual}h (estimated: {estimated}h)
|
|
135
|
+
**Tasks:** {completed}/{total} completed
|
|
136
|
+
**Coverage:** {coverage}%
|
|
137
|
+
|
|
138
|
+
## Summary
|
|
139
|
+
Brief overview of deliverables.
|
|
140
|
+
|
|
141
|
+
## Deliverables
|
|
142
|
+
- ✅ Deliverable 1
|
|
143
|
+
- ✅ Deliverable 2
|
|
144
|
+
|
|
145
|
+
## Metrics
|
|
146
|
+
- Total commits: {n}
|
|
147
|
+
- Files changed: {n}
|
|
148
|
+
- Test coverage: {n}%
|
|
149
|
+
|
|
150
|
+
## Lessons Learned
|
|
151
|
+
### What Went Well
|
|
152
|
+
- Point 1
|
|
153
|
+
|
|
154
|
+
### What Could Be Improved
|
|
155
|
+
- Point 1
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Safety
|
|
159
|
+
|
|
160
|
+
**Protections:**
|
|
161
|
+
|
|
162
|
+
- Cannot archive active/in-progress sessions
|
|
163
|
+
- Cannot archive with uncommitted changes
|
|
164
|
+
- Cannot overwrite existing archives
|
|
165
|
+
- All operations logged
|
|
166
|
+
- Can be undone manually (files moved, not deleted)
|
|
167
|
+
|
|
168
|
+
## Undo Archive
|
|
169
|
+
|
|
170
|
+
Manual recovery:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
mv {{ARCHIVE_PATH}}/{year}/{month}/{session} {{PLANNING_PATH}}/
|
|
174
|
+
|
|
175
|
+
# Update registry: change status back to "completed"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Execution Modes
|
|
179
|
+
|
|
180
|
+
| Mode | Trigger | Interaction | Best For |
|
|
181
|
+
|------|---------|-------------|----------|
|
|
182
|
+
| Interactive | `/planning-cleanup` | User selects | Selective cleanup |
|
|
183
|
+
| Auto | Script/command | None | Quick cleanup |
|
|
184
|
+
| CI/CD | Scheduled action | None | Maintenance-free |
|
|
185
|
+
|
|
186
|
+
## When to Run
|
|
187
|
+
|
|
188
|
+
- After completing Phase 4 (Finalization)
|
|
189
|
+
- Before starting new planning sessions
|
|
190
|
+
- Monthly manual cleanup (interactive)
|
|
191
|
+
- Weekly automatic cleanup (CI/CD)
|
|
192
|
+
|
|
193
|
+
## Examples
|
|
194
|
+
|
|
195
|
+
### Interactive
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
/planning-cleanup
|
|
199
|
+
|
|
200
|
+
Found 1 completed session:
|
|
201
|
+
[x] P-001-feature-name (completed: 2024-10-28)
|
|
202
|
+
|
|
203
|
+
Archive? (y/n): y
|
|
204
|
+
|
|
205
|
+
✅ Archived P-001 → archived/2024/10/
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Auto
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
/planning-cleanup --auto
|
|
212
|
+
|
|
213
|
+
Found 2 completed sessions:
|
|
214
|
+
- P-001-feature-name
|
|
215
|
+
- P-002-other-feature
|
|
216
|
+
|
|
217
|
+
Archiving...
|
|
218
|
+
✅ Complete: 2 sessions archived
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Dry Run
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
/planning-cleanup --dry-run
|
|
225
|
+
|
|
226
|
+
Would archive:
|
|
227
|
+
- P-001-feature-name → archived/2024/10/
|
|
228
|
+
|
|
229
|
+
No changes made (dry run)
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Best Practices
|
|
233
|
+
|
|
234
|
+
1. **Regular Cleanup:** Weekly review, monthly archive
|
|
235
|
+
2. **Before Archiving:** All criteria met, commits pushed, tests passing
|
|
236
|
+
3. **Completion Reports:** Include lessons learned and metrics
|
|
237
|
+
4. **Recovery:** Archives can be unarchived manually
|
|
238
|
+
|
|
239
|
+
## Troubleshooting
|
|
240
|
+
|
|
241
|
+
| Issue | Solution |
|
|
242
|
+
|-------|----------|
|
|
243
|
+
| Uncommitted changes | Commit or stash before archiving |
|
|
244
|
+
| Archive exists | Rename or remove old archive |
|
|
245
|
+
| Registry out of sync | Regenerate registry |
|
|
246
|
+
|
|
247
|
+
## Related Commands
|
|
248
|
+
|
|
249
|
+
- `/start-feature-plan` - Create planning session
|
|
250
|
+
- `/sync-planning` - Sync to issue tracker
|
|
251
|
+
- `/quality-check` - Validate before completion
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync-planning-github
|
|
3
|
+
description: Synchronize planning session to GitHub Issues
|
|
4
|
+
type: planning
|
|
5
|
+
category: planning
|
|
6
|
+
config_required:
|
|
7
|
+
github_token_env: "Environment variable for GitHub token (e.g., GITHUB_TOKEN)"
|
|
8
|
+
github_owner_env: "Environment variable for repository owner"
|
|
9
|
+
github_repo_env: "Environment variable for repository name"
|
|
10
|
+
planning_path: "Base path for planning sessions"
|
|
11
|
+
tracking_file: "GitHub tracking file path"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Sync Planning to GitHub
|
|
15
|
+
|
|
16
|
+
Synchronize planning session to GitHub Issues, creating parent and sub-issues for all tasks.
|
|
17
|
+
|
|
18
|
+
## ⚙️ Configuration
|
|
19
|
+
|
|
20
|
+
| Setting | Description | Example |
|
|
21
|
+
|---------|-------------|---------|
|
|
22
|
+
| `github_token_env` | GitHub token environment variable | `{{GITHUB_TOKEN}}` |
|
|
23
|
+
| `github_owner_env` | Repository owner env variable | `{{GITHUB_OWNER}}` |
|
|
24
|
+
| `github_repo_env` | Repository name env variable | `{{GITHUB_REPO}}` |
|
|
25
|
+
| `planning_path` | Planning sessions directory | `{{PLANNING_PATH}}` |
|
|
26
|
+
| `tracking_file` | GitHub tracking data file | `{{TRACKING_FILE}}` |
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
/sync-planning-github [session_path]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## When to Use
|
|
35
|
+
|
|
36
|
+
- After completing planning phase with user approval
|
|
37
|
+
- To create trackable GitHub issues
|
|
38
|
+
- When working across multiple devices
|
|
39
|
+
- Before starting implementation
|
|
40
|
+
|
|
41
|
+
## Process
|
|
42
|
+
|
|
43
|
+
### Step 1: Identify Session
|
|
44
|
+
|
|
45
|
+
Auto-detect or ask user for session path.
|
|
46
|
+
|
|
47
|
+
**Expected:** `{{PLANNING_PATH}}/{session-name}/`
|
|
48
|
+
|
|
49
|
+
### Step 2: Verify Files
|
|
50
|
+
|
|
51
|
+
Required files:
|
|
52
|
+
|
|
53
|
+
- PDR.md
|
|
54
|
+
- TODOs.md
|
|
55
|
+
|
|
56
|
+
### Step 3: Get Configuration
|
|
57
|
+
|
|
58
|
+
Required environment variables:
|
|
59
|
+
|
|
60
|
+
- `{{GITHUB_TOKEN}}` - Personal Access Token with repo permissions
|
|
61
|
+
- `{{GITHUB_OWNER}}` - Repository owner
|
|
62
|
+
- `{{GITHUB_REPO}}` - Repository name
|
|
63
|
+
|
|
64
|
+
### Step 4: Execute Sync
|
|
65
|
+
|
|
66
|
+
- Create parent issue
|
|
67
|
+
- Create sub-issues for tasks
|
|
68
|
+
- Update existing issues (idempotent)
|
|
69
|
+
- Add labels and metadata
|
|
70
|
+
|
|
71
|
+
### Step 5: Report Results
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
✅ Planning synced to GitHub!
|
|
75
|
+
|
|
76
|
+
Parent Issue: {title}
|
|
77
|
+
URL: {url}
|
|
78
|
+
Number: #{number}
|
|
79
|
+
|
|
80
|
+
Statistics:
|
|
81
|
+
• {n} tasks created
|
|
82
|
+
• {n} tasks updated
|
|
83
|
+
• {n} skipped
|
|
84
|
+
• {n} failed
|
|
85
|
+
|
|
86
|
+
Next Steps:
|
|
87
|
+
1. TODOs.md updated with issue links
|
|
88
|
+
2. Commit changes (TODOs.md, {{TRACKING_FILE}})
|
|
89
|
+
3. View: {repo_url}/issues
|
|
90
|
+
4. Use /check-completed when done
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Error Handling
|
|
94
|
+
|
|
95
|
+
| Error | Message | Solution |
|
|
96
|
+
|-------|---------|----------|
|
|
97
|
+
| Missing config | Configuration missing | Set environment variables |
|
|
98
|
+
| Files not found | Planning files not found | Run /start-feature-plan first |
|
|
99
|
+
| API error | Failed to sync | Check token, permissions, rate limits |
|
|
100
|
+
|
|
101
|
+
## Advanced Options
|
|
102
|
+
|
|
103
|
+
### Dry Run
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
{ dryRun: true }
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Custom Tracking
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
{ trackingPath: '.custom/tracking.json' }
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Skip Updates
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
{ updateExisting: false }
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Important Notes
|
|
122
|
+
|
|
123
|
+
- **Idempotent:** Safe to run multiple times
|
|
124
|
+
- **Tracking:** {{TRACKING_FILE}} maps tasks to issues
|
|
125
|
+
- **Labels:** Auto-generated from task metadata
|
|
126
|
+
- **Enrichment:** Issues include planning context
|
|
127
|
+
|
|
128
|
+
## Related Commands
|
|
129
|
+
|
|
130
|
+
- `/start-feature-plan` - Create planning
|
|
131
|
+
- `/check-completed` - Auto-close completed
|
|
132
|
+
- `/sync-todos-github` - Sync code TODOs
|
|
133
|
+
- `/cleanup-issues` - Clean stale issues
|