From d2dac6c673ac1a44c9c82f6dbd035ce2728c5006 Mon Sep 17 00:00:00 2001 From: ThinkOff Date: Thu, 18 Jun 2026 17:23:53 +0300 Subject: [PATCH] init: emit default AGENTS.md with room-first reporting rule For room-originated tasks, agents must report ownership/progress/blockers/ results back to the GroupMind room, not just narrate in the IDE/CLI, and claim tasks in the room before shared work. init now writes a default AGENTS.md with this rule so new room agents inherit it (ether's room-first standard). Co-Authored-By: Claude Opus 4.8 (1M context) --- bin/cli.mjs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bin/cli.mjs b/bin/cli.mjs index f5d988b..1e12030 100755 --- a/bin/cli.mjs +++ b/bin/cli.mjs @@ -1631,6 +1631,18 @@ async function initIdeConfig(ide, profile = 'balanced') { writeFileSync(outPath, JSON.stringify(preset.config, null, 2) + '\n'); console.log(`Created ${outPath} for ${targetIde}`); console.log(preset.notes); + + // Default room-agent instruction: room-originated tasks must report back to the room, + // not just narrate in the IDE/CLI. Emitted as AGENTS.md so room agents inherit it. + const agentsMdPath = resolve('AGENTS.md'); + if (!existsSync(agentsMdPath)) { + writeFileSync(agentsMdPath, `# Agent instructions + +## Room communication (default) +If a task or message originates from a GroupMind / Ant Farm room, treat that room as the source of truth. Report task ownership, progress, blockers, handoffs, and final results back to the SAME room. Do not leave important status only in the IDE/CLI/workspace. Before starting shared work, claim the task in the room; if another agent already has it, yield instead of duplicating. +`); + console.log(`Created ${agentsMdPath} (default room-agent instruction)`); + } if (!hasClaudeMem) { console.warn('\nâš WARNING: claude-mem is not installed. Hooks will be generated but will fail until you run: npm install -g claude-mem'); }