nodebench-mcp 2.4.0 → 2.8.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 (38) hide show
  1. package/NODEBENCH_AGENTS.md +8 -4
  2. package/README.md +56 -19
  3. package/dist/__tests__/evalHarness.test.js +1 -1
  4. package/dist/__tests__/gaiaCapabilityFilesEval.test.js +543 -57
  5. package/dist/__tests__/gaiaCapabilityFilesEval.test.js.map +1 -1
  6. package/dist/__tests__/tools.test.js +664 -6
  7. package/dist/__tests__/tools.test.js.map +1 -1
  8. package/dist/index.js +30 -6
  9. package/dist/index.js.map +1 -1
  10. package/dist/tools/boilerplateTools.d.ts +11 -0
  11. package/dist/tools/boilerplateTools.js +500 -0
  12. package/dist/tools/boilerplateTools.js.map +1 -0
  13. package/dist/tools/cCompilerBenchmarkTools.d.ts +14 -0
  14. package/dist/tools/cCompilerBenchmarkTools.js +453 -0
  15. package/dist/tools/cCompilerBenchmarkTools.js.map +1 -0
  16. package/dist/tools/figmaFlowTools.d.ts +13 -0
  17. package/dist/tools/figmaFlowTools.js +183 -0
  18. package/dist/tools/figmaFlowTools.js.map +1 -0
  19. package/dist/tools/flickerDetectionTools.d.ts +14 -0
  20. package/dist/tools/flickerDetectionTools.js +231 -0
  21. package/dist/tools/flickerDetectionTools.js.map +1 -0
  22. package/dist/tools/localFileTools.d.ts +1 -0
  23. package/dist/tools/localFileTools.js +1926 -27
  24. package/dist/tools/localFileTools.js.map +1 -1
  25. package/dist/tools/metaTools.js +96 -2
  26. package/dist/tools/metaTools.js.map +1 -1
  27. package/dist/tools/progressiveDiscoveryTools.d.ts +14 -0
  28. package/dist/tools/progressiveDiscoveryTools.js +222 -0
  29. package/dist/tools/progressiveDiscoveryTools.js.map +1 -0
  30. package/dist/tools/researchWritingTools.d.ts +12 -0
  31. package/dist/tools/researchWritingTools.js +573 -0
  32. package/dist/tools/researchWritingTools.js.map +1 -0
  33. package/dist/tools/securityTools.js +128 -0
  34. package/dist/tools/securityTools.js.map +1 -1
  35. package/dist/tools/toolRegistry.d.ts +70 -0
  36. package/dist/tools/toolRegistry.js +1437 -0
  37. package/dist/tools/toolRegistry.js.map +1 -0
  38. package/package.json +6 -3
