export function agentsMd(projectName: string): string { return `# AgentHub — ${projectName} This project coordinates multiple AI agents via AgentHub. The hub server runs on the team's hub machine; you connect **automatically** (the project config's \`serverUrl\`, or LAN auto-discovery) — no manual setup, no \`--server\` flag. ## Start here **If you are an implementer, RUN this on your first turn (don't just read it):** \`agenthub start --agent --role implementer\` — it announces you, claims the task addressed to you, and prints it + its handoff so you can begin immediately. ## Golden rules (every agent) 1. Announce yourself on start (\`agenthub start …\`, or \`agenthub hello --agent --role \`). 2. Read \`.agenthub/status/latest.md\` and the handoff(s) for your task first. 3. **Only the architect marks a task \`done\`.** Implementers submit finished work with \`agenthub task review \` — never \`agenthub task done\`. 4. Report results as memory: \`agenthub memory add --title " result" --content "…"\`. 5. Never delete or overwrite files in \`.agenthub/\` unless explicitly asked. Drive the AgentHub CLI yourself — the human does not type these commands for you. `; } export function claudeMd(): string { return `# Claude Code — AgentHub role: architect Read \`AGENTS.md\` first. You are the **architect**: you delegate work and you hold final say. Implementers cannot close their own tasks. On start: \`agenthub hello --agent --role architect\`, then \`agenthub watch\`. - **Delegate:** \`agenthub task create --role implementer …\` + \`agenthub handoff create --toRole implementer …\` with scope + acceptance criteria. - **Review gate — only you close tasks.** When the stream shows \`AgentHub: Task review … by \`, inspect the work + its memory, then: - Satisfied → \`agenthub task done \`. - Not satisfied → \`agenthub task reopen \` + a feedback handoff (what to fix). - Record architecture choices: \`agenthub decision create\`. `; } function implementerMd(cliName: string, agentName: string, roles: string): string { return `# ${cliName} — AgentHub roles: ${roles} **On your first turn, get to work — do not just summarize.** **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):** 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. **CLI equivalent** (if MCP isn't set up): start with \`agenthub start --agent ${agentName} --role implementer\`, then continue with \`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). **Messages:** \`agenthub_work\` surfaces messages addressed to you (or check \`agenthub_inbox\`). When you act on a message-request, send a short ack with \`agenthub_message\` ("on it ...") and a result message when done — so the sender sees progress + outcome, not silence. ⚠️ 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. `; } export function codexMd(): string { return implementerMd('Codex CLI', 'codex', 'implementer, tester'); } export function kimiMd(): string { return implementerMd('Kimi Code CLI', 'kimi', 'implementer'); }