@oneie/claude 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/agents/w1-recon.md +9 -4
  2. package/agents/w2-decide.md +51 -28
  3. package/agents/w3-edit.md +70 -78
  4. package/agents/w4-verify.md +164 -69
  5. package/commands/browser.md +98 -35
  6. package/commands/cc-connect.md +6 -0
  7. package/commands/chat.md +13 -1
  8. package/commands/close.md +45 -19
  9. package/commands/create.md +20 -10
  10. package/commands/db-sync.md +5 -1
  11. package/commands/deploy.md +174 -87
  12. package/commands/do-autonomous.md +31 -20
  13. package/commands/do-improve.md +4 -4
  14. package/commands/do-show.md +4 -3
  15. package/commands/do.md +53 -13
  16. package/commands/go.md +75 -0
  17. package/commands/improve.md +4 -2
  18. package/commands/kill.md +6 -8
  19. package/commands/notify.md +15 -2
  20. package/commands/oo-push.md +24 -9
  21. package/commands/rag.md +6 -0
  22. package/commands/release.md +46 -25
  23. package/commands/restart.md +5 -4
  24. package/commands/see.md +45 -35
  25. package/commands/skill-create.md +38 -5
  26. package/commands/sync.md +21 -11
  27. package/hooks/scripts/auto-continue.sh +70 -0
  28. package/hooks/scripts/branch-pin.sh +85 -0
  29. package/hooks/scripts/git-add-guard.sh +16 -5
  30. package/hooks/scripts/post-edit-check.sh +16 -0
  31. package/hooks/scripts/session-start.sh +13 -8
  32. package/hooks/scripts/sync-priority-todo.sh +5 -0
  33. package/package.json +1 -1
  34. package/rules/api.md +9 -0
  35. package/rules/design.md +13 -3
  36. package/rules/documentation.md +30 -71
  37. package/rules/engine.md +8 -1
  38. package/rules/ui.md +5 -1
  39. package/scripts/__pycache__/do-rank.cpython-313.pyc +0 -0
  40. package/scripts/browser-check.mjs +44 -103
  41. package/scripts/cc-events-proof.sh +13 -12
  42. package/scripts/chrome.mjs +381 -0
  43. package/scripts/do-analyze.sh +109 -4
  44. package/scripts/do-auto.sh +350 -43
  45. package/scripts/do-consumer-sweep.sh +72 -0
  46. package/scripts/do-derives-check.sh +88 -0
  47. package/scripts/do-fleet.sh +50 -1
  48. package/scripts/do-killswitch-audit.py +33 -14
  49. package/scripts/do-promise-lint.sh +150 -4
  50. package/scripts/do-promise-settle.sh +131 -9
  51. package/scripts/do-prove.sh +197 -17
  52. package/scripts/do-rank.py +606 -20
  53. package/scripts/do-rubric.py +21 -2
  54. package/scripts/do-signal.sh +157 -17
  55. package/scripts/do-smoke.sh +9 -0
  56. package/scripts/do-substrate-check.sh +49 -0
  57. package/scripts/do-tasks-wire-check.sh +81 -0
  58. package/scripts/do-tier.sh +90 -5
  59. package/scripts/do-ui-gate.sh +332 -0
  60. package/scripts/do-untracked-gate.sh +231 -0
  61. package/scripts/do-walk.sh +344 -0
  62. package/scripts/factory-check.sh +747 -0
  63. package/scripts/factory-repo.sh +1361 -0
  64. package/scripts/factory-tasks-check.sh +85 -0
  65. package/scripts/outcome-pull.ts +279 -0
  66. package/scripts/promise-manifest.mjs +167 -0
  67. package/scripts/reconcile-allow.txt +5 -0
  68. package/scripts/rubric-weights.json +64 -0
  69. package/scripts/spine-canary.sh +20 -0
  70. package/scripts/typedb-cluster-status.sh +128 -0
  71. package/scripts/typedb-env.sh +182 -0
  72. package/scripts/typedb-flap-recorder.sh +85 -0
  73. package/scripts/typedb-probes/containment-probe.py +88 -0
  74. package/scripts/typedb-probes/panic-probe-version.py +92 -0
  75. package/scripts/typedb-probes/panic-probe.py +77 -0
  76. package/scripts/typedb-scratch.sh +73 -0
  77. package/scripts/urls-lint.sh +58 -0
  78. package/scripts/w4-rubric.ts +96 -12
  79. package/scripts/wf-check.mjs +75 -0
  80. package/skills/ai-ui/SKILL.md +1 -1
  81. package/skills/astro/SKILL.md +177 -132
  82. package/skills/astro/add-content-collection.md +29 -13
  83. package/skills/astro/check-build.md +19 -13
  84. package/skills/astro/create-component.md +36 -9
  85. package/skills/astro/create-page.md +39 -10
  86. package/skills/astro/optimize-performance.md +36 -8
  87. package/skills/cli/SKILL.md +254 -220
  88. package/skills/dev/SKILL.md +1 -1
  89. package/skills/directory-autofill/SKILL.md +68 -0
  90. package/skills/docs/SKILL.md +4 -4
  91. package/skills/mcp/SKILL.md +186 -156
  92. package/skills/promise-make/SKILL.md +2 -2
  93. package/skills/puck/SKILL.md +465 -250
  94. package/skills/react19/SKILL.md +196 -296
  95. package/skills/reactflow/SKILL.md +387 -412
  96. package/skills/sdk/SKILL.md +167 -106
  97. package/skills/shadcn/SKILL.md +245 -201
  98. package/skills/signal/SKILL.md +5 -0
  99. package/skills/sui/SKILL.md +6 -1
  100. package/skills/tutorial/SKILL.md +15 -0
  101. package/skills/typedb/SKILL.md +427 -217
  102. package/skills/typedb/examples/python-patterns.py +11 -4
  103. package/skills/typedb/examples/query-patterns.tql +8 -3
  104. package/skills/typedb/examples/schema-patterns.tql +4 -2
  105. package/skills/typedb/reference/migration-2x-3x.md +19 -1
  106. package/skills/typedb/reference/python-driver.md +17 -1
  107. package/skills/voice/SKILL.md +117 -0
  108. package/skills/writer/SKILL.md +29 -12
  109. package/templates/template-feature.md +26 -1
  110. package/templates/template-tests.md +4 -0
  111. package/templates/template-todo.md +65 -10
@@ -8,13 +8,13 @@ Ship all five services to Cloudflare. Deterministic sandwich — W0 baseline, bu
8
8
  >
