mit einem Klick
evolve-loop
12-hour autonomous evolution loop — observe, measure, diagnose, fix, repeat every 10min. Drives zero-touch rate up by finding friction and dispatching fixes.
Menü
12-hour autonomous evolution loop — observe, measure, diagnose, fix, repeat every 10min. Drives zero-touch rate up by finding friction and dispatching fixes.
ASCII art: pyfiglet, cowsay, boxes, image-to-ascii.
Knowledge comics (知识漫画): educational, biography, tutorial.
Infographics: 21 layouts x 21 styles (信息图, 可视化).
Generate images, video, and audio with ComfyUI — install, launch, manage nodes/models, run workflows with parameter injection. Uses the official comfy-cli for lifecycle and direct REST/WebSocket API for execution.
Pixel art w/ era palettes (NES, Game Boy, PICO-8).
Run multi-hour autonomous coding tasks using a 5-agent harness: Researcher, Planner, Executor (with Opus advisor), Evaluator, and Orchestrator. Combines Anthropic's advisor strategy, GAN-inspired generator/evaluator design, and Boris Tane's annotation-cycle workflow.
| name | evolve_loop |
| description | 12-hour autonomous evolution loop — observe, measure, diagnose, fix, repeat every 10min. Drives zero-touch rate up by finding friction and dispatching fixes. |
| type | skill |
Autonomous self-improving loop that observes the AO ecosystem, measures zero-touch rate, diagnoses friction, creates beads for gaps, dispatches fixes via /claw, and records everything. Runs via /loop 10m for max 12 hours.
Notes (implementation): Run /auton using ~/.claude/skills/auton/SKILL.md (read CLAUDE.md, agent-orchestrator.yaml, SOUL.md first). ao-pr-poller is deprecated — never treat its absence as failure. Lifecycle launchd label may be ai.agento.lifecycle-all or com.agentorchestrator.lifecycle-smartclaw — verify with launchctl list | rg -i lifecycle. Harness-specific backlog eloop: skills/smartclaw-eloop.md (see also .claude/skills/smartclaw-eloop/SKILL.md).
After completing Phase 7 (Recap), IMMEDIATELY start Phase 1 of the next cycle. Do NOT:
The loop runs autonomously until one of these termination conditions:
/checkpoint before hitting limit)If the user said "keep going" or "until stable" — that is a STANDING DIRECTIVE. Treat it as permanently active until a termination condition is met.
This loop is problem-driven. If the system is healthy:
Decision tree after Phase 2 (Measure):
Chronic problem detection: If zero-touch rate has been below 20% for 3+ consecutive cycles, escalate to code-level diagnosis — read the actual automation code (skeptic-cron.yml, lifecycle-manager.ts, agentRules) to find bugs, don't just check infrastructure liveness.
1a. Run /auton — get autonomy diagnostic across all repos.
1b. Check AO workers — for each repo AO manages:
jleechanorg/agent-orchestrator (primary)jleechanorg/worldai_claw (worldai)jleechanorg/smartclaw (orchestration — deprecated but may have active workers)# List active AO sessions
tmux list-sessions 2>/dev/null | grep -E '(ao|jc|wa|cc|ra|wc)-[0-9]+'
# Per-repo open PRs
for repo in agent-orchestrator worldai_claw smartclaw; do
gh api "repos/jleechanorg/$repo/pulls?state=open&per_page=20" \
--jq '.[]|"\(.number) \(.head.ref) \(.mergeable_state)"' 2>/dev/null
done
1c. Read worker tmux conversations — capture last 30 lines from each active ao-* worker. Look for:
for sess in $(tmux list-sessions -F '#{session_name}' 2>/dev/null | grep -E '^(bb5e6b7f8db3-)?(ao|jc|wa|wc)-[0-9]+$'); do
echo "=== $sess ==="
tmux capture-pane -t "$sess" -p 2>/dev/null | tail -30
done
1d. Merged-PR zombie sweep — kill workers burning tokens on already-merged PRs (session names may be hash-prefixed, e.g. bb5e6b7f8db3-ao-3323):
echo "=== MERGED-PR ZOMBIE SWEEP ==="
for sess in $(tmux list-sessions -F '#{session_name}' 2>/dev/null | grep -E '(bb5e6b7f8db3-)?(ao|jc|wa|wc)-[0-9]+'); do
pr_num=$(tmux capture-pane -t "$sess" -p 2>/dev/null | grep -oE "PR: #[0-9]+" | head -1 | grep -oE "[0-9]+")
[ -z "$pr_num" ] && continue
case "$sess" in
*-ao-*) repo="jleechanorg/agent-orchestrator" ;;
*-jc-*) repo="jleechanorg/smartclaw" ;;
*-wa-*) repo="jleechanorg/worldarchitect.ai" ;;
*-wc-*) repo="jleechanorg/worldai_claw" ;;
*) continue ;;
esac
merged=$(gh api "repos/$repo/pulls/$pr_num" --jq '.merged' 2>/dev/null)
if [ "$merged" = "true" ]; then
echo " ZOMBIE: $sess on PR #$pr_num ($repo) — killing"
tmux kill-session -t "$sess" 2>/dev/null && echo " KILLED $sess" || echo " FAILED to kill $sess"
fi
done
1e. Read fiction/novel entries — workers write friction narratives in novel/ and docs/novel/:
# Check for recent novel entries (last 24h)
find novel/ docs/novel/ -name '*.md' -newer /tmp/evolve_loop_last_run 2>/dev/null
# Read any new entries for friction signals
Calculate the [agento] zero-touch rate per the SOUL.md convention:
# Merged PRs in last 24h with [agento] tag analysis
gh api 'repos/jleechanorg/agent-orchestrator/pulls?state=closed&per_page=30&sort=updated&direction=desc' \
--jq '.[] | select(.merged_at != null and .merged_at > "YESTERDAY_ISO") |
{number, title: .title[:70], agento: (.title | test("^\\[agento\\]"))}'
For each non-[agento] merged PR, determine WHY:
3a. Run /harness on each new friction point found. /harness asks:
3b. Check existing beads — don't duplicate:
br list --open 2>/dev/null | head -30
3c. Stale bead detection — beads marked in_progress with no active worker are zombies:
# For each in_progress bead, check if any tmux session is working on it
cat .beads/issues.jsonl | python3 -c "
import sys, json
for line in sys.stdin:
try:
d = json.loads(line.strip())
if d.get('status') == 'in_progress':
print(f\"{d['id']} | {d.get('title','')[:60]}\")
except: pass
" 2>/dev/null
For each in_progress bead, search active tmux sessions for mentions. If no session references it AND the bead's PR (if any) is merged/closed, the bead is stale — dispatch a fresh worker or close it.
3d. Automation code audit (when zero-touch rate < 20%): When the merge pipeline is chronically broken, don't just check infrastructure — read the automation code:
.github/workflows/skeptic-cron.yml — are gate checks correct?packages/core/src/lifecycle-manager.ts — are reactions firing correctly?~/.smartclaw/agent-orchestrator.yaml — are agentRules and reactions configured correctly?
Compare what the code does vs what the 7-green definition says. Log specific bugs found.4a. Run /nextsteps — situational assessment and roadmap update.
4b. Prioritize — rank fixes by impact on zero-touch rate:
5a. Create/update beads for each new friction point:
br create --priority P1 --title "..." --body "..." 2>/dev/null
5b. Update roadmap doc — append findings to roadmap/evolve-loop-findings.md:
## YYYY-MM-DD HH:MM cycle
### Zero-touch rate: X% (N/M)
### New friction points: [list]
### Fixes dispatched: [list]
### Beads created: [list]
5c. Push to origin main:
git add roadmap/evolve-loop-findings.md .beads/issues.jsonl
git commit -m "docs(evolve): cycle YYYY-MM-DD HH:MM — zero-touch X%, N friction points"
git push origin main
6a. Use /claw for each actionable bead:
# /claw dispatches to ao spawn or manual worktree+claude
# ALWAYS include /er and /learn in the task — every worker must validate evidence and record learnings
/claw "Fix bd-XXX: <description>.
After implementing:
1. Run /er on the PR evidence bundle to validate authenticity — fix any evidence issues before merging
2. Ensure 7-green (CI, no conflicts, CR APPROVED, Bugbot clean, comments resolved, evidence reviewed, Skeptic PASS)
3. Run /learn to capture any reusable patterns"
6b. Babysit open PRs — for each open PR not owned by a live worker:
gh api 'repos/jleechanorg/agent-orchestrator/pulls?state=open&per_page=20' \
--jq '.[] | {number, title: .title[:60], head: .head.ref, mergeable_state}' 2>/dev/null
For each PR without a live AO session:
@coderabbitai all good?/er inline and fix PR body@coderabbitai approve to trigger skeptic if needed6c. Run /er on PRs approaching 7-green — for any PR where:
Run /er inline (not delegated to worker) to validate evidence NOW:
/er <PR-number>
If /er finds issues: edit the PR body directly via gh api repos/.../pulls/N --method PATCH -f body="..." and push a new commit if code changes are needed. Do NOT wait for a worker — fix it yourself.
6d. If /claw fails (GraphQL exhausted, session cap, etc.):
claude --dangerously-skip-permissions in tmux6e. Pre-merge 7-green verification (MANDATORY before ANY merge):
# Before merging ANY PR, verify 7-green. NEVER skip this.
PR_NUM=NNN; REPO="jleechanorg/REPO"
echo "=== PRE-MERGE 7-GREEN CHECK PR #$PR_NUM ==="
# Gate 0: Not already merged/closed
STATE=$(gh api "repos/$REPO/pulls/$PR_NUM" --jq '{state, merged}')
echo "$STATE" | grep -q '"merged":true' && echo "ALREADY MERGED — skip" && continue
# Gate 1: CI green
CI=$(gh api "repos/$REPO/commits/$(gh api repos/$REPO/pulls/$PR_NUM --jq '.head.sha')/status" --jq '.state')
echo " [1] CI: $CI"
# Gate 2: No conflicts
MERGEABLE=$(gh api "repos/$REPO/pulls/$PR_NUM" --jq '.mergeable_state')
echo " [2] Mergeable: $MERGEABLE"
# Gate 3: CR APPROVED
CR=$(gh api "repos/$REPO/pulls/$PR_NUM/reviews" --jq '[.[] | select(.user.login=="coderabbitai[bot]") | select(.state=="APPROVED" or .state=="CHANGES_REQUESTED")] | sort_by(.submitted_at) | last | .state // "NONE"')
echo " [3] CR: $CR"
# Gate 5: Unresolved comments (GraphQL)
UNRESOLVED=$(gh api graphql -f query='query($pr:Int!){repository(owner:"'$(echo $REPO|cut -d/ -f1)'",name:"'$(echo $REPO|cut -d/ -f2)'"){pullRequest(number:$pr){reviewThreads(first:100){nodes{isResolved}}}}}' -F pr=$PR_NUM --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved==false)] | length' 2>/dev/null || echo "?")
echo " [5] Unresolved: $UNRESOLVED"
# Gate 6: Evidence reviewed — run /er and check result
echo " [6] Running /er on PR #$PR_NUM..."
# (run /er inline — if INSUFFICIENT or FAIL, block merge)
# Gate 7: Skeptic PASS
SKEPTIC=$(gh api "repos/$REPO/issues/$PR_NUM/comments" --jq '[.[] | select(.body | test("VERDICT:"; "i"))] | sort_by(.created_at) | last | .body' 2>/dev/null | grep -oiE "VERDICT: (PASS|FAIL|SKIPPED)")
echo " [7] Skeptic: $SKEPTIC"
# BLOCK if not 7-green
if [ "$CI" != "success" ] || [ "$MERGEABLE" = "dirty" ] || [ "$CR" != "APPROVED" ] || [ "$UNRESOLVED" != "0" ] || [ "$SKEPTIC" != "VERDICT: PASS" ]; then
echo " *** BLOCKED — NOT 7-GREEN. DO NOT MERGE. ***"
# DO NOT proceed to merge. Report blockers and move on.
else
echo " *** 7-GREEN — safe to merge ***"
fi
NEVER merge a PR that fails this check. If a PR is not 7-green, dispatch a worker to fix it — do not merge it to "show progress."
6f. REST API fallback — always prefer REST over GraphQL:
# Merge via REST (ONLY after 6e verification passes)
gh api repos/OWNER/REPO/pulls/NUM/merge --method PUT -f merge_method=squash
# Create PR via REST
gh api repos/OWNER/REPO/pulls --method POST -f title="..." -f head="BRANCH" -f base="main" -f body="..."
# Post comment via REST
gh api repos/OWNER/REPO/issues/NUM/comments --method POST -f body="..."
Output a concise cycle summary:
## Evolve Loop Cycle — HH:MM
- Zero-touch rate: X% (trend: ↑/↓/→)
- Workers: N alive, N dead, N stuck
- PRs: N open, N merged since last cycle
- Friction: N new points found
- Fixes: N dispatched via /claw, N direct
- Beads: N created, N updated
- Roadmap: pushed to main
Touch the timestamp file for next cycle:
touch /tmp/evolve_loop_last_run
# Start the loop (via /loop skill)
/loop 10m /eloop
# Or manually for one cycle
/eloop
The /loop wrapper handles the 12-hour max and 10-minute interval. Each /eloop invocation runs one complete cycle.
roadmap/evolve-loop-findings.md — cumulative findings log.beads/issues.jsonl — bead tracker~/.smartclaw/SOUL.md — zero-touch convention ([agento] prefix)~/.smartclaw/agent-orchestrator.yaml — agentRules confignovel/ — worker friction narratives