Skip to content
Development
Command

/ado-import-areas

Import Azure DevOps area paths from a project and map them to SpecWeave projects. Creates 2-level directory structure with area path-based organization.

From plugin
specweave
15673 skills20 agents73 commands
Install
> /plugin marketplace add anton-abyzov/specweave
> /plugin install sw@specweave

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/ado-import-areas

Context preview

What this command does when you run it.

Import Azure DevOps area paths from a project and map them to SpecWeave projects. Creates 2-level directory structure with area path-based organization.

Command definition

ado-import-areas.md
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.

Import ADO Area Paths Command

You are an Azure DevOps integration expert. Help the user import area paths from an ADO project and map them to SpecWeave projects.

Command Usage

sw-ado:import-areas                         # Interactive mode (prompts for project)
sw-ado:import-areas --project MyProduct     # Specific ADO project
sw-ado:import-areas --dry-run               # Preview without creating directories
sw-ado:import-areas --include-children      # Include child area paths

Your Task

When the user runs this command:

Step 1: Validate Prerequisites

1. **Check ADO credentials** exist in `.env`:

  • `AZURE_DEVOPS_PAT`
  • `AZURE_DEVOPS_ORG`
  • `AZURE_DEVOPS_PROJECT`

2. **Check config.json** for existing area path mapping:

  • If `sync.profiles.*.config.areaPathMapping` exists, warn user

Step 2: Get Project Name

**If `--project` flag provided:**

  • Use the provided project name

**If no flag (interactive mode):**

๐Ÿ”ท Azure DevOps Area Path Import

Enter the ADO project name to import area paths from:
> MyProduct

Fetching area paths from project MyProduct...

Step 3: Fetch and Display Area Paths

import { fetchAreaPathsForProject } from '../lib/ado-board-resolver';

const areaPaths = await fetchAreaPathsForProject(
  process.env.AZURE_DEVOPS_ORG,
  'MyProduct',
  process.env.AZURE_DEVOPS_PAT
);

**Display area paths:**

Found 6 area paths in project MyProduct:

  1. โ˜‘ MyProduct\Frontend (45 active items)
  2. โ˜‘ MyProduct\Backend (78 active items)
  3. โ˜‘ MyProduct\Mobile (23 active items)
  4. โ˜‘ MyProduct\DevOps (12 active items)
  5. โ˜ MyProduct\Archive (0 items) [deselected - archive]
  6. โ˜ MyProduct (root) [deselected - root level]

Select area paths to import (Space to toggle, Enter to confirm)

Step 4: Map Area Paths to SpecWeave Projects

For each selected area path, prompt for SpecWeave project ID:

๐Ÿท๏ธ  Mapping area paths to SpecWeave projects:

Area path "MyProduct\Frontend" โ†’ SpecWeave project ID: [fe]
  โ†’ Include child area paths? [Y/n]: y
  โ†’ Keywords for auto-classification (optional): frontend, ui, angular, css

Area path "MyProduct\Backend" โ†’ SpecWeave project ID: [be]
  โ†’ Include child area paths? [Y/n]: y
  โ†’ Keywords for auto-classification (optional): api, server, database, c#

Area path "MyProduct\Mobile" โ†’ SpecWeave project ID: [mobile]
  โ†’ Include child area paths? [Y/n]: y
  โ†’ Keywords for auto-classification (optional): ios, android, xamarin

Area path "MyProduct\DevOps" โ†’ SpecWeave project ID: [devops]
  โ†’ Include child area paths? [Y/n]: y
  โ†’ Keywords for auto-classification (optional): infrastructure, ci, cd, terraform

**Project ID validation:**

  • Must be lowercase, alphanumeric with hyphens
  • Must not collide with existing project IDs
  • If collision detected, suggest prefixed version: `myproduct-fe` instead of `fe`

Step 5: Create Directory Structure

Create 2-level directory structure:

.specweave/docs/internal/specs/
โ””โ”€โ”€ ADO-myproduct/              โ† Level 1: ADO project
    โ”œโ”€โ”€ fe/                     โ† Level 2: SpecWeave project
    โ”‚   โ””โ”€โ”€ .gitkeep
    โ”œโ”€โ”€ be/
    โ”‚   โ””โ”€โ”€ .gitkeep
    โ”œโ”€โ”€ mobile/
    โ”‚   โ””โ”€โ”€ .gitkeep
    โ””โ”€โ”€ devops/
        โ””โ”€โ”€ .gitkeep

Step 6: Update config.json

Add area path mapping to config:

{
  "sync": {
    "profiles": {
      "ado-default": {
        "provider": "ado",
        "config": {
          "organization": "myorg",
          "areaPathMapping": {
            "project": "MyProduct",
            "mappings": [
              {
                "areaPath": "MyProduct\\Frontend",
                "specweaveProject": "fe",
                "includeChildren": true,
                "keywords": ["frontend", "ui", "angular", "css"]
              },
              {
                "areaPath": "MyProduct\\Backend",
                "specweaveProject": "be",
                "includeChildren": true,
                "keywords": ["api", "server", "database", "c#"]
              },
              {
                "areaPath": "MyProduct\\Mobile",
                "specweaveProject": "mobile",
                "includeChildren": true,
                "keywords": ["ios", "android", "xamarin"]
              },
              {
                "areaPath": "MyProduct\\DevOps",
                "specweaveProject": "devops",
                "includeChildren": true,
                "keywords": ["infrastructure", "ci", "cd", "terraform"]
              }
            ]
          }
        }
      }
    }
  },
  "multiProject": {
    "enabled": true,
    "activeProject": "fe",
    "projects": {
      "fe": {
        "name": "Frontend",
        "externalTools": {
          "ado": {
            "areaPath": "MyProduct\\Frontend",
            "project": "MyProduct"
          }
        }
      },
      "be": {
        "name": "Backend",
        "externalTools": {
          "ado": {
            "areaPath": "MyProduct\\Backend",
            "project": "MyProduct"
          }
        }
      },
      "mobile": {
        "name": "Mobile",
        "externalTools": {
          "ado": {
            "areaPath": "MyProduct\\Mobile",
            "project": "MyProduct"
          }
        }
      },
      "devops": {
        "name": "DevOps",
        "externalTools": {
          "ado": {
            "areaPath": "MyProduct\\DevOps",
            "project": "MyProduct"
          }
        }
      }
    }
  }
}

Step 7: Display Summary

โœ… Azure DevOps Area Paths Import Complete!

๐Ÿ”ท ADO Project: MyProduct
๐Ÿ“ Created: .specweave/docs/internal/specs/ADO-myproduct/

Area paths imported:
  โœ“ MyProduct\Frontend โ†’ fe (includes children)
    Keywords: frontend, ui, angular, css
  โœ“ MyProduct\Backend โ†’ be (includes children)
    Keywords: api, server, database, c#
  โœ“ MyProduct\Mobile โ†’ mobil
Read more
Ships withspecweave

Spec-first AI development: describe a feature โ†’ AI creates spec + plan + tasks, builds autonomously, syncs to GitHub/JIRA. Domain-expert skills for PM, Architect, Frontend, QA learn your patterns permanently. Claude Code, Codex, Cursor, Copilot & more.

Get the whole plugin