specweave 0.10.0 → 0.11.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.
Files changed (28) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CLAUDE.md +55 -93
  3. package/dist/cli/commands/init.d.ts.map +1 -1
  4. package/dist/cli/commands/init.js +98 -59
  5. package/dist/cli/commands/init.js.map +1 -1
  6. package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  7. package/dist/cli/helpers/issue-tracker/index.js +39 -0
  8. package/dist/cli/helpers/issue-tracker/index.js.map +1 -1
  9. package/dist/cli/helpers/issue-tracker/jira.d.ts.map +1 -1
  10. package/dist/cli/helpers/issue-tracker/jira.js +2 -9
  11. package/dist/cli/helpers/issue-tracker/jira.js.map +1 -1
  12. package/dist/utils/external-resource-validator.d.ts.map +1 -1
  13. package/dist/utils/external-resource-validator.js +44 -25
  14. package/dist/utils/external-resource-validator.js.map +1 -1
  15. package/package.json +1 -1
  16. package/plugins/specweave/skills/SKILLS-INDEX.md +23 -2
  17. package/plugins/specweave/skills/increment-planner/SKILL.md +13 -92
  18. package/plugins/specweave/skills/plugin-installer/SKILL.md +355 -0
  19. package/plugins/specweave-ado/agents/ado-manager/AGENT.md +2 -0
  20. package/plugins/specweave-ado/commands/specweave-ado-sync.md +102 -9
  21. package/plugins/specweave-ado/skills/ado-sync/SKILL.md +7 -3
  22. package/plugins/specweave-github/agents/github-manager/AGENT.md +14 -4
  23. package/plugins/specweave-github/commands/specweave-github-sync.md +60 -11
  24. package/plugins/specweave-github/skills/github-sync/SKILL.md +3 -1
  25. package/plugins/specweave-jira/agents/jira-manager/AGENT.md +18 -8
  26. package/plugins/specweave-jira/commands/specweave-jira-sync.md +62 -19
  27. package/plugins/specweave-jira/skills/jira-resource-validator/SKILL.md +120 -57
  28. package/plugins/specweave-jira/skills/jira-sync/SKILL.md +5 -3
@@ -1,16 +1,20 @@
1
1
  ---
2
2
  name: ado-sync
3
- description: Bidirectional synchronization between SpecWeave increments and Azure DevOps work items. Creates work items from increments, tracks progress via comments, updates increment status from work item state, and closes work items when increments complete. Activates for: Azure DevOps, ADO, work items, project management, sync to ADO, ADO integration, TFS integration.
3
+ description: Bidirectional synchronization between SpecWeave increments and Azure DevOps work items (two-way sync by default). Creates work items from increments, tracks progress via comments, updates increment status from work item state, syncs changes in both directions automatically. Activates for: Azure DevOps, ADO, work items, project management, sync to ADO, ADO integration, TFS integration, bidirectional ADO sync.
4
4
  ---
5
5
 
6
6
  # Azure DevOps Sync Skill
7
7
 
8
8
  **Purpose**: Seamlessly sync SpecWeave increments with Azure DevOps work items for unified project tracking.
9
9
 
10
+ **Default Behavior**: **Bidirectional (two-way) sync** - Changes in either system are automatically synchronized
11
+
10
12
  **Capabilities**:
13
+ - Bidirectional sync: SpecWeave ↔ ADO (default)
11
14
  - Create ADO work items from increments
12
- - Sync task progress → ADO comments
13
- - Update increment status from ADO state
15
+ - Sync task progress → ADO comments
16
+ - Update increment status ADO state changes
17
+ - Pull ADO comments and field updates → SpecWeave
14
18
  - Close work items when increments complete
15
19
  - Support for Epics, Features, User Stories
16
20
 
@@ -6,23 +6,33 @@
6
6
 
7
7
  **Tools**: Read, Write, Edit, Bash (GitHub CLI)
8
8
 
9
+ **Default Behavior**: **Bidirectional sync** (two-way) - Synchronizes changes in both directions automatically
10
+
9
11
  ---
10
12
 
11
13
  ## Capabilities
12
14
 
