Skip to content

fix: inline SOUL+HEARTBEAT in team-lead, pre-hire team, force cache bust - #586

Merged
namastex888 merged 1 commit into
devfrom
fix/update-force-cache
Mar 16, 2026
Merged

namastex888 merged 1 commit into
devfrom
fix/update-force-cache

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

Fixes

  1. Inline SOUL + HEARTBEAT into team-lead AGENTS.md — @imports don't expand in --append-system-prompt-file. All content now in one file.
  2. Pre-hire standard team (engineer, reviewer, qa, fix) on --wish
  3. Context in initial prompt — no second --append-system-prompt-file, wish context in the kickoff message
  4. bun add --force --no-cache for updates

Key change

Team-lead AGENTS.md now has the SOUL ("delegation over doing, NEVER write code") and HEARTBEAT (inbox/status/worker check loop) inlined directly. No @imports.

@coderabbitai

coderabbitai Bot commented Mar 16, 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: 5909c5f2-0c89-41bb-95bd-88a8e9816033

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
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/update-force-cache
📝 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 refines the operational logic of the genie team-lead agent by consolidating its core behavioral instructions and standardizing how it interacts with sub-agents. The changes aim to improve the agent's autonomy and robustness by ensuring all necessary context is immediately available, clarifying interaction patterns, and providing a structured iterative process for task execution and monitoring.

Highlights

  • Agent Configuration Consolidation: The 'SOUL' and 'HEARTBEAT' definitions, which dictate the agent's core principles and operational loop, were inlined directly into the team-lead.md agent definition. This change eliminates the need for external @imports and ensures all critical context is self-contained.
  • Standardized Agent Spawning: The commands for hiring various agent roles (engineer, reviewer, fix, QA) were updated from genie team hire <role> to genie spawn <role>, reflecting a shift towards pre-hired, on-demand team members rather than dynamic hiring.
  • Enhanced Operational Heartbeat: A new 'Heartbeat' section was added, providing a detailed 7-step checklist for the agent to follow on each iteration, covering inbox checks, status monitoring, worker management, CI/PR review, and dispatching next steps.
  • Refined PR Creation and Rules: The gh pr create command body format was simplified, and several rules and command references were updated for clarity, including an explicit rule stating the agent should 'NEVER write code yourself' and always delegate.
Changelog
  • plugins/genie/agents/team-lead.md
    • Inlined SOUL and HEARTBEAT definitions directly into the agent markdown, removing external @imports.
    • Replaced genie team hire commands with genie spawn for all agent roles (engineer, reviewer, fix, qa).
    • Updated the gh pr create command body format to a single-line string.
    • Removed the --watch flag from gh pr checks and the --all flag from genie read engineer.
    • Added a new 'Heartbeat' section detailing an iterative checklist for the agent's loop.
    • Modified command references and rules for agent behavior, including a new explicit rule to 'NEVER write code yourself'.
  • plugins/genie/agents/team-lead/AGENTS.md
    • Inlined SOUL and HEARTBEAT definitions directly into the agent markdown, removing external @imports.
    • Replaced genie team hire commands with genie spawn for all agent roles (engineer, reviewer, fix, qa).
    • Updated the gh pr create command body format to a single-line string.
    • Removed the --watch flag from gh pr checks and the --all flag from genie read engineer.
    • Added a new 'Heartbeat' section detailing an iterative checklist for the agent's loop.
    • Modified command references and rules for agent behavior, including a new explicit rule to 'NEVER write code yourself'.
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 16609a4 into dev Mar 16, 2026
5 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 inlines SOUL and HEARTBEAT content into the team-lead agent's prompt and standardizes some commands. The changes are mostly good, but I've found a few issues where the workflow seems to be broken due to missing commands after spawning agents (reviewer, fix, qa). Additionally, there's a potential security vulnerability in the gh pr create command construction and a loss of clarity in the gh pr merge instruction. My review comments provide details and suggestions for these points.

```bash
genie team hire reviewer --team <your-team-name>
genie review reviewer <slug>
genie spawn reviewer --team <your-team-name>

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.

high

The reviewer agent is spawned, but it's not given a task. The command to dispatch the review work is missing. A command to assign the work should be added after spawning the agent to ensure the lifecycle can proceed.

Suggested change
genie spawn reviewer --team <your-team-name>
genie spawn reviewer --team <your-team-name>
genie work reviewer <slug>#review

```bash
genie team hire fix --team <your-team-name>
genie work fix <slug>#fix
genie spawn fix --team <your-team-name>

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.

high

Similar to the reviewer, the fix agent is spawned but not assigned a task. The genie work fix <slug>#fix command is missing, which breaks the fix-re-review loop.

Suggested change
genie spawn fix --team <your-team-name>
genie spawn fix --team <your-team-name>
genie work fix <slug>#fix

Comment on lines +73 to +80
gh pr create --base dev --title "<concise title>" --body "## Summary
<bullets>

## Wish
<slug>

## Test plan
<checklist>
EOF
)"
<checklist>"

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.

high

The new formatting for the --body of the gh pr create command uses a double-quoted string. This is vulnerable to shell command injection if placeholders like <slug> contain shell metacharacters (e.g., $(...)). The previous implementation using a cat <<'EOF' heredoc was safer. It's recommended to revert to a safer method to prevent potential security issues.