9
9
  > **Production cutover (2026-05-23):** Astro site runs on **CF Workers with Static Assets** (not Pages). Production target is **`https://one.ie`** via the `one-prod` worker. Deploy command is **`wrangler deploy` (no `--env` flag)** — see the deploy-target trap note below.
10
10
  >
11
- > **⚠️ Deploy-target trap (found 2026-07-03, still live in `package.json`'s `deploy` script see Service Map below):** `one.ie`'s custom domain is bound to Worker service **`one-prod`** (confirmed via Cloudflare API). `one.ie/web/wrangler.toml` has no explicit `legacy_env` setting, which means Wrangler's **default legacy-environment behavior applies** for TOML configs: passing `--env production` appends `-production` to the top-level `name`, deploying to a *different* script, `one-prod-production` — which nothing routes to. Three consecutive deploys to `one-prod-production` showed zero effect on `https://one.ie` until `wrangler deploy` was run **without** `--env production`. **Always deploy this worker bare: `wrangler deploy` (no `--env` flag).** Do not re-add `--env production` out of habit — it silently ships to a decoy. **The trap is not limited to `wrangler deploy`** — `wrangler secret put`/`secret delete` take the same `--env` flag and silently target the same `one-prod-production` decoy (hit 2026-07-06 provisioning `UPGRADE_LINK_SECRET`: it landed on the decoy first, invisibly — no error, just a secret nothing reads). Any bare `wrangler <subcommand>` against this worker: **no `--env` flag, ever.**
11
+ > **⚠️ Deploy-target trap (found 2026-07-03; fixed in-tree 2026-07-04, verified still fixed 2026-08-02 `one.ie/web/package.json`'s `deploy` script is now `npm run build && wrangler deploy` with no `--env`, and `wrangler.toml` has no `[env.production]` block. The trap is only reachable by hand-typing `--env` now):** `one.ie`'s custom domain is bound to Worker service **`one-prod`** (confirmed via Cloudflare API). `one.ie/web/wrangler.toml` has no explicit `legacy_env` setting, which means Wrangler's **default legacy-environment behavior applies** for TOML configs: passing `--env production` appends `-production` to the top-level `name`, deploying to a *different* script, `one-prod-production` — which nothing routes to. Three consecutive deploys to `one-prod-production` showed zero effect on `https://one.ie` until `wrangler deploy` was run **without** `--env production`. **Always deploy this worker bare: `wrangler deploy` (no `--env` flag).** Do not re-add `--env production` out of habit — it silently ships to a decoy. **The trap is not limited to `wrangler deploy`** — `wrangler secret put`/`secret delete` take the same `--env` flag and silently target the same `one-prod-production` decoy (hit 2026-07-06 provisioning `UPGRADE_LINK_SECRET`: it landed on the decoy first, invisibly — no error, just a secret nothing reads). Any bare `wrangler <subcommand>` against this worker: **no `--env` flag, ever.**
12
12
  >
13
13
  > **Environment model:**
14
14
  > - **Production (live):** `https://one.ie` — `one-prod` worker, deployed from `one.ie/web/` via bare `wrangler deploy` (**not** `--env production` — see trap note above)
15
15
  > - **Gateway (live, stable):** `https://api.one.ie` — `one-gateway` worker
16
16
  > - **Pay gateway (live, stable):** `https://pay.one.ie` — `one-core-worker`, deployed from `pay/backend/` via `bun run deploy` (no `--env` flag; no explicit `[[routes]]` block in its wrangler.toml either — same bare-deploy discipline as `one-prod`). Not part of the original "4 services" naming (found 2026-07-05 after a commit there went unshipped for a full deploy cycle) — treat it as a 5th first-class deploy target, not an afterthought.
17
- > - **Dev (`dev.one.ie` / `one-substrate`) — RETIRED 2026-06-04 (prod-only).** The CF git-integration that auto-built it on every push to `one-ie/stage` is being disconnected (CF dashboard → Workers & Pages → one-substrate → Settings → Builds). Nothing deploys via repo push anymore.
17
+ > - **Dev (`dev.one.ie` / `one-substrate`) — RETIRED 2026-06-04 (prod-only). NEVER a deploy target.** The sibling tree `apps/dev.one.ie` is dead code — do not build or ship it. The CF git-integration that auto-built `one-substrate` on every push to `one-ie/stage` was disconnected (CF dashboard → Workers & Pages → one-substrate → Settings → Builds). Nothing deploys via repo push anymore.
18
18
  > - **Legacy idle (rollback only — do not deploy):**
19
19
  > - `https://oneie.pages.dev` — old Pages project for `one.ie` ("Ecommerce Playbook" content). Re-attach `one.ie` to this project to roll back.
20
20
  > - `app.one.ie`, `demo.one.ie`, `onestudio.dev` — still bound to the prior `one-demo` worker. `one-demo` stays in the account untouched for rollback; redeploying `one-demo` would push stale code, so don't.
@@ -26,9 +26,6 @@ Ship all five services to Cloudflare. Deterministic sandwich — W0 baseline, bu
26
26
  | Invocation | What |
27
27
  |-----------|------|
28
28
  | `/deploy` | Full pipeline — W0 + build + 5 services + health |
29
- | `/deploy --skip-tests` | Skip W0 baseline (risky — use only when already verified) |
30
- | `/deploy --dry-run` | Build + smoke only, no deploy |
31
- | `/deploy --preview-only` | Build + preview Worker deploy (no CI-gated services) |
32
29
  | `/deploy astro` | Astro Worker only (re-bundle after UI changes) |
33
30
  | `/deploy workers` | Gateway + Sync + Agents only (no Astro rebuild) |
34
31
  | `/deploy gateway` | Gateway worker only |
@@ -38,68 +35,108 @@ Ship all five services to Cloudflare. Deterministic sandwich — W0 baseline, bu
38
35
 
39
36
  ## The 8-Step Pipeline
40
37
 
41
- ```bash
42
- bun run deploy # full pipeline
43
- bun run deploy -- --dry-run
44
- bun run deploy -- --skip-tests
45
- DEPLOY_CONFIRM=yes bun run deploy # CI / non-interactive
46
- ```
38
+ > **No root orchestrator exists (confirmed 2026-07-08).** There is no root `package.json` and no `scripts/deploy.ts` in this repo — `bun run deploy` / `bun run verify` at repo root **error with "Script not found"**. The commands below are run manually, per-service, from `Server/one-ie`. If a root orchestrator is ever added, update this note; until then, treat every command in this file as the literal thing to run.
47
39
 
48
- **Step 1 — W0 Baseline**
40
+ **Step 1 — W0 Baseline** (no unified script — run per service)
49
41
  ```bash
50
- bun run verify # biome + tsc --noEmit + vitest run + audit:design
42
+ # Typecheck all 5 services (each has its own tsconfig, no shared root)
43
+ (cd one.ie/web && bunx tsc --noEmit)
44
+ (cd api && bunx tsc --noEmit)
45
+ (cd sync && bunx tsc --noEmit)
46
+ (cd channels && bunx tsc --noEmit)
47
+ (cd pay/backend && bunx tsc --noEmit)
48
+
49
+ # Test suite lives only in one.ie/web
50
+ (cd one.ie/web && bunx vitest run)
51
51
  ```
52
- Record tests passed/total. Fix before proceeding — never deploy on red.
52
+ Record tests passed/total. Fix before proceeding — never deploy on red, **except** entries on the Known-Flaky list below (currently environment-dependent, not code regressions).
53
53
 
54
54
  **Step 2 — Changes**
55
55
  `git diff` summary. Flag large changesets.
56
56
 
57
- **Step 2.5 — Commit & Push**
58
- Stage all local changes and push to GitHub before building. Tests are green at this point, so it is safe to commit.
57
+ **Step 2.5 — Commit, PR, Merge**
58
+ Tests are green at this point, so it is safe to commit. The shared tree is pinned to `main` (`hook:branch-pin`) — never `git checkout`/`switch` there. Do the commit + branch + PR in a scratch worktree instead, then merge via `gh` and fast-forward the shared tree.
59
59
  ```bash
60
- git add -A
60
+ # 1. From the shared tree (still on main): stage by explicit path, never -A
61
+ git status --porcelain # review scope
62
+ git diff --stat
63
+
64
+ # 2. Cut a worktree for the deploy branch
65
+ slug="deploy-$(git rev-parse --short HEAD)"
66
+ git worktree add -b "deploy/$slug" ".do-worktrees/$slug" main
67
+
68
+ # 3. In the worktree: bring over the same paths, commit, push
69
+ cd ".do-worktrees/$slug"
70
+ git add <explicit paths from step 2>
61
71
  git commit -m "$(cat <<'EOF'
62
72
  deploy: ship <summary of staged changes>
63
73
  EOF
64
74
  )"
65
- git push origin main
75
+ git push -u origin "deploy/$slug"
76
+
77
+ # 4. Open PR, wait for CodeRabbit + any checks, merge
78
+ gh pr create --base main --head "deploy/$slug" --title "deploy: <summary>" --body "Automated deploy PR — see /deploy pipeline"
79
+ gh pr merge "deploy/$slug" --squash --auto --delete-branch
80
+
81
+ # 5. Back in the shared tree: fast-forward and clean up the worktree
82
+ cd /Users/toc/Server/one-ie
83
+ git switch main # only allowed HEAD move in the shared tree
84
+ git pull origin main
85
+ git worktree remove ".do-worktrees/$slug"
66
86
  ```
67
- Generate the commit message from the diff — follow conventional commit format (`feat:`, `fix:`, `chore:`, etc. as appropriate). If there is nothing to commit (`git status --porcelain` is empty), skip silently.
87
+ Generate the commit message and PR title from the diff — conventional commit format (`feat:`, `fix:`, `chore:`, etc.). If there is nothing to commit (`git status --porcelain` is empty), skip this whole step silently — proceed to Step 3 on the tree as-is.
88
+
89
+ `gh pr merge --auto` queues the merge and returns immediately if required checks (e.g. CodeRabbit review) are still running; poll `gh pr view "deploy/$slug" --json state,mergedAt` before Step 5's `git pull` if the merge hasn't landed yet — don't build off an unmerged branch.
68
90
 
69
91
  **Step 3 — Build**
70
92
  ```bash
71
- NODE_ENV=production astro build
93
+ cd one.ie/web && NODE_ENV=production bun run build
72
94
  ```
73
- Target: ~23s. Emits `dist/_worker.js/index.js` + static assets via `@astrojs/cloudflare@13`. Watch for bundle size warnings.
95
+ Target: ~30-35s. Emits `dist/server/` + static assets via `@astrojs/cloudflare@13`, then patches `wrangler.json` with DO bindings and symlinks `.dev.vars`. Watch for bundle size warnings.
96
+
97
+ **Fixed 2026-07-19:** the build was V8-heap-OOMing (`FATAL ERROR: Reached heap limit … JavaScript heap out of memory`, `Abort trap: 6`, exit 134) at Node's default ~4 GiB old-space ceiling — not a system memory shortage (5+ GiB free at the time). `package.json`'s `build` script now sets `NODE_OPTIONS=--max-old-space-size=8192` inline, so plain `bun run build` picks it up automatically; no manual env var needed anymore.
74
98
 
75
99
  **Step 4 — Credentials**
76
100
  `CLOUDFLARE_API_TOKEN` must be unset. Deploy uses `CLOUDFLARE_GLOBAL_API_KEY` only.
77
101
  Scoped tokens lack permissions for workers + custom domains.
102
+ ```bash
103
+ unset CLOUDFLARE_API_TOKEN
104
+ echo "${CLOUDFLARE_GLOBAL_API_KEY:+set}" "${CLOUDFLARE_EMAIL:+set}" # both must print "set"
105
+ ```
78
106
 
79
107
  **Step 5 — Smoke**
80
108
  Verify `dist/server/` exists, all 5 wrangler configs present: `api/wrangler.toml`, `sync/wrangler.toml`, `channels/wrangler.toml`, `one.ie/web/wrangler.toml`, `pay/backend/wrangler.toml`.
81
109
 
82
110
  **Step 6 — Approval**
83
111
  `main` branch: prompts "yes". Other branches: auto-approved.
84
- Non-interactive: `DEPLOY_CONFIRM=yes bun run deploy`.
85
112
 
86
113
  **Step 6.5 — D1 Migrations**
87
114
  Run before any worker deploy so schema is current when new code lands:
88
115
  ```bash
89
- cd one.ie/web && bunx wrangler d1 migrations apply DB --remote --env production
116
+ cd one.ie/web && bunx wrangler d1 migrations apply DB --remote
90
117
  ```
91
- "✅ No migrations to apply!" is a pass. Any applied migration is logged and counted.
118
+ **No `--env production`** same deploy-target trap as the worker deploy itself (see trap note at top of file); `wrangler.toml`'s `[[routes]]`/`[triggers]` were reconciled to top level 2026-07-04 so there is no env-scoped target left to hit, and passing `--env production` here has no matching env block to resolve against.
119
+ "✅ No migrations to apply!" is a pass. Any applied migration is logged and counted (e.g. `0195_workspace_sources.sql` applied 2026-07-08, 4.63ms).
92
120
  Migration failures block deploy — never ship worker code ahead of its schema.
93
121
 
94
122
  **Step 7 — Deploy (parallel workers + astro + pay)**
95
- Gateway + Sync + Agents + Pay deploy in parallel (~16s). Astro Worker deploys after (~16s).
123
+ ```bash
124
+ (cd api && unset CLOUDFLARE_API_TOKEN && bunx wrangler deploy) &
125
+ (cd sync && unset CLOUDFLARE_API_TOKEN && bunx wrangler deploy) &
126
+ (cd channels && unset CLOUDFLARE_API_TOKEN && bunx wrangler deploy) &
127
+ (cd pay/backend && unset CLOUDFLARE_API_TOKEN && bun run deploy) &
128
+ wait
129
+ cd one.ie/web && unset CLOUDFLARE_API_TOKEN && bunx wrangler deploy # after the 4 above land
130
+ ```
131
+ Gateway + Sync + Agents + Pay deploy in parallel (~10s each). Astro Worker deploys after (~30s — largest bundle).
96
132
 
97
133
  **Step 8 — Health**
98
134
  ```bash
99
135
  curl https://api.one.ie/health # Gateway
100
136
  curl https://one.ie/api/health # Astro Worker (production)
101
137
  curl https://channels.one.ie/health # Agents (channels) — custom domain
102
- curl https://pay.one.ie/ # Pay gateway — 200 on root is the health signal (no /health route)
138
+ curl https://pay.one.ie/ # Pay gateway — 200 on root is the gate
139
+ curl https://pay.one.ie/status # …and /status returns status:"ok" (richer; no /health on this entry)
103
140
  # Sync (one-sync) is a CRON-ONLY worker (no HTTP route) — no health endpoint.
104
141
  # Its successful `wrangler deploy` ("Deployed one-sync triggers") IS the health signal.
105
142
  ```
@@ -132,10 +169,18 @@ language grammar files into the SSR worker on every build. **Do not re-enable.**
132
169
 
133
170
  ```js
134
171
  ssr: {
135
- external: ["node:async_hooks", "@mysten/sui", "@mysten/bcs", "shiki", "@shikijs/core", "@shikijs/types"]
172
+ external: ["node:async_hooks", "shiki", "@shikijs/core", "@shikijs/types", /* … */]
136
173
  }
137
174
  ```
138
175
 
176
+ **`one.ie/web/astro.config.mjs` § `vite.ssr.external` is the authority for this
177
+ list — never reconcile that file to this doc.** It carries 17 entries as of
178
+ 2026-08-02 (`cookie`, `cytoscape`, `@xyflow/react`, `recharts`, `@stripe/*`,
179
+ `media-chrome`, `motion`, `@100mslive/*`, … alongside the shiki trio). Deleting
180
+ entries to match a stale snippet here would blow the bundle. A companion
181
+ `build.rollupOptions.external` also drops anything matching `shiki/` or
182
+ `@shikijs/` by prefix.
183
+
139
184
  The CF adapter bundles everything by default. `ssr.external` creates a bare
140
185
  `import { x } from 'pkg'` reference without inlining the package.
141
186
 
@@ -168,12 +213,16 @@ at runtime.
168
213
  **Use this pattern for:** any page that has no server-side data dependencies
169
214
  (no `Astro.locals`, no `Astro.request`, no DB queries in frontmatter).
170
215
 
171
- Currently prerendered (verify with `grep -l "export const prerender = true" src/pages/*.astro`):
172
- `404.astro`, `board.astro`, `build.astro`, `ceo.astro`, `chat.astro`, `chat-agents.astro`,
173
- `chat-fast.astro`, `chat-routing.astro`, `in.astro`, `speed.astro`.
216
+ The prerendered set changes every cycle never hardcode it. Read it from the
217
+ tree (34 pages as of 2026-08-02):
174
218
 
175
- Pages that CANNOT be prerendered (need runtime session/auth):
176
- `world.astro` (reads `Astro.locals.session`), `market.astro` (fetches capabilities).
219
+ ```bash
220
+ cd one.ie/web && grep -l "export const prerender = true" src/pages/*.astro
221
+ ```
222
+
223
+ Pages that CANNOT be prerendered: any page whose frontmatter reads
224
+ `Astro.locals` (session/workspace context), `Astro.request`, or queries the DB.
225
+ Those must stay SSR.
177
226
 
178
227
  ### Rule 4 — `inlineStylesheets: 'auto'` in `astro.config.mjs`
179
228
 
@@ -215,6 +264,9 @@ Do not remove for production builds.
215
264
  | 2026-04-18 (post Pages→Workers migration) | — | — | 9.5 MiB | Rules 1-3 + 5 |
216
265
  | 2026-05-22 before `inlineStylesheets` fix | 18.5 MiB | 3.3 MiB | 9.5 MiB | Over 3 MiB ceiling — deploy FAILED |
217
266
  | 2026-05-22 after Rule 4 (`'always'` → `'auto'`) | 10.1 MiB | **2.1 MiB** | **672 KiB** | Under ceiling — deploy ✓ |
267
+ | 2026-07-08 | 14.7 MiB | **3.22 MiB** | — | **Exceeds the documented 3 MiB (3072 KiB) free-tier ceiling and still deployed successfully.** Either this account is on a paid Workers plan (10 MiB ceiling) rather than free tier, or the ceiling figure elsewhere in this doc is stale — unconfirmed which. Don't treat "under 3 MiB" as a hard gate until this is resolved; treat 3.2 MiB as the new floor to watch, and re-run Bundle Size Diagnosis if growth continues. |
268
+ | 2026-07-19 | 20.2 MiB | **4.43 MiB** | — | +37% over 2026-07-08's 3.22 MiB. Deployed successfully — no diagnosis run yet. Growth window covers several merged features that day (newsletter platform, directory-submission, social-formats, movers-playbook, etc.) landing in one `/deploy` cycle; not isolated to a single change. Re-run Bundle Size Diagnosis if the next snapshot keeps climbing. |
269
+ | 2026-07-29 | 20.9 MiB | **4.60 MiB** | 1.2 MiB | +6% over 2026-07-19, third consecutive climb. Cheap diagnosis WAS run this cycle (the two grep/`ls` commands below, not a full audit): **no single runaway** — Shiki hits 0, top chunks are `_astro_data-layer-content` 2.1 MiB (content collections), `worker-entry` 1.2 MiB (up from 672 KiB at the 2026-05-22 baseline), `index` 1.3 MiB, `icons` 0.8 MiB, `mermaid` 0.8 MiB, `stripe.esm.worker` 0.6 MiB, `react-vendor` 0.5 MiB. Growth is diffuse feature accretion, not a regression; this deploy's own diff was test-only. Two named candidates if a real audit is ever warranted: `mermaid` (0.8 MiB in the SSR bundle — Rule 2 `ssr.external` candidate if it's only reached from `client:only` islands) and the 15 chunks referencing `react-vendor` (Rule 3 suggests some page still SSR-renders React via `client:load`). |
218
270
 
219
271
  The 2026-05-22 regression was caused by `build: { inlineStylesheets: 'always' }`
220
272
  inlining the full Tailwind stylesheet into every route's manifest entry. One
@@ -244,7 +296,7 @@ Never: `CLOUDFLARE_API_TOKEN` (scoped token lacks workers + custom domain permis
244
296
  The deploy script auto-unsets `CLOUDFLARE_API_TOKEN` from the spawned env to prevent
245
297
  accidental use of a scoped token that was exported in the shell.
246
298
 
247
- Required env (export locally before `bun run deploy` — there is no CI):
299
+ Required env (export locally before running any deploy step — there is no CI, no root script):
248
300
  - `CLOUDFLARE_GLOBAL_API_KEY` + `CLOUDFLARE_EMAIL` — auth
249
301
  - `PUBLIC_GATEWAY_URL: https://api.one.ie` — build-time-inlined by Astro (**required**; without it the Worker bundle falls back to `one-gateway.oneie.workers.dev` and gateway-backed routes break). Lives in `one.ie/web/.env`.
250
302
 
@@ -254,25 +306,25 @@ Required env (export locally before `bun run deploy` — there is no CI):
254
306
 
255
307
  ### `/deploy` (full pipeline)
256
308
 
257
- 1. `bun run verify` — W0 gate. Fail here means don't deploy.
258
- 2. `git diff` summary — surface scope to user.
259
- 3. Commit & push — `git add -A && git commit && git push origin main`. Skip if working tree is clean.
260
- 4. `NODE_ENV=production bun run build` — Astro production build.
309
+ 1. Per-service typecheck + `one.ie/web` vitest — W0 gate (see Step 1 above; no unified script exists). Fail here means don't deploy, except Known-Flaky entries.
310
+ 2. `git status --porcelain` + `git diff --stat` — surface scope to user. **Stage by explicit path, never `git add -A`** — untracked scratch/backup dirs (e.g. `.wip-backups/`) belong to prior sessions, not this commit.
311
+ 3. Commit, PR, mergeworktree branch, push, `gh pr create`, `gh pr merge --squash --auto --delete-branch`, then `git switch main && git pull` on the shared tree (see Step 2.5). Skip entirely if working tree is clean.
312
+ 4. `cd one.ie/web && NODE_ENV=production bun run build` — Astro production build.
261
313
  5. Verify credentials: assert `CLOUDFLARE_GLOBAL_API_KEY` present, unset `CLOUDFLARE_API_TOKEN`.
262
- 6. Smoke check: assert `dist/_worker.js/` exists, all 5 wrangler configs present.
263
- 7. Approval gate: prompt on `main`, auto on other branches.
314
+ 6. Smoke check: assert `dist/server/` exists, all 5 wrangler configs present.
315
+ 7. Run D1 migrations (Step 6.5): `bunx wrangler d1 migrations apply DB --remote` no `--env`.
264
316
  8. Parallel deploy: Gateway + Sync + Agents + Pay concurrently, then Astro Worker.
265
- 9. Health checks: 4 HTTP endpoints (Gateway, Astro, Channels, Pay via custom domains) × 3 retries with backoff; Sync verified by deploy success.
266
- 9. Report:
317
+ 9. Health checks: 4 HTTP endpoints (Gateway, Astro, Channels, Pay via custom domains, cache-busted with `?_t=$(date +%s)`) × 3 retries with backoff; Sync verified by deploy success.
318
+ 10. Report:
267
319
  ```
268
320
  Branch: main
269
- Tests: 320/320 pass
270
- Build: 23.2s
271
- Migrations: 2 applied (0 already up-to-date)
272
- Workers: parallel 16.7s (vs ~42s sequential)
273
- Astro: 16.1s
274
- Health: 4/4 HTTP (Gateway 88ms, Astro 93ms, Channels 59ms, Pay 71ms) + Sync deployed
275
- Total: ~65s
321
+ Tests: 4082/4084 pass (2 known-flaky: SSRF DoH lookup, sandbox-network-blocked)
322
+ Typecheck: 5/5 services clean
323
+ Build: 33.4s
324
+ Migrations: 1 applied (0195_workspace_sources.sql)
325
+ Workers: gateway+sync+channels+pay parallel, then astro
326
+ Health: 4/4 HTTP 200 (Gateway, Astro, Channels, Pay) + Sync deploy-confirmed
327
+ Bundle: gzip 3220 KiB (exceeds documented 3072 KiB free-tier figure, deploy succeeded — see Verified Bundle Numbers note)
276
328
  ```
277
329
 
278
330
  ### `/deploy astro`
@@ -282,9 +334,9 @@ Deploys the production worker (`one-prod`) to `one.ie` from the `one.ie/web/` di
282
334
  1. `cd one.ie/web && NODE_ENV=production bun run build`
283
335
  2. Check bundle size: `du -sh one.ie/web/dist/server/`
284
336
  3. If > 12 MiB: check which chunk grew (`ls -lhS one.ie/web/dist/server/chunks/ | head -15`)
285
- 4. Run D1 migrations: `cd one.ie/web && bunx wrangler d1 migrations apply DB --remote --env production`
337
+ 4. Run D1 migrations: `cd one.ie/web && bunx wrangler d1 migrations apply DB --remote` (**no `--env production`** — see Step 6.5 note)
286
338
  5. `cd one.ie/web && bunx wrangler deploy` — **no `--env production`** (deploy-target trap: see note at top of this file — `--env production` appends `-production` to the worker name and ships to a script nothing routes to)
287
- 6. Health: `curl -sL https://one.ie/api/health` (expect 200, `status:"ok"`)
339
+ 6. Health: `curl -sL "https://one.ie/api/health?_t=$(date +%s)"` (expect 200, `status:"ok"`) — always cache-bust with `?_t=`, see Gotchas § cache-control on errors
288
340
 
289
341
  **Resolved 2026-07-04:** `one.ie/web/package.json`'s `"deploy"` script had the same `--env production` trap. Confirmed via the CF API that it was real — neither `one-prod` (live) nor the `one-prod-production` decoy had any cron schedules registered, meaning `billing-alerts-cron.ts`/`billing-allocation-cron.ts`/`billing-autotopup-cron.ts`/`billing-lifecycle-cron.ts`/`billing-verify-cron.ts`/`funnel-aggregate-cron.ts`/`webhook-deliver.ts`/`broadcast-drain-cron.ts` were not running on any schedule. Fixed by reconciling `wrangler.toml`: the `[[routes]]` (custom domain) and `[triggers]` (crons) blocks — the only two things that existed *only* under `[env.production]` — were moved to top level (everything else was already duplicated there); the now-fully-redundant `[env.production.*]` block was deleted entirely, and `package.json`'s script dropped `--env production`. The trap is now structurally impossible — there's no `--env production` target left to hit.
290
342
 
@@ -300,8 +352,14 @@ curl -s -X DELETE \
300
352
 
301
353
  ### `/deploy workers`
302
354
 
355
+ Verified 2026-07-08: all three complete independently with no shared state, so
356
+ run them in parallel (this matches Step 7 of the full pipeline).
357
+
303
358
  ```bash
304
- cd api && bun wrangler deploy && cd ../sync && bun wrangler deploy && cd ../channels && bun wrangler deploy && cd ..
359
+ (cd api && unset CLOUDFLARE_API_TOKEN && bunx wrangler deploy) &
360
+ (cd sync && unset CLOUDFLARE_API_TOKEN && bunx wrangler deploy) &
361
+ (cd channels && unset CLOUDFLARE_API_TOKEN && bunx wrangler deploy) &
362
+ wait
305
363
  ```
306
364
 
307
365
  Report: version hash per worker, health latency per service.
@@ -312,7 +370,11 @@ Deploys the pay gateway (`one-core-worker`) to `pay.one.ie` from the `pay/backen
312
370
 
313
371
  1. `cd pay/backend && bunx tsc --noEmit` (no dedicated `typecheck` script — run `tsc` directly)
314
372
  2. `unset CLOUDFLARE_API_TOKEN && bun run deploy` (= bare `wrangler deploy`, no `--env` flag)
315
- 3. Health: `curl -sL -o /dev/null -w "%{http_code}" https://pay.one.ie/` (expect 200 there's no `/health` route; root 200 is the signal)
373
+ 3. Health both probed live 2026-08-02, both **200**, neither authenticated:
374
+ - Gate: `curl -sL -o /dev/null -w "%{http_code}" https://pay.one.ie/` (expect 200)
375
+ - Richer: `curl -sL https://pay.one.ie/status` → assert `status:"ok"` (also reports version, destinationMode, contract addresses)
376
+
377
+ `pay/backend/src/index.ts` mounts `pay/backend/src/routes/status.ts` (`/status`) and `discoveryRoutes` (`/`). It does **not** serve `/health` — the `/health` handler in `pay/backend/src/api/routes/status.ts` belongs to the separate, unmounted `src/api/` tree. Do not health-check `/health` here; it 404s.
316
378
 
317
379
  **Found 2026-07-05:** `pay/backend` shipped a real commit (`feat(pay): embeddable payment-link page`) that sat unshipped through a full `/deploy` cycle because the skill's service map only named 4 services. `pay.one.ie` is a first-class 5th deploy target, not a manual afterthought — check `git log` scoped to `pay/` for unshipped commits on every `/deploy` run, the same as the other 4 services.
318
380
 
@@ -344,67 +406,92 @@ grep -l "react-vendor" dist/server/chunks/
344
406
 
345
407
  ```bash
346
408
  # Workers — rollback to previous version
347
- bun wrangler rollback --name one-prod # production
348
-
349
- # Revert a Worker via git
350
- cd api && git stash && bun wrangler deploy
409
+ cd one.ie/web && bunx wrangler rollback --name one-prod # production
410
+
411
+ # Redeploy a Worker from its last-committed code WITHOUT touching the shared tree.
412
+ # Never `git checkout HEAD -- .` here: it silently destroys every uncommitted
413
+ # change under that path, including a concurrent session's. `hook:branch-pin`
414
+ # permits pathspec restores, so nothing will stop you — that's why it's banned by
415
+ # convention. `git stash` is blocked outright by hook:git-add-guard.
416
+ # Cut a throwaway worktree at the good commit and deploy from there instead.
417
+ # A fresh worktree has NO node_modules — install before wrangler, or bunx fails:
418
+ git worktree add /tmp/rollback-wt <good-sha>
419
+ (cd /tmp/rollback-wt/api && bun install && unset CLOUDFLARE_API_TOKEN && bunx wrangler deploy)
420
+ git worktree remove /tmp/rollback-wt
351
421
  ```
352
422
 
423
+ `wrangler rollback` is the cheaper move when the last good code is simply the
424
+ previous deployment — it needs no worktree and no rebuild.
425
+
353
426
  ---
354
427
 
355
428
  ## Known-Flaky Test Allowlist
356
429
 
357
- Located in `scripts/deploy.ts`:
358
-
359
- ```typescript
360
- const KNOWN_FLAKY = [
361
- 'Act 15: Speed Benchmarks', // hardware-dependent
362
- 'STAN distribution', // stochastic
363
- 'explorer mode', // stochastic
364
- ]
365
- ```
366
-
367
- These failures don't block deploy. Real failures (type errors, broken logic)
368
- always block. Use `--strict` to require full green.
430
+ No allowlist is enforced in code (`scripts/deploy.ts` doesn't exist in this repo — see
431
+ pipeline note above). Treat these by name when they appear in `bunx vitest run` output
432
+ in `one.ie/web`; don't block deploy on them, but don't silently ignore new failures either
433
+ confirm the failure signature matches before waving it through:
434
+
435
+ - `tests/e2e/c5-webhook-subscribe.test.ts` — `workflow:webhook-subscribe` "writes a KV
436
+ record…" and "fails closed on a non-owned workflow". **Root cause (confirmed 2026-07-08):**
437
+ `ssrfGuard()` (`one.ie/web/src/lib/ssrf.ts`) resolves DNS via Cloudflare DoH by fetching
438
+ `https://1.1.1.1/dns-query` directly; this local dev network refuses connections to
439
+ `1.1.1.1:443` (`curl: (7) Failed to connect`), so `resolveHostIPs` returns `[]` and every
440
+ URL including the test's `https://example.com` comes back `blocked_url`. Verify before
441
+ waving through: `curl -v --max-time 5 https://1.1.1.1/dns-query 2>&1 | grep -i refused`
442
+ — if that shows "Connection refused", it's this network gap, not a code regression. If it
443
+ connects fine and the test still fails, it's real — investigate.
444
+ - Hardware/stochastic benchmarks (speed, distribution-timing tests) — expected variance,
445
+ not correctness bugs.
446
+
447
+ Any other failure (type errors, assertion mismatches on business logic) blocks deploy —
448
+ diagnose and fix before proceeding.
369
449
 
370
450
  ---
371
451
 
372
452
  ## First-Time Setup
373
453
 
374
- Only needed once see `docs/deploy.md` for full walkthrough:
454
+ Only needed once. There is no `docs/deploy.md` this block plus the 8-Step
455
+ Pipeline above is the whole walkthrough. Resource names below are the ones
456
+ actually declared in `one.ie/web/wrangler.toml`; creating differently-named
457
+ resources produces bindings the Worker can't resolve.
375
458
 
376
459
  ```bash
377
- # Create CF resources
378
- bun wrangler d1 create one
379
- bun wrangler kv namespace create KV
380
- # Paste IDs into wrangler.toml + sync/wrangler.toml
381
-
382
- # Run D1 migration
383
- bun wrangler d1 execute one --remote --file=migrations/0001_init.sql
384
-
385
- # Gateway secrets (TypeDB credentials)
460
+ # Create CF resources — names must match wrangler.toml exactly
461
+ bunx wrangler d1 create one-owners # → binding DB
462
+ bunx wrangler kv namespace create SESSION # → binding SESSION
463
+ bunx wrangler kv namespace create CHAT_CACHE # binding CHAT_CACHE
464
+ bunx wrangler kv namespace create THREADS # → binding THREADS
465
+ bunx wrangler r2 bucket create one-content # binding CONTENT
466
+ # Paste IDs into one.ie/web/wrangler.toml + sync/wrangler.toml
467
+
468
+ # Run D1 migrations (the ledger starts at 0001_owners.sql — there is no 0001_init.sql)
469
+ cd one.ie/web && bunx wrangler d1 migrations apply DB --remote
470
+
471
+ # Gateway secrets (TypeDB credentials) — no --env flag, ever
386
472
  cd api
387
- printf 'admin' | bun wrangler secret put TYPEDB_USERNAME
388
- printf 'YOUR-PASSWORD' | bun wrangler secret put TYPEDB_PASSWORD
473
+ printf 'admin' | bunx wrangler secret put TYPEDB_USERNAME
474
+ bunx wrangler secret put TYPEDB_PASSWORD # paste at the prompt; never inline the value
389
475
  cd ..
390
476
 
391
477
  # First deploy — Worker auto-provisions on first `wrangler deploy`
392
- bun run deploy
478
+ # (see "The 8-Step Pipeline" above for the actual per-service commands — no root script)
393
479
  ```
394
480
 
395
481
  ---
396
482
 
397
483
  ## Logs
398
484
 
399
- - `.deploy.log` all deployment output, each worker appends here
400
- - `.deploy-build.log` W0 baseline diagnostics (biome + tsc + vitest separate)
485
+ No `.deploy.log` / `.deploy-build.log` files are written today there is no wrapper
486
+ script to produce them (see pipeline note at top of file). Output only lives in each
487
+ `wrangler deploy` command's own stdout; capture it yourself if a durable record is needed.
401
488
 
402
489
  Live logs:
403
490
 
404
491
  ```bash
405
- bun wrangler tail --name one-prod # Astro Worker (production)
406
- cd api && bun wrangler tail && cd .. # Gateway
407
- bun wrangler deployments list --name one-prod | head -10
492
+ cd one.ie/web && bunx wrangler tail --name one-prod # Astro Worker (production)
493
+ cd api && bunx wrangler tail # Gateway
494
+ cd one.ie/web && bunx wrangler deployments list --name one-prod | head -10
408
495
  ```
409
496
 
410
497
  ---
@@ -416,7 +503,7 @@ bun wrangler deployments list --name one-prod | head -10
416
503
  - Always `CLOUDFLARE_GLOBAL_API_KEY` — scoped tokens lack permissions for workers + custom domains
417
504
  - `import.meta.env` is build-time — `PUBLIC_GATEWAY_URL` is baked into the worker bundle at build. Missing → gateway-backed routes fall back to the wrong host and break
418
505
  - Custom domains: `[[routes]]` double bracket, no wildcards, add `workers_dev = true`
419
- - Worker upload limit: **3 MiB gzipped** on free tier (10 MiB on paid). Wrangler reports `gzip:` — only that number counts. Follow the 5 Bundle Size Rules above
506
+ - Worker upload limit: **3 MiB gzipped** on free tier (10 MiB on paid) — though a 2026-07-08 deploy shipped at 3.22 MiB gzip successfully, so this account's actual ceiling is unconfirmed (see Verified Bundle Numbers). Wrangler reports `gzip:` — only that number counts. Follow the 5 Bundle Size Rules above regardless of which ceiling applies
420
507
  - **D1 schema-drift fails at runtime, not compile-time.** Migrations that DROP+CREATE a table (e.g. `0059_domains.sql` renamed `slug`→`gid`, `verified`→`verified_at`) silently break any code that queries the old columns — typecheck passes, deploy succeeds, the route 500s in production. After any DROP+CREATE migration, grep the codebase for the old column names and fix call sites BEFORE deploying
421
508
  - **Error responses get the same `cache-control` as success responses.** Astro's Layout sets `public, max-age=300, s-maxage=86400, stale-while-revalidate=604800` on every render including 5xx pages. A bad deploy will be cached at the CF edge for 24h. When diagnosing, always bust the cache: `curl "https://host/path?_t=$(date +%s)"`. Consider a middleware rule that strips `cache-control` on `>= 500` status
422
509
 
@@ -1,6 +1,9 @@
1
1
  # /do autonomous loop
2
2
 
3
- Loaded by `do.md` for empty invocation or `--once` flag.
3
+ Invoked directly (`/do-autonomous`); `do.md` has no `--once` row in Step 0. The live
4
+ headless contract is `do.md` § *Autonomous gate resolution* (`--autonomous` /
5
+ `DO_AUTONOMOUS=1`), backed by `one.ie/web/src/lib/do-autonomous.ts` and
6
+ `text/do-autonomous-plan.md`. This file is the task-queue loop it runs.
4
7
 
5
8
  ---
6
9
 
@@ -19,18 +22,21 @@ ORIENT: Read text/TODO-plan.md
19
22
 
20
23
  ```
21
24
  loop:
22
- SENSE: GET http://localhost:4321/api/tasks
25
+ SENSE: POST http://localhost:4321/api/ask/tasks:mine (or tasks:everywhere)
26
+ (/api/tasks does not exist — tasks:* receivers are the only door,
27
+ and /api/ask is POST-only)
23
28
  Sort by priority (effective = score + strength − resistance)
24
29
  Skip blocked tasks (blockedBy non-empty)
25
30
 
26
31
  SELECT: Pick highest unblocked (P0 > P1, attractive > ready > exploratory)
27
- If all blocked: GET /api/state → follow pheromone highways (deadlock escape)
32
+ If all blocked: GET /api/export/highways → follow pheromone highways
33
+ (deadlock escape; /api/state does not exist)
28
34
 
29
35
  EXECUTE:
30
36
  BRIEF (before touching any file):
31
37
  source = task.source
32
- If source missing: grep -l "{task.name}" docs/*-todo.md
33
- Read docs/{source}-todo.md:
38
+ If source missing: grep -l "{task.name}" text/*-todo.md
39
+ Read text/{source}-todo.md:
34
40
  • frontmatter source_of_truth → spec docs to pre-load
35
41
  • find checkbox matching task.name → note exit criteria + "See also"
36
42
  Read each source_of_truth entry (first 80 lines each)
@@ -40,23 +46,28 @@ loop:
40
46
 
41
47
  VERIFY: bun tsc --noEmit on touched files
42
48
 
43
- MARK: POST http://localhost:4321/api/tasks/{id}/complete
44
-
45
- CLOSE: POST http://localhost:4321/api/loop/cycle-close {
46
- slug,
47
- kind: "code",
48
- scores: { security, stability, simplicity, integration, speed }
49
- }
50
- composite = 0.30·security + 0.25·stability + 0.20·simplicity + 0.15·integration + 0.10·speed
49
+ MARK: POST http://localhost:4321/api/ask/tasks:status
50
+ { "data": { "tid", "status": "done", "workspace": "<slug>" } }
51
+ (/api/tasks/{id}/complete does not exist — tasks:status is the only
52
+ status door, same as /close)
53
+
54
+ CLOSE: Neither /api/loop/cycle-close nor /api/loop/close exists. The live
55
+ cycle-close door is the world:do-event receiver:
56
+ POST http://localhost:4321/api/signal/world:do-event
57
+ { "data": { "type": "learn", "slug", "cycle", "composite", "tags": [...] } }
58
+ composite = the `task` rubric — weights are data in
59
+ .claude/scripts/rubric-weights.json (`task` block), which
60
+ w4-rubric.ts reads. Today: 0.30·security + 0.25·stability +
61
+ 0.20·simplicity + 0.15·integration + 0.10·speed.
62
+ This is the 5-axis TASK rubric — NOT the in-cycle W4 composite,
63
+ which carries goal-fit at 0.30 and gates on it at >= 0.50
64
+ (see do.md § W4). w4-rubric.ts prints it as `task-composite=`
65
+ so the two can never be confused in a log.
51
66
  composite ≥ 0.65 → mark(loop:cycle:{slug}, composite × 5)
52
67
  composite < 0.65 → warn equivalents (route back to W3, max 3 W4 loops)
53
- Response: { ok, slug, kind, composite, gate: "pass"|"fail", marks: { cycle, namespaced } }
54
-
55
- Note: /api/loop/close (without "cycle-") is a different endpoint —
56
- it manages WorkLoop session/stage tracking. Don't confuse them.
57
68
 
58
- FEEDBACK: POST http://localhost:4321/api/signal {
59
- receiver: 'loop:feedback',
69
+ FEEDBACK: POST http://localhost:4321/api/signal/loop:feedback {
70
+ (receiver is a PATH segment — /api/signal bare returns 400)
60
71
  data: {
61
72
  tags: task.tags,
62
73
  strength: rubricAvg,
@@ -67,7 +78,7 @@ loop:
67
78
  strength < 0.65 → warn(0.5) each tag path
68
79
  Always emit — even timeout, even dissolved. Every loop closes.
69
80
 
70
- GROW: GET http://localhost:4321/api/highways → report learned paths
81
+ GROW: GET http://localhost:4321/api/export/highways → report learned paths
71
82
 
72
83
  → repeat
73
84
  ```
@@ -1,14 +1,14 @@
1
1
  # /do --improve
2
2
 
3
- Loaded by `do.md` for `--improve` flag. Runs meta-improvement on do.md itself
4
- when drift signals accumulate.
3
+ Invoked directly (`/do-improve`); `do.md` has no `--improve` row in Step 0.
4
+ Runs meta-improvement on do.md itself when drift signals accumulate.
5
5
 
6
6
  ---
7
7
 
8
8
  ## Signal source (checks in order, first hit wins)
9
9
 
10
- 1. `signals.jsonl` — read `loop:drift:*` entries if file exists
11
- 2. `learnings.md` — read all `drift:` entries (polling fallback)
10
+ 1. `signals.jsonl` — read `loop:drift:*` entries if file exists (none on disk today)
11
+ 2. `text/learnings.md` — read all `drift:` entries (polling fallback)
12
12
 
13
13
  Group by wave+dim+tag_combo. For each group with count ≥ 2, run a one-cycle
14
14
  meta-improvement plan on `do.md`:
@@ -1,7 +1,8 @@
1
1
  # /do --show mode
2
2
 
3
- Loaded by `do.md` when plan frontmatter has `show: true` or `--show` flag is passed.
4
- Default behavior for `/do <plan> --auto` on show-plans. The loop runs every cycle without
3
+ Invoked directly (`/do-show`), or when a plan's frontmatter carries `show: true`.
4
+ Note `do.md`'s Step 0 classify table does not route a `--show` flag.
5
+ The loop runs every cycle without
5
6
  intervention; pauses at each cycle close to render a cycle frame. Press Ctrl-C to stop;
6
7
  otherwise auto-continues to the next cycle.
7
8
 
@@ -55,7 +56,7 @@ customer + agent through every stage the build now supports, in order.
55
56
  |---|---|---|
56
57
  | Wave gates | telemetry from each wave's logger | one line per wave, ✓/✗ + one number; W2 also shows `⬇ Z new` (new primitives through compress check) |
57
58
  | Rubric | W4 markDims output | five numbers + composite + gate-pass |
58
- | Speed | `/api/speed` budgets for this cycle | only metrics this cycle changed |
59
+ | Speed | the cycle's W4 speed axis (no `/api/speed` route exists) | only metrics this cycle changed |
59
60
  | What unlocks | plan's `lifecycle_show` frontmatter block | two sentences — customer + agent |
60
61
  | Lifecycle | plan's `lifecycle: [stages]` frontmatter | checkbox row, ✓ done / [ ] pending |
61
62
  | Next | next unchecked cycle + first task | one line; if last cycle, render lifecycle replay |