New Machine Setup

New machine setup (Claude Code)

Clone the repo, open Claude Code in it — the rest happens on its own (#661). This page says what lives in git, what the first session does, and the few things that can never be in git.

What the repo carries

  • Rules and hooks — CLAUDE.md, AGENTS.md, .claude/settings.json hooks (standards digest, owner-brief reply rule, branch-guard, widget-design gate, stop-gate).
  • Skills and agents — .claude/skills/*, .claude/agents/*.
  • Plugins — enabledPlugins + extraKnownMarketplaces in .claude/settings.json (andrej-karpathy-skills, codex).
  • Effort defaults — effortLevel and per-model modelSettings in .claude/settings.json.
  • MCP — .mcp.json: the playwright server (browser proofs), approved for the project by enabledMcpjsonServers. Its profile folder is ${USERPROFILE}/.claude/playwright-profile.

What the first session does

The SessionStart hook (.claude/hooks/session-context.mjs → machine-setup.mjs):

  1. Installs the plugins the project enables but this machine lacks. A fresh Claude config reads enabledPlugins but fetches nothing, and claude plugin install fails with “not found in marketplace” until the marketplace is added — so the hook adds each marketplace from its declared source, then installs the plugin (about 20 s, once). They load from the next session.
  2. Wires the pre-push gate — the absolute hook wrapper under .git/ttn-gates/ (#430), when the clone has none.
  3. Names what is missing in one line — secrets and CLI logins, by existence only. A value is never read, printed or committed.

On a complete machine the hook is silent. Proven with an empty CLAUDE_CONFIG_DIR (only the login copied in): session 1 installed both plugins; session 2 loaded them, the playwright MCP, the project skills and agents (05_tasks/proof/661/).

What can never be in git

Secret / loginUsed byWhere it comes from
Supabase access token — ~/.supabase/access-tokenmigrations, schema-drift, prod readsSupabase → Account → Access tokens (owner)
Telegram bot — 02_app/shopify-app/playwright-debug/.secrets.envproof to the owner’s Telegramcopy from the owner’s machine
Vercel token — ~/.tryvio/vercel-tokenenv-drift, prod-verify, deploy-localVercel → Account → Tokens
Smoke-store password — ~/.tryvio/smoke-store-passwordprod-smoke widget checkowner
GitHub CLI loginissues, PRs, land.mjs labelsgh auth login
Vercel CLI loginvercel env, deploy fallbacknpx vercel login
Figma API keythe figma-mcp serverstays a user-scope MCP server — its key is an argument, so it is not in .mcp.json

Env vars with the same names (SUPABASE_ACCESS_TOKEN, VERCEL_TOKEN, TELEGRAM_BOT_TOKEN, SMOKE_STORE_PASSWORD, GH_TOKEN) count as present.

Memory — beside the repo, one day at a time

Owner decision 2026-09-30: memory is a shared folder NEXT TO the checkout, and it must not keep growing.

  • Where: ../tryitnow-memory/, a clone of the orphan claude-memory branch of this repo (no app code, no workflows, no Vercel link — a push there deploys and runs nothing). Claude keeps a repo’s memory in ~/.claude/projects/<derived>/memory/; that folder is a directory junction to the shared one, so every console and worktree reads one memory. A new machine clones it on its first session; the first run on a machine that already has memory migrates it and keeps the old folder as a dated backup.
  • Layout: MEMORY.md (the index Claude loads — under 150 lines / 20 KB; Claude reads only its first ~25 KB, and it was 36 KB before this), one durable fact per file, days/YYYY-MM-DD.md for the day’s progress and decisions, days/archive/ for summarised days.
  • Sync (hooks, no commands): SessionStart pulls; every Stop commits what changed and pushes at most every 10 minutes. A file that looks like it holds a key (Figma, GitHub, Supabase, Shopify, JWT, private key…) is NOT committed and the turn is told which file — never the value. Two machines editing the same file merge with *.md merge=union.
  • Daily rollover: the first session of a new day — exactly one console, by a lock — is asked to run a background summary: yesterday’s journal becomes at most 10 carried-over lines in today’s file, durable facts move to their topic files, finished items leave MEMORY.md, yesterday goes to the archive.