specweave 0.28.17 → 0.28.20
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/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts +94 -0
- package/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-board-resolver.js +219 -0
- package/dist/plugins/specweave-ado/lib/ado-board-resolver.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts +16 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.js +63 -3
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.js.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts +12 -3
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js +37 -3
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +6 -11
- package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-feature-sync.js +6 -11
- package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts +21 -0
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js +445 -0
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts +10 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-status-sync.js +40 -2
- package/dist/plugins/specweave-github/lib/github-status-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts +94 -0
- package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/increment-issue-builder.js +369 -0
- package/dist/plugins/specweave-github/lib/increment-issue-builder.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts +50 -0
- package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-board-resolver.js +84 -0
- package/dist/plugins/specweave-jira/lib/jira-board-resolver.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts +12 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.js +57 -5
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts +5 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js +12 -4
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js.map +1 -1
- package/dist/src/cli/commands/import-external.d.ts.map +1 -1
- package/dist/src/cli/commands/import-external.js +12 -7
- package/dist/src/cli/commands/import-external.js.map +1 -1
- package/dist/src/cli/helpers/init/external-import.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/external-import.js +308 -36
- package/dist/src/cli/helpers/init/external-import.js.map +1 -1
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.d.ts +115 -0
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.js +590 -0
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado-area-selection.d.ts +65 -0
- package/dist/src/cli/helpers/issue-tracker/ado-area-selection.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado-area-selection.js +278 -0
- package/dist/src/cli/helpers/issue-tracker/ado-area-selection.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/jira-board-selection.d.ts +64 -0
- package/dist/src/cli/helpers/issue-tracker/jira-board-selection.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/jira-board-selection.js +251 -0
- package/dist/src/cli/helpers/issue-tracker/jira-board-selection.js.map +1 -0
- package/dist/src/config/types.d.ts +6 -6
- package/dist/src/core/ac-test-validator-cli.js +4 -1
- package/dist/src/core/ac-test-validator-cli.js.map +1 -1
- package/dist/src/core/ac-test-validator.d.ts.map +1 -1
- package/dist/src/core/ac-test-validator.js +4 -1
- package/dist/src/core/ac-test-validator.js.map +1 -1
- package/dist/src/core/background/index.d.ts +11 -0
- package/dist/src/core/background/index.d.ts.map +1 -0
- package/dist/src/core/background/index.js +11 -0
- package/dist/src/core/background/index.js.map +1 -0
- package/dist/src/core/background/job-manager.d.ts +65 -0
- package/dist/src/core/background/job-manager.d.ts.map +1 -0
- package/dist/src/core/background/job-manager.js +192 -0
- package/dist/src/core/background/job-manager.js.map +1 -0
- package/dist/src/core/background/types.d.ts +59 -0
- package/dist/src/core/background/types.d.ts.map +1 -0
- package/dist/src/core/background/types.js +8 -0
- package/dist/src/core/background/types.js.map +1 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.d.ts +25 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.d.ts.map +1 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.js +614 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.js.map +1 -0
- package/dist/src/core/repo-structure/repo-initializer.d.ts +40 -0
- package/dist/src/core/repo-structure/repo-initializer.d.ts.map +1 -0
- package/dist/src/core/repo-structure/repo-initializer.js +252 -0
- package/dist/src/core/repo-structure/repo-initializer.js.map +1 -0
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts +3 -37
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.js +23 -803
- package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
- package/dist/src/core/types/increment-metadata.d.ts +75 -0
- package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
- package/dist/src/core/types/spec-metadata.d.ts +2 -0
- package/dist/src/core/types/spec-metadata.d.ts.map +1 -1
- package/dist/src/core/types/sync-profile.d.ts +137 -5
- package/dist/src/core/types/sync-profile.d.ts.map +1 -1
- package/dist/src/core/types/sync-profile.js +63 -0
- package/dist/src/core/types/sync-profile.js.map +1 -1
- package/dist/src/importers/external-importer.d.ts +25 -0
- package/dist/src/importers/external-importer.d.ts.map +1 -1
- package/dist/src/importers/github-importer.d.ts.map +1 -1
- package/dist/src/importers/github-importer.js +5 -3
- package/dist/src/importers/github-importer.js.map +1 -1
- package/dist/src/importers/import-coordinator.d.ts +20 -0
- package/dist/src/importers/import-coordinator.d.ts.map +1 -1
- package/dist/src/importers/import-coordinator.js.map +1 -1
- package/dist/src/importers/item-converter.d.ts +51 -0
- package/dist/src/importers/item-converter.d.ts.map +1 -1
- package/dist/src/importers/item-converter.js +39 -12
- package/dist/src/importers/item-converter.js.map +1 -1
- package/dist/src/init/architecture/types.d.ts +2 -2
- package/dist/src/init/compliance/types.d.ts +1 -1
- package/dist/src/init/repo/types.d.ts +1 -1
- package/dist/src/living-docs/fs-id-allocator.d.ts +72 -3
- package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -1
- package/dist/src/living-docs/fs-id-allocator.js +142 -16
- package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
- package/dist/src/locales/de/cli.json +14 -0
- package/dist/src/locales/es/cli.json +14 -0
- package/dist/src/locales/fr/cli.json +14 -0
- package/dist/src/locales/ja/cli.json +14 -0
- package/dist/src/locales/ko/cli.json +14 -0
- package/dist/src/locales/pt/cli.json +14 -0
- package/dist/src/locales/ru/cli.json +14 -0
- package/dist/src/locales/zh/cli.json +14 -0
- package/dist/src/utils/chalk-fallback.d.ts +38 -0
- package/dist/src/utils/chalk-fallback.d.ts.map +1 -0
- package/dist/src/utils/chalk-fallback.js +118 -0
- package/dist/src/utils/chalk-fallback.js.map +1 -0
- package/dist/src/utils/project-id-generator.d.ts +127 -0
- package/dist/src/utils/project-id-generator.d.ts.map +1 -0
- package/dist/src/utils/project-id-generator.js +228 -0
- package/dist/src/utils/project-id-generator.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/agents/pm/AGENT.md +202 -0
- package/plugins/specweave/commands/specweave-import-external.md +5 -3
- package/plugins/specweave/commands/specweave-jobs.md +160 -0
- package/plugins/specweave/commands/specweave-sync-docs.md +6 -2
- package/plugins/specweave/hooks/pre-task-completion.sh +35 -17
- package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.d.ts +16 -0
- package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.js +121 -0
- package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.js.map +1 -0
- package/plugins/specweave/lib/vendor/core/ac-test-validator.d.ts +111 -0
- package/plugins/specweave/lib/vendor/core/ac-test-validator.js +295 -0
- package/plugins/specweave/lib/vendor/core/ac-test-validator.js.map +1 -0
- package/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +75 -0
- package/plugins/specweave/lib/vendor/utils/chalk-fallback.d.ts +38 -0
- package/plugins/specweave/lib/vendor/utils/chalk-fallback.js +118 -0
- package/plugins/specweave/lib/vendor/utils/chalk-fallback.js.map +1 -0
- package/plugins/specweave/lib/vendor/utils/fs-native.d.ts +179 -0
- package/plugins/specweave/lib/vendor/utils/fs-native.js +319 -0
- package/plugins/specweave/lib/vendor/utils/fs-native.js.map +1 -0
- package/plugins/specweave/skills/code-reviewer/SKILL.md +1 -1
- package/plugins/specweave/skills/docs-updater/SKILL.md +61 -0
- package/plugins/specweave/skills/increment-planner/SKILL.md +10 -335
- package/plugins/specweave/skills/increment-planner/templates/metadata.json +13 -0
- package/plugins/specweave/skills/increment-planner/templates/plan.md +50 -0
- package/plugins/specweave/skills/increment-planner/templates/spec-multi-project.md +86 -0
- package/plugins/specweave/skills/increment-planner/templates/spec-single-project.md +50 -0
- package/plugins/specweave/skills/increment-planner/templates/tasks-multi-project.md +86 -0
- package/plugins/specweave/skills/increment-planner/templates/tasks-single-project.md +48 -0
- package/plugins/specweave-ado/commands/specweave-ado-import-areas.md +358 -0
- package/plugins/specweave-ado/lib/ado-spec-sync.js +59 -3
- package/plugins/specweave-ado/lib/ado-spec-sync.ts +72 -3
- package/plugins/specweave-ado/lib/ado-status-sync.js +35 -3
- package/plugins/specweave-ado/lib/ado-status-sync.ts +48 -4
- package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +1 -0
- package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +1 -0
- package/plugins/specweave-core/skills/code-quality/SKILL.md +1 -0
- package/plugins/specweave-core/skills/design-patterns/SKILL.md +1 -0
- package/plugins/specweave-core/skills/software-architecture/SKILL.md +1 -0
- package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +14 -10
- package/plugins/specweave-github/commands/specweave-github-sync.md +57 -0
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +74 -0
- package/plugins/specweave-github/lib/github-feature-sync.ts +6 -11
- package/plugins/specweave-github/lib/github-increment-sync-cli.js +456 -0
- package/plugins/specweave-github/lib/github-increment-sync-cli.ts +588 -0
- package/plugins/specweave-github/lib/github-status-sync.js +37 -1
- package/plugins/specweave-github/lib/github-status-sync.ts +60 -4
- package/plugins/specweave-github/lib/increment-issue-builder.js +389 -0
- package/plugins/specweave-github/lib/increment-issue-builder.ts +502 -0
- package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +19 -24
- package/plugins/specweave-infrastructure/agents/observability-engineer/AGENT.md +15 -23
- package/plugins/specweave-jira/commands/specweave-jira-import-boards.md +331 -0
- package/plugins/specweave-jira/lib/jira-spec-sync.js +53 -5
- package/plugins/specweave-jira/lib/jira-spec-sync.ts +87 -7
- package/plugins/specweave-jira/lib/jira-status-sync.js +9 -3
- package/plugins/specweave-jira/lib/jira-status-sync.ts +15 -6
- package/plugins/specweave-ml/agents/data-scientist/AGENT.md +16 -20
- package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +18 -19
- package/plugins/specweave-ml/skills/{ml-pipeline-workflow → mlops-dag-builder}/SKILL.md +18 -14
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +111 -0
- package/plugins/specweave-ui/skills/browser-automation/SKILL.md +1 -1
- package/plugins/specweave-ui/skills/ui-testing/SKILL.md +10 -122
- package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts +0 -70
- package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/epic-content-builder.js +0 -258
- package/dist/plugins/specweave-github/lib/epic-content-builder.js.map +0 -1
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +0 -83
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/github-epic-sync.js +0 -466
- package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +0 -1
- package/plugins/specweave-github/lib/epic-content-builder.js +0 -265
- package/plugins/specweave-github/lib/epic-content-builder.ts +0 -376
- package/plugins/specweave-github/lib/github-epic-sync.js +0 -488
- package/plugins/specweave-github/lib/github-epic-sync.ts +0 -715
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specweave-ado:import-areas
|
|
3
|
+
description: Import Azure DevOps area paths from a project and map them to SpecWeave projects. Creates 2-level directory structure with area path-based organization.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Import ADO Area Paths Command
|
|
7
|
+
|
|
8
|
+
You are an Azure DevOps integration expert. Help the user import area paths from an ADO project and map them to SpecWeave projects.
|
|
9
|
+
|
|
10
|
+
## Command Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
/specweave-ado:import-areas # Interactive mode (prompts for project)
|
|
14
|
+
/specweave-ado:import-areas --project MyProduct # Specific ADO project
|
|
15
|
+
/specweave-ado:import-areas --dry-run # Preview without creating directories
|
|
16
|
+
/specweave-ado:import-areas --include-children # Include child area paths
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Your Task
|
|
20
|
+
|
|
21
|
+
When the user runs this command:
|
|
22
|
+
|
|
23
|
+
### Step 1: Validate Prerequisites
|
|
24
|
+
|
|
25
|
+
1. **Check ADO credentials** exist in `.env`:
|
|
26
|
+
- `AZURE_DEVOPS_PAT`
|
|
27
|
+
- `AZURE_DEVOPS_ORG`
|
|
28
|
+
- `AZURE_DEVOPS_PROJECT`
|
|
29
|
+
|
|
30
|
+
2. **Check config.json** for existing area path mapping:
|
|
31
|
+
- If `sync.profiles.*.config.areaPathMapping` exists, warn user
|
|
32
|
+
|
|
33
|
+
### Step 2: Get Project Name
|
|
34
|
+
|
|
35
|
+
**If `--project` flag provided:**
|
|
36
|
+
- Use the provided project name
|
|
37
|
+
|
|
38
|
+
**If no flag (interactive mode):**
|
|
39
|
+
```
|
|
40
|
+
🔷 Azure DevOps Area Path Import
|
|
41
|
+
|
|
42
|
+
Enter the ADO project name to import area paths from:
|
|
43
|
+
> MyProduct
|
|
44
|
+
|
|
45
|
+
Fetching area paths from project MyProduct...
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Step 3: Fetch and Display Area Paths
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
import { fetchAreaPathsForProject } from '../lib/ado-board-resolver';
|
|
52
|
+
|
|
53
|
+
const areaPaths = await fetchAreaPathsForProject(
|
|
54
|
+
process.env.AZURE_DEVOPS_ORG,
|
|
55
|
+
'MyProduct',
|
|
56
|
+
process.env.AZURE_DEVOPS_PAT
|
|
57
|
+
);
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Display area paths:**
|
|
61
|
+
```
|
|
62
|
+
Found 6 area paths in project MyProduct:
|
|
63
|
+
|
|
64
|
+
1. ☑ MyProduct\Frontend (45 active items)
|
|
65
|
+
2. ☑ MyProduct\Backend (78 active items)
|
|
66
|
+
3. ☑ MyProduct\Mobile (23 active items)
|
|
67
|
+
4. ☑ MyProduct\DevOps (12 active items)
|
|
68
|
+
5. ☐ MyProduct\Archive (0 items) [deselected - archive]
|
|
69
|
+
6. ☐ MyProduct (root) [deselected - root level]
|
|
70
|
+
|
|
71
|
+
Select area paths to import (Space to toggle, Enter to confirm)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Step 4: Map Area Paths to SpecWeave Projects
|
|
75
|
+
|
|
76
|
+
For each selected area path, prompt for SpecWeave project ID:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
🏷️ Mapping area paths to SpecWeave projects:
|
|
80
|
+
|
|
81
|
+
Area path "MyProduct\Frontend" → SpecWeave project ID: [fe]
|
|
82
|
+
→ Include child area paths? [Y/n]: y
|
|
83
|
+
→ Keywords for auto-classification (optional): frontend, ui, angular, css
|
|
84
|
+
|
|
85
|
+
Area path "MyProduct\Backend" → SpecWeave project ID: [be]
|
|
86
|
+
→ Include child area paths? [Y/n]: y
|
|
87
|
+
→ Keywords for auto-classification (optional): api, server, database, c#
|
|
88
|
+
|
|
89
|
+
Area path "MyProduct\Mobile" → SpecWeave project ID: [mobile]
|
|
90
|
+
→ Include child area paths? [Y/n]: y
|
|
91
|
+
→ Keywords for auto-classification (optional): ios, android, xamarin
|
|
92
|
+
|
|
93
|
+
Area path "MyProduct\DevOps" → SpecWeave project ID: [devops]
|
|
94
|
+
→ Include child area paths? [Y/n]: y
|
|
95
|
+
→ Keywords for auto-classification (optional): infrastructure, ci, cd, terraform
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Project ID validation:**
|
|
99
|
+
- Must be lowercase, alphanumeric with hyphens
|
|
100
|
+
- Must not collide with existing project IDs
|
|
101
|
+
- If collision detected, suggest prefixed version: `myproduct-fe` instead of `fe`
|
|
102
|
+
|
|
103
|
+
### Step 5: Create Directory Structure
|
|
104
|
+
|
|
105
|
+
Create 2-level directory structure:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
.specweave/docs/internal/specs/
|
|
109
|
+
└── ADO-myproduct/ ← Level 1: ADO project
|
|
110
|
+
├── fe/ ← Level 2: SpecWeave project
|
|
111
|
+
│ └── .gitkeep
|
|
112
|
+
├── be/
|
|
113
|
+
│ └── .gitkeep
|
|
114
|
+
├── mobile/
|
|
115
|
+
│ └── .gitkeep
|
|
116
|
+
└── devops/
|
|
117
|
+
└── .gitkeep
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Step 6: Update config.json
|
|
121
|
+
|
|
122
|
+
Add area path mapping to config:
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"sync": {
|
|
127
|
+
"profiles": {
|
|
128
|
+
"ado-default": {
|
|
129
|
+
"provider": "ado",
|
|
130
|
+
"config": {
|
|
131
|
+
"organization": "myorg",
|
|
132
|
+
"areaPathMapping": {
|
|
133
|
+
"project": "MyProduct",
|
|
134
|
+
"mappings": [
|
|
135
|
+
{
|
|
136
|
+
"areaPath": "MyProduct\\Frontend",
|
|
137
|
+
"specweaveProject": "fe",
|
|
138
|
+
"includeChildren": true,
|
|
139
|
+
"keywords": ["frontend", "ui", "angular", "css"]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"areaPath": "MyProduct\\Backend",
|
|
143
|
+
"specweaveProject": "be",
|
|
144
|
+
"includeChildren": true,
|
|
145
|
+
"keywords": ["api", "server", "database", "c#"]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"areaPath": "MyProduct\\Mobile",
|
|
149
|
+
"specweaveProject": "mobile",
|
|
150
|
+
"includeChildren": true,
|
|
151
|
+
"keywords": ["ios", "android", "xamarin"]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"areaPath": "MyProduct\\DevOps",
|
|
155
|
+
"specweaveProject": "devops",
|
|
156
|
+
"includeChildren": true,
|
|
157
|
+
"keywords": ["infrastructure", "ci", "cd", "terraform"]
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"multiProject": {
|
|
166
|
+
"enabled": true,
|
|
167
|
+
"activeProject": "fe",
|
|
168
|
+
"projects": {
|
|
169
|
+
"fe": {
|
|
170
|
+
"name": "Frontend",
|
|
171
|
+
"externalTools": {
|
|
172
|
+
"ado": {
|
|
173
|
+
"areaPath": "MyProduct\\Frontend",
|
|
174
|
+
"project": "MyProduct"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"be": {
|
|
179
|
+
"name": "Backend",
|
|
180
|
+
"externalTools": {
|
|
181
|
+
"ado": {
|
|
182
|
+
"areaPath": "MyProduct\\Backend",
|
|
183
|
+
"project": "MyProduct"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"mobile": {
|
|
188
|
+
"name": "Mobile",
|
|
189
|
+
"externalTools": {
|
|
190
|
+
"ado": {
|
|
191
|
+
"areaPath": "MyProduct\\Mobile",
|
|
192
|
+
"project": "MyProduct"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"devops": {
|
|
197
|
+
"name": "DevOps",
|
|
198
|
+
"externalTools": {
|
|
199
|
+
"ado": {
|
|
200
|
+
"areaPath": "MyProduct\\DevOps",
|
|
201
|
+
"project": "MyProduct"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Step 7: Display Summary
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
✅ Azure DevOps Area Paths Import Complete!
|
|
214
|
+
|
|
215
|
+
🔷 ADO Project: MyProduct
|
|
216
|
+
📁 Created: .specweave/docs/internal/specs/ADO-myproduct/
|
|
217
|
+
|
|
218
|
+
Area paths imported:
|
|
219
|
+
✓ MyProduct\Frontend → fe (includes children)
|
|
220
|
+
Keywords: frontend, ui, angular, css
|
|
221
|
+
✓ MyProduct\Backend → be (includes children)
|
|
222
|
+
Keywords: api, server, database, c#
|
|
223
|
+
✓ MyProduct\Mobile → mobile (includes children)
|
|
224
|
+
Keywords: ios, android, xamarin
|
|
225
|
+
✓ MyProduct\DevOps → devops (includes children)
|
|
226
|
+
Keywords: infrastructure, ci, cd, terraform
|
|
227
|
+
|
|
228
|
+
💡 Next steps:
|
|
229
|
+
1. Use /specweave:switch-project fe to switch active project
|
|
230
|
+
2. Create increment: /specweave:increment "feature name"
|
|
231
|
+
3. User stories will auto-sync to the correct area path based on keywords
|
|
232
|
+
|
|
233
|
+
📖 Documentation: .specweave/docs/internal/architecture/adr/0143-jira-ado-multi-level-project-mapping.md
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Examples
|
|
237
|
+
|
|
238
|
+
### Example 1: Interactive Import
|
|
239
|
+
```
|
|
240
|
+
User: /specweave-ado:import-areas
|
|
241
|
+
|
|
242
|
+
You:
|
|
243
|
+
🔷 Azure DevOps Area Path Import
|
|
244
|
+
|
|
245
|
+
Enter the ADO project name: MyProduct
|
|
246
|
+
Fetching area paths...
|
|
247
|
+
|
|
248
|
+
Found 4 area paths:
|
|
249
|
+
☑ MyProduct\Frontend
|
|
250
|
+
☑ MyProduct\Backend
|
|
251
|
+
☑ MyProduct\Mobile
|
|
252
|
+
☐ MyProduct (root) [deselected]
|
|
253
|
+
|
|
254
|
+
Mapping to SpecWeave projects:
|
|
255
|
+
MyProduct\Frontend → fe
|
|
256
|
+
MyProduct\Backend → be
|
|
257
|
+
MyProduct\Mobile → mobile
|
|
258
|
+
|
|
259
|
+
✅ Import complete! 3 area paths mapped.
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Example 2: Dry Run
|
|
263
|
+
```
|
|
264
|
+
User: /specweave-ado:import-areas --project MyProduct --dry-run
|
|
265
|
+
|
|
266
|
+
You:
|
|
267
|
+
🔷 Azure DevOps Area Path Import (DRY RUN)
|
|
268
|
+
|
|
269
|
+
Would import from project: MyProduct
|
|
270
|
+
|
|
271
|
+
Would create:
|
|
272
|
+
.specweave/docs/internal/specs/ADO-myproduct/
|
|
273
|
+
.specweave/docs/internal/specs/ADO-myproduct/fe/
|
|
274
|
+
.specweave/docs/internal/specs/ADO-myproduct/be/
|
|
275
|
+
.specweave/docs/internal/specs/ADO-myproduct/mobile/
|
|
276
|
+
|
|
277
|
+
Would update config.json with area path mapping.
|
|
278
|
+
|
|
279
|
+
No changes made (dry run).
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Example 3: Already Configured
|
|
283
|
+
```
|
|
284
|
+
User: /specweave-ado:import-areas
|
|
285
|
+
|
|
286
|
+
You:
|
|
287
|
+
⚠️ Area path mapping already exists for project MyProduct
|
|
288
|
+
|
|
289
|
+
Current mappings:
|
|
290
|
+
MyProduct\Frontend → fe
|
|
291
|
+
MyProduct\Backend → be
|
|
292
|
+
|
|
293
|
+
Do you want to:
|
|
294
|
+
1. Add more area paths
|
|
295
|
+
2. Replace existing mapping
|
|
296
|
+
3. Cancel
|
|
297
|
+
|
|
298
|
+
> 1
|
|
299
|
+
|
|
300
|
+
Fetching additional area paths...
|
|
301
|
+
☐ MyProduct\Frontend (already mapped)
|
|
302
|
+
☐ MyProduct\Backend (already mapped)
|
|
303
|
+
☑ MyProduct\Mobile (new)
|
|
304
|
+
☑ MyProduct\DevOps (new)
|
|
305
|
+
|
|
306
|
+
Added:
|
|
307
|
+
MyProduct\Mobile → mobile
|
|
308
|
+
MyProduct\DevOps → devops
|
|
309
|
+
|
|
310
|
+
✅ Updated! Now 4 area paths mapped.
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Error Handling
|
|
314
|
+
|
|
315
|
+
**Missing credentials:**
|
|
316
|
+
```
|
|
317
|
+
❌ Azure DevOps credentials not found
|
|
318
|
+
|
|
319
|
+
Please add to .env:
|
|
320
|
+
AZURE_DEVOPS_PAT=your_personal_access_token
|
|
321
|
+
AZURE_DEVOPS_ORG=your_organization
|
|
322
|
+
AZURE_DEVOPS_PROJECT=your_project
|
|
323
|
+
|
|
324
|
+
Or run: specweave init . (to configure Azure DevOps)
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**Project not found:**
|
|
328
|
+
```
|
|
329
|
+
❌ ADO project "INVALID" not found in organization "myorg"
|
|
330
|
+
|
|
331
|
+
Available projects you have access to:
|
|
332
|
+
- MyProduct (My Product Development)
|
|
333
|
+
- Infrastructure (DevOps & Infrastructure)
|
|
334
|
+
- Legacy (Legacy Systems)
|
|
335
|
+
|
|
336
|
+
Tip: Use /specweave-ado:import-areas --project MyProduct
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
**No area paths found:**
|
|
340
|
+
```
|
|
341
|
+
⚠️ No child area paths found in project MyProduct
|
|
342
|
+
|
|
343
|
+
The project only has the root area path. This means:
|
|
344
|
+
1. Teams aren't using area paths for organization
|
|
345
|
+
2. You can create area paths in ADO Project Settings
|
|
346
|
+
|
|
347
|
+
Suggestions:
|
|
348
|
+
- Use single-project mode (no area path mapping)
|
|
349
|
+
- Create area paths in ADO: Project Settings → Work → Areas
|
|
350
|
+
- Run this command again after creating area paths
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
## Related Commands
|
|
354
|
+
|
|
355
|
+
- `/specweave-ado:import-projects` - Import multiple ADO projects
|
|
356
|
+
- `/specweave-ado:sync` - Sync increments with ADO
|
|
357
|
+
- `/specweave:switch-project` - Switch active SpecWeave project
|
|
358
|
+
- `/specweave:init-multiproject` - Initialize multi-project mode
|
|
@@ -134,6 +134,7 @@ class AdoSpecSync {
|
|
|
134
134
|
const featureTitle = `[${spec.metadata.id.toUpperCase()}] ${spec.metadata.title}`;
|
|
135
135
|
const featureDescription = this.generateFeatureDescription(spec);
|
|
136
136
|
const tags = [`spec:${spec.metadata.id}`, `priority:${spec.metadata.priority}`].join("; ");
|
|
137
|
+
const workItemType = this.mapTypeToAdo(spec.metadata.type, "Feature");
|
|
137
138
|
const payload = [
|
|
138
139
|
{
|
|
139
140
|
op: "add",
|
|
@@ -148,12 +149,18 @@ class AdoSpecSync {
|
|
|
148
149
|
{
|
|
149
150
|
op: "add",
|
|
150
151
|
path: "/fields/System.WorkItemType",
|
|
151
|
-
value:
|
|
152
|
+
value: workItemType
|
|
152
153
|
},
|
|
153
154
|
{
|
|
154
155
|
op: "add",
|
|
155
156
|
path: "/fields/System.Tags",
|
|
156
157
|
value: tags
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
// Set native ADO Priority field (P0→1, P1→2, P2→3, P3→4)
|
|
161
|
+
op: "add",
|
|
162
|
+
path: "/fields/Microsoft.VSTS.Common.Priority",
|
|
163
|
+
value: this.mapPriorityToAdo(spec.metadata.priority)
|
|
157
164
|
}
|
|
158
165
|
];
|
|
159
166
|
const response = await this.client.post("/wit/workitems/$Feature?api-version=7.0", payload);
|
|
@@ -224,7 +231,8 @@ class AdoSpecSync {
|
|
|
224
231
|
title: storyTitle,
|
|
225
232
|
description: storyDescription,
|
|
226
233
|
parentId: featureId,
|
|
227
|
-
tags: [`user-story`, `spec:${spec.metadata.id}`, `priority:${us.priority}`].join("; ")
|
|
234
|
+
tags: [`user-story`, `spec:${spec.metadata.id}`, `priority:${us.priority}`].join("; "),
|
|
235
|
+
priority: us.priority
|
|
228
236
|
});
|
|
229
237
|
created.push(us.id);
|
|
230
238
|
console.log(` \u2705 Created ${us.id} \u2192 User Story #${newStory.id}`);
|
|
@@ -362,6 +370,7 @@ ${acList}
|
|
|
362
370
|
* Create ADO User Story
|
|
363
371
|
*/
|
|
364
372
|
async createStory(story) {
|
|
373
|
+
const workItemType = this.mapTypeToAdo(story.type, "User Story");
|
|
365
374
|
const payload = [
|
|
366
375
|
{
|
|
367
376
|
op: "add",
|
|
@@ -376,13 +385,19 @@ ${acList}
|
|
|
376
385
|
{
|
|
377
386
|
op: "add",
|
|
378
387
|
path: "/fields/System.WorkItemType",
|
|
379
|
-
value:
|
|
388
|
+
value: workItemType
|
|
380
389
|
},
|
|
381
390
|
{
|
|
382
391
|
op: "add",
|
|
383
392
|
path: "/fields/System.Tags",
|
|
384
393
|
value: story.tags
|
|
385
394
|
},
|
|
395
|
+
{
|
|
396
|
+
// Set native ADO Priority field
|
|
397
|
+
op: "add",
|
|
398
|
+
path: "/fields/Microsoft.VSTS.Common.Priority",
|
|
399
|
+
value: this.mapPriorityToAdo(story.priority)
|
|
400
|
+
},
|
|
386
401
|
{
|
|
387
402
|
op: "add",
|
|
388
403
|
path: "/relations/-",
|
|
@@ -431,6 +446,47 @@ ${acList}
|
|
|
431
446
|
}
|
|
432
447
|
await this.client.patch(`/wit/workitems/${storyId}?api-version=7.0`, payload);
|
|
433
448
|
}
|
|
449
|
+
/**
|
|
450
|
+
* Map SpecWeave priority to ADO priority value
|
|
451
|
+
*
|
|
452
|
+
* ADO Priority field uses 1-4 scale:
|
|
453
|
+
* - 1 = Highest (P0)
|
|
454
|
+
* - 2 = High (P1)
|
|
455
|
+
* - 3 = Medium (P2)
|
|
456
|
+
* - 4 = Low (P3)
|
|
457
|
+
*/
|
|
458
|
+
mapPriorityToAdo(priority) {
|
|
459
|
+
if (!priority) return 3;
|
|
460
|
+
const map = {
|
|
461
|
+
P0: 1,
|
|
462
|
+
P1: 2,
|
|
463
|
+
P2: 3,
|
|
464
|
+
P3: 4,
|
|
465
|
+
p0: 1,
|
|
466
|
+
p1: 2,
|
|
467
|
+
p2: 3,
|
|
468
|
+
p3: 4
|
|
469
|
+
};
|
|
470
|
+
return map[priority] || 3;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Map SpecWeave type to ADO work item type
|
|
474
|
+
*
|
|
475
|
+
* Supports: Feature, User Story, Bug, Task
|
|
476
|
+
*/
|
|
477
|
+
mapTypeToAdo(type, defaultType = "Feature") {
|
|
478
|
+
if (!type) return defaultType;
|
|
479
|
+
const normalizedType = type.toLowerCase();
|
|
480
|
+
const map = {
|
|
481
|
+
bug: "Bug",
|
|
482
|
+
feature: "Feature",
|
|
483
|
+
epic: "Feature",
|
|
484
|
+
story: "User Story",
|
|
485
|
+
task: "Task",
|
|
486
|
+
enhancement: "Feature"
|
|
487
|
+
};
|
|
488
|
+
return map[normalizedType] || defaultType;
|
|
489
|
+
}
|
|
434
490
|
}
|
|
435
491
|
export {
|
|
436
492
|
AdoSpecSync
|
|
@@ -223,6 +223,9 @@ export class AdoSpecSync {
|
|
|
223
223
|
const featureDescription = this.generateFeatureDescription(spec);
|
|
224
224
|
const tags = [`spec:${spec.metadata.id}`, `priority:${spec.metadata.priority}`].join('; ');
|
|
225
225
|
|
|
226
|
+
// Determine work item type (supports Bug for bug-type specs)
|
|
227
|
+
const workItemType = this.mapTypeToAdo(spec.metadata.type, 'Feature');
|
|
228
|
+
|
|
226
229
|
const payload = [
|
|
227
230
|
{
|
|
228
231
|
op: 'add',
|
|
@@ -237,12 +240,18 @@ export class AdoSpecSync {
|
|
|
237
240
|
{
|
|
238
241
|
op: 'add',
|
|
239
242
|
path: '/fields/System.WorkItemType',
|
|
240
|
-
value:
|
|
243
|
+
value: workItemType
|
|
241
244
|
},
|
|
242
245
|
{
|
|
243
246
|
op: 'add',
|
|
244
247
|
path: '/fields/System.Tags',
|
|
245
248
|
value: tags
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
// Set native ADO Priority field (P0→1, P1→2, P2→3, P3→4)
|
|
252
|
+
op: 'add',
|
|
253
|
+
path: '/fields/Microsoft.VSTS.Common.Priority',
|
|
254
|
+
value: this.mapPriorityToAdo(spec.metadata.priority)
|
|
246
255
|
}
|
|
247
256
|
];
|
|
248
257
|
|
|
@@ -335,7 +344,8 @@ export class AdoSpecSync {
|
|
|
335
344
|
title: storyTitle,
|
|
336
345
|
description: storyDescription,
|
|
337
346
|
parentId: featureId,
|
|
338
|
-
tags: [`user-story`, `spec:${spec.metadata.id}`, `priority:${us.priority}`].join('; ')
|
|
347
|
+
tags: [`user-story`, `spec:${spec.metadata.id}`, `priority:${us.priority}`].join('; '),
|
|
348
|
+
priority: us.priority
|
|
339
349
|
});
|
|
340
350
|
|
|
341
351
|
created.push(us.id);
|
|
@@ -510,7 +520,12 @@ ${acList}
|
|
|
510
520
|
description: string;
|
|
511
521
|
parentId: number;
|
|
512
522
|
tags: string;
|
|
523
|
+
priority?: string;
|
|
524
|
+
type?: string;
|
|
513
525
|
}): Promise<AdoUserStory> {
|
|
526
|
+
// Determine work item type (supports Bug for bug-type stories)
|
|
527
|
+
const workItemType = this.mapTypeToAdo(story.type, 'User Story');
|
|
528
|
+
|
|
514
529
|
const payload = [
|
|
515
530
|
{
|
|
516
531
|
op: 'add',
|
|
@@ -525,13 +540,19 @@ ${acList}
|
|
|
525
540
|
{
|
|
526
541
|
op: 'add',
|
|
527
542
|
path: '/fields/System.WorkItemType',
|
|
528
|
-
value:
|
|
543
|
+
value: workItemType
|
|
529
544
|
},
|
|
530
545
|
{
|
|
531
546
|
op: 'add',
|
|
532
547
|
path: '/fields/System.Tags',
|
|
533
548
|
value: story.tags
|
|
534
549
|
},
|
|
550
|
+
{
|
|
551
|
+
// Set native ADO Priority field
|
|
552
|
+
op: 'add',
|
|
553
|
+
path: '/fields/Microsoft.VSTS.Common.Priority',
|
|
554
|
+
value: this.mapPriorityToAdo(story.priority)
|
|
555
|
+
},
|
|
535
556
|
{
|
|
536
557
|
op: 'add',
|
|
537
558
|
path: '/relations/-',
|
|
@@ -590,4 +611,52 @@ ${acList}
|
|
|
590
611
|
|
|
591
612
|
await this.client.patch(`/wit/workitems/${storyId}?api-version=7.0`, payload);
|
|
592
613
|
}
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Map SpecWeave priority to ADO priority value
|
|
617
|
+
*
|
|
618
|
+
* ADO Priority field uses 1-4 scale:
|
|
619
|
+
* - 1 = Highest (P0)
|
|
620
|
+
* - 2 = High (P1)
|
|
621
|
+
* - 3 = Medium (P2)
|
|
622
|
+
* - 4 = Low (P3)
|
|
623
|
+
*/
|
|
624
|
+
private mapPriorityToAdo(priority?: string): number {
|
|
625
|
+
if (!priority) return 3; // Default to Medium
|
|
626
|
+
|
|
627
|
+
const map: Record<string, number> = {
|
|
628
|
+
P0: 1,
|
|
629
|
+
P1: 2,
|
|
630
|
+
P2: 3,
|
|
631
|
+
P3: 4,
|
|
632
|
+
p0: 1,
|
|
633
|
+
p1: 2,
|
|
634
|
+
p2: 3,
|
|
635
|
+
p3: 4
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
return map[priority] || 3;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Map SpecWeave type to ADO work item type
|
|
643
|
+
*
|
|
644
|
+
* Supports: Feature, User Story, Bug, Task
|
|
645
|
+
*/
|
|
646
|
+
private mapTypeToAdo(type?: string, defaultType: string = 'Feature'): string {
|
|
647
|
+
if (!type) return defaultType;
|
|
648
|
+
|
|
649
|
+
const normalizedType = type.toLowerCase();
|
|
650
|
+
|
|
651
|
+
const map: Record<string, string> = {
|
|
652
|
+
bug: 'Bug',
|
|
653
|
+
feature: 'Feature',
|
|
654
|
+
epic: 'Feature',
|
|
655
|
+
story: 'User Story',
|
|
656
|
+
task: 'Task',
|
|
657
|
+
enhancement: 'Feature'
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
return map[normalizedType] || defaultType;
|
|
661
|
+
}
|
|
593
662
|
}
|
|
@@ -31,12 +31,13 @@ class AdoStatusSync {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* Update ADO work item state
|
|
34
|
+
* Update ADO work item state and tags
|
|
35
35
|
*
|
|
36
|
-
* Uses JSON Patch format to update System.State
|
|
36
|
+
* Uses JSON Patch format to update System.State and System.Tags fields.
|
|
37
|
+
* Tags are appended to existing tags, not replaced.
|
|
37
38
|
*
|
|
38
39
|
* @param workItemId - ADO work item ID (e.g., 123)
|
|
39
|
-
* @param status - Desired status
|
|
40
|
+
* @param status - Desired status with state and optional tags
|
|
40
41
|
*/
|
|
41
42
|
async updateStatus(workItemId, status) {
|
|
42
43
|
const patch = [
|
|
@@ -46,11 +47,42 @@ class AdoStatusSync {
|
|
|
46
47
|
value: status.state
|
|
47
48
|
}
|
|
48
49
|
];
|
|
50
|
+
if (status.tags && status.tags.length > 0) {
|
|
51
|
+
const currentTags = await this.getCurrentTags(workItemId);
|
|
52
|
+
const statusTagPatterns = ["Planning", "In Progress", "Paused", "Completed", "Abandoned", "On Hold"];
|
|
53
|
+
const preservedTags = currentTags.filter(
|
|
54
|
+
(tag) => !statusTagPatterns.some((pattern) => tag.toLowerCase() === pattern.toLowerCase())
|
|
55
|
+
);
|
|
56
|
+
const allTags = [.../* @__PURE__ */ new Set([...preservedTags, ...status.tags])];
|
|
57
|
+
patch.push({
|
|
58
|
+
op: "add",
|
|
59
|
+
path: "/fields/System.Tags",
|
|
60
|
+
value: allTags.join("; ")
|
|
61
|
+
});
|
|
62
|
+
}
|
|
49
63
|
await this.client.patch(
|
|
50
64
|
`/wit/workitems/${workItemId}?api-version=7.0`,
|
|
51
65
|
patch
|
|
52
66
|
);
|
|
53
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Get current tags from ADO work item
|
|
70
|
+
*
|
|
71
|
+
* @param workItemId - ADO work item ID
|
|
72
|
+
* @returns Array of current tags
|
|
73
|
+
*/
|
|
74
|
+
async getCurrentTags(workItemId) {
|
|
75
|
+
try {
|
|
76
|
+
const response = await this.client.get(
|
|
77
|
+
`/wit/workitems/${workItemId}?api-version=7.0&$select=System.Tags`
|
|
78
|
+
);
|
|
79
|
+
const tagsString = response.data.fields?.["System.Tags"] || "";
|
|
80
|
+
if (!tagsString) return [];
|
|
81
|
+
return tagsString.split(";").map((tag) => tag.trim()).filter(Boolean);
|
|
82
|
+
} catch {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
54
86
|
/**
|
|
55
87
|
* Post comment about status change to ADO work item
|
|
56
88
|
*
|