specweave 0.28.22 → 0.28.25

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 (55) hide show
  1. package/dist/src/cli/helpers/init/initial-increment-generator.d.ts.map +1 -1
  2. package/dist/src/cli/helpers/init/initial-increment-generator.js +123 -35
  3. package/dist/src/cli/helpers/init/initial-increment-generator.js.map +1 -1
  4. package/dist/src/cli/helpers/init/next-steps.d.ts.map +1 -1
  5. package/dist/src/cli/helpers/init/next-steps.js +16 -47
  6. package/dist/src/cli/helpers/init/next-steps.js.map +1 -1
  7. package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -1
  8. package/dist/src/core/sync/bidirectional-engine.js +3 -1
  9. package/dist/src/core/sync/bidirectional-engine.js.map +1 -1
  10. package/dist/src/importers/import-coordinator.d.ts.map +1 -1
  11. package/dist/src/importers/import-coordinator.js +17 -0
  12. package/dist/src/importers/import-coordinator.js.map +1 -1
  13. package/dist/src/init/repo/types.d.ts +1 -1
  14. package/dist/src/utils/multi-project-detector.d.ts +92 -0
  15. package/dist/src/utils/multi-project-detector.d.ts.map +1 -0
  16. package/dist/src/utils/multi-project-detector.js +369 -0
  17. package/dist/src/utils/multi-project-detector.js.map +1 -0
  18. package/package.json +1 -1
  19. package/plugins/specweave/agents/pm/AGENT.md +33 -12
  20. package/plugins/specweave/commands/specweave-import-external.md +1 -1
  21. package/plugins/specweave/commands/specweave.md +1 -1
  22. package/plugins/specweave/skills/increment-planner/SKILL.md +6 -13
  23. package/plugins/specweave/skills/spec-generator/SKILL.md +6 -11
  24. package/plugins/specweave-ado/commands/specweave-ado-sync.md +12 -12
  25. package/plugins/specweave-ado/lib/ado-multi-project-sync.js +0 -1
  26. package/plugins/specweave-github/agents/github-manager/AGENT.md +5 -5
  27. package/plugins/specweave-github/commands/specweave-github-sync.md +12 -12
  28. package/plugins/specweave-github/commands/specweave-github-update-user-story.md +1 -1
  29. package/plugins/specweave-github/skills/github-sync/SKILL.md +4 -4
  30. package/plugins/specweave-jira/commands/specweave-jira-sync.md +11 -11
  31. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +3 -3
  32. package/plugins/specweave-jira/skills/specweave-jira-mapper/SKILL.md +2 -2
  33. package/plugins/specweave-release/commands/specweave-release-npm.md +94 -4
  34. package/plugins/specweave/hooks/docs-changed.sh.backup +0 -79
  35. package/plugins/specweave/hooks/human-input-required.sh.backup +0 -75
  36. package/plugins/specweave/hooks/post-first-increment.sh.backup +0 -61
  37. package/plugins/specweave/hooks/post-increment-change.sh.backup +0 -98
  38. package/plugins/specweave/hooks/post-increment-completion.sh.backup +0 -231
  39. package/plugins/specweave/hooks/post-increment-planning.sh.backup +0 -1048
  40. package/plugins/specweave/hooks/post-increment-status-change.sh.backup +0 -147
  41. package/plugins/specweave/hooks/post-spec-update.sh.backup +0 -158
  42. package/plugins/specweave/hooks/post-user-story-complete.sh.backup +0 -179
  43. package/plugins/specweave/hooks/pre-command-deduplication.sh.backup +0 -83
  44. package/plugins/specweave/hooks/pre-implementation.sh.backup +0 -67
  45. package/plugins/specweave/hooks/pre-task-completion.sh.backup +0 -194
  46. package/plugins/specweave/hooks/pre-tool-use.sh.backup +0 -133
  47. package/plugins/specweave/hooks/user-prompt-submit.sh.backup +0 -386
  48. package/plugins/specweave-ado/hooks/post-living-docs-update.sh.backup +0 -353
  49. package/plugins/specweave-ado/hooks/post-task-completion.sh.backup +0 -172
  50. package/plugins/specweave-ado/lib/enhanced-ado-sync.js +0 -170
  51. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +0 -1238
  52. package/plugins/specweave-github/hooks/post-task-completion.sh.backup +0 -258
  53. package/plugins/specweave-jira/hooks/post-task-completion.sh.backup +0 -172
  54. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +0 -1218
  55. package/plugins/specweave-release/hooks/post-task-completion.sh.backup +0 -110
@@ -1,29 +1,29 @@
1
1
  ---
