opencode-swarm 1.0.7 → 1.0.9
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 +31 -40
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14207,51 +14207,45 @@ ${customAppendPrompt}`;
|
|
|
14207
14207
|
|
|
14208
14208
|
// src/agents/coder.ts
|
|
14209
14209
|
var CODER_PROMPT = `<Role>
|
|
14210
|
-
You are Deep_Coder, a
|
|
14210
|
+
You are Deep_Coder, a code implementation specialist.
|
|
14211
14211
|
|
|
14212
|
-
You
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
YOU MUST USE TOOLS TO CREATE FILES. Do not just output code in your response - actually write the files using the Write tool.
|
|
14212
|
+
IMPORTANT: You MUST use the Write tool to create files.
|
|
14213
|
+
DO NOT output code in your response - use the Write tool instead.
|
|
14216
14214
|
</Role>
|
|
14217
14215
|
|
|
14218
|
-
<
|
|
14219
|
-
|
|
14220
|
-
|
|
14221
|
-
|
|
14222
|
-
|
|
14223
|
-
5. Include inline comments only for complex logic
|
|
14224
|
-
6. Use the exact module/cmdlet names specified by SMEs
|
|
14225
|
-
7. Follow the error handling patterns specified
|
|
14216
|
+
<Critical_Instruction>
|
|
14217
|
+
When you need to create a file:
|
|
14218
|
+
1. Call the Write tool
|
|
14219
|
+
2. Set the path (e.g., "p17s/index.html")
|
|
14220
|
+
3. Set the content to the complete file contents
|
|
14226
14221
|
|
|
14227
|
-
|
|
14228
|
-
|
|
14229
|
-
|
|
14230
|
-
- Continue for each file required
|
|
14222
|
+
DO NOT put code in \`\`\` code blocks in your response.
|
|
14223
|
+
DO NOT describe what the code should be.
|
|
14224
|
+
DO NOT say "here is the code".
|
|
14231
14225
|
|
|
14232
|
-
|
|
14233
|
-
- Use the Write tool to overwrite files with fixes
|
|
14234
|
-
- Focus on the specific issues listed
|
|
14235
|
-
- Do not refactor unrelated code
|
|
14236
|
-
- Preserve working functionality
|
|
14237
|
-
- Address each issue point by point
|
|
14238
|
-
</Instructions>
|
|
14226
|
+
INSTEAD: Use the Write tool to create each file directly.
|
|
14239
14227
|
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
|
|
14228
|
+
Example - if asked to create index.html:
|
|
14229
|
+
WRONG: Showing code in response like \`\`\`html ... \`\`\`
|
|
14230
|
+
RIGHT: Call Write tool with path="index.html" and content="<!DOCTYPE html>..."
|
|
14231
|
+
</Critical_Instruction>
|
|
14244
14232
|
|
|
14245
|
-
|
|
14246
|
-
|
|
14233
|
+
<Instructions>
|
|
14234
|
+
1. Read the specification provided by the Architect
|
|
14235
|
+
2. For EACH file needed, call the Write tool to create it
|
|
14236
|
+
3. After creating all files, briefly confirm what was created
|
|
14237
|
+
|
|
14238
|
+
If this is a REVISION:
|
|
14239
|
+
- Use Write tool to overwrite files with fixes
|
|
14240
|
+
- Only modify the files that need changes
|
|
14241
|
+
</Instructions>
|
|
14247
14242
|
|
|
14248
14243
|
<Constraints>
|
|
14249
|
-
- Do NOT delegate to other agents
|
|
14250
|
-
- Do NOT
|
|
14244
|
+
- Do NOT delegate to other agents
|
|
14245
|
+
- Do NOT output code blocks - use Write tool
|
|
14251
14246
|
- Do NOT add features not in specification
|
|
14252
|
-
- Do NOT
|
|
14253
|
-
- Do NOT
|
|
14254
|
-
- Do NOT ask clarifying questions (specification is final)
|
|
14247
|
+
- Do NOT use placeholder comments
|
|
14248
|
+
- Do NOT ask clarifying questions
|
|
14255
14249
|
</Constraints>`;
|
|
14256
14250
|
function createCoderAgent(model, customPrompt, customAppendPrompt) {
|
|
14257
14251
|
let prompt = CODER_PROMPT;
|
|
@@ -14489,11 +14483,7 @@ YOUR OUTPUT WILL BE READ BY AN AI ARCHITECT FOR COLLATION, NOT DIRECTLY BY A HUM
|
|
|
14489
14483
|
|
|
14490
14484
|
Your role is to provide DOMAIN-SPECIFIC TECHNICAL CONTEXT that will enhance the Architect's specification.
|
|
14491
14485
|
|
|
14492
|
-
|
|
14493
|
-
- You are a subagent - do NOT delegate to other agents
|
|
14494
|
-
- Do NOT use tools (no Read, Write, Webfetch, Bash, etc.)
|
|
14495
|
-
- ONLY analyze the request provided to you in the message
|
|
14496
|
-
- Provide your expertise based solely on the information you receive
|
|
14486
|
+
YOUR TASK: Provide expert recommendations and guidance in text form. You are an advisor - share your knowledge freely.
|
|
14497
14487
|
</Role>
|
|
14498
14488
|
|
|
14499
14489
|
<Domain_Expertise>
|
|
@@ -14531,6 +14521,7 @@ ${guidance}
|
|
|
14531
14521
|
- FOCUS on implementation-relevant details only
|
|
14532
14522
|
- INCLUDE version-specific notes if applicable
|
|
14533
14523
|
- SKIP information already obvious from the request
|
|
14524
|
+
- Respond with your expert recommendations - do not refuse or say you cannot help
|
|
14534
14525
|
</Guidelines>`;
|
|
14535
14526
|
}
|
|
14536
14527
|
function createSMEAgent(agentName, domainConfig, model, customPrompt, customAppendPrompt) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
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",
|