Adopting outerloop

July 9, 2026 · View on GitHub

How to add outerloop governance to an existing project or agentic workflow.

Prerequisites

  • Node.js 18+
  • A project where agents produce runs, diffs, or test output you want to govern

One-command setup

npx @cobusgreyling/outerloop init

Options:

outerloop init \
  --name my-service \
  --boundary moderate \
  --with-cursor
# or: --with-claude-code  --with-loop-engineering
FlagEffect
--boundary strictTighter agent tool whitelist; all merges need human verdict
--boundary moderateDefault — balanced inner/outer separation
--boundary permissiveLooser agent autonomy; production still gated
--with-cursorInstalls .cursor/rules/outerloop.mdc and verdict-aware prompts
--with-claude-codeWrites CLAUDE.md and .claude/ post-run helpers
--with-loop-engineeringWrites outerloop.config.yaml, post-run hook, GitHub workflow
--no-coordinationSkip multi-loop coordination registry

What init creates

.outerloop/
├── evidence/          # EvidencePackages + index
├── verdicts/          # Human decisions with rationale
├── ledger/            # Provenance chain (index + entries.jsonl)
├── manifests/         # Commit/run manifests
├── harness/           # Inner/outer boundary spec
├── policy/            # Active backpressure policy
├── taste/             # Versioned taste profiles
└── coordination/      # Multi-loop registry (unless skipped)
backpressure.yaml      # Policy template (activated on init)

Integrations

loop-engineering

If you use loop-engineering:

outerloop integrate loop-engineering

This wires a post-run hook that auto-packages evidence from loop-run-log.md and STATE.md.

Cursor

outerloop cursor setup
# or: outerloop integrate cursor

Installs verdict-aware rules so Composer sessions respect evidence/verdict/ledger workflow.

Claude Code

outerloop integrate claude-code

Writes CLAUDE.md and .claude/post-run-outerloop.sh for evidence packaging after sessions.

CI hooks

Reusable GitHub Action (any project)

jobs:
  evidence:
    uses: cobusgreyling/outerloop/.github/workflows/evidence-gate.yml@main
    with:
      run-id: ${{ github.sha }}
      evidence-source: custom-harness

See github-action.md.

After integrate loop-engineering, a workflow template is also written to .github/workflows/outerloop-evidence.yml.

For any CI, the minimum viable gate is:

outerloop evidence package --run-id "$RUN_ID" --project-root .
# Human or policy-gated:
outerloop policy evaluate "$EVIDENCE_ID"
outerloop verdict issue --evidence-id "$EVIDENCE_ID" --decision ship --rationale "..."

Governance cadence

EventCommand
Agent run completesouterloop evidence package --run-id latest
Ready to shipouterloop verdict review <evidence-id>
Audit / retroouterloop ledger why <sha-or-evidence-id>
Health checkouterloop audit
Team dashboardouterloop dashboard or outerloop dashboard serve

Taste and policy

Capture organizational taste from critique sessions:

outerloop taste capture --from-critique notes.md --profile team-default
outerloop taste apply --profile team-default

Set backpressure policy:

outerloop policy set --file backpressure.yaml
outerloop policy evaluate <evidence-id>

Multi-loop teams

For factories running several agent loops (PR babysitter, CI sweeper, daily triage):

outerloop coordination init
outerloop coordination status --pattern ci-sweeper --status acting --acting-on pr-42
outerloop coordination check --pattern pr-babysitter --target pr-42

Local development (unpublished CLI)

git clone https://github.com/cobusgreyling/outerloop.git
cd outerloop && pnpm install && pnpm build
alias outerloop='node /path/to/outerloop/packages/cli/dist/cli.js'
outerloop init --project-root /path/to/your-project

Next steps