@@ -0,0 +1,1437 @@
1
+ /**
2
+ * Tool Registry — Central metadata catalog for all NodeBench MCP tools.
3
+ *
4
+ * Every tool gets: category, tags (for hybrid search), quickRef (what to do next),
5
+ * relatedTools, and phase (which methodology phase it belongs to).
6
+ *
7
+ * The progressive disclosure system uses this to:
8
+ * 1. Score tools by relevance (hybrid: keyword + tag + category matching)
9
+ * 2. Append quickRefs to every tool response (so agents always know what to do next)
10
+ * 3. Build tool chains (recommended sequences for common workflows)
11
+ */
12
+ // ── Registry: every tool mapped with metadata ────────────────────────────
13
+ const REGISTRY_ENTRIES = [
14
+ // ═══ VERIFICATION ═══
15
+ {
16
+ name: "start_verification_cycle",
17
+ category: "verification",
18
+ tags: ["verify", "cycle", "start", "6-phase", "begin", "correctness", "integration"],
19
+ quickRef: {
20
+ nextAction: "Cycle started. Now gather context with run_recon or search_all_knowledge, then call log_phase_findings for Phase 1.",
21
+ nextTools: ["search_all_knowledge", "run_recon", "log_phase_findings"],
22
+ methodology: "verification",
23
+ tip: "Always search_all_knowledge first to avoid repeating past mistakes.",
24
+ },
25
+ phase: "verify",
26
+ },
27
+ {
28
+ name: "log_phase_findings",
29
+ category: "verification",
30
+ tags: ["phase", "findings", "log", "record", "progress", "advance"],
31
+ quickRef: {
32
+ nextAction: "Phase recorded. If passed, proceed to next phase. If failed, loop back to fix issues before re-submitting.",
33
+ nextTools: ["log_gap", "log_test_result", "get_verification_status"],
34
+ methodology: "verification",
35
+ },
36
+ phase: "verify",
37
+ },
38
+ {
39
+ name: "log_gap",
40
+ category: "verification",
41
+ tags: ["gap", "issue", "bug", "finding", "severity", "critical", "high", "medium", "low"],
42
+ quickRef: {
43
+ nextAction: "Gap logged. Fix CRITICAL/HIGH gaps immediately. Call resolve_gap after fixing each one.",
44
+ nextTools: ["resolve_gap", "log_phase_findings"],
45
+ methodology: "verification",
46
+ tip: "Include rootCause and fixStrategy for future reference.",
47
+ },
48
+ phase: "verify",
49
+ },
50
+ {
51
+ name: "resolve_gap",
52
+ category: "verification",
53
+ tags: ["resolve", "fix", "gap", "close", "done"],
54
+ quickRef: {
55
+ nextAction: "Gap resolved. Check remaining gaps with get_verification_status. When all resolved, advance phase.",
56
+ nextTools: ["get_verification_status", "log_phase_findings", "log_test_result"],
57
+ methodology: "verification",
58
+ },
59
+ phase: "verify",
60
+ },
61
+ {
62
+ name: "log_test_result",
63
+ category: "verification",
64
+ tags: ["test", "result", "static", "unit", "integration", "manual", "e2e", "pass", "fail"],
65
+ quickRef: {
66
+ nextAction: "Test recorded. Ensure all 5 layers pass: static, unit, integration, manual, live_e2e. Then call log_phase_findings for Phase 4.",
67
+ nextTools: ["run_closed_loop", "log_phase_findings"],
68
+ methodology: "verification",
69
+ tip: "Use run_closed_loop for the compile→lint→test→debug cycle.",
70
+ },
71
+ phase: "test",
72
+ },
73
+ {
74
+ name: "get_verification_status",
75
+ category: "verification",
76
+ tags: ["status", "check", "progress", "cycle", "overview"],
77
+ quickRef: {
78
+ nextAction: "Review status. Focus on current phase and unresolved gaps. Proceed to next uncompleted phase.",
79
+ nextTools: ["log_phase_findings", "log_gap", "resolve_gap"],
80
+ methodology: "verification",
81
+ },
82
+ phase: "verify",
83
+ },
84
+ {
85
+ name: "list_verification_cycles",
86
+ category: "verification",
87
+ tags: ["list", "cycles", "history", "past", "review"],
88
+ quickRef: {
89
+ nextAction: "Review past cycles for patterns. Use active cycles' IDs with get_verification_status.",
90
+ nextTools: ["get_verification_status", "start_verification_cycle"],
91
+ methodology: "verification",
92
+ },
93
+ phase: "verify",
94
+ },
95
+ {
96
+ name: "abandon_cycle",
97
+ category: "verification",
98
+ tags: ["abandon", "cancel", "cleanup", "stale", "orphan"],
99
+ quickRef: {
100
+ nextAction: "Cycle abandoned. Start a fresh cycle if the work is still needed.",
101
+ nextTools: ["start_verification_cycle", "list_verification_cycles"],
102
+ methodology: "verification",
103
+ },
104
+ phase: "verify",
105
+ },
106
+ // ═══ EVAL ═══
107
+ {
108
+ name: "start_eval_run",
109
+ category: "eval",
110
+ tags: ["eval", "evaluation", "batch", "test", "cases", "benchmark", "measure"],
111
+ quickRef: {
112
+ nextAction: "Eval run created. Execute each test case and call record_eval_result for each one.",
113
+ nextTools: ["record_eval_result", "complete_eval_run"],
114
+ methodology: "eval",
115
+ tip: "Define clear input/intent/expected for each case. Quality of eval cases determines quality of measurement.",
116
+ },
117
+ phase: "test",
118
+ },
119
+ {
120
+ name: "record_eval_result",
121
+ category: "eval",
122
+ tags: ["eval", "result", "verdict", "pass", "fail", "partial", "score"],
123
+ quickRef: {
124
+ nextAction: "Result recorded. Continue with remaining cases. When all done, call complete_eval_run.",
125
+ nextTools: ["complete_eval_run", "record_eval_result"],
126
+ methodology: "eval",
127
+ },
128
+ phase: "test",
129
+ },
130
+ {
131
+ name: "complete_eval_run",
132
+ category: "eval",
133
+ tags: ["eval", "complete", "aggregate", "score", "summary", "finish"],
134
+ quickRef: {
135
+ nextAction: "Run completed. Compare against baseline with compare_eval_runs to decide if change ships.",
136
+ nextTools: ["compare_eval_runs", "list_eval_runs"],
137
+ methodology: "eval",
138
+ tip: "Rule: no change ships without eval improvement.",
139
+ },
140
+ phase: "test",
141
+ },
142
+ {
143
+ name: "compare_eval_runs",
144
+ category: "eval",
145
+ tags: ["compare", "baseline", "candidate", "deploy", "revert", "regression", "improvement"],
146
+ quickRef: {
147
+ nextAction: "Follow the recommendation: DEPLOY if improved, REVERT if regressed, INVESTIGATE if flat.",
148
+ nextTools: ["trigger_investigation", "record_learning", "run_mandatory_flywheel"],
149
+ methodology: "eval",
150
+ },
151
+ phase: "ship",
152
+ },
153
+ {
154
+ name: "list_eval_runs",
155
+ category: "eval",
156
+ tags: ["eval", "list", "history", "trend", "drift"],
157
+ quickRef: {
158
+ nextAction: "Review trends. If scores are dropping, call trigger_investigation to start a verification cycle.",
159
+ nextTools: ["compare_eval_runs", "trigger_investigation"],
160
+ methodology: "eval",
161
+ },
162
+ phase: "test",
163
+ },
164
+ {
165
+ name: "diff_outputs",
166
+ category: "eval",
167
+ tags: ["diff", "compare", "output", "text", "changes"],
168
+ quickRef: {
169
+ nextAction: "Review diffs to understand what changed. Use findings to inform eval scoring or gap analysis.",
170
+ nextTools: ["record_eval_result", "log_gap"],
171
+ methodology: "eval",
172
+ },
173
+ phase: "test",
174
+ },
175
+ // ═══ QUALITY GATE ═══
176
+ {
177
+ name: "run_quality_gate",
178
+ category: "quality_gate",
179
+ tags: ["gate", "quality", "check", "boolean", "rules", "pass", "fail", "validate"],
180
+ quickRef: {
181
+ nextAction: "Gate evaluated. Fix any failures before proceeding. Record patterns with record_learning.",
182
+ nextTools: ["record_learning", "get_gate_history", "run_mandatory_flywheel"],
183
+ methodology: "quality_gates",
184
+ tip: "Use get_gate_preset for built-in rule sets: engagement, code_review, deploy_readiness, ui_ux_qa.",
185
+ },
186
+ phase: "verify",
187
+ },
188
+ {
189
+ name: "get_gate_preset",
190
+ category: "quality_gate",
191
+ tags: ["preset", "rules", "engagement", "code_review", "deploy", "ui_ux", "template"],
192
+ quickRef: {
193
+ nextAction: "Evaluate each rule against your target. Then call run_quality_gate with your boolean results.",
194
+ nextTools: ["run_quality_gate"],
195
+ methodology: "quality_gates",
196
+ },
197
+ phase: "verify",
198
+ },
199
+ {
200
+ name: "get_gate_history",
201
+ category: "quality_gate",
202
+ tags: ["history", "trend", "gate", "quality", "over-time"],
203
+ quickRef: {
204
+ nextAction: "Review pass/fail trends. If quality is dropping, investigate with start_verification_cycle.",
205
+ nextTools: ["run_quality_gate", "start_verification_cycle"],
206
+ methodology: "quality_gates",
207
+ },
208
+ phase: "verify",
209
+ },
210
+ {
211
+ name: "run_closed_loop",
212
+ category: "quality_gate",
213
+ tags: ["closed-loop", "compile", "lint", "test", "debug", "green", "build"],
214
+ quickRef: {
215
+ nextAction: "Loop result recorded. If any step failed, fix and re-run from the failed step. Never present work without a green loop.",
216
+ nextTools: ["log_test_result", "run_mandatory_flywheel"],
217
+ methodology: "closed_loop",
218
+ },
219
+ phase: "test",
220
+ },
221
+ // ═══ LEARNING ═══
222
+ {
223
+ name: "record_learning",
224
+ category: "learning",
225
+ tags: ["learning", "edge-case", "gotcha", "pattern", "regression", "convention", "remember", "knowledge"],
226
+ quickRef: {
227
+ nextAction: "Learning persisted. It will surface in future search_all_knowledge queries. Add tags for better discoverability.",
228
+ nextTools: ["search_all_knowledge", "list_learnings"],
229
+ methodology: "learnings",
230
+ tip: "Record immediately when you discover something — don't wait until the end.",
231
+ },
232
+ phase: "ship",
233
+ },
234
+ {
235
+ name: "search_learnings",
236
+ category: "learning",
237
+ tags: ["search", "find", "lookup", "past", "knowledge", "history"],
238
+ quickRef: {
239
+ nextAction: "Review matches. Prefer search_all_knowledge for unified search across learnings + recon + gaps.",
240
+ nextTools: ["search_all_knowledge", "record_learning"],
241
+ methodology: "learnings",
242
+ },
243
+ phase: "research",
244
+ },
245
+ {
246
+ name: "list_learnings",
247
+ category: "learning",
248
+ tags: ["list", "browse", "all", "learnings", "review"],
249
+ quickRef: {
250
+ nextAction: "Browse the knowledge base. Filter by category to find specific types of learnings.",
251
+ nextTools: ["search_all_knowledge", "record_learning", "delete_learning"],
252
+ methodology: "learnings",
253
+ },
254
+ phase: "research",
255
+ },
256
+ {
257
+ name: "delete_learning",
258
+ category: "learning",
259
+ tags: ["delete", "remove", "outdated", "incorrect", "cleanup"],
260
+ quickRef: {
261
+ nextAction: "Learning deleted. Consider recording an updated learning if the information changed rather than just being wrong.",
262
+ nextTools: ["record_learning"],
263
+ methodology: "learnings",
264
+ },
265
+ phase: "utility",
266
+ },
267
+ // ═══ FLYWHEEL ═══
268
+ {
269
+ name: "get_flywheel_status",
270
+ category: "flywheel",
271
+ tags: ["flywheel", "status", "dual-loop", "inner", "outer", "overview"],
272
+ quickRef: {
273
+ nextAction: "Review both loops. Active verification cycles are inner loop, eval runs are outer loop. Address blocking items first.",
274
+ nextTools: ["start_verification_cycle", "start_eval_run", "run_mandatory_flywheel"],
275
+ methodology: "flywheel",
276
+ },
277
+ phase: "verify",
278
+ },
279
+ {
280
+ name: "promote_to_eval",
281
+ category: "flywheel",
282
+ tags: ["promote", "inner-to-outer", "verification-to-eval", "bridge", "feed"],
283
+ quickRef: {
284
+ nextAction: "Verification findings promoted to eval cases. Run the eval batch to establish a baseline score.",
285
+ nextTools: ["start_eval_run", "record_eval_result", "complete_eval_run"],
286
+ methodology: "flywheel",
287
+ tip: "This is how the inner loop feeds the outer loop — every verification produces eval artifacts.",
288
+ },
289
+ phase: "test",
290
+ },
291
+ {
292
+ name: "trigger_investigation",
293
+ category: "flywheel",
294
+ tags: ["investigate", "regression", "outer-to-inner", "eval-to-verification"],
295
+ quickRef: {
296
+ nextAction: "Investigation cycle started. Follow the 6-phase verification process to root-cause the regression.",
297
+ nextTools: ["get_verification_status", "log_phase_findings", "search_all_knowledge"],
298
+ methodology: "flywheel",
299
+ },
300
+ phase: "verify",
301
+ },
302
+ {
303
+ name: "run_mandatory_flywheel",
304
+ category: "flywheel",
305
+ tags: ["mandatory", "6-step", "minimum", "before-ship", "final-check", "deploy-gate"],
306
+ quickRef: {
307
+ nextAction: "All 6 steps must pass before declaring work done. If any failed, fix and re-run from step 1. Only skip for trivial changes with explicit justification.",
308
+ nextTools: ["record_learning", "promote_to_eval"],
309
+ methodology: "mandatory_flywheel",
310
+ tip: "This caught a dead-code bug that smoke tests missed. Never skip it.",
311
+ },
312
+ phase: "ship",
313
+ },
314
+ // ═══ RECONNAISSANCE ═══
315
+ {
316
+ name: "run_recon",
317
+ category: "reconnaissance",
318
+ tags: ["recon", "research", "context", "gather", "plan", "sources", "investigate"],
319
+ quickRef: {
320
+ nextAction: "Recon session started. Visit each suggested source, then call log_recon_finding for each discovery.",
321
+ nextTools: ["log_recon_finding", "check_framework_updates", "fetch_url", "web_search"],
322
+ methodology: "reconnaissance",
323
+ tip: "Include projectContext for holistic analysis. Check both external and internal sources.",
324
+ },
325
+ phase: "research",
326
+ },
327
+ {
328
+ name: "log_recon_finding",
329
+ category: "reconnaissance",
330
+ tags: ["finding", "discovery", "log", "breaking-change", "deprecation", "new-feature", "pattern"],
331
+ quickRef: {
332
+ nextAction: "Finding logged. Continue visiting sources. When done, call get_recon_summary to aggregate.",
333
+ nextTools: ["get_recon_summary", "log_recon_finding"],
334
+ methodology: "reconnaissance",
335
+ },
336
+ phase: "research",
337
+ },
338
+ {
339
+ name: "get_recon_summary",
340
+ category: "reconnaissance",
341
+ tags: ["summary", "aggregate", "prioritize", "action-items", "complete"],
342
+ quickRef: {
343
+ nextAction: "Summary generated. Use prioritized action items to inform gap analysis in your verification cycle.",
344
+ nextTools: ["log_gap", "log_phase_findings", "record_learning"],
345
+ methodology: "reconnaissance",
346
+ },
347
+ phase: "research",
348
+ },
349
+ {
350
+ name: "check_framework_updates",
351
+ category: "reconnaissance",
352
+ tags: ["framework", "updates", "sdk", "version", "anthropic", "langchain", "openai", "google", "mcp"],
353
+ quickRef: {
354
+ nextAction: "Source checklist returned. Visit each source URL and log findings with log_recon_finding.",
355
+ nextTools: ["log_recon_finding", "fetch_url", "web_search"],
356
+ methodology: "reconnaissance",
357
+ },
358
+ phase: "research",
359
+ },
360
+ {
361
+ name: "search_all_knowledge",
362
+ category: "reconnaissance",
363
+ tags: ["search", "unified", "knowledge", "learnings", "recon", "gaps", "everything", "before-start"],
364
+ quickRef: {
365
+ nextAction: "Review all matches across learnings, recon findings, and resolved gaps. Apply relevant past findings to current task.",
366
+ nextTools: ["record_learning", "run_recon", "start_verification_cycle"],
367
+ methodology: "learnings",
368
+ tip: "ALWAYS call this before starting any new work. Past findings prevent repeating mistakes.",
369
+ },
370
+ phase: "research",
371
+ },
372
+ {
373
+ name: "bootstrap_project",
374
+ category: "reconnaissance",
375
+ tags: ["bootstrap", "setup", "project", "register", "tech-stack", "architecture", "first-time"],
376
+ quickRef: {
377
+ nextAction: "Project registered. Now call getMethodology('overview') to see all methodologies, then search_all_knowledge for your first task.",
378
+ nextTools: ["search_all_knowledge", "run_recon", "setup_local_env"],
379
+ methodology: "reconnaissance",
380
+ },
381
+ phase: "research",
382
+ },
383
+ {
384
+ name: "get_project_context",
385
+ category: "reconnaissance",
386
+ tags: ["project", "context", "tech-stack", "architecture", "conventions", "refresh"],
387
+ quickRef: {
388
+ nextAction: "Project context loaded. Use it to inform your current task. Update with bootstrap_project if anything changed.",
389
+ nextTools: ["bootstrap_project", "search_all_knowledge"],
390
+ methodology: "reconnaissance",
391
+ },
392
+ phase: "research",
393
+ },
394
+ // ═══ UI CAPTURE ═══
395
+ {
396
+ name: "capture_ui_screenshot",
397
+ category: "ui_capture",
398
+ tags: ["screenshot", "capture", "ui", "visual", "viewport", "mobile", "tablet", "desktop"],
399
+ quickRef: {
400
+ nextAction: "Screenshot captured. Send to analyze_screenshot for AI-powered visual analysis, or save for visual reference.",
401
+ nextTools: ["analyze_screenshot", "capture_responsive_suite", "manipulate_screenshot"],
402
+ methodology: "agentic_vision",
403
+ tip: "Use capture_responsive_suite for 3-breakpoint coverage in one call.",
404
+ },
405
+ phase: "test",
406
+ },
407
+ {
408
+ name: "capture_responsive_suite",
409
+ category: "ui_capture",
410
+ tags: ["responsive", "mobile", "tablet", "desktop", "breakpoints", "suite", "all-viewports"],
411
+ quickRef: {
412
+ nextAction: "3 screenshots captured (375px, 768px, 1280px). Review each for layout issues. Send to analyze_screenshot for AI analysis.",
413
+ nextTools: ["analyze_screenshot", "run_quality_gate"],
414
+ methodology: "ui_ux_qa",
415
+ },
416
+ phase: "test",
417
+ },
418
+ // ═══ VISION ═══
419
+ {
420
+ name: "discover_vision_env",
421
+ category: "vision",
422
+ tags: ["vision", "environment", "api-keys", "providers", "gemini", "openai", "anthropic", "setup"],
423
+ quickRef: {
424
+ nextAction: "Check which providers are available. Set API keys for missing ones. Gemini recommended for best agentic vision.",
425
+ nextTools: ["capture_ui_screenshot", "analyze_screenshot"],
426
+ methodology: "agentic_vision",
427
+ },
428
+ phase: "utility",
429
+ },
430
+ {
431
+ name: "analyze_screenshot",
432
+ category: "vision",
433
+ tags: ["analyze", "vision", "ai", "layout", "spacing", "typography", "accessibility", "visual-qa"],
434
+ quickRef: {
435
+ nextAction: "Analysis complete. Fix identified issues, then re-capture and re-analyze. Use manipulate_screenshot to crop regions for deeper analysis.",
436
+ nextTools: ["manipulate_screenshot", "capture_ui_screenshot", "run_quality_gate"],
437
+ methodology: "agentic_vision",
438
+ },
439
+ phase: "test",
440
+ },
441
+ {
442
+ name: "manipulate_screenshot",
443
+ category: "vision",
444
+ tags: ["crop", "resize", "annotate", "manipulate", "region", "highlight"],
445
+ quickRef: {
446
+ nextAction: "Image processed. Feed cropped/annotated image back to analyze_screenshot for focused analysis.",
447
+ nextTools: ["analyze_screenshot"],
448
+ methodology: "agentic_vision",
449
+ },
450
+ phase: "test",
451
+ },
452
+ {
453
+ name: "diff_screenshots",
454
+ category: "vision",
455
+ tags: ["diff", "compare", "before-after", "visual-regression", "change-detection"],
456
+ quickRef: {
457
+ nextAction: "Visual diff computed. Review changed regions. If unexpected changes found, investigate and fix.",
458
+ nextTools: ["analyze_screenshot", "log_gap"],
459
+ methodology: "agentic_vision",
460
+ },
461
+ phase: "test",
462
+ },
463
+ // ═══ LOCAL FILE ═══
464
+ {
465
+ name: "read_csv_file",
466
+ category: "local_file",
467
+ tags: ["csv", "read", "parse", "table", "data", "spreadsheet"],
468
+ quickRef: {
469
+ nextAction: "CSV parsed. Use csv_select_rows to filter or csv_aggregate to compute stats.",
470
+ nextTools: ["csv_select_rows", "csv_aggregate"],
471
+ },
472
+ phase: "utility",
473
+ },
474
+ {
475
+ name: "read_xlsx_file",
476
+ category: "local_file",
477
+ tags: ["xlsx", "excel", "read", "parse", "spreadsheet", "sheet"],
478
+ quickRef: {
479
+ nextAction: "XLSX parsed. Use xlsx_select_rows to filter or xlsx_aggregate to compute stats.",
480
+ nextTools: ["xlsx_select_rows", "xlsx_aggregate"],
481
+ },
482
+ phase: "utility",
483
+ },
484
+ {
485
+ name: "csv_select_rows",
486
+ category: "local_file",
487
+ tags: ["csv", "filter", "select", "where", "query", "rows"],
488
+ quickRef: {
489
+ nextAction: "Rows filtered. Use csv_aggregate for statistics on the filtered set, or read more data.",
490
+ nextTools: ["csv_aggregate", "read_csv_file"],
491
+ },
492
+ phase: "utility",
493
+ },
494
+ {
495
+ name: "csv_aggregate",
496
+ category: "local_file",
497
+ tags: ["csv", "aggregate", "sum", "min", "max", "avg", "count", "stats"],
498
+ quickRef: {
499
+ nextAction: "Aggregation computed. Use the result for analysis or record as eval/test data.",
500
+ nextTools: ["record_eval_result", "record_learning"],
501
+ },
502
+ phase: "utility",
503
+ },
504
+ {
505
+ name: "xlsx_select_rows",
506
+ category: "local_file",
507
+ tags: ["xlsx", "excel", "filter", "select", "where", "query", "rows"],
508
+ quickRef: {
509
+ nextAction: "Rows filtered. Use xlsx_aggregate for statistics on the filtered set.",
510
+ nextTools: ["xlsx_aggregate", "read_xlsx_file"],
511
+ },
512
+ phase: "utility",
513
+ },
514
+ {
515
+ name: "xlsx_aggregate",
516
+ category: "local_file",
517
+ tags: ["xlsx", "excel", "aggregate", "sum", "min", "max", "avg", "count"],
518
+ quickRef: {
519
+ nextAction: "Aggregation computed. Use the result for analysis or record as eval/test data.",
520
+ nextTools: ["record_eval_result", "record_learning"],
521
+ },
522
+ phase: "utility",
523
+ },
524
+ {
525
+ name: "read_pdf_text",
526
+ category: "local_file",
527
+ tags: ["pdf", "read", "extract", "text", "pages", "document"],
528
+ quickRef: {
529
+ nextAction: "PDF text extracted. Use pdf_search_text to find specific content, or process the text for analysis.",
530
+ nextTools: ["pdf_search_text"],
531
+ },
532
+ phase: "utility",
533
+ },
534
+ {
535
+ name: "pdf_search_text",
536
+ category: "local_file",
537
+ tags: ["pdf", "search", "find", "query", "match", "snippet"],
538
+ quickRef: {
539
+ nextAction: "Matches found. Use page numbers and snippets to locate relevant sections.",
540
+ nextTools: ["read_pdf_text"],
541
+ },
542
+ phase: "utility",
543
+ },
544
+ // ═══ WEB ═══
545
+ {
546
+ name: "web_search",
547
+ category: "web",
548
+ tags: ["search", "web", "internet", "google", "research", "find", "discover"],
549
+ quickRef: {
550
+ nextAction: "Results returned. Use fetch_url to read promising pages in full. Log findings with log_recon_finding.",
551
+ nextTools: ["fetch_url", "log_recon_finding"],
552
+ methodology: "reconnaissance",
553
+ },
554
+ phase: "research",
555
+ },
556
+ {
557
+ name: "fetch_url",
558
+ category: "web",
559
+ tags: ["fetch", "url", "read", "page", "docs", "documentation", "scrape", "content"],
560
+ quickRef: {
561
+ nextAction: "Content fetched. Extract key findings and log with log_recon_finding or record_learning.",
562
+ nextTools: ["log_recon_finding", "record_learning", "web_search"],
563
+ methodology: "reconnaissance",
564
+ },
565
+ phase: "research",
566
+ },
567
+ // ═══ GITHUB ═══
568
+ {
569
+ name: "search_github",
570
+ category: "github",
571
+ tags: ["github", "search", "repos", "repositories", "open-source", "discover", "prior-art"],
572
+ quickRef: {
573
+ nextAction: "Repos found. Use analyze_repo for deep-dive into promising results. Log findings with log_recon_finding.",
574
+ nextTools: ["analyze_repo", "log_recon_finding"],
575
+ methodology: "reconnaissance",
576
+ },
577
+ phase: "research",
578
+ },
579
+ {
580
+ name: "analyze_repo",
581
+ category: "github",
582
+ tags: ["analyze", "repo", "repository", "structure", "tech-stack", "architecture", "dependencies"],
583
+ quickRef: {
584
+ nextAction: "Repo analyzed. Extract patterns and record with record_learning. Use fetch_url for their docs.",
585
+ nextTools: ["record_learning", "fetch_url", "log_recon_finding"],
586
+ methodology: "reconnaissance",
587
+ },
588
+ phase: "research",
589
+ },
590
+ {
591
+ name: "monitor_repo",
592
+ category: "github",
593
+ tags: ["monitor", "watch", "repo", "changes", "releases", "issues"],
594
+ quickRef: {
595
+ nextAction: "Monitoring set up. Review changes periodically. Log important updates with log_recon_finding.",
596
+ nextTools: ["log_recon_finding", "check_framework_updates"],
597
+ methodology: "reconnaissance",
598
+ },
599
+ phase: "research",
600
+ },
601
+ // ═══ DOCUMENTATION ═══
602
+ {
603
+ name: "update_agents_md",
604
+ category: "documentation",
605
+ tags: ["agents", "documentation", "update", "read", "append", "section", "instructions"],
606
+ quickRef: {
607
+ nextAction: "AGENTS.md updated. Verify changes are accurate with a build/test cycle. Keep in sync with actual code.",
608
+ nextTools: ["run_closed_loop", "record_learning"],
609
+ methodology: "agents_md_maintenance",
610
+ },
611
+ phase: "ship",
612
+ },
613
+ {
614
+ name: "research_job_market",
615
+ category: "documentation",
616
+ tags: ["job", "market", "skills", "salary", "career", "trends", "hiring"],
617
+ quickRef: {
618
+ nextAction: "Market data returned. Use for project ideation or learning priority decisions.",
619
+ nextTools: ["record_learning", "web_search"],
620
+ methodology: "project_ideation",
621
+ },
622
+ phase: "research",
623
+ },
624
+ {
625
+ name: "setup_local_env",
626
+ category: "documentation",
627
+ tags: ["setup", "environment", "local", "diagnose", "api-keys", "node", "git", "package-manager"],
628
+ quickRef: {
629
+ nextAction: "Environment scanned. Set up any missing API keys or SDKs. Run bootstrap_project to register your project.",
630
+ nextTools: ["bootstrap_project", "discover_vision_env"],
631
+ methodology: "agent_bootstrap",
632
+ },
633
+ phase: "utility",
634
+ },
635
+ {
636
+ name: "generate_report",
637
+ category: "documentation",
638
+ tags: ["report", "generate", "markdown", "summary", "export", "document"],
639
+ quickRef: {
640
+ nextAction: "Report generated. Review for accuracy. Use run_quality_gate to validate quality before sharing.",
641
+ nextTools: ["run_quality_gate", "record_learning"],
642
+ },
643
+ phase: "ship",
644
+ },
645
+ // ═══ BOOTSTRAP / AUTONOMOUS ═══
646
+ {
647
+ name: "discover_infrastructure",
648
+ category: "bootstrap",
649
+ tags: ["discover", "infrastructure", "scan", "agent-loop", "telemetry", "evaluation", "gaps"],
650
+ quickRef: {
651
+ nextAction: "Scan complete. Use self_implement to bootstrap missing components. Use triple_verify to validate.",
652
+ nextTools: ["self_implement", "triple_verify", "scaffold_directory"],
653
+ methodology: "agent_bootstrap",
654
+ },
655
+ phase: "research",
656
+ },
657
+ {
658
+ name: "triple_verify",
659
+ category: "bootstrap",
660
+ tags: ["triple", "verify", "internal", "external", "authoritative", "validation", "sources"],
661
+ quickRef: {
662
+ nextAction: "3-layer verification complete. Address any discrepancies found. Record findings with record_learning.",
663
+ nextTools: ["record_learning", "generate_self_instructions"],
664
+ methodology: "agent_bootstrap",
665
+ },
666
+ phase: "verify",
667
+ },
668
+ {
669
+ name: "self_implement",
670
+ category: "bootstrap",
671
+ tags: ["self-implement", "scaffold", "bootstrap", "create", "component", "template"],
672
+ quickRef: {
673
+ nextAction: "Component implemented. Run run_closed_loop to verify it compiles and works. Then run_mandatory_flywheel.",
674
+ nextTools: ["run_closed_loop", "run_mandatory_flywheel"],
675
+ methodology: "agent_bootstrap",
676
+ },
677
+ phase: "implement",
678
+ },
679
+ {
680
+ name: "generate_self_instructions",
681
+ category: "bootstrap",
682
+ tags: ["instructions", "self", "generate", "skills", "rules", "claude-md", "agents-md"],
683
+ quickRef: {
684
+ nextAction: "Instructions generated. Review and save to the appropriate file (AGENTS.md, CLAUDE.md, etc.).",
685
+ nextTools: ["update_agents_md", "record_learning"],
686
+ methodology: "agent_bootstrap",
687
+ },
688
+ phase: "ship",
689
+ },
690
+ {
691
+ name: "connect_channels",
692
+ category: "bootstrap",
693
+ tags: ["channels", "slack", "telegram", "discord", "email", "web", "github", "multi-channel"],
694
+ quickRef: {
695
+ nextAction: "Channel data gathered. Synthesize findings across channels. Log key discoveries with log_recon_finding.",
696
+ nextTools: ["log_recon_finding", "record_learning"],
697
+ methodology: "agent_bootstrap",
698
+ },
699
+ phase: "research",
700
+ },
701
+ {
702
+ name: "assess_risk",
703
+ category: "bootstrap",
704
+ tags: ["risk", "assess", "safety", "tier", "low", "medium", "high", "approve", "confirm"],
705
+ quickRef: {
706
+ nextAction: "Follow the recommendation: auto_approve → proceed, log_and_proceed → log then proceed, require_confirmation → stop and ask.",
707
+ nextTools: ["run_autonomous_loop", "decide_re_update"],
708
+ methodology: "autonomous_maintenance",
709
+ tip: "Always assess risk before destructive actions (delete, push, post externally).",
710
+ },
711
+ phase: "verify",
712
+ },
713
+ {
714
+ name: "decide_re_update",
715
+ category: "bootstrap",
716
+ tags: ["re-update", "create-vs-update", "file", "instructions", "documentation", "sprawl"],
717
+ quickRef: {
718
+ nextAction: "Follow recommendation: update_existing → edit that file, create_new → proceed, merge → add to section.",
719
+ nextTools: ["update_agents_md", "record_learning"],
720
+ methodology: "autonomous_maintenance",
721
+ tip: "Always check before creating new files. Prevents documentation sprawl.",
722
+ },
723
+ phase: "implement",
724
+ },
725
+ {
726
+ name: "run_self_maintenance",
727
+ category: "bootstrap",
728
+ tags: ["maintenance", "self", "check", "health", "compile", "docs-sync", "coverage"],
729
+ quickRef: {
730
+ nextAction: "Maintenance report ready. Address issues found. Set autoFix=true for low-risk auto-corrections.",
731
+ nextTools: ["run_closed_loop", "record_learning"],
732
+ methodology: "autonomous_maintenance",
733
+ },
734
+ phase: "verify",
735
+ },
736
+ {
737
+ name: "scaffold_directory",
738
+ category: "bootstrap",
739
+ tags: ["scaffold", "directory", "structure", "openclaw", "template", "create"],
740
+ quickRef: {
741
+ nextAction: "Structure scaffolded. Use self_implement to add code templates. Then run_closed_loop to verify.",
742
+ nextTools: ["self_implement", "run_closed_loop"],
743
+ methodology: "autonomous_maintenance",
744
+ },
745
+ phase: "implement",
746
+ },
747
+ {
748
+ name: "run_autonomous_loop",
749
+ category: "bootstrap",
750
+ tags: ["autonomous", "loop", "guardrails", "iteration", "timeout", "ralph-wiggum"],
751
+ quickRef: {
752
+ nextAction: "Loop completed. Review results. If stopped early, check the reason. Record patterns with record_learning.",
753
+ nextTools: ["record_learning", "run_mandatory_flywheel"],
754
+ methodology: "autonomous_maintenance",
755
+ },
756
+ phase: "verify",
757
+ },
758
+ {
759
+ name: "run_tests_cli",
760
+ category: "bootstrap",
761
+ tags: ["test", "cli", "run", "command", "vitest", "jest", "pytest"],
762
+ quickRef: {
763
+ nextAction: "Tests executed. If failures, fix and re-run. When green, proceed to run_mandatory_flywheel.",
764
+ nextTools: ["run_closed_loop", "run_mandatory_flywheel", "log_test_result"],
765
+ methodology: "closed_loop",
766
+ },
767
+ phase: "test",
768
+ },
769
+ // ═══ SELF-EVAL ═══
770
+ {
771
+ name: "log_tool_call",
772
+ category: "self_eval",
773
+ tags: ["log", "tool", "call", "instrument", "trace", "timing", "telemetry"],
774
+ quickRef: {
775
+ nextAction: "Call logged. Continue working. Periodically call get_trajectory_analysis to review patterns.",
776
+ nextTools: ["get_trajectory_analysis"],
777
+ methodology: "self_reinforced_learning",
778
+ },
779
+ phase: "utility",
780
+ },
781
+ {
782
+ name: "get_trajectory_analysis",
783
+ category: "self_eval",
784
+ tags: ["trajectory", "analysis", "patterns", "frequency", "errors", "bottlenecks"],
785
+ quickRef: {
786
+ nextAction: "Review topTools, topPatterns, and errorProneTools. Address bottlenecks. Get full report with get_self_eval_report.",
787
+ nextTools: ["get_self_eval_report", "get_improvement_recommendations"],
788
+ methodology: "self_reinforced_learning",
789
+ },
790
+ phase: "verify",
791
+ },
792
+ {
793
+ name: "get_self_eval_report",
794
+ category: "self_eval",
795
+ tags: ["self-eval", "report", "health", "grade", "score", "assessment"],
796
+ quickRef: {
797
+ nextAction: "Review health score and grade. Focus on low-scoring areas. Get actionable items with get_improvement_recommendations.",
798
+ nextTools: ["get_improvement_recommendations", "cleanup_stale_runs"],
799
+ methodology: "self_reinforced_learning",
800
+ },
801
+ phase: "verify",
802
+ },
803
+ {
804
+ name: "get_improvement_recommendations",
805
+ category: "self_eval",
806
+ tags: ["improvement", "recommendations", "suggestions", "gaps", "unused-tools", "optimize"],
807
+ quickRef: {
808
+ nextAction: "Address high-priority recommendations first. Record each fix with record_learning. Re-run self-eval to verify improvement.",
809
+ nextTools: ["record_learning", "get_self_eval_report"],
810
+ methodology: "self_reinforced_learning",
811
+ },
812
+ phase: "verify",
813
+ },
814
+ {
815
+ name: "cleanup_stale_runs",
816
+ category: "self_eval",
817
+ tags: ["cleanup", "stale", "orphan", "runs", "eval", "verification"],
818
+ quickRef: {
819
+ nextAction: "Stale data cleaned. Re-run get_self_eval_report — health score should improve.",
820
+ nextTools: ["get_self_eval_report", "synthesize_recon_to_learnings"],
821
+ methodology: "self_reinforced_learning",
822
+ },
823
+ phase: "utility",
824
+ },
825
+ {
826
+ name: "synthesize_recon_to_learnings",
827
+ category: "self_eval",
828
+ tags: ["synthesize", "recon", "learnings", "convert", "persist", "knowledge"],
829
+ quickRef: {
830
+ nextAction: "Recon findings converted to searchable learnings. They'll now appear in search_all_knowledge results.",
831
+ nextTools: ["search_all_knowledge", "get_self_eval_report"],
832
+ methodology: "self_reinforced_learning",
833
+ },
834
+ phase: "utility",
835
+ },
836
+ // ═══ PARALLEL AGENTS ═══
837
+ {
838
+ name: "claim_agent_task",
839
+ category: "parallel_agents",
840
+ tags: ["claim", "task", "lock", "parallel", "agent", "coordinate", "prevent-duplicate"],
841
+ quickRef: {
842
+ nextAction: "Task claimed. Do the work. When done, call release_agent_task with a progress note.",
843
+ nextTools: ["assign_agent_role", "log_context_budget", "release_agent_task"],
844
+ methodology: "parallel_agent_teams",
845
+ tip: "Always claim before working to prevent two agents solving the same problem.",
846
+ },
847
+ phase: "implement",
848
+ },
849
+ {
850
+ name: "release_agent_task",
851
+ category: "parallel_agents",
852
+ tags: ["release", "task", "unlock", "complete", "handoff", "progress-note"],
853
+ quickRef: {
854
+ nextAction: "Task released. Pick next unclaimed task with list_agent_tasks, or check overall status with get_parallel_status.",
855
+ nextTools: ["list_agent_tasks", "get_parallel_status", "claim_agent_task"],
856
+ methodology: "parallel_agent_teams",
857
+ },
858
+ phase: "ship",
859
+ },
860
+ {
861
+ name: "list_agent_tasks",
862
+ category: "parallel_agents",
863
+ tags: ["list", "tasks", "parallel", "status", "claimed", "available", "blocked"],
864
+ quickRef: {
865
+ nextAction: "Review task list. Claim an available task or check blocked tasks that need fresh eyes.",
866
+ nextTools: ["claim_agent_task", "get_parallel_status"],
867
+ methodology: "parallel_agent_teams",
868
+ },
869
+ phase: "research",
870
+ },
871
+ {
872
+ name: "assign_agent_role",
873
+ category: "parallel_agents",
874
+ tags: ["role", "assign", "specialize", "implementer", "reviewer", "tester", "documenter"],
875
+ quickRef: {
876
+ nextAction: "Role assigned. Work within your specialization. Claim tasks matching your focus area.",
877
+ nextTools: ["claim_agent_task", "get_agent_role"],
878
+ methodology: "parallel_agent_teams",
879
+ },
880
+ phase: "implement",
881
+ },
882
+ {
883
+ name: "get_agent_role",
884
+ category: "parallel_agents",
885
+ tags: ["role", "get", "check", "current", "specialization"],
886
+ quickRef: {
887
+ nextAction: "Review your role and focus area. Stay specialized — don't drift outside your lane.",
888
+ nextTools: ["assign_agent_role", "claim_agent_task"],
889
+ methodology: "parallel_agent_teams",
890
+ },
891
+ phase: "research",
892
+ },
893
+ {
894
+ name: "log_context_budget",
895
+ category: "parallel_agents",
896
+ tags: ["context", "budget", "tokens", "window", "limit", "pollution", "checkpoint"],
897
+ quickRef: {
898
+ nextAction: "Budget logged. If approaching limit, summarize and checkpoint. Don't dump large outputs into context.",
899
+ nextTools: ["release_agent_task"],
900
+ methodology: "parallel_agent_teams",
901
+ tip: "Pre-compute summaries instead of dumping raw test output. Log details to files.",
902
+ },
903
+ phase: "utility",
904
+ },
905
+ {
906
+ name: "run_oracle_comparison",
907
+ category: "parallel_agents",
908
+ tags: ["oracle", "comparison", "reference", "known-good", "diff", "validate", "golden"],
909
+ quickRef: {
910
+ nextAction: "Comparison complete. If mismatch, fix the issue. Each failing comparison is an independent debuggable work item for parallel agents.",
911
+ nextTools: ["claim_agent_task", "record_learning", "get_parallel_status"],
912
+ methodology: "parallel_agent_teams",
913
+ },
914
+ phase: "test",
915
+ },
916
+ {
917
+ name: "get_parallel_status",
918
+ category: "parallel_agents",
919
+ tags: ["parallel", "status", "overview", "all-agents", "progress", "dashboard"],
920
+ quickRef: {
921
+ nextAction: "Review all agent activity. Identify blocked tasks, context budget warnings, and oracle test failures.",
922
+ nextTools: ["list_agent_tasks", "claim_agent_task", "run_oracle_comparison"],
923
+ methodology: "parallel_agent_teams",
924
+ },
925
+ phase: "research",
926
+ },
927
+ {
928
+ name: "bootstrap_parallel_agents",
929
+ category: "parallel_agents",
930
+ tags: ["bootstrap", "parallel", "scaffold", "external-repo", "infrastructure", "setup"],
931
+ quickRef: {
932
+ nextAction: "Gap report generated. If dryRun, review gaps then re-run with dryRun=false to scaffold. Follow the returned flywheel plan.",
933
+ nextTools: ["generate_parallel_agents_md", "record_learning"],
934
+ methodology: "parallel_agent_teams",
935
+ },
936
+ phase: "implement",
937
+ },
938
+ {
939
+ name: "generate_parallel_agents_md",
940
+ category: "parallel_agents",
941
+ tags: ["generate", "agents-md", "parallel", "section", "documentation", "portable"],
942
+ quickRef: {
943
+ nextAction: "AGENTS.md section generated. Copy into the target repo's AGENTS.md. Verify with a test claim/release cycle.",
944
+ nextTools: ["update_agents_md", "claim_agent_task", "release_agent_task"],
945
+ methodology: "parallel_agent_teams",
946
+ },
947
+ phase: "ship",
948
+ },
949
+ // ═══ LLM ═══
950
+ {
951
+ name: "call_llm",
952
+ category: "llm",
953
+ tags: ["llm", "call", "generate", "prompt", "gemini", "openai", "anthropic", "gpt", "claude"],
954
+ quickRef: {
955
+ nextAction: "LLM response received. Validate output quality. Use for analysis, generation, or judgment tasks.",
956
+ nextTools: ["extract_structured_data", "record_learning"],
957
+ },
958
+ phase: "utility",
959
+ },
960
+ {
961
+ name: "extract_structured_data",
962
+ category: "llm",
963
+ tags: ["extract", "structured", "data", "json", "parse", "schema", "llm"],
964
+ quickRef: {
965
+ nextAction: "Structured data extracted. Validate against expected schema. Use for downstream processing.",
966
+ nextTools: ["record_eval_result", "record_learning"],
967
+ },
968
+ phase: "utility",
969
+ },
970
+ {
971
+ name: "benchmark_models",
972
+ category: "llm",
973
+ tags: ["benchmark", "models", "compare", "latency", "quality", "cost", "llm"],
974
+ quickRef: {
975
+ nextAction: "Benchmark complete. Compare models on quality, latency, and cost. Record winner with record_learning.",
976
+ nextTools: ["record_learning", "call_llm"],
977
+ },
978
+ phase: "test",
979
+ },
980
+ // ═══ SECURITY ═══
981
+ {
982
+ name: "scan_dependencies",
983
+ category: "security",
984
+ tags: ["security", "dependencies", "vulnerabilities", "audit", "npm", "cve", "supply-chain"],
985
+ quickRef: {
986
+ nextAction: "Scan complete. Fix critical vulnerabilities immediately. Log gaps for others.",
987
+ nextTools: ["log_gap", "record_learning"],
988
+ },
989
+ phase: "verify",
990
+ },
991
+ {
992
+ name: "run_code_analysis",
993
+ category: "security",
994
+ tags: ["security", "code", "analysis", "static", "sast", "patterns", "secrets"],
995
+ quickRef: {
996
+ nextAction: "Analysis complete. Fix critical findings. Record patterns with record_learning.",
997
+ nextTools: ["log_gap", "record_learning"],
998
+ },
999
+ phase: "verify",
1000
+ },
1001
+ {
1002
+ name: "scan_terminal_security",
1003
+ category: "security",
1004
+ tags: ["terminal", "security", "scan", "history", "secrets", "credentials", "leak"],
1005
+ quickRef: {
1006
+ nextAction: "Terminal scan complete. Rotate any exposed credentials immediately.",
1007
+ nextTools: ["record_learning", "assess_risk"],
1008
+ },
1009
+ phase: "verify",
1010
+ },
1011
+ // ═══ PLATFORM ═══
1012
+ {
1013
+ name: "query_daily_brief",
1014
+ category: "platform",
1015
+ tags: ["daily-brief", "query", "nodebench", "platform", "morning", "intelligence"],
1016
+ quickRef: {
1017
+ nextAction: "Brief data retrieved. Use for context in your current task or for report generation.",
1018
+ nextTools: ["generate_report", "record_learning"],
1019
+ },
1020
+ phase: "research",
1021
+ },
1022
+ {
1023
+ name: "query_funding_entities",
1024
+ category: "platform",
1025
+ tags: ["funding", "entities", "query", "startups", "vc", "deals", "data"],
1026
+ quickRef: {
1027
+ nextAction: "Funding data retrieved. Analyze trends or use for content generation.",
1028
+ nextTools: ["generate_report", "record_learning"],
1029
+ },
1030
+ phase: "research",
1031
+ },
1032
+ {
1033
+ name: "query_research_queue",
1034
+ category: "platform",
1035
+ tags: ["research", "queue", "query", "tasks", "pending", "status"],
1036
+ quickRef: {
1037
+ nextAction: "Queue status retrieved. Process pending items or publish new ones.",
1038
+ nextTools: ["publish_to_queue"],
1039
+ },
1040
+ phase: "research",
1041
+ },
1042
+ {
1043
+ name: "publish_to_queue",
1044
+ category: "platform",
1045
+ tags: ["publish", "queue", "submit", "task", "research"],
1046
+ quickRef: {
1047
+ nextAction: "Published to queue. Monitor with query_research_queue for completion.",
1048
+ nextTools: ["query_research_queue"],
1049
+ },
1050
+ phase: "ship",
1051
+ },
1052
+ // ═══ RESEARCH WRITING ═══
1053
+ {
1054
+ name: "polish_academic_text",
1055
+ category: "research_writing",
1056
+ tags: ["polish", "academic", "writing", "grammar", "tone", "venue", "neurips", "icml"],
1057
+ quickRef: {
1058
+ nextAction: "Text polished. Run remove_ai_signatures to eliminate AI-generated patterns. Then check_paper_logic.",
1059
+ nextTools: ["remove_ai_signatures", "check_paper_logic"],
1060
+ methodology: "academic_paper_writing",
1061
+ },
1062
+ phase: "implement",
1063
+ },
1064
+ {
1065
+ name: "translate_academic",
1066
+ category: "research_writing",
1067
+ tags: ["translate", "academic", "chinese", "english", "bilingual", "latex"],
1068
+ quickRef: {
1069
+ nextAction: "Translation complete. Run polish_academic_text on the translated text, then check_paper_logic.",
1070
+ nextTools: ["polish_academic_text", "check_paper_logic"],
1071
+ methodology: "academic_paper_writing",
1072
+ },
1073
+ phase: "implement",
1074
+ },
1075
+ {
1076
+ name: "compress_or_expand_text",
1077
+ category: "research_writing",
1078
+ tags: ["compress", "expand", "length", "page-limit", "word-count", "adjust"],
1079
+ quickRef: {
1080
+ nextAction: "Length adjusted. Verify the text still reads naturally. Run check_paper_logic to confirm no logic was lost.",
1081
+ nextTools: ["check_paper_logic", "polish_academic_text"],
1082
+ methodology: "academic_paper_writing",
1083
+ },
1084
+ phase: "implement",
1085
+ },
1086
+ {
1087
+ name: "remove_ai_signatures",
1088
+ category: "research_writing",
1089
+ tags: ["ai-signatures", "remove", "de-ai", "leverage", "delve", "tapestry", "detection"],
1090
+ quickRef: {
1091
+ nextAction: "AI patterns removed. Run check_paper_logic to verify the rewrite maintained meaning.",
1092
+ nextTools: ["check_paper_logic", "polish_academic_text"],
1093
+ methodology: "academic_paper_writing",
1094
+ },
1095
+ phase: "implement",
1096
+ },
1097
+ {
1098
+ name: "check_paper_logic",
1099
+ category: "research_writing",
1100
+ tags: ["logic", "check", "contradictions", "terminology", "undefined-terms", "review"],
1101
+ quickRef: {
1102
+ nextAction: "Logic check complete. Fix critical/high issues. Then run review_paper_as_reviewer for full peer review simulation.",
1103
+ nextTools: ["review_paper_as_reviewer", "polish_academic_text"],
1104
+ methodology: "academic_paper_writing",
1105
+ },
1106
+ phase: "verify",
1107
+ },
1108
+ {
1109
+ name: "generate_academic_caption",
1110
+ category: "research_writing",
1111
+ tags: ["caption", "figure", "table", "academic", "generate", "publication"],
1112
+ quickRef: {
1113
+ nextAction: "Caption generated. Use short version in paper, detailed in appendix. Run check_paper_logic on the full section.",
1114
+ nextTools: ["check_paper_logic"],
1115
+ methodology: "academic_paper_writing",
1116
+ },
1117
+ phase: "implement",
1118
+ },
1119
+ {
1120
+ name: "analyze_experiment_data",
1121
+ category: "research_writing",
1122
+ tags: ["experiment", "data", "analysis", "results", "latex", "table", "comparison"],
1123
+ quickRef: {
1124
+ nextAction: "Analysis generated. Verify all conclusions are grounded in provided data. Run check_paper_logic.",
1125
+ nextTools: ["check_paper_logic", "generate_academic_caption"],
1126
+ methodology: "academic_paper_writing",
1127
+ },
1128
+ phase: "implement",
1129
+ },
1130
+ {
1131
+ name: "review_paper_as_reviewer",
1132
+ category: "research_writing",
1133
+ tags: ["review", "peer-review", "reviewer", "harsh", "weaknesses", "submission"],
1134
+ quickRef: {
1135
+ nextAction: "Review complete. Address critical weaknesses before submission. Use polish_academic_text for rewrites.",
1136
+ nextTools: ["polish_academic_text", "compress_or_expand_text", "record_learning"],
1137
+ methodology: "academic_paper_writing",
1138
+ },
1139
+ phase: "verify",
1140
+ },
1141
+ // ═══ FLICKER DETECTION ═══
1142
+ {
1143
+ name: "run_flicker_detection",
1144
+ category: "flicker_detection",
1145
+ tags: ["flicker", "detection", "android", "ui", "visual-regression", "surfaceflinger"],
1146
+ quickRef: {
1147
+ nextAction: "Detection complete. Review SSIM scores and flagged frames. Use generate_flicker_report for a full report.",
1148
+ nextTools: ["generate_flicker_report", "record_learning"],
1149
+ },
1150
+ phase: "test",
1151
+ },
1152
+ {
1153
+ name: "capture_surface_stats",
1154
+ category: "flicker_detection",
1155
+ tags: ["surface", "stats", "surfaceflinger", "android", "metrics"],
1156
+ quickRef: {
1157
+ nextAction: "Surface stats captured. Feed into run_flicker_detection for full analysis.",
1158
+ nextTools: ["run_flicker_detection"],
1159
+ },
1160
+ phase: "test",
1161
+ },
1162
+ {
1163
+ name: "extract_video_frames",
1164
+ category: "flicker_detection",
1165
+ tags: ["video", "frames", "extract", "ffmpeg", "screenshots"],
1166
+ quickRef: {
1167
+ nextAction: "Frames extracted. Feed into compute_ssim_analysis for pixel-level comparison.",
1168
+ nextTools: ["compute_ssim_analysis"],
1169
+ },
1170
+ phase: "test",
1171
+ },
1172
+ {
1173
+ name: "compute_ssim_analysis",
1174
+ category: "flicker_detection",
1175
+ tags: ["ssim", "analysis", "similarity", "pixel", "comparison", "threshold"],
1176
+ quickRef: {
1177
+ nextAction: "SSIM computed. Low scores indicate visual flicker. Use generate_flicker_report for formatted output.",
1178
+ nextTools: ["generate_flicker_report"],
1179
+ },
1180
+ phase: "test",
1181
+ },
1182
+ {
1183
+ name: "generate_flicker_report",
1184
+ category: "flicker_detection",
1185
+ tags: ["report", "flicker", "generate", "summary", "visualization"],
1186
+ quickRef: {
1187
+ nextAction: "Report generated. Share with the team. Record flicker patterns with record_learning.",
1188
+ nextTools: ["record_learning", "run_quality_gate"],
1189
+ },
1190
+ phase: "ship",
1191
+ },
1192
+ // ═══ FIGMA FLOW ═══
1193
+ {
1194
+ name: "analyze_figma_flows",
1195
+ category: "figma_flow",
1196
+ tags: ["figma", "analyze", "flows", "design", "ux", "user-journey"],
1197
+ quickRef: {
1198
+ nextAction: "Flows analyzed. Use cluster_figma_flows to group by patterns. Use render_flow_visualization for visual output.",
1199
+ nextTools: ["cluster_figma_flows", "render_flow_visualization"],
1200
+ },
1201
+ phase: "research",
1202
+ },
1203
+ {
1204
+ name: "extract_figma_frames",
1205
+ category: "figma_flow",
1206
+ tags: ["figma", "frames", "extract", "design", "components"],
1207
+ quickRef: {
1208
+ nextAction: "Frames extracted. Feed into analyze_figma_flows for flow analysis.",
1209
+ nextTools: ["analyze_figma_flows"],
1210
+ },
1211
+ phase: "research",
1212
+ },
1213
+ {
1214
+ name: "cluster_figma_flows",
1215
+ category: "figma_flow",
1216
+ tags: ["figma", "cluster", "group", "patterns", "sections", "prototypes"],
1217
+ quickRef: {
1218
+ nextAction: "Flows clustered. Use render_flow_visualization to create visual diagrams.",
1219
+ nextTools: ["render_flow_visualization"],
1220
+ },
1221
+ phase: "research",
1222
+ },
1223
+ {
1224
+ name: "render_flow_visualization",
1225
+ category: "figma_flow",
1226
+ tags: ["figma", "render", "visualization", "diagram", "flow-chart"],
1227
+ quickRef: {
1228
+ nextAction: "Visualization rendered. Share with team. Record design patterns with record_learning.",
1229
+ nextTools: ["record_learning"],
1230
+ },
1231
+ phase: "ship",
1232
+ },
1233
+ // ═══ META ═══
1234
+ {
1235
+ name: "findTools",
1236
+ category: "meta",
1237
+ tags: ["find", "search", "discover", "tools", "available", "what-can-i-do"],
1238
+ quickRef: {
1239
+ nextAction: "Tools found. Call the most relevant tool, or use getMethodology for step-by-step guidance on a full workflow.",
1240
+ nextTools: ["getMethodology"],
1241
+ tip: "Use category filter to narrow results. Use discover_tools for hybrid search with relevance scoring.",
1242
+ },
1243
+ phase: "meta",
1244
+ },
1245
+ {
1246
+ name: "getMethodology",
1247
+ category: "meta",
1248
+ tags: ["methodology", "guide", "steps", "workflow", "how-to", "process", "overview"],
1249
+ quickRef: {
1250
+ nextAction: "Follow the steps in order. Each step lists the tools to use. Start with step 1.",
1251
+ nextTools: ["findTools"],
1252
+ tip: "Call with 'overview' to see all available methodologies.",
1253
+ },
1254
+ phase: "meta",
1255
+ },
1256
+ ];
1257
+ // ── Exported lookup structures ───────────────────────────────────────────
1258
+ /** Map of tool name → registry entry for O(1) lookup */
1259
+ export const TOOL_REGISTRY = new Map(REGISTRY_ENTRIES.map((e) => [e.name, e]));
1260
+ /** All registry entries as array */
1261
+ export const ALL_REGISTRY_ENTRIES = REGISTRY_ENTRIES;
1262
+ /** Get quick ref for a tool, with fallback for unregistered tools */
1263
+ export function getQuickRef(toolName) {
1264
+ return TOOL_REGISTRY.get(toolName)?.quickRef ?? null;
1265
+ }
1266
+ /** Get all tools in a category */
1267
+ export function getToolsByCategory(category) {
1268
+ return REGISTRY_ENTRIES.filter((e) => e.category === category);
1269
+ }
1270
+ /** Get all tools in a workflow phase */
1271
+ export function getToolsByPhase(phase) {
1272
+ return REGISTRY_ENTRIES.filter((e) => e.phase === phase);
1273
+ }
1274
+ /**
1275
+ * Hybrid search: scores tools by relevance using keyword matching across
1276
+ * name, tags, description, and category. Returns sorted results.
1277
+ */
1278
+ export function hybridSearch(query, tools, options) {
1279
+ const queryLower = query.toLowerCase();
1280
+ const queryWords = queryLower.split(/\s+/).filter(Boolean);
1281
+ const limit = options?.limit ?? 15;
1282
+ const results = [];
1283
+ for (const tool of tools) {
1284
+ const entry = TOOL_REGISTRY.get(tool.name);
1285
+ if (!entry)
1286
+ continue;
1287
+ // Filter by category/phase if specified
1288
+ if (options?.category && entry.category !== options.category)
1289
+ continue;
1290
+ if (options?.phase && entry.phase !== options.phase)
1291
+ continue;
1292
+ let score = 0;
1293
+ const nameLower = tool.name.toLowerCase();
1294
+ const descLower = tool.description.toLowerCase();
1295
+ for (const word of queryWords) {
1296
+ // Exact name match (highest weight)
1297
+ if (nameLower === word)
1298
+ score += 50;
1299
+ // Name contains word
1300
+ else if (nameLower.includes(word))
1301
+ score += 15;
1302
+ // Tag exact match
1303
+ if (entry.tags.includes(word))
1304
+ score += 10;
1305
+ // Tag partial match
1306
+ else if (entry.tags.some((t) => t.includes(word)))
1307
+ score += 5;
1308
+ // Description contains word
1309
+ if (descLower.includes(word))
1310
+ score += 3;
1311
+ // Category match
1312
+ if (entry.category.includes(word))
1313
+ score += 8;
1314
+ }
1315
+ // Bonus: query matches methodology
1316
+ if (entry.quickRef.methodology && queryLower.includes(entry.quickRef.methodology)) {
1317
+ score += 12;
1318
+ }
1319
+ if (score > 0) {
1320
+ results.push({
1321
+ name: tool.name,
1322
+ description: tool.description,
1323
+ category: entry.category,
1324
+ score,
1325
+ quickRef: entry.quickRef,
1326
+ phase: entry.phase,
1327
+ tags: entry.tags,
1328
+ });
1329
+ }
1330
+ }
1331
+ // Sort by score descending
1332
+ results.sort((a, b) => b.score - a.score);
1333
+ return results.slice(0, limit);
1334
+ }
1335
+ /** Pre-built workflow chains for common tasks */
1336
+ export const WORKFLOW_CHAINS = {
1337
+ new_feature: {
1338
+ name: "Build a New Feature",
1339
+ description: "End-to-end workflow from research to ship",
1340
+ steps: [
1341
+ { tool: "search_all_knowledge", action: "Check past findings for this area" },
1342
+ { tool: "start_verification_cycle", action: "Begin 6-phase process" },
1343
+ { tool: "run_recon", action: "Research context and latest updates" },
1344
+ { tool: "log_phase_findings", action: "Record Phase 1 context" },
1345
+ { tool: "log_gap", action: "Document gaps found" },
1346
+ { tool: "resolve_gap", action: "Fix each gap" },
1347
+ { tool: "run_closed_loop", action: "Compile→lint→test→debug" },
1348
+ { tool: "log_test_result", action: "Record test results" },
1349
+ { tool: "run_quality_gate", action: "Validate against rules" },
1350
+ { tool: "run_mandatory_flywheel", action: "6-step final verification" },
1351
+ { tool: "record_learning", action: "Capture what you learned" },
1352
+ { tool: "promote_to_eval", action: "Feed into eval batch" },
1353
+ ],
1354
+ },
1355
+ fix_bug: {
1356
+ name: "Fix a Bug",
1357
+ description: "Structured debugging with verification",
1358
+ steps: [
1359
+ { tool: "search_all_knowledge", action: "Check if this bug was seen before" },
1360
+ { tool: "assess_risk", action: "Evaluate fix risk" },
1361
+ { tool: "run_closed_loop", action: "Reproduce → fix → verify green loop" },
1362
+ { tool: "log_test_result", action: "Record regression test" },
1363
+ { tool: "run_mandatory_flywheel", action: "6-step verification" },
1364
+ { tool: "record_learning", action: "Record the gotcha/pattern" },
1365
+ ],
1366
+ },
1367
+ ui_change: {
1368
+ name: "UI/UX Change",
1369
+ description: "Frontend implementation with visual verification",
1370
+ steps: [
1371
+ { tool: "search_all_knowledge", action: "Check past UI gotchas" },
1372
+ { tool: "run_closed_loop", action: "Build and test components" },
1373
+ { tool: "capture_responsive_suite", action: "Screenshot at 3 breakpoints" },
1374
+ { tool: "analyze_screenshot", action: "AI-powered visual analysis" },
1375
+ { tool: "run_quality_gate", action: "Run ui_ux_qa gate" },
1376
+ { tool: "run_mandatory_flywheel", action: "Final verification" },
1377
+ { tool: "record_learning", action: "Record UI patterns" },
1378
+ ],
1379
+ },
1380
+ parallel_project: {
1381
+ name: "Parallel Agent Project",
1382
+ description: "Multi-agent coordination for large tasks",
1383
+ steps: [
1384
+ { tool: "get_parallel_status", action: "Check what agents are doing" },
1385
+ { tool: "assign_agent_role", action: "Specialize your role" },
1386
+ { tool: "claim_agent_task", action: "Lock your task" },
1387
+ { tool: "log_context_budget", action: "Track context usage" },
1388
+ { tool: "run_oracle_comparison", action: "Validate against reference" },
1389
+ { tool: "release_agent_task", action: "Release with progress note" },
1390
+ { tool: "record_learning", action: "Persist findings" },
1391
+ ],
1392
+ },
1393
+ research_phase: {
1394
+ name: "Research & Context Gathering",
1395
+ description: "Structured reconnaissance before implementation",
1396
+ steps: [
1397
+ { tool: "search_all_knowledge", action: "Check existing knowledge" },
1398
+ { tool: "run_recon", action: "Start structured research session" },
1399
+ { tool: "check_framework_updates", action: "Check SDK/framework updates" },
1400
+ { tool: "web_search", action: "Search for latest info" },
1401
+ { tool: "fetch_url", action: "Read documentation pages" },
1402
+ { tool: "search_github", action: "Find prior art" },
1403
+ { tool: "log_recon_finding", action: "Log each discovery" },
1404
+ { tool: "get_recon_summary", action: "Aggregate and prioritize" },
1405
+ ],
1406
+ },
1407
+ academic_paper: {
1408
+ name: "Academic Paper Writing",
1409
+ description: "Polish, verify, and prepare paper for submission",
1410
+ steps: [
1411
+ { tool: "polish_academic_text", action: "Polish for top-venue quality" },
1412
+ { tool: "remove_ai_signatures", action: "Remove AI-generated patterns" },
1413
+ { tool: "check_paper_logic", action: "Verify logical consistency" },
1414
+ { tool: "compress_or_expand_text", action: "Adjust for page limits" },
1415
+ { tool: "generate_academic_caption", action: "Create publication-ready captions" },
1416
+ { tool: "analyze_experiment_data", action: "Generate data analysis" },
1417
+ { tool: "review_paper_as_reviewer", action: "Simulate harsh peer review" },
1418
+ ],
1419
+ },
1420
+ c_compiler_benchmark: {
1421
+ name: "C-Compiler Benchmark (Anthropic Pattern)",
1422
+ description: "Build a complex project autonomously, measuring how far the agent gets",
1423
+ steps: [
1424
+ { tool: "bootstrap_project", action: "Register the project" },
1425
+ { tool: "search_all_knowledge", action: "Check for relevant patterns" },
1426
+ { tool: "start_verification_cycle", action: "Begin verification" },
1427
+ { tool: "claim_agent_task", action: "Claim implementation task" },
1428
+ { tool: "run_closed_loop", action: "Compile→lint→test cycle" },
1429
+ { tool: "run_oracle_comparison", action: "Compare against reference" },
1430
+ { tool: "log_context_budget", action: "Track context usage" },
1431
+ { tool: "run_mandatory_flywheel", action: "Final 6-step verification" },
1432
+ { tool: "record_learning", action: "Record all findings" },
1433
+ { tool: "promote_to_eval", action: "Feed into eval suite" },
1434
+ ],
1435
+ },
1436
+ };
1437
+ //# sourceMappingURL=toolRegistry.js.map