feat: add competitive swarm pattern and adding-swarm-patterns skill#452
Conversation
Add competitive pattern for multiple independent implementations followed by comparison and selection. Useful for exploratory work and architecture decisions where diverse approaches help find optimal solutions. Changes: - Add "competitive" to SwarmPattern type and JSON schema - Create competitive.yaml template with 3 competing teams - Add pattern and template documentation - Create adding-swarm-patterns skill for guidance on future additions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Devin Review found 1 potential issue.
🐛 1 issue in files not directly in the diff
🐛 "competitive" template missing from BUILT_IN_TEMPLATE_NAMES array (packages/broker-sdk/src/workflows/templates.ts:9-16)
The competitive template YAML file was added to builtin-templates/ but BUILT_IN_TEMPLATE_NAMES in packages/broker-sdk/src/workflows/templates.ts:9-16 was not updated to include "competitive". This means listBuiltInTemplates() and listTemplates() will not return "competitive" in their results.
Root Cause and Impact
The BUILT_IN_TEMPLATE_NAMES constant at packages/broker-sdk/src/workflows/templates.ts:9-16 is the source of truth for which templates are discoverable:
export const BUILT_IN_TEMPLATE_NAMES = [
'feature-dev',
'bug-fix',
'code-review',
'security-audit',
'refactor',
'documentation',
] as const;This array is used by listBuiltInTemplates() (line 63-65) and listTemplates() (line 75-79). Without "competitive" in this array, users calling registry.listTemplates() — as shown in the docs at docs/workflows/README.md:55 — will not see the competitive template listed. The template can still be loaded directly via loadTemplate("competitive") since that uses file system resolution, but it is invisible to discovery APIs.
Impact: The competitive template is undiscoverable through the listBuiltInTemplates() and listTemplates() APIs, breaking the expected user workflow of listing available templates before loading one.
View 4 additional findings in Devin Review.
Summary
Competitive Pattern
Multiple agent teams independently implement solutions to the same problem, then a lead compares outputs and selects the best approach. Useful for:
Changes
SwarmPatterntype unioncompetitive.yamltemplate with 3 competing teamsdocs/workflows/patterns/competitive.md)docs/workflows/templates/competitive.md)docs/workflows/README.mdwith new pattern/templateadding-swarm-patternsskill for future pattern additionsTest plan
🤖 Generated with Claude Code