opencode-swarm-plugin 0.12.8 → 0.12.10
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/.beads/issues.jsonl +2 -0
- package/dist/index.js +68 -7
- package/dist/plugin.js +68 -7
- package/package.json +1 -1
- package/src/learning.ts +1 -0
- package/src/swarm.ts +69 -4
package/.beads/issues.jsonl
CHANGED
|
@@ -305,6 +305,7 @@
|
|
|
305
305
|
{"id":"opencode-swarm-plugin-5ukv1","title":"Bead to start","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T09:06:07.140527-08:00","updated_at":"2025-12-10T09:06:10.259329-08:00","closed_at":"2025-12-10T09:06:10.259329-08:00"}
|
|
306
306
|
{"id":"opencode-swarm-plugin-5uvt","title":"Limit test bead 3","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T07:46:49.108567-08:00","updated_at":"2025-12-08T07:46:51.736011-08:00","closed_at":"2025-12-08T07:46:51.736011-08:00"}
|
|
307
307
|
{"id":"opencode-swarm-plugin-5x8v","title":"Bead to start","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T11:10:53.928154-08:00","updated_at":"2025-12-08T11:10:56.008815-08:00","closed_at":"2025-12-08T11:10:56.008815-08:00"}
|
|
308
|
+
{"id":"opencode-swarm-plugin-5xy17","title":"Swarm should support research task decomposition with pdf-brain","description":"Currently swarm coordinator treats \"research\" tasks as single-agent work. Should decompose research into parallel agents that:\n\n1. Search different sources (pdf-brain, repo-crawl, cass, web)\n2. Focus on different aspects of the question\n3. Synthesize findings into coherent answer\n\nExample decomposition for \"debug levers for agent mail\":\n- Agent 1: Search pdf-brain for \"agent debugging\", \"MCP server configuration\"\n- Agent 2: Crawl the repo README, .env.example, config.py\n- Agent 3: Search cass for past sessions dealing with agent-mail errors\n- Agent 4: Synthesize findings from other agents\n\nStrategy selection should recognize research keywords:\n- research, investigate, explore, find, discover, understand, learn, analyze\n\nTool availability check:\n- If pdf-brain available, include PDF search subtask\n- If repo-crawl available, include repo exploration subtask\n- If cass available, include history search subtask\n\nFiles: src/swarm.ts (add research strategy), src/tool-availability.ts","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-10T10:59:41.26917-08:00","updated_at":"2025-12-10T11:01:35.90704-08:00","closed_at":"2025-12-10T11:01:35.90704-08:00"}
|
|
308
309
|
{"id":"opencode-swarm-plugin-5ztv","title":"New feature request","description":"","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-08T11:12:40.764593-08:00","updated_at":"2025-12-08T11:12:43.52524-08:00","closed_at":"2025-12-08T11:12:43.52524-08:00"}
|
|
309
310
|
{"id":"opencode-swarm-plugin-61t","title":"Single subtask epic","description":"","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-07T19:36:07.443401-08:00","updated_at":"2025-12-07T19:36:09.031886-08:00","closed_at":"2025-12-07T19:36:09.031886-08:00"}
|
|
310
311
|
{"id":"opencode-swarm-plugin-62da","title":"Update test bead","description":"Updated description","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T11:11:38.733772-08:00","updated_at":"2025-12-08T11:11:41.037318-08:00","closed_at":"2025-12-08T11:11:41.037318-08:00"}
|
|
@@ -947,6 +948,7 @@
|
|
|
947
948
|
{"id":"opencode-swarm-plugin-jbdj","title":"Thread link test bead","description":"[thread:test-thread-456]","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T11:10:54.731569-08:00","updated_at":"2025-12-08T11:10:56.43993-08:00","closed_at":"2025-12-08T11:10:56.43993-08:00"}
|
|
948
949
|
{"id":"opencode-swarm-plugin-jc9y","title":"Query test bead","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-07T19:39:29.328372-08:00","updated_at":"2025-12-07T19:39:31.358211-08:00","closed_at":"2025-12-07T19:39:31.358211-08:00"}
|
|
949
950
|
{"id":"opencode-swarm-plugin-jdj","title":"Update test bead","description":"Updated description","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-07T19:39:10.007126-08:00","updated_at":"2025-12-07T19:39:11.999539-08:00","closed_at":"2025-12-07T19:39:11.999539-08:00"}
|
|
951
|
+
{"id":"opencode-swarm-plugin-jf6gz","title":"Add repo-crawl tools to swarm plugin","description":"repo-crawl is essential for research tasks. Should be part of the plugin rather than a separate MCP server.\n\nTools to add:\n- repo_readme(repo) - Get README content\n- repo_structure(repo) - Get repo structure and tech stack\n- repo_tree(repo, path?) - Get directory tree\n- repo_file(repo, path) - Get file content\n- repo_search(repo, query) - Search code in repo\n\nImplementation:\n- Use GitHub API (unauthenticated for public repos, GITHUB_TOKEN for private)\n- Add to tool-availability.ts checks\n- Integrate with research-based strategy\n\nFiles: src/repo-crawl.ts (new), src/index.ts, src/tool-availability.ts","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-10T11:01:29.213791-08:00","updated_at":"2025-12-10T11:01:29.213791-08:00"}
|
|
950
952
|
{"id":"opencode-swarm-plugin-jg4c","title":"Thread link test bead","description":"[thread:test-thread-123]","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T08:22:18.157665-08:00","updated_at":"2025-12-08T08:22:19.932643-08:00","closed_at":"2025-12-08T08:22:19.932643-08:00"}
|
|
951
953
|
{"id":"opencode-swarm-plugin-jhk","title":"Limit test bead 2","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-07T19:39:18.330876-08:00","updated_at":"2025-12-07T19:39:20.45981-08:00","closed_at":"2025-12-07T19:39:20.45981-08:00"}
|
|
952
954
|
{"id":"opencode-swarm-plugin-jiqn","title":"Single subtask epic","description":"","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-07T19:57:07.022149-08:00","updated_at":"2025-12-07T19:57:08.738869-08:00","closed_at":"2025-12-07T19:57:08.738869-08:00"}
|
package/dist/index.js
CHANGED
|
@@ -23774,7 +23774,8 @@ var ErrorEntrySchema = exports_external.object({
|
|
|
23774
23774
|
var DecompositionStrategySchema = exports_external.enum([
|
|
23775
23775
|
"file-based",
|
|
23776
23776
|
"feature-based",
|
|
23777
|
-
"risk-based"
|
|
23777
|
+
"risk-based",
|
|
23778
|
+
"research-based"
|
|
23778
23779
|
]);
|
|
23779
23780
|
var OutcomeSignalsSchema = exports_external.object({
|
|
23780
23781
|
bead_id: exports_external.string(),
|
|
@@ -24138,8 +24139,7 @@ var STRATEGIES = {
|
|
|
24138
24139
|
"hotfix",
|
|
24139
24140
|
"patch",
|
|
24140
24141
|
"audit",
|
|
24141
|
-
"review"
|
|
24142
|
-
"investigate"
|
|
24142
|
+
"review"
|
|
24143
24143
|
],
|
|
24144
24144
|
guidelines: [
|
|
24145
24145
|
"Write tests FIRST to capture expected behavior",
|
|
@@ -24158,6 +24158,59 @@ var STRATEGIES = {
|
|
|
24158
24158
|
"Fix race condition \u2192 [Add test reproducing issue, Implement fix, Add concurrency tests]",
|
|
24159
24159
|
"Security audit \u2192 [Scan for vulnerabilities, Fix critical issues, Document remaining risks]"
|
|
24160
24160
|
]
|
|
24161
|
+
},
|
|
24162
|
+
"research-based": {
|
|
24163
|
+
name: "research-based",
|
|
24164
|
+
description: "Parallel search across multiple sources, then synthesize. Best for investigation, learning, and discovery tasks.",
|
|
24165
|
+
keywords: [
|
|
24166
|
+
"research",
|
|
24167
|
+
"investigate",
|
|
24168
|
+
"explore",
|
|
24169
|
+
"find out",
|
|
24170
|
+
"discover",
|
|
24171
|
+
"understand",
|
|
24172
|
+
"learn about",
|
|
24173
|
+
"analyze",
|
|
24174
|
+
"what is",
|
|
24175
|
+
"what are",
|
|
24176
|
+
"how does",
|
|
24177
|
+
"how do",
|
|
24178
|
+
"why does",
|
|
24179
|
+
"why do",
|
|
24180
|
+
"compare",
|
|
24181
|
+
"evaluate",
|
|
24182
|
+
"study",
|
|
24183
|
+
"look up",
|
|
24184
|
+
"look into",
|
|
24185
|
+
"search for",
|
|
24186
|
+
"dig into",
|
|
24187
|
+
"figure out",
|
|
24188
|
+
"debug options",
|
|
24189
|
+
"debug levers",
|
|
24190
|
+
"configuration options",
|
|
24191
|
+
"environment variables",
|
|
24192
|
+
"available options",
|
|
24193
|
+
"documentation"
|
|
24194
|
+
],
|
|
24195
|
+
guidelines: [
|
|
24196
|
+
"Split by information source (PDFs, repos, history, web)",
|
|
24197
|
+
"Each agent searches with different query angles",
|
|
24198
|
+
"Include a synthesis subtask that depends on all search subtasks",
|
|
24199
|
+
"Use pdf-brain for documentation/books if available",
|
|
24200
|
+
"Use repo-crawl for GitHub repos if URL provided",
|
|
24201
|
+
"Use cass for past agent session history",
|
|
24202
|
+
"Assign NO files to research subtasks (read-only)"
|
|
24203
|
+
],
|
|
24204
|
+
antiPatterns: [
|
|
24205
|
+
"Don't have one agent search everything sequentially",
|
|
24206
|
+
"Don't skip synthesis - raw search results need consolidation",
|
|
24207
|
+
"Don't forget to check tool availability before assigning sources"
|
|
24208
|
+
],
|
|
24209
|
+
examples: [
|
|
24210
|
+
"Research auth patterns \u2192 [Search PDFs, Search repos, Search history, Synthesize]",
|
|
24211
|
+
"Investigate error \u2192 [Search cass for similar errors, Search repo for error handling, Synthesize]",
|
|
24212
|
+
"Learn about library \u2192 [Search docs, Search examples, Search issues, Synthesize findings]"
|
|
24213
|
+
]
|
|
24161
24214
|
}
|
|
24162
24215
|
};
|
|
24163
24216
|
function selectStrategy(task) {
|
|
@@ -24165,13 +24218,21 @@ function selectStrategy(task) {
|
|
|
24165
24218
|
const scores = {
|
|
24166
24219
|
"file-based": 0,
|
|
24167
24220
|
"feature-based": 0,
|
|
24168
|
-
"risk-based": 0
|
|
24221
|
+
"risk-based": 0,
|
|
24222
|
+
"research-based": 0
|
|
24169
24223
|
};
|
|
24170
24224
|
for (const [strategyName, definition] of Object.entries(STRATEGIES)) {
|
|
24171
24225
|
const name = strategyName;
|
|
24172
24226
|
for (const keyword of definition.keywords) {
|
|
24173
|
-
if (
|
|
24174
|
-
|
|
24227
|
+
if (keyword.includes(" ")) {
|
|
24228
|
+
if (taskLower.includes(keyword)) {
|
|
24229
|
+
scores[name] += 1;
|
|
24230
|
+
}
|
|
24231
|
+
} else {
|
|
24232
|
+
const regex = new RegExp(`\\b${keyword}\\b`, "i");
|
|
24233
|
+
if (regex.test(taskLower)) {
|
|
24234
|
+
scores[name] += 1;
|
|
24235
|
+
}
|
|
24175
24236
|
}
|
|
24176
24237
|
}
|
|
24177
24238
|
}
|
|
@@ -25112,7 +25173,7 @@ var swarm_record_outcome = tool({
|
|
|
25112
25173
|
success: tool.schema.boolean().describe("Whether the subtask succeeded"),
|
|
25113
25174
|
files_touched: tool.schema.array(tool.schema.string()).optional().describe("Files that were modified"),
|
|
25114
25175
|
criteria: tool.schema.array(tool.schema.string()).optional().describe("Criteria to generate feedback for (default: all default criteria)"),
|
|
25115
|
-
strategy: tool.schema.enum(["file-based", "feature-based", "risk-based"]).optional().describe("Decomposition strategy used for this task")
|
|
25176
|
+
strategy: tool.schema.enum(["file-based", "feature-based", "risk-based", "research-based"]).optional().describe("Decomposition strategy used for this task")
|
|
25116
25177
|
},
|
|
25117
25178
|
async execute(args) {
|
|
25118
25179
|
const signals = {
|
package/dist/plugin.js
CHANGED
|
@@ -23748,7 +23748,8 @@ var ErrorEntrySchema = exports_external.object({
|
|
|
23748
23748
|
var DecompositionStrategySchema = exports_external.enum([
|
|
23749
23749
|
"file-based",
|
|
23750
23750
|
"feature-based",
|
|
23751
|
-
"risk-based"
|
|
23751
|
+
"risk-based",
|
|
23752
|
+
"research-based"
|
|
23752
23753
|
]);
|
|
23753
23754
|
var OutcomeSignalsSchema = exports_external.object({
|
|
23754
23755
|
bead_id: exports_external.string(),
|
|
@@ -24096,8 +24097,7 @@ var STRATEGIES = {
|
|
|
24096
24097
|
"hotfix",
|
|
24097
24098
|
"patch",
|
|
24098
24099
|
"audit",
|
|
24099
|
-
"review"
|
|
24100
|
-
"investigate"
|
|
24100
|
+
"review"
|
|
24101
24101
|
],
|
|
24102
24102
|
guidelines: [
|
|
24103
24103
|
"Write tests FIRST to capture expected behavior",
|
|
@@ -24116,6 +24116,59 @@ var STRATEGIES = {
|
|
|
24116
24116
|
"Fix race condition \u2192 [Add test reproducing issue, Implement fix, Add concurrency tests]",
|
|
24117
24117
|
"Security audit \u2192 [Scan for vulnerabilities, Fix critical issues, Document remaining risks]"
|
|
24118
24118
|
]
|
|
24119
|
+
},
|
|
24120
|
+
"research-based": {
|
|
24121
|
+
name: "research-based",
|
|
24122
|
+
description: "Parallel search across multiple sources, then synthesize. Best for investigation, learning, and discovery tasks.",
|
|
24123
|
+
keywords: [
|
|
24124
|
+
"research",
|
|
24125
|
+
"investigate",
|
|
24126
|
+
"explore",
|
|
24127
|
+
"find out",
|
|
24128
|
+
"discover",
|
|
24129
|
+
"understand",
|
|
24130
|
+
"learn about",
|
|
24131
|
+
"analyze",
|
|
24132
|
+
"what is",
|
|
24133
|
+
"what are",
|
|
24134
|
+
"how does",
|
|
24135
|
+
"how do",
|
|
24136
|
+
"why does",
|
|
24137
|
+
"why do",
|
|
24138
|
+
"compare",
|
|
24139
|
+
"evaluate",
|
|
24140
|
+
"study",
|
|
24141
|
+
"look up",
|
|
24142
|
+
"look into",
|
|
24143
|
+
"search for",
|
|
24144
|
+
"dig into",
|
|
24145
|
+
"figure out",
|
|
24146
|
+
"debug options",
|
|
24147
|
+
"debug levers",
|
|
24148
|
+
"configuration options",
|
|
24149
|
+
"environment variables",
|
|
24150
|
+
"available options",
|
|
24151
|
+
"documentation"
|
|
24152
|
+
],
|
|
24153
|
+
guidelines: [
|
|
24154
|
+
"Split by information source (PDFs, repos, history, web)",
|
|
24155
|
+
"Each agent searches with different query angles",
|
|
24156
|
+
"Include a synthesis subtask that depends on all search subtasks",
|
|
24157
|
+
"Use pdf-brain for documentation/books if available",
|
|
24158
|
+
"Use repo-crawl for GitHub repos if URL provided",
|
|
24159
|
+
"Use cass for past agent session history",
|
|
24160
|
+
"Assign NO files to research subtasks (read-only)"
|
|
24161
|
+
],
|
|
24162
|
+
antiPatterns: [
|
|
24163
|
+
"Don't have one agent search everything sequentially",
|
|
24164
|
+
"Don't skip synthesis - raw search results need consolidation",
|
|
24165
|
+
"Don't forget to check tool availability before assigning sources"
|
|
24166
|
+
],
|
|
24167
|
+
examples: [
|
|
24168
|
+
"Research auth patterns \u2192 [Search PDFs, Search repos, Search history, Synthesize]",
|
|
24169
|
+
"Investigate error \u2192 [Search cass for similar errors, Search repo for error handling, Synthesize]",
|
|
24170
|
+
"Learn about library \u2192 [Search docs, Search examples, Search issues, Synthesize findings]"
|
|
24171
|
+
]
|
|
24119
24172
|
}
|
|
24120
24173
|
};
|
|
24121
24174
|
function selectStrategy(task) {
|
|
@@ -24123,13 +24176,21 @@ function selectStrategy(task) {
|
|
|
24123
24176
|
const scores = {
|
|
24124
24177
|
"file-based": 0,
|
|
24125
24178
|
"feature-based": 0,
|
|
24126
|
-
"risk-based": 0
|
|
24179
|
+
"risk-based": 0,
|
|
24180
|
+
"research-based": 0
|
|
24127
24181
|
};
|
|
24128
24182
|
for (const [strategyName, definition] of Object.entries(STRATEGIES)) {
|
|
24129
24183
|
const name = strategyName;
|
|
24130
24184
|
for (const keyword of definition.keywords) {
|
|
24131
|
-
if (
|
|
24132
|
-
|
|
24185
|
+
if (keyword.includes(" ")) {
|
|
24186
|
+
if (taskLower.includes(keyword)) {
|
|
24187
|
+
scores[name] += 1;
|
|
24188
|
+
}
|
|
24189
|
+
} else {
|
|
24190
|
+
const regex = new RegExp(`\\b${keyword}\\b`, "i");
|
|
24191
|
+
if (regex.test(taskLower)) {
|
|
24192
|
+
scores[name] += 1;
|
|
24193
|
+
}
|
|
24133
24194
|
}
|
|
24134
24195
|
}
|
|
24135
24196
|
}
|
|
@@ -25062,7 +25123,7 @@ var swarm_record_outcome = tool({
|
|
|
25062
25123
|
success: tool.schema.boolean().describe("Whether the subtask succeeded"),
|
|
25063
25124
|
files_touched: tool.schema.array(tool.schema.string()).optional().describe("Files that were modified"),
|
|
25064
25125
|
criteria: tool.schema.array(tool.schema.string()).optional().describe("Criteria to generate feedback for (default: all default criteria)"),
|
|
25065
|
-
strategy: tool.schema.enum(["file-based", "feature-based", "risk-based"]).optional().describe("Decomposition strategy used for this task")
|
|
25126
|
+
strategy: tool.schema.enum(["file-based", "feature-based", "risk-based", "research-based"]).optional().describe("Decomposition strategy used for this task")
|
|
25066
25127
|
},
|
|
25067
25128
|
async execute(args) {
|
|
25068
25129
|
const signals = {
|
package/package.json
CHANGED
package/src/learning.ts
CHANGED
package/src/swarm.ts
CHANGED
|
@@ -210,6 +210,7 @@ export type DecompositionStrategy =
|
|
|
210
210
|
| "file-based"
|
|
211
211
|
| "feature-based"
|
|
212
212
|
| "risk-based"
|
|
213
|
+
| "research-based"
|
|
213
214
|
| "auto";
|
|
214
215
|
|
|
215
216
|
/**
|
|
@@ -316,7 +317,6 @@ export const STRATEGIES: Record<
|
|
|
316
317
|
"patch",
|
|
317
318
|
"audit",
|
|
318
319
|
"review",
|
|
319
|
-
"investigate",
|
|
320
320
|
],
|
|
321
321
|
guidelines: [
|
|
322
322
|
"Write tests FIRST to capture expected behavior",
|
|
@@ -336,6 +336,60 @@ export const STRATEGIES: Record<
|
|
|
336
336
|
"Security audit → [Scan for vulnerabilities, Fix critical issues, Document remaining risks]",
|
|
337
337
|
],
|
|
338
338
|
},
|
|
339
|
+
"research-based": {
|
|
340
|
+
name: "research-based",
|
|
341
|
+
description:
|
|
342
|
+
"Parallel search across multiple sources, then synthesize. Best for investigation, learning, and discovery tasks.",
|
|
343
|
+
keywords: [
|
|
344
|
+
"research",
|
|
345
|
+
"investigate",
|
|
346
|
+
"explore",
|
|
347
|
+
"find out",
|
|
348
|
+
"discover",
|
|
349
|
+
"understand",
|
|
350
|
+
"learn about",
|
|
351
|
+
"analyze",
|
|
352
|
+
"what is",
|
|
353
|
+
"what are",
|
|
354
|
+
"how does",
|
|
355
|
+
"how do",
|
|
356
|
+
"why does",
|
|
357
|
+
"why do",
|
|
358
|
+
"compare",
|
|
359
|
+
"evaluate",
|
|
360
|
+
"study",
|
|
361
|
+
"look up",
|
|
362
|
+
"look into",
|
|
363
|
+
"search for",
|
|
364
|
+
"dig into",
|
|
365
|
+
"figure out",
|
|
366
|
+
"debug options",
|
|
367
|
+
"debug levers",
|
|
368
|
+
"configuration options",
|
|
369
|
+
"environment variables",
|
|
370
|
+
"available options",
|
|
371
|
+
"documentation",
|
|
372
|
+
],
|
|
373
|
+
guidelines: [
|
|
374
|
+
"Split by information source (PDFs, repos, history, web)",
|
|
375
|
+
"Each agent searches with different query angles",
|
|
376
|
+
"Include a synthesis subtask that depends on all search subtasks",
|
|
377
|
+
"Use pdf-brain for documentation/books if available",
|
|
378
|
+
"Use repo-crawl for GitHub repos if URL provided",
|
|
379
|
+
"Use cass for past agent session history",
|
|
380
|
+
"Assign NO files to research subtasks (read-only)",
|
|
381
|
+
],
|
|
382
|
+
antiPatterns: [
|
|
383
|
+
"Don't have one agent search everything sequentially",
|
|
384
|
+
"Don't skip synthesis - raw search results need consolidation",
|
|
385
|
+
"Don't forget to check tool availability before assigning sources",
|
|
386
|
+
],
|
|
387
|
+
examples: [
|
|
388
|
+
"Research auth patterns → [Search PDFs, Search repos, Search history, Synthesize]",
|
|
389
|
+
"Investigate error → [Search cass for similar errors, Search repo for error handling, Synthesize]",
|
|
390
|
+
"Learn about library → [Search docs, Search examples, Search issues, Synthesize findings]",
|
|
391
|
+
],
|
|
392
|
+
},
|
|
339
393
|
};
|
|
340
394
|
|
|
341
395
|
/**
|
|
@@ -360,13 +414,24 @@ export function selectStrategy(task: string): {
|
|
|
360
414
|
"file-based": 0,
|
|
361
415
|
"feature-based": 0,
|
|
362
416
|
"risk-based": 0,
|
|
417
|
+
"research-based": 0,
|
|
363
418
|
};
|
|
364
419
|
|
|
365
420
|
for (const [strategyName, definition] of Object.entries(STRATEGIES)) {
|
|
366
421
|
const name = strategyName as Exclude<DecompositionStrategy, "auto">;
|
|
367
422
|
for (const keyword of definition.keywords) {
|
|
368
|
-
|
|
369
|
-
|
|
423
|
+
// Use word boundary matching to avoid "debug" matching "bug"
|
|
424
|
+
// For multi-word keywords, just check includes (they're specific enough)
|
|
425
|
+
if (keyword.includes(" ")) {
|
|
426
|
+
if (taskLower.includes(keyword)) {
|
|
427
|
+
scores[name] += 1;
|
|
428
|
+
}
|
|
429
|
+
} else {
|
|
430
|
+
// Single word: use word boundary regex
|
|
431
|
+
const regex = new RegExp(`\\b${keyword}\\b`, "i");
|
|
432
|
+
if (regex.test(taskLower)) {
|
|
433
|
+
scores[name] += 1;
|
|
434
|
+
}
|
|
370
435
|
}
|
|
371
436
|
}
|
|
372
437
|
}
|
|
@@ -1900,7 +1965,7 @@ export const swarm_record_outcome = tool({
|
|
|
1900
1965
|
"Criteria to generate feedback for (default: all default criteria)",
|
|
1901
1966
|
),
|
|
1902
1967
|
strategy: tool.schema
|
|
1903
|
-
.enum(["file-based", "feature-based", "risk-based"])
|
|
1968
|
+
.enum(["file-based", "feature-based", "risk-based", "research-based"])
|
|
1904
1969
|
.optional()
|
|
1905
1970
|
.describe("Decomposition strategy used for this task"),
|
|
1906
1971
|
},
|