name: multi-project-spec-mapper
description: Intelligent multi-project specification splitting and organization. Analyzes user stories to map them to correct projects (FE, BE, MOBILE, INFRA) based on content, tech stack, and component architecture. Creates project-specific folder structure and splits monolithic specs. Activates for multi-project JIRA/GitHub setups, brownfield projects with multiple teams, microservices architecture. Keywords: multi-project, project mapping, spec splitting, JIRA projects, multiple projects, microservices, FE/BE/MOBILE split, intelligent classification.
Multi-Project Spec Mapper - Intelligent Project Organization
Purpose: Automatically detect multiple projects in SpecWeave setup, analyze user stories to map them to the correct project (FE, BE, MOBILE, INFRA), and organize specs into project-specific folders with proper JIRA/GitHub sync.
When to Use:
- User has multiple JIRA projects configured (e.g., FE, BE, MOBILE)
- User has multiple GitHub repos to sync
- Brownfield projects with multiple teams/services
- Microservices architecture with separate frontend/backend/mobile codebases
- Need to split monolithic spec into project-specific specs
Key Capabilities:
- ✅ Intelligent Project Detection - Analyze config.json to detect multi-project setup
- ✅ User Story Classification - Map user stories to projects based on keywords, tech stack, components
- ✅ Spec Splitting - Split monolithic specs into project-specific files
- ✅ Folder Organization - Create
specs/FE/, specs/BE/, specs/MOBILE/ structure
- ✅ JIRA Item Type Mapping - Suggest Epic/Story/Task hierarchy based on scope
- ✅ Bidirectional Sync - Configure hooks for GitHub/JIRA sync per project
How It Works
Step 1: Detect Multi-Project Setup
Check config.json for:
{
"sync": {
"profiles": {
"jira-default": {
"provider": "jira",
"config": {
"domain": "company.atlassian.net",
"projects": ["FE", "BE", "MOBILE"] // ← Multiple projects!
}
}
}
}
}
If multiple projects found → Activate multi-project mode
Step 2: Analyze User Stories
For each user story, analyze:
- Keywords: "UI", "chart", "API", "mobile", "database", "deployment"
- Tech Stack: "React", "Node.js", "React Native", "PostgreSQL", "Kubernetes"
- Components: "component", "service", "screen", "controller", "pipeline"
Example:
US-001: Log a Workout (Web UI)
→ Keywords: "UI", "web", "chart"
→ Tech: "React"
→ Project: FE (90% confidence)
US-002: View Workout History (API)
→ Keywords: "API", "endpoint", "database"
→ Tech: "Node.js", "PostgreSQL"
→ Project: BE (95% confidence)
US-005: Cross-Platform Data Sync (Mobile)
→ Keywords: "mobile", "offline", "sync"
→ Tech: "React Native"
→ Project: MOBILE (100% confidence)
Step 3: Create Project-Specific Specs
Folder Structure:
.specweave/docs/internal/specs/
├── FE/
│ ├── spec-0001-fitness-tracker-web.md
│ └── README.md
├── BE/
│ ├── spec-0001-fitness-tracker-api.md
│ └── README.md
├── MOBILE/
│ ├── spec-0001-fitness-tracker-mobile.md
│ └── README.md
└── SHARED/
├── spec-0001-fitness-tracker-shared.md (cross-cutting concerns)
└── README.md
spec.md YAML Frontmatter (v0.31.0+ MANDATORY):
# For 1-level structure (projects only)
---
increment: 0001-fitness-tracker-web
project: FE # REQUIRED
title: "Fitness Tracker Web UI"
status: planned
---
# For 2-level structure (projects + boards)
---
increment: 0001-fitness-tracker-web
project: acme-corp # REQUIRED
board: digital-operations # REQUIRED for 2-level
title: "Fitness Tracker Web UI"
status: planned
---
Detection: Use detectStructureLevel() from src/utils/structure-level-detector.ts
Each spec contains:
- YAML frontmatter with
project: (and board: for 2-level) fields - MANDATORY
- User stories mapped to that project
- Project-specific acceptance criteria
- Links to shared infrastructure/requirements
Step 4: JIRA Sync with Project Mapping
Hierarchical JIRA Structure:
JIRA Project: FE
├── Epic: Fitness Tracker Web UI (SPEC-0001)
│ ├── Story: US-001: Log a Workout
│ │ ├── Task: T-001: Create Workout Form Component
│ │ ├── Task: T-002: Implement Exercise Search
│ │ └── Task: T-003: Add Set Logging UI
│ └── Story: US-004: Track Progress with Charts
│ ├── Task: T-010: Integrate Recharts Library
│ └── Task: T-011: Create Chart Components
JIRA Project: BE
├── Epic: Fitness Tracker API Backend (SPEC-0001)
│ ├── Story: US-002: View Workout History (API)
│ │ ├── Task: T-004: Create GET /api/workouts Endpoint
│ │ ├── Task: T-005: Implement Filtering Logic
│ │ └── Task: T-006: Add Pagination
│ └── Story: US-003: Manage Exercise Library (API)
│ ├── Task: T-007: Create Exercise CRUD Endpoints
│ └── Task: T-008: Implement Search
JIRA Project: MOBILE
├── Epic: Fitness Tracker Mobile App (SPEC-0001)
└── Story: US-005: Cross-Platform Data Sync
├── Task: T-012: Implement Offline Mode (AsyncStorage)
├── Task: T-013: Create Sync Queue
└── Task: T-014: Handle Conflict Resolution
Step 5: Configure Bidirectional Sync
GitHub Hooks (.specweave/config.json):
{
"hooks": {
"post_task_completion": {
"sync_living_docs": true,
"external_tracker_sync": true
}
},
"sync": {
"enabled": true,
"activeProfile": "jira-default",
"settings": {
"autoCreateIssue": true,
"syncDirection": "bidirectional",
"projectMapping": {
"FE": {
"jiraProject": "FE",
"jiraBoards": [123],
"githubRepo": "company/frontend-web"
},
"BE": {
"jiraProject": "BE",
"jiraBoards": [456],
"githubRepo": "company/backend-api"
},
"MOBILE": {
"jiraProject": "MOBILE",
"jiraBoards": [789],
"githubRepo": "company/mobile-app"
}
}
}
}
}
Project Mapping Rules
Frontend (FE)
Keywords:
- UI/UX: button, form, input, page, view, screen, modal, dropdown
- Visualization: chart, graph, dashboard, widget
- Styling: CSS, theme, dark mode, responsive
- State: Redux, Zustand, context, state management
Tech Stack:
- React, Vue, Angular, Next.js, Svelte
- TypeScript, JavaScript
- Tailwind, Material-UI, Chakra, Ant Design
- Recharts, D3, Chart.js
Components:
- Component, hook, context, provider, page, layout
Confidence: 30%+ for primary match
Backend (BE)
Keywords:
- API: endpoint, REST, GraphQL, route
- Database: query, migration, schema, model
- Auth: authentication, JWT, session, token
- Processing: queue, job, worker, cron, batch
Tech Stack:
- Node.js (Express, Fastify, NestJS)
- Python (FastAPI, Django, Flask)
- Java (Spring Boot), .NET (ASP.NET)
- PostgreSQL, MySQL, MongoDB, Redis
Components:
- Controller, service, repository, middleware, handler
Confidence: 30%+ for primary match
Mobile (MOBILE)
Keywords:
- Mobile: native, iOS, Android, cross-platform
- Device: camera, GPS, push notification, offline
- Navigation: tab bar, drawer, stack, screen transition
- Storage: AsyncStorage, local database
Tech Stack:
- React Native, Expo, Flutter
- Swift, Kotlin
- React Navigation
Components:
- Screen, navigator, bottom-sheet, drawer
Exclude: "web" keyword (penalty)
Confidence: 30%+ for primary match
Infrastructure (INFRA)
Keywords:
- DevOps: deployment, CI/CD, Docker, Kubernetes
- Monitoring: logging, metrics, alerting, SLO
- Security: SSL, TLS, firewall, VPC
- Scalability: load balancing, CDN, backup
Tech Stack:
- AWS, Azure, GCP
- Kubernetes, Docker, Terraform
- Jenkins, GitHub Actions, GitLab CI
- Prometheus, Grafana, Datadog
Components:
- Pipeline, manifest, Helm chart, Terraform module
Confidence: 30%+ for primary match
JIRA Item Type Hierarchy
Epic (> 13 story points):
- Large feature area spanning multiple stories
- Example: "Fitness Tracker MVP" (29 story points total)
Story (3-13 story points):
- Standard user story with clear value
- Example: "US-001: Log a Workout" (8 story points)
Task (1-2 story points):
- Small implementation task
- Example: "T-001: Create Workout Form Component" (2 story points)
Subtask (< 1 story point):
- Granular work item
- Example: "Create POST /api/workouts endpoint" (0.5 story points)
Usage Examples
Example 1: Fitness Tracker (Multi-Project)
Input: Monolithic spec with 35 user stories
Detection:
✓ Multi-project setup detected:
- FE (Frontend Web)
- BE (Backend API)
- MOBILE (React Native)
Classification:
Analyzing 35 user stories...
✓ US-001: Log a Workout → FE (90% confidence: React, UI, chart)
✓ US-002: View Workout History → BE (95% confidence: API, database, query)
✓ US-004: Track Progress with Charts → FE (100% confidence: Recharts, visualization)
✓ US-005: Cross-Platform Data Sync → MOBILE (100% confidence: React Native, offline)
Project Distribution:
- FE: 12 user stories (34%)
- BE: 15 user stories (43%)
- MOBILE: 6 user stories (17%)
- SHARED: 2 user stories (6%)
Output:
Creating project-specific specs...
✓ specs/FE/spec-0001-fitness-tracker-web.md (12 user stories)
✓ specs/BE/spec-0001-fitness-tracker-api.md (15 user stories)
✓ specs/MOBILE/spec-0001-fitness-tracker-mobile.md (6 user stories)
✓ specs/SHARED/spec-0001-fitness-tracker-shared.md (2 user stories)
JIRA Sync Configuration:
✓ FE → JIRA Project FE (Board 123)
✓ BE → JIRA Project BE (Board 456)
✓ MOBILE → JIRA Project MOBILE (Board 789)
Example 2: Microservices E-Commerce
Input: Spec for multi-service platform
Detection:
✓ Multi-project setup detected:
- FRONTEND (Web storefront)
- PRODUCT-SVC (Product service)
- ORDER-SVC (Order service)
- PAYMENT-SVC (Payment service)
- INFRA (Kubernetes + monitoring)
Classification:
Analyzing 50 user stories...
✓ US-010: Product Catalog UI → FRONTEND (95%)
✓ US-011: Product Search API → PRODUCT-SVC (100%)
✓ US-020: Shopping Cart → ORDER-SVC (90%)
✓ US-030: Stripe Integration → PAYMENT-SVC (100%)
✓ US-040: Kubernetes Deployment → INFRA (100%)
Project Distribution:
- FRONTEND: 15 user stories
- PRODUCT-SVC: 12 user stories
- ORDER-SVC: 10 user stories
- PAYMENT-SVC: 8 user stories
- INFRA: 5 user stories
Configuration
Enable Multi-Project Mode in .specweave/config.json:
{
"multiProject": {
"enabled": true,
"autoDetect": true,
"customRules": {
"FE": {
"keywords": ["react", "ui", "chart"],
"techStack": ["react", "typescript", "recharts"],
"confidenceThreshold": 0.3
}
}
}
}
Related Skills
- spec-generator: Creates comprehensive specs (uses this skill for multi-project splitting)
- increment-planner: Plans increments (uses this skill to assign work to projects)
- jira-sync: Syncs to JIRA (uses project mappings from this skill)
- github-sync: Syncs to GitHub (uses project mappings from this skill)
Version History
- v1.0.0 (0.14.0): Initial release with intelligent project mapping
- Based on: Increment 0020-multi-project-intelligent-sync
1---2name: multi-project-spec-mapper-23description: Purpose: Automatically detect multiple projects in SpecWeave setup, analyze user stories to map them to the correct project (FE, BE, MOBILE, INFRA), and organize specs into project-specific folders with proper JIRA/GitHub sync.4---56---7name: multi-project-spec-mapper8description: Intelligent multi-project specification splitting and organization. Analyzes user stories to map them to correct projects (FE, BE, MOBILE, INFRA) based on content, tech stack, and component architecture. Creates project-specific folder structure and splits monolithic specs. Activates for multi-project JIRA/GitHub setups, brownfield projects with multiple teams, microservices architecture. Keywords: multi-project, project mapping, spec splitting, JIRA projects, multiple projects, microservices, FE/BE/MOBILE split, intelligent classification.9---1011# Multi-Project Spec Mapper - Intelligent Project Organization1213**Purpose**: Automatically detect multiple projects in SpecWeave setup, analyze user stories to map them to the correct project (FE, BE, MOBILE, INFRA), and organize specs into project-specific folders with proper JIRA/GitHub sync.1415**When to Use**:16- User has multiple JIRA projects configured (e.g., FE, BE, MOBILE)17- User has multiple GitHub repos to sync18- Brownfield projects with multiple teams/services19- Microservices architecture with separate frontend/backend/mobile codebases20- Need to split monolithic spec into project-specific specs2122**Key Capabilities**:231. ✅ **Intelligent Project Detection** - Analyze config.json to detect multi-project setup242. ✅ **User Story Classification** - Map user stories to projects based on keywords, tech stack, components253. ✅ **Spec Splitting** - Split monolithic specs into project-specific files264. ✅ **Folder Organization** - Create `specs/FE/`, `specs/BE/`, `specs/MOBILE/` structure275. ✅ **JIRA Item Type Mapping** - Suggest Epic/Story/Task hierarchy based on scope286. ✅ **Bidirectional Sync** - Configure hooks for GitHub/JIRA sync per project2930---3132## How It Works3334### Step 1: Detect Multi-Project Setup3536**Check config.json** for:37```json38{39 "sync": {40 "profiles": {41 "jira-default": {42 "provider": "jira",43 "config": {44 "domain": "company.atlassian.net",45 "projects": ["FE", "BE", "MOBILE"] // ← Multiple projects!46 }47 }48 }49 }50}51```5253**If multiple projects found** → Activate multi-project mode5455---5657### Step 2: Analyze User Stories5859For each user story, analyze:60- **Keywords**: "UI", "chart", "API", "mobile", "database", "deployment"61- **Tech Stack**: "React", "Node.js", "React Native", "PostgreSQL", "Kubernetes"62- **Components**: "component", "service", "screen", "controller", "pipeline"6364**Example**:65```66US-001: Log a Workout (Web UI)67→ Keywords: "UI", "web", "chart"68→ Tech: "React"69→ Project: FE (90% confidence)7071US-002: View Workout History (API)72→ Keywords: "API", "endpoint", "database"73→ Tech: "Node.js", "PostgreSQL"74→ Project: BE (95% confidence)7576US-005: Cross-Platform Data Sync (Mobile)77→ Keywords: "mobile", "offline", "sync"78→ Tech: "React Native"79→ Project: MOBILE (100% confidence)80```8182---8384### Step 3: Create Project-Specific Specs8586**Folder Structure**:87```88.specweave/docs/internal/specs/89├── FE/90│ ├── spec-0001-fitness-tracker-web.md91│ └── README.md92├── BE/93│ ├── spec-0001-fitness-tracker-api.md94│ └── README.md95├── MOBILE/96│ ├── spec-0001-fitness-tracker-mobile.md97│ └── README.md98└── SHARED/99 ├── spec-0001-fitness-tracker-shared.md (cross-cutting concerns)100 └── README.md101```102103**spec.md YAML Frontmatter (v0.31.0+ MANDATORY)**:104105```yaml106# For 1-level structure (projects only)107---108increment: 0001-fitness-tracker-web109project: FE # REQUIRED110title: "Fitness Tracker Web UI"111status: planned112---113114# For 2-level structure (projects + boards)115---116increment: 0001-fitness-tracker-web117project: acme-corp # REQUIRED118board: digital-operations # REQUIRED for 2-level119title: "Fitness Tracker Web UI"120status: planned121---122```123124**Detection**: Use `detectStructureLevel()` from `src/utils/structure-level-detector.ts`125126**Each spec contains**:127- YAML frontmatter with `project:` (and `board:` for 2-level) fields - MANDATORY128- User stories mapped to that project129- Project-specific acceptance criteria130- Links to shared infrastructure/requirements131132---133134### Step 4: JIRA Sync with Project Mapping135136**Hierarchical JIRA Structure**:137```138JIRA Project: FE139├── Epic: Fitness Tracker Web UI (SPEC-0001)140│ ├── Story: US-001: Log a Workout141│ │ ├── Task: T-001: Create Workout Form Component142│ │ ├── Task: T-002: Implement Exercise Search143│ │ └── Task: T-003: Add Set Logging UI144│ └── Story: US-004: Track Progress with Charts145│ ├── Task: T-010: Integrate Recharts Library146│ └── Task: T-011: Create Chart Components147148JIRA Project: BE149├── Epic: Fitness Tracker API Backend (SPEC-0001)150│ ├── Story: US-002: View Workout History (API)151│ │ ├── Task: T-004: Create GET /api/workouts Endpoint152│ │ ├── Task: T-005: Implement Filtering Logic153│ │ └── Task: T-006: Add Pagination154│ └── Story: US-003: Manage Exercise Library (API)155│ ├── Task: T-007: Create Exercise CRUD Endpoints156│ └── Task: T-008: Implement Search157158JIRA Project: MOBILE159├── Epic: Fitness Tracker Mobile App (SPEC-0001)160 └── Story: US-005: Cross-Platform Data Sync161 ├── Task: T-012: Implement Offline Mode (AsyncStorage)162 ├── Task: T-013: Create Sync Queue163 └── Task: T-014: Handle Conflict Resolution164```165166---167168### Step 5: Configure Bidirectional Sync169170**GitHub Hooks** (`.specweave/config.json`):171```json172{173 "hooks": {174 "post_task_completion": {175 "sync_living_docs": true,176 "external_tracker_sync": true177 }178 },179 "sync": {180 "enabled": true,181 "activeProfile": "jira-default",182 "settings": {183 "autoCreateIssue": true,184 "syncDirection": "bidirectional",185 "projectMapping": {186 "FE": {187 "jiraProject": "FE",188 "jiraBoards": [123],189 "githubRepo": "company/frontend-web"190 },191 "BE": {192 "jiraProject": "BE",193 "jiraBoards": [456],194 "githubRepo": "company/backend-api"195 },196 "MOBILE": {197 "jiraProject": "MOBILE",198 "jiraBoards": [789],199 "githubRepo": "company/mobile-app"200 }201 }202 }203 }204}205```206207---208209## Project Mapping Rules210211### Frontend (FE)212213**Keywords**:214- UI/UX: button, form, input, page, view, screen, modal, dropdown215- Visualization: chart, graph, dashboard, widget216- Styling: CSS, theme, dark mode, responsive217- State: Redux, Zustand, context, state management218219**Tech Stack**:220- React, Vue, Angular, Next.js, Svelte221- TypeScript, JavaScript222- Tailwind, Material-UI, Chakra, Ant Design223- Recharts, D3, Chart.js224225**Components**:226- Component, hook, context, provider, page, layout227228**Confidence**: 30%+ for primary match229230---231232### Backend (BE)233234**Keywords**:235- API: endpoint, REST, GraphQL, route236- Database: query, migration, schema, model237- Auth: authentication, JWT, session, token238- Processing: queue, job, worker, cron, batch239240**Tech Stack**:241- Node.js (Express, Fastify, NestJS)242- Python (FastAPI, Django, Flask)243- Java (Spring Boot), .NET (ASP.NET)244- PostgreSQL, MySQL, MongoDB, Redis245246**Components**:247- Controller, service, repository, middleware, handler248249**Confidence**: 30%+ for primary match250251---252253### Mobile (MOBILE)254255**Keywords**:256- Mobile: native, iOS, Android, cross-platform257- Device: camera, GPS, push notification, offline258- Navigation: tab bar, drawer, stack, screen transition259- Storage: AsyncStorage, local database260261**Tech Stack**:262- React Native, Expo, Flutter263- Swift, Kotlin264- React Navigation265266**Components**:267- Screen, navigator, bottom-sheet, drawer268269**Exclude**: "web" keyword (penalty)270271**Confidence**: 30%+ for primary match272273---274275### Infrastructure (INFRA)276277**Keywords**:278- DevOps: deployment, CI/CD, Docker, Kubernetes279- Monitoring: logging, metrics, alerting, SLO280- Security: SSL, TLS, firewall, VPC281- Scalability: load balancing, CDN, backup282283**Tech Stack**:284- AWS, Azure, GCP285- Kubernetes, Docker, Terraform286- Jenkins, GitHub Actions, GitLab CI287- Prometheus, Grafana, Datadog288289**Components**:290- Pipeline, manifest, Helm chart, Terraform module291292**Confidence**: 30%+ for primary match293294---295296## JIRA Item Type Hierarchy297298**Epic** (> 13 story points):299- Large feature area spanning multiple stories300- Example: "Fitness Tracker MVP" (29 story points total)301302**Story** (3-13 story points):303- Standard user story with clear value304- Example: "US-001: Log a Workout" (8 story points)305306**Task** (1-2 story points):307- Small implementation task308- Example: "T-001: Create Workout Form Component" (2 story points)309310**Subtask** (< 1 story point):311- Granular work item312- Example: "Create POST /api/workouts endpoint" (0.5 story points)313314---315316## Usage Examples317318### Example 1: Fitness Tracker (Multi-Project)319320**Input**: Monolithic spec with 35 user stories321322**Detection**:323```324✓ Multi-project setup detected:325 - FE (Frontend Web)326 - BE (Backend API)327 - MOBILE (React Native)328```329330**Classification**:331```332Analyzing 35 user stories...333✓ US-001: Log a Workout → FE (90% confidence: React, UI, chart)334✓ US-002: View Workout History → BE (95% confidence: API, database, query)335✓ US-004: Track Progress with Charts → FE (100% confidence: Recharts, visualization)336✓ US-005: Cross-Platform Data Sync → MOBILE (100% confidence: React Native, offline)337338Project Distribution:339- FE: 12 user stories (34%)340- BE: 15 user stories (43%)341- MOBILE: 6 user stories (17%)342- SHARED: 2 user stories (6%)343```344345**Output**:346```347Creating project-specific specs...348✓ specs/FE/spec-0001-fitness-tracker-web.md (12 user stories)349✓ specs/BE/spec-0001-fitness-tracker-api.md (15 user stories)350✓ specs/MOBILE/spec-0001-fitness-tracker-mobile.md (6 user stories)351✓ specs/SHARED/spec-0001-fitness-tracker-shared.md (2 user stories)352353JIRA Sync Configuration:354✓ FE → JIRA Project FE (Board 123)355✓ BE → JIRA Project BE (Board 456)356✓ MOBILE → JIRA Project MOBILE (Board 789)357```358359---360361### Example 2: Microservices E-Commerce362363**Input**: Spec for multi-service platform364365**Detection**:366```367✓ Multi-project setup detected:368 - FRONTEND (Web storefront)369 - PRODUCT-SVC (Product service)370 - ORDER-SVC (Order service)371 - PAYMENT-SVC (Payment service)372 - INFRA (Kubernetes + monitoring)373```374375**Classification**:376```377Analyzing 50 user stories...378✓ US-010: Product Catalog UI → FRONTEND (95%)379✓ US-011: Product Search API → PRODUCT-SVC (100%)380✓ US-020: Shopping Cart → ORDER-SVC (90%)381✓ US-030: Stripe Integration → PAYMENT-SVC (100%)382✓ US-040: Kubernetes Deployment → INFRA (100%)383384Project Distribution:385- FRONTEND: 15 user stories386- PRODUCT-SVC: 12 user stories387- ORDER-SVC: 10 user stories388- PAYMENT-SVC: 8 user stories389- INFRA: 5 user stories390```391392---393394## Configuration395396**Enable Multi-Project Mode** in `.specweave/config.json`:397```json398{399 "multiProject": {400 "enabled": true,401 "autoDetect": true,402 "customRules": {403 "FE": {404 "keywords": ["react", "ui", "chart"],405 "techStack": ["react", "typescript", "recharts"],406 "confidenceThreshold": 0.3407 }408 }409 }410}411```412413---414415## Related Skills416417- **spec-generator**: Creates comprehensive specs (uses this skill for multi-project splitting)418- **increment-planner**: Plans increments (uses this skill to assign work to projects)419- **jira-sync**: Syncs to JIRA (uses project mappings from this skill)420- **github-sync**: Syncs to GitHub (uses project mappings from this skill)421422---423424## Version History425426- **v1.0.0** (0.14.0): Initial release with intelligent project mapping427- Based on: Increment 0020-multi-project-intelligent-sync