specweave 0.28.9 → 0.28.13
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/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +35 -8
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/helpers/init/index.d.ts +2 -0
- package/dist/src/cli/helpers/init/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/index.js +4 -0
- package/dist/src/cli/helpers/init/index.js.map +1 -1
- package/dist/src/cli/helpers/init/language-selection.d.ts +40 -0
- package/dist/src/cli/helpers/init/language-selection.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/language-selection.js +281 -0
- package/dist/src/cli/helpers/init/language-selection.js.map +1 -0
- package/dist/src/cli/helpers/init/repository-setup.d.ts +2 -0
- package/dist/src/cli/helpers/init/repository-setup.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/repository-setup.js +156 -12
- package/dist/src/cli/helpers/init/repository-setup.js.map +1 -1
- package/dist/src/cli/helpers/init/translation-config.d.ts +61 -0
- package/dist/src/cli/helpers/init/translation-config.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/translation-config.js +437 -0
- package/dist/src/cli/helpers/init/translation-config.js.map +1 -0
- package/dist/src/cli/helpers/init/types.d.ts +33 -0
- package/dist/src/cli/helpers/init/types.d.ts.map +1 -1
- package/dist/src/core/config/types.d.ts +143 -0
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/repo-structure/repo-id-generator.d.ts +24 -95
- package/dist/src/core/repo-structure/repo-id-generator.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-id-generator.js +31 -223
- package/dist/src/core/repo-structure/repo-id-generator.js.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.js +12 -46
- package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
- package/dist/src/sync/sync-coordinator.d.ts +5 -0
- package/dist/src/sync/sync-coordinator.d.ts.map +1 -1
- package/dist/src/sync/sync-coordinator.js +104 -6
- package/dist/src/sync/sync-coordinator.js.map +1 -1
- package/dist/src/utils/multi-repo-detector.d.ts +85 -0
- package/dist/src/utils/multi-repo-detector.d.ts.map +1 -0
- package/dist/src/utils/multi-repo-detector.js +264 -0
- package/dist/src/utils/multi-repo-detector.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/agents/pm/AGENT.md +178 -0
- package/plugins/specweave/agents/test-aware-planner/AGENT.md +54 -0
- package/plugins/specweave/commands/specweave-increment.md +30 -0
- package/plugins/specweave/commands/specweave-save.md +838 -0
- package/plugins/specweave/hooks/hooks.json +12 -0
- package/plugins/specweave/hooks/lib/update-status-line.sh +9 -1
- package/plugins/specweave/hooks/post-increment-completion.sh +4 -3
- package/plugins/specweave/hooks/post-increment-planning.sh +95 -51
- package/plugins/specweave/hooks/post-metadata-change.sh +18 -4
- package/plugins/specweave/hooks/pre-task-completion-edit.sh +355 -0
- package/plugins/specweave/lib/hooks/sync-living-docs.js +43 -0
- package/plugins/specweave/skills/increment-planner/SKILL.md +252 -2
- package/plugins/specweave/skills/spec-generator/SKILL.md +163 -0
- package/plugins/specweave/skills/umbrella-repo-detector/SKILL.md +286 -0
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +18 -0
- package/plugins/specweave-infrastructure/skills/hetzner-provisioner/README.md +1 -1
- package/plugins/specweave-release/commands/specweave-release-npm.md +14 -22
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +27 -0
|
@@ -437,6 +437,184 @@ graph TD
|
|
|
437
437
|
|
|
438
438
|
---
|
|
439
439
|
|
|
440
|
+
## 🔀 Multi-Repo Project-Scoped User Stories (v0.28.8+)
|
|
441
|
+
|
|
442
|
+
**⚠️ CRITICAL - MANDATORY CHECK BEFORE GENERATING ANY SPEC.MD!**
|
|
443
|
+
|
|
444
|
+
### STEP 0: Multi-Project Detection (RUN FIRST!)
|
|
445
|
+
|
|
446
|
+
**YOU MUST CHECK THIS BEFORE WRITING ANY USER STORIES:**
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
# 1. Check config.json for umbrella mode
|
|
450
|
+
cat .specweave/config.json | jq '.umbrella.enabled'
|
|
451
|
+
|
|
452
|
+
# 2. Check for childRepos
|
|
453
|
+
cat .specweave/config.json | jq '.umbrella.childRepos[]'
|
|
454
|
+
|
|
455
|
+
# 3. Check for project folders
|
|
456
|
+
ls -la .specweave/docs/internal/specs/
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
**Decision Flow:**
|
|
460
|
+
```
|
|
461
|
+
Is umbrella.enabled: true?
|
|
462
|
+
→ YES → MUST use project-scoped user stories (US-FE-001, US-BE-001)
|
|
463
|
+
→ NO → Check for multiple project folders in specs/
|
|
464
|
+
→ YES → MUST use project-scoped user stories
|
|
465
|
+
→ NO → Use standard user stories (US-001, US-002)
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
**If multi-project detected, NEVER generate:**
|
|
469
|
+
- ❌ `US-001`, `US-002` (generic format)
|
|
470
|
+
- ❌ `AC-US1-01`, `AC-US2-01` (generic AC format)
|
|
471
|
+
|
|
472
|
+
**ALWAYS generate:**
|
|
473
|
+
- ✅ `US-FE-001`, `US-BE-001`, `US-SHARED-001` (project-scoped)
|
|
474
|
+
- ✅ `AC-FE-US1-01`, `AC-BE-US1-01` (project-scoped ACs)
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
### Detection Patterns
|
|
479
|
+
|
|
480
|
+
Detect multi-repo intent when user mentions:
|
|
481
|
+
- **Explicit repos**: "3 repos", "multiple repos", "separate repos"
|
|
482
|
+
- **Repo types**: "Frontend repo", "Backend API repo", "Shared library"
|
|
483
|
+
- **Architecture patterns**: "monorepo with services", "microservices"
|
|
484
|
+
- **Tech stack splits**: React frontend + Node backend + Shared types
|
|
485
|
+
- **GitHub URLs**: Multiple github.com/... URLs
|
|
486
|
+
|
|
487
|
+
### User Story Prefixing Rules (MANDATORY!)
|
|
488
|
+
|
|
489
|
+
**When multi-repo detected, NEVER generate generic `US-001`!**
|
|
490
|
+
|
|
491
|
+
| Repo Type | Prefix | Detection Keywords |
|
|
492
|
+
|-----------|--------|-------------------|
|
|
493
|
+
| Frontend | `FE` | UI, component, page, form, view, theme, drag-drop, builder, menu display |
|
|
494
|
+
| Backend | `BE` | API, endpoint, CRUD, webhook, notification, analytics, database, service |
|
|
495
|
+
| Shared | `SHARED` | validator, schema, types, utilities, localization, common, helpers |
|
|
496
|
+
| Mobile | `MOBILE` | iOS, Android, mobile app, push notification, native |
|
|
497
|
+
| Infrastructure | `INFRA` | Terraform, K8s, Docker, CI/CD, deployment |
|
|
498
|
+
|
|
499
|
+
### Example: Generic vs Project-Scoped
|
|
500
|
+
|
|
501
|
+
**❌ WRONG (Generic - for single-repo only)**:
|
|
502
|
+
```markdown
|
|
503
|
+
## User Stories
|
|
504
|
+
|
|
505
|
+
### US-001: User Registration
|
|
506
|
+
As a user, I want to register...
|
|
507
|
+
|
|
508
|
+
### US-002: Registration API
|
|
509
|
+
As a system, I want to process registrations...
|
|
510
|
+
|
|
511
|
+
### US-003: Validation Schema
|
|
512
|
+
As a developer, I want shared validation...
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
**✅ CORRECT (Project-Scoped - for multi-repo)**:
|
|
516
|
+
```markdown
|
|
517
|
+
## User Stories
|
|
518
|
+
|
|
519
|
+
### US-FE-001: User Registration Form
|
|
520
|
+
**Related Repo**: frontend
|
|
521
|
+
As a user, I want to fill out the registration form...
|
|
522
|
+
|
|
523
|
+
### US-BE-001: Registration API Endpoint
|
|
524
|
+
**Related Repo**: backend
|
|
525
|
+
As a system, I want to process POST /api/register...
|
|
526
|
+
|
|
527
|
+
### US-SHARED-001: Registration Validation Schema
|
|
528
|
+
**Related Repo**: shared
|
|
529
|
+
As a developer, I want reusable validation schemas...
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
### Acceptance Criteria Also Prefixed
|
|
533
|
+
|
|
534
|
+
```markdown
|
|
535
|
+
### US-FE-001: Menu Builder Interface
|
|
536
|
+
|
|
537
|
+
**Acceptance Criteria**:
|
|
538
|
+
- [ ] **AC-FE-US1-01**: Drag-drop menu item ordering
|
|
539
|
+
- Priority: P0 (Critical)
|
|
540
|
+
- Testable: Yes
|
|
541
|
+
- [ ] **AC-FE-US1-02**: Category management UI
|
|
542
|
+
- Priority: P0 (Critical)
|
|
543
|
+
- Testable: Yes
|
|
544
|
+
|
|
545
|
+
### US-BE-001: Menu CRUD API
|
|
546
|
+
|
|
547
|
+
**Acceptance Criteria**:
|
|
548
|
+
- [ ] **AC-BE-US1-01**: POST /api/menus creates menu
|
|
549
|
+
- Priority: P0 (Critical)
|
|
550
|
+
- Testable: Yes
|
|
551
|
+
- [ ] **AC-BE-US1-02**: GET /api/menus/:id returns menu
|
|
552
|
+
- Priority: P0 (Critical)
|
|
553
|
+
- Testable: Yes
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
### Cross-Cutting User Stories
|
|
557
|
+
|
|
558
|
+
For features that span multiple repos (auth, shared state):
|
|
559
|
+
|
|
560
|
+
```markdown
|
|
561
|
+
### US-AUTH-001: OAuth Integration (Cross-Project)
|
|
562
|
+
**Related Repos**: frontend, backend
|
|
563
|
+
**Tags**: ["cross-project", "auth"]
|
|
564
|
+
|
|
565
|
+
**Child Stories**:
|
|
566
|
+
- US-FE-002: OAuth Login Button (frontend)
|
|
567
|
+
- US-BE-002: OAuth Token Validation (backend)
|
|
568
|
+
- US-SHARED-002: OAuth Types (shared)
|
|
569
|
+
|
|
570
|
+
As a user, I want to log in with Google OAuth...
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
### Workflow in Multi-Repo Mode
|
|
574
|
+
|
|
575
|
+
1. **Detect** multi-repo intent from user prompt
|
|
576
|
+
2. **Confirm** with user: "I detected FE/BE/Shared architecture. Should I create project-scoped user stories?"
|
|
577
|
+
3. **Generate** prefixed user stories: US-FE-*, US-BE-*, US-SHARED-*
|
|
578
|
+
4. **Route** stories to correct increment in each repo
|
|
579
|
+
5. **Sync** to each repo's own GitHub issues
|
|
580
|
+
|
|
581
|
+
### Config Check (Optional)
|
|
582
|
+
|
|
583
|
+
If `.specweave/config.json` has umbrella config:
|
|
584
|
+
```json
|
|
585
|
+
{
|
|
586
|
+
"umbrella": {
|
|
587
|
+
"enabled": true,
|
|
588
|
+
"childRepos": [
|
|
589
|
+
{ "id": "sw-app-fe", "prefix": "FE" },
|
|
590
|
+
{ "id": "sw-app-be", "prefix": "BE" },
|
|
591
|
+
{ "id": "sw-app-shared", "prefix": "SHARED" }
|
|
592
|
+
]
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
**ID Strategy**: `id` MUST match repo name (e.g., `sw-app-fe`), NOT arbitrary abbreviations (`fe`).
|
|
598
|
+
The `prefix` (for user stories like `US-FE-001`) can be short.
|
|
599
|
+
|
|
600
|
+
Use these prefixes for user stories. If no config, infer from user prompt.
|
|
601
|
+
|
|
602
|
+
### Why This Matters
|
|
603
|
+
|
|
604
|
+
Without project-scoped stories:
|
|
605
|
+
- ❌ All issues created in ONE repo (wrong!)
|
|
606
|
+
- ❌ No clarity which team owns what
|
|
607
|
+
- ❌ Cross-project dependencies unclear
|
|
608
|
+
- ❌ Frontend dev sees backend tasks in their repo
|
|
609
|
+
|
|
610
|
+
With project-scoped stories:
|
|
611
|
+
- ✅ Each repo gets only its user stories
|
|
612
|
+
- ✅ Clear ownership per team/repo
|
|
613
|
+
- ✅ GitHub issues in correct repo
|
|
614
|
+
- ✅ Clean separation of concerns
|
|
615
|
+
|
|
616
|
+
---
|
|
617
|
+
|
|
440
618
|
**Role**: Product Manager specialized in product strategy, requirements gathering, and feature prioritization.
|
|
441
619
|
|
|
442
620
|
## Purpose
|
|
@@ -125,6 +125,60 @@ The test-aware-planner agent is responsible for generating `tasks.md` with **emb
|
|
|
125
125
|
|
|
126
126
|
**CRITICAL**: v0.23.0+ requires hierarchical structure grouped by User Story.
|
|
127
127
|
|
|
128
|
+
### ⚠️ Multi-Project Mode Detection (v0.29.0+)
|
|
129
|
+
|
|
130
|
+
**BEFORE generating tasks, check for multi-project mode:**
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Check if multi-project mode is active
|
|
134
|
+
cat .specweave/config.json | jq '.umbrella.enabled'
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**If multi-project detected:**
|
|
138
|
+
- User stories will have prefixes: `US-FE-001`, `US-BE-001`, `US-SHARED-001`
|
|
139
|
+
- AC-IDs will have prefixes: `AC-FE-US1-01`, `AC-BE-US1-01`
|
|
140
|
+
- **Match the format from spec.md exactly!**
|
|
141
|
+
|
|
142
|
+
### Single-Project Format (umbrella.enabled: false)
|
|
143
|
+
|
|
144
|
+
```markdown
|
|
145
|
+
## User Story: US-001 - User Story Title
|
|
146
|
+
|
|
147
|
+
**Linked ACs**: AC-US1-01, AC-US1-02, AC-US1-03
|
|
148
|
+
**Tasks**: X total, 0 completed
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Multi-Project Format (umbrella.enabled: true)
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
## Phase 1: Shared Library (sw-app-shared)
|
|
155
|
+
|
|
156
|
+
### User Story: US-SHARED-001 - Common Types & Validators
|
|
157
|
+
|
|
158
|
+
**Linked ACs**: AC-SHARED-US1-01, AC-SHARED-US1-02
|
|
159
|
+
**Tasks**: X total, 0 completed
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Phase 2: Backend (sw-app-be)
|
|
164
|
+
|
|
165
|
+
### User Story: US-BE-001 - API Endpoints
|
|
166
|
+
|
|
167
|
+
**Linked ACs**: AC-BE-US1-01, AC-BE-US1-02
|
|
168
|
+
**Tasks**: X total, 0 completed
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Phase 3: Frontend (sw-app-fe)
|
|
173
|
+
|
|
174
|
+
### User Story: US-FE-001 - UI Components
|
|
175
|
+
|
|
176
|
+
**Linked ACs**: AC-FE-US1-01, AC-FE-US1-02
|
|
177
|
+
**Tasks**: X total, 0 completed
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
128
182
|
Each task in `tasks.md` follows this format:
|
|
129
183
|
|
|
130
184
|
```markdown
|
|
@@ -372,6 +372,36 @@ Proceeding with hotfix 0006...
|
|
|
372
372
|
- Find highest number across both directories (e.g., 032)
|
|
373
373
|
- Next increment: 033
|
|
374
374
|
|
|
375
|
+
### Step 1.5: Detect Multi-Project Mode (CRITICAL!)
|
|
376
|
+
|
|
377
|
+
**⚠️ MANDATORY CHECK before generating spec.md:**
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
# Check for umbrella configuration
|
|
381
|
+
UMBRELLA_ENABLED=$(cat .specweave/config.json 2>/dev/null | jq -r '.umbrella.enabled // false')
|
|
382
|
+
CHILD_REPOS=$(cat .specweave/config.json 2>/dev/null | jq -r '.umbrella.childRepos[]?.id // empty' | tr '\n' ',')
|
|
383
|
+
PROJECT_FOLDERS=$(ls -1 .specweave/docs/internal/specs/ 2>/dev/null | grep -v "^_" | head -5)
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**If multi-project detected:**
|
|
387
|
+
```
|
|
388
|
+
📁 Multi-Project Mode Detected!
|
|
389
|
+
|
|
390
|
+
Child Repos:
|
|
391
|
+
• FE: sw-thumbnail-ab-fe
|
|
392
|
+
• BE: sw-thumbnail-ab-be
|
|
393
|
+
• SHARED: sw-thumbnail-ab-shared
|
|
394
|
+
|
|
395
|
+
User stories will be generated with project prefixes:
|
|
396
|
+
• US-FE-001, US-FE-002 (Frontend stories)
|
|
397
|
+
• US-BE-001, US-BE-002 (Backend stories)
|
|
398
|
+
• US-SHARED-001 (Shared library stories)
|
|
399
|
+
|
|
400
|
+
Each story will include "Related Repo" field for clarity.
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**Pass this context to increment-planner skill!**
|
|
404
|
+
|
|
375
405
|
### Step 2: Detect tech stack (CRITICAL - framework-agnostic)
|
|
376
406
|
- Settings auto-detected
|
|
377
407
|
- If not found, detect from project files:
|