13
15
  As the GitHub Manager agent, I specialize in:
14
16
 
15
- ### 1. Issue Management
17
+ ### 1. Bidirectional Synchronization (Default)
18
+ - **Two-Way Sync**: Keep SpecWeave and GitHub synchronized automatically
19
+ - **FROM GitHub**: Pull status changes, labels, comments, state updates
20
+ - **TO GitHub**: Push task completion, progress updates, metadata
21
+ - **Conflict Resolution**: Detect and resolve conflicts between systems
22
+ - **Smart Merging**: Merge changes from both directions intelligently
23
+ - **Change Detection**: Track what changed in both systems since last sync
24
+
25
+ ### 2. Issue Management
16
26
  - **Create Issues**: Generate well-formatted GitHub issues from increment specs
17
- - **Update Issues**: Sync progress, add comments, update labels
27
+ - **Update Issues**: Sync progress, add comments, update labels (bidirectional)
18
28
  - **Close Issues**: Close issues with completion summaries
19
29
  - **Link Issues**: Connect related issues, PRs, and increments
20
30
  - **Bulk Operations**: Batch create/update/close issues
21
31
 
22
- ### 2. Progress Tracking
32
+ ### 3. Progress Tracking
23
33
  - **Task Checklists**: Generate and update task checklists in issues
24
34
  - **Progress Comments**: Post detailed task completion comments
25
- - **Status Updates**: Real-time sync of increment status to GitHub
35
+ - **Status Updates**: Bidirectional sync of increment status GitHub issue state
26
36
  - **Time Tracking**: Track estimated vs actual time per task
27
37
  - **Milestone Progress**: Update milestone completion percentages
28
38
 
@@ -26,32 +26,64 @@ Synchronize the current state of a SpecWeave increment with its GitHub issue acr
26
26
  - `--comment`: Post progress comment (default)
27
27
  - `--labels`: Update issue labels based on status
28
28
  - `--force`: Force sync even if up-to-date
29
- - `--direction`: Sync direction (`to-github`, `from-github`, `bidirectional`)
29
+ - `--direction`: Sync direction (`to-github`, `from-github`, `bidirectional` - **default: bidirectional**)
30
30
  - `--all`: Sync all active increments
31
31
 
32
32
  ### Safety Options
33
33
  - `--dry-run`: Preview changes without applying
34
34
  - `--skip-rate-check`: Skip rate limit validation (not recommended)
35
35
 
36
+ ## Sync Direction
37
+
38
+ **Default: Bidirectional** (two-way sync)
39
+
40
+ SpecWeave syncs changes in **both directions** by default:
41
+
42
+ | Direction | What It Does | Use When |
43
+ |-----------|-------------|----------|
44
+ | **`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) |
45
+ | `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 |
46
+ | `from-github` | GitHub → SpecWeave only<br>• Pull GitHub issue updates<br>• Don't push SpecWeave changes | Importing GitHub issues, or when SpecWeave is downstream |
47
+
48
+ **Why Bidirectional?**
49
+ - ✅ Keep both systems synchronized automatically
50
+ - ✅ GitHub status changes update SpecWeave (closed issue → completed increment)
51
+ - ✅ SpecWeave task completion updates GitHub (task done → checklist updated)
52
+ - ✅ Team members can work in either tool
53
+ - ✅ No data loss from changes in either system
54
+
55
+ **Override if needed:**
56
+ ```bash
57
+ # Push only (one-way to GitHub)
58
+ /specweave-github:sync 0004 --direction to-github
59
+
60
+ # Pull only (one-way from GitHub)
61
+ /specweave-github:sync 0004 --direction from-github
62
+ ```
63
+
36
64
  ## Examples
37
65
 
