Skip to content
This repository was archived by the owner on Jul 23, 2026. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delegate

Multi-agent governance spike — Rule of Three voting for the ofOne ecosystem.

Proposals move through a lifecycle (CEO pitch → RFC → voting → decision). Voters are spawned on the fly — there are no pre-existing agents. Each voter is a persona (system prompt) bound to a pluggable LLM backend, so every persona can run on a different model.

Rule of Three

Outcome Rule
APPROVED 2+ approve
REJECTED 2+ reject
ESCALATED split vote (1-1 or 1/1/1) → tiebreaker

Personas: speed (velocity, quick wins) · rigor (ROI, risk) · alignment (team fit, long-term coherence)

Quick start

python3 -m venv .venv && .venv/bin/pip install -e ".[test]"

Run the spike tests (exit criteria — all 5 must pass):

.venv/bin/python -m pytest scripts/spike_test.py -v

Start the server:

.venv/bin/uvicorn app.main:app --reload

API docs at http://localhost:8000/docs

Model backends

  • No ANTHROPIC_API_KEY → deterministic heuristic backend (local dev / tests, no network).
  • ANTHROPIC_API_KEY set → real inference via the Claude API (pip install -e ".[llm]").

Per-persona models are env-configurable — swap freely on Miss Minutes:

export DELEGATE_MODEL_SPEED=claude-haiku-4-5-20251001
export DELEGATE_MODEL_RIGOR=claude-opus-4-8
export DELEGATE_MODEL_ALIGNMENT=claude-sonnet-5

API

Endpoint Purpose
POST /api/proposals/create CEO pitch (draft)
POST /api/proposals/{id}/refine Move to RFC, update frontmatter
POST /api/proposals/{id}/vote Cast a single vote
POST /api/proposals/{id}/run-panel Spawn all three personas and vote
GET /api/proposals/{id} Proposal + votes + consensus
GET /api/proposals List (filter by status, decision)

CLI

Spawn voters against a running server:

.venv/bin/python -m agents.cli vote 1 --persona rigor
.venv/bin/python -m agents.cli panel 1

Structure

app/
  main.py       FastAPI app
  models.py     SQLAlchemy: Proposal, Vote
  schemas.py    Pydantic request/response
  voting.py     compute_consensus (Rule of Three)
  voters.py     persona defs + dynamic spawning + backends
  routers/proposals.py
agents/cli.py   Click CLI (vote / panel)
scripts/spike_test.py   5 exit-criteria tests

Next (post-spike, on Miss Minutes)

  • Real tiebreaker call (Opus) instead of the tiebreaker-opus marker
  • Mixed-provider backends (OpenCode ZEN via ai-harness-mcp infer)
  • MCP server wrapper so agents can propose/vote over MCP
  • PostgreSQL + audit log

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages