specweave 0.28.57 → 0.28.61

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.
Files changed (44) hide show
  1. package/bin/specweave.js +36 -0
  2. package/dist/src/cli/commands/init.d.ts.map +1 -1
  3. package/dist/src/cli/commands/init.js +13 -1
  4. package/dist/src/cli/commands/init.js.map +1 -1
  5. package/dist/src/cli/commands/jobs.d.ts +20 -0
  6. package/dist/src/cli/commands/jobs.d.ts.map +1 -0
  7. package/dist/src/cli/commands/jobs.js +448 -0
  8. package/dist/src/cli/commands/jobs.js.map +1 -0
  9. package/dist/src/cli/helpers/init/ado-repo-cloning.d.ts +32 -0
  10. package/dist/src/cli/helpers/init/ado-repo-cloning.d.ts.map +1 -0
  11. package/dist/src/cli/helpers/init/ado-repo-cloning.js +161 -0
  12. package/dist/src/cli/helpers/init/ado-repo-cloning.js.map +1 -0
  13. package/dist/src/cli/helpers/init/external-import.d.ts +18 -1
  14. package/dist/src/cli/helpers/init/external-import.d.ts.map +1 -1
  15. package/dist/src/cli/helpers/init/external-import.js +61 -21
  16. package/dist/src/cli/helpers/init/external-import.js.map +1 -1
  17. package/dist/src/cli/helpers/selection-strategy.d.ts +28 -0
  18. package/dist/src/cli/helpers/selection-strategy.d.ts.map +1 -1
  19. package/dist/src/cli/helpers/selection-strategy.js +48 -0
  20. package/dist/src/cli/helpers/selection-strategy.js.map +1 -1
  21. package/dist/src/cli/workers/import-worker.d.ts +18 -0
  22. package/dist/src/cli/workers/import-worker.d.ts.map +1 -0
  23. package/dist/src/cli/workers/import-worker.js +268 -0
  24. package/dist/src/cli/workers/import-worker.js.map +1 -0
  25. package/dist/src/core/background/index.d.ts +8 -0
  26. package/dist/src/core/background/index.d.ts.map +1 -1
  27. package/dist/src/core/background/index.js +8 -0
  28. package/dist/src/core/background/index.js.map +1 -1
  29. package/dist/src/core/background/job-launcher.d.ts +54 -0
  30. package/dist/src/core/background/job-launcher.d.ts.map +1 -0
  31. package/dist/src/core/background/job-launcher.js +206 -0
  32. package/dist/src/core/background/job-launcher.js.map +1 -0
  33. package/dist/src/core/repo-structure/providers/azure-devops-provider.d.ts +15 -0
  34. package/dist/src/core/repo-structure/providers/azure-devops-provider.d.ts.map +1 -1
  35. package/dist/src/core/repo-structure/providers/azure-devops-provider.js +56 -0
  36. package/dist/src/core/repo-structure/providers/azure-devops-provider.js.map +1 -1
  37. package/dist/src/importers/ado-importer.d.ts +7 -1
  38. package/dist/src/importers/ado-importer.d.ts.map +1 -1
  39. package/dist/src/importers/ado-importer.js +108 -61
  40. package/dist/src/importers/ado-importer.js.map +1 -1
  41. package/package.json +1 -1
  42. package/plugins/specweave/commands/specweave-jobs.md +133 -29
  43. package/plugins/specweave-ado/commands/specweave-ado-clone-repos.md +379 -0
  44. package/plugins/specweave-release/commands/specweave-release-npm.md +51 -14
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: specweave-release:npm
3
- description: Bump patch version, create git tag, and trigger npm publish via GitHub Actions. Use --quick for instant release (auto-commits dirty changes, publishes to npmjs.org, pushes to git). Use --only for local publish without git push. Use --only --local for version bump only.
3
+ description: Bump patch version, create git tag, and trigger npm publish via GitHub Actions. Use --quick for instant release (auto-commits, PUSHES FIRST, then publishes to npmjs.org). Use --only for local publish without git push. Use --only --local for version bump only.
4
4
  ---
5
5
 
6
6
  # /specweave-release:npm - NPM Release Automation
@@ -12,9 +12,9 @@ You are the NPM Release Assistant. Your job is to automate the patch version rel
12
12
  | Command | Flow | Use Case |
13
13
  |---------|------|----------|
14
14
  | `/specweave-release:npm` | Bump → Push → **CI publishes** | Standard release (CI handles npm) |
15
- | `/specweave-release:npm --quick` | Auto-commit → Bump → Build → **Publish** → Push | **INSTANT RELEASE** (recommended!) |
15
+ | `/specweave-release:npm --quick` | Auto-commit → **PUSH** → Bump → Build → **Publish** → Push tag | **INSTANT RELEASE** (recommended!) |
16
16
  | `/specweave-release:npm --only` | Bump → Build → **Publish locally** → NO push | Quick local release, push later |
17
- | `/specweave-release:npm --only --push` | Auto-commit → Bump → Build → **Publish** → Push | Same as --quick |
17
+ | `/specweave-release:npm --only --push` | Auto-commit → **PUSH** → Bump → Build → **Publish** → Push tag | Same as --quick |
18
18
  | `/specweave-release:npm --only --local` | **Bump ONLY** → NO build, NO publish, NO git | FASTEST: Local testing only |
19
19
 
20
20
  ## Detecting Mode
@@ -22,7 +22,7 @@ You are the NPM Release Assistant. Your job is to automate the patch version rel
22
22
  Check flags in the command invocation:
23
23
 
24
24
  ```
25
- --quick → INSTANT RELEASE: auto-commit dirty, publish to npmjs.org, push git
25
+ --quick → INSTANT RELEASE: auto-commit, PUSH FIRST, then bump+build+publish+push tag
26
26
  --only --local → Version bump ONLY (no build, no publish, no git) - FASTEST
27
27
  --only --push → Same as --quick (legacy alias)
28
28
  --only → Direct publish to npm (bypass CI), no git push
@@ -47,10 +47,15 @@ Check flags in the command invocation:
47
47
 
48
48
  ## QUICK MODE WORKFLOW (--quick flag) - RECOMMENDED!
49
49
 
50
- Use this workflow when `--quick` flag is detected. This is the **instant release** mode - auto-commits any dirty changes, publishes directly to npmjs.org, and pushes to git. One command does everything!
50
+ Use this workflow when `--quick` flag is detected. This is the **instant release** mode - auto-commits any dirty changes, syncs git FIRST, then publishes to npmjs.org. One command does everything!
51
51
 
52
52
  **Use case**: You made changes and want to release immediately. No manual steps needed.
53
53
 
54
+ **CRITICAL ORDER**: Git sync FIRST, then release. This ensures:
55
+ - Your code is safe on remote before any release operations
56
+ - If npm publish fails, git is already synced (clean state)
57
+ - No risk of local-only commits that could be lost
58
+
54
59
  ### 1. Pre-flight Check (Minimal)
55
60
 
56
61
  ```bash
@@ -63,8 +68,6 @@ node -p "require('./package.json').version"
63
68
 
64
69
  **STOP if**: Not on `develop` branch (ask user to switch)
65
70
 
66
- **If uncommitted changes exist → AUTO-COMMIT (Step 2)**
67
-
68
71
  ### 2. Auto-Commit Dirty Changes (if any)
69
72
 
70
73
  ```bash
@@ -86,32 +89,50 @@ git commit -m "[auto-generated message based on changed files]"
86
89
  - `*.md` changes → `docs: update documentation`
87
90
  - Mixed → `chore: update code and documentation`
88
91
 
89
- ### 3. Bump Patch Version
92
+ ### 3. PUSH DIRTY COMMIT TO REMOTE FIRST! (CRITICAL!)
93
+
94
+ **BEFORE any release operations, sync git:**
95
+
96
+ ```bash
97
+ # Push dirty commit to remote FIRST - ensures code is safe before release
98
+ git push origin develop
99
+ ```
100
+
101
+ **Why this order?**
102
+ - ✅ Your changes are safely on GitHub BEFORE release starts
103
+ - ✅ If npm publish fails later, git is already synced
104
+ - ✅ No risk of "released but not pushed" state
105
+ - ✅ Clean recovery if anything fails mid-release
106
+
107
+ ### 4. Bump Patch Version
90
108
 
91
109
  ```bash
92
110
  npm version patch -m "chore: bump version to %s"
93
111
  ```
94
112
 
95
- ### 4. Build Package
113
+ This creates a NEW commit + tag locally.
114
+
115
+ ### 5. Build Package
96
116
 
97
117
  ```bash
98
118
  npm run rebuild
99
119
  ```
100
120
 
101
- ### 5. Publish to NPM (with explicit registry!)
121
+ ### 6. Publish to NPM (with explicit registry!)
102
122
 
103
123
  ```bash
104
124
  # CRITICAL: Always specify registry to avoid ~/.npmrc redirecting to private feeds!
105
125
  npm publish --registry https://registry.npmjs.org
106
126
  ```
107
127
 
108
- ### 6. Push to Git
128
+ ### 7. Push Version Commit + Tag
109
129
 
110
130
  ```bash
131
+ # Push the version bump commit and tag
111
132
  git push origin develop --follow-tags
112
133
  ```
113
134
 
114
- ### 7. Report Results
135
+ ### 8. Report Results
115
136
 
116
137
  ```markdown
117
138
  ✅ **Instant release complete!**
@@ -122,10 +143,11 @@ git push origin develop --follow-tags
122
143
 
123
144
  **What happened**:
124
145
  - ✅ Dirty changes auto-committed
146
+ - ✅ Pushed to GitHub (code safe!)
125
147
  - ✅ Version bumped to X.Y.Z
126
148
  - ✅ Package built
127
149
  - ✅ Published to npmjs.org
128
- - ✅ Pushed to GitHub
150
+ - ✅ Version tag pushed to GitHub
129
151
 
130
152
  **Verify**: `npm view specweave version --registry https://registry.npmjs.org`
131
153
  ```
@@ -133,11 +155,12 @@ git push origin develop --follow-tags
133
155
  ## Quick Mode Success Criteria
134
156
 
135
157
  ✅ Any dirty changes auto-committed
158
+ ✅ **Dirty commit pushed to remote FIRST**
136
159
  ✅ Version bumped in package.json
137
160
  ✅ Git commit and tag created
138
161
  ✅ Package rebuilt
139
162
  ✅ Published to npmjs.org (explicit registry!)
140
- Pushed to GitHub
163
+ Version commit + tag pushed to GitHub
141
164
 
142
165
  ---
143
166
 
@@ -408,6 +431,20 @@ git add -A
408
431
  git commit -m "[generated message]"
409
432
  ```
410
433
 
434
+ ### 1c. PUSH DIRTY COMMIT TO REMOTE FIRST! (CRITICAL!)
435
+
436
+ **BEFORE any release operations, sync git:**
437
+
438
+ ```bash
439
+ # Push dirty commit to remote FIRST - ensures code is safe before release
440
+ git push origin develop
441
+ ```
442
+
443
+ **Why this order?**
444
+ - ✅ Your changes are safely on GitHub BEFORE release starts
445
+ - ✅ If npm publish fails later, git is already synced
446
+ - ✅ No risk of "released but not pushed" state
447
+
411
448
  Then continue with version bump.
412
449
 
413
450
  ### 2. Bump Patch Version