swarm-engine 1.0.0
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/AGENTS.md +72 -0
- package/CLAUDE.md +89 -0
- package/LICENSE +21 -0
- package/README.md +235 -0
- package/agents/accessibility-reviewer.md +118 -0
- package/agents/api-contract-reviewer.md +99 -0
- package/agents/concurrency-reviewer.md +111 -0
- package/agents/data-integrity-reviewer.md +103 -0
- package/agents/debugger.md +99 -0
- package/agents/dependency-reviewer.md +115 -0
- package/agents/devils-advocate.md +94 -0
- package/agents/documentation-reviewer.md +114 -0
- package/agents/documenter.md +78 -0
- package/agents/error-handling-reviewer.md +113 -0
- package/agents/grounding.md +99 -0
- package/agents/guardian.md +87 -0
- package/agents/implementer.md +141 -0
- package/agents/integrator.md +95 -0
- package/agents/judge.md +79 -0
- package/agents/librarian.md +90 -0
- package/agents/orchestrator.md +331 -0
- package/agents/performance-reviewer.md +93 -0
- package/agents/planner.md +106 -0
- package/agents/refactorer.md +92 -0
- package/agents/researcher.md +97 -0
- package/agents/reviewer.md +117 -0
- package/agents/security-reviewer.md +107 -0
- package/agents/sentinel.md +92 -0
- package/agents/tester.md +93 -0
- package/agents/testing-reviewer.md +112 -0
- package/commands/diff-review.md +64 -0
- package/commands/fix-pr.md +78 -0
- package/commands/red-team.md +82 -0
- package/commands/research.md +59 -0
- package/commands/resume.md +80 -0
- package/commands/review-cycle.md +123 -0
- package/commands/swarm-setup.md +28 -0
- package/commands/swarm.md +126 -0
- package/commands/tdd.md +91 -0
- package/dist/cli/bin.d.ts +3 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/bin.js +3 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/commands/acp.d.ts +3 -0
- package/dist/cli/commands/acp.d.ts.map +1 -0
- package/dist/cli/commands/acp.js +29 -0
- package/dist/cli/commands/acp.js.map +1 -0
- package/dist/cli/commands/agents.d.ts +3 -0
- package/dist/cli/commands/agents.d.ts.map +1 -0
- package/dist/cli/commands/agents.js +344 -0
- package/dist/cli/commands/agents.js.map +1 -0
- package/dist/cli/commands/backends.d.ts +3 -0
- package/dist/cli/commands/backends.d.ts.map +1 -0
- package/dist/cli/commands/backends.js +22 -0
- package/dist/cli/commands/backends.js.map +1 -0
- package/dist/cli/commands/completions.d.ts +3 -0
- package/dist/cli/commands/completions.d.ts.map +1 -0
- package/dist/cli/commands/completions.js +85 -0
- package/dist/cli/commands/completions.js.map +1 -0
- package/dist/cli/commands/compound.d.ts +3 -0
- package/dist/cli/commands/compound.d.ts.map +1 -0
- package/dist/cli/commands/compound.js +119 -0
- package/dist/cli/commands/compound.js.map +1 -0
- package/dist/cli/commands/configure.d.ts +3 -0
- package/dist/cli/commands/configure.d.ts.map +1 -0
- package/dist/cli/commands/configure.js +151 -0
- package/dist/cli/commands/configure.js.map +1 -0
- package/dist/cli/commands/convert.d.ts +15 -0
- package/dist/cli/commands/convert.d.ts.map +1 -0
- package/dist/cli/commands/convert.js +218 -0
- package/dist/cli/commands/convert.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +3 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +96 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +154 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/learn.d.ts +3 -0
- package/dist/cli/commands/learn.d.ts.map +1 -0
- package/dist/cli/commands/learn.js +163 -0
- package/dist/cli/commands/learn.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +3 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +89 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/memory.d.ts +3 -0
- package/dist/cli/commands/memory.d.ts.map +1 -0
- package/dist/cli/commands/memory.js +134 -0
- package/dist/cli/commands/memory.js.map +1 -0
- package/dist/cli/commands/orchestrate.d.ts +3 -0
- package/dist/cli/commands/orchestrate.d.ts.map +1 -0
- package/dist/cli/commands/orchestrate.js +237 -0
- package/dist/cli/commands/orchestrate.js.map +1 -0
- package/dist/cli/commands/patterns.d.ts +3 -0
- package/dist/cli/commands/patterns.d.ts.map +1 -0
- package/dist/cli/commands/patterns.js +25 -0
- package/dist/cli/commands/patterns.js.map +1 -0
- package/dist/cli/commands/plan.d.ts +3 -0
- package/dist/cli/commands/plan.d.ts.map +1 -0
- package/dist/cli/commands/plan.js +77 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/plugin.d.ts +3 -0
- package/dist/cli/commands/plugin.d.ts.map +1 -0
- package/dist/cli/commands/plugin.js +124 -0
- package/dist/cli/commands/plugin.js.map +1 -0
- package/dist/cli/commands/resume.d.ts +3 -0
- package/dist/cli/commands/resume.d.ts.map +1 -0
- package/dist/cli/commands/resume.js +55 -0
- package/dist/cli/commands/resume.js.map +1 -0
- package/dist/cli/commands/run.d.ts +3 -0
- package/dist/cli/commands/run.d.ts.map +1 -0
- package/dist/cli/commands/run.js +78 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/commands/share.d.ts +3 -0
- package/dist/cli/commands/share.d.ts.map +1 -0
- package/dist/cli/commands/share.js +34 -0
- package/dist/cli/commands/share.js.map +1 -0
- package/dist/cli/commands/status.d.ts +3 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +148 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/template.d.ts +3 -0
- package/dist/cli/commands/template.d.ts.map +1 -0
- package/dist/cli/commands/template.js +213 -0
- package/dist/cli/commands/template.js.map +1 -0
- package/dist/cli/commands/vault.d.ts +3 -0
- package/dist/cli/commands/vault.d.ts.map +1 -0
- package/dist/cli/commands/vault.js +402 -0
- package/dist/cli/commands/vault.js.map +1 -0
- package/dist/cli/commands/verify.d.ts +3 -0
- package/dist/cli/commands/verify.d.ts.map +1 -0
- package/dist/cli/commands/verify.js +38 -0
- package/dist/cli/commands/verify.js.map +1 -0
- package/dist/cli/commands/version.d.ts +3 -0
- package/dist/cli/commands/version.d.ts.map +1 -0
- package/dist/cli/commands/version.js +19 -0
- package/dist/cli/commands/version.js.map +1 -0
- package/dist/cli/commands/watch.d.ts +3 -0
- package/dist/cli/commands/watch.d.ts.map +1 -0
- package/dist/cli/commands/watch.js +179 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +118 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/checkpoint.d.ts +35 -0
- package/dist/core/checkpoint.d.ts.map +1 -0
- package/dist/core/checkpoint.js +80 -0
- package/dist/core/checkpoint.js.map +1 -0
- package/dist/core/event-bus.d.ts +41 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/event-bus.js +115 -0
- package/dist/core/event-bus.js.map +1 -0
- package/dist/core/lifecycle.d.ts +30 -0
- package/dist/core/lifecycle.d.ts.map +1 -0
- package/dist/core/lifecycle.js +72 -0
- package/dist/core/lifecycle.js.map +1 -0
- package/dist/core/patterns.d.ts +43 -0
- package/dist/core/patterns.d.ts.map +1 -0
- package/dist/core/patterns.js +372 -0
- package/dist/core/patterns.js.map +1 -0
- package/dist/core/permissions.d.ts +40 -0
- package/dist/core/permissions.d.ts.map +1 -0
- package/dist/core/permissions.js +113 -0
- package/dist/core/permissions.js.map +1 -0
- package/dist/core/registry.d.ts +80 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +308 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/snapshots.d.ts +20 -0
- package/dist/core/snapshots.d.ts.map +1 -0
- package/dist/core/snapshots.js +73 -0
- package/dist/core/snapshots.js.map +1 -0
- package/dist/core/types.d.ts +168 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +33 -0
- package/dist/core/types.js.map +1 -0
- package/dist/hooks/cli.d.ts +11 -0
- package/dist/hooks/cli.d.ts.map +1 -0
- package/dist/hooks/cli.js +32 -0
- package/dist/hooks/cli.js.map +1 -0
- package/dist/hooks/index.d.ts +23 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +58 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/memory/index.d.ts +105 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +298 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/schema.d.ts +6 -0
- package/dist/memory/schema.d.ts.map +1 -0
- package/dist/memory/schema.js +71 -0
- package/dist/memory/schema.js.map +1 -0
- package/dist/plugin/index.d.ts +6 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +182 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/runtime/acp.d.ts +41 -0
- package/dist/runtime/acp.d.ts.map +1 -0
- package/dist/runtime/acp.js +137 -0
- package/dist/runtime/acp.js.map +1 -0
- package/dist/runtime/adaptive.d.ts +34 -0
- package/dist/runtime/adaptive.d.ts.map +1 -0
- package/dist/runtime/adaptive.js +229 -0
- package/dist/runtime/adaptive.js.map +1 -0
- package/dist/runtime/autonomy.d.ts +21 -0
- package/dist/runtime/autonomy.d.ts.map +1 -0
- package/dist/runtime/autonomy.js +74 -0
- package/dist/runtime/autonomy.js.map +1 -0
- package/dist/runtime/backends/claude.d.ts +9 -0
- package/dist/runtime/backends/claude.d.ts.map +1 -0
- package/dist/runtime/backends/claude.js +134 -0
- package/dist/runtime/backends/claude.js.map +1 -0
- package/dist/runtime/backends/codex.d.ts +9 -0
- package/dist/runtime/backends/codex.d.ts.map +1 -0
- package/dist/runtime/backends/codex.js +132 -0
- package/dist/runtime/backends/codex.js.map +1 -0
- package/dist/runtime/backends/gemini.d.ts +9 -0
- package/dist/runtime/backends/gemini.d.ts.map +1 -0
- package/dist/runtime/backends/gemini.js +103 -0
- package/dist/runtime/backends/gemini.js.map +1 -0
- package/dist/runtime/backends/index.d.ts +17 -0
- package/dist/runtime/backends/index.d.ts.map +1 -0
- package/dist/runtime/backends/index.js +39 -0
- package/dist/runtime/backends/index.js.map +1 -0
- package/dist/runtime/backends/mock.d.ts +21 -0
- package/dist/runtime/backends/mock.d.ts.map +1 -0
- package/dist/runtime/backends/mock.js +46 -0
- package/dist/runtime/backends/mock.js.map +1 -0
- package/dist/runtime/backends/types.d.ts +34 -0
- package/dist/runtime/backends/types.d.ts.map +1 -0
- package/dist/runtime/backends/types.js +2 -0
- package/dist/runtime/backends/types.js.map +1 -0
- package/dist/runtime/backends/vercel-ai.d.ts +14 -0
- package/dist/runtime/backends/vercel-ai.d.ts.map +1 -0
- package/dist/runtime/backends/vercel-ai.js +137 -0
- package/dist/runtime/backends/vercel-ai.js.map +1 -0
- package/dist/runtime/cache-optimizer.d.ts +37 -0
- package/dist/runtime/cache-optimizer.d.ts.map +1 -0
- package/dist/runtime/cache-optimizer.js +54 -0
- package/dist/runtime/cache-optimizer.js.map +1 -0
- package/dist/runtime/cascade.d.ts +26 -0
- package/dist/runtime/cascade.d.ts.map +1 -0
- package/dist/runtime/cascade.js +54 -0
- package/dist/runtime/cascade.js.map +1 -0
- package/dist/runtime/chunker.d.ts +36 -0
- package/dist/runtime/chunker.d.ts.map +1 -0
- package/dist/runtime/chunker.js +210 -0
- package/dist/runtime/chunker.js.map +1 -0
- package/dist/runtime/compaction.d.ts +22 -0
- package/dist/runtime/compaction.d.ts.map +1 -0
- package/dist/runtime/compaction.js +36 -0
- package/dist/runtime/compaction.js.map +1 -0
- package/dist/runtime/compounder.d.ts +66 -0
- package/dist/runtime/compounder.d.ts.map +1 -0
- package/dist/runtime/compounder.js +276 -0
- package/dist/runtime/compounder.js.map +1 -0
- package/dist/runtime/cost-model.d.ts +24 -0
- package/dist/runtime/cost-model.d.ts.map +1 -0
- package/dist/runtime/cost-model.js +120 -0
- package/dist/runtime/cost-model.js.map +1 -0
- package/dist/runtime/distiller.d.ts +21 -0
- package/dist/runtime/distiller.d.ts.map +1 -0
- package/dist/runtime/distiller.js +70 -0
- package/dist/runtime/distiller.js.map +1 -0
- package/dist/runtime/engine.d.ts +123 -0
- package/dist/runtime/engine.d.ts.map +1 -0
- package/dist/runtime/engine.js +969 -0
- package/dist/runtime/engine.js.map +1 -0
- package/dist/runtime/executor.d.ts +71 -0
- package/dist/runtime/executor.d.ts.map +1 -0
- package/dist/runtime/executor.js +283 -0
- package/dist/runtime/executor.js.map +1 -0
- package/dist/runtime/heuristics.d.ts +33 -0
- package/dist/runtime/heuristics.d.ts.map +1 -0
- package/dist/runtime/heuristics.js +188 -0
- package/dist/runtime/heuristics.js.map +1 -0
- package/dist/runtime/living-spec.d.ts +34 -0
- package/dist/runtime/living-spec.d.ts.map +1 -0
- package/dist/runtime/living-spec.js +91 -0
- package/dist/runtime/living-spec.js.map +1 -0
- package/dist/runtime/lsp.d.ts +50 -0
- package/dist/runtime/lsp.d.ts.map +1 -0
- package/dist/runtime/lsp.js +110 -0
- package/dist/runtime/lsp.js.map +1 -0
- package/dist/runtime/mcp.d.ts +27 -0
- package/dist/runtime/mcp.d.ts.map +1 -0
- package/dist/runtime/mcp.js +154 -0
- package/dist/runtime/mcp.js.map +1 -0
- package/dist/runtime/model-router.d.ts +22 -0
- package/dist/runtime/model-router.d.ts.map +1 -0
- package/dist/runtime/model-router.js +94 -0
- package/dist/runtime/model-router.js.map +1 -0
- package/dist/runtime/panes.d.ts +76 -0
- package/dist/runtime/panes.d.ts.map +1 -0
- package/dist/runtime/panes.js +279 -0
- package/dist/runtime/panes.js.map +1 -0
- package/dist/runtime/plan-search.d.ts +41 -0
- package/dist/runtime/plan-search.d.ts.map +1 -0
- package/dist/runtime/plan-search.js +140 -0
- package/dist/runtime/plan-search.js.map +1 -0
- package/dist/runtime/plugins.d.ts +59 -0
- package/dist/runtime/plugins.d.ts.map +1 -0
- package/dist/runtime/plugins.js +121 -0
- package/dist/runtime/plugins.js.map +1 -0
- package/dist/runtime/reflexion.d.ts +22 -0
- package/dist/runtime/reflexion.d.ts.map +1 -0
- package/dist/runtime/reflexion.js +85 -0
- package/dist/runtime/reflexion.js.map +1 -0
- package/dist/runtime/review-schema.d.ts +75 -0
- package/dist/runtime/review-schema.d.ts.map +1 -0
- package/dist/runtime/review-schema.js +223 -0
- package/dist/runtime/review-schema.js.map +1 -0
- package/dist/runtime/rewriter.d.ts +8 -0
- package/dist/runtime/rewriter.d.ts.map +1 -0
- package/dist/runtime/rewriter.js +81 -0
- package/dist/runtime/rewriter.js.map +1 -0
- package/dist/runtime/sharing.d.ts +15 -0
- package/dist/runtime/sharing.d.ts.map +1 -0
- package/dist/runtime/sharing.js +48 -0
- package/dist/runtime/sharing.js.map +1 -0
- package/dist/runtime/stats.d.ts +53 -0
- package/dist/runtime/stats.d.ts.map +1 -0
- package/dist/runtime/stats.js +160 -0
- package/dist/runtime/stats.js.map +1 -0
- package/dist/runtime/templates.d.ts +77 -0
- package/dist/runtime/templates.d.ts.map +1 -0
- package/dist/runtime/templates.js +221 -0
- package/dist/runtime/templates.js.map +1 -0
- package/dist/runtime/traces.d.ts +60 -0
- package/dist/runtime/traces.d.ts.map +1 -0
- package/dist/runtime/traces.js +166 -0
- package/dist/runtime/traces.js.map +1 -0
- package/dist/runtime/verifier.d.ts +54 -0
- package/dist/runtime/verifier.d.ts.map +1 -0
- package/dist/runtime/verifier.js +172 -0
- package/dist/runtime/verifier.js.map +1 -0
- package/dist/runtime/worktree.d.ts +24 -0
- package/dist/runtime/worktree.d.ts.map +1 -0
- package/dist/runtime/worktree.js +82 -0
- package/dist/runtime/worktree.js.map +1 -0
- package/dist/tui/dashboard.d.ts +65 -0
- package/dist/tui/dashboard.d.ts.map +1 -0
- package/dist/tui/dashboard.js +496 -0
- package/dist/tui/dashboard.js.map +1 -0
- package/dist/tui/progress.d.ts +32 -0
- package/dist/tui/progress.d.ts.map +1 -0
- package/dist/tui/progress.js +257 -0
- package/dist/tui/progress.js.map +1 -0
- package/dist/tui/renderer.d.ts +72 -0
- package/dist/tui/renderer.d.ts.map +1 -0
- package/dist/tui/renderer.js +205 -0
- package/dist/tui/renderer.js.map +1 -0
- package/dist/utils/compact-format.d.ts +35 -0
- package/dist/utils/compact-format.d.ts.map +1 -0
- package/dist/utils/compact-format.js +106 -0
- package/dist/utils/compact-format.js.map +1 -0
- package/dist/utils/config.d.ts +73 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +70 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/env.d.ts +6 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +28 -0
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/errors.d.ts +14 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +120 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +56 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/output.d.ts +10 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +26 -0
- package/dist/utils/output.js.map +1 -0
- package/dist/utils/paths.d.ts +7 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +16 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/project-config.d.ts +18 -0
- package/dist/utils/project-config.d.ts.map +1 -0
- package/dist/utils/project-config.js +46 -0
- package/dist/utils/project-config.js.map +1 -0
- package/dist/utils/redact.d.ts +5 -0
- package/dist/utils/redact.d.ts.map +1 -0
- package/dist/utils/redact.js +25 -0
- package/dist/utils/redact.js.map +1 -0
- package/dist/utils/schemas.d.ts +109 -0
- package/dist/utils/schemas.d.ts.map +1 -0
- package/dist/utils/schemas.js +63 -0
- package/dist/utils/schemas.js.map +1 -0
- package/dist/utils/terminal.d.ts +33 -0
- package/dist/utils/terminal.d.ts.map +1 -0
- package/dist/utils/terminal.js +82 -0
- package/dist/utils/terminal.js.map +1 -0
- package/dist/utils/tokens.d.ts +9 -0
- package/dist/utils/tokens.d.ts.map +1 -0
- package/dist/utils/tokens.js +11 -0
- package/dist/utils/tokens.js.map +1 -0
- package/package.json +71 -0
- package/skills/design-system/SKILL.md +195 -0
- package/skills/orchestration-patterns/SKILL.md +81 -0
- package/skills/orchestration-patterns/examples/example-workflows.md +290 -0
- package/skills/orchestration-patterns/references/adversarial.md +51 -0
- package/skills/orchestration-patterns/references/batch.md +63 -0
- package/skills/orchestration-patterns/references/chaos.md +43 -0
- package/skills/orchestration-patterns/references/competitive.md +84 -0
- package/skills/orchestration-patterns/references/debate.md +44 -0
- package/skills/orchestration-patterns/references/emergence.md +50 -0
- package/skills/orchestration-patterns/references/fan-out-fan-in.md +74 -0
- package/skills/orchestration-patterns/references/iterative.md +99 -0
- package/skills/orchestration-patterns/references/pipeline.md +72 -0
- package/skills/swarm-output-style/SKILL.md +85 -0
- package/templates/add-endpoint.yml +44 -0
- package/templates/add-feature.yml +30 -0
- package/templates/agent-template.md +73 -0
- package/templates/bug-fix.yml +31 -0
- package/templates/explore.yml +21 -0
- package/templates/fix-pr.yml +30 -0
- package/templates/migration.yml +36 -0
- package/templates/refactor.yml +35 -0
- package/templates/security-audit.yml +27 -0
- package/templates/workflow-template.md +63 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Agent Template — copy and customize
|
|
3
|
+
name: my-agent # Required: lowercase, hyphens, 3-50 chars
|
|
4
|
+
description: | # Required: when to trigger + examples
|
|
5
|
+
One-line description of what this agent does.
|
|
6
|
+
|
|
7
|
+
<example>
|
|
8
|
+
<context>When this situation arises</context>
|
|
9
|
+
<user-request>User says something like this</user-request>
|
|
10
|
+
<assistant-response>Claude delegates to this agent</assistant-response>
|
|
11
|
+
<commentary>Why this agent is the right choice</commentary>
|
|
12
|
+
</example>
|
|
13
|
+
|
|
14
|
+
model: inherit # Optional: sonnet | opus | haiku | inherit
|
|
15
|
+
# tools: Read, Glob, Grep # Optional: allowlist (inherits all if omitted)
|
|
16
|
+
# disallowedTools: Write, Edit # Optional: denylist
|
|
17
|
+
# maxTurns: 20 # Optional: limit agentic turns
|
|
18
|
+
# background: true # Optional: always run in background
|
|
19
|
+
# isolation: worktree # Optional: isolated git worktree
|
|
20
|
+
# memory: user # Optional: user | project | local
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
You are a [Role] Agent. Your job is to [core responsibility].
|
|
24
|
+
|
|
25
|
+
## Process
|
|
26
|
+
1. **Step 1** — [what to do first]
|
|
27
|
+
1b. **Check vault** — Read project context from the vault: `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" overview`
|
|
28
|
+
2. **Step 2** — [what to do next]
|
|
29
|
+
3. **Step 3** — [final step]
|
|
30
|
+
|
|
31
|
+
## Before You Act
|
|
32
|
+
|
|
33
|
+
Before executing your process, reason through these questions internally (do not output this thinking):
|
|
34
|
+
|
|
35
|
+
1. **What's the REAL problem?** Restate the task in your own words. If your restatement doesn't match the original request, you've already drifted.
|
|
36
|
+
2. **What could go wrong?** Name 2-3 specific failure modes for THIS task — not hypothetical, concrete.
|
|
37
|
+
3. **What's the blast radius?** If you make a mistake here, what else breaks? The answer determines how careful to be.
|
|
38
|
+
4. **Am I the right agent for this?** If this task is better suited for a different agent type, say so immediately rather than producing mediocre output.
|
|
39
|
+
|
|
40
|
+
## Output Format
|
|
41
|
+
```
|
|
42
|
+
## Summary
|
|
43
|
+
[Brief answer/result]
|
|
44
|
+
|
|
45
|
+
## Details
|
|
46
|
+
[Structured findings with file:line references]
|
|
47
|
+
|
|
48
|
+
## Recommendations
|
|
49
|
+
[Next steps if applicable]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Rules
|
|
53
|
+
1. [Most important constraint]
|
|
54
|
+
2. [Second constraint]
|
|
55
|
+
3. [Third constraint]
|
|
56
|
+
4. **Abstention** — If this task is outside your competence or you lack sufficient context to do it well, say so clearly in your output rather than producing low-quality work. Set Confidence to "low" and explain what's missing in Blockers.
|
|
57
|
+
5. **Vault** — Check the vault for relevant context before starting: `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions`. Note non-obvious findings for the orchestrator to save.
|
|
58
|
+
6. **Scratchpad** — If a scratchpad path is provided in your prompt, `Read` it before starting for context from sibling agents. Before completing, append your key findings under a `## Agent: <your-name>` heading.
|
|
59
|
+
7. **Debt tagging** — Tag tech debt explicitly: DEBT:NEW (I introduced this), DEBT:EXISTING (I found this), DEBT:WORSENED (my change makes this worse). Include file, reason, and priority.
|
|
60
|
+
|
|
61
|
+
## Self-Check (internal — do not output)
|
|
62
|
+
Before finalizing your output:
|
|
63
|
+
- Does my output actually answer what was asked? Re-read the original task.
|
|
64
|
+
- Did I make assumptions I didn't flag? Each assumption is a potential failure point.
|
|
65
|
+
- Is there anything I'm uncertain about that I presented as certain? Downgrade confidence.
|
|
66
|
+
- What would a senior engineer critique about my output? Address that now.
|
|
67
|
+
|
|
68
|
+
Always include at the end of your response:
|
|
69
|
+
|
|
70
|
+
## Meta
|
|
71
|
+
- **Confidence**: [high|medium|low] — how confident you are in your output
|
|
72
|
+
- **Blockers**: [list of things that prevented full completion, or "none"]
|
|
73
|
+
- **Files touched**: [list of file paths written/edited, or "none" for read-only agents]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: bug-fix
|
|
2
|
+
description: "Reproduce, diagnose, fix, and verify a bug"
|
|
3
|
+
parameters:
|
|
4
|
+
bug_description:
|
|
5
|
+
type: string
|
|
6
|
+
description: "Description of the bug"
|
|
7
|
+
required: true
|
|
8
|
+
reproduction_steps:
|
|
9
|
+
type: string
|
|
10
|
+
description: "Steps to reproduce"
|
|
11
|
+
required: false
|
|
12
|
+
pattern: hybrid
|
|
13
|
+
agents:
|
|
14
|
+
researcher:
|
|
15
|
+
extra_rules:
|
|
16
|
+
- "Reproduce the bug first"
|
|
17
|
+
- "Trace the root cause through the code"
|
|
18
|
+
- "Check git blame for recent changes to affected files"
|
|
19
|
+
implementer:
|
|
20
|
+
extra_rules:
|
|
21
|
+
- "Fix the root cause, not just the symptom"
|
|
22
|
+
- "Add a regression test"
|
|
23
|
+
reviewer:
|
|
24
|
+
extra_rules:
|
|
25
|
+
- "Verify the fix addresses the root cause"
|
|
26
|
+
- "Check for similar bugs in related code"
|
|
27
|
+
success_criteria:
|
|
28
|
+
- "Bug is fixed"
|
|
29
|
+
- "Regression test added"
|
|
30
|
+
- "No side effects"
|
|
31
|
+
tags: [bug, fix]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: explore
|
|
2
|
+
description: "Onboard to a new codebase — understand architecture, patterns, and conventions"
|
|
3
|
+
parameters:
|
|
4
|
+
focus:
|
|
5
|
+
type: string
|
|
6
|
+
description: "Area to focus on (or 'full' for entire repo)"
|
|
7
|
+
default: full
|
|
8
|
+
pattern: research
|
|
9
|
+
agents:
|
|
10
|
+
researcher:
|
|
11
|
+
extra_rules:
|
|
12
|
+
- "Map the directory structure and key files"
|
|
13
|
+
- "Identify the tech stack, frameworks, and dependencies"
|
|
14
|
+
- "Find coding conventions and patterns"
|
|
15
|
+
- "Document the architecture and data flow"
|
|
16
|
+
- "Focus area: ${focus}"
|
|
17
|
+
success_criteria:
|
|
18
|
+
- "Architecture documented"
|
|
19
|
+
- "Key files and patterns identified"
|
|
20
|
+
- "Conventions understood"
|
|
21
|
+
tags: [research, onboarding]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: fix-pr
|
|
2
|
+
description: "Fix PR review comments and push updates"
|
|
3
|
+
parameters:
|
|
4
|
+
pr_number:
|
|
5
|
+
type: string
|
|
6
|
+
description: "Pull request number"
|
|
7
|
+
required: true
|
|
8
|
+
example: "42"
|
|
9
|
+
repo:
|
|
10
|
+
type: string
|
|
11
|
+
description: "Repository (owner/repo)"
|
|
12
|
+
required: false
|
|
13
|
+
pattern: review-cycle
|
|
14
|
+
agents:
|
|
15
|
+
researcher:
|
|
16
|
+
extra_rules:
|
|
17
|
+
- "Read the PR diff and all review comments"
|
|
18
|
+
- "Identify which comments require code changes vs discussion"
|
|
19
|
+
implementer:
|
|
20
|
+
extra_rules:
|
|
21
|
+
- "Address each review comment systematically"
|
|
22
|
+
- "Do not change code unrelated to the review"
|
|
23
|
+
reviewer:
|
|
24
|
+
extra_rules:
|
|
25
|
+
- "Verify each original review comment was addressed"
|
|
26
|
+
success_criteria:
|
|
27
|
+
- "All review comments addressed"
|
|
28
|
+
- "Tests pass"
|
|
29
|
+
- "No unrelated changes"
|
|
30
|
+
tags: [git, review]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: migration
|
|
2
|
+
description: "Database or schema migration with rollback plan"
|
|
3
|
+
parameters:
|
|
4
|
+
from:
|
|
5
|
+
type: string
|
|
6
|
+
description: "Source schema/format"
|
|
7
|
+
required: true
|
|
8
|
+
to:
|
|
9
|
+
type: string
|
|
10
|
+
description: "Target schema/format"
|
|
11
|
+
required: true
|
|
12
|
+
rollback:
|
|
13
|
+
type: boolean
|
|
14
|
+
description: "Include rollback script?"
|
|
15
|
+
default: true
|
|
16
|
+
pattern: tdd
|
|
17
|
+
agents:
|
|
18
|
+
researcher:
|
|
19
|
+
extra_rules:
|
|
20
|
+
- "Understand the current schema: ${from}"
|
|
21
|
+
- "Map all code that depends on the schema"
|
|
22
|
+
tester:
|
|
23
|
+
extra_rules:
|
|
24
|
+
- "Write tests for the migration path"
|
|
25
|
+
- "Test rollback if rollback=true"
|
|
26
|
+
implementer:
|
|
27
|
+
extra_rules:
|
|
28
|
+
- "Migrate from ${from} to ${to}"
|
|
29
|
+
- "Write a rollback script if ${rollback}"
|
|
30
|
+
- "Ensure zero data loss"
|
|
31
|
+
success_criteria:
|
|
32
|
+
- "Migration from ${from} to ${to} works"
|
|
33
|
+
- "All dependent code updated"
|
|
34
|
+
- "Rollback script included if requested"
|
|
35
|
+
- "No data loss"
|
|
36
|
+
tags: [migration, database]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: refactor
|
|
2
|
+
description: "Safe refactoring with verification at each step"
|
|
3
|
+
parameters:
|
|
4
|
+
target:
|
|
5
|
+
type: string
|
|
6
|
+
description: "What to refactor (module, function, pattern)"
|
|
7
|
+
required: true
|
|
8
|
+
goal:
|
|
9
|
+
type: string
|
|
10
|
+
description: "What the refactoring achieves"
|
|
11
|
+
required: true
|
|
12
|
+
constraint:
|
|
13
|
+
type: string
|
|
14
|
+
description: "Constraints (e.g., no API changes, backward compatible)"
|
|
15
|
+
required: false
|
|
16
|
+
default: "No breaking changes to public API"
|
|
17
|
+
pattern: review-cycle
|
|
18
|
+
agents:
|
|
19
|
+
researcher:
|
|
20
|
+
extra_rules:
|
|
21
|
+
- "Map all callers and dependents of ${target}"
|
|
22
|
+
- "Identify the blast radius of changes"
|
|
23
|
+
implementer:
|
|
24
|
+
extra_rules:
|
|
25
|
+
- "Make changes incrementally, verify tests after each step"
|
|
26
|
+
- "Constraint: ${constraint}"
|
|
27
|
+
reviewer:
|
|
28
|
+
extra_rules:
|
|
29
|
+
- "Verify no behavioral changes beyond the stated goal"
|
|
30
|
+
- "Check that ${constraint} is respected"
|
|
31
|
+
success_criteria:
|
|
32
|
+
- "Refactoring achieves: ${goal}"
|
|
33
|
+
- "All tests pass"
|
|
34
|
+
- "${constraint}"
|
|
35
|
+
tags: [refactor, quality]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: security-audit
|
|
2
|
+
description: "OWASP-focused security review of a codebase or module"
|
|
3
|
+
parameters:
|
|
4
|
+
scope:
|
|
5
|
+
type: string
|
|
6
|
+
description: "What to audit (full repo, module path, or file)"
|
|
7
|
+
required: true
|
|
8
|
+
example: "src/auth/"
|
|
9
|
+
depth:
|
|
10
|
+
type: string
|
|
11
|
+
description: "Audit depth"
|
|
12
|
+
enum: [quick, standard, thorough]
|
|
13
|
+
default: standard
|
|
14
|
+
pattern: red-team
|
|
15
|
+
agents:
|
|
16
|
+
implementer:
|
|
17
|
+
extra_rules:
|
|
18
|
+
- "Focus on ${scope}"
|
|
19
|
+
- "Check OWASP Top 10"
|
|
20
|
+
reviewer:
|
|
21
|
+
extra_rules:
|
|
22
|
+
- "Look for: injection, auth bypass, XSS, SSRF, path traversal"
|
|
23
|
+
- "Check dependency vulnerabilities"
|
|
24
|
+
success_criteria:
|
|
25
|
+
- "All critical vulnerabilities identified"
|
|
26
|
+
- "Findings include severity, location, and fix recommendation"
|
|
27
|
+
tags: [security, review]
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Workflow (Command) Template — copy and customize
|
|
3
|
+
description: "One-line description of this workflow"
|
|
4
|
+
argument-hint: "<what the user should provide>"
|
|
5
|
+
# allowed-tools: Read, Glob, Grep, Agent # Optional: restrict tools
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are executing the [Workflow Name] workflow.
|
|
9
|
+
|
|
10
|
+
## Task
|
|
11
|
+
$ARGUMENTS
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
### Setup: Create Team
|
|
16
|
+
1. Create a team with `TeamCreate` (name derived from workflow + timestamp)
|
|
17
|
+
2. Create tasks with `TaskCreate` for each planned work unit
|
|
18
|
+
3. Create a scratchpad at `.claude/scratchpad/<team-name>.md` for cross-agent communication:
|
|
19
|
+
```bash
|
|
20
|
+
mkdir -p .claude/scratchpad && echo "# Scratchpad: <team-name>" > .claude/scratchpad/<team-name>.md
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Phase 1: [Name] — parallel
|
|
24
|
+
# Include scratchpad path in each dispatch: "Scratchpad: .claude/scratchpad/{team-name}.md"
|
|
25
|
+
Spawn N teammates with `team_name`, `name`, and `run_in_background: true`:
|
|
26
|
+
- **Agent A** (researcher, haiku): [specific scope]
|
|
27
|
+
- **Agent B** (researcher, haiku): [specific scope]
|
|
28
|
+
|
|
29
|
+
### Phase 2: [Name] — sequential (depends on Phase 1)
|
|
30
|
+
Synthesize Phase 1 results, then:
|
|
31
|
+
- **Agent C** (implementer, sonnet): [specific scope with Phase 1 context]
|
|
32
|
+
|
|
33
|
+
### Phase 3: [Name] — parallel (depends on Phase 2)
|
|
34
|
+
Launch N review agents:
|
|
35
|
+
- **Agent D** (reviewer, sonnet): [review focus area 1]
|
|
36
|
+
- **Agent E** (reviewer, sonnet): [review focus area 2]
|
|
37
|
+
|
|
38
|
+
### Phase 4: Report
|
|
39
|
+
Aggregate all results:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
## Summary
|
|
43
|
+
[What was accomplished]
|
|
44
|
+
|
|
45
|
+
## Key Findings/Changes
|
|
46
|
+
[Structured results]
|
|
47
|
+
|
|
48
|
+
## Issues
|
|
49
|
+
[Any problems found]
|
|
50
|
+
|
|
51
|
+
## Next Steps
|
|
52
|
+
[Recommended follow-ups]
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Cleanup
|
|
56
|
+
1. Send `shutdown_request` via `SendMessage` to each remaining active teammate to close their split pane
|
|
57
|
+
2. Call `TeamDelete` to clean up the team
|
|
58
|
+
|
|
59
|
+
## Rules
|
|
60
|
+
- All agents must be spawned as team members (TeamCreate → TaskCreate → Agent with team_name/name/run_in_background)
|
|
61
|
+
- Present the plan before executing
|
|
62
|
+
- Include full context in every agent dispatch
|
|
63
|
+
- Use the cheapest model that can handle each task
|