38
66
  ```bash
39
- # Interactive sync (select profile + time range)
67
+ # Interactive bidirectional sync (default - two-way)
40
68
  /specweave-github:sync 0004
41
69
 
42
- # Use specific profile
70
+ # Use specific profile (still bidirectional by default)
43
71
  /specweave-github:sync 0004 --profile specweave-dev
44
72
 
45
- # Specify time range
73
+ # Specify time range (bidirectional)
46
74
  /specweave-github:sync 0004 --time-range 1M
47
75
 
48
- # Full sync with all options
76
+ # Full bidirectional sync with all options
49
77
  /specweave-github:sync 0004 --profile main --time-range 1M --tasks --labels
50
78
 
79
+ # One-way sync examples (override default)
80
+ /specweave-github:sync 0004 --direction to-github # Push only
81
+ /specweave-github:sync 0004 --direction from-github # Pull only
82
+
51
83
  # Dry run to preview changes
52
84
  /specweave-github:sync 0004 --dry-run
53
85
 
54
- # Force sync all increments
86
+ # Force sync all increments (bidirectional)
55
87
  /specweave-github:sync --all --force
56
88
  ```
57
89
 
@@ -151,35 +183,52 @@ Continue with sync? [Y/n]:
151
183
  If confirmed, sync proceeds with progress updates:
152
184
 
153
185
  ```
154
- 🔄 Syncing increment 0004 to GitHub...
186
+ 🔄 Bidirectional sync for increment 0004...
155
187
 
156
188
  ✓ Profile loaded: specweave-dev
157
189
  ✓ GitHub repository: anton-abyzov/specweave
158
190
  ✓ Rate limit check: PASSED (4,850/5,000 remaining)
191
+ ✓ Sync direction: bidirectional (two-way)
159
192
 
160
193
  Fetching increment state...
161
194
  ✓ Increment loaded: 0004-plugin-architecture
162
195
  ✓ GitHub issue: #130
163
196
  ✓ Last synced: 30 minutes ago
164
197
 
165
- Detecting changes...
198
+ Detecting changes (both directions)...
199
+
200
+ FROM GitHub:
201
+ ✓ Issue status changed: open → closed
202
+ ✓ Label added: ready-for-release
203
+ ✓ 2 new comments from team
204
+
205
+ FROM SpecWeave:
166
206
  ✓ 3 new tasks completed (T-005, T-006, T-007)
167
207
  ✓ Progress: 4/48 → 7/48 (15%)
168
208
  ✓ Current task: T-008
169
209
 
170
- Syncing to GitHub...
210
+ Syncing TO GitHub...
171
211
  ✓ Posted progress comment (ID: 1234567)
172
212
  ✓ Updated task checklist (7 tasks marked complete)
173
213
  ✓ Updated labels: +in-progress
174
214
  ✓ Metadata updated
175
215
 
216
+ Syncing FROM GitHub...
217
+ ✓ Updated increment status: active → completed
218
+ ✓ Applied label: ready-for-release
219
+ ✓ Imported 2 team comments to increment notes
220
+
176
221
  Rate limit after sync: 4,570/5,000 (91% available)
177
222
 
178
- ✅ Sync Complete!
223
+ Bidirectional Sync Complete!
224
+
225
+ SpecWeave ↔ GitHub synchronized
226
+ • Pushed: 3 task updates, progress comment
227
+ • Pulled: Status change, label, 2 comments
179
228
 
180
229
  GitHub Issue: https://github.com/anton-abyzov/specweave/issues/130
181
230
  Last synced: just now
182
- Next sync: Use /specweave-github:sync 0004 when ready
231
+ Next sync: Automatic (hook-based) or manual when ready
183
232
  ```
184
233
 
185
234
  ## Key Features
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  name: github-sync
3
- description: Bidirectional synchronization between SpecWeave increments and GitHub Issues. Creates issues from increments, tracks progress via comments, updates increment status from issue state, and closes issues when increments complete. Activates for GitHub sync, issue creation, increment tracking, GitHub integration, issue management, sync to GitHub.
3
+ description: Bidirectional synchronization between SpecWeave increments and GitHub Issues (two-way sync by default). Creates issues from increments, tracks progress via comments, updates increment status from issue state, syncs changes in both directions automatically. Activates for GitHub sync, issue creation, increment tracking, GitHub integration, issue management, sync to GitHub, bidirectional sync.
4
4
  ---
5
5
 
6
6
  # GitHub Sync - Bidirectional Increment ↔ Issue Synchronization
7
7
 
8
8
  **Purpose**: Seamlessly synchronize SpecWeave increments with GitHub Issues for team visibility and project management.
9
9
 
10
+ **Default Behavior**: **Bidirectional (two-way) sync** - Changes in either system are automatically synchronized
11
+
10
12
  **When to Use**:
11
13
  - Creating new increments (auto-create GitHub issue)
12
14
  - Syncing increment progress to GitHub (comments with task completion %)
@@ -6,31 +6,41 @@
6
6
 
7
7
  **Tools**: Read, Write, Edit, Bash (curl for Jira API)
8
8
 
9
+ **Default Behavior**: **Bidirectional sync** (two-way) - Synchronizes changes in both directions automatically
10
+
9
11
  ---
10
12
 
11
13
  ## Capabilities
12
14
 
13
15
  As the Jira Manager agent, I specialize in:
14
16
 
15
- ### 1. Epic Management
17
+ ### 1. Bidirectional Synchronization (Default)
18
+ - **Two-Way Sync**: Keep SpecWeave and Jira synchronized automatically
19
+ - **FROM Jira**: Pull status changes, priority updates, sprint assignments, comments
20
+ - **TO Jira**: Push task completion, progress updates, story points, metadata
21
+ - **Conflict Resolution**: Detect and resolve conflicts between systems
22
+ - **Smart Merging**: Merge changes from both directions intelligently
23
+ - **Change Detection**: Track what changed in both systems since last sync
24
+
25
+ ### 2. Epic Management
16
26
  - **Create Epics**: Generate Jira Epics from SpecWeave increments
17
- - **Update Epics**: Sync progress, update status, add comments
27
+ - **Update Epics**: Bidirectional sync of progress, status, comments
18
28
  - **Close Epics**: Close epics with completion summaries
19
29
  - **Link Epics**: Connect related epics, stories, and tasks
20
30
  - **Custom Fields**: Handle custom fields, labels, versions
21
31
 
22
- ### 2. Story & Task Management
32
+ ### 3. Story & Task Management
23
33
  - **Create Stories**: Map SpecWeave specs to Jira Stories (PRD or RFC)
24
34
  - **Create Tasks**: Map SpecWeave tasks to Jira Tasks
25
- - **Update Status**: Real-time sync of task completion
35
+ - **Update Status**: Bidirectional sync of task completion
26
36
  - **Subtasks**: Handle Jira subtasks and dependencies
27
37
  - **Bulk Operations**: Batch create/update stories and tasks
28
38
 
29
- ### 3. Progress Tracking
30
- - **Sprint Progress**: Track epic progress within sprints
39
+ ### 4. Progress Tracking
40
+ - **Sprint Progress**: Track epic progress within sprints (bidirectional)
31
41
  - **Story Points**: Calculate and update story points
32
- - **Status Updates**: Sync status changes bidirectionally
33
- - **Comments**: Post task completion comments
42
+ - **Status Updates**: Bidirectional sync of status changes
43
+ - **Comments**: Post task completion comments and import Jira comments
34
44
  - **Time Tracking**: Track estimated vs actual time
35
45
 
36
46
  ### 4. Jira API Operations
@@ -11,39 +11,60 @@ 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. Import Jira Epic as SpecWeave Increment**
14
+ **1. Bidirectional Sync (Default - Recommended)**
15
15
  ```
16
- /specweave:sync-jira import SCRUM-123
16
+ /specweave-jira:sync 0003 # Two-way sync (default)
17
+ /specweave-jira:sync 0003 --direction bidirectional # Explicit
17
18
  ```
18
19
 
19
- **2. Sync existing linked Increment with Jira**
20
+ **2. Import Jira Epic as SpecWeave Increment**
20
21
  ```
21
- /specweave:sync-jira sync 0003
22
+ /specweave-jira:sync import SCRUM-123 # One-time pull
23
+ /specweave-jira:sync SCRUM-123 --direction from-jira # Same as import
22
24
  ```
23
25
 
24
26
  **3. Export SpecWeave Increment to Jira**
25
27
  ```
26
- /specweave:sync-jira export 0001
28
+ /specweave-jira:sync export 0001 # One-time push
29
+ /specweave-jira:sync 0001 --direction to-jira # Same as export
27
30
  ```
