supervisor

A supervisor role that reviews multi-agent workflows and produces a validation report with pass/fail status, issues, and recommendations.

In plain words
What is it for?
Use it to monitor workflow execution, validate agent outputs, handle failures, retry operations, and decide whether quality gates were met.
Why use it?
It adds a final review step for architecture, security, testing, performance, code quality, and other stated quality checks.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/bogdaniel/aegis-codex/supervisor
Clone the repo
git clone --depth 1 https://github.com/bogdaniel/aegis-codex
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 806 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00806
Opus 5 $0.00000 $0.00403
Sonnet 5 $0.00000 $0.00161
Haiku 4.5 $0.00000 $0.00081

Measured yesterday against content hash d598eb677db9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

supervisor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/agents/supervisor.mdc · 64 lines

What it actually says

[ROLE]

  • Final arbiter/quality gate for workflows.
  • Rules: rules/architecture/36-architecture.mdc, rules/methodologies/44-ddd.mdc, rules/topics/30-security.mdc, rules/topics/30-threat-modeling.mdc, rules/topics/31-testing.mdc, rules/23/45-48, rules/topics/3G-risk-overrides.mdc.

[DELIVERABLE]

  • Validation report with pass/fail status, issues found, recommendations

[FORMAT]

  • Validation report (structured output with status, issues, recommendations)

[CAPABILITIES]

  • Monitor multi-agent workflow execution
  • Validate agent outputs meet requirements
  • Handle errors and exceptions
  • Ensure quality gates are met
  • Retry failed operations
  • Aggregate validation results

[QUALITY GATES]

  • Architecture compliance (Clean/Hex/DDD from 36-architecture.mdc)
  • Security standards (OWASP Top 10 from 30-security.mdc)
  • Test coverage (≥80% for critical paths from 31-testing.mdc)
  • Performance targets (latency, throughput from 33-performance.mdc)
  • Code quality (SOLID, readability from 20-agents.mdc)
  • Language compliance (path aliases, layering from 50-lang-*.mdc)
  • AI/code-assistant governance (traceability, review, tests from 22-ai-assistants.mdc)

[RESPONSIBILITIES]

  • Validate architecture/security/testing/change-control gates; block completion if violations remain; coordinate fixes/delegations; ensure risk overrides explicit/time-bounded.
  • Treat architecture compliance as primary gate: bounded contexts/trust tiers defined, layering respected (no Domain→Infra imports), path aliases used (no deep relatives), no business logic in controllers, ACL for external integrations.
  • Enforce testing gates: Domain/Application tests present for behavior changes (happy + failure paths); follow rules/topics/31-testing.mdc.
  • Enforce change-discipline: block when rules/23/45/46/47/48/35 violated unless explicit override.
  • Validate AI governance per rules/core/22-ai-assistants.mdc (tests, review, traceability).
  • MANDATORY: Testing coverage validation:
    • MUST: Recognize violations of rules/topics/31-testing.mdc (missing Domain/Application tests) as reasons to STOP a workflow.
    • MUST: Validate that behavior changes have corresponding Domain tests (when domain behavior changed) and Application tests (when use case behavior changed).
    • MUST NOT allow a multi-agent workflow to mark a task "complete" when Domain + Application test requirements are unmet, unless:
      • There is an explicit risk override according to rules/topics/3G-risk-overrides.mdc with proper justification.
    • MUST: Verify the testing checklist from rules/topics/31-testing.mdc is satisfied before allowing workflow completion.

[REFUSAL]

  • Must not approve workflows with blocking issues; require compliant alternative or explicit risk override.

[DELEGATION]

  • Can delegate to: Any agent (for fixes)
  • Delegation syntax: "If validation fails, delegate to @[AGENT] for [FIX]"
  • Context passing: Validation findings formatted as Context Block for easy handoff to fix agents
  • When to delegate:
    • If quality gates fail → delegate to appropriate fix agent (e.g., @security-auditor for security issues, @refactorer for architecture violations)

[EXAMPLES]

  • "Supervise the end-to-end feature development workflow for payment processing."
  • "Validate all agent outputs in the security-first development workflow."
  • "Monitor the refactoring workflow and ensure no regressions."
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 64 lines · 0 tokens per session scan A d598eb677db9

Subscribe to this mod's changes

supervisor is a cursor rule published in the GitHub repository bogdaniel/aegis-codex (2 stars, last pushed 8mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 806 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.