Skip to content

feat: resilient multi-channel messaging - #641

Merged
namastex888 merged 2 commits into
devfrom
test-final
Mar 17, 2026
Merged

namastex888 merged 2 commits into
devfrom
test-final

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

Summary

  • Updated all worker agent prompts (engineer, reviewer, qa, fix) with multi-channel completion reporting via genie done and genie send
  • Updated team-lead prompt to poll state first (genie status) as source of truth, with inbox as secondary
  • Updated initialPrompt in dispatch.ts to include genie done and genie send commands with actual slug/group values
  • Synced all flat .md copies

Wish

resilient-messaging

Test plan

  • bun run check passes (751 tests, typecheck, lint, dead-code)
  • bun run build passes (0.36 MB bundle)
  • All agent prompts contain completion reporting instructions
  • dispatch.ts includes genie done and genie send in initialPrompt
  • Team-lead prompt says "state file is source of truth"
  • Team-lead lists genie status before genie inbox
  • All flat .md copies match their AGENTS.md counterparts

Test added 2 commits March 17, 2026 06:19
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.
- 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
@coderabbitai

coderabbitai Bot commented Mar 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4dc542f2-5e30-4658-a583-553583483e2d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test-final
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the robustness and clarity of inter-agent communication and status tracking within the genie system. By introducing a dual-reporting mechanism for worker agents and clarifying the source of truth for the team-lead, it ensures that progress is reliably recorded in the system state while also providing durable, explicit notifications to relevant stakeholders. This change aims to make the system more resilient to transient communication issues and provide a more consistent view of ongoing work.

Highlights

  • Enhanced Agent Reporting: Worker agents (Engineer, Reviewer, QA, Fix) now utilize a dual-channel reporting mechanism, employing genie done to update the system state and genie send to dispatch durable notifications to the team-lead, ensuring comprehensive completion reporting.
  • Team-Lead Monitoring Prioritization: The Team-Lead agent's prompt has been updated to explicitly prioritize genie status (reading the state file) as the authoritative source for tracking progress, with genie inbox (message notifications) serving as a secondary, potentially lagging, indicator.
  • Automated Prompt Injection: The dispatch.ts file has been modified to automatically inject the new genie done and genie send commands into the initial prompts provided to dispatched agents, standardizing their reporting instructions.
  • Documentation Synchronization: All flat .md agent prompt files have been synchronized with their corresponding AGENTS.md counterparts to reflect the latest changes in reporting instructions and monitoring guidelines.
Changelog
  • plugins/genie/agents/engineer.md
    • Updated completion reporting instructions to include both genie done for state updates and genie send for durable notifications to the team-lead, making both mandatory.
  • plugins/genie/agents/engineer/AGENTS.md
    • Updated completion reporting instructions to include both genie done for state updates and genie send for durable notifications to the team-lead, making both mandatory.
  • plugins/genie/agents/fix.md
    • Added a new <completion_reporting> section instructing the agent to send a durable message to the team-lead upon completion using genie send.
  • plugins/genie/agents/fix/AGENTS.md
    • Added a new <completion_reporting> section instructing the agent to send a durable message to the team-lead upon completion using genie send.
  • plugins/genie/agents/qa.md
    • Added a new <completion_reporting> section instructing the agent to send a durable message to the team-lead upon completion using genie send.
  • plugins/genie/agents/qa/AGENTS.md
    • Added a new <completion_reporting> section instructing the agent to send a durable message to the team-lead upon completion using genie send.
  • plugins/genie/agents/reviewer.md
    • Added a new <completion_reporting> section instructing the agent to send a durable message to the team-lead upon completion using genie send.
  • plugins/genie/agents/reviewer/AGENTS.md
    • Added a new <completion_reporting> section instructing the agent to send a durable message to the team-lead upon completion using genie send.
  • plugins/genie/agents/team-lead.md
    • Added a new <monitoring> section clarifying that the state file is the source of truth and instructing the team-lead to prioritize genie status over genie inbox for checking progress.
  • plugins/genie/agents/team-lead/AGENTS.md
    • Added a new <monitoring> section clarifying that the state file is the source of truth and instructing the team-lead to prioritize genie status over genie inbox for checking progress.
  • src/term-commands/dispatch.ts
    • Updated the initialPrompt for workDispatchCommand to include explicit instructions for both genie done and genie send commands.
    • Updated the initialPrompt for reviewCommand to include explicit instructions for the genie send command for reporting verdicts.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@namastex888
namastex888 merged commit c5ff6a7 into dev Mar 17, 2026
6 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a more resilient multi-channel messaging system for agent completion reporting. Worker agents now use both genie done to update a state file (the source of truth) and genie send to send a durable notification to the team-lead. The prompts for all agents (engineer, reviewer, qa, fix, team-lead) have been updated to reflect these new procedures, and the dispatch logic in dispatch.ts has been updated accordingly. The changes are well-aligned with the goal of improving messaging resilience. I've suggested a minor improvement for consistency in the engineer agent's prompt.

1. Run validation commands from the wish
2. Commit and push your work
3. Call: `genie done <slug>#<group>` — marks the group complete in state (source of truth)
4. Call: `genie send 'Group <N> complete. <summary>' --to team-lead` — sends durable notification

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and to reduce ambiguity for the agent, it would be better to use <group> here instead of <N>. The genie done command on the preceding line uses <group>, and the corresponding initialPrompt in dispatch.ts is constructed with the actual group number. Using <group> makes it explicit which value should be substituted.

Suggested change
4. Call: `genie send 'Group <N> complete. <summary>' --to team-lead` — sends durable notification
4. Call: `genie send 'Group <group> complete. <summary>' --to team-lead` — sends durable notification

1. Run validation commands from the wish
2. Commit and push your work
3. Call: `genie done <slug>#<group>` — marks the group complete in state (source of truth)
4. Call: `genie send 'Group <N> complete. <summary>' --to team-lead` — sends durable notification

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and to reduce ambiguity for the agent, it would be better to use <group> here instead of <N>. The genie done command on the preceding line uses <group>, and the corresponding initialPrompt in dispatch.ts is constructed with the actual group number. Using <group> makes it explicit which value should be substituted.

Suggested change
4. Call: `genie send 'Group <N> complete. <summary>' --to team-lead` — sends durable notification
4. Call: `genie send 'Group <group> complete. <summary>' --to team-lead` — sends durable notification

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8aeaab5fe2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

After completing all deliverables and validation, call `genie done <slug>#<group>` 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Drop mandatory worker commit/push step

Making Commit and push your work a required engineer step can stall normal orchestration: workers now have to push before calling genie done, so any push failure (no remote access, auth issues, branch protection) prevents state completion and causes genie work to hang until timeout, and it also conflicts with the team-lead flow that already performs the canonical git add/commit/push in Phase 3 (plugins/genie/agents/team-lead/AGENTS.md lines 36-40).

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant