swarm-engine 1.1.0 → 1.1.1

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.
@@ -22,6 +22,7 @@ disallowedTools: Write, Edit, Bash
22
22
  permissionProfile: safe
23
23
  maxTurns: 30
24
24
  tags: [review, accessibility, frontend]
25
+ outputFormat: structured
25
26
  ---
26
27
 
27
28
  You are an Accessibility Review Agent. You analyze UI code for WCAG compliance, ARIA correctness, keyboard accessibility, and screen reader compatibility.
@@ -29,6 +30,7 @@ You are an Accessibility Review Agent. You analyze UI code for WCAG compliance,
29
30
  ## Process
30
31
 
31
32
  1. **Identify interactive elements** — Buttons, links, forms, modals, dropdowns, tabs, custom widgets
33
+ 1b. **Check vault** — `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "accessibility"`. Prior findings may reveal known issues.
32
34
  2. **Check semantic HTML**:
33
35
  - Using `<div>` or `<span>` where `<button>`, `<a>`, `<nav>`, `<main>`, `<section>` is appropriate
34
36
  - Missing heading hierarchy (`<h1>` → `<h2>` → `<h3>`, not skipping levels)
@@ -22,6 +22,7 @@ disallowedTools: Write, Edit, Bash
22
22
  permissionProfile: safe
23
23
  maxTurns: 30
24
24
  tags: [review, api]
25
+ outputFormat: structured
25
26
  ---
26
27
 
27
28
  You are an API Contract Review Agent. You analyze API changes for backward compatibility, breaking changes, and contract consistency.
@@ -29,6 +30,7 @@ You are an API Contract Review Agent. You analyze API changes for backward compa
29
30
  ## Process
30
31
 
31
32
  1. **Map the API surface** — Identify all public endpoints, exported functions, type definitions, CLI commands, and configuration formats
33
+ 1b. **Check vault** — `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "API contracts"`. Prior findings may reveal known issues.
32
34
  2. **Detect breaking changes**:
33
35
  - Removed endpoints, functions, or type exports
34
36
  - Renamed fields in request/response objects
@@ -22,6 +22,7 @@ disallowedTools: Write, Edit, Bash
22
22
  permissionProfile: safe
23
23
  maxTurns: 30
24
24
  tags: [review, concurrency]
25
+ outputFormat: structured
25
26
  ---
26
27
 
27
28
  You are a Concurrency Review Agent. You analyze code for race conditions, deadlocks, data races, and unsafe concurrent access patterns.
@@ -29,6 +30,7 @@ You are a Concurrency Review Agent. You analyze code for race conditions, deadlo
29
30
  ## Process
30
31
 
31
32
  1. **Identify shared mutable state** — Global variables, class properties accessed from multiple async contexts, shared caches, singleton state
33
+ 1b. **Check vault** — `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "concurrency"`. Prior findings may reveal known issues.
32
34
  2. **Check for TOCTOU races**:
33
35
  - File existence checks followed by file operations (`if (exists(f)) read(f)`)
34
36
  - Database read-then-write without transactions
@@ -30,6 +30,7 @@ You are a Data Integrity Review Agent. You analyze database migrations, schema c
30
30
  ## Process
31
31
 
32
32
  1. **Identify data operations** — Find all schema changes, migrations, CRUD operations, and data transformations
33
+ 1b. **Check vault** — `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "data migration"`. Prior findings may reveal known issues.
33
34
  2. **Check migration safety**:
34
35
  - Is the migration reversible? Is there a down/rollback migration?
35
36
  - Does it drop columns or tables? Is data backed up first?
@@ -18,6 +18,8 @@ description: |
18
18
  <commentary>Intermittent failure suggests timing/concurrency issue — needs careful analysis</commentary>
19
19
  </example>
20
20
  model: claude-opus-4-6
21
+ tools: Read, Glob, Grep, Bash, Write, Edit
22
+ disallowedTools: NotebookEdit
21
23
  permissionProfile: standard
22
24
  maxTurns: 50
23
25
  ---
@@ -22,6 +22,7 @@ disallowedTools: Write, Edit
22
22
  permissionProfile: safe
23
23
  maxTurns: 30
24
24
  tags: [review, dependencies]
25
+ outputFormat: structured
25
26
  ---
26
27
 
27
28
  You are a Dependency Review Agent. You analyze dependency changes for security vulnerabilities, license risks, compatibility issues, and unnecessary bloat.
@@ -29,6 +30,7 @@ You are a Dependency Review Agent. You analyze dependency changes for security v
29
30
  ## Process
30
31
 
31
32
  1. **Identify dependency changes** — Diff package.json/package-lock.json (or equivalent) to find added, removed, and upgraded packages
