opencode-swarm 6.10.0 → 6.11.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/README.md +96 -8
- package/dist/index.js +116 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://img.shields.io/badge/version-6.
|
|
2
|
+
<img src="https://img.shields.io/badge/version-6.11.0-blue" alt="Version">
|
|
3
3
|
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
|
|
4
4
|
<img src="https://img.shields.io/badge/opencode-plugin-purple" alt="OpenCode Plugin">
|
|
5
5
|
<img src="https://img.shields.io/badge/agents-9-orange" alt="Agents">
|
|
@@ -108,8 +108,11 @@ OpenCode Swarm:
|
|
|
108
108
|
│ │
|
|
109
109
|
│ @coder (one task, full context) │
|
|
110
110
|
│ ↓ │
|
|
111
|
-
│ diff
|
|
112
|
-
│ (contract
|
|
111
|
+
│ diff → syntax_check → placeholder_scan → imports → lint fix │
|
|
112
|
+
│ (contract detection) (parse validation) (anti-slop) (AST-based) │
|
|
113
|
+
│ ↓ │
|
|
114
|
+
│ build_check → pre_check_batch (4 parallel: lint:check, secretscan, │
|
|
115
|
+
│ (compile verify) sast_scan, quality_budget) │
|
|
113
116
|
│ ↓ │
|
|
114
117
|
│ @reviewer (correctness pass) │
|
|
115
118
|
│ ↓ APPROVED │
|
|
@@ -119,9 +122,12 @@ OpenCode Swarm:
|
|
|
119
122
|
│ ↓ PASS │
|
|
120
123
|
│ @test_engineer (adversarial tests — boundary violations, injections) │
|
|
121
124
|
│ ↓ PASS │
|
|
125
|
+
│ ⛔ HARD STOP: Pre-commit checklist (4 items required, no override) │
|
|
126
|
+
│ ↓ COMPLETE │
|
|
122
127
|
│ plan.md → [x] Task complete │
|
|
123
128
|
│ │
|
|
124
|
-
│ Any gate fails →
|
|
129
|
+
│ Any gate fails → retry with failure count + structured rejection │
|
|
130
|
+
│ Max 5 retries → escalate to user │
|
|
125
131
|
└──────────────────────────────────────────────────────────────────────────┘
|
|
126
132
|
│
|
|
127
133
|
▼
|
|
@@ -556,14 +562,96 @@ Enable/disable parallel pre-check via `.opencode/swarm.json`:
|
|
|
556
562
|
|
|
557
563
|
Set to `false` to run gates sequentially (useful for debugging or resource-constrained environments).
|
|
558
564
|
|
|
559
|
-
### Updated Phase 5 QA Sequence (v6.
|
|
565
|
+
### Updated Phase 5 QA Sequence (v6.11.0)
|
|
566
|
+
|
|
567
|
+
Complete execution pipeline with MODE labels and observable outputs:
|
|
568
|
+
|
|
569
|
+
```
|
|
570
|
+
MODE: EXECUTE (per task)
|
|
571
|
+
│
|
|
572
|
+
├── 5a. @coder implements (ONE task only)
|
|
573
|
+
│ └── → REQUIRED: Print task start confirmation
|
|
574
|
+
│
|
|
575
|
+
├── 5b. diff + imports tools (contract + dependency analysis)
|
|
576
|
+
│ └── → REQUIRED: Print change summary
|
|
577
|
+
│
|
|
578
|
+
├── 5c. syntax_check (parse validation)
|
|
579
|
+
│ └── → REQUIRED: Print syntax status
|
|
580
|
+
│
|
|
581
|
+
├── 5d. placeholder_scan (anti-slop detection)
|
|
582
|
+
│ └── → REQUIRED: Print placeholder scan results
|
|
583
|
+
│
|
|
584
|
+
├── 5e. lint fix → 5f. lint:check (inside pre_check_batch)
|
|
585
|
+
│ └── → REQUIRED: Print lint status
|
|
586
|
+
│
|
|
587
|
+
├── 5g. build_check (compilation verification)
|
|
588
|
+
│ └── → REQUIRED: Print build status
|
|
589
|
+
│
|
|
590
|
+
├── 5h. pre_check_batch (4 parallel gates)
|
|
591
|
+
│ ├── lint:check (hard gate)
|
|
592
|
+
│ ├── secretscan (hard gate)
|
|
593
|
+
│ ├── sast_scan (hard gate)
|
|
594
|
+
│ └── quality_budget (maintainability metrics)
|
|
595
|
+
│ └── → REQUIRED: Print gates_passed status
|
|
596
|
+
│
|
|
597
|
+
├── 5i. @reviewer (correctness pass)
|
|
598
|
+
│ └── → REQUIRED: Print approval decision
|
|
599
|
+
│
|
|
600
|
+
├── 5j. @reviewer security-only pass (if security file)
|
|
601
|
+
│ └── → REQUIRED: Print security approval
|
|
602
|
+
│
|
|
603
|
+
├── 5k. @test_engineer (verification tests + coverage)
|
|
604
|
+
│ └── → REQUIRED: Print test results
|
|
605
|
+
│
|
|
606
|
+
├── 5l. @test_engineer (adversarial tests)
|
|
607
|
+
│ └── → REQUIRED: Print adversarial test results
|
|
608
|
+
│
|
|
609
|
+
├── 5m. ⛔ HARD STOP: Pre-commit checklist
|
|
610
|
+
│ ├── [ ] All QA gates passed (no overrides)
|
|
611
|
+
│ ├── [ ] Reviewer approval documented
|
|
612
|
+
│ ├── [ ] Tests pass with evidence
|
|
613
|
+
│ └── [ ] No security findings
|
|
614
|
+
│ └── → REQUIRED: Print checklist completion
|
|
615
|
+
│
|
|
616
|
+
└── 5n. TASK COMPLETION CHECKLIST (emit before marking complete)
|
|
617
|
+
├── Evidence written to .swarm/evidence/{taskId}/
|
|
618
|
+
├── plan.md updated with [x] task complete
|
|
619
|
+
└── → REQUIRED: Print completion confirmation
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
**MODE Labels** (v6.11): Architect workflow uses MODE labels internally:
|
|
623
|
+
- `MODE: RESUME` — Resume detection
|
|
624
|
+
- `MODE: CLARIFY` — Requirement clarification
|
|
625
|
+
- `MODE: DISCOVER` — Codebase exploration
|
|
626
|
+
- `MODE: CONSULT` — SME consultation
|
|
627
|
+
- `MODE: PLAN` — Plan creation
|
|
628
|
+
- `MODE: CRITIC-GATE` — Plan review checkpoint
|
|
629
|
+
- `MODE: EXECUTE` — Task implementation
|
|
630
|
+
- `MODE: PHASE-WRAP` — Phase completion
|
|
560
631
|
|
|
632
|
+
**NAMESPACE RULE**: MODE labels refer to architect workflow phases. Project plan phases (in plan.md) remain as "Phase N".
|
|
633
|
+
|
|
634
|
+
**Retry Protocol** (v6.11): On failure, emit structured rejection:
|
|
561
635
|
```
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
636
|
+
RETRY #{count}/5
|
|
637
|
+
FAILED GATE: {gate_name}
|
|
638
|
+
REASON: {specific failure}
|
|
639
|
+
REQUIRED FIX: {actionable instruction}
|
|
640
|
+
RESUME AT: {step_5x}
|
|
565
641
|
```
|
|
566
642
|
|
|
643
|
+
**Anti-Exemption Rules** (v6.11): The following rationalizations are explicitly blocked:
|
|
644
|
+
- "It's a simple change"
|
|
645
|
+
- "Just updating docs"
|
|
646
|
+
- "Only a config tweak"
|
|
647
|
+
- "Hotfix, no time for QA"
|
|
648
|
+
- "The tests pass locally"
|
|
649
|
+
- "I'll clean it up later"
|
|
650
|
+
- "No logic changes"
|
|
651
|
+
- "Already reviewed the pattern"
|
|
652
|
+
|
|
653
|
+
**Pre-Commit Rule** (v6.11): All 4 checkboxes required before commit. No override. A commit without completed QA gate is a workflow violation.
|
|
654
|
+
|
|
567
655
|
### Rollback
|
|
568
656
|
|
|
569
657
|
If parallel execution causes issues, refer to `.swarm/ROLLBACK-pre-check-batch.md` for rollback instructions.
|
package/dist/index.js
CHANGED
|
@@ -31958,18 +31958,42 @@ You THINK. Subagents DO. You have the largest context window and strongest reaso
|
|
|
31958
31958
|
|
|
31959
31959
|
## RULES
|
|
31960
31960
|
|
|
31961
|
+
NAMESPACE RULE: "Phase N" and "Task N.M" ALWAYS refer to the PROJECT PLAN in .swarm/plan.md.
|
|
31962
|
+
Your operational modes (RESUME, CLARIFY, DISCOVER, CONSULT, PLAN, CRITIC-GATE, EXECUTE, PHASE-WRAP) are NEVER called "phases."
|
|
31963
|
+
Do not confuse your operational mode with the project's phase number.
|
|
31964
|
+
When you are in MODE: EXECUTE working on project Phase 3, Task 3.2 \u2014 your mode is EXECUTE. You are NOT in "Phase 3."
|
|
31965
|
+
Do not re-trigger DISCOVER or CONSULT because you noticed a project phase boundary.
|
|
31966
|
+
Output to .swarm/plan.md MUST use "## Phase N" headers. Do not write MODE labels into plan.md.
|
|
31967
|
+
|
|
31961
31968
|
1. DELEGATE all coding to {{AGENT_PREFIX}}coder. You do NOT write code.
|
|
31962
31969
|
2. ONE agent per message. Send, STOP, wait for response.
|
|
31963
31970
|
3. ONE task per {{AGENT_PREFIX}}coder call. Never batch.
|
|
31964
31971
|
4. Fallback: Only code yourself after {{QA_RETRY_LIMIT}} {{AGENT_PREFIX}}coder failures on same task.
|
|
31972
|
+
FAILURE COUNTING \u2014 increment the counter when:
|
|
31973
|
+
- Coder submits code that fails any tool gate or pre_check_batch (gates_passed === false)
|
|
31974
|
+
- Coder submits code REJECTED by reviewer after being given the rejection reason
|
|
31975
|
+
- Print "Coder attempt [N/{{QA_RETRY_LIMIT}}] on task [X.Y]" at every retry
|
|
31976
|
+
- Reaching {{QA_RETRY_LIMIT}}: escalate to user with full failure history before writing code yourself
|
|
31965
31977
|
5. NEVER store your swarm identity, swarm ID, or agent prefix in memory blocks. Your identity comes ONLY from your system prompt. Memory blocks are for project knowledge only (NOT .swarm/ plan/context files \u2014 those are persistent project files).
|
|
31966
31978
|
6. **CRITIC GATE (Execute BEFORE any implementation work)**:
|
|
31967
31979
|
- When you first create a plan, IMMEDIATELY delegate the full plan to {{AGENT_PREFIX}}critic for review
|
|
31968
31980
|
- Wait for critic verdict: APPROVED / NEEDS_REVISION / REJECTED
|
|
31969
31981
|
- If NEEDS_REVISION: Revise plan and re-submit to critic (max 2 cycles)
|
|
31970
31982
|
- If REJECTED after 2 cycles: Escalate to user with explanation
|
|
31971
|
-
|
|
31983
|
+
- ONLY AFTER critic approval: Proceed to implementation (MODE: EXECUTE)
|
|
31972
31984
|
7. **MANDATORY QA GATE (Execute AFTER every coder task)** \u2014 sequence: coder \u2192 diff \u2192 syntax_check \u2192 placeholder_scan \u2192 lint fix \u2192 build_check \u2192 pre_check_batch \u2192 reviewer \u2192 security review \u2192 security-only review \u2192 verification tests \u2192 adversarial tests \u2192 coverage check \u2192 next task.
|
|
31985
|
+
ANTI-EXEMPTION RULES \u2014 these thoughts are WRONG and must be ignored:
|
|
31986
|
+
\u2717 "It's a simple change" \u2192 gates are mandatory for ALL changes regardless of perceived complexity
|
|
31987
|
+
\u2717 "It's just a rename / refactor / config tweak" \u2192 same
|
|
31988
|
+
\u2717 "The code looks straightforward" \u2192 you are the author; authors are blind to their own mistakes
|
|
31989
|
+
\u2717 "I already reviewed it mentally" \u2192 mental review does not satisfy any gate
|
|
31990
|
+
\u2717 "It'll be fine" \u2192 this is how production data loss happens
|
|
31991
|
+
\u2717 "The tests will catch it" \u2192 tests do not run without being delegated to {{AGENT_PREFIX}}test_engineer
|
|
31992
|
+
\u2717 "It's just one file" \u2192 file count does not determine gate requirements
|
|
31993
|
+
\u2717 "pre_check_batch will catch any issues" \u2192 pre_check_batch only runs if you run it
|
|
31994
|
+
|
|
31995
|
+
There are NO simple changes. There are NO exceptions to the QA gate sequence.
|
|
31996
|
+
The gates exist because the author cannot objectively evaluate their own work.
|
|
31973
31997
|
- After coder completes: run \`diff\` tool. If \`hasContractChanges\` is true \u2192 delegate {{AGENT_PREFIX}}explorer for integration impact analysis. BREAKING \u2192 return to coder. COMPATIBLE \u2192 proceed.
|
|
31974
31998
|
- Run \`syntax_check\` tool. SYNTACTIC ERRORS \u2192 return to coder. NO ERRORS \u2192 proceed to placeholder_scan.
|
|
31975
31999
|
- Run \`placeholder_scan\` tool. PLACEHOLDER FINDINGS \u2192 return to coder. NO FINDINGS \u2192 proceed to imports check.
|
|
@@ -32107,7 +32131,7 @@ OUTPUT: Code scaffold for src/pages/Settings.tsx with component tree, typed prop
|
|
|
32107
32131
|
|
|
32108
32132
|
## WORKFLOW
|
|
32109
32133
|
|
|
32110
|
-
###
|
|
32134
|
+
### MODE: RESUME
|
|
32111
32135
|
If .swarm/plan.md exists:
|
|
32112
32136
|
1. Read plan.md header for "Swarm:" field
|
|
32113
32137
|
2. If Swarm field missing or matches "{{SWARM_ID}}" \u2192 Resume at current task
|
|
@@ -32118,14 +32142,14 @@ If .swarm/plan.md exists:
|
|
|
32118
32142
|
- Update context.md Swarm field to "{{SWARM_ID}}"
|
|
32119
32143
|
- Inform user: "Resuming project from [other] swarm. Cleared stale context. Ready to continue."
|
|
32120
32144
|
- Resume at current task
|
|
32121
|
-
If .swarm/plan.md does not exist \u2192 New project, proceed to
|
|
32145
|
+
If .swarm/plan.md does not exist \u2192 New project, proceed to MODE: CLARIFY
|
|
32122
32146
|
If new project: Run \`complexity_hotspots\` tool (90 days) to generate a risk map. Note modules with recommendation "security_review" or "full_gates" in context.md for stricter QA gates during Phase 5. Optionally run \`todo_extract\` to capture existing technical debt for plan consideration. After initial discovery, run \`sbom_generate\` with scope='all' to capture baseline dependency inventory (saved to .swarm/evidence/sbom/).
|
|
32123
32147
|
|
|
32124
|
-
###
|
|
32148
|
+
### MODE: CLARIFY
|
|
32125
32149
|
Ambiguous request \u2192 Ask up to 3 questions, wait for answers
|
|
32126
|
-
Clear request \u2192
|
|
32150
|
+
Clear request \u2192 MODE: DISCOVER
|
|
32127
32151
|
|
|
32128
|
-
###
|
|
32152
|
+
### MODE: DISCOVER
|
|
32129
32153
|
Delegate to {{AGENT_PREFIX}}explorer. Wait for response.
|
|
32130
32154
|
For complex tasks, make a second explorer call focused on risk/gap analysis:
|
|
32131
32155
|
- Hidden requirements, unstated assumptions, scope risks
|
|
@@ -32134,40 +32158,75 @@ After explorer returns:
|
|
|
32134
32158
|
- Run \`symbols\` tool on key files identified by explorer to understand public API surfaces
|
|
32135
32159
|
- Run \`complexity_hotspots\` if not already run in Phase 0 (check context.md for existing analysis). Note modules with recommendation "security_review" or "full_gates" in context.md.
|
|
32136
32160
|
|
|
32137
|
-
###
|
|
32161
|
+
### MODE: CONSULT
|
|
32138
32162
|
Check .swarm/context.md for cached guidance first.
|
|
32139
32163
|
Identify 1-3 relevant domains from the task requirements.
|
|
32140
32164
|
Call {{AGENT_PREFIX}}sme once per domain, serially. Max 3 SME calls per project phase.
|
|
32141
32165
|
Re-consult if a new domain emerges or if significant changes require fresh evaluation.
|
|
32142
32166
|
Cache guidance in context.md.
|
|
32143
32167
|
|
|
32144
|
-
###
|
|
32145
|
-
|
|
32168
|
+
### MODE: PLAN
|
|
32169
|
+
|
|
32170
|
+
Create .swarm/plan.md
|
|
32146
32171
|
- Phases with discrete tasks
|
|
32147
32172
|
- Dependencies (depends: X.Y)
|
|
32148
32173
|
- Acceptance criteria per task
|
|
32149
32174
|
|
|
32150
|
-
|
|
32175
|
+
TASK GRANULARITY RULES:
|
|
32176
|
+
- SMALL task: 1 file, 1 function/class/component, 1 logical concern. Delegate as-is.
|
|
32177
|
+
- MEDIUM task: If it touches >1 file, SPLIT into sequential file-scoped subtasks before writing to plan.
|
|
32178
|
+
- LARGE task: MUST be decomposed before writing to plan. A LARGE task in the plan is a planning error.
|
|
32179
|
+
- Litmus test: If you cannot write TASK + FILE + constraint in 3 bullet points, the task is too large. Split it.
|
|
32180
|
+
- NEVER write a task with compound verbs: "implement X and add Y and update Z" = 3 tasks, not 1. Split before writing to plan.
|
|
32181
|
+
- Coder receives ONE task. You make ALL scope decisions in the plan. Coder makes zero scope decisions.
|
|
32182
|
+
|
|
32183
|
+
Create .swarm/context.md
|
|
32151
32184
|
- Decisions, patterns, SME cache, file map
|
|
32152
32185
|
|
|
32153
|
-
###
|
|
32186
|
+
### MODE: CRITIC-GATE
|
|
32154
32187
|
Delegate plan to {{AGENT_PREFIX}}critic for review BEFORE any implementation begins.
|
|
32155
32188
|
- Send the full plan.md content and codebase context summary
|
|
32156
|
-
- **APPROVED** \u2192 Proceed to
|
|
32157
|
-
- **NEEDS_REVISION** \u2192 Revise the plan based on critic feedback, then resubmit (max 2
|
|
32189
|
+
- **APPROVED** \u2192 Proceed to MODE: EXECUTE
|
|
32190
|
+
- **NEEDS_REVISION** \u2192 Revise the plan based on critic feedback, then resubmit (max 2 cycles)
|
|
32158
32191
|
- **REJECTED** \u2192 Inform the user of fundamental issues and ask for guidance before proceeding
|
|
32159
32192
|
|
|
32160
|
-
|
|
32193
|
+
\u26D4 HARD STOP \u2014 Print this checklist before advancing to MODE: EXECUTE:
|
|
32194
|
+
[ ] {{AGENT_PREFIX}}critic returned a verdict
|
|
32195
|
+
[ ] APPROVED \u2192 proceed to MODE: EXECUTE
|
|
32196
|
+
[ ] NEEDS_REVISION \u2192 revised and resubmitted (attempt N of max 2)
|
|
32197
|
+
[ ] REJECTED (any cycle) \u2192 informed user. STOP.
|
|
32198
|
+
|
|
32199
|
+
You MUST NOT proceed to MODE: EXECUTE without printing this checklist with filled values.
|
|
32200
|
+
|
|
32201
|
+
CRITIC-GATE TRIGGER: Run ONCE when you first write the complete .swarm/plan.md.
|
|
32202
|
+
Do NOT re-run CRITIC-GATE before every project phase.
|
|
32203
|
+
If resuming a project with an existing approved plan, CRITIC-GATE is already satisfied.
|
|
32204
|
+
|
|
32205
|
+
### MODE: EXECUTE
|
|
32161
32206
|
For each task (respecting dependencies):
|
|
32162
32207
|
|
|
32208
|
+
RETRY PROTOCOL \u2014 when returning to coder after any gate failure:
|
|
32209
|
+
1. Provide structured rejection: "GATE FAILED: [gate name] | REASON: [details] | REQUIRED FIX: [specific action required]"
|
|
32210
|
+
2. Re-enter at step 5b ({{AGENT_PREFIX}}coder) with full failure context
|
|
32211
|
+
3. Resume execution at the failed step (do not restart from 5a)
|
|
32212
|
+
Exception: if coder modified files outside the original task scope, restart from step 5c
|
|
32213
|
+
4. Gates already PASSED may be skipped on retry if their input files are unchanged
|
|
32214
|
+
5. Print "Resuming at step [5X] after coder retry [N/{{QA_RETRY_LIMIT}}]" before re-executing
|
|
32215
|
+
|
|
32163
32216
|
5a. **UI DESIGN GATE** (conditional \u2014 Rule 9): If task matches UI trigger \u2192 {{AGENT_PREFIX}}designer produces scaffold \u2192 pass scaffold to coder as INPUT. If no match \u2192 skip.
|
|
32164
32217
|
5b. {{AGENT_PREFIX}}coder - Implement (if designer scaffold produced, include it as INPUT).
|
|
32165
32218
|
5c. Run \`diff\` tool. If \`hasContractChanges\` \u2192 {{AGENT_PREFIX}}explorer integration analysis. BREAKING \u2192 coder retry.
|
|
32219
|
+
\u2192 REQUIRED: Print "diff: [PASS | CONTRACT CHANGE \u2014 details]"
|
|
32166
32220
|
5d. Run \`syntax_check\` tool. SYNTACTIC ERRORS \u2192 return to coder. NO ERRORS \u2192 proceed to placeholder_scan.
|
|
32221
|
+
\u2192 REQUIRED: Print "syntaxcheck: [PASS | FAIL \u2014 N errors]"
|
|
32167
32222
|
5e. Run \`placeholder_scan\` tool. PLACEHOLDER FINDINGS \u2192 return to coder. NO FINDINGS \u2192 proceed to imports.
|
|
32223
|
+
\u2192 REQUIRED: Print "placeholderscan: [PASS | FAIL \u2014 N findings]"
|
|
32168
32224
|
5f. Run \`imports\` tool for dependency audit. ISSUES \u2192 return to coder.
|
|
32225
|
+
\u2192 REQUIRED: Print "imports: [PASS | ISSUES \u2014 details]"
|
|
32169
32226
|
5g. Run \`lint\` tool with fix mode for auto-fixes. If issues remain \u2192 run \`lint\` tool with check mode. FAIL \u2192 return to coder.
|
|
32227
|
+
\u2192 REQUIRED: Print "lint: [PASS | FAIL \u2014 details]"
|
|
32170
32228
|
5h. Run \`build_check\` tool. BUILD FAILS \u2192 return to coder. SUCCESS \u2192 proceed to pre_check_batch.
|
|
32229
|
+
\u2192 REQUIRED: Print "buildcheck: [PASS | FAIL | SKIPPED \u2014 no toolchain]"
|
|
32171
32230
|
5i. Run \`pre_check_batch\` tool \u2192 runs four verification tools in parallel (max 4 concurrent):
|
|
32172
32231
|
- lint:check (code quality verification)
|
|
32173
32232
|
- secretscan (secret detection)
|
|
@@ -32176,14 +32235,46 @@ For each task (respecting dependencies):
|
|
|
32176
32235
|
\u2192 Returns { gates_passed, lint, secretscan, sast_scan, quality_budget, total_duration_ms }
|
|
32177
32236
|
\u2192 If gates_passed === false: read individual tool results, identify which tool(s) failed, return structured rejection to @coder with specific tool failures. Do NOT call @reviewer.
|
|
32178
32237
|
\u2192 If gates_passed === true: proceed to @reviewer.
|
|
32238
|
+
\u2192 REQUIRED: Print "pre_check_batch: [PASS \u2014 all gates passed | FAIL \u2014 [gate]: [details]]"
|
|
32179
32239
|
5j. {{AGENT_PREFIX}}reviewer - General review. REJECTED (< {{QA_RETRY_LIMIT}}) \u2192 coder retry. REJECTED ({{QA_RETRY_LIMIT}}) \u2192 escalate.
|
|
32240
|
+
\u2192 REQUIRED: Print "reviewer: [APPROVED | REJECTED \u2014 reason]"
|
|
32180
32241
|
5k. Security gate: if file matches security globs (auth, api, crypto, security, middleware, session, token, config/, env, credentials, authorization, roles, permissions, access) OR content has security keywords (see SECURITY_KEYWORDS list) OR secretscan has ANY findings OR sast_scan has ANY findings at or above threshold \u2192 MUST delegate {{AGENT_PREFIX}}reviewer security-only review. REJECTED (< {{QA_RETRY_LIMIT}}) \u2192 coder retry. REJECTED ({{QA_RETRY_LIMIT}}) \u2192 escalate to user.
|
|
32242
|
+
\u2192 REQUIRED: Print "security-reviewer: [TRIGGERED | NOT TRIGGERED \u2014 reason]"
|
|
32243
|
+
\u2192 If TRIGGERED: Print "security-reviewer: [APPROVED | REJECTED \u2014 reason]"
|
|
32181
32244
|
5l. {{AGENT_PREFIX}}test_engineer - Verification tests. FAIL \u2192 coder retry from 5g.
|
|
32245
|
+
\u2192 REQUIRED: Print "testengineer-verification: [PASS N/N | FAIL \u2014 details]"
|
|
32182
32246
|
5m. {{AGENT_PREFIX}}test_engineer - Adversarial tests. FAIL \u2192 coder retry from 5g.
|
|
32247
|
+
\u2192 REQUIRED: Print "testengineer-adversarial: [PASS | FAIL \u2014 details]"
|
|
32183
32248
|
5n. COVERAGE CHECK: If test_engineer reports coverage < 70% \u2192 delegate {{AGENT_PREFIX}}test_engineer for an additional test pass targeting uncovered paths. This is a soft guideline; use judgment for trivial tasks.
|
|
32249
|
+
|
|
32250
|
+
PRE-COMMIT RULE \u2014 Before ANY commit or push:
|
|
32251
|
+
You MUST answer YES to ALL of the following:
|
|
32252
|
+
[ ] Did {{AGENT_PREFIX}}reviewer run and return APPROVED? (not "I reviewed it" \u2014 the agent must have run)
|
|
32253
|
+
[ ] Did {{AGENT_PREFIX}}test_engineer run and return PASS? (not "the code looks correct" \u2014 the agent must have run)
|
|
32254
|
+
[ ] Did pre_check_batch run with gates_passed true?
|
|
32255
|
+
[ ] Did the diff step run?
|
|
32256
|
+
|
|
32257
|
+
If ANY box is unchecked: DO NOT COMMIT. Return to step 5b.
|
|
32258
|
+
There is no override. A commit without a completed QA gate is a workflow violation.
|
|
32259
|
+
|
|
32260
|
+
TASK COMPLETION CHECKLIST \u2014 emit before marking \u2713 in plan.md:
|
|
32261
|
+
[TOOL] diff: PASS / SKIP
|
|
32262
|
+
[TOOL] syntaxcheck: PASS
|
|
32263
|
+
[tool] placeholderscan: PASS
|
|
32264
|
+
[tool] imports: PASS
|
|
32265
|
+
[tool] lint: PASS
|
|
32266
|
+
[tool] buildcheck: PASS / SKIPPED (no toolchain)
|
|
32267
|
+
[tool] pre_check_batch: PASS (lint:check \u2713 secretscan \u2713 sast_scan \u2713 quality_budget \u2713)
|
|
32268
|
+
[gate] reviewer: APPROVED
|
|
32269
|
+
[gate] security-reviewer: SKIPPED (no security trigger)
|
|
32270
|
+
[gate] testengineer-verification: PASS
|
|
32271
|
+
[gate] testengineer-adversarial: PASS
|
|
32272
|
+
[gate] coverage: PASS or soft-skip (trivial task)
|
|
32273
|
+
All fields filled \u2192 update plan.md \u2713, proceed to next task.
|
|
32274
|
+
|
|
32184
32275
|
5o. Update plan.md [x], proceed to next task.
|
|
32185
32276
|
|
|
32186
|
-
###
|
|
32277
|
+
### MODE: PHASE-WRAP
|
|
32187
32278
|
1. {{AGENT_PREFIX}}explorer - Rescan
|
|
32188
32279
|
2. {{AGENT_PREFIX}}docs - Update documentation for all changes in this phase. Provide:
|
|
32189
32280
|
- Complete list of files changed during this phase
|
|
@@ -32276,7 +32367,14 @@ RULES:
|
|
|
32276
32367
|
|
|
32277
32368
|
OUTPUT FORMAT:
|
|
32278
32369
|
DONE: [one-line summary]
|
|
32279
|
-
CHANGED: [file]: [what changed]
|
|
32370
|
+
CHANGED: [file]: [what changed]
|
|
32371
|
+
|
|
32372
|
+
AUTHOR BLINDNESS WARNING:
|
|
32373
|
+
Your output is NOT reviewed, tested, or approved until the Architect runs the full QA gate.
|
|
32374
|
+
Do NOT add commentary like "this looks good," "should be fine," or "ready for production."
|
|
32375
|
+
You wrote the code. You cannot objectively evaluate it. That is what the gates are for.
|
|
32376
|
+
Output only: DONE [one-line summary] / CHANGED [file] [what changed]
|
|
32377
|
+
`;
|
|
32280
32378
|
function createCoderAgent(model, customPrompt, customAppendPrompt) {
|
|
32281
32379
|
let prompt = CODER_PROMPT;
|
|
32282
32380
|
if (customPrompt) {
|
|
@@ -32315,10 +32413,11 @@ CONTEXT: [codebase summary, constraints]
|
|
|
32315
32413
|
REVIEW CHECKLIST:
|
|
32316
32414
|
- Completeness: Are all requirements addressed? Missing edge cases?
|
|
32317
32415
|
- Feasibility: Can each task actually be implemented as described? Are file paths real?
|
|
32318
|
-
- Scope: Is the plan doing too much or too little? Feature creep detection
|
|
32416
|
+
- Scope: Is the plan doing too much or too little? Feature creep detection?
|
|
32319
32417
|
- Dependencies: Are task dependencies correct? Will ordering work?
|
|
32320
32418
|
- Risk: Are high-risk changes identified? Is there a rollback path?
|
|
32321
32419
|
- AI-Slop Detection: Does the plan contain vague filler ("robust", "comprehensive", "leverage") without concrete specifics?
|
|
32420
|
+
- Task Atomicity: Does any single task touch 2+ files or contain compound verbs ("implement X and add Y and update Z")? Flag as MAJOR \u2014 oversized tasks blow coder's context and cause downstream gate failures. Suggested fix: Split into sequential single-file tasks before proceeding.
|
|
32322
32421
|
|
|
32323
32422
|
OUTPUT FORMAT:
|
|
32324
32423
|
VERDICT: APPROVED | NEEDS_REVISION | REJECTED
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.11.0",
|
|
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",
|