Author SHA1 Message Date
teahubxyzandClaude Fable 5.1 51f1325bb0 AGENTS.md: the map as it is after 2026-10-18, plus a Situations table (the SOP dispatcher)
Seats post as themselves; engine PRs land through Time (workflow directories stay the CEO's batch); cards are adopted when a
PR already answers them; the four tiers with the Codex names; the spend envelope vs pacing; Base: and PR: lines; the
forty-turn card rule; and a situation -> procedure table, which is what AGENTS.md is for.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K4vyY3yUD3GsvoZaAtKkD
2026-10-18 05:07:38 +00:00
+36 -12
View File
@@ -11,22 +11,30 @@ record; nothing here is scaffolding from before 2026-10-14.
└── <your repos>
Time = the automation layer. It lives here, on prod (teahubxyz/time); the GitHub copy is an archived proof of concept.
Time acts as the Gitea user `time` (its own token, TIME_TOKEN) for every write except comments and commit statuses,
which stay with the Actions identity (`gitea-actions`); code goes in as git pushes.
Rhythm: Astra (daily, 13:13 UTC) queues cards; the heartbeat (hourly) builds them one at a time with a seat, gets a
review, and merges on approve + green CI. PRs under .github/ (Time's own engine) never merge themselves: the steward,
a scheduled Claude session every 6 hours, reads and merges them.
Seats: Claude (haiku / sonnet / opus / fable, ANTHROPIC_API_KEY, user-level secret) by default; Venice wired but idle.
Spend: every model call is booked to time/ledger/<YYYY-MM>.jsonl; TIME_DAILY_USD=5, TIME_MONTHLY_USD=100 stop the
clock and open an `andon` issue. No model decides whether to spend.
which stay with the Actions identity (`gitea-actions`); code goes in as git pushes. Seats post as themselves: a
review by `haiku` is a Gitea review by the user `haiku` (one Gitea user per model line, TIME_SEAT_<SEAT>).
Rhythm: Astra (daily, 13:13 UTC) queues cards; the heartbeat (hourly, and on demand) builds `ready` cards with a
seat, gets each PR reviewed by the council, and merges on approve + green CI, engine code included. Only the workflow
directories (`.github/workflows/`) stay a human's merge: the CEO batches them. A card whose PR already exists (Codex, a
chat, the CEO) is adopted: labelled `ready`, it is reviewed and landed, never rebuilt. Housekeeping sweeps daily (13:17).
Tiers: Luna = haiku (Codex: luna), Terra = sonnet (terra), Sol = opus (sol), Astra = fable (astra), the C level. Venice
seats (kimi, grok, ...) break ties. The operator hears from the Astra tier only on exception or check-in.
Spend: every model call is booked to time/ledger/<YYYY-MM>.jsonl, cached tokens priced. TIME_MONTHLY_USD=100 is the
owner's envelope; TIME_DAILY_USD (15) paces it and gates launches; a run launched within budget finishes (1.5x). A
breach opens an `andon` issue. No model decides whether to spend.
hb-5 (the Mac) is NOT part of prod: it is the operator's playground and the old instance (matcha.teahub.xyz).
Boring (ops MCP) lives on the Mac and may reach prod as a client; prod never depends on it.
```
## Moves
- Read first: this file, `docs/decisions.md` (why things are the way they are), `docs/rebuild.md` (what it took).
- Work is an issue with a `DONE:` line. Open it, do it, receipt it on the issue, close it. Label it `queued` and Time
runs it when its turn comes (oldest first, `Depends on #N` respected); `ready` runs it on the next beat, beside
whatever else is running; `spec` has Time split it into cards.
- Work is a card: an issue with a `DONE:` line. Open it, do it, receipt it on the issue, close it. `queued` runs it when
its turn comes (oldest first, `Depends on #N` respected); `ready` runs it on the next beat; `spec` has Time split it.
- A card is what a Terra worker finishes in forty turns. Larger work is a parent labelled `planned` with children that
carry their own `DONE:` lines; a parent is never `queued`. Three cards died at the turn ceiling before this rule.
- A card says where it lives. `Base: <branch>` (every venture card: `Base: gh-pages`) makes the worker cut its branch
from there and open the PR against it; without the line, the default branch. `PR: #N` names a PR that already answers
the card, so Time reviews it instead of building again.
- Before a task, find its route in `SKILLS.md` and load only the skills it names, by path. No model decides which
skill to load.
- You act as yourself (Time too: it is the `time` user). There is no shared service token on prod. If you can't do
@@ -37,7 +45,22 @@ record; nothing here is scaffolding from before 2026-10-14.
`docs/decisions.md`. Nothing else. Do not add one without a decision there. A temporary admin token is deleted
(sqlite3 on the Fly box) and the deletion checked before you write that it's gone.
- Be boring by default; get clever only on an ANDON. Deterministic scripts before cheap inference before expensive inference.
- Cost ladder for seats: Luna = haiku, Sol = sonnet, Astra = opus. Fable is for the operator's own maths, not the factory.
## Situations
What to do when you meet one of these. Each row names the procedure; the procedure names the skill or the code.
| You see | Do |
|---|---|
| A `ready` card with no worker yet, and a PR already answers it | Nothing: Time adopts the PR on its next beat (a `pr` beat with `adopted: true`). Make sure the PR body says `Closes #N` or the card says `PR: #N`. |
| The reviewer objected; the PR is `needs-human` | Read the objection on the PR. If it is right and small, comment `/time retry` on the card: the worker gets the review text and answers on the same branch. If it is wrong, say so on the PR as yourself (Approve/Object comments from trusted users count) and remove the label. |
| A PR is approved but `mergeable: false` | It fell behind its base. Until time#123 lands, a human re-cuts the branch from the base and re-applies the change (or merges the base into the branch); a `Closes #N` line keeps the card's adoption. |
| A worker stopped at the turn ceiling ("stopped without a PR after N steps") | First check the card's `Base:` line (a venture card without `Base: gh-pages` cannot find its files). Then split the card; never retry the same card unchanged twice. |
| An `andon` issue: spend cap reached | Read the ledger for the day. The daily cap is pacing (the CEO may raise it with the owner's OK; log it in `docs/decisions.md`); the monthly cap is the owner's alone. Close the andon once handled; Astra queues nothing while one is open. |
| A PR head shows `heartbeat / tick: failure` | Not a check. Time's own workflow statuses (heartbeat, mention, venture, astra, doctor, update, steward) are ignored by the merge gate (time#124). CI decides. |
| Housekeeping posted a stale list on the Astra log | Follow `.agents/skills/housekeeping/SKILL.md` in teahubxyz/time: decide each `needs-human`, idle PR, parked or `error` card. Housekeeping never acts on the list itself. |
| A workflow file needs to change | Open the PR, label it `needs-human`, and note it on the Astra log. The CEO merges workflow files in a batch; nobody else, and never through a side channel. |
| A card touches money or a human-only step (a purchase, a signature, a Whop upload) | Stop at the step, write what is ready and what is needed on the card, and escalate to the owner. Everything up to that step still gets done. |
| You want a new skill, or a vendored one changed | `SKILLS.md` → Moves. One PR with the skill, its katas and a ledger line. |
## Where things are
- MCP source: `mcp/` (FastMCP, deploy with `fly deploy`).
@@ -45,4 +68,5 @@ record; nothing here is scaffolding from before 2026-10-14.
- Rebuild log: `docs/rebuild.md`.
- Skills: `SKILLS.md` (routes, ledger, belts); the vendored folders are in `.agents/skills/`.
- Time's engine: `teahubxyz/time` `.github/time/` (`time.py` the clock, `venture.py` the venture loop, `astra.py` the
daily planner, `seats.json` the seats). The planner and the steward both write to the "Astra log" issue there.
daily planner, `housekeeping.py` the daily sweep, `seats.json` the seats). Its SOPs: `.agents/skills/<name>/SKILL.md`
in that repo. The planner, the steward and housekeeping all write to the "Astra log" issue there (time#57).