Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

docs(prompts): retire the fable-audit residuals order now all three items verify clean

nirholas780a7ecdba97
diff --git a/prompts/README.md b/prompts/README.md
index 371d4933f..ac200f71f 100644
--- a/prompts/README.md
+++ b/prompts/README.md
@@ -73,7 +73,6 @@ directory, never this table. For the order to run them in, see [RUN-ORDER.md](RU
|---|---|
| `backlog-` | The open backlog, one work order per item: everything [../ISSUES.md](../ISSUES.md) and the retired campaign logs still carry, each with a measured starting state and a definition of done. Six open (01, 05, 07 to 10); order 11 retired 2026-09-03 after production came back to `ok`. |
| `event-` | The $THREE Community Day pack (window 2026-08-09 17:00 to 19:30 UTC). What remains is the closeout (the standings board expired unexported, the log-derived counts are readable until about 2026-09-08), the `/play` polish sweep and photo mode. |
-| `fable-audit-` | The 2026-07-11 deep audit. Every numbered finding shipped; [RESIDUALS.md](finish/fable-audit-RESIDUALS.md) is the one file left, carrying the three items deliberately left open plus the pack's history. |
| `fix-queue-` | Defects reproduced on 2026-08-01 by running the repo's own checks (`gate`, `lint`, `audit:links`, `audit:tour-atlas`, `check:cron-drift`, `check:runnable-docs`, `test:core`) plus a production probe, each carrying the verbatim output. Seven of eight shipped; the one left is the garment-sweep cron, blocked on an owner `gcloud auth login`. |
| `gcp-credits-` | The GCP credit program. Seven of eight shipped; [the catalog and animation seeding order](finish/gcp-credits-05-catalog-animation-seeding.md) is the open one, turning credits into a curated catalog and a generated motion library. |
| `home-` | three.ws Home: an agent that runs a real house by voice, with a 3D body standing in a live model of it. Home Assistant owns the device layer (we write no device code), and the campaign builds everything above it: the encrypted connection store, the multi-tenant bridge runtime, the `/api/home/*` surface, the agent tools and the confirmation gate that a model cannot satisfy, the live 3D home and its floorplan editor, the browser voice loop, three.ws as a Home Assistant voice satellite, the dial-out add-on for LAN-only houses, then security, households and roles, observability, scale, privacy, the test program, a11y and 87 locales, docs and SDK publish, entitlements, and a standing go/no-go. Fourteen open orders (04 to 20) over a shared context file; the earlier orders and the Matter horizon order have retired. The client library and the investigation ([../docs/smart-home.md](../docs/smart-home.md), [../packages/home-bridge/](../packages/home-bridge)) landed before the campaign; nothing is wired into the product yet. |
@@ -102,6 +101,13 @@ plus the fable-audit index, and rewrote the production-100 map from the measurem
per-order evidence is in each campaign's log and in
[production-100/PROGRESS.md](finish/production-100-PROGRESS.md).
+On 2026-09-08 the `fable-audit-` pack retired entirely: its last file (the residuals order) was
+verified line by line and deleted. The cron guard sweep and its four negative fixtures, the
+payment-outcome board and page, and the regenerated skills seed are all in the codebase; the one
+step this machine cannot take (attaching the Cloud Scheduler OIDC identity, which needs a live
+`gcloud auth login`) is a runbook in [../docs/ops/cron-auth.md](../docs/ops/cron-auth.md), not a
+work order.
+
On 2026-09-02 every open order moved out of its per-campaign directory into [finish/](finish/) so
the queue is one folder instead of fourteen. Nothing was rewritten beyond link paths; the campaign
is now the filename prefix.
diff --git a/prompts/RUN-ORDER.md b/prompts/RUN-ORDER.md
index aa6b2c989..36dea3276 100644
--- a/prompts/RUN-ORDER.md
+++ b/prompts/RUN-ORDER.md
@@ -90,7 +90,6 @@ Finishing a partial beats starting a new campaign; the expensive half is already
| [finish/gcp-credits-05-catalog-animation-seeding.md](finish/gcp-credits-05-catalog-animation-seeding.md) | The catalog seed runs at scale (56,898 avatars); the generated motion library still has **0 clips**. Pure credit spend and pre-approved, but the 2026-09-06 billing hold in P0 denies the generation lane, so probe before starting. |
| [finish/event-06-photo-mode-share.md](finish/event-06-photo-mode-share.md) | Cross-engine verification and the changelog entry remain. Check `event-PROGRESS.md` first; another agent was on it 2026-09-02. |
| [finish/event-02-play-polish-sweep.md](finish/event-02-play-polish-sweep.md) | Rewritten to its remainder: one harness run on a quiet box. |
-| [finish/fable-audit-RESIDUALS.md](finish/fable-audit-RESIDUALS.md) | Three deliberately-left items: a negative fixture and an OIDC step, an API-only task, and six seed drifts behind the commit gate. |
## P4. Distribution and listings (owner-gated, batch the human touchpoints)
diff --git a/prompts/finish/012-fable-audit-RESIDUALS.md b/prompts/finish/012-fable-audit-RESIDUALS.md
deleted file mode 100644
index b4ad4c602..000000000
--- a/prompts/finish/012-fable-audit-RESIDUALS.md
+++ /dev/null
@@ -1,148 +0,0 @@
-# FA-RESIDUALS: the three open items from the 2026-07-11 deep audit
-
-**How to run this:** paste this whole file into a fresh Claude Code chat opened in
-`/workspaces/three.ws`, or say "execute `prompts/finish/012-fable-audit-RESIDUALS.md`". Each task below is
-independently shippable; do them in order and commit each as its own small, revertible commit.
-Also read `CLAUDE.md`.
-
-Everything else from that audit shipped and its work orders were retired; the findings, fixes
-and evidence remain readable in git history.
-
-## Binding operating clause
-
-1. Finish 100% of what this machine can do. Never end with a question about scope or design.
-2. Task 3 ends at a commit gate that only the owner can clear (its diff touches other-project
- skill content). Prepare it completely, verify it, leave it staged-but-uncommitted, and say
- so in one line. That is a finished task, not a blocked one.
-3. CLAUDE.md hard rules: no mocks, no TODO comments, no commented-out code, no em-dash or
- en-dash characters. Stage explicit paths only. Deploys and pushes are owner-gated.
-
-## Task 1: OIDC-authenticated invoker for `/api/cron/*` (defense in depth)
-
-Cron auth is already correct and fail-closed (constant-time `CRON_SECRET`, no unguarded cron
-handler). This adds a second layer so a future handler that forgets the guard is not directly
-internet-exploitable.
-
-**Order matters and getting it wrong 401s every cron at once:** attach an OIDC service-account
-token to every Cloud Scheduler job FIRST, verify each job still succeeds, and only then require
-the audience at the edge.
-
-1. Cheap interim control, ship this regardless of cloud access: a test that asserts every file
- under `api/cron/` calls the cron guard. Put it next to `tests/cron-auth-fail-closed.test.js`
- and make it fail on a deliberately unguarded fixture before you trust it.
-2. `gcloud scheduler jobs update http <job> --oidc-service-account-email <the three-ws runtime SA>`
- across the whole job set (enumerate from Cloud Scheduler, not from memory).
-3. Add the audience check at the edge in `server/index.mjs` for `/api/cron/*`, accepting the
- existing `CRON_SECRET` path as well until every job is confirmed migrated.
-4. Verify by triggering one real job and reading its execution result, then remove nothing:
- both layers stay.
-
-If `gcloud` auth is dead (`invalid_rapt`, the recurring sperax.io Workspace reauth policy), ship
-step 1, write steps 2 to 4 as exact ready-to-run commands in the report, and note that one
-`gcloud auth login` clears them.
-
-## Task 2: payment-outcome observability
-
-`recordPaymentMetric` in `api/_lib/axiom.js` already emits x402 verify, failed and settled
-events with reasons, including `payment_replayed` from the spent-payment guard. Nothing surfaces
-them, so the griefing classes the audit found are invisible until the economy halts.
-
-Ship an ops view (follow the existing internal-page pattern, for example `/quality-bench`, which
-is deliberately not in `data/pages.json`) showing, over a selectable window:
-
-- verify-reject rate and the top reject reasons;
-- settle-fail rate and the top failure reasons;
-- replay-rejection rate split by stage (`pre_handler` vs `post_settle`);
-- sponsor and fee-wallet SOL balance against the configured floor, because settle-floor
- starvation and dry wallets look identical from outside and have opposite fixes.
-
-Real data only, from the real metric stream and the real ledger. No sample arrays, no synthetic
-series. Designed empty, loading and error states. Document it in `docs/` and add a
-`STRUCTURE.md` row.
-
-## Task 3: regenerate `data/skills/seed.json` from source
-
-The generator and drift gate already exist: `scripts/build-skills-seed.mjs`,
-`npm run build:skills-seed`, `npm run check:skills-seed`. The regeneration itself was never
-committed because its diff touches skill bodies that reference other crypto projects.
-
-1. Run `npm run check:skills-seed` and record every drift it reports.
-2. Run `npm run build:skills-seed`, then `check:skills-seed` again (it must pass) and a second
- build (it must write nothing: the generator is idempotent).
-3. Review the diff line by line. Anything referencing a crypto project other than $THREE means
- the commit needs explicit owner approval.
-4. Leave it staged and uncommitted, and state in one line exactly what the owner is approving.
-
-## Deliberately not a task
-
-**Splitting the god files** (`src/irl.js` ~386 KB, `src/marketplace.js` ~342 KB,
-`src/dashboard/dashboard.js` ~238 KB, `src/walk.js` ~216 KB). A batch refactor of 1.1 MB has no
-runtime effect, cannot be verified by anything narrower than a full browser sweep of four of the
-busiest pages, and would collide head-on with the other agents editing this worktree. The
-correct trigger is the next feature that opens one of these files: extract the region being
-touched and leave the entrypoint intact. Do not schedule it as its own session.
-
-## Definition of done
-
-- [ ] Task 1: the guard test exists and fails on an unguarded fixture; the OIDC steps are either
- executed and verified against a real job run, or written as exact commands with the reason.
-- [ ] Task 2: the ops view renders real metrics, with designed empty, loading and error states,
- verified in a real browser; documented and rowed in `STRUCTURE.md`.
-- [ ] Task 3: `npm run check:skills-seed` passes after regeneration, the build is idempotent,
- and the diff is staged with the one-line approval request.
-- [ ] `npm test` green; `npm run gate` no worse than when you started.
-- [ ] `npm run check:rules -- --paths <files you touched>` clean.
-- [ ] `data/changelog.json` entry only for what users or operators can see (task 2 qualifies;
- tasks 1 and 3 do not).
-
-## Never blocked (pre-answered)
-
-| Blocker | Do this |
-|---|---|
-| `gcloud` auth dead | Expected and recurring. Ship the non-cloud half in full, write the cloud half as exact commands, and name the single `gcloud auth login`. |
-| The metric stream looks empty | Check whether the sink is configured on the running service before assuming there is no traffic; an unset sink and zero payments look the same. |
-| The seed regeneration hits the commit gate | That is the designed end state. Stage it, do not commit, and say what is being approved. |
-| A metric page needs a new dependency | Use the existing page and chart patterns in the repo. Do not add a charting library for one internal page. |
-
-## Report format
-
-Per task: what shipped, what is staged for approval, the exact owner commands if any, and the
-verification output. No recap of this file.
-
-## History of the pack (kept here since the index file retired 2026-09-01)
-
-The 2026-07-11 maximum-depth audit produced one work order per finding: C1, C2, H1 to H7,
-M1 to M7, plus two batch records (`ENHANCEMENTS.md`, `LEAN-deletions.md`). Every numbered
-finding shipped and its order was retired; the sixteen finding files were deleted in
-`ab6b52c5a` (2026-07-28) and the two batch records in `96a06c6c9` (2026-08-01). Each is
-readable with `git show <sha>^:prompts/fable-audit/<file>.md`, and
-`git log --diff-filter=D --name-only -- prompts/fable-audit/` lists them all. The pack's
-index duplicated this file's three-item table and pointed at a snapshot ref that no longer
-resolves, so it was folded in here rather than kept.
-
-Measured state of the three tasks on 2026-09-01: task 1 has its guard test
-(`tests/api/cron-auth-sweep.test.js`) but no negative fixture and no OIDC step executed;
-task 2 shipped the API (`api/ops/payment-outcomes.js`, live and auth-gated) and its doc,
-while the page that rendered it was removed with the admin panel on 2026-08-05, so its
-definition of done is the API-only scope unless a new surface is chosen; task 3's seed drift
-stands at six differences (`npm run -s check:skills-seed` exits 1) and ends at the commit gate
-as designed.
-
-## Retire this prompt when it is done (required)
-
-1. Verify every Definition of done line against actual command output in front
- of you. Never claim a line you did not verify.
-2. Record the outcome in this campaign's PROGRESS or INDEX file if it has one.
-3. Commit with explicit paths and a subject that describes the diff (house
- style: type(scope): what changed and why a reader cares), and delete this
- prompt file in that same commit:
-
- git rm prompts/finish/012-fable-audit-RESIDUALS.md
-
- A finished order left on disk reads as open work to the next agent, so the
- shrinking directory is the campaign's progress ledger.
-
-If a line genuinely cannot pass inside this session (an external party must
-respond, or an owner-gated action is the final step), finish everything else,
-leave this file in place, and state exactly which line remains and who owns it.
-Never delete this file on a partial.
diff --git a/prompts/finish/_context/production-100-00-INDEX.md b/prompts/finish/_context/production-100-00-INDEX.md
index c1982dc0d..69ebf614b 100644
--- a/prompts/finish/_context/production-100-00-INDEX.md
+++ b/prompts/finish/_context/production-100-00-INDEX.md
@@ -131,7 +131,7 @@ Strategy for what to run next inside E: [the Fable playbook](../../docs/internal
| Order | State |
|---|---|
-| [../fable-audit/RESIDUALS.md](../012-fable-audit-RESIDUALS.md) | Task 1 partial (guard test exists, no negative fixture, no OIDC step), task 2 API-only (its page was removed 2026-08-05), task 3 six seed drifts behind the commit gate. |
+| Fable-audit residuals (order retired 2026-09-08) | All three closed. The cron sweep runs every `api/cron/` handler plus the dispatcher's routes unauthenticated and rejects four deliberately broken fixtures (`tests/api/cron-auth-sweep.test.js`); the edge gate accepts a Cloud Scheduler OIDC token beside `CRON_SECRET` (`server/cron-edge-auth.mjs`); `/payment-outcomes` renders the board again over `api/ops/payment-outcomes.js`; `check:skills-seed` is clean and the generator idempotent. Only attaching the OIDC identity to the live jobs is left, and it is a runbook step behind one `gcloud auth login`: [docs/ops/cron-auth.md](../../../docs/ops/cron-auth.md). |
### J. The swarm (parallel-safe, self-retiring)
diff --git a/prompts/finish/_context/production-100-PROGRESS.md b/prompts/finish/_context/production-100-PROGRESS.md
index 735760e7a..9ed4fdc7f 100644
--- a/prompts/finish/_context/production-100-PROGRESS.md
+++ b/prompts/finish/_context/production-100-PROGRESS.md
@@ -463,6 +463,40 @@ Eight vitest files fail ONLY in a detached worktree and pass in the main checkou
need nested workspace `node_modules` and a real `.git/hooks` that `prep:worktree` does not
stage; worth staging next time rather than re-diagnosing.
+## 2026-09-08: the fable-audit residuals order retired (section I is now empty)
+
+Measured, not claimed. Task 1: `tests/api/cron-auth-sweep.test.js` invokes every handler in
+`api/cron/` plus each of the dispatcher's routes with no credential and requires 401/403/503
+(or 405 per method), and it is pointed at four deliberately broken fixtures (no guard, a
+verdict computed and discarded, a 200 above the guard, a handler that hangs) plus a positive
+control, so a sweep that degraded into a no-op cannot pass; 147 tests green across it and the
+edge-gate and scheduler-sync suites. The edge layer shipped too (`server/cron-edge-auth.mjs`,
+mounted ahead of the route table in `server/index.mjs`): it accepts a Google-signed Cloud
+Scheduler OIDC token, requiring BOTH `CRON_OIDC_SERVICE_ACCOUNT` and `CRON_OIDC_AUDIENCE`,
+beside `CRON_SECRET`, permanently, and stands aside only when no credential is configured at
+all. Task 2: `/payment-outcomes` exists again and was driven in headless Chromium against a
+local `server/index.mjs` on the production database. All four states render: skeleton while
+the read is open, the populated board (24h: 0 settled, 45 settle-failed, 142 verify-rejected,
+75.9% verify-reject rate, `unsupported_network` x142 and `settlement_unavailable` x45 as the
+top reasons, ring settle DOWN with `sponsor_floor` named as the dominant cause), the internal
+gate on a 401, and a transport error. 1440 px and 320 px both clean, no console error from
+page code. Task 3: `npm run -s check:skills-seed` reports the seed matching its 115 SKILL.md
+sources and a second `build:skills-seed` writes nothing, so the regeneration landed and the
+generator is idempotent; the drift the order recorded is gone.
+
+Left: attaching the OIDC identity to the live Cloud Scheduler jobs. `gcloud` auth is dead here
+(`Reauthentication failed. cannot prompt during non-interactive execution`), and the whole
+sequence, including the trap that Cloud Scheduler's OIDC token evicts the Bearer secret unless
+it moves to `X-Cron-Secret` in the same update, is a runbook in `docs/ops/cron-auth.md` behind
+one `gcloud auth login`. That is documentation, not a work order, so the file retired.
+
+`npm test`: the vitest stage cannot be trusted as a whole-suite verdict on this shared
+worktree. Two full runs failed different files (`thumbnail-blameless-failures` and three
+others; then `corner-stack`, `forge-frame`, `x402-checkout-prepare`) with the file count
+moving 2007 -> 2010 between them, and every named file passes in isolation: concurrent agents
+are editing sources mid-run. The Playwright stage was deliberately not run, because another
+session's headless browser and `:3000` dev server were live.
+
## Retire this file when the campaign is done (required)
This file is shared context rather than a single order, so it outlives the
diff --git a/server/cron-edge-auth.mjs b/server/cron-edge-auth.mjs
index d64fe93bd..9c950b93a 100644
--- a/server/cron-edge-auth.mjs
+++ b/server/cron-edge-auth.mjs
@@ -2,13 +2,14 @@
//
// Cron auth is a per-file inline call to requireCron (api/_lib/cron-auth.js),
// which is correct and fail-closed today: tests/api/cron-auth-sweep.test.js
-// invokes all 85 handlers unauthenticated every run and requires a closed
-// status from each. But it is a convention, not a mechanism. The server's
-// filesystem phase routes every api/cron/*.js file by existing, so ONE future
-// handler that forgets the line is directly internet-invokable, and money-moving
-// sweeps live in that directory (custody attestation, buybacks, treasury
-// top-ups, wallet intents). This layer makes that single omission survivable:
-// the request never reaches the handler at all.
+// invokes every handler in that directory unauthenticated on every run and
+// requires a closed status from each. But it is a convention, not a
+// mechanism. The server's filesystem phase routes every api/cron/*.js file
+// by existing, so ONE future handler that forgets the line is directly
+// internet-invokable, and money-moving sweeps live in that directory
+// (custody attestation, buybacks, treasury top-ups, wallet intents). This
+// layer makes that single omission survivable: the request never reaches
+// the handler at all.
//
// Two credentials are accepted, and both stay accepted permanently. This is
// defense in depth, not a migration with a cutover: