agentleFS
nseney1nseney1/Soma-Governance/skills/adaptive-reviewer/SKILL.md

Adaptive Review Orchestrator

Skill4 starsChanged 12 days agoApache-2.0View on GitHub

Autonomously selects review protocols and dispatches nested subagents based on Sentry finding severity.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the orchestrator as one subagent (${SLOT.TOOL_SUBAGENT}) that may itself dispatch subagents and write its report.

    line 15
  2. Distinctive:

    Ship: Only when the full adversarial cycle is clean.

    line 57
  3. Distinctive:

    If Bastion returns BLOCK:

    line 61
  4. Distinctive:

    If still BLOCK → report to parent

    line 64
  5. Distinctive:

    If Gauntlet breaks fixes:

    line 66
  6. Distinctive:

    Before dispatching, the orchestrator inspects the target:

    line 72
  7. Very specific:

    Read governance/debrief_queue.jsonl for known anti-patterns

    line 76
  8. Very specific:

    ALL prong subagents: ${SLOT.MODEL_FAST} model, read-only (no write tools)

    line 80
  9. Distinctive:

    Post-mortem analysis: Use standalone Sentry — no fixes needed.

    line 111
  10. Very specific:

    Live monitoring: Use session-monitor skill instead.

    line 112

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Adaptive Review Orchestrator

Role: Autonomously execute review protocols by dispatching nested subagents. Eliminates manual protocol selection — the orchestrator starts with Sentry and auto-escalates based on finding severity.

Setup

Run the orchestrator as one subagent (${SLOT.TOOL_SUBAGENT}) that may itself dispatch subagents and write its report. Where the host lets you define a reusable subagent type, define one named adaptive_reviewer that may dispatch subagents and write files. Prompt it with:

Review [target files/directory]. Context: [what changed, why]

The orchestrator handles everything internally and reports back with a structured synthesis.

Auto-Escalation Logic

The orchestrator runs Sentry first, then decides:

Sentry ResultAuto-Decision
0 findings or all ℹ️STOP as Sweep — synthesize and report
1-3 ⚠️ warnings, 0 🔴Probe only — targeted fixes
Any 🔴 criticalFull Vanguard — Probe + Bastion
2+ 🔴 or security findingBulwark — Probe + Gauntlet + Bastion
Infra/auth/schema 🔴Fortress — + Trace + Debrief
Pre-release / user-requestedCitadel — 8 orthogonal prongs, adversarial pairs, iterative until clean

Citadel Protocol

Citadel applies the same adversarial information-partitioning principle as Layer 2 verification, but to the review process itself.

Cycle Structure

For each prong pair (e.g., Correctness + Portability):

  1. 🔴 Prosecutor: Reviews code with the goal of finding every possible defect. Incentivized to over-report.
  2. 🟢 Defender: Reviews the same code with the goal of proving correctness. Incentivized to disprove findings.
  3. ⚖️ Arbiter (orchestrator): Reconciles both reports. Only findings that survive the defense make the final cut.

Why Adversarial?

  • Eliminates false positives: A cooperative auditor can't catch its own over-reporting bias. A Defender filters noise (e.g., test fixture strings flagged as "hardcoded paths").
  • Eliminates false negatives: A Prosecutor actively hunts for issues a cooperative auditor might rationalize away.
  • Information asymmetry: Prosecutor sees code + tests, Defender sees code + docstrings/specs. Neither has full context — truth emerges from intersection.

Iteration (No Deferrals)

  1. Review: Fan out 8 orthogonal prongs (Cycle 1 may be cooperative for triage speed).
  2. Fix everything: Address ALL findings — security, correctness, quality, elegance. Nothing is deferred. RCA each finding: what broke, how we missed it, antipattern candidate.
  3. Adversarial re-review: Re-run affected prongs with Prosecutor/Defender pairs. New findings from fixes are treated the same — fix everything.
  4. Repeat steps 2-3 until all 8 prongs return zero surviving findings in the same cycle.
  5. Ship: Only when the full adversarial cycle is clean.

Self-Healing

If Bastion returns BLOCK:

  1. Re-dispatch Probe on failed fixes with Bastion's objections
  2. Re-run Bastion (max 1 retry)
  3. If still BLOCK → report to parent

If Gauntlet breaks fixes:

  1. Re-dispatch Probe with Gauntlet attack vectors as context
  2. Continue to Bastion with revised fixes

Phase 0: Triage (No Subagent)

Before dispatching, the orchestrator inspects the target:

  • hooks/**, Makefile, install* → HIGH sensitivity (Security lens mandatory)
  • rules/*.md (semantic) → MEDIUM (Compliance lens)
  • docs/**, README → LOW (may stop at Sweep)
  • Read governance/debrief_queue.jsonl for known anti-patterns

Subagent Rules

  1. ALL prong subagents: ${SLOT.MODEL_FAST} model, read-only (no write tools)
  2. Context Pre-Seed every prompt (~200 token header)
  3. Orthogonal Persona Mandate: no two scouts share the same lens
  4. Kill each subagent immediately after debrief
  5. Max 12 dispatches (hard cap)

Output Format

# Adaptive Review — [Target]
## Protocol: [auto-selected] (escalated from Sentry)
## Verdict: SHIP / BLOCK / REVISE

## 🔴 Critical Findings
## ⚠️ Warnings
## Proposed Fixes (post-Gauntlet if applicable)
## Stats (dispatches, prongs, wall-clock)

Proven Results (E11 Testing)

MetricManual OrchestrationAdaptive Orchestrator
Parent context consumed~6 turns per review1 turn (dispatch + receive)
Protocol selectionManual (user guesses)Empirical (data-driven)
Gauntlet revision loopManual relayAutonomous
DispatchesSame countSame count, 0 wasted

When NOT to Use

  • Patrol (known single-file defect): Use the staff-review skill directly in Patrol mode — adaptive triage adds unnecessary overhead for known defects.
  • Post-mortem analysis: Use standalone Sentry — no fixes needed.
  • Live monitoring: Use session-monitor skill instead.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.