Suggested change
gh pr create --base dev --title "<concise title>" --body "## Summary
<bullets>
## Wish
<slug>
## Test plan
<checklist>
EOF
)"
<checklist>"
gh pr create --base dev --title "<concise title>" --body "$(cat <<'EOF'
## Summary
<bullets>
## Wish
<slug>
## Test plan
<checklist>
EOF
)"

```bash
genie team hire qa --team <your-team-name>
genie work qa <slug>#qa
genie spawn qa --team <your-team-name>

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.

high

The qa agent is spawned, but the command to dispatch the QA task, genie work qa <slug>#qa, is missing. Without it, the QA step in the lifecycle cannot be executed.

Suggested change
genie spawn qa --team <your-team-name>
genie spawn qa --team <your-team-name>
genie work qa <slug>#qa

```bash
genie team hire reviewer --team <your-team-name>
genie review reviewer <slug>
genie spawn reviewer --team <your-team-name>

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.

high

The reviewer agent is spawned, but it's not given a task. The command to dispatch the review work is missing. A command to assign the work should be added after spawning the agent to ensure the lifecycle can proceed.

Suggested change
genie spawn reviewer --team <your-team-name>
genie spawn reviewer --team <your-team-name>
genie work reviewer <slug>#review

```bash
genie team hire fix --team <your-team-name>
genie work fix <slug>#fix
genie spawn fix --team <your-team-name>

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.

high

Similar to the reviewer, the fix agent is spawned but not assigned a task. The genie work fix <slug>#fix command is missing, which breaks the fix-re-review loop.

Suggested change
genie spawn fix --team <your-team-name>
genie spawn fix --team <your-team-name>
genie work fix <slug>#fix

Comment on lines +73 to +80
gh pr create --base dev --title "<concise title>" --body "## Summary
<bullets>

## Wish
<slug>

## Test plan
<checklist>
EOF
)"
<checklist>"

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.

high

The new formatting for the --body of the gh pr create command uses a double-quoted string. This is vulnerable to shell command injection if placeholders like <slug> contain shell metacharacters (e.g., $(...)). The previous implementation using a cat <<'EOF' heredoc was safer. It's recommended to revert to a safer method to prevent potential security issues.

Suggested change
gh pr create --base dev --title "<concise title>" --body "## Summary
<bullets>
## Wish
<slug>
## Test plan
<checklist>
EOF
)"
<checklist>"
gh pr create --base dev --title "<concise title>" --body "$(cat <<'EOF'
## Summary
<bullets>
## Wish
<slug>
## Test plan
<checklist>
EOF
)"

```bash
genie team hire qa --team <your-team-name>
genie work qa <slug>#qa
genie spawn qa --team <your-team-name>

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.

high

The qa agent is spawned, but the command to dispatch the QA task, genie work qa <slug>#qa, is missing. Without it, the QA step in the lifecycle cannot be executed.

Suggested change
genie spawn qa --team <your-team-name>
genie spawn qa --team <your-team-name>
genie work qa <slug>#qa

gh pr merge <number> --merge
```
If false, leave PR open for human review.
Check autoMergeDev config. If true, merge. If false, leave PR open for human review.

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

The explicit gh pr merge command has been removed, making the instruction for the agent less precise. While the text mentions merging, providing the exact command in a code block would improve clarity and reduce ambiguity for the agent. Consider restoring the command block, for example:

Check autoMergeDev config. If true, merge:
```bash
gh pr merge <number> --merge

If false, leave PR open for human review.

gh pr merge <number> --merge
```
If false, leave PR open for human review.
Check autoMergeDev config. If true, merge. If false, leave PR open for human review.

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

The explicit gh pr merge command has been removed, making the instruction for the agent less precise. While the text mentions merging, providing the exact command in a code block would improve clarity and reduce ambiguity for the agent. Consider restoring the command block, for example:

Check autoMergeDev config. If true, merge:
```bash
gh pr merge <number> --merge

If false, leave PR open for human review.

@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: 6a2b9f593a

ℹ️ 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".

Comment on lines +43 to 44
genie spawn engineer --team <your-team-name>
genie work engineer <slug>#<group>

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 Remove redundant engineer spawn before work dispatch

genie work already performs the worker spawn (workDispatchCommand calls handleWorkerSpawn in src/term-commands/dispatch.ts), and handleWorkerSpawn rejects a live duplicate role in the same team (src/term-commands/agents.ts duplicate-role guard). With this new sequence, genie spawn engineer --team ... creates a live engineer and the immediately following genie work engineer ... will fail with the duplicate-role error, so group execution blocks at the first dispatch.

Useful? React with 👍 / 👎.

```bash
genie team hire reviewer --team <your-team-name>
genie review reviewer <slug>
genie spawn reviewer --team <your-team-name>

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 Use dispatch command when starting reviewer/fix/qa

Switching this step to plain genie spawn reviewer (same pattern also used for fix and qa) drops the wish/group dispatch context that these roles depend on. spawn only launches an agent shell, while context injection for review/work happens in the dispatch commands (src/term-commands/dispatch.ts), so reviewers/fixers/qa can be started without assigned criteria or scope and the quality gates may stall or evaluate the wrong target.

Useful? React with 👍 / 👎.

@namastex888
namastex888 deleted the fix/update-force-cache branch March 29, 2026 22:10
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