specweave 1.0.235 → 1.0.239
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/README.md +89 -193
- package/dist/plugins/specweave-github/lib/github-ac-comment-poster.d.ts +37 -0
- package/dist/plugins/specweave-github/lib/github-ac-comment-poster.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-ac-comment-poster.js +176 -0
- package/dist/plugins/specweave-github/lib/github-ac-comment-poster.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-batch-sync.d.ts +36 -0
- package/dist/plugins/specweave-github/lib/github-batch-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-batch-sync.js +115 -0
- package/dist/plugins/specweave-github/lib/github-batch-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver-v2.d.ts +37 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver-v2.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver-v2.js +56 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver-v2.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-conflict-resolver.d.ts +68 -0
- package/dist/plugins/specweave-github/lib/github-conflict-resolver.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-conflict-resolver.js +102 -0
- package/dist/plugins/specweave-github/lib/github-conflict-resolver.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-cross-repo-sync.d.ts +64 -0
- package/dist/plugins/specweave-github/lib/github-cross-repo-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-cross-repo-sync.js +162 -0
- package/dist/plugins/specweave-github/lib/github-cross-repo-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-field-sync.d.ts +50 -0
- package/dist/plugins/specweave-github/lib/github-field-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-field-sync.js +107 -0
- package/dist/plugins/specweave-github/lib/github-field-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-graphql-client.d.ts +53 -0
- package/dist/plugins/specweave-github/lib/github-graphql-client.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-graphql-client.js +138 -0
- package/dist/plugins/specweave-github/lib/github-graphql-client.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-generator.d.ts +40 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-generator.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-generator.js +50 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-generator.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-parser.d.ts +30 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-parser.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-parser.js +75 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-parser.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-pull-sync.d.ts +94 -0
- package/dist/plugins/specweave-github/lib/github-pull-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-pull-sync.js +232 -0
- package/dist/plugins/specweave-github/lib/github-pull-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-push-sync.d.ts +50 -0
- package/dist/plugins/specweave-github/lib/github-push-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-push-sync.js +114 -0
- package/dist/plugins/specweave-github/lib/github-push-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-rate-limiter.d.ts +53 -0
- package/dist/plugins/specweave-github/lib/github-rate-limiter.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-rate-limiter.js +109 -0
- package/dist/plugins/specweave-github/lib/github-rate-limiter.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.d.ts +21 -0
- package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.js +161 -0
- package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-sync-orchestrator.d.ts +46 -0
- package/dist/plugins/specweave-github/lib/github-sync-orchestrator.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-sync-orchestrator.js +99 -0
- package/dist/plugins/specweave-github/lib/github-sync-orchestrator.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-us-auto-closer.d.ts +43 -0
- package/dist/plugins/specweave-github/lib/github-us-auto-closer.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-us-auto-closer.js +153 -0
- package/dist/plugins/specweave-github/lib/github-us-auto-closer.js.map +1 -0
- package/dist/plugins/specweave-github/lib/index.d.ts +1 -4
- package/dist/plugins/specweave-github/lib/index.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/index.js +1 -4
- package/dist/plugins/specweave-github/lib/index.js.map +1 -1
- package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.d.ts +7 -0
- package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.d.ts.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.js +15 -0
- package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.js.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-detector.d.ts +10 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-detector.d.ts.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-detector.js +36 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-detector.js.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-runner.d.ts +25 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-runner.d.ts.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-runner.js +57 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-runner.js.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-routing.d.ts +7 -0
- package/dist/plugins/specweave-testing/lib/playwright-routing.d.ts.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-routing.js +17 -0
- package/dist/plugins/specweave-testing/lib/playwright-routing.js.map +1 -0
- package/dist/src/cli/commands/auto.d.ts.map +1 -1
- package/dist/src/cli/commands/auto.js +1 -2
- package/dist/src/cli/commands/auto.js.map +1 -1
- package/dist/src/cli/commands/cancel-auto.js +1 -2
- package/dist/src/cli/commands/cancel-auto.js.map +1 -1
- package/dist/src/cli/commands/living-docs.js +2 -2
- package/dist/src/cli/commands/living-docs.js.map +1 -1
- package/dist/src/cli/commands/update.d.ts.map +1 -1
- package/dist/src/cli/commands/update.js +1 -2
- package/dist/src/cli/commands/update.js.map +1 -1
- package/dist/src/core/config/types.d.ts +8 -0
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js +3 -0
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/types/sync-profile.d.ts +72 -0
- package/dist/src/core/types/sync-profile.d.ts.map +1 -1
- package/dist/src/core/types/sync-profile.js +6 -0
- package/dist/src/core/types/sync-profile.js.map +1 -1
- package/package.json +2 -2
- package/plugins/specweave/hooks/hooks.json +2 -2
- package/plugins/specweave/hooks/startup-health-check.sh +1 -1
- package/plugins/specweave/hooks/stop-auto-v5.sh +166 -0
- package/plugins/specweave/hooks/user-prompt-submit.sh +10 -0
- package/plugins/specweave/hooks/v2/dispatchers/post-tool-use.sh +21 -1
- package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +1 -1
- package/plugins/specweave/skills/auto/SKILL.md +71 -251
- package/plugins/specweave/skills/team-build/SKILL.md +370 -0
- package/plugins/specweave/skills/team-merge/SKILL.md +123 -0
- package/plugins/specweave/skills/team-orchestrate/SKILL.md +800 -0
- package/plugins/specweave/skills/team-status/SKILL.md +89 -0
- package/plugins/specweave-github/MULTI-PROJECT-SYNC-ARCHITECTURE.md +94 -8
- package/plugins/specweave-github/commands/sync.md +17 -3
- package/plugins/specweave-github/hooks/github-ac-sync-handler.sh +255 -0
- package/plugins/specweave-github/hooks/github-auto-create-handler.sh +455 -0
- package/plugins/specweave-github/lib/github-ac-comment-poster.js +150 -0
- package/plugins/specweave-github/lib/github-ac-comment-poster.ts +245 -0
- package/plugins/specweave-github/lib/github-batch-sync.js +93 -0
- package/plugins/specweave-github/lib/github-batch-sync.ts +152 -0
- package/plugins/specweave-github/lib/github-board-resolver-v2.js +47 -0
- package/plugins/specweave-github/lib/github-board-resolver-v2.ts +73 -0
- package/plugins/specweave-github/lib/github-conflict-resolver.js +90 -0
- package/plugins/specweave-github/lib/github-conflict-resolver.ts +154 -0
- package/plugins/specweave-github/lib/github-cross-repo-sync.js +168 -0
- package/plugins/specweave-github/lib/github-cross-repo-sync.ts +252 -0
- package/plugins/specweave-github/lib/github-field-sync.js +116 -0
- package/plugins/specweave-github/lib/github-field-sync.ts +165 -0
- package/plugins/specweave-github/lib/github-graphql-client.js +129 -0
- package/plugins/specweave-github/lib/github-graphql-client.ts +181 -0
- package/plugins/specweave-github/lib/github-issue-body-generator.js +30 -0
- package/plugins/specweave-github/lib/github-issue-body-generator.ts +76 -0
- package/plugins/specweave-github/lib/github-issue-body-parser.js +55 -0
- package/plugins/specweave-github/lib/github-issue-body-parser.ts +92 -0
- package/plugins/specweave-github/lib/github-pull-sync.js +185 -0
- package/plugins/specweave-github/lib/github-pull-sync.ts +343 -0
- package/plugins/specweave-github/lib/github-push-sync.js +119 -0
- package/plugins/specweave-github/lib/github-push-sync.ts +174 -0
- package/plugins/specweave-github/lib/github-rate-limiter.js +96 -0
- package/plugins/specweave-github/lib/github-rate-limiter.ts +143 -0
- package/plugins/specweave-github/lib/github-spec-frontmatter-updater.js +117 -0
- package/plugins/specweave-github/lib/github-spec-frontmatter-updater.ts +180 -0
- package/plugins/specweave-github/lib/github-sync-orchestrator.js +84 -0
- package/plugins/specweave-github/lib/github-sync-orchestrator.ts +156 -0
- package/plugins/specweave-github/lib/github-us-auto-closer.js +134 -0
- package/plugins/specweave-github/lib/github-us-auto-closer.ts +226 -0
- package/plugins/specweave-github/lib/index.js +1 -7
- package/plugins/specweave-github/lib/index.ts +1 -4
- package/plugins/specweave-github/skills/github-sync/SKILL.md +76 -4
- package/plugins/specweave-testing/commands/e2e-setup.md +18 -0
- package/plugins/specweave-testing/commands/ui-automate.md +2 -0
- package/plugins/specweave-testing/commands/ui-inspect.md +8 -0
- package/plugins/specweave-testing/lib/playwright-ci-defaults.d.ts +6 -0
- package/plugins/specweave-testing/lib/playwright-ci-defaults.js +14 -0
- package/plugins/specweave-testing/lib/playwright-ci-defaults.ts +24 -0
- package/plugins/specweave-testing/lib/playwright-cli-detector.js +33 -0
- package/plugins/specweave-testing/lib/playwright-cli-detector.ts +48 -0
- package/plugins/specweave-testing/lib/playwright-cli-runner.js +58 -0
- package/plugins/specweave-testing/lib/playwright-cli-runner.ts +80 -0
- package/plugins/specweave-testing/lib/playwright-routing.js +16 -0
- package/plugins/specweave-testing/lib/playwright-routing.ts +38 -0
- package/plugins/specweave-testing/skills/e2e-testing/SKILL.md +38 -0
- package/src/templates/CLAUDE.md.template +7 -0
- package/src/templates/config.json.template +9 -1
- package/dist/plugins/specweave-github/lib/subtask-sync.d.ts +0 -51
- package/dist/plugins/specweave-github/lib/subtask-sync.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/subtask-sync.js +0 -147
- package/dist/plugins/specweave-github/lib/subtask-sync.js.map +0 -1
- package/dist/plugins/specweave-github/lib/task-parser.d.ts +0 -37
- package/dist/plugins/specweave-github/lib/task-parser.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/task-parser.js +0 -211
- package/dist/plugins/specweave-github/lib/task-parser.js.map +0 -1
- package/dist/plugins/specweave-github/lib/task-sync.d.ts +0 -56
- package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/task-sync.js +0 -375
- package/dist/plugins/specweave-github/lib/task-sync.js.map +0 -1
- package/plugins/specweave/hooks/validate-completion-conditions.sh +0 -474
- package/plugins/specweave-github/lib/subtask-sync.d.ts +0 -51
- package/plugins/specweave-github/lib/subtask-sync.d.ts.map +0 -1
- package/plugins/specweave-github/lib/subtask-sync.js +0 -154
- package/plugins/specweave-github/lib/subtask-sync.js.map +0 -1
- package/plugins/specweave-github/lib/subtask-sync.ts +0 -225
- package/plugins/specweave-github/lib/task-parser.d.js +0 -0
- package/plugins/specweave-github/lib/task-parser.d.ts +0 -37
- package/plugins/specweave-github/lib/task-parser.d.ts.map +0 -1
- package/plugins/specweave-github/lib/task-parser.js +0 -195
- package/plugins/specweave-github/lib/task-parser.js.map +0 -1
- package/plugins/specweave-github/lib/task-parser.ts +0 -246
- package/plugins/specweave-github/lib/task-sync.d.js +0 -0
- package/plugins/specweave-github/lib/task-sync.d.ts +0 -51
- package/plugins/specweave-github/lib/task-sync.d.ts.map +0 -1
- package/plugins/specweave-github/lib/task-sync.js +0 -415
- package/plugins/specweave-github/lib/task-sync.js.map +0 -1
- package/plugins/specweave-github/lib/task-sync.ts +0 -451
- package/plugins/specweave-github/skills/github-issue-tracker/SKILL.md +0 -496
- /package/plugins/specweave/hooks/{stop-auto.sh → _archive/stop-auto-v4-legacy.sh} +0 -0
- /package/plugins/{specweave-github/lib/subtask-sync.d.js → specweave-testing/lib/playwright-ci-defaults.d.js} +0 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Preset-driven team building — spawn coordinated multi-agent teams from battle-tested presets for full-stack, review, testing, TDD, and migration workflows"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Team Build
|
|
6
|
+
|
|
7
|
+
Spawn a coordinated team of agents from a preset configuration. Each preset defines agent roles, skill assignments, ownership boundaries, and execution order so you get a production-grade team in one command.
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/sw:team-build --preset full-stack "Build checkout flow"
|
|
13
|
+
/sw:team-build --preset review "Review auth module"
|
|
14
|
+
/sw:team-build --preset testing "Test payment service"
|
|
15
|
+
/sw:team-build --preset tdd "Implement rate limiter"
|
|
16
|
+
/sw:team-build --preset migration "Migrate users to v2 schema"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Note:** For the complete 9-domain skill mapping table, see `/sw:team-orchestrate`.
|
|
20
|
+
|
|
21
|
+
## How It Works
|
|
22
|
+
|
|
23
|
+
1. Parse the `--preset` flag to select a team configuration
|
|
24
|
+
2. Read the active increment from `.specweave/increments/` for context
|
|
25
|
+
3. Spawn agents with assigned skills, ownership scopes, and dependencies
|
|
26
|
+
4. Coordinate execution order (sequential gates or parallel fan-out)
|
|
27
|
+
5. Each agent operates via `/sw:do` or `/sw:auto` within its ownership boundary
|
|
28
|
+
6. Quality gates run `/sw:grill` before any agent marks work complete
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Presets
|
|
33
|
+
|
|
34
|
+
### 1. `full-stack` — Contract-First Full-Stack Development
|
|
35
|
+
|
|
36
|
+
**Agents**: 3
|
|
37
|
+
**Execution order**: Sequential gate then parallel fan-out
|
|
38
|
+
|
|
39
|
+
Build features end-to-end with a shared-types-first contract approach. Agent 1 establishes the contract (types, shared utilities, interfaces) before backend and frontend agents work in parallel against that contract.
|
|
40
|
+
|
|
41
|
+
#### Agent Composition
|
|
42
|
+
|
|
43
|
+
| # | Role | Skill(s) | Owns | Responsibility |
|
|
44
|
+
|---|------|----------|------|----------------|
|
|
45
|
+
| 1 | Shared/Types | `sw:architect` | `src/types/`, `src/utils/`, `src/shared/` | Define TypeScript interfaces, shared validators, utility functions, and API contracts |
|
|
46
|
+
| 2 | Backend | `sw:architect` + `sw-infra:devops` | `src/api/`, `src/services/` | Implement API endpoints, service layer, database queries, and infrastructure config |
|
|
47
|
+
| 3 | Frontend | `sw-frontend:frontend-architect` | `src/components/`, `src/pages/` | Build UI components, pages, state management, and client-side logic |
|
|
48
|
+
|
|
49
|
+
#### Execution Chain
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Agent 1 (Shared/Types)
|
|
53
|
+
|
|
|
54
|
+
v
|
|
55
|
+
GATE — types and contracts must compile
|
|
56
|
+
|
|
|
57
|
+
+-------+-------+
|
|
58
|
+
| |
|
|
59
|
+
v v
|
|
60
|
+
Agent 2 Agent 3
|
|
61
|
+
(Backend) (Frontend)
|
|
62
|
+
| |
|
|
63
|
+
v v
|
|
64
|
+
/sw:grill /sw:grill
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Why contract-first**: Backend and frontend agents import from `src/types/` and `src/shared/`. By resolving the contract first, both downstream agents work against stable interfaces — no integration surprises.
|
|
68
|
+
|
|
69
|
+
#### Example
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
/sw:team-build --preset full-stack "Build user profile page with avatar upload"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
This spawns:
|
|
76
|
+
- **Shared/Types** agent defines `UserProfile`, `AvatarUploadRequest`, `AvatarUploadResponse` types
|
|
77
|
+
- **Backend** agent implements `/api/users/:id/profile` and `/api/users/:id/avatar` endpoints
|
|
78
|
+
- **Frontend** agent builds `<ProfilePage>`, `<AvatarUploader>` components consuming those types
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### 2. `review` — Parallel Multi-Perspective Code Review
|
|
83
|
+
|
|
84
|
+
**Agents**: 3
|
|
85
|
+
**Execution order**: All parallel (independent, no dependencies)
|
|
86
|
+
|
|
87
|
+
Three specialized reviewers examine the codebase simultaneously from different angles. Each agent produces findings independently — no agent blocks another.
|
|
88
|
+
|
|
89
|
+
#### Agent Composition
|
|
90
|
+
|
|
91
|
+
| # | Role | Skill(s) | Owns | Responsibility |
|
|
92
|
+
|---|------|----------|------|----------------|
|
|
93
|
+
| 1 | Security | `sw:security` + `sw:security-patterns` | All files (read-only analysis) | Audit for vulnerabilities, injection vectors, auth flaws, secrets exposure, dependency CVEs |
|
|
94
|
+
| 2 | Quality | `sw:grill` + `sw:tech-lead` + `sw:code-simplifier` | All files (read-only analysis) | Review code quality, complexity, naming, duplication, SOLID violations, performance anti-patterns |
|
|
95
|
+
| 3 | Docs | `sw:docs-updater` | All files (read-only analysis) | Check doc coverage, stale comments, missing JSDoc, README accuracy, spec-to-code alignment |
|
|
96
|
+
|
|
97
|
+
#### Execution Chain
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
+---------------+---------------+---------------+
|
|
101
|
+
| | | |
|
|
102
|
+
v v v |
|
|
103
|
+
Agent 1 Agent 2 Agent 3 |
|
|
104
|
+
(Security) (Quality) (Docs) |
|
|
105
|
+
| | | |
|
|
106
|
+
v v v |
|
|
107
|
+
Report Report Report |
|
|
108
|
+
+---------------+---------------+---------------+
|
|
109
|
+
|
|
|
110
|
+
v
|
|
111
|
+
Merged review summary
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**All agents run in parallel.** Each produces an independent report. Reports are merged into a single review summary upon completion.
|
|
115
|
+
|
|
116
|
+
#### Example
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
/sw:team-build --preset review "Review auth module before release"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
This spawns three parallel reviewers:
|
|
123
|
+
- **Security** agent checks for token leakage, CSRF, injection, and insecure defaults
|
|
124
|
+
- **Quality** agent evaluates code structure, test coverage gaps, and complexity hotspots
|
|
125
|
+
- **Docs** agent verifies API docs, inline comments, and spec alignment
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### 3. `testing` — Parallel Test Suite Generation
|
|
130
|
+
|
|
131
|
+
**Agents**: 3
|
|
132
|
+
**Execution order**: All parallel (independent, no dependencies)
|
|
133
|
+
|
|
134
|
+
Generate comprehensive test coverage across all test levels simultaneously. Each agent focuses on a different testing layer and operates independently.
|
|
135
|
+
|
|
136
|
+
> **Note:** `sw-testing:qa-engineer` is the primary orchestration skill for testing workflows. This preset splits its responsibilities into specialized agents for parallel execution.
|
|
137
|
+
|
|
138
|
+
#### Agent Composition
|
|
139
|
+
|
|
140
|
+
| # | Role | Skill(s) | Owns | Responsibility |
|
|
141
|
+
|---|------|----------|------|----------------|
|
|
142
|
+
| 1 | Unit | `sw-testing:unit-testing` | `tests/unit/` | Write unit tests for individual functions, classes, and modules with proper mocking |
|
|
143
|
+
| 2 | E2E | `sw-testing:e2e-testing` | `tests/e2e/` | Write end-to-end tests for user flows, API sequences, and cross-service interactions |
|
|
144
|
+
| 3 | Coverage | `sw-testing:test-coverage` | `tests/` (analysis scope) | Analyze coverage gaps, generate missing test cases, ensure threshold compliance |
|
|
145
|
+
|
|
146
|
+
#### Execution Chain
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
+---------------+---------------+---------------+
|
|
150
|
+
| | | |
|
|
151
|
+
v v v |
|
|
152
|
+
Agent 1 Agent 2 Agent 3 |
|
|
153
|
+
(Unit) (E2E) (Coverage) |
|
|
154
|
+
| | | |
|
|
155
|
+
v v v |
|
|
156
|
+
unit tests e2e tests coverage report |
|
|
157
|
+
+---------------+---------------+---------------+
|
|
158
|
+
|
|
|
159
|
+
v
|
|
160
|
+
All tests pass + coverage met
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**All agents run in parallel.** Unit and E2E agents write tests while the Coverage agent analyzes gaps and generates supplementary tests for uncovered paths.
|
|
164
|
+
|
|
165
|
+
#### Example
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
/sw:team-build --preset testing "Test payment service end to end"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
This spawns:
|
|
172
|
+
- **Unit** agent writes tests for `PaymentService`, `InvoiceCalculator`, `TaxResolver`
|
|
173
|
+
- **E2E** agent writes flow tests: checkout -> payment -> confirmation -> receipt
|
|
174
|
+
- **Coverage** agent identifies untested edge cases and generates additional tests
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
### 4. `tdd` — Strict Sequential TDD Cycle
|
|
179
|
+
|
|
180
|
+
**Agents**: 3
|
|
181
|
+
**Execution order**: Strict sequential (Agent 1 -> Agent 2 -> Agent 3)
|
|
182
|
+
|
|
183
|
+
Enforce the RED-GREEN-REFACTOR discipline with dedicated agents for each phase. Each agent must complete before the next begins — no shortcuts, no phase skipping.
|
|
184
|
+
|
|
185
|
+
#### Agent Composition
|
|
186
|
+
|
|
187
|
+
| # | Role | Skill(s) | Owns | Responsibility |
|
|
188
|
+
|---|------|----------|------|----------------|
|
|
189
|
+
| 1 | Red | `sw:tdd-red` | `tests/` | Write failing tests that define the expected behavior. Tests MUST fail before proceeding. |
|
|
190
|
+
| 2 | Green | `sw:tdd-green` | `src/` | Write the minimal implementation to make all failing tests pass. No extra features. |
|
|
191
|
+
| 3 | Refactor | `sw:tdd-refactor` | `src/`, `tests/` | Improve code quality, extract abstractions, reduce duplication — all tests must stay green. |
|
|
192
|
+
|
|
193
|
+
#### Execution Chain
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
Agent 1 (Red)
|
|
197
|
+
|
|
|
198
|
+
v
|
|
199
|
+
GATE — tests must exist AND fail
|
|
200
|
+
|
|
|
201
|
+
v
|
|
202
|
+
Agent 2 (Green)
|
|
203
|
+
|
|
|
204
|
+
v
|
|
205
|
+
GATE — all tests must pass
|
|
206
|
+
|
|
|
207
|
+
v
|
|
208
|
+
Agent 3 (Refactor)
|
|
209
|
+
|
|
|
210
|
+
v
|
|
211
|
+
GATE — all tests still pass + /sw:grill
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Strict sequential execution.** Agent 2 cannot start until Agent 1's tests are verified failing. Agent 3 cannot start until Agent 2's implementation passes all tests. This enforces true TDD discipline.
|
|
215
|
+
|
|
216
|
+
#### TDD Integration
|
|
217
|
+
|
|
218
|
+
When `testing.defaultTestMode: "TDD"` is set in `.specweave/config.json`, this preset automatically enables strict enforcement (`testing.tddEnforcement: "strict"`). Tasks in `tasks.md` are tagged with `[RED]`, `[GREEN]`, `[REFACTOR]` phase markers.
|
|
219
|
+
|
|
220
|
+
#### Example
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
/sw:team-build --preset tdd "Implement rate limiter with sliding window"
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
This spawns sequentially:
|
|
227
|
+
- **Red** agent writes tests: `rateLimiter.allows(100, '1m')`, `rateLimiter.rejects(101, '1m')`, sliding window decay tests
|
|
228
|
+
- **Green** agent implements `RateLimiter` class with minimal sliding window logic to pass
|
|
229
|
+
- **Refactor** agent extracts `SlidingWindow` abstraction, adds TimeProvider injection, cleans up
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
### 5. `migration` — Contract-First Data Migration
|
|
234
|
+
|
|
235
|
+
**Agents**: 3
|
|
236
|
+
**Execution order**: Sequential gate then parallel fan-out
|
|
237
|
+
|
|
238
|
+
Migrate data schemas safely with a schema-first approach. The schema agent defines the new structure and writes migration scripts before backend and frontend agents adapt to the changes in parallel.
|
|
239
|
+
|
|
240
|
+
#### Agent Composition
|
|
241
|
+
|
|
242
|
+
| # | Role | Skill(s) | Owns | Responsibility |
|
|
243
|
+
|---|------|----------|------|----------------|
|
|
244
|
+
| 1 | Schema | `sw:architect` | `src/types/`, `migrations/`, `prisma/`, `drizzle/` | Define new schema, write migration scripts, update type definitions, ensure backward compatibility |
|
|
245
|
+
| 2 | Backend | `sw:architect` | `src/api/`, `src/services/` | Update API endpoints, service logic, queries, and serializers to work with new schema |
|
|
246
|
+
| 3 | Frontend | `sw-frontend:frontend-architect` | `src/components/`, `src/pages/` | Update UI components, forms, and state to reflect schema changes |
|
|
247
|
+
|
|
248
|
+
#### Execution Chain
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
Agent 1 (Schema)
|
|
252
|
+
|
|
|
253
|
+
v
|
|
254
|
+
GATE — migration runs, types compile, rollback tested
|
|
255
|
+
|
|
|
256
|
+
+-------+-------+
|
|
257
|
+
| |
|
|
258
|
+
v v
|
|
259
|
+
Agent 2 Agent 3
|
|
260
|
+
(Backend) (Frontend)
|
|
261
|
+
| |
|
|
262
|
+
v v
|
|
263
|
+
/sw:grill /sw:grill
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**Schema-first ensures safety.** The migration and new types must be validated before downstream agents modify application code. Both backend and frontend work against the finalized schema in parallel.
|
|
267
|
+
|
|
268
|
+
#### Example
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
/sw:team-build --preset migration "Migrate users to v2 schema with address normalization"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
This spawns:
|
|
275
|
+
- **Schema** agent creates `migrations/20240315_users_v2.sql`, updates `UserV2` type, writes rollback
|
|
276
|
+
- **Backend** agent updates `/api/users` endpoints to read/write `UserV2`, adds address normalization service
|
|
277
|
+
- **Frontend** agent updates `<UserForm>`, `<AddressInput>` components to use new address fields
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Flags
|
|
282
|
+
|
|
283
|
+
| Flag | Required | Description |
|
|
284
|
+
|------|----------|-------------|
|
|
285
|
+
| `--preset` | Yes | One of: `full-stack`, `review`, `testing`, `tdd`, `migration` |
|
|
286
|
+
| `--increment` | No | Increment ID to operate on (defaults to active increment) |
|
|
287
|
+
| `--dry-run` | No | Show what agents would be spawned without actually spawning them |
|
|
288
|
+
| `--max-agents` | No | Override max concurrent agents (default: 3) |
|
|
289
|
+
|
|
290
|
+
## Execution Order Summary
|
|
291
|
+
|
|
292
|
+
| Preset | Order | Pattern |
|
|
293
|
+
|--------|-------|---------|
|
|
294
|
+
| `full-stack` | Sequential gate + parallel | Agent 1 first, then [Agent 2 + Agent 3] in parallel |
|
|
295
|
+
| `review` | All parallel | [Agent 1 + Agent 2 + Agent 3] simultaneously |
|
|
296
|
+
| `testing` | All parallel | [Agent 1 + Agent 2 + Agent 3] simultaneously |
|
|
297
|
+
| `tdd` | Strict sequential | Agent 1 -> Agent 2 -> Agent 3 (no parallelism) |
|
|
298
|
+
| `migration` | Sequential gate + parallel | Agent 1 first, then [Agent 2 + Agent 3] in parallel |
|
|
299
|
+
|
|
300
|
+
## SpecWeave Workflow Integration
|
|
301
|
+
|
|
302
|
+
Each spawned agent integrates with the standard SpecWeave workflow:
|
|
303
|
+
|
|
304
|
+
1. **Increment context** — agents read `spec.md` and `tasks.md` from the active increment
|
|
305
|
+
2. **Task execution** — agents use `/sw:do` or `/sw:auto` to work through their assigned tasks
|
|
306
|
+
3. **Quality gates** — agents run `/sw:grill` before marking tasks complete
|
|
307
|
+
4. **Progress tracking** — task status updates flow back to `tasks.md` with AC linkage
|
|
308
|
+
5. **Ownership boundaries** — agents only modify files within their assigned directories
|
|
309
|
+
6. **Conflict prevention** — ownership scopes are non-overlapping to prevent merge conflicts
|
|
310
|
+
|
|
311
|
+
### Agent Lifecycle
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
Spawn → Load increment context → Claim tasks → /sw:do or /sw:auto → /sw:grill → Report completion
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Error Handling
|
|
318
|
+
|
|
319
|
+
- If a gate agent (Agent 1 in `full-stack`, `migration`, or `tdd`) fails, downstream agents are NOT spawned
|
|
320
|
+
- If a parallel agent fails, other parallel agents continue — failures are collected and reported
|
|
321
|
+
- Agents retry transient failures (build errors, flaky tests) up to 2 times before reporting failure
|
|
322
|
+
- On failure, the agent produces a diagnostic report explaining what went wrong and suggested fixes
|
|
323
|
+
|
|
324
|
+
#### Invalid Preset Name
|
|
325
|
+
|
|
326
|
+
If user provides an unknown preset name:
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
Error: Unknown preset "xyz". Available presets: full-stack, review, testing, tdd, migration.
|
|
330
|
+
Use /sw:team-build --help to see preset details.
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
## Custom Presets
|
|
334
|
+
|
|
335
|
+
To define custom presets, add a `teamPresets` section to `.specweave/config.json`:
|
|
336
|
+
|
|
337
|
+
```json
|
|
338
|
+
{
|
|
339
|
+
"teamPresets": {
|
|
340
|
+
"my-preset": {
|
|
341
|
+
"agents": [
|
|
342
|
+
{
|
|
343
|
+
"role": "Analyst",
|
|
344
|
+
"skills": ["sw:architect"],
|
|
345
|
+
"owns": ["src/analysis/"],
|
|
346
|
+
"dependsOn": []
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"role": "Implementer",
|
|
350
|
+
"skills": ["sw:architect"],
|
|
351
|
+
"owns": ["src/core/"],
|
|
352
|
+
"dependsOn": ["Analyst"]
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Custom presets follow the same execution rules: agents with no `dependsOn` run in parallel; agents with dependencies wait for their predecessors to complete.
|
|
361
|
+
|
|
362
|
+
## Troubleshooting
|
|
363
|
+
|
|
364
|
+
| Issue | Fix |
|
|
365
|
+
|-------|-----|
|
|
366
|
+
| Agent fails to spawn | Check that required skills are installed: `claude plugin list` |
|
|
367
|
+
| Gate agent blocks forever | Kill the stuck agent and check its logs in `.specweave/state/` |
|
|
368
|
+
| Ownership conflict | Ensure no two agents in the same preset share directory ownership |
|
|
369
|
+
| TDD gate rejects Green | Agent 1 (Red) tests must genuinely fail — check for accidentally passing tests |
|
|
370
|
+
| Agents out of sync | Run `/sw:progress` to see per-agent task status and identify blockers |
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Merge completed parallel agent work and trigger GitHub sync per increment. Activates for: team merge, merge agents, combine work, team finish.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Team Merge
|
|
6
|
+
|
|
7
|
+
**Merge parallel agent work in dependency order and trigger sync.**
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
/sw:team-merge [--session <id>]
|
|
13
|
+
/sw:team-merge --dry-run # Preview merge plan
|
|
14
|
+
/sw:team-merge --skip-sync # Merge without GitHub/JIRA sync
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What This Skill Does
|
|
18
|
+
|
|
19
|
+
1. **Read session state** from `.specweave/state/parallel/session.json` (or native Agent Teams)
|
|
20
|
+
2. **Verify all agents completed** — block if any are still running
|
|
21
|
+
3. **Merge in dependency order** — shared first, then dependent domains
|
|
22
|
+
4. **Run `/sw:done` per increment** — triggers quality gates and closes each increment
|
|
23
|
+
5. **Trigger sync** — pushes to GitHub (`/sw-github:sync`) or JIRA (`/sw-jira:push`)
|
|
24
|
+
|
|
25
|
+
## Mode Detection
|
|
26
|
+
|
|
27
|
+
- **Native Agent Teams**: Query team for completion status, then proceed with merge
|
|
28
|
+
- **Subagent mode**: Read `.specweave/state/parallel/session.json` for agent states
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
|
|
32
|
+
### Step 1: Pre-flight Check
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Read session state (native team or JSON file)
|
|
36
|
+
For each agent:
|
|
37
|
+
- Check status == "done" (from tasks.md 100%)
|
|
38
|
+
- Verify /sw:grill quality gate passed
|
|
39
|
+
- If any running → report and ask user to wait
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Step 2: Determine Merge Order
|
|
43
|
+
|
|
44
|
+
Dependencies flow: shared → backend → frontend (or as defined in session)
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Merge order respects contract chain:
|
|
48
|
+
1. shared/types (no dependencies)
|
|
49
|
+
2. database (depends on shared types)
|
|
50
|
+
3. backend (depends on database + shared)
|
|
51
|
+
4. frontend (depends on backend API + shared types)
|
|
52
|
+
5. devops/qa/security (independent, merge last)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Step 3: Close Each Increment
|
|
56
|
+
|
|
57
|
+
For each agent's increment, in dependency order:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Run /sw:done per increment — triggers quality gates
|
|
61
|
+
/sw:done <increment-id>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
This ensures:
|
|
65
|
+
- `/sw:grill` runs for each increment
|
|
66
|
+
- `tasks.md` and `spec.md` ACs are validated
|
|
67
|
+
- `metadata.json` is updated to `completed`
|
|
68
|
+
- Living docs are generated
|
|
69
|
+
|
|
70
|
+
### Step 4: Merge Each Agent's Work
|
|
71
|
+
|
|
72
|
+
For worktree-based agents:
|
|
73
|
+
```bash
|
|
74
|
+
git merge --no-ff <worktree-branch> -m "merge: <domain> from team session"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
For same-tree agents (all working in same repo):
|
|
78
|
+
- Verify no file conflicts (agents own different files)
|
|
79
|
+
- Stage and commit each agent's changes
|
|
80
|
+
|
|
81
|
+
### Step 5: Trigger Sync
|
|
82
|
+
|
|
83
|
+
For each merged increment, trigger external sync:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# GitHub Issues sync
|
|
87
|
+
/sw-github:sync <increment-id>
|
|
88
|
+
|
|
89
|
+
# JIRA sync (if configured)
|
|
90
|
+
/sw-jira:push <increment-id>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Step 6: Clean Up
|
|
94
|
+
|
|
95
|
+
- Update session state to "merged"
|
|
96
|
+
- In native Agent Teams mode, signal team completion
|
|
97
|
+
- Remove worktree branches if `--cleanup-branches` flag set
|
|
98
|
+
- Archive completed increments if configured
|
|
99
|
+
|
|
100
|
+
## Options
|
|
101
|
+
|
|
102
|
+
| Option | Description |
|
|
103
|
+
|--------|-------------|
|
|
104
|
+
| `--session` | Specify session ID (defaults to latest) |
|
|
105
|
+
| `--dry-run` | Show merge plan without executing |
|
|
106
|
+
| `--skip-sync` | Merge without triggering GitHub/JIRA sync |
|
|
107
|
+
| `--skip-done` | Merge without running /sw:done (increments stay active) |
|
|
108
|
+
| `--cleanup-branches` | Delete agent worktree branches after merge |
|
|
109
|
+
|
|
110
|
+
## Conflict Resolution
|
|
111
|
+
|
|
112
|
+
If file conflicts are detected during merge:
|
|
113
|
+
1. List conflicting files and owning agents
|
|
114
|
+
2. Ask user to choose resolution strategy:
|
|
115
|
+
- **Accept upstream** — keep the earlier agent's version
|
|
116
|
+
- **Accept downstream** — keep the later agent's version
|
|
117
|
+
- **Manual** — open conflict markers for user to resolve
|
|
118
|
+
3. Apply resolution and continue merge
|
|
119
|
+
|
|
120
|
+
## Example
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
User: /sw:team-merge
|