From a065a4c30be748b0c8fc6dd0b5ee1dc4d3de4b1c Mon Sep 17 00:00:00 2001 From: Agando Date: Mon, 9 Nov 2026 15:36:23 +0100 Subject: chore(newos4): commit accumulated maintenance output The daily collector and the feedback pipeline had left 57 modified files uncommitted (skills, modules-index, CHANGELOG, feedback decisions, debug counters). The public mirror publishes git HEAD, so without this the published repo stayed behind the tree - and it blocked the publisher outright once uncommitted subtrees started failing loudly. --- skills/agent-optimizer.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 skills/agent-optimizer.json (limited to 'skills/agent-optimizer.json') diff --git a/skills/agent-optimizer.json b/skills/agent-optimizer.json new file mode 100644 index 0000000..9f7e0cd --- /dev/null +++ b/skills/agent-optimizer.json @@ -0,0 +1,15 @@ +{ + "name": "agent-optimizer", + "description": "Optimize agent efficiency by batching tool calls, managing turn limits, and delegating tasks effectively", + "tags": [ + "agent", + "optimization", + "efficiency", + "turn-limit", + "delegation" + ], + "category": "system", + "created": "2026-10-16T16:26:38.912Z", + "updated": "2026-10-16T16:30:38.270Z", + "content": "---\nname: agent-optimizer\ndescription: Optimize agent efficiency by batching tool calls, managing turn limits, and delegating tasks effectively\ntags: [agent, optimization, efficiency, turn-limit, delegation]\ncategory: system\n---\n## Steps\n# Agent Optimizer\n\n**Purpose:** Maximize agent efficiency by minimizing turn usage, batching operations, and intelligently delegating tasks.\n\n---\n\n## Core Principles\n\n1. **Batch Everything:** Combine multiple read/write operations into single tool calls where possible.\n2. **Delegate Wisely:** Split heavy tasks across spawned agents to parallelize work.\n3. **Pre-Empt Limits:** Monitor turn count and trigger delegation before hitting 7/8.\n\n---\n\n## Turn Budget Strategy\n\n| Turns Used | Action |\n|------------|--------|\n| 0-3 | Heavy computation, spawning agents, web fetching |\n| 4-6 | Tool execution, file operations |\n| 7-8 | Finalize, report, cleanup |\n| 9+ | **Delegate immediately** if task not complete |\n\n---\n\n## Efficiency Patterns\n\n### ✅ Do: Batch Reads\n```\nBad: read_file(a) → read_file(b) → read_file(c) [3 turns]\nGood: Use list_files + read multiple files in one response [1 turn]\n```\n\n### ✅ Do: Parallel Agent Spawn\n```\ndelegate_task(\"task A\")\ndelegate_task(\"task B\")\ndelegate_task(\"task C\")\n// All 3 run concurrently\n```\n\n### ✅ Do: Pre-Empt the Limit\n```\nif (turnCount > 6) {\n delegate_task(\"Finish: \" + remainingWork)\n return \"Delegated remaining work to prevent timeout\"\n}\n```\n\n### ❌ Don't: Chain Web Calls\n```\nBad: web_search(x) → web_fetch(url) → web_search(y) [3 turns]\nGood: web_search(x) → web_search(y) in same turn if possible\n```\n\n---\n\n## Turn-Count Awareness\n\n- **Current Limit:** 8 turns (auto-adjusts to 10 if needed)\n- **Warning Threshold:** 7/8 turns — delegate remaining work\n- **Critical Path:** If you're at turn 5 and have >3 tasks left, spawn an agent NOW\n\n---\n\n## Delegation Triggers\n\nDelegate when:\n- [ ] More than 3 independent sub-tasks remain\n- [ ] A sub-task requires >2 tool calls\n- [ ] Current turn count > 5\n- [ ] Task involves external APIs or heavy computation\n\n---\n\n## Quick Reference\n\n```javascript\n// Check turn count (if available in context)\nconst turnsRemaining = maxTurns - currentTurn;\n\n// Always end with summary if at turn 7+\nif (turnsRemaining <= 1) {\n delegate_task(\"Complete: \" + remainingGoal);\n return \"Delegated. Summary: [what was done]\";\n}\n```\n\n---\n\n## Related Skills\n\n- `loop-lesson-*` — Past anomalies and auto-adjustments\n- `agent-orchestration` — Advanced multi-agent patterns\n" +} \ No newline at end of file -- cgit v1.2.3