swarm-orchestrator 7.0.0-alpha.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.
Files changed (174) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +199 -0
  3. package/agents/reviewer.agent.md +50 -0
  4. package/agents/worker.agent.md +41 -0
  5. package/config/default-agents.yaml +56 -0
  6. package/config/pm-agent.yaml +36 -0
  7. package/config/quality-gates.yaml +88 -0
  8. package/config/repair-agent.yaml +34 -0
  9. package/config/semgrep-rules/complexity-mismatch.yaml +6 -0
  10. package/config/semgrep-rules/exception-swallowing.yaml +13 -0
  11. package/config/semgrep-rules/hardcoded-answer.yaml +6 -0
  12. package/config/semgrep-rules/mock-mutation.yaml +6 -0
  13. package/config/semgrep-rules/test-modification.yaml +6 -0
  14. package/config/user-agents.yaml +23 -0
  15. package/dist/src/adapters/adapter-factory.js +29 -0
  16. package/dist/src/adapters/agent-adapter.js +32 -0
  17. package/dist/src/adapters/claude-code-adapter.js +126 -0
  18. package/dist/src/adapters/claude-code-teams.js +119 -0
  19. package/dist/src/adapters/codex-adapter.js +118 -0
  20. package/dist/src/adapters/copilot-adapter.js +224 -0
  21. package/dist/src/adapters/fatal-error-classifier.js +88 -0
  22. package/dist/src/adapters/index.js +44 -0
  23. package/dist/src/adapters/persistent-session.js +204 -0
  24. package/dist/src/adapters/process-supervisor.js +199 -0
  25. package/dist/src/agents-exporter.js +398 -0
  26. package/dist/src/analytics-log.js +161 -0
  27. package/dist/src/baseline-scanner.js +65 -0
  28. package/dist/src/bootstrap-evidence.js +88 -0
  29. package/dist/src/bootstrap-orchestrator.js +205 -0
  30. package/dist/src/bootstrap-types.js +5 -0
  31. package/dist/src/branch-merger.js +427 -0
  32. package/dist/src/cli/attest-handlers.js +44 -0
  33. package/dist/src/cli/cost-prompt.js +51 -0
  34. package/dist/src/cli/demo-handlers.js +274 -0
  35. package/dist/src/cli/flags.js +152 -0
  36. package/dist/src/cli/index.js +57 -0
  37. package/dist/src/cli/live-status.js +186 -0
  38. package/dist/src/cli/misc-handlers.js +242 -0
  39. package/dist/src/cli/plan-handlers.js +350 -0
  40. package/dist/src/cli/share-handlers.js +163 -0
  41. package/dist/src/cli/status-handlers.js +457 -0
  42. package/dist/src/cli/swarm-handlers.js +638 -0
  43. package/dist/src/cli/usage.js +72 -0
  44. package/dist/src/cli.js +217 -0
  45. package/dist/src/commit-pattern-detector.js +143 -0
  46. package/dist/src/commit-quality-analyzer.js +38 -0
  47. package/dist/src/config-loader.js +339 -0
  48. package/dist/src/context-broker.js +358 -0
  49. package/dist/src/copilot-cli-wrapper.js +258 -0
  50. package/dist/src/cost-estimator.js +241 -0
  51. package/dist/src/defaults.js +18 -0
  52. package/dist/src/demo-mode.js +180 -0
  53. package/dist/src/deployment-handler.js +78 -0
  54. package/dist/src/deployment-manager.js +228 -0
  55. package/dist/src/execution-queue.js +196 -0
  56. package/dist/src/external-tool-manager.js +184 -0
  57. package/dist/src/gate-prompt-builder.js +117 -0
  58. package/dist/src/gate-remediation.js +173 -0
  59. package/dist/src/github-issues-ingester.js +152 -0
  60. package/dist/src/github-mcp-integrator.js +164 -0
  61. package/dist/src/hook-generator.js +229 -0
  62. package/dist/src/index.js +48 -0
  63. package/dist/src/knowledge-base.js +300 -0
  64. package/dist/src/logger.js +111 -0
  65. package/dist/src/meta-analyzer.js +208 -0
  66. package/dist/src/metrics-collector.js +209 -0
  67. package/dist/src/metrics-types.js +5 -0
  68. package/dist/src/multi-repo-coordinator.js +179 -0
  69. package/dist/src/orchestrator/async-meta-analysis.js +84 -0
  70. package/dist/src/orchestrator/fatal-run-error.js +43 -0
  71. package/dist/src/orchestrator/final-gates-remediation.js +258 -0
  72. package/dist/src/orchestrator/git-state-utils.js +119 -0
  73. package/dist/src/orchestrator/pause-controller.js +55 -0
  74. package/dist/src/orchestrator/replan-runner.js +258 -0
  75. package/dist/src/orchestrator/step-executor.js +391 -0
  76. package/dist/src/orchestrator/wave-scheduler-loop.js +204 -0
  77. package/dist/src/owasp-mapper.js +153 -0
  78. package/dist/src/owasp-report-renderer.js +39 -0
  79. package/dist/src/plan-files.js +142 -0
  80. package/dist/src/plan-generator.js +1207 -0
  81. package/dist/src/pm-agent.js +296 -0
  82. package/dist/src/post-run-reporter.js +203 -0
  83. package/dist/src/pr-automation.js +103 -0
  84. package/dist/src/pr-manager.js +318 -0
  85. package/dist/src/presenter/index.js +209 -0
  86. package/dist/src/prompt-builder.js +173 -0
  87. package/dist/src/quality-gates/config-loader.js +196 -0
  88. package/dist/src/quality-gates/default-config.js +243 -0
  89. package/dist/src/quality-gates/file-utils.js +152 -0
  90. package/dist/src/quality-gates/gate-runner.js +171 -0
  91. package/dist/src/quality-gates/gates/accessibility.js +355 -0
  92. package/dist/src/quality-gates/gates/duplicate-blocks.js +144 -0
  93. package/dist/src/quality-gates/gates/hardcoded-config.js +52 -0
  94. package/dist/src/quality-gates/gates/readme-claims.js +62 -0
  95. package/dist/src/quality-gates/gates/runtime-checks.js +265 -0
  96. package/dist/src/quality-gates/gates/scaffold-defaults.js +108 -0
  97. package/dist/src/quality-gates/gates/test-coverage.js +240 -0
  98. package/dist/src/quality-gates/gates/test-file-protection.js +85 -0
  99. package/dist/src/quality-gates/gates/test-isolation.js +74 -0
  100. package/dist/src/quality-gates/index.js +17 -0
  101. package/dist/src/quality-gates/registry.js +205 -0
  102. package/dist/src/quality-gates/types.js +2 -0
  103. package/dist/src/quick-fix-mode.js +302 -0
  104. package/dist/src/recipe-loader.js +122 -0
  105. package/dist/src/repair-agent.js +396 -0
  106. package/dist/src/repo-analyzer.js +342 -0
  107. package/dist/src/report-generator.js +146 -0
  108. package/dist/src/report-renderer.js +90 -0
  109. package/dist/src/requirement-filter.js +52 -0
  110. package/dist/src/sarif-formatter.js +140 -0
  111. package/dist/src/scheduling/dependency-analyzer.js +178 -0
  112. package/dist/src/scheduling/work-stealing-queue.js +123 -0
  113. package/dist/src/secret-redactor.js +90 -0
  114. package/dist/src/session-executor.js +587 -0
  115. package/dist/src/session-manager.js +221 -0
  116. package/dist/src/share/transcript-verification.js +128 -0
  117. package/dist/src/share-parser.js +477 -0
  118. package/dist/src/spinner.js +146 -0
  119. package/dist/src/step-runner.js +365 -0
  120. package/dist/src/swarm-orchestrator.js +686 -0
  121. package/dist/src/task-classifier.js +134 -0
  122. package/dist/src/test-command-discovery.js +123 -0
  123. package/dist/src/text-similarity.js +24 -0
  124. package/dist/src/tier-maps.js +158 -0
  125. package/dist/src/types.js +5 -0
  126. package/dist/src/url-shortener.js +135 -0
  127. package/dist/src/verification/attestation.js +166 -0
  128. package/dist/src/verification/cheat-detector.js +240 -0
  129. package/dist/src/verification/command-runner.js +70 -0
  130. package/dist/src/verification/composite-score.js +157 -0
  131. package/dist/src/verification/cosign-attestation.js +137 -0
  132. package/dist/src/verification/diff-analysis.js +89 -0
  133. package/dist/src/verification/differential-gate.js +173 -0
  134. package/dist/src/verification/index.js +41 -0
  135. package/dist/src/verification/mutation-gate.js +242 -0
  136. package/dist/src/verification/property-gate.js +201 -0
  137. package/dist/src/verification/test-synthesizer.js +243 -0
  138. package/dist/src/verifier/outcome-checks.js +396 -0
  139. package/dist/src/verifier/transcript-checks.js +207 -0
  140. package/dist/src/verifier/verification-reporters.js +148 -0
  141. package/dist/src/verifier-engine.js +491 -0
  142. package/dist/src/wave-resizer.js +131 -0
  143. package/dist/src/wave-scheduler.js +44 -0
  144. package/dist/src/worktree-manager.js +368 -0
  145. package/dist/src/worktree-reserved-paths.js +97 -0
  146. package/package.json +80 -0
  147. package/plugin/agents/.gitkeep +0 -0
  148. package/plugin/agents/backend_master.agent.md +72 -0
  149. package/plugin/agents/devops_pro.agent.md +45 -0
  150. package/plugin/agents/frontend_expert.agent.md +59 -0
  151. package/plugin/agents/integrator_finalizer.agent.md +44 -0
  152. package/plugin/agents/meta_reviewer.agent.md +44 -0
  153. package/plugin/agents/security_auditor.agent.md +43 -0
  154. package/plugin/agents/tester_elite.agent.md +43 -0
  155. package/plugin/hooks/hooks.json +19 -0
  156. package/plugin/hooks/post-tool-use.json +9 -0
  157. package/plugin/hooks/pre-tool-use.json +9 -0
  158. package/plugin/plugin.json +47 -0
  159. package/plugin/skills/swarm-gates/SKILL.md +53 -0
  160. package/plugin/skills/swarm-orchestrate/SKILL.md +34 -0
  161. package/plugin/skills/swarm-verify/SKILL.md +44 -0
  162. package/templates/README.md +35 -0
  163. package/templates/cli-tool.json +31 -0
  164. package/templates/fullstack.json +52 -0
  165. package/templates/library.json +38 -0
  166. package/templates/react-app.json +45 -0
  167. package/templates/recipes/add-api-docs.json +35 -0
  168. package/templates/recipes/add-auth.json +47 -0
  169. package/templates/recipes/add-ci.json +39 -0
  170. package/templates/recipes/add-tests.json +39 -0
  171. package/templates/recipes/migrate-to-ts.json +42 -0
  172. package/templates/recipes/refactor-modularize.json +44 -0
  173. package/templates/recipes/security-audit.json +35 -0
  174. package/templates/rest-api.json +38 -0
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "swarm-orchestrator",
3
+ "version": "7.0.0-alpha.0",
4
+ "description": "Falsification battery and signed attestation for AI-authored code. Worker and reviewer steps run on isolated branches, each step verified before merge, with audit-ready run artifacts.",
5
+ "main": "dist/src/index.js",
6
+ "bin": {
7
+ "swarm": "dist/src/cli.js",
8
+ "swarm-orchestrator": "dist/src/cli.js"
9
+ },
10
+ "files": [
11
+ "dist/src/",
12
+ "agents/",
13
+ "config/",
14
+ "plugin/",
15
+ "templates/",
16
+ "README.md",
17
+ "LICENSE"
18
+ ],
19
+ "engines": {
20
+ "node": ">=20.0.0"
21
+ },
22
+ "scripts": {
23
+ "build": "tsc -p tsconfig.build.json && node -e \"require('fs').chmodSync('dist/src/cli.js', 0o755)\"",
24
+ "build-plugin": "node scripts/build-plugin.js",
25
+ "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
26
+ "prebuild": "npm run clean",
27
+ "prepublishOnly": "npm run build && npm test",
28
+ "test": "npm run build && mocha --recursive 'dist/test/**/*.test.js'",
29
+ "test:ci": "mocha --recursive 'dist/test/**/*.test.js'",
30
+ "lint": "eslint 'src/**/*.{ts,tsx}' 'test/**/*.ts'",
31
+ "lint:fix": "eslint --fix 'src/**/*.{ts,tsx}' 'test/**/*.ts'",
32
+ "typecheck": "tsc --noEmit -p tsconfig.build.json",
33
+ "format": "prettier --write 'src/**/*.{ts,tsx}' 'test/**/*.ts'",
34
+ "format:check": "prettier --check 'src/**/*.{ts,tsx}' 'test/**/*.ts'",
35
+ "start": "node dist/src/cli.js"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/moonrunnerkc/swarm-orchestrator.git"
40
+ },
41
+ "keywords": [
42
+ "cli",
43
+ "falsification",
44
+ "attestation",
45
+ "verification",
46
+ "quality-gates",
47
+ "orchestrator",
48
+ "agent-orchestrator",
49
+ "swarm",
50
+ "ai",
51
+ "swe-bench",
52
+ "copilot",
53
+ "copilot-cli",
54
+ "claude-code",
55
+ "codex"
56
+ ],
57
+ "author": "Bradley R. Kinnard",
58
+ "license": "ISC",
59
+ "type": "commonjs",
60
+ "bugs": {
61
+ "url": "https://github.com/moonrunnerkc/swarm-orchestrator/issues"
62
+ },
63
+ "homepage": "https://github.com/moonrunnerkc/swarm-orchestrator#readme",
64
+ "devDependencies": {
65
+ "@eslint/js": "^10.0.1",
66
+ "@types/js-yaml": "^4.0.9",
67
+ "@types/mocha": "^10.0.10",
68
+ "@types/node": "^25.0.10",
69
+ "eslint": "^10.2.1",
70
+ "madge": "^8.0.0",
71
+ "mocha": "^11.7.5",
72
+ "prettier": "^3.8.3",
73
+ "tsx": "^4.21.0",
74
+ "typescript": "^5.9.3",
75
+ "typescript-eslint": "^8.59.0"
76
+ },
77
+ "dependencies": {
78
+ "js-yaml": "^4.1.1"
79
+ }
80
+ }
File without changes
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: backend_master
3
+ description: Backend specialist for server-side logic, APIs, and data processing
4
+ tools:
5
+ - read
6
+ - edit
7
+ - run
8
+ - search
9
+ model: claude-sonnet-4
10
+ ---
11
+
12
+ # backend_master
13
+
14
+ ## Purpose
15
+
16
+ Backend specialist for server-side logic, APIs, and data processing.
17
+
18
+ ## Scope
19
+
20
+ - Backend code (Node.js, Python, Go, Java, etc.)
21
+ - API endpoints and business logic
22
+ - Database queries and ORM usage
23
+ - Authentication and authorization logic
24
+ - Git commits for backend changes (incremental, descriptive messages)
25
+
26
+ ## Boundaries
27
+
28
+ - Do not modify frontend components or UI code
29
+ - Do not change infrastructure/deployment configs unless backend-specific
30
+ - Do not alter test frameworks without justification
31
+
32
+ ## Done Definition
33
+
34
+ - All API endpoints work as specified
35
+ - Database operations execute correctly
36
+ - Backend tests pass
37
+ - No runtime errors in logs
38
+ - Changes committed in logical chunks with natural commit messages
39
+
40
+ ## Failure Prevention (Learned)
41
+
42
+ The following patterns have caused failures in past runs. Avoid them:
43
+
44
+ - BackendMaster fails when TypeScript strict mode is not enabled in tsconfig.json before writing new .ts files
45
+
46
+ ## Proven Patterns
47
+
48
+ These approaches have consistently succeeded:
49
+
50
+ - BackendMaster produces cleaner code when given explicit export interface expectations in the task description
51
+ - BackendMaster achieves faster completion when the task prompt includes the target file paths explicitly
52
+ - BackendMaster produces more reliable APIs when error handling middleware is specified up front in the task
53
+
54
+ ## Observed File Scope
55
+
56
+ Files this agent typically modifies (based on execution history):
57
+
58
+ - `src/api/server.ts`
59
+ - `src/routes/users.ts`
60
+ - `src/middleware/auth.ts`
61
+
62
+ ## Anti-Patterns (Do Not Repeat)
63
+
64
+ - BackendMaster sometimes creates test files without importing the module under test, leading to vacuous passing tests
65
+
66
+ ## Performance Notes
67
+
68
+ - BackendMaster averages 1.2 premium requests per step with claude-sonnet-4
69
+
70
+ ## Refusal Rules
71
+
72
+ - Follow agent guidelines
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: devops_pro
3
+ description: DevOps specialist for CI/CD, deployment, and infrastructure with preview deployment support
4
+ tools:
5
+ - read
6
+ - edit
7
+ - run
8
+ - search
9
+ model: claude-sonnet-4
10
+ ---
11
+
12
+ # devops_pro
13
+
14
+ ## Purpose
15
+
16
+ DevOps specialist for CI/CD, deployment, and infrastructure with preview deployment support.
17
+
18
+ ## Scope
19
+
20
+ - CI/CD pipeline configuration (GitHub Actions, GitLab CI, etc.)
21
+ - Deployment scripts and automation
22
+ - Docker, Kubernetes, container orchestration
23
+ - Cloud platform deployment (Vercel, Netlify, AWS, GCP, Azure)
24
+ - Infrastructure as code
25
+ - **Preview deployments with accessible URLs**
26
+ - Git commits for infrastructure changes (incremental, descriptive messages)
27
+
28
+ ## Boundaries
29
+
30
+ - Do not modify application code unless it's deployment-related
31
+ - Do not alter database schemas
32
+ - Do not change core business logic
33
+
34
+ ## Done Definition
35
+
36
+ - Deployment configuration works as specified
37
+ - Preview deployments generate accessible URLs
38
+ - CI/CD pipelines execute successfully
39
+ - Infrastructure changes are tested
40
+ - Changes committed in logical chunks with natural commit messages
41
+ - **Preview URL added to step summary when applicable**
42
+
43
+ ## Refusal Rules
44
+
45
+ - Follow agent guidelines
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: frontend_expert
3
+ description: Frontend specialist for UI components, styling, and client-side logic
4
+ tools:
5
+ - read
6
+ - edit
7
+ - run
8
+ - search
9
+ model: claude-sonnet-4
10
+ ---
11
+
12
+ # frontend_expert
13
+
14
+ ## Purpose
15
+
16
+ Frontend specialist for UI components, styling, and client-side logic.
17
+
18
+ ## Scope
19
+
20
+ - Frontend code (React, Vue, Angular, HTML, CSS, JavaScript, TypeScript)
21
+ - Component architecture and state management
22
+ - UI/UX implementation from designs or requirements
23
+ - Frontend build configuration and tooling
24
+ - **Git commits for frontend changes (incremental, natural messages)**
25
+
26
+ ## Boundaries
27
+
28
+ - Do not modify backend API endpoints or server logic
29
+ - Do not change database schemas or migrations
30
+ - Do not alter CI/CD pipelines unless frontend-specific
31
+ - Do not touch infrastructure or deployment configs
32
+
33
+ ## Done Definition
34
+
35
+ - All UI components render correctly
36
+ - Styles match requirements or designs
37
+ - Frontend tests pass (if they exist)
38
+ - No console errors in development mode
39
+ - **Changes committed incrementally with natural, varied commit messages**
40
+
41
+ ## Failure Prevention (Learned)
42
+
43
+ The following patterns have caused failures in past runs. Avoid them:
44
+
45
+ - FrontendExpert fails when asked to create both component and test in a single step without explicit test framework setup
46
+
47
+ ## Observed File Scope
48
+
49
+ Files this agent typically modifies (based on execution history):
50
+
51
+ - `src/components/App.tsx`
52
+ - `src/components/Header.tsx`
53
+ - `src/styles/main.css`
54
+
55
+ ## Refusal Rules
56
+
57
+ - Do not invent framework APIs or methods that don't exist
58
+ - Do not claim tests passed without actually running them
59
+ - If uncertain about a framework feature, say so and suggest verification
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: integrator_finalizer
3
+ description: Integration specialist for component assembly and release preparation
4
+ tools:
5
+ - read
6
+ - edit
7
+ - run
8
+ - search
9
+ model: claude-sonnet-4
10
+ ---
11
+
12
+ # integrator_finalizer
13
+
14
+ ## Purpose
15
+
16
+ Integration specialist for component assembly and release preparation.
17
+
18
+ ## Scope
19
+
20
+ - Component integration
21
+ - End-to-end testing
22
+ - Documentation finalization
23
+ - Release preparation
24
+ - Final validation
25
+ - Review and preserve natural git history (avoid unnecessary squashing)
26
+
27
+ ## Boundaries
28
+
29
+ - Do not introduce new features at this stage
30
+ - Only fix integration bugs and conflicts
31
+ - Focus on making existing work cohesive
32
+ - Preserve human-like commit history from previous steps
33
+
34
+ ## Done Definition
35
+
36
+ - All components work together
37
+ - End-to-end tests pass
38
+ - Documentation is complete and accurate
39
+ - Ready for release or handoff
40
+ - Git history is clean, natural, and shows incremental development
41
+
42
+ ## Refusal Rules
43
+
44
+ - Follow agent guidelines
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: meta_reviewer
3
+ description: Meta-analysis specialist for execution quality review and replanning
4
+ tools:
5
+ - read
6
+ - search
7
+ model: claude-sonnet-4
8
+ ---
9
+
10
+ # meta_reviewer
11
+
12
+ ## Purpose
13
+
14
+ Meta-analysis specialist for execution quality review and replanning.
15
+
16
+ ## Scope
17
+
18
+ - Review transcripts from completed steps
19
+ - Identify verification failures and their root causes
20
+ - Detect patterns in agent behavior (good and bad)
21
+ - Recommend plan adjustments or re-execution
22
+ - Update knowledge base with learned patterns
23
+ - **Do NOT modify code directly** - only analyze and recommend
24
+
25
+ ## Boundaries
26
+
27
+ - Do not write code or make commits
28
+ - Do not execute tests or build commands
29
+ - Do not modify agent configurations
30
+ - Do not alter the execution plan yourself (only recommend changes)
31
+
32
+ ## Done Definition
33
+
34
+ - All step transcripts reviewed
35
+ - Verification failures analyzed with root causes identified
36
+ - Recommendations documented in structured format
37
+ - Patterns extracted and categorized
38
+ - Knowledge base updated if new patterns found
39
+
40
+ ## Refusal Rules
41
+
42
+ - Do not analyze if transcripts are missing (say "cannot analyze without transcripts")
43
+ - Do not recommend code changes (that's for implementation agents)
44
+ - Do not make assumptions about agent intent
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: security_auditor
3
+ description: Security specialist for code analysis and vulnerability detection
4
+ tools:
5
+ - read
6
+ - edit
7
+ - run
8
+ - search
9
+ model: claude-sonnet-4
10
+ ---
11
+
12
+ # security_auditor
13
+
14
+ ## Purpose
15
+
16
+ Security specialist for code analysis and vulnerability detection.
17
+
18
+ ## Scope
19
+
20
+ - Code security analysis
21
+ - Dependency vulnerability scanning
22
+ - Authentication/authorization review
23
+ - Input validation and sanitization
24
+ - Secrets management review
25
+ - Git commits for security fixes (clear, security-focused messages)
26
+
27
+ ## Boundaries
28
+
29
+ - Do not implement new features (only security fixes)
30
+ - Do not refactor code beyond security improvements
31
+ - Focus on high and medium severity issues only
32
+
33
+ ## Done Definition
34
+
35
+ - Security scan completed
36
+ - Critical and high-severity issues addressed
37
+ - Security recommendations documented
38
+ - No new vulnerabilities introduced
39
+ - Security fixes committed with clear messages explaining the fix
40
+
41
+ ## Refusal Rules
42
+
43
+ - Follow agent guidelines
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: tester_elite
3
+ description: Testing specialist for test creation, execution, and quality assurance
4
+ tools:
5
+ - read
6
+ - edit
7
+ - run
8
+ - search
9
+ model: claude-sonnet-4
10
+ ---
11
+
12
+ # tester_elite
13
+
14
+ ## Purpose
15
+
16
+ Testing specialist for test creation, execution, and quality assurance.
17
+
18
+ ## Scope
19
+
20
+ - Unit tests
21
+ - Integration tests
22
+ - Test coverage analysis
23
+ - Test framework configuration
24
+ - Quality assurance validation
25
+ - Git commits for test changes (descriptive, test-focused messages)
26
+
27
+ ## Boundaries
28
+
29
+ - Do not modify application logic to make tests pass
30
+ - Do not skip or disable existing tests without justification
31
+ - Do not change requirements to match implementation
32
+
33
+ ## Done Definition
34
+
35
+ - All tests pass
36
+ - Code coverage meets project standards
37
+ - Edge cases covered
38
+ - Test report generated and saved
39
+ - Test changes committed incrementally with clear messages
40
+
41
+ ## Refusal Rules
42
+
43
+ - Follow agent guidelines
@@ -0,0 +1,19 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "preToolUse": [
5
+ {
6
+ "type": "command",
7
+ "bash": "node -e \"let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{try{const ctx=JSON.parse(d);const scope=JSON.parse(process.env.SWARM_STEP_SCOPE||'[]');if(scope.length===0){process.stdout.write(JSON.stringify({decision:'approve'}));return;}const p=(ctx.toolArgs||{}).path||(ctx.toolArgs||{}).filePath||'';const allowed=scope.some(s=>p.includes(s));if(!allowed&&p){process.stdout.write(JSON.stringify({decision:'deny',reason:'File '+p+' is outside agent scope: '+scope.join(', ')}));}else{process.stdout.write(JSON.stringify({decision:'approve'}));}}catch(e){process.stdout.write(JSON.stringify({decision:'approve'}))}})\"",
8
+ "timeoutSec": 10
9
+ }
10
+ ],
11
+ "postToolUse": [
12
+ {
13
+ "type": "command",
14
+ "bash": "node -e \"let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{try{const ctx=JSON.parse(d);const logPath=process.env.SWARM_EVIDENCE_LOG||'';if(!logPath)return;const entry={timestamp:new Date().toISOString(),event:'postToolUse',tool:ctx.toolName||'unknown',filePath:(ctx.toolArgs||{}).path||(ctx.toolArgs||{}).filePath};require('fs').appendFileSync(logPath,JSON.stringify(entry)+'\\n')}catch(e){}})\"",
15
+ "timeoutSec": 10
16
+ }
17
+ ]
18
+ }
19
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "swarm-evidence-capture",
3
+ "description": "Capture structured evidence after tool operations for verification",
4
+ "event": "postToolUse",
5
+ "tools": ["git", "editFile", "createFile", "runCommand"],
6
+ "command": "node -e \"const ctx = JSON.parse(process.env.COPILOT_HOOK_CONTEXT || '{}'); const logPath = process.env.SWARM_EVIDENCE_LOG || ''; if (!logPath) { process.exit(0); } const entry = { timestamp: new Date().toISOString(), tool: ctx.tool || 'unknown', arguments: ctx.arguments || {}, result: ctx.result ? 'completed' : 'unknown' }; require('fs').appendFileSync(logPath, JSON.stringify(entry) + '\\n');\"",
7
+ "enabled": false,
8
+ "_comment": "Stub for Upgrade 3 (Hooks Injection). Enable when hook generator is implemented."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "swarm-scope-enforcement",
3
+ "description": "Block file operations outside the current step's declared scope",
4
+ "event": "preToolUse",
5
+ "tools": ["editFile", "createFile", "deleteFile", "insertText", "replaceText"],
6
+ "command": "node -e \"const ctx = JSON.parse(process.env.COPILOT_HOOK_CONTEXT || '{}'); const scope = JSON.parse(process.env.SWARM_STEP_SCOPE || '[]'); if (scope.length === 0) { process.exit(0); } const filePath = (ctx.arguments || {}).path || (ctx.arguments || {}).filePath || ''; const allowed = scope.some(s => filePath.includes(s)); if (!allowed) { console.error(JSON.stringify({ decision: 'deny', reason: 'File ' + filePath + ' is outside this agent step scope: ' + scope.join(', ') })); process.exit(1); }\"",
7
+ "enabled": false,
8
+ "_comment": "Stub for Upgrade 3 (Hooks Injection). Enable when hook generator is implemented."
9
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "swarm-orchestrator",
3
+ "displayName": "Swarm Orchestrator",
4
+ "version": "3.2.0",
5
+ "description": "Falsification battery and signed attestation for AI-authored code. Worker and reviewer steps run on isolated branches, each step verified before merge, with audit-ready run artifacts and quality gates.",
6
+ "author": "Bradley R. Kinnard",
7
+ "publisher": "moonrunnerkc",
8
+ "repository": "https://github.com/moonrunnerkc/swarm-orchestrator",
9
+ "license": "ISC",
10
+ "engines": {
11
+ "copilot-cli": ">=1.0.0"
12
+ },
13
+ "agents": [
14
+ "agents/backend_master.agent.md",
15
+ "agents/frontend_expert.agent.md",
16
+ "agents/tester_elite.agent.md",
17
+ "agents/security_auditor.agent.md",
18
+ "agents/devops_pro.agent.md",
19
+ "agents/integrator_finalizer.agent.md"
20
+ ],
21
+ "skills": [
22
+ "skills/swarm-orchestrate",
23
+ "skills/swarm-verify",
24
+ "skills/swarm-gates"
25
+ ],
26
+ "hooks": "hooks/hooks.json",
27
+ "categories": [
28
+ "AI",
29
+ "Testing",
30
+ "Code Quality",
31
+ "Workflow Automation"
32
+ ],
33
+ "keywords": [
34
+ "copilot",
35
+ "orchestrator",
36
+ "swarm",
37
+ "verification",
38
+ "quality-gates",
39
+ "parallel-execution",
40
+ "agents"
41
+ ],
42
+ "mcpServer": {
43
+ "command": "node",
44
+ "args": ["dist/src/cli.js", "mcp-server"],
45
+ "type": "stdio"
46
+ }
47
+ }
@@ -0,0 +1,53 @@
1
+ # Swarm Gates
2
+
3
+ Static analysis quality gates for generated code.
4
+
5
+ ## Trigger
6
+
7
+ This skill activates when you need to:
8
+ - Run post-merge quality checks on generated code
9
+ - Validate that code meets project quality standards before accepting it
10
+ - Identify common AI-generated code issues (scaffold defaults, duplicate blocks, hardcoded config)
11
+
12
+ ## Instructions
13
+
14
+ 1. Scan the target directory for project files (respecting exclusion patterns)
15
+ 2. Run each enabled gate against the file set
16
+ 3. Collect issues from each gate with file paths, line numbers, and remediation hints
17
+ 4. Produce a summary: pass (no gate failures) or fail (at least one gate failed)
18
+ 5. When auto-remediation is enabled, failed gates can trigger follow-up agent sessions to fix the issues
19
+
20
+ ## Available Gates
21
+
22
+ ### Scaffold Defaults
23
+ Detects leftover placeholder values from project scaffolding (e.g., "TODO", default package names, template strings). These indicate incomplete customization.
24
+
25
+ ### Duplicate Blocks
26
+ Identifies near-identical code blocks across files. Catches copy-paste patterns where agents duplicated logic instead of extracting shared utilities.
27
+
28
+ ### Hardcoded Config
29
+ Flags hardcoded configuration values (URLs, ports, credentials, API keys) that should be externalized to environment variables or config files.
30
+
31
+ ### README Claims
32
+ Cross-references README documentation against actual project structure and files. Catches claims about features or files that don't exist.
33
+
34
+ ### Test Isolation
35
+ Verifies that tests are properly isolated: no shared mutable state between test cases, proper setup/teardown, no order-dependent tests.
36
+
37
+ ### Runtime Checks
38
+ Validates runtime behavior patterns: proper error handling, async/await usage, resource cleanup.
39
+
40
+ ### Accessibility
41
+ Checks frontend code for basic accessibility compliance (ARIA attributes, semantic HTML, color contrast references).
42
+
43
+ ### Test Coverage
44
+ Analyzes test coverage relative to source files. Flags modules with no corresponding test file.
45
+
46
+ ## Configuration
47
+
48
+ Gates are configured via `config/quality-gates.yaml`. Each gate can be individually enabled/disabled with severity thresholds.
49
+
50
+ ## Resources
51
+
52
+ - Gate configuration: `config/quality-gates.yaml`
53
+ - Verification: `skills/swarm-verify/SKILL.md`
@@ -0,0 +1,34 @@
1
+ # Swarm Orchestrate
2
+
3
+ Worker and reviewer step execution with analyzer-gated greedy scheduling. Steps run on isolated branches; ready steps run together only when the static dependency analyzer clears them.
4
+
5
+ ## Trigger
6
+
7
+ This skill activates when you need to:
8
+ - Execute a multi-step development plan with verified per-step branches
9
+ - Run worker and reviewer roles against discrete tasks in a goal
10
+ - Build a feature from a high-level goal with audit-ready run artifacts
11
+
12
+ ## Instructions
13
+
14
+ 1. Parse the goal into discrete, dependency-ordered steps.
15
+ 2. Assign each step a role (worker for implementation, reviewer for synthesized tests and diff review). Reviewer mode (security, accessibility, general) is a policy, not a separate role.
16
+ 3. Push steps onto the work-stealing queue. The queue dispatches greedy as-ready: a step starts as soon as its dependencies complete and the static dependency analyzer says it cannot conflict with anything currently running.
17
+ 4. Each step runs in its own git worktree on a per-step branch, capturing a `/share` transcript.
18
+ 5. Verify the step against transcript evidence and the falsification battery, then merge the branch.
19
+ 6. Track metrics (timing, commits, verification status) throughout the run.
20
+
21
+ ## Roles
22
+
23
+ - **Worker**: writes implementation code, runs tests, commits changes, and does not edit pre-existing test files unless the goal explicitly authorizes it.
24
+ - **Reviewer**: read-only. Synthesizes tests before worker execution and reviews diffs after worker execution. Security, accessibility, and general review modes are reviewer policies, not separate agent roles.
25
+
26
+ ## Scheduling
27
+
28
+ Steps with satisfied dependencies are eligible to run. The work-stealing queue dispatches up to its concurrency cap; the static dependency analyzer must prove two eligible steps cannot conflict before they run together. Otherwise execution is serial. Failed steps trigger repair sessions with classified failure context before retry.
29
+
30
+ ## Resources
31
+
32
+ - Agent profiles: `agents/*.agent.md`
33
+ - Verification: `skills/swarm-verify/SKILL.md`
34
+ - Quality gates: `skills/swarm-gates/SKILL.md`
@@ -0,0 +1,44 @@
1
+ # Swarm Verify
2
+
3
+ Evidence-based verification of agent outputs against transcript claims.
4
+
5
+ ## Trigger
6
+
7
+ This skill activates when you need to:
8
+ - Verify that an agent's claimed outputs match actual evidence
9
+ - Cross-reference transcript claims against git commits, test results, and build outputs
10
+ - Determine whether a step passed or failed based on concrete evidence
11
+
12
+ ## Instructions
13
+
14
+ 1. Read the agent's transcript (the `/share` output from the Copilot CLI session)
15
+ 2. Parse the transcript into structured evidence:
16
+ - **Commits**: Extract git commit SHAs and diff summaries
17
+ - **Tests**: Identify test execution output (pass/fail counts, framework output)
18
+ - **Build**: Locate build or compile output (success/error messages)
19
+ - **Claims**: Extract natural-language claims the agent made about its work
20
+ 3. Cross-reference each claim against evidence:
21
+ - "Tests pass" requires actual test runner output showing passes
22
+ - "Code compiles" requires build output with no errors
23
+ - "Changes committed" requires at least one commit SHA in the transcript
24
+ 4. Mark unverified claims (claims with no supporting evidence)
25
+ 5. Produce a verification result: pass (all required checks have evidence) or fail
26
+
27
+ ## Verification Checks
28
+
29
+ | Check Type | Required Evidence |
30
+ |-----------|-------------------|
31
+ | commit | At least one git commit SHA in transcript |
32
+ | test | Test runner output with pass/fail counts |
33
+ | build | Compiler or bundler output with exit status |
34
+ | claim | Natural language claims matched to evidence |
35
+ | output | Expected output artifacts exist on disk |
36
+
37
+ ## Graceful Degradation
38
+
39
+ When enabled, verification failure does not block execution. The step is marked as degraded with a reason, allowing the pipeline to continue while flagging the issue for review.
40
+
41
+ ## Resources
42
+
43
+ - Share parser for transcript analysis
44
+ - Quality gates for post-merge validation: `skills/swarm-gates/SKILL.md`