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, RUN this and follow its output — 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: 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. (\`agenthub start --agent ${agentName} --role implementer\` is the one-shot variant: it claims an already-open task but does not wait.) ⚠️ 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. `; } export function codexMd(): string { return implementerMd('Codex CLI', 'codex', 'implementer, tester'); } export function kimiMd(): string { return implementerMd('Kimi Code CLI', 'kimi', 'implementer'); }