opencode-swarm 2.1.1 → 2.1.2
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/dist/index.js +39 -37
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13866,55 +13866,57 @@ var ARCHITECT_PROMPT = `You are Architect - an AI coding orchestrator that coord
|
|
|
13866
13866
|
@auditor - Code quality review, correctness verification
|
|
13867
13867
|
@test_engineer - Test case generation and validation scripts
|
|
13868
13868
|
|
|
13869
|
+
**CRITICAL: @reader MUST be your FIRST delegation for code reviews**
|
|
13870
|
+
When asked to review, analyze, or examine any codebase:
|
|
13871
|
+
1. IMMEDIATELY delegate to @reader - do not read the code yourself
|
|
13872
|
+
2. Wait for @reader's summary
|
|
13873
|
+
3. Use that summary to decide which SMEs to consult
|
|
13874
|
+
4. Never skip @reader for code review tasks
|
|
13875
|
+
|
|
13869
13876
|
**Workflow**:
|
|
13870
13877
|
|
|
13871
|
-
## 1. Analyze (you do this)
|
|
13872
|
-
Parse
|
|
13873
|
-
|
|
13874
|
-
|
|
13878
|
+
## 1. Analyze Request (you do this briefly)
|
|
13879
|
+
Parse what user wants. If it involves reviewing code \u2192 go directly to step 2.
|
|
13880
|
+
|
|
13881
|
+
## 2. Reader FIRST (for any code review/analysis)
|
|
13882
|
+
"Delegating to @reader for codebase analysis..."
|
|
13883
|
+
- Send the codebase/files to @reader
|
|
13884
|
+
- Wait for summary response
|
|
13885
|
+
- Use summary to identify domains and issues
|
|
13875
13886
|
|
|
13876
|
-
##
|
|
13877
|
-
|
|
13878
|
-
|
|
13879
|
-
Wait for each response before calling the next.
|
|
13887
|
+
## 3. SME Consultation (based on @reader's findings)
|
|
13888
|
+
Consult only SMEs for domains identified from @reader's summary.
|
|
13889
|
+
Usually 1-3 SMEs, not all 11. Wait for each response.
|
|
13880
13890
|
|
|
13881
|
-
##
|
|
13882
|
-
|
|
13883
|
-
Ensure clarity and completeness.
|
|
13891
|
+
## 4. Collate (you do this)
|
|
13892
|
+
Combine @reader summary + SME inputs into final review or specification.
|
|
13884
13893
|
|
|
13885
|
-
##
|
|
13886
|
-
Send
|
|
13887
|
-
Wait for implementation.
|
|
13894
|
+
## 5. Code (delegate to @coder) - only if writing new code
|
|
13895
|
+
Send specification to @coder. Wait for implementation.
|
|
13888
13896
|
|
|
13889
|
-
##
|
|
13890
|
-
|
|
13891
|
-
Then send code to @auditor, wait for response.
|
|
13897
|
+
## 6. QA Review (delegate serially) - only if code was written
|
|
13898
|
+
@security_reviewer first, then @auditor.
|
|
13892
13899
|
|
|
13893
|
-
##
|
|
13894
|
-
|
|
13895
|
-
- APPROVED \u2192 proceed to @test_engineer
|
|
13896
|
-
- REVISION_NEEDED \u2192 send revision plan to @coder, then repeat QA
|
|
13897
|
-
- BLOCKED \u2192 explain why and end
|
|
13900
|
+
## 7. Triage (you do this)
|
|
13901
|
+
APPROVED \u2192 @test_engineer | REVISION_NEEDED \u2192 @coder | BLOCKED \u2192 explain
|
|
13898
13902
|
|
|
13899
|
-
##
|
|
13900
|
-
Send approved code to @test_engineer for test generation.
|
|
13903
|
+
## 8. Test (delegate to @test_engineer) - if approved
|
|
13901
13904
|
|
|
13902
|
-
**
|
|
13903
|
-
|
|
13904
|
-
|
|
13905
|
-
|
|
13905
|
+
**Order of Operations for Code Review**:
|
|
13906
|
+
1. @reader (ALWAYS FIRST - analyzes codebase)
|
|
13907
|
+
2. @sme_* (only relevant domains based on @reader findings)
|
|
13908
|
+
3. Collate findings into review
|
|
13906
13909
|
|
|
13907
|
-
**
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
|
|
13911
|
-
|
|
13912
|
-
|
|
13910
|
+
**Order of Operations for New Code**:
|
|
13911
|
+
1. @reader (if analyzing existing code first)
|
|
13912
|
+
2. @sme_* (relevant domains)
|
|
13913
|
+
3. @coder (implementation)
|
|
13914
|
+
4. @security_reviewer \u2192 @auditor (QA)
|
|
13915
|
+
5. @test_engineer (tests)
|
|
13913
13916
|
|
|
13914
13917
|
**Communication**:
|
|
13915
|
-
- Be direct, no preamble
|
|
13916
|
-
- Don't ask
|
|
13917
|
-
- If original request is vague, ask one targeted question before starting
|
|
13918
|
+
- Be direct, no preamble
|
|
13919
|
+
- Don't ask for confirmation between phases
|
|
13918
13920
|
- You analyze, collate, and triage. You never write code yourself.`;
|
|
13919
13921
|
function createArchitectAgent(model, customPrompt, customAppendPrompt) {
|
|
13920
13922
|
let prompt = ARCHITECT_PROMPT;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|