diff --git a/README.md b/README.md index dbae91d..1b09f5d 100644 --- a/README.md +++ b/README.md @@ -246,7 +246,7 @@ See `SECURITY.md` **Skills:** `anvillm-skills list`, `anvillm-skills load anvillm-communication` -**Examples:** `./workflows/DevReview claude /path` (dev/reviewer loop), `./workflows/Planning kiro /path` (research/eng/editor) +**Examples:** `./bot-templates/DevReview claude /path` (dev/reviewer loop), `./bot-templates/Planning kiro /path` (research/eng/editor) **Pattern:** @@ -258,7 +258,7 @@ echo '{"to":"...","type":"...","subject":"...","body":"..."}' | 9p write agent/$ echo 'new "Task"' | 9p write agent/beads/ctl ``` -See `workflows/`, `kiro-cli/SKILLS_PROMPT.md` +See `bot-templates/`, `kiro-cli/SKILLS_PROMPT.md` ## MCP Integration diff --git a/bot-templates/Conductor b/bot-templates/Conductor new file mode 100755 index 0000000..1c5c31f --- /dev/null +++ b/bot-templates/Conductor @@ -0,0 +1,69 @@ +#!/bin/bash +# Conductor - Orchestration bot that manages other bots and routes tasks +# Usage: ./bot-templates/Conductor + +set -e + +if [ $# -ne 2 ]; then + echo "Usage: $0 " + echo " backend: claude, kiro-cli" + exit 1 +fi + +BACKEND="$1" +WORKDIR="$2" + +ALIAS_NAME="conductor" + +NAMESPACE=$(namespace) +if [ -z "$NAMESPACE" ]; then + echo "Error: No namespace found. Is anvillm running?" + exit 1 +fi + +AGENT_MOUNT="agent" + +echo "Creating conductor session..." +echo "new $BACKEND $WORKDIR" | 9p write $AGENT_MOUNT/ctl +CONDUCTOR_ID=$(9p read $AGENT_MOUNT/list | head -1 | awk '{print $1}') + +echo "$ALIAS_NAME" | 9p write $AGENT_MOUNT/$CONDUCTOR_ID/alias + +cat <" +4. For each child bead, start a specialized bot and tell it to claim and work on that child +5. Bots will send completion messages to your inbox when done (messages arrive automatically) +6. When a bot notifies you it's done, acknowledge and shut down that bot +7. When ALL children are complete, mark your parent bead complete + +Core skills: beads, anvillm-communication + +When creating a bot: +1. Start the session: echo "new " | 9p write agent/ctl +2. Get the bot's session ID from agent/list +3. Write context to agent//context that includes: + - The bot's role and task + - Instructions to send completion messages to you (your AGENT_ID is $CONDUCTOR_ID) + - Instructions to send clarification requests to you when blocked + - Example: "When done, send PROMPT_RESPONSE to $CONDUCTOR_ID. If you need clarification, send QUERY_REQUEST to $CONDUCTOR_ID." + +Message routing: +- When a bot needs clarification, forward the query to the user with type QUERY_REQUEST +- When the user responds, relay the answer back to the bot +EOF + +echo "" +echo "✓ Conductor workflow ready" +echo "" +echo "Session: $CONDUCTOR_ID (alias: $ALIAS_NAME)" +echo "" +echo "The conductor is ready to orchestrate bots and manage tasks." diff --git a/workflows/DevReview b/bot-templates/DevReview similarity index 100% rename from workflows/DevReview rename to bot-templates/DevReview diff --git a/workflows/DevReviewQA b/bot-templates/DevReviewQA similarity index 100% rename from workflows/DevReviewQA rename to bot-templates/DevReviewQA diff --git a/workflows/Docs b/bot-templates/Docs similarity index 98% rename from workflows/Docs rename to bot-templates/Docs index 359f630..55f7ab3 100755 --- a/workflows/Docs +++ b/bot-templates/Docs @@ -1,6 +1,6 @@ #!/bin/bash # Docs - Documentation workflow (writer + techeditor) -# Usage: ./workflows/Docs +# Usage: ./bot-templates/Docs set -e diff --git a/workflows/Planning b/bot-templates/Planning similarity index 100% rename from workflows/Planning rename to bot-templates/Planning diff --git a/workflows/Research b/bot-templates/Research similarity index 97% rename from workflows/Research rename to bot-templates/Research index dec2ede..aa3f609 100755 --- a/workflows/Research +++ b/bot-templates/Research @@ -1,6 +1,6 @@ #!/bin/bash # Research - Single research agent workflow -# Usage: ./workflows/Research +# Usage: ./bot-templates/Research set -e diff --git a/workflows/Taskmaster b/bot-templates/Taskmaster similarity index 95% rename from workflows/Taskmaster rename to bot-templates/Taskmaster index 5308ad5..72943b0 100755 --- a/workflows/Taskmaster +++ b/bot-templates/Taskmaster @@ -1,6 +1,6 @@ #!/bin/bash # Taskmaster - Task management agent workflow -# Usage: ./workflows/Taskmaster +# Usage: ./bot-templates/Taskmaster set -e diff --git a/mkfile b/mkfile index 3d9ac71..df1e101 100644 --- a/mkfile +++ b/mkfile @@ -17,7 +17,7 @@ build:V: cp scripts/9p-read-inbox $INSTALL_PATH/9p-read-inbox chmod 0755 $INSTALL_PATH/9p-read-inbox mkdir -p $INSTALL_PATH/Workflows - cp workflows/* $INSTALL_PATH/Workflows + cp bot-templates/* $INSTALL_PATH/Workflows chmod 0755 $INSTALL_PATH/Workflows/* mkdir -p $HOME/.config/anvillm cp -rf cfg/* $HOME/.config/anvillm/