From a2d7fc57ed6f97edb9cd6a54365ea09348b4f2a5 Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 17 Mar 2026 06:15:41 -0300 Subject: [PATCH 1/4] feat: add multi-channel completion reporting to worker agent prompts Engineer prompt now instructs workers to call both `genie done` (state) and `genie send` (mailbox notification) on completion. Reviewer, QA, and fix prompts add `genie send` for durable result reporting to team-lead. Flat copies synced. --- plugins/genie/agents/engineer.md | 8 +++++++- plugins/genie/agents/engineer/AGENTS.md | 8 +++++++- plugins/genie/agents/fix.md | 7 +++++++ plugins/genie/agents/fix/AGENTS.md | 7 +++++++ plugins/genie/agents/qa.md | 7 +++++++ plugins/genie/agents/qa/AGENTS.md | 7 +++++++ plugins/genie/agents/reviewer.md | 7 +++++++ plugins/genie/agents/reviewer/AGENTS.md | 7 +++++++ 8 files changed, 56 insertions(+), 2 deletions(-) diff --git a/plugins/genie/agents/engineer.md b/plugins/genie/agents/engineer.md index ec36aafea..9b6eb9564 100644 --- a/plugins/genie/agents/engineer.md +++ b/plugins/genie/agents/engineer.md @@ -51,7 +51,13 @@ After the implementation works: Run the validation command from the wish. Record output. Confirm each acceptance criterion is met. ## 7. Report Completion -After completing all deliverables and validation, call `genie done #` to report completion. The slug and group are in your initial prompt. This signals the orchestrator that your work is finished so it can advance to the next wave. +After completing all deliverables and validation: +1. Run validation commands from the wish +2. Commit and push your work +3. Call: `genie done #` — marks the group complete in state (source of truth) +4. Call: `genie send 'Group complete. ' --to team-lead` — sends durable notification + +The slug and group are in your initial prompt. Both commands are mandatory — state is how the orchestrator tracks progress, the message is how team-lead gets notified. diff --git a/plugins/genie/agents/engineer/AGENTS.md b/plugins/genie/agents/engineer/AGENTS.md index ec36aafea..9b6eb9564 100644 --- a/plugins/genie/agents/engineer/AGENTS.md +++ b/plugins/genie/agents/engineer/AGENTS.md @@ -51,7 +51,13 @@ After the implementation works: Run the validation command from the wish. Record output. Confirm each acceptance criterion is met. ## 7. Report Completion -After completing all deliverables and validation, call `genie done #` to report completion. The slug and group are in your initial prompt. This signals the orchestrator that your work is finished so it can advance to the next wave. +After completing all deliverables and validation: +1. Run validation commands from the wish +2. Commit and push your work +3. Call: `genie done #` — marks the group complete in state (source of truth) +4. Call: `genie send 'Group complete. ' --to team-lead` — sends durable notification + +The slug and group are in your initial prompt. Both commands are mandatory — state is how the orchestrator tracks progress, the message is how team-lead gets notified. diff --git a/plugins/genie/agents/fix.md b/plugins/genie/agents/fix.md index 4521acda0..d68948756 100644 --- a/plugins/genie/agents/fix.md +++ b/plugins/genie/agents/fix.md @@ -67,6 +67,13 @@ Report when complete: - Anything remaining or needing attention + +On completion, report to team-lead via durable message: +- Call: `genie send 'Fix applied — ' --to team-lead` + +This is mandatory. The message is how team-lead gets notified that the fix is done. + + - Minimal change surface — only affected files - Intermediate worker — execute the task and report back. The orchestrator makes the ship/no-ship decision. diff --git a/plugins/genie/agents/fix/AGENTS.md b/plugins/genie/agents/fix/AGENTS.md index 4521acda0..d68948756 100644 --- a/plugins/genie/agents/fix/AGENTS.md +++ b/plugins/genie/agents/fix/AGENTS.md @@ -67,6 +67,13 @@ Report when complete: - Anything remaining or needing attention + +On completion, report to team-lead via durable message: +- Call: `genie send 'Fix applied — ' --to team-lead` + +This is mandatory. The message is how team-lead gets notified that the fix is done. + + - Minimal change surface — only affected files - Intermediate worker — execute the task and report back. The orchestrator makes the ship/no-ship decision. diff --git a/plugins/genie/agents/qa.md b/plugins/genie/agents/qa.md index 9980dc0f3..9a2e8afcb 100644 --- a/plugins/genie/agents/qa.md +++ b/plugins/genie/agents/qa.md @@ -101,6 +101,13 @@ New Tests Written: [N] ([list files]) ``` + +On completion, report your result to team-lead via durable message: +- Call: `genie send ' — ' --to team-lead` + +This is mandatory. The message is how team-lead gets notified of your QA result. + + - Evidence required for every verdict — no "it looks fine" - Never skip running tests diff --git a/plugins/genie/agents/qa/AGENTS.md b/plugins/genie/agents/qa/AGENTS.md index 9980dc0f3..9a2e8afcb 100644 --- a/plugins/genie/agents/qa/AGENTS.md +++ b/plugins/genie/agents/qa/AGENTS.md @@ -101,6 +101,13 @@ New Tests Written: [N] ([list files]) ``` + +On completion, report your result to team-lead via durable message: +- Call: `genie send ' — ' --to team-lead` + +This is mandatory. The message is how team-lead gets notified of your QA result. + + - Evidence required for every verdict — no "it looks fine" - Never skip running tests diff --git a/plugins/genie/agents/reviewer.md b/plugins/genie/agents/reviewer.md index 46c3aff60..9d130dbc2 100644 --- a/plugins/genie/agents/reviewer.md +++ b/plugins/genie/agents/reviewer.md @@ -84,6 +84,13 @@ Validation: ``` + +On completion, report your verdict to team-lead via durable message: +- Call: `genie send ' — ' --to team-lead` + +This is mandatory. The message is how team-lead gets notified of your verdict. + + - Binary verdict only — no "partial pass" - Evidence required — don't assume, verify diff --git a/plugins/genie/agents/reviewer/AGENTS.md b/plugins/genie/agents/reviewer/AGENTS.md index 46c3aff60..9d130dbc2 100644 --- a/plugins/genie/agents/reviewer/AGENTS.md +++ b/plugins/genie/agents/reviewer/AGENTS.md @@ -84,6 +84,13 @@ Validation: ``` + +On completion, report your verdict to team-lead via durable message: +- Call: `genie send ' — ' --to team-lead` + +This is mandatory. The message is how team-lead gets notified of your verdict. + + - Binary verdict only — no "partial pass" - Evidence required — don't assume, verify From c5dbaf7fc6e3ea8079a7031c80fd9ca83ff8152f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Mar 2026 09:19:59 +0000 Subject: [PATCH 2/4] chore(version): bump to 3.260317.16 [skip ci] --- .claude-plugin/marketplace.json | 2 +- openclaw.plugin.json | 2 +- package.json | 2 +- plugins/genie/.claude-plugin/plugin.json | 2 +- plugins/genie/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 0479357f4..342c081ae 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -10,7 +10,7 @@ "plugins": [ { "name": "genie", - "version": "3.260317.14", + "version": "3.260317.16", "source": "./plugins/genie", "description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, make with parallel agents, ship as one team. A coding genie that grows with your project." } diff --git a/openclaw.plugin.json b/openclaw.plugin.json index ef044328f..7d268a814 100644 --- a/openclaw.plugin.json +++ b/openclaw.plugin.json @@ -2,7 +2,7 @@ "id": "genie", "name": "Genie", "description": "Skills, agents, and hooks for the Genie CLI terminal orchestration toolkit", - "version": "3.260317.14", + "version": "3.260317.16", "configSchema": { "type": "object", "additionalProperties": false, diff --git a/package.json b/package.json index 233384473..3786de1be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@automagik/genie", - "version": "3.260317.14", + "version": "3.260317.16", "description": "Collaborative terminal toolkit for human + AI workflows", "type": "module", "bin": { diff --git a/plugins/genie/.claude-plugin/plugin.json b/plugins/genie/.claude-plugin/plugin.json index 785d503f2..363b5d78d 100644 --- a/plugins/genie/.claude-plugin/plugin.json +++ b/plugins/genie/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "genie", - "version": "3.260317.14", + "version": "3.260317.16", "description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, turn them into wishes, execute with /work, validate with /review, and ship as one team.", "author": { "name": "Namastex Labs" diff --git a/plugins/genie/package.json b/plugins/genie/package.json index 3df800bee..95869e0d1 100644 --- a/plugins/genie/package.json +++ b/plugins/genie/package.json @@ -1,6 +1,6 @@ { "name": "genie-plugin", - "version": "3.260317.14", + "version": "3.260317.16", "private": true, "description": "Runtime dependencies for genie bundled CLIs", "type": "module", From 8aeaab5fe2455085fac347b35ecd8ff29b753683 Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 17 Mar 2026 06:22:34 -0300 Subject: [PATCH 3/4] feat: add resilient multi-channel messaging for team agents - Update initialPrompt in dispatch.ts to include `genie done` and `genie send` commands with actual slug/group values (Group 2) - Update team-lead prompt with state-polling-first monitoring: `genie status` as primary, `genie inbox` as secondary, "state file is source of truth" (Group 3) - Sync team-lead flat copy --- plugins/genie/agents/team-lead.md | 11 +++++++++++ plugins/genie/agents/team-lead/AGENTS.md | 11 +++++++++++ src/term-commands/dispatch.ts | 4 ++-- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/plugins/genie/agents/team-lead.md b/plugins/genie/agents/team-lead.md index d091ec468..66aaedcb7 100644 --- a/plugins/genie/agents/team-lead.md +++ b/plugins/genie/agents/team-lead.md @@ -51,6 +51,17 @@ genie team done ``` + +**State file is source of truth. Messages are notifications.** + +When checking progress (after Phase 2 completes or if you need to diagnose): +1. **Primary:** `genie status ` — reads the state file directly. Deterministic, instant, always accurate. +2. **Secondary:** `genie inbox` — durable messages from workers. May lag behind state. +3. **Bonus:** SendMessage from workers arrives between tool calls — use it but don't depend on it. + +Never rely on messages alone to determine completion. Always check `genie status` first. + + - NEVER write code. `genie work` dispatches engineers. - NEVER use `sleep`. diff --git a/plugins/genie/agents/team-lead/AGENTS.md b/plugins/genie/agents/team-lead/AGENTS.md index d091ec468..66aaedcb7 100644 --- a/plugins/genie/agents/team-lead/AGENTS.md +++ b/plugins/genie/agents/team-lead/AGENTS.md @@ -51,6 +51,17 @@ genie team done ``` + +**State file is source of truth. Messages are notifications.** + +When checking progress (after Phase 2 completes or if you need to diagnose): +1. **Primary:** `genie status ` — reads the state file directly. Deterministic, instant, always accurate. +2. **Secondary:** `genie inbox` — durable messages from workers. May lag behind state. +3. **Bonus:** SendMessage from workers arrives between tool calls — use it but don't depend on it. + +Never rely on messages alone to determine completion. Always check `genie status` first. + + - NEVER write code. `genie work` dispatches engineers. - NEVER use `sleep`. diff --git a/src/term-commands/dispatch.ts b/src/term-commands/dispatch.ts index 8f6c8a6af..d61de1bec 100644 --- a/src/term-commands/dispatch.ts +++ b/src/term-commands/dispatch.ts @@ -543,7 +543,7 @@ export async function workDispatchCommand(agentName: string, ref: string): Promi team: process.env.GENIE_TEAM ?? 'genie', role: `${agentName}-${group}`, extraArgs: ['--append-system-prompt-file', contextFile], - initialPrompt: `Execute Group ${group} of wish "${slug}". Your full context is in the system prompt. Read the wish at ${wishPath} if needed. Implement all deliverables, run validation, and report completion. When done, run: genie done ${slug}#${group}`, + initialPrompt: `Execute Group ${group} of wish "${slug}". Your full context is in the system prompt. Read the wish at ${wishPath} if needed. Implement all deliverables, run validation, and report completion.\n\nWhen done:\n1. Run: genie done ${slug}#${group}\n2. Run: genie send 'Group ${group} complete. ' --to team-lead`, }); } @@ -598,7 +598,7 @@ export async function reviewCommand(agentName: string, ref: string): Promise — ' --to team-lead`, }); } From bd1f04cd24e58768faa30160fa1b566dde813a66 Mon Sep 17 00:00:00 2001 From: Felipe Rosa Date: Tue, 17 Mar 2026 06:51:41 -0300 Subject: [PATCH 4/4] fix: strip parenthetical comments from depends-on parser (#642) `depends-on: 1 (must be done first)` was parsed as dependency on "1 (must be done first)" which doesn't match any group. Now strips `(...)` suffixes from both the none-check and individual dep values. Co-authored-by: Test --- src/term-commands/dispatch.test.ts | 9 +++++++++ src/term-commands/dispatch.ts | 11 +++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/term-commands/dispatch.test.ts b/src/term-commands/dispatch.test.ts index d19ac4b8b..94450ad3f 100644 --- a/src/term-commands/dispatch.test.ts +++ b/src/term-commands/dispatch.test.ts @@ -550,6 +550,15 @@ describe('parseWishGroups()', () => { const groups = parseWishGroups(SAMPLE_WISH); expect(groups[0].dependsOn).toEqual([]); }); + + it('should strip parenthetical comments from depends-on values', () => { + const content = + '### Group 1: First\n**depends-on:** none (this is the start)\n\n### Group 2: Second\n**depends-on:** 1 (must be done first)\n\n### Group 3: Third\n**depends-on:** Group 1 (setup), Group 2 (core work)'; + const groups = parseWishGroups(content); + expect(groups[0].dependsOn).toEqual([]); + expect(groups[1].dependsOn).toEqual(['1']); + expect(groups[2].dependsOn).toEqual(['1', '2']); + }); }); // ============================================================================ diff --git a/src/term-commands/dispatch.ts b/src/term-commands/dispatch.ts index d61de1bec..2e91208bf 100644 --- a/src/term-commands/dispatch.ts +++ b/src/term-commands/dispatch.ts @@ -162,10 +162,17 @@ export function parseWishGroups(content: string): GroupDefinition[] { let dependsOn: string[] = []; if (depsMatch) { const depsStr = depsMatch[1].trim(); - if (depsStr.toLowerCase() !== 'none') { + const depsNormalized = depsStr.replace(/\s*\([^)]*\)/g, '').trim(); + if (depsNormalized.toLowerCase() !== 'none') { dependsOn = depsStr .split(',') - .map((d) => d.trim().replace(/^group\s*/i, '')) + .map((d) => + d + .trim() + .replace(/^group\s*/i, '') + .replace(/\s*\(.*\)\s*$/, '') + .trim(), + ) .filter(Boolean); } }