Skip to content

billion-token-one-task/ClawOSS

Repository files navigation

                         ░░░░░░░░░░░░░░░░░░░░░
                     ░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░
                  ░░░▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒░░░
               ░░▒▒▓▓▓▓████████████████████████▓▓▓▒▒░░
             ░░▒▓▓████████████████████████████████▓▓▒░░
            ░▒▓███████▀▀▀▀▀████████████▀▀▀▀▀███████▓▒░
           ░▒▓█████▀         ▀████████▀         ▀█████▓▒░
          ░▒▓████▀    ╔═══╗   ▀██████▀   ╔═══╗    ▀████▓▒░
         ░▒▓████     ║ ◉ ║    ▀████▀    ║ ◉ ║     ████▓▒░
         ░▒▓████     ╚═══╝     ████     ╚═══╝     ████▓▒░
         ░▒▓████▄              ████              ▄████▓▒░
          ░▒▓█████▄▄   ╔══════════════════╗   ▄▄█████▓▒░
           ░▒▓███████▄ ║  ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ║ ▄███████▓▒░
            ░▒▓████████║  ████████████████ ║████████▓▒░
             ░░▒▓██████║  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ║██████▓▒░░
               ░░▒▒▓▓██╚══════════════════╝██▓▓▒▒░░
                  ░░░▒▒▓▓▓████████████████▓▓▓▒▒░░░
                     ░░░░▒▒▒▒▓▓▓▓▓▓▓▓▓▓▒▒▒▒░░░░
                         ░░░░░░░░░░░░░░░░░░░░░

ClawOSS

[AUTONOMOUS] [V6] [32+ PRs] [23 REPOS] [1 MERGED]

An OpenClaw agent that autonomously discovers issues, implements fixes, and submits pull requests to open-source projects — 24/7, without human intervention.

OpenClaw is the engine. ClawOSS is the race car.


Quick Start

git clone https://github.com/onthebed/ClawOSS.git
cd ClawOSS
cp .env.example .env   # edit with your API keys
bash scripts/setup.sh
bash scripts/restart.sh

Continuous Run MVP Dry-Run

Use this path when validating the continuous-run MVP without creating a live PR:

cp .env.example .env   # fill model, GitHub, dashboard, and budget values
npm run mvp:dry-run

The runner completes 3 heartbeat cycles by default, checks dashboard pause and budget guardrails before work, discovers candidate GitHub issues, applies CLA / duplicate / already-fixed / blocklist / avoidRepos filters, generates PR title/body/creation command, and writes a report under reports/mvp-run-*.md. CLAWOSS_MVP_DISCOVERY_REPOS can be used to pin discovery to a controlled repo set during validation.

Useful options:

node scripts/mvp-runner.mjs --cycles 3 --max-candidates 20
node scripts/mvp-runner.mjs --cycles 3 --issue owner/repo#123

If /api/agent/health-check returns pauseAgent: true or budget.paused: true, the runner stops before spawning, commenting, pushing, or preparing PR creation.


First Run Stats

