Skip to main content
Peter Parker (PP) is the meta-orchestrator. It decides which agents to run, in what order, and coordinates the entire nightly improvement cycle.

What PP Does

jfl peter daily
  |
  +-- 1. Mine training tuples from journals
  +-- 2. Synthesize product context
  +-- 3. Layer 3: Strategic reasoning (which agents to run?)
  +-- 4. Hub health check
  +-- 5. Run stale agents (5 rounds each, capped at 1 hour)
  +-- 6. Pick up kanban backlog issues → create PRs
  +-- 7. Post summary event

Strategic Reasoning (Layer 3)

PP uses Stratus to decide which agents deserve compute tonight:
Strategic reasoning:
  Run: ["test-coverage", "code-quality"]
  Skip: ["cli-speed"] — already optimized, diminishing returns
  Reasoning: test-coverage has 87% headroom, highest ROI
This prevents wasting tokens on agents that have plateaued.

Running PP

Daily Loop (Nightly Cron)

jfl peter daily
Full orchestration cycle. Typically run at 2 AM via OpenClaw cron:
{
  "schedule": { "kind": "cron", "expr": "0 2 * * *" },
  "payload": {
    "kind": "agentTurn",
    "message": "Run the JFL nightly loop..."
  }
}

Single Agent Run

jfl peter agent test-coverage --rounds 5

Agent Swarm

jfl peter agent swarm --rounds 10
Runs all agents with the meta-orchestrator scheduling who goes next based on EMA reward.

PR Mode

jfl peter pr --task "Fix the auth token refresh bug"
Creates a branch, makes changes, opens a PR. Used by the kanban pickup flow.

The Kanban Pipeline

PP integrates with GitHub Issues for autonomous task execution:
Issue filed (jfl/backlog label)
  ↓ (every 30 min, flow: pick-up-linear-tasks)
PP picks up highest-priority issue

Moves label: jfl/backlog → jfl/in-progress

Spawns: jfl peter pr --task "GitHub #N: <title>"

Agent makes changes, creates PR

CI runs eval

Score improves → auto-merge → close issue → jfl/done
Score regresses → request changes on PR

Issue Labels

LabelMeaning
jfl/backlogAvailable for PP pickup
jfl/in-progressPP is working on it
jfl/evalPR created, waiting for eval
jfl/doneMerged and closed
scope:jfl-cliTarget repo hint

Training Data Capture

Every PP action generates training tuples:
{
  "agent": "test-coverage",
  "state": { "composite_score": 0.1276 },
  "action": { "type": "add_tests", "description": "..." },
  "reward": { "composite_delta": 0.0031, "improved": true }
}
These feed the policy head for better action selection in future runs.

PP Commands

jfl peter daily                    # Full nightly loop
jfl peter agent list               # List configured agents
jfl peter agent <name> --rounds N  # Run specific agent
jfl peter agent swarm --rounds N   # Run all agents
jfl peter pr --task "<task>"       # Branch + change + PR
jfl peter status                   # Show status + recent events
jfl peter telemetry                # Run telemetry agent
jfl peter synthesize               # Regenerate product context