v0.0.2.15 Cloudflare Workers autonomous release pipeline. Runs 24/7 on */10 cron: every branch every 2h, cnei every 1h in between. Steered via command.datro.xyz joystick (left/right MD file bias).
datro-flywheel) running on a */10 * * * * cron schedule. KV namespace FLYWHEEL_STATE for persistent state (rotation index, index cards, cooldowns, hypothesis trees, eval metrics, lesson store, agent memories). No database or external runtime dependencies.
RATE_BY_GEAR = [7200, 5400, 3600, 2400, 1800, 1200, 600, 300, 120, 60]CNEI_RATIO = 1 (fires after every regular branch, not every 6th)honcho.ai and honcho.dev endpoints, falls back gracefully if both unreachable. No more silent failures.The agent can now self-manage its memory across runs via KV-backed tools:
remember key=name value=content — store a persistent fact/memory/lesson for this branchrecall key=name — retrieve a previously stored memory for this branchforget key=name — delete a stored memorylist_memories — list all stored memory keys for this branchMemory index maintained automatically; limit 200 entries per branch.
Every agent run reads lessons_{branch} KV at startup — the agent sees what went wrong in prior runs before making decisions. Lessons are recorded:
logFailureToKv)50 most recent lessons stored per branch.
Each run now scores on a composite metric:
Score = max(0, (planAdherence * 0.4 + changeScore * 0.6) - mcpPenalty)
benchmarkAgainstHistory() compares against last 10 runs, detects saturation and trends.
After agent commits changes, the flywheel re-reads each modified HTML file and validates:
<html> and <!DOCTYPE></body> and </html> tagsbranch-vX.X.X.XX)| Branch | Category | Purpose |
|---|---|---|
| cnei | platform | Flywheel engine - releases itself + all other branches |
| wayback | archive | Wayback evidence library at wayback.datro.xyz |
| bpvsbuckler | frontend | Main application |
| datro | frontend | Landing/documentation portal at datro.directory |
| + 15 more (althea, archives, carfinancecheque, ccan, ceo, dash, dcc, financecheque, gui, hbnb, library, llmwiki, piratelaw, subrepos, ui, wave) | ||
| Key | Purpose |
|---|---|
index_{branch} | Index card per branch (release count, cycle count, hypothesis tree) |
eval_{branch} | Eval metrics history (scores, trends, saturation) |
failure_{branch} | Failure log (last 20 entries) |
lessons_{branch} | Lesson store (last 50 lessons read before each agent run) NEW |
memory_{branch}_{key} | Agent-managed episodic memories NEW |
memory_index_{branch} | Memory key index for listing NEW |
last_run_{branch} | Unix timestamp of last run (cooldown tracking) |
rotation | Round-robin state (regular_index, cnei_queue, lap, mode) |
config | Gear setting (1-10, higher = faster cycles) |
bias | Steering bias (direction, magnitude, risk tolerance) |
brain_updated | Timestamp of last brain memory refresh (cached 1h) NEW |
lock | Concurrency lock (TTL 1 hour) |
wallet_{branch}_{type} | Branch wallet cache (TTL 24h) |
bounty_{branch} | Gitlawv bounty claim history |
last_cnei_release | Latest cnei release tag + timestamp |
mcp_last_scan | Last MCP scan cache |
| Tool | Description |
|---|---|
read_file | Read a file from any branch |
write_file | Write content to a file (commits immediately) |
list_branches | List all branches and their latest commit |
search_code | Search codebase for a pattern |
run_scan | Run a third-party MCP scan on a URL |
honcho_memory | Read/write Honcho memory for this branch |
wallet_info | Get crypto wallet info for any branch |
brainstorm | Ask the LLM a question for creative thinking |
remember | NEW Store a persistent fact/memory/lesson |
recall | NEW Retrieve a stored memory |
forget | NEW Delete a stored memory |
list_memories | NEW List all memory keys for this branch |
gitlawv_bounty_list | List open gitlawb bounties |
gitlawv_bounty_claim | Claim a gitlawb bounty |
gitlawv_bounty_submit | Submit completed work for a claimed bounty |
Cloudflare Workers free-plan KV limits: 100K reads / 1K writes per day.
Optimisations applied to stay within budget:
aggregateMemory cached with 1h TTL (was running every 10min) OPTIMISEDEstimated daily usage: ~400 reads / ~300 writes.
| Branch | Quota |
|---|---|
bpvsbuckler | 1 new original timeline event (BP vs Buckler 1987, Great House Farm) |
wayback | 1 new evidence item (photo, text, video, PDF) added to catalogue |
all others | 1 unique feature (SEO, legal, agent-readability, or API endpoint) + bug fixes |
*.left.md wing files; Right/E favours *.right.md. Up/N favours *.high.md; Down/S favours *.low.md. Set via command.datro.xyz.Missing left/right wing files are auto-seeded on first release cycle per branch (ensureWingFiles).
Each wayback re-release adds at least 1 new evidence entry to the library at wayback.datro.xyz — enforced by BRANCH_QUOTAS.wayback in the flywheel agent prompt.
Push to cnei branch -> GitHub Action (cnei-safe-release.yml)
-> wrangler deploy -> Cloudflare Workers (datro-flywheel)
-> Cron every 10 min -> Cooldown: 2h regular / 1h cnei
-> Each cycle: lessons -> plan -> research -> agent loop
-> eval (multi-metric) -> self-verify -> release
-> GitHub releases + Monday.com sync (dedup'd) + admin notes