specweave 1.0.261 → 1.0.262
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/.claude-plugin/README.md +0 -2
- package/CLAUDE.md +27 -27
- package/bin/specweave.js +14 -85
- package/dist/dashboard/assets/index-Cv1XUAKk.css +1 -0
- package/dist/dashboard/assets/index-DHOztQSu.js +11 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/src/adapters/README.md +1 -1
- package/dist/src/adapters/agents-md-generator.js +1 -1
- package/dist/src/adapters/agents-md-generator.js.map +1 -1
- package/dist/src/adapters/claude/README.md +8 -8
- package/dist/src/adapters/claude/adapter.js +2 -2
- package/dist/src/adapters/claude-md-generator.js +2 -2
- package/dist/src/adapters/claude-md-generator.js.map +1 -1
- package/dist/src/adapters/cursor/README.md +7 -7
- package/dist/src/adapters/generic/README.md +2 -2
- package/dist/src/cli/commands/create-increment.d.ts +1 -1
- package/dist/src/cli/commands/create-increment.js +1 -1
- package/dist/src/cli/commands/update.d.ts.map +1 -1
- package/dist/src/cli/commands/update.js +64 -1
- package/dist/src/cli/commands/update.js.map +1 -1
- package/dist/src/cli/helpers/init/api-docs-config.js +7 -7
- package/dist/src/cli/helpers/init/api-docs-config.js.map +1 -1
- package/dist/src/core/config/types.d.ts +18 -0
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js +4 -0
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/external-tools/external-items-display.d.ts.map +1 -1
- package/dist/src/core/external-tools/external-items-display.js +1 -11
- package/dist/src/core/external-tools/external-items-display.js.map +1 -1
- package/dist/src/core/increment/increment-archiver.js +1 -1
- package/dist/src/core/increment/increment-archiver.js.map +1 -1
- package/dist/src/core/increment/metadata-manager.js +2 -2
- package/dist/src/core/increment/metadata-manager.js.map +1 -1
- package/dist/src/core/increment/template-creator.d.ts +1 -1
- package/dist/src/core/increment/template-creator.js +4 -4
- package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts +2 -2
- package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts.map +1 -1
- package/dist/src/core/lazy-loading/llm-plugin-detector.js +15 -5
- package/dist/src/core/lazy-loading/llm-plugin-detector.js.map +1 -1
- package/dist/src/core/living-docs/feature-consistency-validator.js +1 -1
- package/dist/src/core/living-docs/feature-consistency-validator.js.map +1 -1
- package/dist/src/core/living-docs/scaffolding/scaffold.js +3 -3
- package/dist/src/core/notifications/command-integration.d.ts.map +1 -1
- package/dist/src/core/notifications/command-integration.js +0 -1
- package/dist/src/core/notifications/command-integration.js.map +1 -1
- package/dist/src/core/reflection/reflect-handler.js +2 -2
- package/dist/src/core/reflection/reflect-handler.js.map +1 -1
- package/dist/src/core/validators/ac-presence-validator.d.ts +1 -1
- package/dist/src/core/validators/ac-presence-validator.js +3 -3
- package/dist/src/core/validators/ac-presence-validator.js.map +1 -1
- package/dist/src/dashboard/server/command-runner.d.ts.map +1 -1
- package/dist/src/dashboard/server/command-runner.js +2 -2
- package/dist/src/dashboard/server/command-runner.js.map +1 -1
- package/dist/src/dashboard/server/dashboard-server.d.ts.map +1 -1
- package/dist/src/dashboard/server/dashboard-server.js +20 -9
- package/dist/src/dashboard/server/dashboard-server.js.map +1 -1
- package/dist/src/utils/agents-md-compiler.js +1 -1
- package/dist/src/utils/agents-md-compiler.js.map +1 -1
- package/dist/src/utils/find-project-root.d.ts +5 -4
- package/dist/src/utils/find-project-root.d.ts.map +1 -1
- package/dist/src/utils/find-project-root.js +8 -10
- package/dist/src/utils/find-project-root.js.map +1 -1
- package/dist/src/utils/generate-skills-index.js +3 -3
- package/dist/src/utils/notification-constants.js +1 -1
- package/dist/src/utils/notification-constants.js.map +1 -1
- package/package.json +1 -1
- package/plugins/FINAL-AUDIT-RECOMMENDATIONS.md +3 -3
- package/plugins/specweave/PLUGIN.md +0 -22
- package/plugins/specweave/commands/analytics.md +1 -1
- package/plugins/specweave/commands/discrepancies.md +0 -1
- package/plugins/specweave/commands/living-docs.md +0 -1
- package/plugins/specweave/commands/reconcile.md +1 -1
- package/plugins/specweave/hooks/hooks.json +10 -0
- package/plugins/specweave/hooks/pre-compact.sh +39 -0
- package/plugins/specweave/hooks/stop-sync.sh +23 -1
- package/plugins/specweave/hooks/universal/fail-fast-wrapper.sh +4 -0
- package/plugins/specweave/hooks/user-prompt-submit.sh +193 -59
- package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +7 -0
- package/plugins/specweave/hooks/v2/guards/spec-template-enforcement-guard.sh +1 -1
- package/plugins/specweave/hooks/v2/handlers/ac-sync-dispatcher.sh +25 -6
- package/plugins/specweave/hooks/v2/handlers/universal-auto-create-dispatcher.sh +21 -3
- package/plugins/specweave/hooks/v2/lib/check-provider-enabled.sh +52 -0
- package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +2 -2
- package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
- package/plugins/specweave/skills/do/SKILL.md +1 -1
- package/plugins/specweave/skills/done/SKILL.md +1 -1
- package/plugins/specweave/skills/framework/SKILL.md +4 -4
- package/plugins/specweave/skills/increment/SKILL.md +192 -25
- package/plugins/specweave/skills/next/SKILL.md +36 -630
- package/plugins/specweave/skills/pm/phases/00-deep-interview.md +2 -2
- package/plugins/specweave/skills/progress-sync/SKILL.md +7 -25
- package/plugins/specweave/skills/spec-generator/SKILL.md +44 -626
- package/plugins/specweave/skills/tdd-green/SKILL.md +10 -798
- package/plugins/specweave/skills/tdd-red/SKILL.md +8 -136
- package/plugins/specweave/skills/tdd-refactor/SKILL.md +15 -147
- package/plugins/specweave-github/hooks/github-auto-create-handler.sh +23 -5
- package/src/templates/AGENTS.md.template +11 -11
- package/src/templates/CLAUDE.md.template +1 -1
- package/dist/dashboard/assets/index-CDl14O5G.css +0 -1
- package/dist/dashboard/assets/index-CmqBqnWd.js +0 -11
- package/plugins/specweave/commands/api-docs.md +0 -672
- package/plugins/specweave/commands/check-hooks.md +0 -241
- package/plugins/specweave/commands/embed-acs.md +0 -445
- package/plugins/specweave/commands/external.md +0 -145
- package/plugins/specweave/commands/import-docs.md +0 -212
- package/plugins/specweave/commands/migrate-config.md +0 -104
- package/plugins/specweave/commands/notifications.md +0 -94
- package/plugins/specweave/commands/plugin-validator.md +0 -429
- package/plugins/specweave/commands/revert-wip-limit.md +0 -82
- package/plugins/specweave/commands/sync-acs.md +0 -342
- package/plugins/specweave/commands/sync-specs.md +0 -339
- package/plugins/specweave/commands/sync-tasks.md +0 -255
- package/plugins/specweave/commands/update-scope.md +0 -351
- package/plugins/specweave/commands/validate-features.md +0 -207
- package/plugins/specweave/skills/archive-increments/SKILL.md +0 -209
- package/plugins/specweave/skills/code-review/SKILL.md +0 -598
- package/plugins/specweave/skills/increment-planner/SKILL.md +0 -238
- package/plugins/specweave/skills/increment-work-router/SKILL.md +0 -562
- package/plugins/specweave/skills/multi-project-spec-mapper/SKILL.md +0 -423
- package/plugins/specweave/skills/pm-closure-validation/SKILL.md +0 -542
- package/plugins/specweave/skills/smart-reopen-detector/SKILL.md +0 -245
- package/plugins/specweave/skills/tdd-orchestrator/SKILL.md +0 -228
- package/plugins/specweave/skills/umbrella-repo-detector/SKILL.md +0 -301
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Validate feature folder consistency across project folders. Detects orphaned features, missing FEATURE.md, and auto-repairs discrepancies. Use for periodic health checks of living docs structure.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Validate Feature Folder Consistency
|
|
6
|
-
|
|
7
|
-
Validates that feature folders in project directories (e.g., `specweave/FS-XXX/`) have proper structure.
|
|
8
|
-
|
|
9
|
-
**Note**: The `_features/` folder is OBSOLETE. Features live in `{project}/FS-XXX/`.
|
|
10
|
-
If you find features in `_features/`, they should be migrated to the correct project folder.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## STEP 1: Parse Arguments
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
Arguments: [user's arguments]
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
**Options**:
|
|
21
|
-
- `--repair`: Auto-repair discrepancies (create missing project folders)
|
|
22
|
-
- `--dry-run`: Show what would be repaired without making changes
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## STEP 2: Run Consistency Validation
|
|
27
|
-
|
|
28
|
-
**Execute**:
|
|
29
|
-
|
|
30
|
-
```typescript
|
|
31
|
-
import { FeatureConsistencyValidator } from './dist/src/core/living-docs/feature-consistency-validator.js';
|
|
32
|
-
|
|
33
|
-
const validator = new FeatureConsistencyValidator(process.cwd(), {
|
|
34
|
-
defaultProject: 'specweave'
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
// Parse repair flag
|
|
38
|
-
const autoRepair = process.argv.includes('--repair');
|
|
39
|
-
const dryRun = process.argv.includes('--dry-run');
|
|
40
|
-
|
|
41
|
-
if (dryRun) {
|
|
42
|
-
console.log('DRY RUN MODE - No files will be modified\n');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Run validation
|
|
46
|
-
const result = await validator.validate(autoRepair && !dryRun);
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## STEP 3: Report Results
|
|
52
|
-
|
|
53
|
-
**Output format**:
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
===================================================
|
|
57
|
-
FEATURE CONSISTENCY VALIDATION REPORT
|
|
58
|
-
===================================================
|
|
59
|
-
|
|
60
|
-
Total features scanned: {total}
|
|
61
|
-
Consistent: {consistent}
|
|
62
|
-
Discrepancies found: {discrepancies}
|
|
63
|
-
|
|
64
|
-
---------------------------------------------------
|
|
65
|
-
{if discrepancies > 0}
|
|
66
|
-
DISCREPANCIES FOUND
|
|
67
|
-
|
|
68
|
-
{for each discrepancy}
|
|
69
|
-
Feature: {featureId}
|
|
70
|
-
Type: {type}
|
|
71
|
-
Description: {description}
|
|
72
|
-
Auto-repairable: {yes/no}
|
|
73
|
-
{if linkedIncrement}
|
|
74
|
-
Linked increment: {incrementId} ({exists/not found})
|
|
75
|
-
{/if}
|
|
76
|
-
|
|
77
|
-
{/for}
|
|
78
|
-
---------------------------------------------------
|
|
79
|
-
{/if}
|
|
80
|
-
|
|
81
|
-
{if repairs}
|
|
82
|
-
REPAIR RESULTS
|
|
83
|
-
|
|
84
|
-
{for each repair}
|
|
85
|
-
{SUCCESS/FAILED} {featureId}: {action}
|
|
86
|
-
{if error} Error: {error}{/if}
|
|
87
|
-
{/for}
|
|
88
|
-
{/if}
|
|
89
|
-
|
|
90
|
-
===================================================
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## STEP 4: Provide Next Steps
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
NEXT STEPS
|
|
99
|
-
---------------------------------------------------
|
|
100
|
-
|
|
101
|
-
{if discrepancies > 0 && !repair}
|
|
102
|
-
To auto-repair these discrepancies:
|
|
103
|
-
/sw:validate-features --repair
|
|
104
|
-
|
|
105
|
-
This will:
|
|
106
|
-
- Create missing project folders
|
|
107
|
-
- Generate README.md files
|
|
108
|
-
- Link to existing FEATURE.md
|
|
109
|
-
{/if}
|
|
110
|
-
|
|
111
|
-
{if all repaired}
|
|
112
|
-
All discrepancies have been repaired!
|
|
113
|
-
|
|
114
|
-
Verify the repairs:
|
|
115
|
-
ls -la .specweave/docs/internal/specs/specweave/
|
|
116
|
-
{/if}
|
|
117
|
-
|
|
118
|
-
{if orphaned features}
|
|
119
|
-
Some features could not be auto-repaired.
|
|
120
|
-
|
|
121
|
-
Manual intervention required for:
|
|
122
|
-
{list orphaned features}
|
|
123
|
-
|
|
124
|
-
Options:
|
|
125
|
-
1. Delete orphaned folder if no longer needed
|
|
126
|
-
2. Re-sync from increment if increment still exists
|
|
127
|
-
3. Move to correct project folder manually
|
|
128
|
-
{/if}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## EXAMPLES
|
|
134
|
-
|
|
135
|
-
### Example 1: Check for discrepancies
|
|
136
|
-
```
|
|
137
|
-
User: /sw:validate-features
|
|
138
|
-
|
|
139
|
-
Output:
|
|
140
|
-
===================================================
|
|
141
|
-
FEATURE CONSISTENCY VALIDATION REPORT
|
|
142
|
-
===================================================
|
|
143
|
-
|
|
144
|
-
Total features scanned: 7
|
|
145
|
-
Consistent: 6
|
|
146
|
-
Discrepancies found: 1
|
|
147
|
-
|
|
148
|
-
---------------------------------------------------
|
|
149
|
-
DISCREPANCIES FOUND
|
|
150
|
-
|
|
151
|
-
Feature: FS-062
|
|
152
|
-
Type: missing_feature_md
|
|
153
|
-
Description: Feature FS-062 folder exists but missing FEATURE.md
|
|
154
|
-
Auto-repairable: Yes
|
|
155
|
-
Linked increment: 0062-test-living-docs-auto-sync (not found)
|
|
156
|
-
|
|
157
|
-
---------------------------------------------------
|
|
158
|
-
|
|
159
|
-
To repair: /sw:validate-features --repair
|
|
160
|
-
===================================================
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### Example 2: Auto-repair discrepancies
|
|
164
|
-
```
|
|
165
|
-
User: /sw:validate-features --repair
|
|
166
|
-
|
|
167
|
-
Output:
|
|
168
|
-
===================================================
|
|
169
|
-
FEATURE CONSISTENCY VALIDATION REPORT
|
|
170
|
-
===================================================
|
|
171
|
-
|
|
172
|
-
Total features scanned: 7
|
|
173
|
-
Consistent: 7
|
|
174
|
-
Discrepancies found: 1
|
|
175
|
-
|
|
176
|
-
---------------------------------------------------
|
|
177
|
-
REPAIR RESULTS
|
|
178
|
-
|
|
179
|
-
SUCCESS FS-062: Created .specweave/docs/internal/specs/specweave/FS-062/README.md
|
|
180
|
-
|
|
181
|
-
===================================================
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
|
|
186
|
-
## WHEN TO USE
|
|
187
|
-
|
|
188
|
-
**Use this command when**:
|
|
189
|
-
- Feature folders are missing FEATURE.md or us-*.md files
|
|
190
|
-
- After interrupted/failed sync operations
|
|
191
|
-
- After manual cleanup of increments
|
|
192
|
-
- Periodic health check of living docs structure
|
|
193
|
-
- Legacy migration from `_features/` to `{project}/` folders
|
|
194
|
-
|
|
195
|
-
**Root cause of discrepancies**:
|
|
196
|
-
1. Sync interrupted during feature creation
|
|
197
|
-
2. Increment deleted without cleaning up living docs
|
|
198
|
-
3. Manual editing of living docs structure
|
|
199
|
-
4. Legacy `_features/` folders not yet migrated
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
## RELATED COMMANDS
|
|
204
|
-
|
|
205
|
-
- `/sw:sync-specs` - Sync increment to living docs (includes consistency check)
|
|
206
|
-
- `/sw:validate` - Validate increment structure
|
|
207
|
-
- `/sw:archive` - Archive completed increments
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Intelligent increment archiving expert that analyzes age, status, and activity to recommend archiving. Use when workspace has too many increments, cleaning up completed work, or organizing the _archive folder. Follows the 10-10-10 rule for workspace organization.
|
|
3
|
-
user-invocable: false
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Increment Archive Manager
|
|
7
|
-
|
|
8
|
-
Expert at keeping the `.specweave/increments/` folder clean and organized through intelligent archiving.
|
|
9
|
-
|
|
10
|
-
## Core Knowledge
|
|
11
|
-
|
|
12
|
-
### Archiving Philosophy
|
|
13
|
-
|
|
14
|
-
**The 10-10-10 Rule**:
|
|
15
|
-
- **10 Active**: Keep last 10 increments readily accessible
|
|
16
|
-
- **10 Days**: Archive increments inactive for >10 days
|
|
17
|
-
- **10 Seconds**: Archive operation should take <10 seconds
|
|
18
|
-
|
|
19
|
-
### Archive Structure
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
.specweave/increments/
|
|
23
|
-
├── 0023-0032 (Active) ← Last 10 increments
|
|
24
|
-
├── _archive/ ← Completed/old increments
|
|
25
|
-
├── _abandoned/ ← Failed/obsolete increments
|
|
26
|
-
├── _paused/ ← Paused increments (blocked on dependency)
|
|
27
|
-
└── _backlog/ ← Planned but not started (future work)
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Only these 4 underscore folders are recognized lifecycle folders. Unknown folders (e.g. `_analysis`, `_temp`) are flagged by `specweave doctor` and auto-cleaned by `specweave update`.
|
|
31
|
-
|
|
32
|
-
### Auto-Archive Trigger (v1.0.257+)
|
|
33
|
-
|
|
34
|
-
When `archiving.autoArchiveThreshold` (default: 10) numbered increment directories exist:
|
|
35
|
-
- **Interactive mode**: LLM is prompted to suggest `specweave archive --keep-last 10`
|
|
36
|
-
- **Auto mode**: Archiving runs automatically in the background
|
|
37
|
-
- **Rate-limited**: Once per day to avoid noise
|
|
38
|
-
|
|
39
|
-
### Smart Detection Rules
|
|
40
|
-
|
|
41
|
-
#### Never Archive
|
|
42
|
-
- **Active increments** (status: active)
|
|
43
|
-
- **Paused increments** (status: paused) - may resume
|
|
44
|
-
- **Recent increments** (last 10 by default)
|
|
45
|
-
- **Increments with open GitHub/JIRA/ADO issues**
|
|
46
|
-
- **Increments with uncommitted changes**
|
|
47
|
-
|
|
48
|
-
#### Always Archive
|
|
49
|
-
- **Completed >60 days ago**
|
|
50
|
-
- **No activity >30 days** (and status: completed)
|
|
51
|
-
- **Superseded increments** (replaced by newer version)
|
|
52
|
-
- **Failed experiments** (after confirmation)
|
|
53
|
-
|
|
54
|
-
#### Smart Grouping
|
|
55
|
-
- **Release groups**: Archive all v0.7.x after v0.8.0 ships
|
|
56
|
-
- **Feature groups**: Archive related increments together
|
|
57
|
-
- **Time-based**: Quarter/month-based archiving
|
|
58
|
-
|
|
59
|
-
## Usage Patterns
|
|
60
|
-
|
|
61
|
-
### Keep Workspace Clean
|
|
62
|
-
```bash
|
|
63
|
-
# Interactive archiving - prompts for confirmation
|
|
64
|
-
/sw:archive-increments
|
|
65
|
-
|
|
66
|
-
# Keep only last 5 increments
|
|
67
|
-
/sw:archive-increments --keep-last 5
|
|
68
|
-
|
|
69
|
-
# Archive all completed increments
|
|
70
|
-
/sw:archive-increments --archive-completed
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Prepare for Release
|
|
74
|
-
```bash
|
|
75
|
-
# Archive all pre-release increments
|
|
76
|
-
/sw:archive-increments --pattern "v0.7"
|
|
77
|
-
|
|
78
|
-
# Archive by date range
|
|
79
|
-
/sw:archive-increments --older-than 30d
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Restore from Archive
|
|
83
|
-
```bash
|
|
84
|
-
# List archived increments
|
|
85
|
-
/sw:archive-increments --list-archived
|
|
86
|
-
|
|
87
|
-
# Restore specific increment
|
|
88
|
-
/sw:archive-increments --restore 0015
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Configuration
|
|
92
|
-
|
|
93
|
-
### Default Settings
|
|
94
|
-
```json
|
|
95
|
-
{
|
|
96
|
-
"archiving": {
|
|
97
|
-
"keepLast": 10, // Keep last 10 increments
|
|
98
|
-
"autoArchive": false, // Manual by default
|
|
99
|
-
"autoArchiveThreshold": 10, // Suggest archive when >= 10 increments
|
|
100
|
-
"archiveAfterDays": 60, // Archive after 60 days
|
|
101
|
-
"preserveActive": true, // Never archive active
|
|
102
|
-
"archiveCompleted": false // Manual control
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Aggressive Cleanup
|
|
108
|
-
```json
|
|
109
|
-
{
|
|
110
|
-
"archiving": {
|
|
111
|
-
"keepLast": 5, // Minimal workspace
|
|
112
|
-
"autoArchive": true, // Auto-archive on completion
|
|
113
|
-
"archiveAfterDays": 14, // Archive after 2 weeks
|
|
114
|
-
"archiveCompleted": true // Auto-archive completed
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Archive Statistics
|
|
120
|
-
|
|
121
|
-
### Current State Analysis
|
|
122
|
-
When asked about archiving, I analyze:
|
|
123
|
-
- Number of active increments
|
|
124
|
-
- Age of oldest active increment
|
|
125
|
-
- Total size of increments folder
|
|
126
|
-
- Number of completed increments
|
|
127
|
-
- External sync status
|
|
128
|
-
|
|
129
|
-
### Recommendations
|
|
130
|
-
Based on analysis, I suggest:
|
|
131
|
-
- **Overcrowded** (>20 active): Archive all but last 10
|
|
132
|
-
- **Stale** (many >30 days old): Archive by age
|
|
133
|
-
- **Post-release**: Archive previous version increments
|
|
134
|
-
- **Large size** (>100MB): Archive largest completed increments
|
|
135
|
-
|
|
136
|
-
## Safety Features
|
|
137
|
-
|
|
138
|
-
### Pre-Archive Checks
|
|
139
|
-
1. **Metadata validation**: Check increment status
|
|
140
|
-
2. **External sync**: Verify no open issues
|
|
141
|
-
3. **Git status**: Check for uncommitted changes
|
|
142
|
-
4. **Dependencies**: Check if referenced by active increments
|
|
143
|
-
5. **User confirmation**: Show what will be archived
|
|
144
|
-
|
|
145
|
-
### Archive Operations
|
|
146
|
-
- **Atomic moves**: Use fs.move with overwrite protection
|
|
147
|
-
- **Preserve structure**: Maintain full increment structure
|
|
148
|
-
- **Update references**: Fix links in living docs
|
|
149
|
-
- **Reversible**: Easy restore from archive
|
|
150
|
-
- **Audit trail**: Log all archive operations
|
|
151
|
-
|
|
152
|
-
## Smart Suggestions
|
|
153
|
-
|
|
154
|
-
### When to Archive
|
|
155
|
-
- **After major release**: Archive all pre-release increments
|
|
156
|
-
- **Quarterly cleanup**: Archive increments >3 months old
|
|
157
|
-
- **Before new project phase**: Archive previous phase work
|
|
158
|
-
- **Low disk space**: Archive largest completed increments
|
|
159
|
-
|
|
160
|
-
### Archive Patterns
|
|
161
|
-
- **By version**: `--pattern "v0.7"` (all v0.7.x increments)
|
|
162
|
-
- **By feature**: `--pattern "auth|login"` (auth-related)
|
|
163
|
-
- **By date**: `--older-than 30d` (time-based)
|
|
164
|
-
- **By status**: `--archive-completed` (all completed)
|
|
165
|
-
|
|
166
|
-
## Integration Points
|
|
167
|
-
|
|
168
|
-
### Status Line
|
|
169
|
-
- Shows "23-32 (10 active, 22 archived)" format
|
|
170
|
-
- Warns when >15 active increments
|
|
171
|
-
- Suggests archiving when appropriate
|
|
172
|
-
|
|
173
|
-
### Increment Commands
|
|
174
|
-
- `/sw:done` can trigger auto-archive
|
|
175
|
-
- `/sw:status` shows archive statistics
|
|
176
|
-
- `/sw:next` considers archived increments
|
|
177
|
-
|
|
178
|
-
### Living Docs
|
|
179
|
-
- Archive preserves living docs references
|
|
180
|
-
- Restore updates living docs links
|
|
181
|
-
- Archive included in docs statistics
|
|
182
|
-
|
|
183
|
-
## Best Practices
|
|
184
|
-
|
|
185
|
-
1. **Regular Cleanup**: Archive monthly or after releases
|
|
186
|
-
2. **Keep Recent**: Always keep last 5-10 increments
|
|
187
|
-
3. **Preserve Active**: Never force-archive active work
|
|
188
|
-
4. **Group Related**: Archive feature groups together
|
|
189
|
-
5. **Document Reasons**: Add archive notes for context
|
|
190
|
-
|
|
191
|
-
## Quick Reference
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
# Archive old increments
|
|
195
|
-
/sw:archive-increments --older-than 30d
|
|
196
|
-
|
|
197
|
-
# Keep workspace minimal
|
|
198
|
-
/sw:archive-increments --keep-last 5
|
|
199
|
-
|
|
200
|
-
# Archive after release
|
|
201
|
-
/sw:archive-increments --pattern "pre-release"
|
|
202
|
-
|
|
203
|
-
# Restore for reference
|
|
204
|
-
/sw:archive-increments --restore 0015
|
|
205
|
-
|
|
206
|
-
# Check archive stats
|
|
207
|
-
/sw:archive-increments --stats
|
|
208
|
-
```
|
|
209
|
-
|