2
2
  name: specweave-ado:sync
3
- description: Bidirectional sync between SpecWeave increment and Azure DevOps work item (two-way sync by default)
3
+ description: Two-way sync between SpecWeave increment and Azure DevOps work item (push & pull by default)
4
4
  ---
5
5
 
6
6
  # Sync ADO Work Item Command
7
7
 
8
8
  **Usage**: `/specweave-ado:sync <increment-id> [options]`
9
9
 
10
- **Purpose**: Bidirectional synchronization between SpecWeave increment and Azure DevOps work item
10
+ **Purpose**: Two-way synchronization between SpecWeave increment and Azure DevOps work item
11
11
 
12
- **Default**: Two-way sync (bidirectional)
12
+ **Default**: Two-way sync (push & pull)
13
13
 
14
14
  ---
15
15
 
16
16
  ## Options
17
17
 
18
- - `--direction <mode>`: Sync direction (default: `bidirectional`)
19
- - `bidirectional`: SpecWeave ↔ ADO (default - recommended)
18
+ - `--direction <mode>`: Sync direction (default: `two-way`)
19
+ - `two-way`: SpecWeave ↔ ADO (default - recommended)
20
20
  - `to-ado`: SpecWeave → ADO only (push progress)
21
21
  - `from-ado`: ADO → SpecWeave only (pull updates)
22
22
 
23
23
  ## Examples
24
24
 
25
25
  ```bash
26
- # Bidirectional sync (default - two-way)
26
+ # Two-way sync (default - both directions)
27
27
  /specweave-ado:sync 0005
28
28
 
29
29
  # Push only (one-way to ADO)
@@ -37,7 +37,7 @@ description: Bidirectional sync between SpecWeave increment and Azure DevOps wor
37
37
 
38
38
  ## Command Behavior
39
39
 
40
- When user runs this command, invoke `ado-manager` agent to perform bidirectional sync:
40
+ When user runs this command, invoke `ado-manager` agent to perform two-way sync:
41
41
 
42
42
  ### Phase 1: Pull FROM ADO (default behavior)
43
43
  1. Fetch work item state from ADO API
@@ -66,7 +66,7 @@ When user runs this command, invoke `ado-manager` agent to perform bidirectional
66
66
  ```
67
67
  Use Task tool with subagent_type: "specweave-ado:ado-manager:ado-manager"
68
68
 
69
- Prompt: "Bidirectional sync for increment 0005-payment-integration with ADO.
69
+ Prompt: "Two-way sync for increment 0005-payment-integration with ADO.
70
70
 
71
71
  Phase 1 - Pull FROM ADO:
72
72
  1. Fetch work item #12345 from ADO API
@@ -83,20 +83,20 @@ Phase 2 - Push TO ADO:
83
83
  6. POST comment to ADO API
84
84
  7. Update work item state/fields
85
85
 
86
- Display: Bidirectional sync summary"
86
+ Display: Two-way sync summary"
87
87
  ```
88
88
 
89
89
  ---
90
90
 
91
91
  ## Example Output
92
92
 
93
- ### Bidirectional Sync (Default)
93
+ ### Two-way Sync (Default)
94
94
 
95
95
  ```
96
- 🔄 Bidirectional sync for increment 0005...
96
+ 🔄 Two-way sync for increment 0005...
97
97
 
98
98
  ✓ Azure DevOps work item: #12345
99
- ✓ Sync direction: bidirectional (two-way)
99
+ ✓ Sync direction: Two-way (push & pull)
100
100
 
101
101
  Detecting changes (both directions)...
102
102
 
@@ -373,7 +373,6 @@ ${userStory.technicalContext}
373
373
  return mapping.task || "Task";
374
374
  case "Subtask":
375
375
  return mapping.task || "Task";
376
- // ADO doesn't have subtasks, use Task
377
376
  default:
378
377
  return "User Story";
379
378
  }
@@ -38,7 +38,7 @@ GitHub issues MUST use living docs format:
38
38
 
39
39
  **Tools**: Read, Write, Edit, Bash (GitHub CLI)
40
40
 
41
- **Default Behavior**: **Bidirectional sync** (two-way) - Synchronizes changes in both directions automatically
41
+ **Default Behavior**: **Two-way sync** (push & pull) - Synchronizes changes in both directions automatically
42
42
 
43
43
  ---
44
44
 
@@ -69,8 +69,8 @@ Task({
69
69
 
70
70
  As the GitHub Manager agent, I specialize in:
71
71
 
72
- ### 1. Bidirectional Synchronization (Default)
73
- - **Two-Way Sync**: Keep SpecWeave and GitHub synchronized automatically
72
+ ### 1. Two-way Synchronization (Default)
73
+ - **Two-way Sync**: Keep SpecWeave and GitHub synchronized automatically
74
74
  - **FROM GitHub**: Pull status changes, labels, comments, state updates
75
75
  - **TO GitHub**: Push task completion, progress updates, metadata
76
76
  - **Conflict Resolution**: Detect and resolve conflicts between systems
@@ -79,7 +79,7 @@ As the GitHub Manager agent, I specialize in:
79
79
 
80
80
  ### 2. Issue Management
81
81
  - **Create Issues**: Generate well-formatted GitHub issues from increment specs
82
- - **Update Issues**: Sync progress, add comments, update labels (bidirectional)
82
+ - **Update Issues**: Sync progress, add comments, update labels (two-way)
83
83
  - **Close Issues**: Close issues with completion summaries
84
84
  - **Link Issues**: Connect related issues, PRs, and increments
85
85
  - **Bulk Operations**: Batch create/update/close issues
@@ -87,7 +87,7 @@ As the GitHub Manager agent, I specialize in:
87
87
  ### 3. Progress Tracking
88
88
  - **Task Checklists**: Generate and update task checklists in issues
89
89
  - **Progress Comments**: Post detailed task completion comments
90
- - **Status Updates**: Bidirectional sync of increment status ↔ GitHub issue state
90
+ - **Status Updates**: Two-way sync of increment status ↔ GitHub issue state
91
91
  - **Time Tracking**: Track estimated vs actual time per task
92
92
  - **Milestone Progress**: Update milestone completion percentages
93
93
 
@@ -83,7 +83,7 @@ Synchronize the current state of a SpecWeave increment with its GitHub issue acr
83
83
  - `--comment`: Post progress comment (default)
84
84
  - `--labels`: Update issue labels based on status
85
85
  - `--force`: Force sync even if up-to-date
86
- - `--direction`: Sync direction (`to-github`, `from-github`, `bidirectional` - **default: bidirectional**)
86
+ - `--direction`: Sync direction (`to-github`, `from-github`, `two-way` - **default: two-way**)
87
87
  - `--all`: Sync all active increments
88
88
 
89
89
  ### Safety Options
@@ -92,17 +92,17 @@ Synchronize the current state of a SpecWeave increment with its GitHub issue acr
92
92
 
93
93
  ## Sync Direction
94
94
 
95
- **Default: Bidirectional** (two-way sync)
95
+ **Default: Two-way** (both directions)
96
96
 
97
97
  SpecWeave syncs changes in **both directions** by default:
98
98
 
99
99
  | Direction | What It Does | Use When |
100
100
  |-----------|-------------|----------|
101
- | **`bidirectional`** (default) | SpecWeave ↔ GitHub<br>• Pull changes FROM GitHub (status, labels, comments)<br>• Push changes TO GitHub (tasks, progress, metadata) | **Always** (recommended for keeping both systems in sync) |
101
+ | **`two-way`** (default) | SpecWeave ↔ GitHub<br>• Pull changes FROM GitHub (status, labels, comments)<br>• Push changes TO GitHub (tasks, progress, metadata) | **Always** (recommended for keeping both systems in sync) |
102
102
  | `to-github` | SpecWeave → GitHub only<br>• Push increment progress to GitHub<br>• Don't pull GitHub changes back | Read-only GitHub usage, or when GitHub is downstream |
103
103
  | `from-github` | GitHub → SpecWeave only<br>• Pull GitHub issue updates<br>• Don't push SpecWeave changes | Importing GitHub issues, or when SpecWeave is downstream |
104
104
 
105
- **Why Bidirectional?**
105
+ **Why Two-way?**
106
106
  - ✅ Keep both systems synchronized automatically
107
107
  - ✅ GitHub status changes update SpecWeave (closed issue → completed increment)
108
108
  - ✅ SpecWeave task completion updates GitHub (task done → checklist updated)
@@ -121,16 +121,16 @@ SpecWeave syncs changes in **both directions** by default:
121
121
  ## Examples
122
122
 
123
123
  ```bash
124
- # Interactive bidirectional sync (default - two-way)
124
+ # Interactive two-way sync (default - both directions)
125
125
  /specweave-github:sync 0004
126
126
 
127
- # Use specific profile (still bidirectional by default)
127
+ # Use specific profile (still two-way by default)
128
128
  /specweave-github:sync 0004 --profile specweave-dev
129
129
 
130
- # Specify time range (bidirectional)
130
+ # Specify time range (two-way)
131
131
  /specweave-github:sync 0004 --time-range 1M
132
132
 
133
- # Full bidirectional sync with all options
133
+ # Full two-way sync with all options
134
134
  /specweave-github:sync 0004 --profile main --time-range 1M --tasks --labels
135
135
 
136
136
  # One-way sync examples (override default)
@@ -140,7 +140,7 @@ SpecWeave syncs changes in **both directions** by default:
140
140
  # Dry run to preview changes
141
141
  /specweave-github:sync 0004 --dry-run
142
142
 
143
- # Force sync all increments (bidirectional)
143
+ # Force sync all increments (two-way)
144
144
  /specweave-github:sync --all --force
145
145
  ```
146
146
 
@@ -240,12 +240,12 @@ Continue with sync? [Y/n]:
240
240
  If confirmed, sync proceeds with progress updates:
241
241
 
242
242
  ```
243
- 🔄 Bidirectional sync for increment 0004...
243
+ 🔄 Two-way sync for increment 0004...
244
244
 
245
245
  ✓ Profile loaded: specweave-dev
246
246
  ✓ GitHub repository: anton-abyzov/specweave
247
247
  ✓ Rate limit check: PASSED (4,850/5,000 remaining)
248
- ✓ Sync direction: bidirectional (two-way)
248
+ ✓ Sync direction: Two-way (push & pull)
249
249
 
250
250
  Fetching increment state...
251
251
  ✓ Increment loaded: 0004-plugin-architecture
@@ -277,7 +277,7 @@ Syncing FROM GitHub...
277
277
 
278
278
  Rate limit after sync: 4,570/5,000 (91% available)
279
279
 
280
- Bidirectional Sync Complete!
280
+ Two-way Sync Complete!
281
281
 
282
282
  SpecWeave ↔ GitHub synchronized
283
283
  • Pushed: 3 task updates, progress comment
@@ -111,7 +111,7 @@ Progress: 3/6 tasks complete (50%)
111
111
  **Related Commands**:
112
112
  - `/specweave-github:sync-epic FS-031` - Sync entire epic (all user stories)
113
113
  - `/specweave-github:create-issue 0031` - Create issue for increment
114
- - `/specweave-github:sync 0031` - Bidirectional sync for increment
114
+ - `/specweave-github:sync 0031` - Two-way sync for increment
115
115
 
116
116
  ---
117
117
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: github-sync
3
- description: Bidirectional synchronization between SpecWeave specs and GitHub Projects (two-way sync by default). Activates ONLY when user asks questions about GitHub integration or needs help configuring GitHub sync. Does NOT activate for slash commands. For syncing, use /specweave-github:sync-spec command instead.
3
+ description: Two-way synchronization between SpecWeave specs and GitHub Projects (push & pull by default). Activates ONLY when user asks questions about GitHub integration or needs help configuring GitHub sync. Does NOT activate for slash commands. For syncing, use /specweave-github:sync-spec command instead.
4
4
  ---
5
5
 
6
- # GitHub Sync - Bidirectional Spec ↔ Project Synchronization
6
+ # GitHub Sync - Two-way Spec ↔ Project Synchronization
7
7
 
8
8
  **Purpose**: Seamlessly synchronize SpecWeave specs with GitHub Projects for team visibility and project management.
9
9
 
10
- **Default Behavior**: **Bidirectional (two-way) sync** - Changes in either system are automatically synchronized
10
+ **Default Behavior**: **Two-way sync** (push & pull) - Changes in either system are automatically synchronized
11
11
 
12
12
  **⚠️ IMPORTANT**: This skill provides HELP and GUIDANCE about GitHub sync. For actual syncing, users should use the `/specweave-github:sync-spec` command directly. This skill should NOT auto-activate when the command is being invoked.
13
13
 
@@ -203,7 +203,7 @@ Configure GitHub sync in `.specweave/config.json`:
203
203
  "specweave-github": {
204
204
  "repo": "owner/repo",
205
205
  "autoSyncSpecs": true,
206
- "syncDirection": "bidirectional",
206
+ "syncDirection": "two-way",
207
207
  "defaultLabels": ["specweave", "spec"],
208
208
  "syncFrequency": "on-change"
209
209
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: specweave-jira:sync
3
- description: Sync SpecWeave increments with JIRA epics/stories. Supports import, export, bidirectional sync, and granular item operations
3
+ description: Sync SpecWeave increments with JIRA epics/stories. Supports import, export, two-way sync, and granular item operations
4
4
  ---
5
5
 
6
6
  # Sync Jira Command
@@ -11,10 +11,10 @@ You are a Jira synchronization expert. Help the user sync between Jira and SpecW
11
11
 
12
12
  ### Epic-Level Operations
13
13
 
14
- **1. Bidirectional Sync (Default - Recommended)**
14
+ **1. Two-way Sync (Default - Recommended)**
15
15
  ```
16
16
  /specweave-jira:sync 0003 # Two-way sync (default)
17
- /specweave-jira:sync 0003 --direction bidirectional # Explicit
17
+ /specweave-jira:sync 0003 --direction two-way # Explicit
18
18
  ```
19
19
 
20
20
  **2. Import Jira Epic as SpecWeave Increment**
@@ -31,9 +31,9 @@ You are a Jira synchronization expert. Help the user sync between Jira and SpecW
31
31
 
32
32
  ### Sync Direction Options
33
33
 
34
- **Default: `bidirectional`** (two-way sync - recommended)
34
+ **Default: `two-way`** (both directions - recommended)
35
35
 
36
- - `--direction bidirectional`: SpecWeave ↔ Jira (default)
36
+ - `--direction two-way`: SpecWeave ↔ Jira (default)
37
37
  - Pull changes FROM Jira (status, priority, comments)
38
38
  - Push changes TO Jira (tasks, progress, metadata)
39
39
 
@@ -175,7 +175,7 @@ When the user runs this command:
175
175
  | Task | SCRUM-7 | Setup provider |
176
176
  ```
177
177
 
178
- ### Example 5: Bidirectional Sync (Default)
178
+ ### Example 5: Two-way Sync (Default)
179
179
  **User**: `/specweave-jira:sync 0003`
180
180
  **You**:
181
181
  - Read increment 0003
@@ -186,9 +186,9 @@ When the user runs this command:
186
186
  - FROM Jira: Status changes, priority updates, comments
187
187
  - FROM SpecWeave: Task completion, progress updates
188
188
 
189
- **Show bidirectional sync summary**:
189
+ **Show two-way sync summary**:
190
190
  ```
191
- Bidirectional Sync Complete: 0003 ↔ Jira
191
+ Two-way Sync Complete: 0003 ↔ Jira
192
192
 
193
193
  FROM Jira:
194
194
  • SCRUM-1: Status changed to In Progress
@@ -204,7 +204,7 @@ Conflicts: None
204
204
  **Handle conflicts if any**:
205
205
  - Show both versions (Jira vs SpecWeave)
206
206
  - Ask user which to keep or how to merge
207
- - Apply resolution bidirectionally
207
+ - Apply resolution in both directions
208
208
 
209
209
  ### Example 6: Status Overview
210
210
  **User**: `/specweave-jira:sync status`
@@ -229,12 +229,12 @@ Conflicts: None
229
229
 
230
230
  ## Related Commands
231
231
 
232
- - `/specweave-github:sync` - Sync to GitHub issues (also bidirectional by default)
232
+ - `/specweave-github:sync` - Sync to GitHub issues (also two-way by default)
233
233
  - `/specweave:increment` - Create new increment
234
234
  - `/specweave:validate` - Validate increment quality
235
235
 
236
236
  ---
237
237
 
238
- **Bidirectional by Default**: All sync operations are two-way unless you explicitly specify `--direction to-jira` or `--direction from-jira`. This keeps both systems synchronized automatically.
238
+ **Two-way by Default**: All sync operations are two-way unless you explicitly specify `--direction to-jira` or `--direction from-jira`. This keeps both systems synchronized automatically.
239
239
 
240
240
  **Granular Control**: Unlike simple epic import/export, this command supports cherry-picking individual stories, bugs, and tasks for maximum flexibility.
@@ -1,6 +1,6 @@
1
- import { EnhancedContentBuilder } from "../../../dist/src/core/sync/enhanced-content-builder.js";
2
- import { SpecIncrementMapper } from "../../../dist/src/core/sync/spec-increment-mapper.js";
3
- import { parseSpecContent } from "../../../dist/src/core/spec-content-sync.js";
1
+ import { EnhancedContentBuilder } from "../../../src/core/sync/enhanced-content-builder.js";
2
+ import { SpecIncrementMapper } from "../../../src/core/sync/spec-increment-mapper.js";
3
+ import { parseSpecContent } from "../../../src/core/spec-content-sync.js";
4
4
  import * as path from "path";
5
5
  import * as fs from "fs/promises";
6
6
  async function syncSpecToJiraWithEnhancedContent(options) {
@@ -328,7 +328,7 @@ JIRA Epic: PROJ-123
328
328
  ```yaml
329
329
  jira:
330
330
  last_sync: "2025-10-26T16:30:00Z"
331
- sync_direction: "bidirectional"
331
+ sync_direction: "two-way"
332
332
  conflicts_resolved: 2
333
333
  ```
334
334
 
@@ -336,7 +336,7 @@ JIRA Epic: PROJ-123
336
336
  ```
337
337
  ✅ Synced with JIRA!
338
338
 
339
- Direction: Bidirectional
339
+ Direction: Two-way
340
340
  Changes Applied:
341
341
  - SpecWeave → JIRA: 3 updates
342
342
  - JIRA → SpecWeave: 5 updates
@@ -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. Automates the complete release workflow with pre-flight checks, version bumping, tag creation, and GitHub Actions triggering. Use --only flag for quick local release (bumps version, builds, publishes to npm directly - NO git push, NO pipeline). Add --push to --only for complete local release with git sync.
3
+ description: Bump patch version, create git tag, and trigger npm publish via GitHub Actions. Automates the complete release workflow with pre-flight checks, version bumping, tag creation, and GitHub Actions triggering. Use --only flag for quick local release (bumps version, builds, publishes to npm directly - NO git push, NO pipeline). Add --push to --only for complete local release with git sync. Use --only --local for FASTEST local-only version bump (no npm publish, no git, just version increment for local testing).
4
4
  ---
5
5
 
6
6
  # /specweave-release:npm - NPM Release Automation
@@ -14,22 +14,27 @@ You are the NPM Release Assistant. Your job is to automate the patch version rel
14
14
  | `/specweave-release:npm` | Bump → Push → **CI publishes** | Standard release (CI handles npm) |
15
15
  | `/specweave-release:npm --only` | Bump → Build → **Publish locally** → NO push | Quick local release, push later |
16
16
  | `/specweave-release:npm --only --push` | Bump → Build → **Publish locally** → Push | Complete local release + git sync |
17
+ | `/specweave-release:npm --only --local` | **Bump ONLY** → NO build, NO publish, NO git | FASTEST: Local testing only |
17
18
 
18
19
  ## Detecting Mode
19
20
 
20
21
  Check flags in the command invocation:
21
22
 
22
23
  ```
23
- --only Direct publish to npm (bypass CI)
24
+ --only --local Version bump ONLY (no build, no publish, no git) - FASTEST
24
25
  --only --push → Direct publish + push to git after
26
+ --only → Direct publish to npm (bypass CI)
25
27
  (no flags) → Default: push to git, CI publishes
26
28
  ```
27
29
 
28
30
  **Flag Detection Order:**
29
31
  1. Check for `--only` flag
30
- 2. If `--only` present, check for `--push` flag
31
- 3. Route to appropriate workflow section
32
+ 2. If `--only` present, check for `--local` flag → LOCAL MODE (fastest)
33
+ 3. If `--only` present, check for `--push` flag → DIRECT MODE + PUSH
34
+ 4. If `--only` only → DIRECT MODE
35
+ 5. No flags → DEFAULT MODE
32
36
 
37
+ **If `--only --local`**: Use LOCAL MODE (section "Local Mode Workflow") - FASTEST!
33
38
  **If `--only --push`**: Use DIRECT MODE WITH PUSH (section "Direct Mode + Push Workflow")
34
39
  **If `--only` only**: Use DIRECT MODE (section "Direct Mode Workflow")
35
40
  **If no flags**: Use DEFAULT MODE (continue with steps below)
@@ -400,6 +405,9 @@ Show the user:
400
405
 
401
406
  # Complete local release (publish + push)
402
407
  /specweave-release:npm --only --push
408
+
409
+ # FASTEST: Version bump only (no publish, no git, no build)
410
+ /specweave-release:npm --only --local
403
411
  ```
404
412
 
405
413
  | Scenario | Command | NPM Published By | Git Pushed |
@@ -407,3 +415,85 @@ Show the user:
407
415
  | Normal release | (no flags) | GitHub Actions | ✅ Yes |
408
416
  | Quick local, push later | `--only` | You (local) | ❌ No |
409
417
  | Complete local release | `--only --push` | You (local) | ✅ Yes |
418
+ | **FASTEST local test** | `--only --local` | ❌ None | ❌ No |
419
+
420
+ ---
421
+
422
+ ## LOCAL MODE WORKFLOW (--only --local flags) - FASTEST!
423
+
424
+ Use this workflow when BOTH `--only` AND `--local` flags are detected. This is the **fastest possible** version bump - NO npm publish, NO git operations, NO build. Just increment the version number for local testing.
425
+
426
+ **Use case**: You need to quickly test a new version locally without publishing anywhere. Perfect for:
427
+ - Testing version-dependent features
428
+ - Local development iterations
429
+ - Quick version bumps before a real release
430
+
431
+ ### 1. Minimal Pre-flight Check
432
+
433
+ ```bash
434
+ # Just verify current version (no git checks needed!)
435
+ node -p "require('./package.json').version"
436
+ ```
437
+
438
+ **NO git checks** - we're not committing or pushing anything!
439
+
440
+ ### 2. Bump Version (NO git commit, NO tag)
441
+
442
+ ```bash
443
+ # Bump version WITHOUT creating git commit or tag
444
+ npm version patch --no-git-tag-version
445
+ ```
446
+
447
+ **What this does**:
448
+ - Updates `package.json` version ONLY
449
+ - Updates `package-lock.json` version ONLY
450
+ - NO git commit created
451
+ - NO git tag created
452
+ - INSTANT (< 1 second)
453
+
454
+ ### 3. Report Results (Local Mode)
455
+
456
+ Show the user:
457
+ ```markdown
458
+ ⚡ **FAST local version bump!**
459
+
460
+ 📦 **Version**: X.Y.Z → X.Y.(Z+1)
461
+
462
+ **What happened**:
463
+ - ✅ package.json version bumped
464
+ - ✅ package-lock.json updated
465
+ - ⏭️ NO git commit (use `git add . && git commit` later)
466
+ - ⏭️ NO git tag (use `git tag vX.Y.Z` later)
467
+ - ⏭️ NO npm publish (use `npm publish` later)
468
+ - ⏭️ NO build (use `npm run rebuild` later)
469
+
470
+ **Next steps when ready to release**:
471
+ 1. Build: `npm run rebuild`
472
+ 2. Test: `npm test`
473
+ 3. Commit: `git add . && git commit -m "chore: bump version to X.Y.Z"`
474
+ 4. Tag: `git tag vX.Y.Z`
475
+ 5. Publish: `npm publish`
476
+ 6. Push: `git push origin develop --follow-tags`
477
+
478
+ **Or use**: `/specweave-release:npm --only --push` for full release
479
+ ```
480
+
481
+ ## Local Mode Safety Rules
482
+
483
+ - ✅ FASTEST possible - single npm command
484
+ - ✅ NO network operations (no npm publish, no git push)
485
+ - ✅ NO disk-heavy operations (no build)
486
+ - ✅ Safe to run multiple times (just increments version)
487
+ - ⚠️ Remember: version is NOT published or committed!
488
+ - ⚠️ Run `npm run rebuild` before testing locally
489
+
490
+ ## Success Criteria (Local Mode)
491
+
492
+ ✅ Version bumped in package.json
493
+ ✅ Version bumped in package-lock.json
494
+ ⏭️ NO git commit
495
+ ⏭️ NO git tag
496
+ ⏭️ NO npm publish
497
+ ⏭️ NO build
498
+
499
+ **Time**: < 1 second
@@ -1,79 +0,0 @@
1
- #!/bin/bash
2
-
3
- # SpecWeave Docs-Changed Hook
4
- # Runs after file changes are detected
5
- # Detects if documentation was changed during implementation
6
- # Triggers review workflow if needed
7
-
8
- set -e
9
-
10
- # Find project root by searching upward for .specweave/ directory
11
- # Works regardless of where hook is installed (source or .claude/hooks/)
12
- find_project_root() {
13
- local dir="$1"
14
- while [ "$dir" != "/" ]; do
15
- if [ -d "$dir/.specweave" ]; then
16
- echo "$dir"
17
- return 0
18
- fi
19
- dir="$(dirname "$dir")"
20
- done
21
- # Fallback: try current directory
22
- if [ -d "$(pwd)/.specweave" ]; then
23
- pwd
24
- else
25
- echo "$(pwd)"
26
- fi
27
- }
28
-
29
- PROJECT_ROOT="$(find_project_root "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")"
30
- cd "$PROJECT_ROOT"
31
-
32
- # Colors
33
- RED='\033[0;31m'
34
- YELLOW='\033[1;33m'
35
- NC='\033[0m'
36
-
37
- # Get changed files (git)
38
- if ! git rev-parse --git-dir > /dev/null 2>&1; then
39
- # Not a git repository, skip
40
- exit 0
41
- fi
42
-
43
- CHANGED_FILES=$(git diff --name-only HEAD 2>/dev/null || echo "")
44
-
45
- if [ -z "$CHANGED_FILES" ]; then
46
- # No changes
47
- exit 0
48
- fi
49
-
50
- # Check if any documentation files changed
51
- DOC_CHANGES=$(echo "$CHANGED_FILES" | grep -E '\.specweave/(docs|increments/.*/.*\.md)' || true)
52
-
53
- if [ -n "$DOC_CHANGES" ]; then
54
- echo -e "${RED}⚠️ Documentation changed during implementation${NC}"
55
- echo ""
56
- echo "📋 Files changed:"
57
- echo "$DOC_CHANGES" | sed 's/^/ /'
58
- echo ""
59
- echo -e "${YELLOW}🔔 Recommended actions:${NC}"
60
- echo " 1. Review documentation changes"
61
- echo " 2. Update tasks.md if architecture changed"
62
- echo " 3. Type /review-docs to see full impact"
63
- echo ""
64
-
65
- # Play notification sound
66
- case "$(uname -s)" in
67
- Darwin)
68
- afplay /System/Library/Sounds/Ping.aiff 2>/dev/null &
69
- ;;
70
- Linux)
71
- paplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga 2>/dev/null || true
72
- ;;
73
- esac
74
-
75
- # Log to hooks log
76
- LOGS_DIR=".specweave/logs"
77
- mkdir -p "$LOGS_DIR"
78
- echo "[$(date)] Documentation changed: $DOC_CHANGES" >> "$LOGS_DIR/hooks.log"
79
- fi
@@ -1,75 +0,0 @@
1
- #!/bin/bash
2
-
3
- # SpecWeave Human-Input-Required Hook
4
- # Runs when Claude needs clarification or approval
5
- #
6
- # Actions:
7
- # 1. Play notification sound (Ping.aiff)
8
- # 2. Log the question/requirement
9
- # 3. Record in current increment's work log (if applicable)
10
-
11
- set -e
12
-
13
- # Find project root by searching upward for .specweave/ directory
14
- # Works regardless of where hook is installed (source or .claude/hooks/)
15
- find_project_root() {
16
- local dir="$1"
17
- while [ "$dir" != "/" ]; do
18
- if [ -d "$dir/.specweave" ]; then
19
- echo "$dir"
20
- return 0
21
- fi
22
- dir="$(dirname "$dir")"
23
- done
24
- # Fallback: try current directory
25
- if [ -d "$(pwd)/.specweave" ]; then
26
- pwd
27
- else
28
- echo "$(pwd)"
29
- fi
30
- }
31
-
32
- PROJECT_ROOT="$(find_project_root "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")"
33
- cd "$PROJECT_ROOT"
34
-
35
- # Get question/requirement (passed as argument or default)
36
- QUESTION="${1:-User input required}"
37
-
38
- echo "❓ Human input required"
39
-
40
- # 1. Play notification sound (cross-platform)
41
- play_sound() {
42
- case "$(uname -s)" in
43
- Darwin)
44
- afplay /System/Library/Sounds/Ping.aiff 2>/dev/null &
45
- ;;
46
- Linux)
47
- paplay /usr/share/sounds/freedesktop/stereo/dialog-question.oga 2>/dev/null || \
48
- aplay /usr/share/sounds/alsa/Side_Left.wav 2>/dev/null || true
49
- ;;
50
- MINGW*|MSYS*|CYGWIN*)
51
- powershell -c "(New-Object Media.SoundPlayer 'C:\Windows\Media\notify.wav').PlaySync();" 2>/dev/null || true
52
- ;;
53
- esac
54
- }
55
-
56
- play_sound &
57
-
58
- # 2. Log to main hooks log
59
- LOGS_DIR=".specweave/logs"
60
- mkdir -p "$LOGS_DIR"
61
- echo "[$(date)] Human input required: $QUESTION" >> "$LOGS_DIR/hooks.log"
62
-
63
- # 3. Log to current work context (if exists)
64
- CURRENT_WORK=$(find .specweave/work -maxdepth 1 -type d -name "current-*" | head -1 || true)
65
-
66
- if [ -n "$CURRENT_WORK" ] && [ -d "$CURRENT_WORK" ]; then
67
- echo "" >> "$CURRENT_WORK/notes.md"
68
- echo "## Input Required ($(date +%Y-%m-%d\ %H:%M))" >> "$CURRENT_WORK/notes.md"
69
- echo "" >> "$CURRENT_WORK/notes.md"
70
- echo "$QUESTION" >> "$CURRENT_WORK/notes.md"
71
- echo "" >> "$CURRENT_WORK/notes.md"
72
- echo "📝 Logged to $CURRENT_WORK/notes.md"
73
- fi
74
-
75
- echo "✅ Hook complete"