╔═══════════════════════════════════════════════════════════════════╗
║                                                                   ║
║   PRs Submitted ················· 32+                             ║
║   Repos Contributed To ·········· 23                              ║
║   PRs Merged ···················· 1  (badlogic/pi-mono#2166)      ║
║   Time to First PR ·············· 12 minutes autonomous           ║
║   Concurrent Sub-Agents ········· 5                               ║
║   Model ························· Kimi Code k2p5 (direct API)     ║
║   Content Filter 403s ··········· ZERO (PII sanitizer bypass)     ║
║   Peak Throughput ··············· 15 PRs in 85 minutes            ║
║                                                                   ║
╚═══════════════════════════════════════════════════════════════════╝

Architecture

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░                                                                                ░
░  ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓   ░
░  ┃          O P E N C L A W   G A T E W A Y   ( port 18789 )              ┃   ░
░  ┃                    mode: local · model: kimi-coding/k2p5               ┃   ░
░  ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛   ░
░                                 ┃                                              ░
░                                 ┃ heartbeat every 10m                          ░
░                                 ┃ lightContext: false                            ░
░                                 ▼                                              ░
░  ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓   ░
░  ┃                                                                        ┃   ░
░  ┃         ╔══════════════════════════════════════════════════╗            ┃   ░
░  ┃         ║          ORCHESTRATOR  (main session)           ║            ┃   ░
░  ┃         ║                                                  ║            ┃   ░
░  ┃         ║  reads: HEARTBEAT.md · AGENTS.md · SOUL.md      ║            ┃   ░
░  ┃         ║         memory/work-queue.md                     ║            ┃   ░
░  ┃         ║         memory/pr-ledger.md                      ║            ┃   ░
░  ┃         ║         memory/pipeline-state.md                 ║            ┃   ░
░  ┃         ║         memory/wake-state.md                     ║            ┃   ░
░  ┃         ║                                                  ║            ┃   ░
░  ┃         ║  runs:  oss-discover · oss-triage                ║            ┃   ░
░  ┃         ║         repo-analyzer · context-manager          ║            ┃   ░
░  ┃         ║                                                  ║            ┃   ░
░  ┃         ╚════╤════════╤════════╤════════╤════════╤════════╝            ┃   ░
░  ┃              │        │        │        │        │                      ┃   ░
░  ┃              │ sessions_spawn (maxConcurrent: 5)  │                     ┃   ░
░  ┃              │        │        │        │        │                      ┃   ░
░  ┃         ┌────▼───┐┌───▼────┐┌──▼─────┐┌─▼──────┐┌▼───────┐            ┃   ░
░  ┃         │ SUB  1 ││ SUB  2 ││ SUB  3 ││ SUB  4 ││ SUB  5 │            ┃   ░
░  ┃         │        ││        ││        ││        ││        │            ┃   ░
░  ┃         │ fresh  ││ fresh  ││ fresh  ││ fresh  ││ fresh  │            ┃   ░
░  ┃         │ context││ context││ context││ context││ context│            ┃   ░
░  ┃         │        ││        ││        ││        ││        │            ┃   ░
░  ┃         │ clone  ││ clone  ││ clone  ││ clone  ││ clone  │            ┃   ░
░  ┃         │ repro  ││ repro  ││ repro  ││ repro  ││ repro  │            ┃   ░
░  ┃         │ fix    ││ fix    ││ fix    ││ fix    ││ fix    │            ┃   ░
░  ┃         │ test   ││ test   ││ test   ││ test   ││ test   │            ┃   ░
░  ┃         │ submit ││ submit ││ submit ││ submit ││ submit │            ┃   ░
░  ┃         │ cleanup││ cleanup││ cleanup││ cleanup││ cleanup│            ┃   ░
░  ┃         └───┬────┘└───┬────┘└───┬────┘└───┬────┘└───┬────┘            ┃   ░
░  ┃             │         │         │         │         │                  ┃   ░
░  ┃             ▼         ▼         ▼         ▼         ▼                  ┃   ░
░  ┃         memory/subagent-result-<repo>-<issue>.md                       ┃   ░
░  ┃         then: rm -rf /tmp/clawoss-<issue>-<ts>/                        ┃   ░
░  ┃         then: reply ANNOUNCE_SKIP                                      ┃   ░
░  ┃                                                                        ┃   ░
░  ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛   ░
░                                 │                                              ░
░            ┌────────────────────┼──────────────────────┐                       ░
░            ▼                    ▼                       ▼                       ░
░  ┌─────────────────┐ ┌──────────────────┐  ┌──────────────────────┐            ░
░  │  GitHub          │ │  Vercel Dashboard │  │  Telemetry Hooks     │            ░
░  │  (configured user)│ │  /api/ingest/*    │  │  dashboard-reporter  │            ░
░  │                  │ │                   │  │  audit-logger         │            ░
░  │  PRs · Commits   │ │  heartbeat        │  │  pii-sanitizer       │            ░
░  │  Reviews         │ │  metrics          │  │  dashboard-sync.sh   │            ░
░  │  Follow-ups      │ │  conversation     │  │  pr-ledger-sync.sh   │            ░
░  │                  │ │  state · logs     │  │                      │            ░
░  └─────────────────┘ └──────────────────┘  └──────────────────────┘            ░
░                                                                                ░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

The Autonomous Loop — HEARTBEAT.md

Every 10 minutes, OpenClaw wakes the agent. It reads HEARTBEAT.md and executes this cycle:

▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒                                                                              ▒
▒                  ╭────────────────────╮                                       ▒
▒                  │  0a. CONTEXT HEALTH │                                      ▒
▒                  │  session_status     │                                      ▒
▒                  │  >70% → /compact   │                                      ▒
▒                  ╰─────────┬──────────╯                                      ▒
▒                            ▼                                                  ▒
▒                  ╭────────────────────╮                                       ▒
▒                  │  0b. CIRCUIT BREAK  │                                      ▒
▒                  │  wakes >= 50? stop  │                                      ▒
▒                  │  errors >= 2? stop  │                                      ▒
▒                  ╰─────────┬──────────╯                                      ▒
▒                            ▼                                                  ▒
▒       ╭────────────────────────────────────────╮                              ▒
▒       │  1. STALL RECOVERY                     │                              ▒
▒       │  sessions_list → stale >5min? kill     │                              ▒
▒       │  re-queue task, 2 strikes → skip       │                              ▒
▒       ╰───────────────────┬────────────────────╯                              ▒
▒                           ▼                                                   ▒
▒       ╭────────────────────────────────────────╮                              ▒
▒       │  2. PR FOLLOW-UPS                      │                              ▒
▒       │  gh pr list --author @me --state open  │                              ▒
▒       │  reviews → oss-followup                │                              ▒
▒       │  CI fail → fix & push                  │                              ▒
▒       │  merged → update pipeline-state.md     │                              ▒
▒       │  stale >7d → close politely            │                              ▒
▒       ╰───────────────────┬────────────────────╯                              ▒
▒                           ▼                                                   ▒
▒       ╭────────────────────────────────────────╮                              ▒
▒       │  3. PICK WORK                          │◀──────────────────╮          ▒
▒       │  merge staging files → work-queue.md   │                   │          ▒
▒       │  active >= 5 → skip to step 6          │                   │          ▒
▒       │  active < 5 → pick task (score >= 5)   │                   │          ▒
▒       │  skip if in pr-ledger (no duplicates)  │                   │          ▒
▒       │  queue < 5 → run oss-discover broadly  │                   │          ▒
▒       ╰───────────────────┬────────────────────╯                   │          ▒
▒                           ▼                                        │          ▒
▒       ╭────────────────────────────────────────╮                   │          ▒
▒       │  4. TRIAGE                             │                   │          ▒
▒       │  oss-triage: complexity, feasibility   │                   │          ▒
▒       │  repo-analyzer: repo health check      │                   │          ▒
▒       │  web_search: upstream context          │                   │          ▒
▒       ╰───────────────────┬────────────────────╯                   │          ▒
▒                           ▼                                        │          ▒
▒       ╭────────────────────────────────────────╮                   │          ▒
▒       │  5. SPAWN SUB-AGENT                    │                   │          ▒
▒       │  sessions_spawn with task:             │                   │          ▒
▒       │    clone → reproduce → implement       │                   │          ▒
▒       │    → verify → review → submit          │                   │          ▒
▒       │    → cleanup → ANNOUNCE_SKIP           │                   │          ▒
▒       │                                        │                   │          ▒
▒       │  LOOP BACK if active < 5 ─────────────┼───────────────────╯          ▒
▒       ╰───────────────────┬────────────────────╯                              ▒
▒                           ▼                                                   ▒
▒       ╭────────────────────────────────────────╮                              ▒
▒       │  6. HANDLE RESULTS                     │                              ▒
▒       │  read subagent-result-*.md files       │                              ▒
▒       │  success + PR URL → pipeline-state.md  │                              ▒
▒       │  no PR URL → re-queue once             │                              ▒
▒       │  failure → log reason                  │                              ▒
▒       │  disk cleanup: rm stale /tmp/clawoss-* │                              ▒
▒       ╰───────────────────┬────────────────────╯                              ▒
▒                           ▼                                                   ▒
▒       ╭────────────────────────────────────────╮                              ▒
▒       │  7. REPORT + SELF-WAKE                 │                              ▒
▒       │  dashboard-reporter: log cycle         │                              ▒
▒       │  update wake-state.md counters         │                              ▒
▒       │  active < 5? → go back to step 3       │                              ▒
▒       │  openclaw system event "cycle-complete" │                              ▒
▒       ╰────────────────────────────────────────╯                              ▒
▒                                                                              ▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

PII Sanitizer — Content Filter Bypass

The plugins/pii-sanitizer/index.js (101 lines) performs bidirectional @ swapping so OpenRouter never sees the @ symbol that triggers its content filter.

▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓                                                                             ▓
▓  var FULLWIDTH_AT = '\uFF20'   // @                                       ▓
▓                                                                             ▓
▓                      INCOMING (persist)                                     ▓
▓   ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄                                ▓
▓   sanitizeString(text)  →  text.replace(/@/g, FULLWIDTH_AT)                 ▓
▓         │                                                                   ▓
▓         ▼                                                                   ▓
▓   deepSanitize(value)   →  recurse strings, arrays, objects                 ▓
▓         │                                                                   ▓
▓         ▼                                                                   ▓
▓   sanitizeMessage(msg)  →  returns { message: cleaned }                     ▓
▓                                                                             ▓
▓                                                                             ▓
▓                      OUTGOING (execute)                                     ▓
▓   ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄                                ▓
▓   desanitizeString(text) → text.replace(FULLWIDTH_AT, '@')                  ▓
▓         │                                                                   ▓
▓         ▼                                                                   ▓
▓   deepDesanitize(value)  → same recursion, opposite direction               ▓
▓                                                                             ▓
▓                                                                             ▓
▓   register(api) hooks:                                                      ▓
▓                                                                             ▓
▓   ░ api.on('tool_result_persist')  → sanitize(@ → @)  file reads          ▓
▓   ▒ api.on('before_message_write') → sanitize(@ → @)  assistant output    ▓
▓   ▓ api.on('before_tool_call')     → desanitize(@ → @) write/edit/exec    ▓
▓                                                                             ▓
▓                                                                             ▓
▓      Disk (@) ──read──▶ Session (@) ──model──▶ Tool call (@→@) ──▶ Disk   ▓
▓                                                                             ▓
▓      OpenRouter never sees raw @  ──▶  zero 403 content filter errors       ▓
▓                                                                             ▓
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

Telemetry Pipeline

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░                                                                             ░
░  dashboard-reporter/handler.ts (628 lines)                                  ░
░  ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄                               ░
░                                                                             ░
░  State:  accumulatedInputTokens · accumulatedOutputTokens                   ░
░          toolCallCount · reposUsed (Set) · subagentMeta (Map)               ░
░  Cost:   INPUT_COST = $0.60/M  ·  OUTPUT_COST = $3.00/M                    ░
░                                                                             ░
░  Events:                                                                    ░
░  ┌──────────────────┬──────────────────────────────────────────────────┐    ░
░  │ user_message     │ postConversation({role:"user", content})        │    ░
░  │ after_tool_call  │ accumulate tokens + detect sessions_spawn       │    ░
░  │                  │ track repos via regex on JSON.stringify(params) │    ░
░  │                  │ relay sub-agent history (last 20 messages)      │    ░
░  │ agent_end        │ flush metrics + heartbeat + state + logs        │    ░
░  │                  │ costUsd = input * 0.6/M + output * 3.0/M       │    ░
░  │                  │ RESET all accumulators                          │    ░
░  └──────────────────┴──────────────────────────────────────────────────┘    ░
░                                                                             ░
░  Network:                                                                   ░
░  postNonBlocking(path, body)   → 2 attempts, 10s timeout, 3s retry          ░
░  postConversation(body)        → 1 attempt, 5s timeout, fire-and-forget     ░
░  postState(apiKey)             → reads work-queue.md + pipeline-state.md    ░
░                                                                             ░
░  ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─   ░
░                                                                             ░
░  audit-logger/handler.ts (133 lines)                                        ░
░  ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄                                   ░
░  Fire-and-forget structured logs. 10s timeout.                              ░
░  command:new → "Session started"   (info)                                   ░
░  after_tool_call → "Tool: {name}"  (debug / warn on error)                 ░
░  agent_end → "Run completed"       (info / error)                          ░
░                                                                             ░
░  ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─   ░
░                                                                             ░
░  dashboard-sync.sh (319 lines) — runs as background process                 ░
░  ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄                         ░
░  PID lock · md5 self-update every 60s · polls JSONL every 10s               ░
░  build_session_map() → python3 reads sessions.json for sub-agent metadata   ░
░  parse_content_blocks() → text/thinking/toolCall/tool_result                ░
░  ROLE_MAP: user→user, assistant→assistant, toolResult→tool_result           ░
░  curl POST /api/ingest/conversation per new message                         ░
░  curl POST /api/ingest/heartbeat with session counts                        ░
░                                                                             ░
░  ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─   ░
░                                                                             ░
░  pr-ledger-sync.sh (185 lines) — runs every 60s via launchd                 ░
░  ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄                            ░
░  Source 1: gh search prs --author "$GITHUB_USERNAME" --limit 200             ░
░  Source 2: grep subagent-result-*.md for PR URLs                             ░
░  Python merger: pr_map keyed by URL, GH is authoritative for status          ░
░  Result files fill in issue numbers, existing ledger preserves mappings      ░
░  Output: workspace/memory/pr-ledger.md (sorted markdown table)               ░
░                                                                             ░
░  All telemetry → clawoss-dashboard.vercel.app                                ░
░                                                                             ░
░  ┌──────────────────────────────────────────────────────────────────────┐    ░
░  │ /api/ingest/heartbeat     ← status, uptimeSeconds, repos           │    ░
░  │ /api/ingest/metrics       ← inputTokens, outputTokens, costUsd     │    ░
░  │ /api/ingest/conversation  ← sessionId, role, content, toolName     │    ░
░  │ /api/ingest/state         ← workQueue, pipelineState, activeRepos  │    ░
░  │ /api/ingest/logs          ← structured audit trail                 │    ░
░  └──────────────────────────────────────────────────────────────────────┘    ░
░                                                                             ░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Skills

Phase Skill What It Does
Discovery oss-discover gh search issues across all languages, score >= 5, write to queue
Discovery oss-triage Assess complexity (simple/medium/complex), decide attempt/skip/defer
Discovery repo-analyzer Repo health gate: stars, merge velocity, review rate, cache to repos/
Implement oss-implement Reproduce-first TDD: failing test → minimal fix → verify → evidence
Implement oss-review 7-gate quality check: scope, quality, tests, security, anti-slop, git, PR
Implement safety-checker 8-check final gate: budget, diff, secrets, branch, spam, CI, independent review
Submit oss-submit Push to fork, gh pr create, AI disclosure, log + report
Submit oss-followup Categorize review feedback, implement changes, max 3 rounds
Infra context-manager Monitor context %, flush at 80%, re-read after compaction
Infra dashboard-reporter Post telemetry to Vercel dashboard
Super systematic-debugging Root-cause-first, never guess
Super test-driven-development Red-green-refactor cycle
Super verification-before-completion Fresh evidence before claiming done
Super brainstorming Explore intent before complex design
Super requesting-code-review Dispatch isolated reviewer subagent

Cron Schedule

Job Schedule What It Does
work-queue-refill Every 2 hours oss-discover batch mode, score >= 5, write work-queue-staging.md
pr-followup-scan Every 30 min gh pr list --author @me, check reviews + CI, write followup-staging.md
daily-report 11pm daily Compile stats: submitted/merged/rejected, cost, acceptance rate
weekly-retrospective Mon 9am Review acceptance per repo, adjust scores, prune queue
memory-cleanup Sun 3am Archive >14d patterns, remove stale logs, prune closed PRs

Boot Sequence — scripts/restart.sh

░ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ░
░                                                                             ░
░  Step  1  ░░   source .env                                                  ░
░  Step  2  ░░░  git config user.name "$GITHUB_USERNAME"                      ░
░  Step  3  ░░░░ gh auth login --with-token                                   ░
░  Step  4  ▒▒▒▒ ln -sf workspace → ~/.openclaw/workspace                    ░
░  Step  5  ▒▒▒▒▒ sed __WORKSPACE_PATH__ → deploy config                     ░
░           ▒▒▒▒▒ python3: inject API keys, strip empties                     ░
░  Step  6  ▓▓▓▓▓▓ rm sessions/*.jsonl *.lock                                ░
░  Step  7  ▓▓▓▓▓▓▓ reset wake-state.md counters                             ░
░  Step  8  ▓▓▓▓▓▓▓▓ clean stale /tmp/clawoss-* dirs                         ░
░  Step  9  ███████████ openclaw gateway stop                                 ░
░  Step 10  ████████████ openclaw gateway install                             ░
░  Step 11  █████████████ nohup dashboard-sync.sh &                           ░
░  Step 12  ██████████████ launchctl load pr-ledger-sync                      ░
░  Step 13  ███████████████ openclaw system event --mode now                  ░
░           ███████████████ "Fill all 5 sub-agent slots. Go."                 ░
░                                                                             ░
░ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ░

Safety Defaults

Rule Limit
Max lines changed per PR 200
Max files per PR 5
Max PRs per repo per day 3
Max PRs total per day 10
Min gap between same-repo PRs 30 minutes
Fix attempts before abandon 2
Review rounds before disengage 3
Push to main/master NEVER
Force-push NEVER
Commit secrets/.env NEVER
GitHub token scope public_repo only
Branch naming clawoss/<type>/<description>
Commit format Conventional Commits

Project Structure

clawOSS/
├── config/
│   ├── openclaw.json ············ gateway + agent + compaction config
│   ├── cron-jobs.json ··········· 5 scheduled jobs
│   └── com.clawoss.pr-ledger-sync.plist
├── plugins/
│   └── pii-sanitizer/
│       └── index.js ············· 101 lines — bidirectional @ ↔ @
├── scripts/
│   ├── setup.sh ················· first-time install (145 lines)
│   ├── restart.sh ··············· 13-step full restart (146 lines)
│   ├── start.sh ················· register agent + cron + gateway
│   ├── stop.sh ·················· teardown
│   ├── health-check.sh ·········· verify all systems
│   ├── dashboard-sync.sh ········ poll JSONL sessions (319 lines)
│   └── pr-ledger-sync.sh ········ merge GitHub API + result files (185 lines)
├── dashboard/ ··················· Next.js 15 + shadcn/ui + Turso
└── workspace/ ··················· (symlinked to ~/.openclaw/workspace)
    ├── AGENTS.md ················ 163 lines — prime directive + rules
    ├── HEARTBEAT.md ············· 244 lines — 8-step autonomous loop
    ├── SOUL.md ·················· persona, tone, boundaries
    ├── IDENTITY.md ·············· configured GitHub identity
    ├── USER.md ·················· operator profile
    ├── hooks/
    │   ├── dashboard-reporter/ ·· 628 lines — telemetry to Vercel
    │   └── audit-logger/ ········ 133 lines — structured logs
    ├── skills/ ·················· 15 skills (10 custom + 5 superpowers)
    └── memory/ ·················· runtime state (agent-managed)
        ├── work-queue.md
        ├── pipeline-state.md
        ├── pr-ledger.md ········· auto-synced by pr-ledger-sync.sh
        ├── wake-state.md
        └── subagent-result-*.md

Dashboard

Live at clawoss-dashboard.vercel.app

  • Agent status + heartbeat
  • Live conversation feed (orchestrator + per-sub-agent tabs)
  • Token usage + cost tracking ($0.60/M input, $3.00/M output)
  • PR pipeline with status tracking
  • Structured audit logs
  • Work queue and pipeline state

How It Works — The Short Version

  1. Gateway wakes the agent every 10 minutes
  2. Orchestrator checks context health, handles PR reviews, picks work from the queue
  3. Sub-agents (up to 5 parallel) each clone a repo, reproduce the bug, write a failing test, implement a minimal fix, verify, and submit a PR
  4. Telemetry streams everything to the Vercel dashboard in real-time
  5. Cron jobs refill the work queue, scan for PR reviews, compile daily reports
  6. PII sanitizer swaps @ so the content filter never triggers
  7. PR ledger auto-syncs every 60s from GitHub API + sub-agent result files

The agent never stops. Empty sub-agent slots are filled immediately. Idle is failure.


License

MIT

About

modifications to OpenClaw that lets it autonomously make, judge, and submit & follow up PRs with 1 openclaw agent

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors