diff --git a/package.json b/package.json index 34bf32f..8d841c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "agenthub", - "version": "0.7.1", + "version": "0.7.2", "description": "Local coordination layer for AI coding agents", "type": "module", "main": "./dist/index.js", diff --git a/src/cli/index.ts b/src/cli/index.ts index bb165c2..4845b0b 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -115,7 +115,7 @@ async function runRemote(serverUrl: string, fn: () => Promise): Promise', 'AgentHub server URL (env: AGENTHUB_SERVER)'); program diff --git a/src/core/templates.ts b/src/core/templates.ts index 6f34e06..447a354 100644 --- a/src/core/templates.ts +++ b/src/core/templates.ts @@ -43,29 +43,24 @@ On start: \`agenthub hello --agent --role architect\`, then \`agenthub wat function implementerMd(cliName: string, agentName: string, roles: string): string { return `# ${cliName} — AgentHub roles: ${roles} -**On your first turn, RUN this and follow its output — do not just summarize:** +**On your first turn, get to work — do not just summarize.** -\`\`\` -agenthub work --agent ${agentName} --role implementer -\`\`\` - -\`work\` waits until a task addressed to you is ready (newly delegated OR reopened -after review), claims it, and prints the task + its handoff. Then: +**Preferred — the AgentHub MCP tools** (if the \`agenthub\` MCP server is registered): +call **agenthub_work** with \`{ agent: "${agentName}", role: "implementer" }\`. It waits +until a task addressed to you is ready (newly delegated OR reopened after review), +claims it, and returns the task + its handoff. Then: 1. Implement the task. -2. **Submit for review (NOT done):** \`agenthub task review \` - and report: \`agenthub memory add --title " result" --category implementation - --content ""\` -3. **Run \`agenthub work --agent ${agentName} --role implementer\` again** — it blocks - until your next task (or a reopened one) is ready, then auto-claims it. This is - the loop: work → implement → review → work. Run it in the background so the wait - doesn't tie up your turn. +2. **Submit for review (NOT done):** call **agenthub_task_review** \`{ id }\`, and record + what you did with **agenthub_memory_add** \`{ title: " result", content: "…" }\`. +3. Call **agenthub_work** again. Loop: work → implement → review → work. -(\`agenthub start --agent ${agentName} --role implementer\` is the one-shot variant: -it claims an already-open task but does not wait.) +**CLI equivalent** (if MCP isn't set up): \`agenthub work --agent ${agentName} --role implementer\`, +then \`agenthub task review \` + \`agenthub memory add …\`, then \`agenthub work\` again +(run it in the background so the wait doesn't tie up your turn). -⚠️ NEVER run \`agenthub task done\` — only the architect approves and closes tasks. -You drive the AgentHub CLI yourself; the human does not type these commands for you. +⚠️ NEVER close a task yourself (no \`agenthub_task_done\` / \`agenthub task done\`) — only the +architect approves and closes. You drive the tools yourself; the human doesn't type them for you. `; }