You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Full-repo deslop: **net −51,800 lines (−24%), 146 files removed**,
executed as seven gate-verified waves plus an adversarial
regression-review pass.
## What changed
- **Vendored Office tooling deduplicated (−45,082):**
`skills/{docx,pptx,xlsx}/scripts/office` were byte-identical; one copy
now lives at `skills/_shared/office` and the sandbox Dockerfile
materializes all three paths at image build. `pnpm turbo skills:build`
output is byte-identical.
- **Gateway OpenAPI subsystem removed (−1,575):** zero consumers (no
codegen, docs site, or fetches). Telemetry now keys on Hono route
templates; rate-limit buckets key on route templates (old-format buckets
age out).
- **`packages/db` restructured:** the hand-maintained `supabase-target*`
schema mirror (2,904 LOC) became a 720-LOC migration smoke+invariant
gate under `scripts/supabase-target/`; the three lease-queue
implementations share one generic core (SQL semantics preserved
op-by-op); research workflows deduplicated.
- **Workers refactored:** Durable Object calls converted from
hand-rolled HTTP-over-fetch to native RPC (SSE stream stays on fetch);
three deletion workflows share one job-runner; four workers share one
bootstrap/error runtime; the ProjectSandbox facade is a lease-policy
table (276→82 lines).
- **Dead code purged:** dead routes (`/v1/tools`, `/v1/agents`, sandbox
file API replaced by the code-server IDE, `runs/status`), write-only
stream parts (schemas retained for historical transcripts), 55% of web
CSS, single-use wrappers, barrel bloat, config husks.
- **Bug fixes:** web proxy matcher now guards `/pricing`+`/usage` (and
drops nonexistent routes); stale `app_worker` role reference removed;
`SkillRuntimeScopeSchema` single-sourced in `@cheatcode/types`.
- **Gate hardened:** `pnpm deadcode` now runs knip with
`includeEntryExports` (it previously could not flag any dead export) and
reports zero findings.
## Deliberately kept
Gateway idempotency DO layer (an adversarial concurrency trace proved it
load-bearing: post-commit/pre-DO-start duplicate-POST race),
`api/health`, the daily-maintenance activation phase, Ultra/Max env
plumbing, `generated-manifest.ts` tracking (Vercel affected-detection).
## Regression pass
An independent review of the refactor commits found and this branch
fixes: gateway error responses losing CORS/security headers (proven
fixed live: cross-origin 401 carries ACAO+CSP+HSTS), webhook store
outages surfacing 500 instead of retriable 503, a blind row-cast that
could permanently drop a webhook, four over-deleted migration invariant
validators (restored), preview-proxy leaking `X-Request-Id` upstream.
## Verification
`lint` / `typecheck` / `turbo build --force` (23/23 cold) / `deadcode`
(0 findings) / `architecture:check` / `skills:build` manifest-stable —
all green post-merge with `origin/main` (upload-guard +
`restoreUploadedFiles` work ported into the new facade). Live smoke via
direct agent-browser: home, signed-out auth redirects for
`/pricing`+`/usage`, signed-in `/usage`, historical chat transcript
rendering.
Deploy notes: sandbox snapshot rebuilds on merge (Dockerfile
materialization step); gateway telemetry route labels change format once
(analytics series discontinuity).
May 28, 2026 direct override: delete any product-flow test script, temporary
111
-
helper, command-loop runner, browser wrapper, prompt driver, curl flow, or
112
-
package alias when discovered. The active V2 tree should contain no product-test
113
-
scripts. The remaining `scripts/` files are operational only and must not click
114
-
the UI, submit prompts, drive auth, gather acceptance evidence, or replace
115
-
direct `agent-browser` operation.
116
-
117
-
May 28, 2026 latest user directive: code the all-weeks V2 surface first, then
118
-
run final product QA only through direct `agent-browser --auto-connect --session
119
-
cheatcode-debug` UI actions and direct console/network/app-log inspection. Do
120
-
not write, run, or keep scripts to submit prompts, click UI, drive auth, wrap
121
-
`agent-browser`, run curl flows, or gather acceptance evidence.
122
-
123
108
## Where things live
124
109
125
110
| Need | File |
126
111
|---|---|
127
-
| Add a new tool |`packages/tools-<domain>/src/<tool>.ts`|
112
+
| Add a new tool |`packages/agent-core/src/tools/<domain>/<tool>.ts` for data/docs/media; `packages/tools-<domain>/src/<tool>.ts` for browser/code/research|
128
113
| Add a new agent |`packages/agent-core/src/mastra/agents/<name>.ts`|
129
114
| Add a new workflow |`packages/agent-core/src/mastra/workflows/<name>.ts`|
130
115
| Add a new skill |`skills/<name>/SKILL.md` (+ optional `references/` / `assets/`) |
@@ -136,7 +121,13 @@ not write, run, or keep scripts to submit prompts, click UI, drive auth, wrap
136
121
137
122
Curated skills are bundled at build time into `packages/skills/src/generated.ts` (Workers have no filesystem at runtime). Anthropic SKILL.md format. V2 has no bundled skill scripts, no `evals/evals.json`, no local skill-eval runner, and no `skill_run_script` tool.
138
123
139
-
The source-of-truth catalog is the set of skill folders under `skills/`; do not duplicate a manually maintained name list here. External skill registry exports, skills.sh links, public publishing scripts, and launch-prep copy are outside V2 unless the user explicitly re-expands the plan.
124
+
The source-of-truth catalog is the set of non-underscore skill folders under
125
+
`skills/`; do not duplicate a manually maintained name list here.
126
+
`skills/_shared/office/` is the shared vendored tree materialized by the sandbox
127
+
Dockerfile, and `scripts/build-skills.ts` skips `_`-prefixed directories.
128
+
External skill registry exports, skills.sh links, public publishing scripts,
129
+
and launch-prep copy are outside V2 unless the user explicitly re-expands the
130
+
plan.
140
131
141
132
The bundler contract lives in `scripts/build-skills.ts` and `packages/skills`.
0 commit comments