Skip to content

t031: Add company orchestration agent with runner configs#2054

Merged
marcusquinn merged 2 commits intomainfrom
feature/t031
Feb 21, 2026
Merged

t031: Add company orchestration agent with runner configs#2054
marcusquinn merged 2 commits intomainfrom
feature/t031

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 21, 2026

Summary

  • Add business.md main agent for company-level AI orchestration — maps company departments (HR, Finance, Ops, Marketing, Support) to named runners coordinated via coordinator-helper.sh
  • Add business/company-runners.md with example AGENTS.md templates and setup for 5 company function runners: hiring-coordinator, finance-reviewer, ops-monitor, marketing-scheduler, support-triage
  • Register Business domain in subagent-index.toon and AGENTS.md domain index
  • Fix pre-existing subagent count mismatch in TOON index (declared 51, actual was 53 → now 54)

Architecture

Builds on existing infrastructure — no new scripts needed:

  • runner-helper.sh for persistent named agent instances
  • coordinator-helper.sh for stateless cross-function dispatch
  • objective-runner-helper.sh for safety guardrails (budget, scope, checkpoints)
  • mail-helper.sh for inter-agent communication

Verification

  • No markdownlint issues on new files
  • TOON counts verified correct (12 agents, 54 subagents)
  • Follows existing agent patterns (accounts.md, sales.md)
  • All referenced scripts exist in codebase

Closes #512

Task: t031

Summary by CodeRabbit

  • Documentation
    • Introduced Business domain documentation with Company Orchestration Agent pattern, covering multi-agent setup, named runner functions, mailbox-based communication, and example workflows
    • Added standardized templates and setup procedures for company function runners (accounts, sales, marketing, legal, support roles)
    • Updated agent and subagent indices to reflect new Business domain entries

Add business domain agent for company-level AI orchestration:
- .agents/business.md: Main agent documenting company agent patterns,
  coordinator integration, cross-function workflows, and guardrails
- .agents/business/company-runners.md: Example runner AGENTS.md templates
  for hiring-coordinator, finance-reviewer, ops-monitor, marketing-scheduler,
  and support-triage
- Update subagent-index.toon with Business agent and business/ subagent
- Add Business entry to AGENTS.md domain index
- Fix subagent count in TOON index (was 51, actual 54)

Integrates with existing runner-helper.sh, coordinator-helper.sh, and
objective-runner-helper.sh for cross-function task dispatch with safety
guardrails.

Closes #512
@gemini-code-assist
Copy link

Summary of Changes

Hello @marcusquinn, 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 expands the AI agent framework by introducing a new "Business" domain focused on company-wide orchestration. It enables the creation and management of AI agents tailored to specific departmental functions like HR, Finance, and Marketing, utilizing a robust runner and coordinator pattern for task dispatch and persistent identity. This enhancement allows for more granular and automated management of business processes, complete with guardrails and cross-functional workflow capabilities.

Highlights

  • Company Orchestration Agent: Introduced "business.md" as the main agent for company-level AI orchestration, designed to map company departments (HR, Finance, Ops, Marketing, Support) to named runners coordinated via "coordinator-helper.sh".
  • Example Runner Configurations: Added "business/company-runners.md" which provides example AGENTS.md templates and setup instructions for five specific company function runners: hiring-coordinator, finance-reviewer, ops-monitor, marketing-scheduler, and support-triage.
  • Agent Index Updates: Registered the new "Business" domain in both "subagent-index.toon" and the main "AGENTS.md" domain index.
  • TOON Index Correction: Fixed a pre-existing subagent count mismatch in the "subagent-index.toon" file, updating the declared count from 51 to 54 to reflect the actual number of subagents.
Changelog
  • .agents/AGENTS.md
    • Added an entry for the "Business" domain, linking to "business.md" and "business/company-runners.md".
  • .agents/business.md
    • Added a new file defining the "Business - Company Orchestration Agent," detailing its purpose, architecture, setup, and guardrails.
  • .agents/business/company-runners.md
    • Added a new file providing detailed example configurations and AGENTS.md templates for five company function runners (Hiring Coordinator, Finance Reviewer, Ops Monitor, Marketing Scheduler, Support Triage).
  • .agents/subagent-index.toon
    • Updated the total agent count from 11 to 12.
    • Added the "Business" agent entry.
    • Updated the total subagent count from 51 to 54.
    • Added the "business/" folder entry for company orchestration runner configs.
Activity
  • Verified that new markdown files have no linting issues.
  • Confirmed that TOON agent and subagent counts are correct (12 agents, 54 subagents).
  • Ensured new agents follow existing agent patterns.
  • Confirmed all referenced scripts exist in the codebase.
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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 21, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 55 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

Introduces a Company Orchestration Agent pattern with documentation and templates for coordinating multiple AI agents across company functions. Adds .agents/business.md with architecture and workflows, .agents/business/company-runners.md with runner setup templates, and updates the agent index.

Changes