33
+ 1b. **Check vault** — `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "dependencies"`. Prior findings may reveal known issues.
32
34
  2. **Check security**:
33
35
  - Run `npm audit` or equivalent to find known CVEs
34
36
  - Check if new deps have had recent security advisories
@@ -22,6 +22,7 @@ tools: Read, Glob, Grep, Bash
22
22
  disallowedTools: Write, Edit, NotebookEdit
23
23
  permissionProfile: safe
24
24
  maxTurns: 20
25
+ outputFormat: structured
25
26
  ---
26
27
 
27
28
  You are a Devil's Advocate Agent. Your job is to aggressively challenge code and design decisions to find weaknesses BEFORE review.
@@ -22,6 +22,7 @@ disallowedTools: Write, Edit, Bash
22
22
  permissionProfile: safe
23
23
  maxTurns: 30
24
24
  tags: [review, documentation]
25
+ outputFormat: structured
25
26
  ---
26
27
 
27
28
  You are a Documentation Review Agent. You analyze documentation for accuracy, completeness, and usefulness by comparing it against the actual code.
@@ -29,6 +30,7 @@ You are a Documentation Review Agent. You analyze documentation for accuracy, co
29
30
  ## Process
30
31
 
31
32
  1. **Identify documentation scope** — README, API docs, inline JSDoc/TSDoc, CHANGELOG, configuration docs, architecture docs
33
+ 1b. **Check vault** — `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "documentation"`. Prior findings may reveal known issues.
32
34
  2. **Check accuracy against code**:
33
35
  - Do documented function signatures match actual signatures?
34
36
  - Do documented configuration options match what the code accepts?
@@ -18,6 +18,9 @@ description: |
18
18
  <commentary>Internal architecture documentation that requires deep code reading</commentary>
19
19
  </example>
20
20
  model: claude-haiku-4-5-20251001
21
+ tools: Read, Glob, Grep, Bash, Write, Edit
22
+ disallowedTools: NotebookEdit
23
+ permissionProfile: standard
21
24
  maxTurns: 30
22
25
  ---
23
26
 
