15 tests (the run end to end against a fake GitHub tarball, safeword, the three phrases, veto revert, owner-only API, cross-site refusal, daily cap). dev.mjs takes POST bodies and a memory store. deploy.py creates the time-quc KV namespace and binds the Venice key as a Worker secret. quc.yml tests and deploys on main and skips the deploy until CLOUDFLARE_API_TOKEN is staged; ci.yml runs the quc tests on PRs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EVg99kQMY2Tumhobuyg7Fm
page.js: start screen, live chair view (read-only diffs and commentary), the safeword, the box, a replay scrubber for anyone with the link, the aftermath card and patch download. worker.js: the API with a visitor cookie, same-origin POSTs and daily caps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EVg99kQMY2Tumhobuyg7Fm
agent.js reads a public repo from GitHub's tarball (nothing executed), plans up to 4 files and rewrites them with a coding model, and narrates with Grok, via Venice; offline answers without a key. engine.js runs one step per call (clone, plan, rewrite a file, wrap up), with the safeword, the three key phrases (notes, a file veto that reverts, the wheel) and the patch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EVg99kQMY2Tumhobuyg7Fm
validate.js is shared by the page and the server; diff.js is a Myers line diff with unified patches (fuzzed against GNU patch); runs.js is #239's run model extended with notes, vetoes, the work store and a memory store for tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EVg99kQMY2Tumhobuyg7Fm
cloudflare/inference.js: one Worker (time-inference) at inference.<TIME_VENTURE_DOMAIN> holding VENICE_API_KEY as a
secret; venture pages send the same bodies they would send Venice, with an x-app header. Allowlisted routes (chat,
music quote/queue/retrieve/complete, image generate), allowlisted models, size caps, and per-person / per-app daily
quotas in D1 (the same counter pattern as worker.js). inference.py deploys it; idempotent.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K6897PWcUEwHiqZMcVnNF6
Dispatch it with a card number (or `new`) and it walks that card scout -> research/pitch -> board -> plan -> build ->
check/fix/judge/launch -> measure, each step `venture.py stage <card> <at>`, which does nothing when the card stands
elsewhere. Import the file at havre.yolopreneur.lol/open and it is a chain of eleven Step nodes; export brings it back
identical, with any Venice nodes spliced in as runner steps.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: open-workflows-venture-loop
`python3 .github/time/venture.py stage <card> [<at>]` advances one card once, only when it stands at <at> (a
step that isn't due is not a failure); `stage new [<title>]` opens a card and prints its number. The venture
loop is now also a chain of these in .github/workflows/venture-loop.yml, which Havre's /open imports as nodes.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: open-workflows-venture-loop
A run's source checkout is taken at job start; the gh-pages checkout it commits to is taken minutes later, after
the queue and the build. Copying the whole folder reverted whatever landed in between (it just undid two commits
to Havre). Now the build's own diff is applied to the newest gh-pages, three-way; `from` keeps the whole-folder
landing, which is what it's for.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VAvUH72XsdCitHdh3t7mjr
Cloud revisions: a reviewed cloud PR that gets new commits is reviewed again (#201)
When the copy moves a branch whose PR is open and already reviewed, sync posts a `dispatched` beat marked `revised` on each card it closes and takes `needs-human` off the PR, so the heartbeat reviews the new head.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
The cloud lane: cloud sessions build cards on the cloud-session credit (#197)
Astra labels the best M cards `cloud` (up to 3 in the lane); the launcher on hb-5 starts a claude --cloud session per card on the GitHub copy; sync brings the branch home as a PR that closes the card and moves it cloud -> ready; the heartbeat adopts and the council lands it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
time/worker-run sed -n 845,885p .github/time/test_time.py; tail -5 .github/time/test_time.py
Budget: the monthly cap counts out-of-pocket money; credit is limited by its pool (#193)
credit_covered(): what an expiring pool's prepaid credit paid this month, within its balance and before it lapses, is left out of the month TIME_MONTHLY_USD caps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
Router: a card that waits is never picked; Astra gets TIME_WORKER (#185)
An open Depends on #N, or the seat's blocked note, keeps a card out of the picks and after the movable cards in the promotion order. astra.yml passes TIME_WORKER and TIME_PACE.
Closes#184.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
Two dry rankings (2026-10-19 01:02 and 13:14 UTC) put the right cards on top (#135, #175), dropped blocked #84 once it was known stale, and kept L cards out. The two gaps they showed are fixed: money left is the worker's pool (#181, closes#175) and repeat cards aren't written (#181); the stall that kept promotion from happening at all is fixed (#183, closes#135).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
Router: money left is the worker pool's allowance; no repeat cards (#181)
money_left(): the allowance left in the pool that takes TIME_WORKER's route, else the daily cap's remainder, capped by the month's. The seat sees cards closed in the last 14 days; a new card repeating an open or lately closed one is not written.
Closes#175.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
Sync: a repo's copies on other forges follow its home (#177)
sync.py + time/sync.json + the sync workflow. One home per repo, one writer per branch: main goes out to every copy
fast-forward only (a diverged copy is a needs-human issue, never overwritten, unless forced once); a copy's claude/*
branches come home as PRs for the council. First copy: github.com/teahubxyz/time, skipped until GITHUB_MIRROR_TOKEN.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
time/worker-run cd .github/time; grep -n "stuck_h =\|auto_max =\|TIME_AUTO_RETRY" time.py | head | cut -c1-220; sed
The owner's credit: $200 granted 2026-10-13, $162.22 left on the 18th by the console, expiring 2026-11-08. The ledger
books $38.51 of Claude spend since the grant, so $161.49 as of the 19th. Paced over the 20 days left that is about
$8/day for the anthropic route; the $100 monthly cap stays hard and binds first in October.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
Adaptive budget: pace spend to each capacity pool (#174, re-cut of #167)
The worker's #82 change (sonnet via Time): budget_check(route) paces each call to its capacity pool in
time/pools.json (expiring credit spread over the days left, refilling windows, or TIME_DAILY_USD without a pool);
the monthly cap stays hard. pools.json is read through the API once per run, since every workflow checks out only
.github/time. Ships empty: nothing changes until it is filled in. Closes#82.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
Router v1: the factory ranks its own next work, dry to start (#169)
Astra's seat judges every candidate (kind, value, size); router.py ranks them with the owner's weights per kind
(time/router.json), a restless boost and card age. dry posts the table; live queues from the top within the day's
money and the heartbeat promotes queued cards in ranked order. Astra reads the last 14 days of its log. Closes#168.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
venture: the lead (opus) researches and picks the day's venture alone; fable is out (#164)
One seat, TIME_VENTURE_LEAD (opus), runs the day's venture: a research round over the top trending repos (with the
start of their READMEs) and the studio's track record, TIME_VENTURE_FIELD candidates with a verdict each, one pick;
no pitches, no vote. It writes the launch plan alone and judges the build, and hands the launch drafts to its helper
(TIME_VENTURE_HELPER, sonnet). The chair and judge default to opus. Batches keep the board; TIME_VENTURE_LEAD=board
brings it back for the daily venture. Closes#165.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
venture: one venture a day, built for quality (#162)
The day's card starts only once every other venture card is launched or held; the board picks one from a field of
TIME_VENTURE_FIELD (6) pitches; opus builds; the judge scores the product 1-10 and a page under TIME_VENTURE_BAR (8)
gets polish rounds (never the last of TIME_VENTURE_FIXES=3), then launches with its score. An open batch card with
no Time beats no longer starts a batch while batches are off. Closes#163.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
venture.yml: install Chromium for the browser pass (#157)
The first Claude ventures launched without the browser pass (no Chrome on the runner): no headless checks, no
contact sheet for the portfolio. One step installs Chromium in the job image; venture.py's chrome() finds it.
Merged on the owner's word, CI green (run 1014).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
venture.yml: every 6 hours, Claude seats (#141)
Owner's call: the venture loop runs every 6 hours instead of every 20 minutes, on the Claude seats.
The builder is vars.TIME_VENTURE_WORKER || claude:sonnet, decoupled from the heartbeat's worker.
Merged on the owner's word after the council approved the engine half (#140).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
Workflows batch: heartbeat knobs, housekeeping.yml, its test in CI (#127)
heartbeat.yml passes TIME_CAP_SLACK, TIME_ANTHROPIC_API (the caching kill switch), TIME_REVIEW_TIEBREAK and TIME_REVIEW_QUORUM; housekeeping.yml runs the daily sweep at 13:17 UTC; ci.yml runs test_housekeeping.py. Owner-approved merge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
checks(): a status from one of Time's own workflows is not a check (#124)
A seat's review wakes heartbeat.yml during a heartbeat; the concurrency group cancels the run and Gitea records it as a failure on the PR head. Those statuses neither block nor earn a merge; CI decides. Owner-approved merge.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
labs/aicharts: fast mode (Clef first, LLM checks) as demo default (#42)
Opened 2026-10-14 by a Claude Code session under the owner's login, which is why it read as the operator's PR for three days. Lab-only and reversible: Clef-flash draws first, the LLM checks in parallel, the chart is redrawn only on disagreement; API callers keep the LLM default. The lab's tests pass on the branch (run 652, "aicharts: all good"); its deploy step cannot run from prod, which holds no Cloudflare secrets, so nothing is deployed by this merge.
Squash-merged by the CEO session on the owner's explicit instruction.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
One Gitea user per seat (model line); the reviewer's verdict becomes a real review by that seat's own user once #76 lands. TIME_SEAT_CLAUDE stays until then as the umbrella.
On the owner's explicit instruction (CEO session).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
TIME_PROTECTED governs every protected path except the workflow directories (#81)
touches_protected() hard-coded all of .github/ and .gitea/ on top of TIME_PROTECTED, so the engine under .github/time/ could never land without a human. Only the workflow directories stay hard-coded; DEFAULT_PROTECTED is unchanged. With this repo's TIME_PROTECTED narrowed, card PRs under .github/time/ with a trusted Approve and green checks merge via the time bot.
CI green on 3b757fa. Squash-merged by the CEO session on the owner's explicit instruction.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
The job timeout moves from 20 to 55 minutes: workers can overlap inside one run (#75), and at 20 every in-flight worker died together. TIME_SEAT_CLAUDE reaches the heartbeat so the reviewer can post as the `claude` user once #76 lands; until then it is unused.
Both on the owner's explicit instruction (CEO session).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
time/worker-run git fetch origin gh-pages 2>&1|tail -1; git show FETCH_HEAD:ventures/dollhouse/app.js | sed -n 140,3
seed: land a venture built elsewhere on yolopreneur.lol (#64)
Actions -> seed -> Run workflow with a slug, the URL(s) of a .tgz whose top folder is the slug, and its sha256
(plus a name and a one-liner for a new venture). seed.py checks the bundle, copies it over ventures/<slug>/ on
gh-pages in one commit, adds or refreshes the venture's line in ventures/ventures.json, and the workflow asks
Teahub pages to pull. Nothing in the bundle runs. test_seed.py runs in CI. Merged at the owner's request.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9wtGiGEeq1H5DA3T88PRe
- checks(): the worker's own time/worker-run status can block or delay a merge but never counts as green
- dispatch_ci(): with no other check on the head, Time runs TIME_CI_WORKFLOW (ci.yml, workflow_dispatch) on the PR branch and waits; beat ci-dispatched, once
- ci.yml accepts workflow_dispatch
- touches_protected(): .github/ is always protected, whatever TIME_PROTECTED says
- labs-aicharts.yml: deploy URL via env, not ${{ }} in the script
- tests: worker-status-only no longer merges; dispatch once; real context merges
Claude-Session: https://claude.ai/code/session_01CYHXFvWMCs1GUmRmpySqQ6
Co-authored-by: claude <noreply@anthropic.com>
- beats_of/verdict/retry: trust only github-actions[bot] and owner/member/collaborator authors (forged state and stranger retries on a public repo)
- touches_protected: paginate pull files and include previous_filename
- browser_check: drop .git after clone, serve only the venture folder, Chrome with no network but localhost
- Hands.run: execute in a docker container when a daemon exists (TIME_RUN_IMAGE), host shell fallback
- tests: logins on fake comments, stranger retry/forged beat cases, paginated files fake
Claude-Session: https://claude.ai/code/session_01CYHXFvWMCs1GUmRmpySqQ6
Co-authored-by: claude <noreply@anthropic.com>
Live: Clef answered both probes right in ~0.5 s but at 0.21-0.25 confidence, so
the 0.5 floor sent them to the LLM. Expose every confidence and the weakest
question; a request may set its own floor (only changes cost); bench.py takes
clef@0 for calibration and sends a user agent Cloudflare accepts.
Claude-Session: https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva
Co-authored-by: Claude <noreply@anthropic.com>
decide.js asks ~10 choice questions in one call (mark, x, measure, agg, series,
order, top, one filter per text column) and assembles the spec; the validator
still checks it. Weakest needed answer < FLOOR, a failed check or a model error
hands the question to the LLM path, and the response says why. Page: brain
picker, latency/confidence line, 'or as <mark>' from the mark probabilities.
bench.py scores brains on 12 fixed questions.
Claude-Session: https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva
Co-authored-by: Claude <noreply@anthropic.com>
First live run: Workers AI answered specs the validator refused (agg spelling).
normalizeSpec fixes case and common aliases only; on a 422 the response
carries model_said (shown, never run). Smoke now fails on a bad spec.
Claude-Session: https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva
Co-authored-by: Claude <noreply@anthropic.com>
Library (aicharts.js): spec validator, fixed ops (filter/group/sort/bin/limit),
Chart.js config, attach() for existing charts, <ai-chart> element.
Worker: sample orders in D1, schema/sample/aggregates to Workers AI with
structured output + one repair round, saved_charts, per-IP and daily caps.
deploy.py: workers.dev only, no DNS. For teahub matcha/teahub#93.
Claude-Session: https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva
Co-authored-by: Claude <noreply@anthropic.com>
grok 4.7 fix rounds (28-54 steps, three at once) were most of a quick $20 of Venice
spend in the first live batch. Kimi's code model is a different model from round one's
Qwen Coder, so escalation still gets a fresh attempt, at a fraction of the cost.
TIME_VENTURE_ESCALATE still overrides.
Claude-Session: https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva
Co-authored-by: Claude <noreply@anthropic.com>
Two findings from the first live batch (#26):
- its children waited a tick: GitHub doesn't list a card made a moment ago. spawn()
now hands its cards to the same tick's card loop.
- every fix round was a page claiming what its code didn't do: promised drops, and
'builds on' the trending repos the brief asked it to name. The brief now says the
repos are the wave it rides, forbids promised features, and has the worker re-read
the page against app.js; fix rounds remove a failing claim instead of building.
Claude-Session: https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva
Co-authored-by: Claude <noreply@anthropic.com>
GitHub returns labels as objects, and a card made a moment ago isn't listed yet, so
the batch card a tick had just made fell through to the single-venture path (live:
#24). Labels are now read by name, and the tests' fake GitHub returns label objects
and holds a new batch card back from listings for a tick, which reproduces #24.
Claude-Session: https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva
Co-authored-by: Claude <noreply@anthropic.com>
A tick runs its top cards in one wave, handing out worker runs in priority order (at
most TIME_VENTURE_HEAVY, default 3; one per card per tick). Made safe for threads: the
folder lock is a per-build Hands subclass instead of a patch on the shared class,
ventures.json is read fresh and written under a lock, and a contents PUT that loses
the race for the branch head (409) is retried. TIME_VENTURE_HEAVY=1 is the old
one-at-a-time.
Claude-Session: https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva
Co-authored-by: Claude <noreply@anthropic.com>
One batch card scouts once, the seats pitch a field, and the board ranks it; the top k
(each wanted by two seats) become venture cards in the batch's milestone at 'picked'.
Children run the ordinary loop side by side, wait at 'ready' until every sibling is
settled or the hold runs out, then launch together. No child left behind: one batch
retry for a held child, then it is counted dead in the cohort retro, which closes the
card and the milestone. Fix rounds now yield the single worker run per tick to cards
still due their first build, so a failing page can't starve its siblings.
Claude-Session: https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva
Co-authored-by: Claude <noreply@anthropic.com>