docs(examples): add builder-adversary-stateless — context-lean variant
Same pattern + AI-as-adversary verification as builder-adversary-min, but the
role prompts add CONTEXT HYGIENE: /compact at every checkpoint (lossless — state
is on disk), read diffs not trees, spill bulk output to files, adversary loads
only {plan, STATUS, diff}. Loop agents non-resumed → fresh session per phase.
Targets cache-read (the dominant cost in a long loop) without changing what the
agents do or how they verify.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
92
examples/builder-adversary-stateless/agents.toml
Normal file
92
examples/builder-adversary-stateless/agents.toml
Normal file
@ -0,0 +1,92 @@
|
||||
# examples/builder-adversary-stateless — context-lean variant of ../builder-adversary-min.
|
||||
#
|
||||
# Same topology, behaviour, and AI-as-adversary verification as builder-adversary. The prompts add a
|
||||
# CONTEXT HYGIENE discipline (compact at every checkpoint, read diffs not trees, spill bulk to files,
|
||||
# adversary loads only {plan, STATUS, diff}) so each loop carries/reloads minimal conversation —
|
||||
# cache-read is the dominant cost in a long loop. Loop agents are NOT resumed (default below), so the
|
||||
# watchdog gives a fresh session per phase. See README.md.
|
||||
#
|
||||
# python3 ../../agents.py status --config agents.toml
|
||||
# python3 ../../agents.py up --config agents.toml # needs `claude` on PATH
|
||||
|
||||
[watchdog]
|
||||
signal_interval = 30
|
||||
heavy_interval = 300
|
||||
limit_probe_fallback = 300
|
||||
limit_reset_slack = 45
|
||||
stall_grace = 180
|
||||
|
||||
[defaults]
|
||||
session_prefix = "bastl-" # REQUIRED — sessions: bastl-builder, bastl-adv, …
|
||||
log_dir = ".ao-state"
|
||||
backend = "claude" # set to "demo" for a dependency-free mechanics-only run
|
||||
model = "claude-sonnet-4-6"
|
||||
watch = "heal"
|
||||
|
||||
[backend.claude]
|
||||
bin = "claude"
|
||||
flags = "--dangerously-skip-permissions"
|
||||
remote_control = true
|
||||
supports_resume = true
|
||||
prompt_delivery = "arg"
|
||||
process_name = "claude"
|
||||
submit_key = "Enter"
|
||||
stall_idle = 300
|
||||
active_re = "esc to interrupt|Running tool|⠇|⠙|· \\d+"
|
||||
limit_re = "spend limit|usage limit|limit reached|reached your .*limit|out of (credits|tokens)"
|
||||
fatal_re = "redacted_thinking|blocks cannot be modified|cannot be modified"
|
||||
|
||||
[backend.demo]
|
||||
bin = "echo '[demo] {session} up (kickoff: {kickoff})'; exec sleep 1000000"
|
||||
prompt_delivery = "exec"
|
||||
|
||||
[[agent]]
|
||||
name = "builder" # tmux session: bastl-builder
|
||||
kind = "loop"
|
||||
role = "builder"
|
||||
dir = "./work"
|
||||
watch = "heal+stall"
|
||||
|
||||
[[agent]]
|
||||
name = "adversary"
|
||||
session = "bastl-adv"
|
||||
kind = "loop"
|
||||
role = "adversary"
|
||||
dir = "./work-adv"
|
||||
watch = "heal+stall"
|
||||
|
||||
[[agent]]
|
||||
name = "orchestrator" # tmux session: bastl-orchestrator
|
||||
kind = "persistent"
|
||||
model = "claude-opus-4-8"
|
||||
resume = true
|
||||
watch = "heal"
|
||||
prompt = "You supervise this Builder/Adversary project. On startup: read machine-docs/ for the current phase's STATUS/REVIEW, confirm both loops + the watchdog are up, report the phase and any open findings/VETO. Then stay available; intervene only if the pair is stuck."
|
||||
|
||||
[[agent]]
|
||||
name = "reporter" # tmux session: bastl-reporter
|
||||
kind = "task"
|
||||
model = "claude-opus-4-8"
|
||||
watch = "none"
|
||||
enabled = false
|
||||
prompt = "The phase sequence is complete. Read machine-docs/ across all phases, write a short machine-docs/REPORT.md (what was built, each gate's final verdict, deferred items), then go idle."
|
||||
|
||||
[[service]]
|
||||
name = "cleanlogs"
|
||||
command = "python3 ../../agent-log.py follow-all"
|
||||
dir = "."
|
||||
|
||||
[loop]
|
||||
state_file = "phase-idx"
|
||||
resume_phase = true
|
||||
auto_advance = true
|
||||
done_marker = "## DONE"
|
||||
kickoff_template = "prompts/kickoff.md"
|
||||
roles_dir = "prompts"
|
||||
handoff = { repo = "./work", claim_pings = "adversary", review_pings = "builder", inboxes = ["ADVERSARY-INBOX.md", "BUILDER-INBOX.md"], claim_pattern = "^claim", review_pattern = "^review", state_subdir = "machine-docs" }
|
||||
on_complete = { trigger_file = ".run-report-on-complete", run = "reporter" }
|
||||
|
||||
phases = [
|
||||
{ id = "wc", plan = "plans/wc.md", status = "STATUS-wc.md" },
|
||||
{ id = "json", plan = "plans/json.md", status = "STATUS-json.md", models = { builder = "claude-opus-4-8" } },
|
||||
]
|
||||
Reference in New Issue
Block a user