specweave 0.30.12 → 0.30.14
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/marketplace.json +0 -11
- package/CLAUDE.md +1 -1
- package/bin/fix-marketplace-errors.sh +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +13 -0
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/helpers/ado-area-selector.d.ts.map +1 -1
- package/dist/src/cli/helpers/ado-area-selector.js +13 -0
- package/dist/src/cli/helpers/ado-area-selector.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.js +7 -2
- package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/sync-config-writer.d.ts +7 -0
- package/dist/src/cli/helpers/issue-tracker/sync-config-writer.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/sync-config-writer.js +33 -2
- package/dist/src/cli/helpers/issue-tracker/sync-config-writer.js.map +1 -1
- package/dist/src/cli/workers/clone-worker.js +19 -3
- package/dist/src/cli/workers/clone-worker.js.map +1 -1
- package/dist/src/core/living-docs/board-matcher.d.ts +120 -0
- package/dist/src/core/living-docs/board-matcher.d.ts.map +1 -0
- package/dist/src/core/living-docs/board-matcher.js +466 -0
- package/dist/src/core/living-docs/board-matcher.js.map +1 -0
- package/dist/src/core/living-docs/foundation-builder.js +1 -1
- package/dist/src/core/living-docs/foundation-builder.js.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.d.ts +19 -8
- package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js +148 -52
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/dist/src/core/living-docs/suggestions-generator.js +1 -1
- package/dist/src/core/living-docs/suggestions-generator.js.map +1 -1
- package/dist/src/core/living-docs/umbrella-detector.d.ts +4 -0
- package/dist/src/core/living-docs/umbrella-detector.d.ts.map +1 -1
- package/dist/src/core/living-docs/umbrella-detector.js +20 -1
- package/dist/src/core/living-docs/umbrella-detector.js.map +1 -1
- package/dist/src/core/living-docs/workitem-matcher.js +5 -5
- package/dist/src/core/living-docs/workitem-matcher.js.map +1 -1
- package/dist/src/importers/item-converter.d.ts +4 -0
- package/dist/src/importers/item-converter.d.ts.map +1 -1
- package/dist/src/importers/item-converter.js +4 -0
- package/dist/src/importers/item-converter.js.map +1 -1
- package/dist/src/init/repo/types.d.ts +1 -1
- package/dist/src/living-docs/enterprise-analyzer.d.ts.map +1 -1
- package/dist/src/living-docs/enterprise-analyzer.js +70 -19
- package/dist/src/living-docs/enterprise-analyzer.js.map +1 -1
- package/dist/src/living-docs/epic-id-allocator.d.ts +4 -0
- package/dist/src/living-docs/epic-id-allocator.d.ts.map +1 -1
- package/dist/src/living-docs/epic-id-allocator.js +4 -0
- package/dist/src/living-docs/epic-id-allocator.js.map +1 -1
- package/dist/src/living-docs/fs-id-allocator.d.ts +4 -0
- package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -1
- package/dist/src/living-docs/fs-id-allocator.js +4 -0
- package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
- package/dist/src/living-docs/smart-doc-organizer.d.ts +114 -0
- package/dist/src/living-docs/smart-doc-organizer.d.ts.map +1 -0
- package/dist/src/living-docs/smart-doc-organizer.js +535 -0
- package/dist/src/living-docs/smart-doc-organizer.js.map +1 -0
- package/package.json +13 -13
- package/plugins/PLUGINS-INDEX.md +2 -3
- package/plugins/specweave/commands/specweave-judge.md +265 -0
- package/plugins/specweave/commands/specweave-organize-docs.md +185 -0
- package/plugins/specweave/hooks/hooks.json +3 -3
- package/plugins/specweave/hooks/universal/hook-wrapper.cmd +26 -0
- package/plugins/specweave/hooks/universal/hook-wrapper.sh +67 -0
- package/plugins/specweave-ado/commands/{specweave-ado-close-workitem.md → close.md} +9 -5
- package/plugins/specweave-ado/commands/{specweave-ado-create-workitem.md → create.md} +9 -5
- package/plugins/specweave-ado/commands/pull.md +459 -0
- package/plugins/specweave-ado/commands/push.md +361 -0
- package/plugins/specweave-ado/commands/{specweave-ado-status.md → status.md} +12 -0
- package/plugins/specweave-ado/commands/{specweave-ado-sync.md → sync.md} +64 -3
- package/plugins/specweave-ado/hooks/README.md +1 -1
- package/plugins/specweave-docs/commands/build.md +158 -0
- package/plugins/specweave-docs/commands/{docs-generate.md → generate.md} +10 -5
- package/plugins/specweave-docs/commands/health.md +268 -0
- package/plugins/specweave-docs/commands/{docs-init.md → init.md} +11 -6
- package/plugins/specweave-docs/commands/organize.md +184 -0
- package/plugins/specweave-docs/commands/preview.md +138 -0
- package/plugins/specweave-docs/skills/preview/SKILL.md +105 -0
- package/plugins/specweave-github/agents/user-story-updater/AGENT.md +1 -1
- package/plugins/specweave-github/commands/{specweave-github-close-issue.md → close.md} +2 -2
- package/plugins/specweave-github/commands/{specweave-github-create-issue.md → create.md} +2 -2
- package/plugins/specweave-github/commands/pull.md +142 -0
- package/plugins/specweave-github/commands/push.md +154 -0
- package/plugins/specweave-github/commands/{specweave-github-sync.md → sync.md} +19 -5
- package/plugins/specweave-github/commands/{specweave-github-update-user-story.md → update-user-story.md} +1 -1
- package/plugins/specweave-github/hooks/README.md +1 -1
- package/plugins/specweave-jira/commands/pull.md +164 -0
- package/plugins/specweave-jira/commands/push.md +170 -0
- package/plugins/specweave-jira/commands/{specweave-jira-sync.md → sync.md} +18 -3
- package/plugins/specweave-jira/hooks/README.md +1 -1
- package/plugins/specweave-kafka/README.md +20 -0
- package/plugins/specweave-kafka/benchmarks/kafka-throughput.benchmark.ts +551 -0
- package/plugins/specweave-kafka/examples/README.md +191 -0
- package/plugins/specweave-kafka/examples/avro-schema-registry/.env.example +8 -0
- package/plugins/specweave-kafka/examples/avro-schema-registry/README.md +69 -0
- package/plugins/specweave-kafka/examples/avro-schema-registry/consumer.js +37 -0
- package/plugins/specweave-kafka/examples/avro-schema-registry/package.json +14 -0
- package/plugins/specweave-kafka/examples/avro-schema-registry/producer.js +57 -0
- package/plugins/specweave-kafka/examples/exactly-once-semantics/.env.example +5 -0
- package/plugins/specweave-kafka/examples/exactly-once-semantics/README.md +30 -0
- package/plugins/specweave-kafka/examples/exactly-once-semantics/eos-pipeline.js +79 -0
- package/plugins/specweave-kafka/examples/exactly-once-semantics/package.json +11 -0
- package/plugins/specweave-kafka/examples/kafka-streams-app/.env.example +4 -0
- package/plugins/specweave-kafka/examples/kafka-streams-app/README.md +30 -0
- package/plugins/specweave-kafka/examples/kafka-streams-app/package.json +11 -0
- package/plugins/specweave-kafka/examples/kafka-streams-app/windowed-aggregation.js +66 -0
- package/plugins/specweave-kafka/examples/n8n-workflow/README.md +54 -0
- package/plugins/specweave-kafka/examples/n8n-workflow/docker-compose.yml +19 -0
- package/plugins/specweave-kafka/examples/n8n-workflow/kafka-to-slack.json +50 -0
- package/plugins/specweave-kafka/examples/simple-producer-consumer/.env.example +15 -0
- package/plugins/specweave-kafka/examples/simple-producer-consumer/README.md +183 -0
- package/plugins/specweave-kafka/examples/simple-producer-consumer/consumer.js +60 -0
- package/plugins/specweave-kafka/examples/simple-producer-consumer/docker-compose.yml +30 -0
- package/plugins/specweave-kafka/examples/simple-producer-consumer/package.json +18 -0
- package/plugins/specweave-kafka/examples/simple-producer-consumer/producer.js +52 -0
- package/plugins/specweave-release/commands/specweave-release-npm.md +26 -239
- package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +0 -21
- package/plugins/specweave-docs-preview/commands/build.md +0 -489
- package/plugins/specweave-docs-preview/commands/preview.md +0 -355
- package/plugins/specweave-docs-preview/skills/docs-preview/SKILL.md +0 -386
- /package/plugins/specweave-ado/commands/{specweave-ado-clone-repos.md → clone.md} +0 -0
- /package/plugins/specweave-ado/commands/{specweave-ado-import-areas.md → import-areas.md} +0 -0
- /package/plugins/specweave-ado/commands/{specweave-ado-import-projects.md → import-projects.md} +0 -0
- /package/plugins/specweave-github/commands/{specweave-github-cleanup-duplicates.md → cleanup-duplicates.md} +0 -0
- /package/plugins/specweave-github/commands/{specweave-github-reconcile.md → reconcile.md} +0 -0
- /package/plugins/specweave-github/commands/{specweave-github-status.md → status.md} +0 -0
- /package/plugins/specweave-jira/commands/{specweave-jira-import-boards.md → import-boards.md} +0 -0
- /package/plugins/specweave-jira/commands/{specweave-jira-import-projects.md → import-projects-full.md} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: specweave-release:npm
|
|
3
|
-
description: Bump patch version,
|
|
3
|
+
description: Bump patch version, auto-commit dirty changes, push to GitHub, build, publish to npmjs.org. Use --ci for GitHub Actions publish. 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
|
|
@@ -11,10 +11,9 @@ You are the NPM Release Assistant. Your job is to automate the patch version rel
|
|
|
11
11
|
|
|
12
12
|
| Command | Flow | Use Case |
|
|
13
13
|
|---------|------|----------|
|
|
14
|
-
| `/specweave-release:npm` | Bump →
|
|
15
|
-
| `/specweave-release:npm --
|
|
14
|
+
| `/specweave-release:npm` | Auto-commit → **PUSH** → Bump → Build → **Publish** → Push tag | **DEFAULT: INSTANT RELEASE** |
|
|
15
|
+
| `/specweave-release:npm --ci` | Bump → Push → **CI publishes** | Let GitHub Actions handle npm publish |
|
|
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 → **PUSH** → Bump → Build → **Publish** → Push tag | Same as --quick |
|
|
18
17
|
| `/specweave-release:npm --only --local` | **Bump ONLY** → NO build, NO publish, NO git | FASTEST: Local testing only |
|
|
19
18
|
|
|
20
19
|
## Detecting Mode
|
|
@@ -22,32 +21,29 @@ You are the NPM Release Assistant. Your job is to automate the patch version rel
|
|
|
22
21
|
Check flags in the command invocation:
|
|
23
22
|
|
|
24
23
|
```
|
|
25
|
-
--
|
|
24
|
+
--ci → CI MODE: push to git, GitHub Actions publishes (requires clean working tree)
|
|
26
25
|
--only --local → Version bump ONLY (no build, no publish, no git) - FASTEST
|
|
27
|
-
--only --push → Same as --quick (legacy alias)
|
|
28
26
|
--only → Direct publish to npm (bypass CI), no git push
|
|
29
|
-
(no flags) →
|
|
27
|
+
(no flags) → DEFAULT: INSTANT RELEASE (auto-commit, push, build, publish, push tag)
|
|
30
28
|
```
|
|
31
29
|
|
|
32
30
|
**Flag Detection Order:**
|
|
33
|
-
1. Check for `--
|
|
31
|
+
1. Check for `--ci` flag → CI MODE (GitHub Actions publishes)
|
|
34
32
|
2. Check for `--only` flag
|
|
35
33
|
3. If `--only` present, check for `--local` flag → LOCAL MODE (fastest)
|
|
36
|
-
4. If `--only`
|
|
37
|
-
5.
|
|
38
|
-
6. No flags → DEFAULT MODE
|
|
34
|
+
4. If `--only` only → DIRECT MODE
|
|
35
|
+
5. No flags → **DEFAULT: INSTANT RELEASE** (auto-commit dirty, push, build, publish)
|
|
39
36
|
|
|
40
|
-
**If `--
|
|
37
|
+
**If `--ci`**: Use CI MODE (section "CI Mode Workflow")
|
|
41
38
|
**If `--only --local`**: Use LOCAL MODE (section "Local Mode Workflow") - FASTEST!
|
|
42
|
-
**If `--only --push`**: Use DIRECT MODE WITH PUSH (section "Direct Mode + Push Workflow")
|
|
43
39
|
**If `--only` only**: Use DIRECT MODE (section "Direct Mode Workflow")
|
|
44
|
-
**If no flags**: Use DEFAULT MODE (
|
|
40
|
+
**If no flags**: Use DEFAULT MODE = INSTANT RELEASE (section "Default Mode Workflow")
|
|
45
41
|
|
|
46
42
|
---
|
|
47
43
|
|
|
48
|
-
##
|
|
44
|
+
## DEFAULT MODE WORKFLOW (no flags) - INSTANT RELEASE
|
|
49
45
|
|
|
50
|
-
|
|
46
|
+
This is the **default** workflow when no flags are provided. Auto-commits any dirty changes, syncs git FIRST, then publishes to npmjs.org. One command does everything!
|
|
51
47
|
|
|
52
48
|
**Use case**: You made changes and want to release immediately. No manual steps needed.
|
|
53
49
|
|
|
@@ -152,7 +148,7 @@ git push origin develop --follow-tags
|
|
|
152
148
|
**Verify**: `npm view specweave version --registry https://registry.npmjs.org`
|
|
153
149
|
```
|
|
154
150
|
|
|
155
|
-
##
|
|
151
|
+
## Default Mode Success Criteria
|
|
156
152
|
|
|
157
153
|
✅ Any dirty changes auto-committed
|
|
158
154
|
✅ **Dirty commit pushed to remote FIRST**
|
|
@@ -164,9 +160,9 @@ git push origin develop --follow-tags
|
|
|
164
160
|
|
|
165
161
|
---
|
|
166
162
|
|
|
167
|
-
##
|
|
163
|
+
## CI MODE WORKFLOW (--ci flag)
|
|
168
164
|
|
|
169
|
-
|
|
165
|
+
Use this workflow when `--ci` flag is detected. Push to git and let GitHub Actions handle npm publish.
|
|
170
166
|
|
|
171
167
|
### 1. Pre-flight Checks
|
|
172
168
|
|
|
@@ -179,20 +175,12 @@ git status --porcelain
|
|
|
179
175
|
|
|
180
176
|
# Verify current version
|
|
181
177
|
node -p "require('./package.json').version"
|
|
182
|
-
|
|
183
|
-
# Calculate next version and check CHANGELOG
|
|
184
|
-
CURRENT=$(node -p "require('./package.json').version")
|
|
185
|
-
NEXT=$(node -p "const v='$CURRENT'.split('.'); v[2]=+v[2]+1; v.join('.')")
|
|
186
|
-
grep -q "## \[$NEXT\]" CHANGELOG.md && echo "CHANGELOG OK" || echo "CHANGELOG MISSING for $NEXT"
|
|
187
178
|
```
|
|
188
179
|
|
|
189
180
|
**STOP if**:
|
|
190
181
|
- Not on `develop` branch (ask user to switch)
|
|
191
182
|
- Uncommitted changes exist (ask user to commit first)
|
|
192
183
|
|
|
193
|
-
**WARN if**:
|
|
194
|
-
- CHANGELOG entry missing for next version (suggest adding before release, but CI will auto-generate if forgotten)
|
|
195
|
-
|
|
196
184
|
### 2. Bump Patch Version
|
|
197
185
|
|
|
198
186
|
```bash
|
|
@@ -200,11 +188,6 @@ grep -q "## \[$NEXT\]" CHANGELOG.md && echo "CHANGELOG OK" || echo "CHANGELOG MI
|
|
|
200
188
|
npm version patch -m "chore: bump version to %s"
|
|
201
189
|
```
|
|
202
190
|
|
|
203
|
-
**What this does**:
|
|
204
|
-
- Updates `package.json` and `package-lock.json`
|
|
205
|
-
- Creates git commit with message "chore: bump version to X.Y.Z"
|
|
206
|
-
- Creates git tag `vX.Y.Z`
|
|
207
|
-
|
|
208
191
|
### 3. Extract New Version
|
|
209
192
|
|
|
210
193
|
```bash
|
|
@@ -219,15 +202,8 @@ node -p "require('./package.json').version"
|
|
|
219
202
|
git push origin develop --follow-tags
|
|
220
203
|
```
|
|
221
204
|
|
|
222
|
-
**What happens next**:
|
|
223
|
-
- GitHub Actions workflow detects the tag
|
|
224
|
-
- Runs tests
|
|
225
|
-
- Publishes to npm
|
|
226
|
-
- Creates GitHub release
|
|
227
|
-
|
|
228
205
|
### 5. Report Results
|
|
229
206
|
|
|
230
|
-
Show the user:
|
|
231
207
|
```markdown
|
|
232
208
|
✅ Release initiated successfully!
|
|
233
209
|
|
|
@@ -239,34 +215,9 @@ Show the user:
|
|
|
239
215
|
1. Monitor GitHub Actions workflow (1-2 minutes)
|
|
240
216
|
2. Verify npm publish: https://www.npmjs.com/package/specweave
|
|
241
217
|
3. Check GitHub release notes
|
|
242
|
-
|
|
243
|
-
**Note**: GitHub Actions will automatically:
|
|
244
|
-
- Build and test the package
|
|
245
|
-
- Publish to npm
|
|
246
|
-
- Create GitHub release with CHANGELOG notes
|
|
247
218
|
```
|
|
248
219
|
|
|
249
|
-
##
|
|
250
|
-
|
|
251
|
-
**If `npm version` fails**:
|
|
252
|
-
- Check if version already exists
|
|
253
|
-
- Verify package.json is valid
|
|
254
|
-
- Ask user to manually fix and retry
|
|
255
|
-
|
|
256
|
-
**If `git push` fails**:
|
|
257
|
-
- Check network connection
|
|
258
|
-
- Verify git credentials
|
|
259
|
-
- Check branch protection rules
|
|
260
|
-
|
|
261
|
-
## Safety Rules
|
|
262
|
-
|
|
263
|
-
- ✅ ONLY bump patch version (never minor/major without confirmation)
|
|
264
|
-
- ✅ ALWAYS check for uncommitted changes first
|
|
265
|
-
- ✅ ALWAYS verify on develop branch
|
|
266
|
-
- ✅ NEVER force push
|
|
267
|
-
- ✅ NEVER skip pre-flight checks
|
|
268
|
-
|
|
269
|
-
## Success Criteria (Default Mode)
|
|
220
|
+
## CI Mode Success Criteria
|
|
270
221
|
|
|
271
222
|
✅ Version bumped in package.json
|
|
272
223
|
✅ Git commit created
|
|
@@ -367,9 +318,9 @@ Show the user:
|
|
|
367
318
|
## Direct Mode Safety Rules
|
|
368
319
|
|
|
369
320
|
- ✅ ALWAYS rebuild before publishing (`npm run rebuild`)
|
|
370
|
-
- ✅ Use `--only`
|
|
371
|
-
- ✅ Default mode (
|
|
372
|
-
- ✅ Direct mode gives
|
|
321
|
+
- ✅ Use `--only` when you want to publish but push git later
|
|
322
|
+
- ✅ Default mode (no flags) is preferred - auto-commits, publishes, and pushes
|
|
323
|
+
- ✅ Direct mode gives control over git push timing
|
|
373
324
|
- ⚠️ Remember to push git changes later to sync GitHub
|
|
374
325
|
|
|
375
326
|
## Success Criteria (Direct Mode)
|
|
@@ -383,191 +334,27 @@ Show the user:
|
|
|
383
334
|
|
|
384
335
|
---
|
|
385
336
|
|
|
386
|
-
## DIRECT MODE + PUSH WORKFLOW (--only --push flags)
|
|
387
|
-
|
|
388
|
-
Use this workflow when BOTH `--only` AND `--push` flags are detected. This is the **complete local release** - publishes to npm directly AND pushes to git.
|
|
389
|
-
|
|
390
|
-
**Use case**: You want full control - publish immediately, then sync git. No CI involvement in npm publish.
|
|
391
|
-
|
|
392
|
-
### 1. Pre-flight Checks
|
|
393
|
-
|
|
394
|
-
```bash
|
|
395
|
-
# Verify we're on develop branch
|
|
396
|
-
git rev-parse --abbrev-ref HEAD
|
|
397
|
-
|
|
398
|
-
# Check for uncommitted changes
|
|
399
|
-
git status --porcelain
|
|
400
|
-
|
|
401
|
-
# Verify current version
|
|
402
|
-
node -p "require('./package.json').version"
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
**STOP if**:
|
|
406
|
-
- Not on `develop` branch (ask user to switch)
|
|
407
|
-
|
|
408
|
-
**If uncommitted changes exist → AUTO-COMMIT FIRST (Step 1b)**
|
|
409
|
-
|
|
410
|
-
### 1b. Auto-Commit Uncommitted Changes (if any)
|
|
411
|
-
|
|
412
|
-
When `--only --push` is used, uncommitted changes should be committed automatically before version bump.
|
|
413
|
-
|
|
414
|
-
**Algorithm to generate commit message:**
|
|
415
|
-
|
|
416
|
-
1. Run `git status --porcelain` and categorize files:
|
|
417
|
-
- `src/**` → code changes
|
|
418
|
-
- `*.md`, `docs/` → documentation
|
|
419
|
-
- `.specweave/docs/internal/**` → internal docs
|
|
420
|
-
- `plugins/**` → plugin changes
|
|
421
|
-
- `tests/**`, `*.test.ts` → test changes
|
|
422
|
-
- `package*.json`, `*.config.*` → config/deps
|
|
423
|
-
|
|
424
|
-
2. Determine primary category (most files) and action (add/update/remove):
|
|
425
|
-
- New files (`??`, `A`) → "add"
|
|
426
|
-
- Modified (`M`) → "update"
|
|
427
|
-
- Deleted (`D`) → "remove"
|
|
428
|
-
|
|
429
|
-
3. Generate concise message: `type: action description`
|
|
430
|
-
|
|
431
|
-
**Examples:**
|
|
432
|
-
- Many ADR renames + docs moves → `chore: reorganize internal docs structure`
|
|
433
|
-
- Plugin command updates → `feat(release): add --push flag to npm release`
|
|
434
|
-
- Mixed code + docs → `chore: update code and documentation`
|
|
435
|
-
|
|
436
|
-
**Execute auto-commit:**
|
|
437
|
-
```bash
|
|
438
|
-
git add -A
|
|
439
|
-
git commit -m "[generated message]"
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
### 1c. PUSH DIRTY COMMIT TO REMOTE FIRST! (CRITICAL!)
|
|
443
|
-
|
|
444
|
-
**BEFORE any release operations, sync git:**
|
|
445
|
-
|
|
446
|
-
```bash
|
|
447
|
-
# Push dirty commit to remote FIRST - ensures code is safe before release
|
|
448
|
-
git push origin develop
|
|
449
|
-
```
|
|
450
|
-
|
|
451
|
-
**Why this order?**
|
|
452
|
-
- ✅ Your changes are safely on GitHub BEFORE release starts
|
|
453
|
-
- ✅ If npm publish fails later, git is already synced
|
|
454
|
-
- ✅ No risk of "released but not pushed" state
|
|
455
|
-
|
|
456
|
-
Then continue with version bump.
|
|
457
|
-
|
|
458
|
-
### 2. Bump Patch Version
|
|
459
|
-
|
|
460
|
-
```bash
|
|
461
|
-
# This creates commit + tag automatically
|
|
462
|
-
npm version patch -m "chore: bump version to %s"
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
### 3. Extract New Version
|
|
466
|
-
|
|
467
|
-
```bash
|
|
468
|
-
# Get the new version
|
|
469
|
-
node -p "require('./package.json').version"
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
### 4. Build Package
|
|
473
|
-
|
|
474
|
-
```bash
|
|
475
|
-
# Build the package before publishing
|
|
476
|
-
npm run rebuild
|
|
477
|
-
```
|
|
478
|
-
|
|
479
|
-
**Critical**: Must rebuild to ensure dist/ is up-to-date before publishing.
|
|
480
|
-
|
|
481
|
-
### 5. Publish to NPM Directly
|
|
482
|
-
|
|
483
|
-
```bash
|
|
484
|
-
# Publish directly to npmjs.org (bypasses GitHub Actions)
|
|
485
|
-
# CRITICAL: Always specify registry to avoid ~/.npmrc redirecting to private feeds!
|
|
486
|
-
npm publish --registry https://registry.npmjs.org
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
### 6. Push to Git (NEW!)
|
|
490
|
-
|
|
491
|
-
```bash
|
|
492
|
-
# Push commit and tag to sync with remote
|
|
493
|
-
git push origin develop --follow-tags
|
|
494
|
-
```
|
|
495
|
-
|
|
496
|
-
**What this does**:
|
|
497
|
-
- Syncs your version bump commit to GitHub
|
|
498
|
-
- Pushes the version tag (vX.Y.Z)
|
|
499
|
-
- Does NOT trigger CI npm publish (already published!)
|
|
500
|
-
|
|
501
|
-
### 7. Report Results (Direct Mode + Push)
|
|
502
|
-
|
|
503
|
-
Show the user:
|
|
504
|
-
```markdown
|
|
505
|
-
✅ **Complete local release!**
|
|
506
|
-
|
|
507
|
-
📦 **Version**: vX.Y.Z
|
|
508
|
-
🔗 **NPM**: https://www.npmjs.com/package/specweave
|
|
509
|
-
🏷️ **Git Tag**: https://github.com/anton-abyzov/specweave/releases/tag/vX.Y.Z
|
|
510
|
-
|
|
511
|
-
**What happened**:
|
|
512
|
-
- ✅ Version bumped and committed
|
|
513
|
-
- ✅ Git tag created
|
|
514
|
-
- ✅ Package built (npm run rebuild)
|
|
515
|
-
- ✅ Published to npm directly
|
|
516
|
-
- ✅ Pushed to GitHub (commit + tag)
|
|
517
|
-
|
|
518
|
-
**Verify**:
|
|
519
|
-
- NPM: https://www.npmjs.com/package/specweave
|
|
520
|
-
- Version: `npm view specweave version`
|
|
521
|
-
- GitHub: Check releases page
|
|
522
|
-
|
|
523
|
-
**Note**: This was a direct publish. GitHub Actions will NOT republish
|
|
524
|
-
(the tag already exists, CI skips existing versions).
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
## Direct Mode + Push Safety Rules
|
|
528
|
-
|
|
529
|
-
- ✅ ALWAYS rebuild before publishing
|
|
530
|
-
- ✅ Publishes FIRST, then pushes (ensures npm has the version)
|
|
531
|
-
- ✅ If push fails, npm already has the release (safe state)
|
|
532
|
-
- ✅ CI will skip publishing for this version (tag already exists)
|
|
533
|
-
- ⚠️ Use when you need immediate npm availability + git sync
|
|
534
|
-
|
|
535
|
-
## Success Criteria (Direct Mode + Push)
|
|
536
|
-
|
|
537
|
-
✅ Version bumped in package.json
|
|
538
|
-
✅ Git commit created
|
|
539
|
-
✅ Git tag created
|
|
540
|
-
✅ Package rebuilt
|
|
541
|
-
✅ Published to npm directly
|
|
542
|
-
✅ Pushed to GitHub (commit + tag synced)
|
|
543
|
-
|
|
544
|
-
---
|
|
545
|
-
|
|
546
337
|
## Quick Reference
|
|
547
338
|
|
|
548
339
|
```bash
|
|
549
|
-
#
|
|
550
|
-
/specweave-release:npm --quick
|
|
551
|
-
|
|
552
|
-
# Standard release (CI handles npm publish)
|
|
340
|
+
# DEFAULT: Instant release (auto-commits dirty, publishes, pushes)
|
|
553
341
|
/specweave-release:npm
|
|
554
342
|
|
|
343
|
+
# CI release (GitHub Actions handles npm publish) - requires clean tree
|
|
344
|
+
/specweave-release:npm --ci
|
|
345
|
+
|
|
555
346
|
# Quick local publish, sync git later
|
|
556
347
|
/specweave-release:npm --only
|
|
557
348
|
|
|
558
|
-
# Complete local release (publish + push) - same as --quick
|
|
559
|
-
/specweave-release:npm --only --push
|
|
560
|
-
|
|
561
349
|
# FASTEST: Version bump only (no publish, no git, no build)
|
|
562
350
|
/specweave-release:npm --only --local
|
|
563
351
|
```
|
|
564
352
|
|
|
565
353
|
| Scenario | Command | Auto-Commit Dirty? | NPM Published By | Git Pushed |
|
|
566
354
|
|----------|---------|-------------------|------------------|------------|
|
|
567
|
-
| **INSTANT RELEASE** |
|
|
568
|
-
|
|
|
355
|
+
| **INSTANT RELEASE** | (no flags) | ✅ Yes | You (npmjs.org) | ✅ Yes |
|
|
356
|
+
| CI release | `--ci` | ❌ STOP | GitHub Actions | ✅ Yes |
|
|
569
357
|
| Quick local, push later | `--only` | ❌ STOP | You (npmjs.org) | ❌ No |
|
|
570
|
-
| Complete local release | `--only --push` | ✅ Yes | You (npmjs.org) | ✅ Yes |
|
|
571
358
|
| **FASTEST local test** | `--only --local` | N/A | ❌ None | ❌ No |
|
|
572
359
|
|
|
573
360
|
---
|
|
@@ -628,7 +415,7 @@ Show the user:
|
|
|
628
415
|
5. Publish: `npm publish --registry https://registry.npmjs.org`
|
|
629
416
|
6. Push: `git push origin develop --follow-tags`
|
|
630
417
|
|
|
631
|
-
**Or use**: `/specweave-release:npm
|
|
418
|
+
**Or use**: `/specweave-release:npm` (no flags) for full instant release
|
|
632
419
|
```
|
|
633
420
|
|
|
634
421
|
## Local Mode Safety Rules
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "specweave-docs-preview",
|
|
3
|
-
"description": "Interactive documentation preview with Docusaurus. Launch local dev server to view living documentation in beautiful UI with hot reload, auto-generated sidebar, and Mermaid diagrams. Build static sites for deployment.",
|
|
4
|
-
"version": "0.24.0",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "SpecWeave Team",
|
|
7
|
-
"url": "https://spec-weave.com"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://spec-weave.com",
|
|
10
|
-
"repository": "https://github.com/anton-abyzov/specweave",
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"keywords": [
|
|
13
|
-
"docusaurus",
|
|
14
|
-
"documentation",
|
|
15
|
-
"preview",
|
|
16
|
-
"docs-server",
|
|
17
|
-
"hot-reload",
|
|
18
|
-
"static-site",
|
|
19
|
-
"specweave"
|
|
20
|
-
]
|
|
21
|
-
}
|