specweave 1.0.241 → 1.0.243

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.
Files changed (30) hide show
  1. package/CLAUDE.md +28 -27
  2. package/dist/src/cli/commands/team.js +1 -1
  3. package/dist/src/cli/commands/team.js.map +1 -1
  4. package/dist/src/cli/helpers/init/deep-interview-config.d.ts +1 -1
  5. package/dist/src/cli/helpers/init/deep-interview-config.js +21 -21
  6. package/dist/src/cli/helpers/init/deep-interview-config.js.map +1 -1
  7. package/dist/src/cli/helpers/issue-tracker/github.d.ts.map +1 -1
  8. package/dist/src/cli/helpers/issue-tracker/github.js +4 -3
  9. package/dist/src/cli/helpers/issue-tracker/github.js.map +1 -1
  10. package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  11. package/dist/src/cli/helpers/issue-tracker/index.js +17 -0
  12. package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
  13. package/dist/src/cli/helpers/selection-strategy.d.ts +1 -1
  14. package/dist/src/cli/helpers/selection-strategy.d.ts.map +1 -1
  15. package/dist/src/cli/helpers/selection-strategy.js +7 -1
  16. package/dist/src/cli/helpers/selection-strategy.js.map +1 -1
  17. package/dist/src/core/repo-structure/multi-repo-configurator.d.ts.map +1 -1
  18. package/dist/src/core/repo-structure/multi-repo-configurator.js +137 -12
  19. package/dist/src/core/repo-structure/multi-repo-configurator.js.map +1 -1
  20. package/dist/src/core/repo-structure/repo-bulk-discovery.d.ts +1 -1
  21. package/dist/src/core/repo-structure/repo-bulk-discovery.d.ts.map +1 -1
  22. package/dist/src/core/repo-structure/repo-bulk-discovery.js +30 -8
  23. package/dist/src/core/repo-structure/repo-bulk-discovery.js.map +1 -1
  24. package/package.json +1 -1
  25. package/plugins/specweave/hooks/user-prompt-submit.sh +122 -67
  26. package/plugins/specweave/skills/done/SKILL.md +53 -0
  27. package/plugins/specweave/skills/pm/SKILL.md +1 -1
  28. package/plugins/specweave/skills/pm/phases/00-deep-interview.md +20 -1
  29. package/plugins/specweave/skills/team-merge/SKILL.md +19 -0
  30. package/plugins/specweave/skills/team-orchestrate/SKILL.md +83 -32
@@ -22,6 +22,21 @@ description: Orchestrate multi-agent parallel development using Claude Code Agen
22
22
 
23
23
  ---
24
24
 
25
+ ## MANDATORY: Tool Selection for Native Agent Teams
26
+
27
+ **When `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` is set, you MUST use `TeamCreate` to create the team.** Do NOT fall back to background subagents.
28
+
29
+ | Action | MUST use | NEVER use in native mode |
30
+ |--------|----------|--------------------------|
31
+ | Create team | `TeamCreate({ team_name, description })` | NOT "Teammate" tool (does not exist) |
32
+ | Spawn agent | `Task({ team_name, name, subagent_type, prompt })` | `Task({ run_in_background: true })` |
33
+ | Send message | `SendMessage({ type, recipient, content, summary })` | File-based messages |
34
+ | Shutdown agent | `SendMessage({ type: "shutdown_request", recipient })` | - |
35
+
36
+ **NEVER use `Task({ run_in_background: true })` in native Agent Teams mode.** That pattern is the subagent fallback for when Agent Teams is unavailable. Native mode uses `TeamCreate` first, then `Task` with `team_name` parameter to spawn named teammates.
37
+
38
+ ---
39
+
25
40
  ## 1. Mode Detection
26
41
 
27
42
  Before spawning agents, detect the available orchestration mode.
@@ -212,7 +227,8 @@ You are the FRONTEND agent for increment [INCREMENT_ID].
212
227
  SKILLS TO INVOKE:
213
228
  Skill({ skill: "sw-frontend:frontend-architect" })
214
229
  Skill({ skill: "sw-frontend:nextjs" }) // if Next.js project