Cohort / File(s) Summary
Business Domain Documentation
.agents/business.md, .agents/business/company-runners.md
New documentation introducing company orchestration agent patterns, including multi-agent setup with named runners (accounts, sales, marketing, legal, etc.), coordinator helpers, guardrails, workflow examples (convoys, onboarding, monthly closes), architecture details, and safety mechanisms (budget limits, checkpoints, audit logs).
Index Updates
.agents/AGENTS.md, .agents/subagent-index.toon
Updated domain index to register new Business agent entry (pointing to business.md) and added business/ subagent cohort with company-runners reference. TOON agent count incremented from 11 to 12; subagent count from 51 to 54.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🤖 Orchestrating agents across the company floor,
Runners in concert, coordinators synchronize lore,
From sales to legal, each function takes flight,
Company workflows harmonize—what a sight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately reflects the main changes: adding company orchestration agent documentation and runner configuration examples.
Linked Issues check ✅ Passed All three primary coding objectives from issue #512 are met: company-level agent patterns documented, example runners created (5 runners including all 3+ required), and coordinator integration described.
Out of Scope Changes check ✅ Passed All changes directly support issue #512 objectives; the TOON subagent count correction (51→54) is a necessary fix enabling accurate domain registration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/t031

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.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 34 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Feb 21 03:24:01 UTC 2026: Code review monitoring started
Sat Feb 21 03:24:01 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 34

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 34
  • VULNERABILITIES: 0

Generated on: Sat Feb 21 03:24:04 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link

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

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 the Business domain for company-level AI orchestration, adding a main coordinator agent (business.md) and specific runner configurations (business/company-runners.md). It also correctly fixes a pre-existing count mismatch in the subagent-index.toon file. The architecture leverages existing helpers (runner-helper.sh, coordinator-helper.sh) effectively. My feedback focuses on ensuring the agent hierarchy is correctly indexed in the YAML frontmatter and that the provided setup script adheres to the repository's shell scripting standards regarding shared constants.

coderabbitai[bot]
coderabbitai bot previously requested changes Feb 21, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
.agents/business/company-runners.md (1)

86-101: Finance Reviewer threshold is described as "configurable" with no documented configuration point.

Line 89 says amounts over a threshold (configurable) require sign-off, but neither the template nor the setup script shows where or how to set it. Users copying this template will have no guidance and may leave the check unconfigured.

📋 Suggested clarification
-## Constraints
-- Never approve payments — flag for human approval
-- Amounts over threshold (configurable) require explicit sign-off
+## Constraints
+- Never approve payments — flag for human approval
+- Amounts over `FINANCE_APPROVAL_THRESHOLD` (default: 500 GBP; set in runner env or AGENTS.md) require explicit sign-off
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/business/company-runners.md around lines 86 - 101, The "Amounts over
threshold (configurable)" entry in the "## Constraints" section lacks a
documented configuration point; update the template to specify where and how to
set this threshold (e.g., introduce a named config key or env var such as
FINANCE_APPROVAL_THRESHOLD and the config file/CLI/setup script that reads it),
include the default value and units, and add a short note in the "## Tools" or
setup instructions showing how to change it and how the validation in the runner
(e.g., the threshold check logic) will reference that key.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/business.md:
- Around line 128-131: The example uses the same convoy name (--name
"monthly-close") in multiple sections causing potential registration conflicts;
update the Coordinator Integration example (the coordinator-helper.sh convoy
invocation) to use a distinct placeholder convoy name (e.g., --name
"example-convoy" or --name "CONVOY_NAME") instead of "monthly-close", keep the
--tasks argument unchanged for that example, and ensure the Monthly Financial
Close section retains the real --name "monthly-close" so the two examples remain
clearly distinct.
- Around line 12-18: The frontmatter "subagents" list incorrectly includes
non-existent entries "general" and "explore"; remove those two values from the
subagents array in the business agent frontmatter so only valid agents remain
(e.g., accounts, sales, marketing, legal) and ensure the "subagents" key matches
the actual TOON:agents index; update the "subagents" array in
.agents/business.md to exclude "general" and "explore".

In @.agents/business/company-runners.md:
- Around line 175-196: The marketing-scheduler template (headed "Marketing
Scheduler" / identifier marketing-scheduler) is missing the required "##
Communication" section; add a new "## Communication" section that instructs the
runner to send status reports back to the coordinator following the same pattern
as other templates (include frequency, recipient "coordinator", and expected
format/summary fields such as queued drafts, scheduled sends, and flagged
items), and ensure it explicitly states to report on draft queue status and any
flagged underperforming campaigns.

---

Nitpick comments:
In @.agents/business/company-runners.md:
- Around line 86-101: The "Amounts over threshold (configurable)" entry in the
"## Constraints" section lacks a documented configuration point; update the
template to specify where and how to set this threshold (e.g., introduce a named
config key or env var such as FINANCE_APPROVAL_THRESHOLD and the config
file/CLI/setup script that reads it), include the default value and units, and
add a short note in the "## Tools" or setup instructions showing how to change
it and how the validation in the runner (e.g., the threshold check logic) will
reference that key.

@marcusquinn marcusquinn dismissed coderabbitai[bot]’s stale review February 21, 2026 03:50

Auto-dismissed: bot review does not block autonomous pipeline

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 34 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Feb 21 04:10:34 UTC 2026: Code review monitoring started
Sat Feb 21 04:10:35 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 34

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 34
  • VULNERABILITIES: 0

Generated on: Sat Feb 21 04:10:37 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@marcusquinn marcusquinn merged commit 2a9311f into main Feb 21, 2026
23 checks passed
@marcusquinn marcusquinn deleted the feature/t031 branch February 21, 2026 04:46
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.

t031: Company orchestration agent/workflow inspired by @DanielleMorrill

1 participant