Skip to content

SESSION-PRIME: paste body's fenced block into a fresh Claude session to orient fast #115

Description

@TortoiseWolfe

Purpose: this issue is the durable roadmap for TortoiseWolfe/ScriptHammer. The body below is always-current — active arc, next 3 sessions queued, backlog. Comments are the audit trail (what shipped + what changed in the roadmap, per session). The prime prompt at the top tells a fresh Claude session to read this body first.


Prime prompt (copy from here into a fresh Claude session)

/prep

Then check this issue (TortoiseWolfe/ScriptHammer#115) — its BODY is the current roadmap. Read everything below the prime prompt: active arc, next 3 sessions queued, backlog. The most recent COMMENT on this issue is the audit trail of what changed since the previous session.

Supplementary context (read if the body's roadmap references them or if the user's first message takes us off-roadmap):
1. /home/TurtleWolfe/.claude/projects/-home-TurtleWolfe-repos-ScriptHammer/memory/MEMORY.md — top of the index has the most-recently-written memories.
2. `git log --oneline -20` — what shipped in the last couple of sessions.
3. Open issues: `gh issue list --repo TortoiseWolfe/ScriptHammer --state open`
4. Open PRs: `gh pr list --repo TortoiseWolfe/ScriptHammer --state open`

Operational reminders you WILL trip over otherwise:
- Docker-first. Never `pnpm install`/`npx` on the host, never sudo. Commit from INSIDE the container (`docker compose exec -T scripthammer git commit`) so husky/lint-staged/gitleaks run; push from the host.
- **Builds go in their OWN container: `docker compose run --rm builder pnpm build`.** #293 is FIXED — builds/tests/commits no longer kill the dev server. NEVER `docker compose exec scripthammer pnpm build`.
- **`git push` RUNS A FULL CI GATE** (`.husky/pre-push` → `validate-ci.sh --quick`: type-check, lint, tests, build, chunk check) and takes MINUTES. A short timeout kills it mid-build and looks EXACTLY like a network hang — 2026-07-17 misread it as one, then as dead IPv6, before finding the hook. Background it. **Never run two pushes/builds at once** (they race `builder_next` → "Production build failed"). **Never `git push … | tail`** — you get tail's exit code, not git's (4th sighting of the pipe-exit-code trap). Verify a push landed with `gh api repos/TortoiseWolfe/ScriptHammer/branches/<b> --jq .name` — 404 means it didn't.
- **`/chatt` IS the Cesium atlas** (#292). `?diorama` opts out. **Bookmark `?notour`** or every reload flies the camera. Default path makes ZERO Overpass calls (buildings-wide.json is baked). Since #301 the twin routes are FULL-VIEWPORT (`fixed inset-0`) with glass chrome floating over the scene, and **the page cannot scroll** — if you ever see scroll there, something regressed.
- **HTTP 000 + `dns=0.000000s` is DEAD IPv6, NOT DNS.** This machine's IPv6 is broken; scripthammer.com / *.github.io / arcgisonline / api.supabase.com all lead with AAAA. **Use `curl -4`.** In the browser it looks like the PWA "Offline" page, or the atlas rendering buildings on a BLACK scene. It is INTERMITTENT — the same URL "breaks" with nothing changed.
- A BAKE corrupts the dev server's `.next` and #230's self-heal CANNOT see it (it watches 5xx; this serves 200 with a dead chunk). Signature: "Cannot read properties of undefined (reading 'call')". Remedy: `docker compose restart scripthammer`. See #298.
- Dev URL is pinned: http://127.0.0.1:3002/ScriptHammer/ (SH_PORT=3002; :3000 is RescueDogs).
- VERIFY VISUALLY, and drive the real gesture. `toBeVisible()` checks CSS, NOT occlusion — it passed for months on a wordmark buried under the navbar (#299). Use `elementFromPoint` at the element's own centre, then LOOK at a screenshot. Playwright MCP: connect via `http://127.0.0.1:3002`, NOT host.docker.internal.
- **A STALE SERVICE-WORKER CHUNK MAKES A CORRECT FIX MEASURE AS STILL-BROKEN.** The SW re-registers on EVERY load and `?cb=N` busts the page, not the chunks. Before believing any live measurement: unregister every `navigator.serviceWorker` registration + `caches.delete` all keys, then reload. On 2026-07-17 this nearly caused a "fix" to a bug that was already fixed. HMR also does not reliably pick up `src/twin/cesium/` or `src/stage/` — `docker compose restart scripthammer` too.
- To run E2E locally like CI you need a REAL root build: `DISABLE_BASE_PATH=true` is **not enough** (`.env`'s `NEXT_PUBLIC_BASE_PATH` wins at next.config.ts:15) — pass `-e NEXT_PUBLIC_BASE_PATH=` too, verify `grep -c "/ScriptHammer/_next" out/index.html` == 0, then `serve out -l 3001` + `SKIP_WEBSERVER=1 BASE_URL=http://127.0.0.1:3001` + `--no-deps`. Wrong build ⇒ Playwright silently hits the dev server and EVERY spec fails. Restore `project-detected.json` + `public/manifest.json` after.
- `window.__atlas` = `{ viewer, manifest, placed, tour, sampleEllipsoidalM, geoidOffsetM }` — Cesium is an ES module so there's no `window.Cesium`; this is the only probe handle. Read it FRESH at point of use: React StrictMode double-mounts in dev.
- **CHECK THE `CI` WORKFLOW, NOT JUST E2E.** A flake can HARD-fail the `CI` workflow (vitest fails on unhandled errors) while E2E is green — that reddened main on 46a228f and was missed by reading only the E2E rollup. After each merge: `gh run list --branch main --workflow CI --limit 1` AND read the `Test Report` job's `N flaky` line. A flake is a failed build, not a harmless green (owner's standing rule).
- **The FORK (`TortoiseWolfe/RescueDogs`, product rebranding to RaisedPaws) needs our non-3D fixes.** When you merge a general a11y/CI/auth/tooling fix here, add it to **RescueDogs#56** (the ongoing sync tracker) so a fork session can port it. NEVER port the Cesium/Three.js/atlas work. Fork also needs its own SMTP: RescueDogs#55. Bare `gh` in the RescueDogs checkout resolves to THIS upstream — always pass `--repo` (see [[roadmap_split_scripthammer_rescuedogs]]).

Then either start on the roadmap's "next session should" item, or ask the user if they want to deviate.

Stop reading here when priming — everything below is the roadmap


Roadmap

Active arc

#265 — swap Supabase → .NET, security-preserving (the owner-blocking #280 gate). The verify-and-wire increment is DONE (2026-07-18): the dormant ASP.NET Core backend (dotnet-messaging/) is now proven conformant AND gated in CI.

Status: verify-and-wire milestone SHIPPED.

  • PR fix(#265): .NET messaging conformance 12/12 + JWT hardening + C11 doc-truth #322 (merged, adcc42a) — .dotnet conformance 12/12 live against the running server (both providers 12/12) + Phase-1 security hardening (fail-closed demo-secret startup guard — verified Production refuses to boot; ValidateIssuer gated on SUPABASE_URL) + C11 doc-truth. The one live defect was ASP.NET Ok((object?)null) → HttpNoContentOutputFormatter → 204 → the TS provider mapped it to undefined not null; fixed by dropping that formatter.
  • PR ci(#265): wire pnpm test:rls into CI — RLS + dual-provider conformance gate #324 (merged, 08320e2) — .github/workflows/conformance.yml: spins up a local dual-provider stack and runs the full pnpm test:rls (107/107 — 9 RLS suites + both provider contracts). test:rls previously ran in ZERO workflows. Own per-runner local stack → no e2e-supabase mutex needed. Not yet a REQUIRED check — make it required once stable across a few main runs.

Remaining on #265/#280 (next increments, in order):


Next 3 sessions queued

Session +1: Model City — build the 049 board slice (build-ready; #265's Phase-1 .NET security is now ALL done)

Session +2: #291 — three.js in the initial vendor chunk (2.66 MB on EVERY route)

  • Why: the broadest live perf degrade (~18× the 150 KB budget, hits even the 3D-free homepage); independent; a small fix.
  • First action: add a three/@react-three/* cacheGroup mirroring the merged cesium group + a first-load JS budget test. Verify with module.nameForCondition() + a post-minify surviving string (the cesium re-export shell burned the naive regex before).

Session +3: Combined Arms #48 (BF2-style squad FPS) — one SpecKit slice


Backlog (no scheduled position)


Next session should

#265's Phase-1 is DONE and its conformance is broadened + honestly documented — verify-and-wire (#322), the Conformance CI gate (#324), least-privilege + RLS backstop (#321), and coverage expanded to 20 cases/provider incl. groups/archive/pagination/realtime C29 (#327 + #328, test:rls 129/129). The .NET messaging seam is proven, gated, security-hardened, and truthfully catalogued (docs/messaging/AUTHORIZATION-CONTRACT.md — the contract is 13 real clauses, NOT 29; C4/C6/C15–C28 were never authored — don't invent them). Next: build Model City 049 (build-ready via #320 — a change of pace) OR #291 perf. The #265 coverage tail is DONE; the next real #280 coverage work is the seam-expansion backlog (C3/groups/keys/GDPR, in the doc). New epic #326 (Chatt city-limits coverage) is in the backlog with the 2630 E Main client as its Phase-1 anchor.


Why this exists

Sessions end. The next session starts cold. Without a single canonical "what was the world like when we last stopped + here's what to do next" pointer, the new model wastes context wandering. This issue is the one URL to paste into a fresh chat. The BODY carries the plan; comments form the audit trail.

How to maintain

Run /session-prime at session-end. The skill rewrites the body to reflect what changed in the roadmap and appends a comment with the audit trail.

If the prime prompt itself becomes stale (memory file renamed, project changed shape), edit the body's prime-prompt block directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationnext-sessionRolling priming prompt for new sessions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions