specweave 0.6.8 → 0.7.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/.claude-plugin/README.md +1 -1
- package/CLAUDE.md +903 -99
- package/README.md +143 -207
- package/bin/specweave.js +67 -0
- package/dist/cli/commands/abandon.d.ts +13 -0
- package/dist/cli/commands/abandon.d.ts.map +1 -0
- package/dist/cli/commands/abandon.js +15 -0
- package/dist/cli/commands/abandon.js.map +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +90 -18
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/pause.d.ts +13 -0
- package/dist/cli/commands/pause.d.ts.map +1 -0
- package/dist/cli/commands/pause.js +15 -0
- package/dist/cli/commands/pause.js.map +1 -0
- package/dist/cli/commands/qa.d.ts +54 -0
- package/dist/cli/commands/qa.d.ts.map +1 -0
- package/dist/cli/commands/qa.js +98 -0
- package/dist/cli/commands/qa.js.map +1 -0
- package/dist/cli/commands/resume.d.ts +12 -0
- package/dist/cli/commands/resume.d.ts.map +1 -0
- package/dist/cli/commands/resume.js +14 -0
- package/dist/cli/commands/resume.js.map +1 -0
- package/dist/cli/commands/status.d.ts +12 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +23 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/ado.d.ts +57 -0
- package/dist/cli/helpers/issue-tracker/ado.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/ado.js +223 -0
- package/dist/cli/helpers/issue-tracker/ado.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/github.d.ts +65 -0
- package/dist/cli/helpers/issue-tracker/github.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/github.js +284 -0
- package/dist/cli/helpers/issue-tracker/github.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/index.d.ts +22 -0
- package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/index.js +270 -0
- package/dist/cli/helpers/issue-tracker/index.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/jira.d.ts +61 -0
- package/dist/cli/helpers/issue-tracker/jira.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/jira.js +265 -0
- package/dist/cli/helpers/issue-tracker/jira.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/types.d.ts +86 -0
- package/dist/cli/helpers/issue-tracker/types.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/types.js +16 -0
- package/dist/cli/helpers/issue-tracker/types.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/utils.d.ts +103 -0
- package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/utils.js +240 -0
- package/dist/cli/helpers/issue-tracker/utils.js.map +1 -0
- package/dist/core/increment/limits.d.ts +68 -0
- package/dist/core/increment/limits.d.ts.map +1 -0
- package/dist/core/increment/limits.js +224 -0
- package/dist/core/increment/limits.js.map +1 -0
- package/dist/core/increment/metadata-manager.d.ts +114 -0
- package/dist/core/increment/metadata-manager.d.ts.map +1 -0
- package/dist/core/increment/metadata-manager.js +320 -0
- package/dist/core/increment/metadata-manager.js.map +1 -0
- package/dist/core/increment/status-commands.d.ts +43 -0
- package/dist/core/increment/status-commands.d.ts.map +1 -0
- package/dist/core/increment/status-commands.js +277 -0
- package/dist/core/increment/status-commands.js.map +1 -0
- package/dist/core/plugin-detector.d.ts +1 -0
- package/dist/core/plugin-detector.d.ts.map +1 -1
- package/dist/core/plugin-detector.js +25 -0
- package/dist/core/plugin-detector.js.map +1 -1
- package/dist/core/qa/qa-runner.d.ts +16 -0
- package/dist/core/qa/qa-runner.d.ts.map +1 -0
- package/dist/core/qa/qa-runner.js +404 -0
- package/dist/core/qa/qa-runner.js.map +1 -0
- package/dist/core/qa/quality-gate-decider.d.ts +53 -0
- package/dist/core/qa/quality-gate-decider.d.ts.map +1 -0
- package/dist/core/qa/quality-gate-decider.js +268 -0
- package/dist/core/qa/quality-gate-decider.js.map +1 -0
- package/dist/core/qa/risk-calculator.d.ts +126 -0
- package/dist/core/qa/risk-calculator.d.ts.map +1 -0
- package/dist/core/qa/risk-calculator.js +247 -0
- package/dist/core/qa/risk-calculator.js.map +1 -0
- package/dist/core/qa/types.d.ts +315 -0
- package/dist/core/qa/types.d.ts.map +1 -0
- package/dist/core/qa/types.js +8 -0
- package/dist/core/qa/types.js.map +1 -0
- package/dist/core/types/config.d.ts +35 -0
- package/dist/core/types/config.d.ts.map +1 -1
- package/dist/core/types/config.js +16 -0
- package/dist/core/types/config.js.map +1 -1
- package/dist/core/types/increment-metadata.d.ts +120 -0
- package/dist/core/types/increment-metadata.d.ts.map +1 -0
- package/dist/core/types/increment-metadata.js +138 -0
- package/dist/core/types/increment-metadata.js.map +1 -0
- package/dist/hooks/lib/invoke-translator-skill.d.ts +60 -0
- package/dist/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
- package/dist/hooks/lib/invoke-translator-skill.js +201 -0
- package/dist/hooks/lib/invoke-translator-skill.js.map +1 -0
- package/dist/hooks/lib/translate-file.d.ts +59 -0
- package/dist/hooks/lib/translate-file.d.ts.map +1 -0
- package/dist/hooks/lib/translate-file.js +350 -0
- package/dist/hooks/lib/translate-file.js.map +1 -0
- package/dist/locales/en/cli.json +3 -1
- package/dist/metrics/calculators/change-failure-rate.d.ts +22 -0
- package/dist/metrics/calculators/change-failure-rate.d.ts.map +1 -0
- package/dist/metrics/calculators/change-failure-rate.js +70 -0
- package/dist/metrics/calculators/change-failure-rate.js.map +1 -0
- package/dist/metrics/calculators/deployment-frequency.d.ts +20 -0
- package/dist/metrics/calculators/deployment-frequency.d.ts.map +1 -0
- package/dist/metrics/calculators/deployment-frequency.js +61 -0
- package/dist/metrics/calculators/deployment-frequency.js.map +1 -0
- package/dist/metrics/calculators/lead-time.d.ts +22 -0
- package/dist/metrics/calculators/lead-time.d.ts.map +1 -0
- package/dist/metrics/calculators/lead-time.js +82 -0
- package/dist/metrics/calculators/lead-time.js.map +1 -0
- package/dist/metrics/calculators/mttr.d.ts +21 -0
- package/dist/metrics/calculators/mttr.d.ts.map +1 -0
- package/dist/metrics/calculators/mttr.js +60 -0
- package/dist/metrics/calculators/mttr.js.map +1 -0
- package/dist/metrics/dora-calculator.d.ts +24 -0
- package/dist/metrics/dora-calculator.d.ts.map +1 -0
- package/dist/metrics/dora-calculator.js +104 -0
- package/dist/metrics/dora-calculator.js.map +1 -0
- package/dist/metrics/github-client.d.ts +51 -0
- package/dist/metrics/github-client.d.ts.map +1 -0
- package/dist/metrics/github-client.js +133 -0
- package/dist/metrics/github-client.js.map +1 -0
- package/dist/metrics/types.d.ts +112 -0
- package/dist/metrics/types.d.ts.map +1 -0
- package/dist/metrics/types.js +10 -0
- package/dist/metrics/types.js.map +1 -0
- package/dist/metrics/utils/percentile.d.ts +25 -0
- package/dist/metrics/utils/percentile.d.ts.map +1 -0
- package/dist/metrics/utils/percentile.js +46 -0
- package/dist/metrics/utils/percentile.js.map +1 -0
- package/dist/metrics/utils/tier-classifier.d.ts +61 -0
- package/dist/metrics/utils/tier-classifier.d.ts.map +1 -0
- package/dist/metrics/utils/tier-classifier.js +100 -0
- package/dist/metrics/utils/tier-classifier.js.map +1 -0
- package/dist/utils/auth-helpers.d.ts +58 -0
- package/dist/utils/auth-helpers.d.ts.map +1 -0
- package/dist/utils/auth-helpers.js +108 -0
- package/dist/utils/auth-helpers.js.map +1 -0
- package/dist/utils/env-file.d.ts +88 -0
- package/dist/utils/env-file.d.ts.map +1 -0
- package/dist/utils/env-file.js +180 -0
- package/dist/utils/env-file.js.map +1 -0
- package/dist/utils/plugin-detection.d.ts +50 -0
- package/dist/utils/plugin-detection.d.ts.map +1 -0
- package/dist/utils/plugin-detection.js +229 -0
- package/dist/utils/plugin-detection.js.map +1 -0
- package/dist/utils/secrets-loader.d.ts +88 -0
- package/dist/utils/secrets-loader.d.ts.map +1 -0
- package/dist/utils/secrets-loader.js +271 -0
- package/dist/utils/secrets-loader.js.map +1 -0
- package/dist/utils/translation.d.ts +187 -0
- package/dist/utils/translation.d.ts.map +1 -0
- package/dist/utils/translation.js +414 -0
- package/dist/utils/translation.js.map +1 -0
- package/package.json +28 -44
- package/plugins/specweave/.claude-plugin/plugin.json +3 -3
- package/plugins/specweave/agents/pm/AGENT.md +330 -54
- package/plugins/specweave/agents/test-aware-planner/AGENT.md +1035 -0
- package/plugins/specweave/agents/test-aware-planner/templates/README.md +118 -0
- package/plugins/specweave/agents/test-aware-planner/templates/task-non-testable.md.template +24 -0
- package/plugins/specweave/agents/test-aware-planner/templates/task-testable.md.template +53 -0
- package/plugins/specweave/agents/test-aware-planner/templates/tasks-frontmatter.md.template +11 -0
- package/plugins/specweave/commands/README.md +88 -163
- package/plugins/specweave/commands/specweave-abandon.md +314 -0
- package/plugins/specweave/commands/specweave-check-tests.md +546 -0
- package/plugins/specweave/commands/{do.md → specweave-do.md} +5 -7
- package/plugins/specweave/commands/{increment.md → specweave-increment.md} +231 -4
- package/plugins/specweave/commands/specweave-pause.md +189 -0
- package/plugins/specweave/commands/specweave-qa.md +245 -0
- package/plugins/specweave/commands/specweave-resume.md +216 -0
- package/plugins/specweave/commands/specweave-status.md +397 -0
- package/plugins/specweave/commands/specweave-sync-tasks.md +256 -0
- package/plugins/specweave/commands/{translate.md → specweave-translate.md} +3 -3
- package/plugins/specweave/commands/specweave-update-scope.md +351 -0
- package/plugins/specweave/commands/specweave.md +21 -21
- package/plugins/specweave/hooks/post-increment-planning.sh +335 -0
- package/plugins/specweave/hooks/post-task-completion.sh +141 -0
- package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
- package/plugins/specweave/skills/brownfield-analyzer/SKILL.md +9 -9
- package/plugins/specweave/skills/increment-planner/SKILL.md +400 -212
- package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +499 -0
- package/plugins/specweave/skills/plugin-detector/SKILL.md +114 -1
- package/plugins/specweave/skills/project-kickstarter/SKILL.md +74 -1
- package/plugins/specweave/skills/{rfc-generator → spec-generator}/SKILL.md +22 -29
- package/plugins/specweave/skills/specweave-detector/SKILL.md +3 -3
- package/plugins/specweave/skills/specweave-framework/SKILL.md +2 -2
- package/plugins/specweave-ado/.claude-plugin/plugin.json +18 -4
- package/plugins/specweave-ado/agents/ado-manager/AGENT.md +426 -0
- package/plugins/specweave-ado/commands/close-workitem.md +52 -0
- package/plugins/specweave-ado/commands/create-workitem.md +53 -0
- package/plugins/specweave-ado/commands/status.md +53 -0
- package/plugins/specweave-ado/commands/sync.md +55 -0
- package/plugins/specweave-ado/lib/ado-client.ts +361 -0
- package/plugins/specweave-ado/reference/ado-specweave-mapping.md +552 -0
- package/plugins/specweave-ado/skills/ado-sync/SKILL.md +344 -193
- package/plugins/specweave-docs/skills/docusaurus/SKILL.md +73 -0
- package/plugins/specweave-github/agents/github-manager/AGENT.md +49 -0
- package/plugins/specweave-github/commands/{github-close-issue.md → close-issue.md} +1 -1
- package/plugins/specweave-github/commands/{github-create-issue.md → create-issue.md} +1 -1
- package/plugins/specweave-github/commands/{github-status.md → status.md} +1 -1
- package/plugins/specweave-github/commands/{github-sync-tasks.md → sync-tasks.md} +1 -1
- package/plugins/specweave-github/commands/{github-sync.md → sync.md} +1 -1
- package/plugins/specweave-github/reference/github-specweave-mapping.md +377 -0
- package/plugins/specweave-github/skills/github-sync/SKILL.md +11 -3
- package/plugins/specweave-infrastructure/commands/{specweave.monitor-setup.md → monitor-setup.md} +5 -0
- package/plugins/specweave-infrastructure/commands/{specweave.slo-implement.md → slo-implement.md} +5 -0
- package/plugins/specweave-jira/agents/jira-manager/AGENT.md +380 -0
- package/plugins/specweave-jira/commands/{specweave.sync-jira.md → sync.md} +1 -1
- package/plugins/specweave-jira/reference/jira-specweave-mapping.md +508 -0
- package/plugins/specweave-ml/commands/ml-deploy.md +1 -1
- package/plugins/specweave-ml/commands/ml-evaluate.md +1 -1
- package/plugins/specweave-ml/commands/ml-explain.md +1 -1
- package/plugins/specweave-ml/commands/{specweave.ml-pipeline.md → ml-pipeline.md} +5 -0
- package/src/templates/AGENTS.md.template +331 -31
- package/src/templates/CLAUDE.md.template +36 -21
- package/src/templates/COMPLETION-REPORT.template.md +128 -0
- package/src/templates/README.md.template +17 -16
- package/src/templates/docs/README.md +11 -9
- package/src/templates/docs/spec-template.md +229 -0
- package/plugins/specweave/commands/inc.md +0 -85
- package/plugins/specweave/commands/list-increments.md +0 -180
- package/src/adapters/README.md +0 -275
- package/src/adapters/adapter-base.ts +0 -182
- package/src/adapters/adapter-interface.ts +0 -166
- package/src/adapters/adapter-loader.ts +0 -256
- package/src/adapters/agents-md-generator.ts +0 -228
- package/src/adapters/claude/README.md +0 -233
- package/src/adapters/claude/adapter.ts +0 -468
- package/src/adapters/claude-md-generator.ts +0 -377
- package/src/adapters/codex/README.md +0 -105
- package/src/adapters/codex/adapter.ts +0 -333
- package/src/adapters/cursor/.cursor/context/docs-context.md +0 -62
- package/src/adapters/cursor/.cursor/context/increments-context.md +0 -71
- package/src/adapters/cursor/.cursor/context/strategy-context.md +0 -73
- package/src/adapters/cursor/.cursor/context/tests-context.md +0 -89
- package/src/adapters/cursor/README.md +0 -283
- package/src/adapters/cursor/adapter.ts +0 -451
- package/src/adapters/doc-generator.ts +0 -331
- package/src/adapters/gemini/README.md +0 -97
- package/src/adapters/gemini/adapter.ts +0 -298
- package/src/adapters/generic/README.md +0 -277
- package/src/adapters/generic/adapter.ts +0 -378
- package/src/adapters/registry.yaml +0 -187
- /package/plugins/specweave/commands/{costs.md → specweave-costs.md} +0 -0
- /package/plugins/specweave/commands/{done.md → specweave-done.md} +0 -0
- /package/plugins/specweave/commands/{next.md → specweave-next.md} +0 -0
- /package/plugins/specweave/commands/{progress.md → specweave-progress.md} +0 -0
- /package/plugins/specweave/commands/{sync-docs.md → specweave-sync-docs.md} +0 -0
- /package/plugins/specweave/commands/{tdd-cycle.md → specweave-tdd-cycle.md} +0 -0
- /package/plugins/specweave/commands/{tdd-green.md → specweave-tdd-green.md} +0 -0
- /package/plugins/specweave/commands/{tdd-red.md → specweave-tdd-red.md} +0 -0
- /package/plugins/specweave/commands/{tdd-refactor.md → specweave-tdd-refactor.md} +0 -0
- /package/plugins/specweave/commands/{validate.md → specweave-validate.md} +0 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: abandon
|
|
3
|
+
description: Abandon an incomplete increment (requirements changed, obsolete)
|
|
4
|
+
usage: /specweave:abandon <increment-id> --reason="<reason>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Abandon Increment Command
|
|
8
|
+
|
|
9
|
+
**Usage**: `/specweave:abandon <increment-id> --reason="<reason>"`
|
|
10
|
+
|
|
11
|
+
⚠️ **THIS ACTION MOVES THE INCREMENT TO `_abandoned/` FOLDER**
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Abandon an increment when:
|
|
18
|
+
- **Requirements changed** (feature no longer needed)
|
|
19
|
+
- **Approach wrong** (discovered better solution)
|
|
20
|
+
- **Superseded** (replaced by different increment)
|
|
21
|
+
- **Experiment failed** (spike didn't pan out)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Behavior
|
|
26
|
+
|
|
27
|
+
1. **Validates** increment exists and is NOT "completed"
|
|
28
|
+
2. **Prompts** for reason if not provided
|
|
29
|
+
3. **Confirmation prompt** ("This is permanent. Continue? [y/N]")
|
|
30
|
+
4. **Updates** metadata.json:
|
|
31
|
+
- `status`: → "abandoned"
|
|
32
|
+
- `abandonedReason`: User-provided reason
|
|
33
|
+
- `abandonedAt`: Current timestamp
|
|
34
|
+
5. **Moves folder**:
|
|
35
|
+
- From: `.specweave/increments/{id}/`
|
|
36
|
+
- To: `.specweave/increments/_abandoned/{id}/`
|
|
37
|
+
6. **Displays** confirmation with preserved location
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Examples
|
|
42
|
+
|
|
43
|
+
### Abandon with reason
|
|
44
|
+
```bash
|
|
45
|
+
/abandon 0008 --reason="Requirements changed - feature no longer needed"
|
|
46
|
+
|
|
47
|
+
⚠️ This will move increment 0008 to _abandoned/
|
|
48
|
+
Reason: Requirements changed - feature no longer needed
|
|
49
|
+
|
|
50
|
+
Continue? [y/N]: y
|
|
51
|
+
|
|
52
|
+
✅ Increment 0008 abandoned
|
|
53
|
+
📦 Moved to: .specweave/increments/_abandoned/0008-old-feature/
|
|
54
|
+
📝 Reason: Requirements changed - feature no longer needed
|
|
55
|
+
💾 All work preserved for reference
|
|
56
|
+
|
|
57
|
+
💡 To un-abandon: Manually move back to increments/ folder
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Abandon without reason (prompts)
|
|
61
|
+
```bash
|
|
62
|
+
/abandon 0009
|
|
63
|
+
|
|
64
|
+
❓ Why are you abandoning this increment?
|
|
65
|
+
1. Requirements changed
|
|
66
|
+
2. Approach was wrong
|
|
67
|
+
3. Superseded by different work
|
|
68
|
+
4. Experiment failed
|
|
69
|
+
5. Other (type reason)
|
|
70
|
+
|
|
71
|
+
> 1
|
|
72
|
+
|
|
73
|
+
⚠️ This will move increment 0009 to _abandoned/
|
|
74
|
+
Reason: Requirements changed
|
|
75
|
+
|
|
76
|
+
Continue? [y/N]: y
|
|
77
|
+
|
|
78
|
+
✅ Increment 0009 abandoned
|
|
79
|
+
📦 Moved to: .specweave/increments/_abandoned/0009-experiment/
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Edge Cases
|
|
85
|
+
|
|
86
|
+
### Cannot Abandon Completed
|
|
87
|
+
```bash
|
|
88
|
+
/abandon 0005
|
|
89
|
+
|
|
90
|
+
❌ Cannot abandon increment 0005
|
|
91
|
+
Status: completed
|
|
92
|
+
Completed increments cannot be abandoned
|
|
93
|
+
|
|
94
|
+
💡 Increments are done - no need to abandon
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Already Abandoned
|
|
98
|
+
```bash
|
|
99
|
+
/abandon 0008
|
|
100
|
+
|
|
101
|
+
⚠️ Increment 0008 is already abandoned
|
|
102
|
+
Location: .specweave/increments/_abandoned/0008-old-feature/
|
|
103
|
+
Reason: Requirements changed
|
|
104
|
+
|
|
105
|
+
No action needed.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Increment Not Found
|
|
109
|
+
```bash
|
|
110
|
+
/abandon 9999
|
|
111
|
+
|
|
112
|
+
❌ Increment not found: 9999
|
|
113
|
+
💡 Check available increments: /status
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Cancel Abandonment
|
|
117
|
+
```bash
|
|
118
|
+
/abandon 0008 --reason="Not needed"
|
|
119
|
+
|
|
120
|
+
⚠️ This will move increment 0008 to _abandoned/
|
|
121
|
+
Reason: Not needed
|
|
122
|
+
|
|
123
|
+
Continue? [y/N]: n
|
|
124
|
+
|
|
125
|
+
❌ Abandonment cancelled
|
|
126
|
+
Increment 0008 remains active
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Implementation
|
|
132
|
+
|
|
133
|
+
This command uses the MetadataManager and file system operations:
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
import { MetadataManager, IncrementStatus } from '../src/core/increment/metadata-manager';
|
|
137
|
+
import * as fs from 'fs-extra';
|
|
138
|
+
import * as path from 'path';
|
|
139
|
+
|
|
140
|
+
// Read current metadata
|
|
141
|
+
const metadata = MetadataManager.read(incrementId);
|
|
142
|
+
|
|
143
|
+
// Validate can abandon
|
|
144
|
+
if (metadata.status === IncrementStatus.COMPLETED) {
|
|
145
|
+
throw new Error('Cannot abandon completed increment');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Confirmation prompt
|
|
149
|
+
const confirmed = await prompt('Continue? [y/N]');
|
|
150
|
+
if (!confirmed) {
|
|
151
|
+
console.log('Abandonment cancelled');
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Update metadata
|
|
156
|
+
MetadataManager.updateStatus(incrementId, IncrementStatus.ABANDONED, reason);
|
|
157
|
+
|
|
158
|
+
// Move to _abandoned/ folder
|
|
159
|
+
const fromPath = path.join('.specweave/increments', incrementId);
|
|
160
|
+
const toPath = path.join('.specweave/increments/_abandoned', incrementId);
|
|
161
|
+
fs.moveSync(fromPath, toPath);
|
|
162
|
+
|
|
163
|
+
console.log(`✅ Moved to: ${toPath}`);
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Status Flow
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
active ──abandon──> abandoned
|
|
172
|
+
│
|
|
173
|
+
paused ──abandon──> abandoned
|
|
174
|
+
│
|
|
175
|
+
abandoned (already abandoned - no-op)
|
|
176
|
+
|
|
177
|
+
completed (CANNOT abandon)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## _abandoned/ Folder Structure
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
.specweave/increments/
|
|
186
|
+
├── 0001-core-framework/ # Active/completed
|
|
187
|
+
├── 0002-core-enhancements/ # Active/completed
|
|
188
|
+
├── 0003-model-selection/ # Active/completed
|
|
189
|
+
├── _abandoned/ # Abandoned increments
|
|
190
|
+
│ ├── 0008-old-approach/ # Abandoned
|
|
191
|
+
│ │ ├── spec.md
|
|
192
|
+
│ │ ├── plan.md
|
|
193
|
+
│ │ ├── tasks.md
|
|
194
|
+
│ │ └── metadata.json (status: abandoned)
|
|
195
|
+
│ ├── 0009-failed-experiment/
|
|
196
|
+
│ └── 0010-superseded-feature/
|
|
197
|
+
└── _backlog/ # Future work
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Un-Abandoning (Manual Process)
|
|
203
|
+
|
|
204
|
+
To un-abandon an increment:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# 1. Move back to increments/
|
|
208
|
+
mv .specweave/increments/_abandoned/0008-feature \
|
|
209
|
+
.specweave/increments/0008-feature
|
|
210
|
+
|
|
211
|
+
# 2. Resume via command
|
|
212
|
+
/resume 0008
|
|
213
|
+
|
|
214
|
+
✅ Increment 0008 resumed
|
|
215
|
+
⚠️ Note: Was abandoned 10 days ago
|
|
216
|
+
Reason: Requirements changed
|
|
217
|
+
💡 Review spec.md to ensure still relevant
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Related Commands
|
|
223
|
+
|
|
224
|
+
- `/pause <id>` - Pause increment (temporary, can resume)
|
|
225
|
+
- `/resume <id>` - Resume paused or abandoned increment
|
|
226
|
+
- `/status` - Show all increments (including abandoned count)
|
|
227
|
+
- `/status --abandoned` - Show only abandoned increments
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Best Practices
|
|
232
|
+
|
|
233
|
+
✅ **Always provide clear reason** - Future you will thank you
|
|
234
|
+
|
|
235
|
+
✅ **Document learnings** - Add retrospective notes to spec.md before abandoning
|
|
236
|
+
|
|
237
|
+
✅ **Extract reusable parts** - Move to _backlog/ if salvageable
|
|
238
|
+
|
|
239
|
+
✅ **Communicate** - Let team know if collaborative
|
|
240
|
+
|
|
241
|
+
❌ **Don't abandon as procrastination** - Pause if temporarily blocked
|
|
242
|
+
|
|
243
|
+
❌ **Don't delete** - Abandon moves to _abandoned/, preserves history
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Auto-Abandonment (Experiments)
|
|
248
|
+
|
|
249
|
+
Experiments (--type=experiment) auto-abandon after **14 days** of inactivity:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
# Create experiment
|
|
253
|
+
/specweave:inc "Try GraphQL" --type=experiment
|
|
254
|
+
|
|
255
|
+
# ... 15 days pass with no activity ...
|
|
256
|
+
|
|
257
|
+
# Automatic abandonment
|
|
258
|
+
/status
|
|
259
|
+
|
|
260
|
+
📊 Auto-Abandoned (1):
|
|
261
|
+
🧪 0010-graphql-experiment [experiment]
|
|
262
|
+
Abandoned: automatically (14+ days inactive)
|
|
263
|
+
Created: 15 days ago
|
|
264
|
+
Last activity: 15 days ago
|
|
265
|
+
|
|
266
|
+
💡 Experiments auto-abandon after 14 days of inactivity
|
|
267
|
+
To prevent: Update lastActivity via /do or manual touch
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Statistics
|
|
273
|
+
|
|
274
|
+
View abandonment statistics:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
/status
|
|
278
|
+
|
|
279
|
+
✅ Completed (4):
|
|
280
|
+
0001-core-framework
|
|
281
|
+
0002-core-enhancements
|
|
282
|
+
0003-model-selection
|
|
283
|
+
0004-plugin-architecture
|
|
284
|
+
|
|
285
|
+
❌ Abandoned (3):
|
|
286
|
+
0008-old-approach (Requirements changed)
|
|
287
|
+
0009-failed-experiment (Experiment failed)
|
|
288
|
+
0010-superseded (Replaced by 0011)
|
|
289
|
+
|
|
290
|
+
📊 Summary:
|
|
291
|
+
- Success rate: 57% (4/7 completed)
|
|
292
|
+
- Abandonment rate: 43% (3/7 abandoned)
|
|
293
|
+
- Common reasons: Requirements changed (2), Experiment failed (1)
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Abandoned Increments as Learning
|
|
299
|
+
|
|
300
|
+
Abandoned work is valuable!
|
|
301
|
+
|
|
302
|
+
- **Retrospectives**: What went wrong? Why did requirements change?
|
|
303
|
+
- **Patterns**: Are we over-committing? Under-planning?
|
|
304
|
+
- **Learnings**: Failed experiments teach us what NOT to do
|
|
305
|
+
- **Reference**: Abandoned specs can inform future work
|
|
306
|
+
|
|
307
|
+
💡 Periodically review `_abandoned/` folder for insights
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
**Command**: `/specweave:abandon` (or `/abandon`)
|
|
312
|
+
**Plugin**: specweave (core)
|
|
313
|
+
**Version**: v0.7.0+
|
|
314
|
+
**Part of**: Increment 0007 - Smart Status Management
|