28
31
 
32
+ ### Sync Direction Options
33
+
34
+ **Default: `bidirectional`** (two-way sync - recommended)
35
+
36
+ - `--direction bidirectional`: SpecWeave ↔ Jira (default)
37
+ - Pull changes FROM Jira (status, priority, comments)
38
+ - Push changes TO Jira (tasks, progress, metadata)
39
+
40
+ - `--direction to-jira`: SpecWeave → Jira only
41
+ - Push increment progress to Jira
42
+ - Don't pull Jira changes back
43
+ - Same as `export` operation
44
+
45
+ - `--direction from-jira`: Jira → SpecWeave only
46
+ - Pull Jira issue updates
47
+ - Don't push SpecWeave changes
48
+ - Same as `import` operation
49
+
29
50
  ### Granular Item Operations
30
51
 
31
52
  **4. Add specific Story/Bug/Task to existing Increment**
32
53
  ```
33
- /specweave:sync-jira add SCRUM-1 to 0003
34
- /specweave:sync-jira add SCRUM-1 # Adds to current increment
54
+ /specweave-jira:sync add SCRUM-1 to 0003
55
+ /specweave-jira:sync add SCRUM-1 # Adds to current increment
35
56
  ```
36
57
 
37
58
  **5. Create Increment from specific items (cherry-pick)**
38
59
  ```
39
- /specweave:sync-jira create "User Authentication" from SCRUM-1 SCRUM-5 SCRUM-7
40
- /specweave:sync-jira create "Bug Fixes Sprint 1" from SCRUM-10 SCRUM-15 SCRUM-20
60
+ /specweave-jira:sync create "User Authentication" from SCRUM-1 SCRUM-5 SCRUM-7
61
+ /specweave-jira:sync create "Bug Fixes Sprint 1" from SCRUM-10 SCRUM-15 SCRUM-20
41
62
  ```
42
63
 
43
64
  **6. Show sync status**
44
65
  ```
45
- /specweave:sync-jira status
46
- /specweave:sync-jira status 0003 # Status of specific increment
66
+ /specweave-jira:sync status
67
+ /specweave-jira:sync status 0003 # Status of specific increment
47
68
  ```
48
69
 
49
70
  ## Your Task
@@ -154,19 +175,39 @@ When the user runs this command:
154
175
  | Task | SCRUM-7 | Setup provider |
155
176
  ```
156
177
 
157
- ### Example 5: Sync Existing Increment
158
- **User**: `/specweave:sync-jira sync 0003`
178
+ ### Example 5: Bidirectional Sync (Default)
179
+ **User**: `/specweave-jira:sync 0003`
159
180
  **You**:
160
181
  - Read increment 0003
161
182
  - Find linked Jira items (from spec.md frontmatter.work_items)
162
183
  - Fetch current state from Jira
163
- - Detect changes (status, priority, description)
164
- - Show conflicts if any
165
- - Apply sync bidirectionally
166
- - Display: "✅ Synced 0003 | Updated: 2 items | SCRUM-1 → in-progress, SCRUM-10 → completed"
184
+
185
+ **Detect changes (both directions)**:
186
+ - FROM Jira: Status changes, priority updates, comments
187
+ - FROM SpecWeave: Task completion, progress updates
188
+
189
+ **Show bidirectional sync summary**:
190
+ ```
191
+ ✅ Bidirectional Sync Complete: 0003 ↔ Jira
192
+
193
+ FROM Jira:
194
+ • SCRUM-1: Status changed to In Progress
195
+ • SCRUM-10: Priority raised to P1
196
+
197
+ FROM SpecWeave:
198
+ • 3 tasks completed (T-005, T-006, T-007)
199
+ • Progress: 60% → 75%
200
+
201
+ Conflicts: None
202
+ ```
203
+
204
+ **Handle conflicts if any**:
205
+ - Show both versions (Jira vs SpecWeave)
206
+ - Ask user which to keep or how to merge
207
+ - Apply resolution bidirectionally
167
208
 
168
209
  ### Example 6: Status Overview
169
- **User**: `/specweave:sync-jira status`
210
+ **User**: `/specweave-jira:sync status`
170
211
  **You**:
171
212
  - Scan all increments for Jira metadata
172
213
  - Show table:
@@ -188,10 +229,12 @@ When the user runs this command:
188
229
 
189
230
  ## Related Commands
190
231
 
191
- - `/specweave:sync-github` - Sync to GitHub issues
232
+ - `/specweave-github:sync` - Sync to GitHub issues (also bidirectional by default)
192
233
  - `/specweave:increment` - Create new increment
193
234
  - `/specweave:validate` - Validate increment quality
194
235
 
195
236
  ---
196
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.
239
+
197
240
  **Granular Control**: Unlike simple epic import/export, this command supports cherry-picking individual stories, bugs, and tasks for maximum flexibility.
@@ -41,22 +41,34 @@ JIRA_PROJECT=PROJECTKEY
41
41
  JIRA_BOARDS=1,2,3 # IDs (if exist) OR names (if creating)
42
42
  ```
43
43
 
44
- ### Two Modes for JIRA_BOARDS
44
+ ### Smart Per-Board Detection (Mixed Mode Support!)
45
45
 
46
- **Mode 1: Board IDs** (boards already exist):
46
+ **The system is smart enough to handle ANY combination of IDs and names:**
47
+
48
+ **All IDs** (validate existing boards):
47
49
  ```bash
48
50
  JIRA_BOARDS=1,2,3
49
51
  ```
50
- - System validates these IDs exist in Jira
51
- - If any ID doesn't exist, prompts to fix configuration
52
+ Validates boards 1, 2, 3 exist
52
53
 
53
- **Mode 2: Board Names** (boards need to be created):
54
+ **All Names** (create new boards):
54
55
  ```bash
55
56
  JIRA_BOARDS=Frontend,Backend,Mobile
56
57
  ```
57
- - System detects names (non-numeric)
58
- - Creates boards automatically
59
- - Updates .env with actual IDs: `JIRA_BOARDS=101,102,103`
58
+ Creates 3 boards, updates .env with IDs: `JIRA_BOARDS=101,102,103`
59
+
60
+ **Mixed IDs and Names** (smart handling!):
61
+ ```bash
62
+ JIRA_BOARDS=101,102,QA,Dashboard
63
+ ```
64
+ → Validates 101, 102 exist
65
+ → Creates "QA" and "Dashboard" boards
66
+ → Updates .env: `JIRA_BOARDS=101,102,103,104` (all IDs!)
67
+
68
+ **How it works**: Each entry is checked individually:
69
+ - Numeric (e.g., "123") → Validate ID exists
70
+ - Non-numeric (e.g., "QA") → Create board with that name
71
+ - After creation, .env is updated with ALL board IDs
60
72
 
61
73
  ## Validation Flow
62
74
 
@@ -107,9 +119,9 @@ Enter project name: My New Project
107
119
  ✅ Project created: PROJECTKEY (ID: 10005)
108
120
  ```
109
121
 
110
- ### Step 2: Board Validation
122
+ ### Step 2: Board Validation (Per-Board Smart Detection)
111
123
 
112
- **Scenario A: Board IDs Provided** (numeric values):
124
+ **Scenario A: All Board IDs** (all numeric):
113
125
  ```bash
114
126
  JIRA_BOARDS=1,2,3
115
127
  ```
@@ -117,40 +129,53 @@ JIRA_BOARDS=1,2,3
117
129
  **Validation**:
118
130
  ```
119
131
  Checking boards: 1,2,3...
132
+ ✅ Board 1: Frontend Board (exists)
133
+ ✅ Board 2: Backend Board (exists)
134
+ ⚠️ Board 3: Not found
120
135
 
121
- Board 1: Exists (Frontend Board)
122
- Board 2: ✅ Exists (Backend Board)
123
- Board 3: ❌ Not found
124
-
125
- ⚠️ Boards not found: 3
126
-
127
- Options:
128
- 1. Remove board 3 from configuration
129
- 2. Replace with correct board ID
130
- 3. Create new board
131
-
132
- Your choice [1]:
136
+ ⚠️ Issues found: 1 board(s)
133
137
  ```
134
138
 
135
- **Scenario B: Board Names Provided** (non-numeric):
139
+ **Scenario B: All Board Names** (all non-numeric):
136
140
  ```bash