215
- Skill({ skill: "sw-frontend:frontend-design" }) // for design system work
230
+ Skill({ skill: "sw-frontend:frontend-design" }) // for polished, world-class UI
231
+ Skill({ skill: "sw:service-connect" }) // for external service setup
216
232
 
217
233
  FILE OWNERSHIP (WRITE access):
218
234
  src/components/**
@@ -225,15 +241,25 @@ FILE OWNERSHIP (WRITE access):
225
241
 
226
242
  READ ACCESS: Any file in the repository (especially src/types/, src/shared/, openapi.yaml)
227
243
 
244
+ DESIGN QUALITY:
245
+ - Default to world-class, sleek, polished, production-ready design
246
+ - All UI must be responsive (mobile-first) and accessible (WCAG 2.1 AA)
247
+ - Use modern design patterns: clean spacing, typography hierarchy, subtle animations
248
+ - Invoke `sw-frontend:frontend-design` for high-quality UI polish
249
+
228
250
  WORKFLOW:
229
251
  1. Read the increment spec: .specweave/increments/[ID]/spec.md
230
252
  2. Read the tasks assigned to you in: .specweave/increments/[ID]/tasks.md
231
- 3. Wait for contract artifacts if Phase 1 is active:
253
+ 3. Verify services are running and accessible (check dev server, API endpoints)
254
+ 4. Wait for contract artifacts if Phase 1 is active:
232
255
  - Read src/types/ for shared interfaces
233
256
  - Read openapi.yaml for API endpoints (if backend produces one)
234
- 4. Execute tasks: /sw:do or /sw:auto
235
- 5. Run quality gate: /sw:grill
236
- 6. Signal completion (see Communication Protocol)
257
+ 5. Execute tasks autonomously: prefer /sw:auto for autonomous execution
258
+ 6. Run all tests for owned code (unit + integration): npm test
259
+ 7. Run quality gate: /sw:grill
260
+ 8. Do NOT signal completion until all tests pass
261
+ 9. After auto completes, attempt closure via /sw:done to identify remaining issues
262
+ 10. Signal completion (see Communication Protocol)
237
263
 
238
264
  RULES:
239
265
  - WRITE only to files you own (listed above)
@@ -241,6 +267,7 @@ RULES:
241
267
  - Follow existing code conventions (check .eslintrc, .prettierrc, tsconfig.json)
242
268
  - Run linter and type-check before signaling completion
243
269
  - All new components must have corresponding test files
270
+ - ALL repository operations MUST use `repositories/{org}/` directory structure. NEVER create repos at the project root.
244
271
  ```
245
272
 
246
273
  ### 4b. Backend Agent
@@ -250,7 +277,8 @@ You are the BACKEND agent for increment [INCREMENT_ID].
250
277
 
251
278
  SKILLS TO INVOKE:
252
279
  Skill({ skill: "sw:architect" })
253
- Skill({ skill: "sw-infra:devops" }) // if deployment config needed
280
+ Skill({ skill: "sw-infra:devops" }) // if deployment config needed
281
+ Skill({ skill: "sw:service-connect" }) // for auth provider and external service setup
254
282
 
255
283
  FILE OWNERSHIP (WRITE access):
256
284
  src/api/**
@@ -263,16 +291,25 @@ FILE OWNERSHIP (WRITE access):
263
291
 
264
292
  READ ACCESS: Any file in the repository (especially prisma/schema.prisma, src/types/)
265
293
 
294
+ AUTH SETUP:
295
+ - If the project needs authentication, set up the auth provider (Supabase, Firebase, Auth0, etc.)
296
+ - Use `sw:service-connect` to connect to auth services and verify connectivity
297
+ - Ensure auth middleware works end-to-end before signaling completion
298
+
266
299
  WORKFLOW:
267
300
  1. Read the increment spec: .specweave/increments/[ID]/spec.md
268
301
  2. Read the tasks assigned to you in: .specweave/increments/[ID]/tasks.md
269
- 3. Wait for contract artifacts if Phase 1 is active:
302
+ 3. Verify services are running and accessible (database, auth provider, external APIs)
303
+ 4. Wait for contract artifacts if Phase 1 is active:
270
304
  - Read prisma/schema.prisma for database schema
271
305
  - Read src/types/ for shared interfaces
272
- 4. Execute tasks: /sw:do or /sw:auto
273
- 5. Generate or update OpenAPI spec if API routes change
274
- 6. Run quality gate: /sw:grill
275
- 7. Signal completion (see Communication Protocol)
306
+ 5. Execute tasks autonomously: prefer /sw:auto for autonomous execution
307
+ 6. Generate or update OpenAPI spec if API routes change
308
+ 7. Run all tests for owned code (unit + integration): npm test
309
+ 8. Run quality gate: /sw:grill
310
+ 9. Do NOT signal completion until all tests pass
311
+ 10. After auto completes, attempt closure via /sw:done to identify remaining issues
312
+ 11. Signal completion (see Communication Protocol)
276
313
 
277
314
  RULES:
278
315
  - WRITE only to files you own (listed above)
@@ -280,6 +317,7 @@ RULES:
280
317
  - Every new API endpoint must have request/response validation
281
318
  - Error handling must follow project conventions
282
319
  - All services must have unit tests
320
+ - ALL repository operations MUST use `repositories/{org}/` directory structure. NEVER create repos at the project root.
283
321
  ```
284
322
 
285
323
  ### 4c. Database Agent
@@ -306,10 +344,13 @@ WORKFLOW:
306
344
  3. Design database schema changes
307
345
  4. Generate Prisma migration: npx prisma migrate dev --name <migration-name>
308
346
  5. Write seed data if needed
309
- 6. Execute tasks: /sw:do or /sw:auto
310
- 7. Run quality gate: /sw:grill
311
- 8. Signal CONTRACT_READY with schema details (see Communication Protocol)
312
- 9. Signal completion
347
+ 6. Execute tasks autonomously: prefer /sw:auto for autonomous execution
348
+ 7. Run all tests for owned code (migration, seed): npm test
349
+ 8. Run quality gate: /sw:grill
350
+ 9. Do NOT signal completion until all tests pass
351
+ 10. Signal CONTRACT_READY with schema details (see Communication Protocol)
352
+ 11. After auto completes, attempt closure via /sw:done to identify remaining issues
353
+ 12. Signal completion
313
354
 
314
355
  RULES:
315
356
  - WRITE only to files you own (listed above)
@@ -317,6 +358,7 @@ RULES:
317
358
  - Always create migrations (never modify schema without migration)
318
359
  - Seed data must be idempotent
319
360
  - Schema changes must be backward-compatible when possible
361
+ - ALL repository operations MUST use `repositories/{org}/` directory structure. NEVER create repos at the project root.
320
362
  ```
321
363
 
322
364
  ### 4d. Testing Agent
@@ -350,10 +392,12 @@ WORKFLOW:
350
392
  4. Write unit tests for new services/components
351
393
  5. Write integration tests for API endpoints
352
394
  6. Write E2E tests for user journeys
353
- 7. Execute tasks: /sw:do or /sw:auto
354
- 8. Run full test suite and report results
355
- 9. Run quality gate: /sw:grill
356
- 10. Signal completion
395
+ 7. Execute tasks autonomously: prefer /sw:auto for autonomous execution
396
+ 8. Run all tests (unit + integration + E2E): npm test && npx playwright test
397
+ 9. Do NOT signal completion until all tests pass — if tests fail, fix and repeat
398
+ 10. Run quality gate: /sw:grill
399
+ 11. After auto completes, attempt closure via /sw:done to identify remaining issues
400
+ 12. Signal completion
357
401
 
358
402
  RULES:
359
403
  - WRITE only to test files (listed above)
@@ -361,6 +405,7 @@ RULES:
361
405
  - Tests must cover all acceptance criteria from spec.md
362
406
  - Follow existing test patterns and utilities
363
407
  - E2E tests must include accessibility checks when applicable
408
+ - ALL repository operations MUST use `repositories/{org}/` directory structure. NEVER create repos at the project root.
364
409
  ```
365
410
 
366
411
  ### 4e. Security Agent
@@ -389,10 +434,13 @@ WORKFLOW:
389
434
  3. Audit code produced by other agents for security issues
390
435
  4. Implement auth/authz middleware if needed
391
436
  5. Add input validation and sanitization
392
- 6. Execute tasks: /sw:do or /sw:auto
393
- 7. Run security audit tools (npm audit, dependency check)
394
- 8. Run quality gate: /sw:grill
395
- 9. Signal completion with security findings summary
437
+ 6. Execute tasks autonomously: prefer /sw:auto for autonomous execution
438
+ 7. Run all tests for owned code (security tests): npm test
439
+ 8. Run security audit tools (npm audit, dependency check)
440
+ 9. Run quality gate: /sw:grill
441
+ 10. Do NOT signal completion until all tests pass
442
+ 11. After auto completes, attempt closure via /sw:done to identify remaining issues
443
+ 12. Signal completion with security findings summary
396
444
 
397
445
  RULES:
398
446
  - WRITE only to files you own (listed above)
@@ -400,6 +448,7 @@ RULES:
400
448
  - NEVER commit secrets, credentials, or API keys
401
449
  - All user input must be validated and sanitized
402
450
  - Follow OWASP Top 10 guidelines
451
+ - ALL repository operations MUST use `repositories/{org}/` directory structure. NEVER create repos at the project root.
403
452
  ```
404
453
 
405
454
  ---
@@ -429,6 +478,7 @@ Each agent has exclusive WRITE access to specific file patterns. This prevents m
429
478
  3. **Shared files require coordination** -- if two domains need to modify the same file (e.g., `package.json`), the orchestrator assigns a primary owner and others request changes via messages
430
479
  4. **New files** -- agents can create new files ONLY within their ownership patterns
431
480
  5. **Conflict detection** -- the orchestrator checks for ownership overlap before spawning and resolves ambiguity upfront
481
+ 6. **Repository directory structure** -- for multi-repo setups, ALL repository cloning and creation MUST use the `repositories/{org}/` directory convention. NEVER create repositories at the project root or arbitrary locations.
432
482
 
433
483
  ---
434
484
 
@@ -531,12 +581,11 @@ When `MODE == "subagent-fallback"`, agents communicate via files in `.specweave/
531
581
 
532
582
  ### Native Agent Teams Mode
533
583
 
534
- When Agent Teams is available, use the `Teammate` and `Task` tools with team coordination.
584
+ When Agent Teams is available, use `TeamCreate` and `Task` (with `team_name` parameter) for team coordination.
535
585
 
536
586
  ```typescript
537
- // Step 1: Create the team
538
- Teammate({
539
- operation: "spawnTeam",
587
+ // Step 1: Create the team (MUST use TeamCreate, NOT Teammate)
588
+ TeamCreate({
540
589
  team_name: "feature-checkout",
541
590
  description: "Building checkout flow across frontend, backend, and database"
542
591
  });
@@ -628,16 +677,18 @@ Every agent MUST run quality validation before signaling completion.
628
677
 
629
678
  ### Per-Agent Quality Gate
630
679
 
631
- Each agent runs `/sw:grill` as the final step before marking its work complete:
680
+ Each agent MUST run all tests locally before signaling completion. **All tests must pass before signal COMPLETION.**
632
681
 
633
682
  ```
634
683
  Agent Workflow:
635
- 1. Execute all assigned tasks → /sw:do or /sw:auto
636
- 2. Run tests for owned code
684
+ 1. Execute all assigned tasks → prefer /sw:auto for autonomous execution
685
+ 2. Run all tests for owned code (unit + integration + E2E)
637
686
  3. Run linter/type-check for owned code
638
687
  4. Run /sw:grill
639
- 5. If /sw:grill passes → signal COMPLETION
640
- 6. If /sw:grill failsfix issues, repeat from step 2
688
+ 5. If tests failfix issues and repeat from step 2. Do NOT signal completion until all tests pass.
689
+ 6. If /sw:grill passesattempt closure via /sw:done after auto completes
690
+ 7. If /sw:grill fails → fix issues, repeat from step 2
691
+ 8. Signal COMPLETION
641
692
  ```
642
693
 
643
694
  ### Orchestrator Quality Gate