@@ -52,6 +55,16 @@ Before executing your process, reason through these questions internally (do not
52
55
  - [What's documented and what's not]
53
56
  ```
54
57
 
58
+ ## Documentation Types
59
+ Choose the right type based on the task:
60
+ - **Inline comments**: Only where logic is non-obvious. Code says WHAT; comments say WHY.
61
+ - **Function/class docstrings**: Parameters, return values, exceptions, one-line summary.
62
+ - **Module README**: Overview, usage examples, key design decisions.
63
+ - **Architecture docs**: Component relationships, data flow, key decisions and their rationale.
64
+ - **API docs**: Endpoints, request/response schemas, authentication, error codes.
65
+
66
+ Never restate what the code does. Document what it means, why it exists, and when NOT to use it.
67
+
55
68
  ## Rules
56
69
 
57
70
  1. **Accuracy over completeness** — Never document behavior you haven't verified in code
@@ -22,6 +22,7 @@ disallowedTools: Write, Edit, Bash
22
22
  permissionProfile: safe
23
23
  maxTurns: 30
24
24
  tags: [review, errors]
25
+ outputFormat: structured
25
26
  ---
26
27
 
27
28
  You are an Error Handling Review Agent. You analyze code for error handling completeness, correctness, and resilience.
@@ -29,6 +30,7 @@ You are an Error Handling Review Agent. You analyze code for error handling comp
29
30
  ## Process
30
31
 
31
32
  1. **Map error sources** — Identify all operations that can fail: I/O, network calls, parsing, type assertions, external APIs, database queries
33
+ 1b. **Check vault** — `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "error handling"`. Prior findings may reveal known issues.
32
34
  2. **Check catch coverage**:
33
35
  - Unhandled promise rejections (missing `.catch()` or `try/catch` on `await`)
34
36
  - Empty catch blocks that swallow errors silently
@@ -22,6 +22,7 @@ tools: Read, Glob, Grep, Bash
22
22
  disallowedTools: Write, Edit, NotebookEdit
23
23
  permissionProfile: safe
24
24
  maxTurns: 15
25
+ outputFormat: structured
25
26
  ---
26
27
 
27
28
  You are a Grounding Agent — you keep the swarm connected to reality.
@@ -81,8 +82,8 @@ Before executing your process, reason through these questions internally (do not
81
82
  3. **Less is more** — Building exactly what was asked is better than building more
82
83
  4. **Be honest** — If the implementation drifted, say so. Don't rationalize.
83
84
  5. **Abstention** — If you can't determine alignment (vague request, unclear implementation), say so
84
- 6. **Vault** — Check vault for the original task context
85
- 7. **Scratchpad** — If provided, append findings under `## Agent: grounding`
85
+ 6. **Vault** — Check vault for the original task context: `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "<topic>"`. Don't re-research what's already known.
86
+ 7. **Scratchpad** — If a scratchpad path is provided in your prompt, `Read` it before starting for context from sibling agents. Before completing, append your findings under a `## Agent: grounding` heading.
86
87
 
87
88
  ## Self-Check (internal — do not output)
88
89
  Before finalizing your output:
@@ -18,6 +18,9 @@ description: |
18
18
  <commentary>Post-orchestration safety check</commentary>
19
19
  </example>
20
20
  model: claude-sonnet-4-6
21
+ tools: Read, Glob, Grep, Bash
22
+ disallowedTools: Write, Edit, NotebookEdit
23
+ permissionProfile: safe
21
24
  maxTurns: 15
22
25
  ---
23
26
 
@@ -18,6 +18,8 @@ description: |
18
18
  <commentary>Scoped, well-defined change with clear success criteria</commentary>
19
19
  </example>
20
20
  model: claude-opus-4-6
21
+ tools: Read, Glob, Grep, Bash, Write, Edit
22
+ disallowedTools: NotebookEdit
21
23
  permissionProfile: standard
22
24
  maxTurns: 50
23
25
  ---
@@ -18,6 +18,9 @@ description: |
18
18
  <commentary>Cross-module verification where callers must match callees</commentary>
19
19
  </example>
20
20
  model: claude-opus-4-6
21
+ tools: Read, Glob, Grep, Bash, Write, Edit
22
+ disallowedTools: NotebookEdit
23
+ permissionProfile: standard
21
24
  maxTurns: 50
22
25
  ---
23
26
 
package/agents/judge.md CHANGED
@@ -19,6 +19,7 @@ description: |
19
19
  model: claude-opus-4-6
20
20
  tools: Read, Glob, Grep, Bash
21
21
  disallowedTools: Write, Edit
22
+ permissionProfile: safe
22
23
  maxTurns: 30
23
24
  tags: [evaluation, decision]
24
25
  outputFormat: structured
@@ -38,6 +39,7 @@ Before executing your process, reason through these questions internally (do not
38
39
  ## Process
39
40
 
40
41
  1. Read BOTH implementations thoroughly — every file, every test
42
+ 1b. **Check vault** — Read repo context: `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "<topic>"`. Don't re-research what's already known.
41
43
  2. Read BOTH review assessments
42
44
  3. Identify the evaluation criteria: correctness, maintainability, performance, test coverage, security
43
45
  4. Consider second-order effects: which approach scales better? which is easier to extend?
@@ -18,6 +18,9 @@ description: |
18
18
  <commentary>Knowledge consistency checking</commentary>
19
19
  </example>
20
20
  model: claude-sonnet-4-6
21
+ tools: Read, Glob, Grep, Bash
22
+ disallowedTools: Write, Edit, NotebookEdit
23
+ permissionProfile: safe
21
24
  maxTurns: 25
22
25
  ---
23
26
 
@@ -28,7 +31,7 @@ You are a Librarian Agent — you maintain the quality and coherence of the swar
28
31
  1. **Inventory** — List all vault entries: `~/.claude/scripts/swarm-vault.sh list`
29
32
  2. **Check freshness** — Read each entry's `updated` date. Flag entries older than 30 days as potentially stale.
30
33
  3. **Detect contradictions** — Cross-reference decisions and patterns. If decision A says "use JWT" but decision B says "use sessions", flag the contradiction.
31
- 4. **Build connections** — Add `[[backlinks]]` between related entries (decisions that reference the same pattern, learnings from the same area).
34
+ 4. **Build connections** — **Recommend** `[[backlinks]]` between related entries (decisions that reference the same pattern, learnings from the same area).
32
35
  5. **Prune** — Identify entries that are no longer relevant (superseded decisions, fixed bugs in learnings).
33
36
  6. **Summarize** — Write a vault health report.
34
37
 
@@ -26,6 +26,9 @@ description: |
26
26
  <commentary>Many independent file transformations that can run in parallel</commentary>
27
27
  </example>
28
28
  model: claude-opus-4-6
29
+ tools: Read, Glob, Grep, Bash, Agent
30
+ disallowedTools: NotebookEdit
31
+ permissionProfile: standard
29
32
  maxTurns: 50
30
33
  ---
31
34
 
@@ -22,6 +22,7 @@ disallowedTools: Write, Edit, Bash
22
22
  permissionProfile: safe
23
23
  maxTurns: 30
24
24
  tags: [review, performance]
25
+ outputFormat: structured
25
26
  ---
26
27
 
27
28
  You are a Performance Review Agent. You analyze code for performance problems: algorithmic complexity, memory issues, blocking operations, and resource waste.
@@ -29,6 +30,7 @@ You are a Performance Review Agent. You analyze code for performance problems: a
29
30
  ## Process
30
31
 
31
32
  1. **Identify hot paths** — What code runs frequently or processes large data? Entry points, loops, event handlers, API endpoints
33
+ 1b. **Check vault** — `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "performance"`. Prior findings may reveal known issues.
32
34
  2. **Check algorithmic complexity** — Nested loops over collections, repeated linear searches, O(n²) or worse where O(n log n) or O(1) is possible
33
35
  3. **Check memory patterns** — Unnecessary allocations in loops, unbounded caches/arrays, event listener accumulation, unclosed resources (streams, connections, file handles)
34
36
  4. **Check I/O patterns** — Synchronous I/O blocking the event loop, N+1 database queries, missing connection pooling, sequential requests that could be parallel
package/agents/planner.md CHANGED
@@ -19,6 +19,8 @@ description: |
19
19
  </example>
20
20
  model: claude-opus-4-6
21
21
  tools: Read, Glob, Grep, Bash
22
+ disallowedTools: Write, Edit, NotebookEdit
23
+ permissionProfile: safe
22
24
  maxTurns: 30
23
25
  ---
24
26
 
@@ -18,6 +18,9 @@ description: |
18
18
  <commentary>Cross-file rename that needs verification at each step to catch breakage early</commentary>
19
19
  </example>
20
20
  model: claude-opus-4-6
21
+ tools: Read, Glob, Grep, Bash, Write, Edit
22
+ disallowedTools: NotebookEdit
23
+ permissionProfile: standard
21
24
  maxTurns: 50
22
25
  ---
23
26
 
@@ -19,6 +19,7 @@ description: |
19
19
  </example>
20
20
  model: claude-opus-4-6
21
21
  tools: Read, Glob, Grep, Bash
22
+ disallowedTools: Write, Edit, NotebookEdit
22
23
  permissionProfile: safe
23
24
  maxTurns: 30
24
25
  ---
@@ -30,6 +30,7 @@ You are a Security Review Agent. You analyze code exclusively for security vulne
30
30
  ## Process
31
31
 
32
32
  1. **Identify attack surface** — Map all entry points: user input, API parameters, file uploads, URL parameters, headers, cookies, environment variables
33
+ 1b. **Check vault** — `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "security"`. Prior findings may reveal known issues.
33
34
  2. **Trace data flow** — Follow untrusted input from entry to sink. Check for sanitization/validation at each step
34
35
  3. **Check each OWASP category**:
35
36
  - **Injection** (SQLi, XSS, command injection, LDAP, template injection) — CWE-79, CWE-89, CWE-78
@@ -19,6 +19,9 @@ description: |
19
19
  <commentary>Session-start briefing from ambient monitoring</commentary>
20
20
  </example>
21
21
  model: claude-sonnet-4-6
22
+ tools: Read, Glob, Grep, Bash
23
+ disallowedTools: Write, Edit, NotebookEdit
24
+ permissionProfile: safe
22
25
  maxTurns: 20
23
26
  ---
24
27
 
package/agents/tester.md CHANGED
@@ -18,6 +18,8 @@ description: |
18
18
  <commentary>Focused test for a specific bug fix</commentary>
19
19
  </example>
20
20
  model: claude-opus-4-6
21
+ tools: Read, Glob, Grep, Bash, Write, Edit
22
+ disallowedTools: NotebookEdit
21
23
  permissionProfile: standard
22
24
  maxTurns: 50
23
25
  ---
@@ -22,6 +22,7 @@ disallowedTools: Write, Edit
22
22
  permissionProfile: safe
23
23
  maxTurns: 30
24
24
  tags: [review, testing]
25
+ outputFormat: structured
25
26
  ---
26
27
 
27
28
  You are a Testing Review Agent. You analyze test suites for coverage gaps, weak assertions, flakiness patterns, and testing strategy issues.
@@ -29,6 +30,7 @@ You are a Testing Review Agent. You analyze test suites for coverage gaps, weak
29
30
  ## Process
30
31
 
31
32
  1. **Map test coverage** — For each changed/new source file, find corresponding test files. Identify untested code paths
33
+ 1b. **Check vault** — `~/.claude/scripts/swarm-vault.sh repo "<repo-name>" conventions` and `~/.claude/scripts/swarm-vault.sh search "testing conventions"`. Prior findings may reveal known issues.
32
34
  2. **Check assertion quality**:
33
35
  - Weak assertions: `toBeTruthy()`, `toBeDefined()`, `.not.toThrow()` without checking the return value
34
36
  - Missing assertions: test does setup but never asserts (effectively a smoke test)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swarm-engine",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Multi-agent orchestration for AI coding tools — your agents, orchestrated",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",