137
141
  JIRA_BOARDS=Frontend,Backend,Mobile
138
142
  ```
139
143
 
140
144
  **Auto-creation**:
141
145
  ```
142
- 📦 Creating boards from names...
146
+ Checking boards: Frontend,Backend,Mobile...
147
+ 📦 Creating board: Frontend...
148
+ ✅ Created: Frontend (ID: 101)
149
+ 📦 Creating board: Backend...
150
+ ✅ Created: Backend (ID: 102)
151
+ 📦 Creating board: Mobile...
152
+ ✅ Created: Mobile (ID: 103)
143
153
 
144
- Creating board: Frontend in project PROJECTKEY...
145
- Board created: Frontend (ID: 101)
154
+ 📝 Updating .env with board IDs...
155
+ Updated JIRA_BOARDS: 101,102,103
146
156
 
147
- Creating board: Backend in project PROJECTKEY...
148
- ✅ Board created: Backend (ID: 102)
157
+ All boards validated/created successfully
158
+ ```
149
159
 
150
- Creating board: Mobile in project PROJECTKEY...
151
- ✅ Board created: Mobile (ID: 103)
160
+ **Scenario C: Mixed IDs and Names** (SMART!):
161
+ ```bash
162
+ JIRA_BOARDS=101,102,QA,Dashboard
163
+ ```
152
164
 
153
- Updated .env: JIRA_BOARDS=101,102,103
165
+ **Smart handling**:
166
+ ```
167
+ Checking boards: 101,102,QA,Dashboard...
168
+ ✅ Board 101: Frontend Board (exists)
169
+ ✅ Board 102: Backend Board (exists)
170
+ 📦 Creating board: QA...
171
+ ✅ Created: QA (ID: 103)
172
+ 📦 Creating board: Dashboard...
173
+ ✅ Created: Dashboard (ID: 104)
174
+
175
+ 📝 Updating .env with board IDs...
176
+ ✅ Updated JIRA_BOARDS: 101,102,103,104
177
+
178
+ ✅ All boards validated/created successfully
154
179
  ```
155
180
 
156
181
  ## Usage Examples
@@ -303,39 +328,50 @@ npx tsx src/utils/external-resource-validator.ts
303
328
  }
304
329
  ```
305
330
 
306
- ## Smart Board Creation Logic
331
+ ## Smart Board Creation Logic (Per-Board Detection)
307
332
 
308
333
  ### Detection Algorithm
309
334
 
310
335
  ```typescript
311
336
  // Parse JIRA_BOARDS from .env
312
- const boardsConfig = "Frontend,Backend,Mobile";
313
- const boardIds = boardsConfig.split(',').map(b => b.trim());
314
-
315
- // Check if all values are numeric
316
- const isNumeric = boardIds.every(b => /^\d+$/.test(b));
317
-
318
- if (isNumeric) {
319
- // Mode 1: Board IDs - validate existence
320
- for (const boardId of boardIds) {
321
- const exists = await checkBoard(parseInt(boardId));
322
- if (!exists) {
323
- console.error(`Board ${boardId} not found`);
337
+ const boardsConfig = "101,102,QA,Dashboard"; // Mixed!
338
+ const boardEntries = boardsConfig.split(',').map(b => b.trim());
339
+ const finalBoardIds = [];
340
+
341
+ // Check EACH board individually
342
+ for (const entry of boardEntries) {
343
+ const isNumeric = /^\d+$/.test(entry);
344
+
345
+ if (isNumeric) {
346
+ // Entry is a board ID - validate it exists
347
+ const boardId = parseInt(entry);
348
+ const board = await checkBoard(boardId);
349
+ if (board) {
350
+ console.log(`✅ Board ${boardId}: ${board.name} (exists)`);
351
+ finalBoardIds.push(boardId);
352
+ } else {
353
+ console.error(`⚠️ Board ${boardId}: Not found`);
324
354
  }
355
+ } else {
356
+ // Entry is a board name - create it
357
+ console.log(`📦 Creating board: ${entry}...`);
358
+ const board = await createBoard(entry, projectKey);
359
+ console.log(`✅ Created: ${entry} (ID: ${board.id})`);
360
+ finalBoardIds.push(board.id);
325
361
  }
326
- } else {
327
- // Mode 2: Board names - create boards
328
- const createdBoardIds = [];
329
- for (const boardName of boardIds) {
330
- const board = await createBoard(boardName, projectKey);
331
- createdBoardIds.push(board.id);
332
- }
362
+ }
333
363
 
334
- // Update .env with actual IDs
335
- updateEnv({ JIRA_BOARDS: createdBoardIds.join(',') });
364
+ // Update .env if any boards were created
365
+ if (createdBoardIds.length > 0) {
366
+ updateEnv({ JIRA_BOARDS: finalBoardIds.join(',') });
336
367
  }
337
368
  ```
338
369
 
370
+ **Key improvement**: Per-board detection instead of all-or-nothing!
371
+ - `JIRA_BOARDS=1,2,3` → Validates all IDs
372
+ - `JIRA_BOARDS=A,B,C` → Creates all boards
373
+ - `JIRA_BOARDS=1,2,C` → Validates 1,2, creates C (mixed!)
374
+
339
375
  ### Board Creation API
340
376
 
341
377
  **Jira REST API** (v3):
@@ -346,7 +382,11 @@ Content-Type: application/json
346
382
  {
347
383
  "name": "Frontend Board",
348
384
  "type": "scrum",
349
- "filterId": 10000 # Filter for project issues
385
+ "filterId": 10000, # Filter for project issues
386
+ "location": {
387
+ "type": "project",
388
+ "projectKeyOrId": "PROJECTKEY" # CRITICAL: Associates board with project
389
+ }
350
390
  }
351
391
 
352
392
  Response:
@@ -357,6 +397,8 @@ Response:
357
397
  }
358
398
  ```
359
399
 
400
+ **IMPORTANT**: The `location` field is **MANDATORY** to associate the board with a project. Without it, Jira creates the board but leaves it detached, requiring manual connection via the UI.
401
+
360
402
  **Filter creation** (required for board):
361
403
  ```bash
362
404
  POST /rest/api/3/filter
@@ -375,7 +417,7 @@ Response:
375
417
 
376
418
  ## Configuration Examples
377
419
 
378
- ### Example 1: Create Boards by Name
420
+ ### Example 1: All Names (Create Boards)
379
421
 
380
422
  **Before** (`.env`):
381
423
  ```bash
@@ -394,7 +436,7 @@ JIRA_BOARDS=101,102,103,104
394
436
  - Created 4 boards in Jira
395
437
  - Updated .env with actual board IDs
396
438
 
397
- ### Example 2: Validate Existing Board IDs
439
+ ### Example 2: All IDs (Validate Existing)
398
440
 
399
441
  **Before** (`.env`):
400
442
  ```bash
@@ -413,7 +455,28 @@ JIRA_BOARDS=1,2,3
413
455
  - Validated all boards exist
414
456
  - No changes needed
415
457
 
416
- ### Example 3: Fix Invalid Project
458
+ ### Example 3: Mixed IDs and Names (SMART!)
459
+
460
+ **Before** (`.env`):
461
+ ```bash
462
+ JIRA_PROJECT=PROJ
463
+ JIRA_BOARDS=101,102,QA,Dashboard
464
+ ```
465
+
466
+ **After validation**:
467
+ ```bash
468
+ JIRA_PROJECT=PROJ
469
+ JIRA_BOARDS=101,102,103,104
470
+ ```
471
+
472
+ **What happened**:
473
+ - Validated boards 101, 102 exist
474
+ - Created "QA" board (got ID 103)
475
+ - Created "Dashboard" board (got ID 104)
476
+ - Updated .env with ALL board IDs
477
+ - **This is the key feature** - you can mix existing IDs with new board names!
478
+
479
+ ### Example 4: Fix Invalid Project
417
480
 
418
481
  **Before** (`.env`):
419
482
  ```bash