Skip to content

feat(agent-rules): stall-watching rule + AgentWorkforce orchestration overlay (Phase 3) - #238

Open
AgentRelayBot wants to merge 2 commits into
feat/grok-dynamic-rulesfrom
feat/grok-rules-orchestration
Open

AgentRelayBot wants to merge 2 commits into
feat/grok-dynamic-rulesfrom
feat/grok-rules-orchestration

Conversation

@AgentRelayBot

@AgentRelayBot AgentRelayBot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Phase 3 of docs/specs/grok-bot-dynamic-prompt.md. Stacked on #237, which is stacked on #236. Rules version 2026.11.1.

Rules

  • Stall watching (agent-rules/sections/stall-watch.md, base, audiences grok-bot and lead). A bot keeps a list of the work it has delegated. It follows up on agents that have not reported: 30 minutes since the last message, or 10 minutes after a spawn with no acknowledgement. It routes blockers, and it tells the person who owns the work, without waiting to be asked, when an agent is gone, failed or silent after one follow-up, or when work is blocked on a decision, credential, approval or outage. It also runs the check on runs with no new messages. At most one follow-up per agent per interval, and one summary note per run.
  • Orchestration only (agent-rules/overlays/agentworkforce-grok-bot.md). Grok bots do no coding work and make no real decisions; all coding goes to Claude and Codex coding agents; they only spawn, route and relay. Problems go to Khaliq (khaliq-gant).

Decisions applied

  • D7 (spec recommendation): stall-watching is in the base rules for every tenant, with a generic escalation target. Orchestration-only is AgentWorkforce policy, so it ships as the reviewed overlay text. That text is not active until an AgentWorkforce owner or admin PUTs it (command in docs/agent-rules.md). Applying it in production needs Khaliq's OK, so I did not apply it.
  • D6 (no option stated; conservative pick, Khaliq can override): no automatic heartbeat routine. The docs say a bot needs an opt-in scheduled routine to catch stalls when no messages arrive.

Verification

  • npx tsc --noEmit: pass.
  • test/agent-rules.test.ts: 7 tests pass, including the new Phase 3 test. It checks that stall-watch reaches grok-bot and lead but not worker, that the overlay text passes the lint and composes under "Organization rules" after stall-watch, and that the pin, version and CHANGELOG checks hold for 2026.11.1.
  • test/mcp.test.ts and both Grok test files: 79 tests pass. This PR has no code or migration changes.

No merge, deploy or flag flip without Khaliq's direct OK.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds Phase 3 of the grok-bot dynamic prompt spec: a stall-watching rule so bots follow up on delegated work that stalls, plus a reviewed orchestration-only overlay for AgentWorkforce. Rules version bumps to 2026.11.1; there are no code or migration changes.

New rules

  • stall-watch (base, audiences grok-bot and lead): bots track delegated work, follow up on agents silent for 30 minutes or unacknowledged 10 minutes after a spawn, route blockers, and proactively tell the work owner when an agent is gone, failed, or still silent after one follow-up, or when work is blocked on a decision, credential, approval, or outage. Runs with no new messages still do the check; at most one follow-up per agent per interval and one summary note per run.
  • overlays/agentworkforce-grok-bot.md: Grok bots do no coding and make no real decisions; all coding goes to Claude or Codex coding agents, and problems surface to Khaliq. It is not in the base bundle; it takes effect only when an AgentWorkforce owner or admin PUTs it (command in docs/agent-rules.md), which on production needs Khaliq's direct OK.

Decisions applied

  • D7: stall-watching ships in the base rules for every tenant; orchestration-only is AgentWorkforce policy and ships as the overlay text.
  • D6 (conservative): no automatic heartbeat routine; the docs note that catching stalls in quiet periods needs an opt-in scheduled routine.

Written for commit c88450e. Summary will update on new commits.

View guided diff Turn on auto-fix

…ration overlay

Phase 3 of docs/specs/grok-bot-dynamic-prompt.md, stacked on Phase 2.
Rules 2026.11.1.

- sections/stall-watch.md (grok-bot, lead; base, decision D7): keep a list
  of delegated work; follow up on agents silent for 30 minutes, or 10 minutes
  after a spawn with no ack; route blockers; tell the person who owns the
  work without waiting to be asked; check even on runs with no new messages.
  One follow-up per agent per interval, one summary note per run.
- overlays/agentworkforce-grok-bot.md: the reviewed AgentWorkforce grok-bot
  overlay (D7). Grok bots do no coding and no real decisions; all coding goes
  to Claude and Codex agents; they only spawn, route and relay; problems are
  surfaced to Khaliq. Not part of the base bundle: it takes effect only when
  an organization admin PUTs it, which on production needs Khaliq's OK.
- No automatic heartbeat routine (D6, conservative): docs note that quiet
  periods need an opt-in scheduled routine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 19, 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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4e0d10c6-160b-4985-b167-2c5dcd41ce81

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Carries the reworked Phase 1 and Phase 2 (main merged in, review findings
addressed, private references removed) into Phase 3; no history rewrite.
Rules 2026.11.1 and its pin are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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