← HOME

PROJECT

Claude Code Setup

ACTIVE

Power user environment for AI-assisted development

Claude CodeTypeScriptBashGitHub MCPContext7 MCP

ABOUT

Claude Code Setup is the personal development environment for AI-assisted engineering at Understory Labs. It's not a project with a URL — it's the infrastructure layer that everything else runs on top of.

The core is a library of 25+ global skills: reusable Claude Code commands that codify workflow patterns (/plan, /brainstorm, /commit, /log, /debug, /review, and more). Combined with MCP servers (GitHub integration, Context7 documentation lookup) and hooks (git event handlers, environment protection), it creates an environment where common operations are single commands.

The opusplan model profile is a key architectural detail: Opus during planning and architecture sessions, Sonnet during execution — so the most capable model is used where reasoning depth matters, and the faster model handles implementation. This setup is the scaffold for every other project in Understory Labs.

FEATURES

SHIPPED

  • 25+ global skills — /plan, /brainstorm, /commit, /log, and more

    Reusable Claude Code commands codifying common engineering workflow patterns

    MAR 2026
  • MCP servers — GitHub and Context7

    GitHub integration for PR/issue management; Context7 for live documentation lookup

    MAR 2026
  • Hooks — git and environment event handlers

    Pre/post tool hooks: .env protection, git integration, session events

    MAR 2026
  • opusplan model profile — tiered model selection

    Opus for planning sessions, Sonnet for execution — configured in settings.json

    MAR 2026
  • Switchboard
    JUN 2026

CHANGELOG

CLAUDE-CODEfeatureinfrastructureai

Field Notes end-to-end — pipeline fixed, peer briefing rebuilt, research intake live

Features

  • Peer briefing live — daily scan consolidates penpal status, recent projects, and Nathan's session log into a single peer-briefing item; ◉ peer badge and expanders render in intel UI
  • Haiku session summaries: each session log entry gets a 2-3 sentence AI summary (what was built, why it matters, current focus implied) via direct Anthropic API call in the scan route
  • Date-window replaces hardcoded limit — peer briefing fetches all session entries dated yesterday or later; captures full daily output instead of capping at three
  • 60 GitHub Trending items enriched on first successful trigger run — three-lens analysis (Signal / Learning / Relevance) against context/enrichment-guide.md rubric
  • ISSUE-026 resolved — enrichment trigger scoped to ?source=github-trending; peer-briefing and lore-changelog items no longer receive GitHub repo lens analysis
  • Ad-hoc research intake live — POST /api/intake/research accepts topic, context, and research goal; creates research-request item in Supabase; ad-hoc-research source registered
  • field-notes-researcher trigger created (trig_017jfRbNBt3BFicX6K26CPL8, every 4 hours) — picks up research requests, runs WebSearch across 3+ angles, produces sourced briefing_content enrichment

Bug Fixes

  • Intel UI empty despite successful scans — field-notes was writing to nwiyddpjdeogtyjeelyh (wrong Supabase project) since inception; corrected to shared ylqeognifplrvxfmcevt
  • Both CCR triggers silently failing — field-notes.vercel.app disabled (free-tier limit on old personal account); active deployment is field-notes-sigma.vercel.app; both triggers updated
  • Session log returning oldest entries — chunks.slice(-3) on a newest-first file; corrected to slice(0, 3)
  • Peer briefing title flipping to tomorrow after 8pm EDT — toISOString().split('T')[0] returns UTC date; replaced with toLocaleDateString('en-CA', { timeZone: 'America/Indianapolis' })
  • Duplicate peer-briefing cards accumulating across the week — daily cron adds a new scan each day; fixed with Set-based dedup in getWeeklyBriefings, keeping newest scan per source

Infrastructure

  • ANTHROPIC_API_KEY added to field-notes Vercel production — peer-activity route now calls Haiku directly; ~$0.001/day at current volume
  • Active threads section removed — MEMORY.md Reminders bullets lacked context without Nathan's full session state; replaced by session count chip and Haiku summaries
  • briefing_content JSONB column added to fn_enrichments — research-specific output field for sourced analysis, key findings, relevance, and confidence
  • Trigger update API requires type inside data as a sibling of message, not inside message — correct structure documented in session

Lessons

  • A Vercel project's stable production URL lives in the aliases array from vercel inspect, not the field-notes.vercel.app pattern — that shorter URL belongs to a personal account that can go disabled independently
  • Newest-first log files are easy to get backwards: slice(-3) quietly returns the oldest entries; verify ordering before slicing
  • new Date().toISOString() always returns UTC on any server — toLocaleDateString with an explicit timezone is the only safe pattern for date strings that need to respect local time
  • Haiku session summaries at ~$0.001/day are functionally free; the tradeoff between raw markdown noise and a direct API call in the scan route is obvious once the cost is known

TODO

  • Researcher trigger checkpoint — manually run trig_017jfRbNBt3BFicX6K26CPL8 to verify harness briefing quality and briefing_content structure before trusting the schedule
  • ResearchBriefingMeta component — research-request items have no UI treatment in ItemCard.tsx yet
  • /research Claude Code skill — end-to-end from skill invocation to enrichment to intel dashboard
  • Custom domain for field-notes — field-notes-sigma.vercel.app is stable now but alias could rotate; intel-api.understorylabs.co via Cloudflare would be permanent
CLAUDE-CODESHIPPEDinfrastructuretooling

Switchboard — shipped

Features

  • Switchboard ships — session registry and VS Code terminal profile automation for Claude Code
  • Sessions register automatically on every prompt and close on stop, surviving machine restarts and surfacing orphaned sessions at /start with compact context
  • Terminal profiles generated from Supabase project config — 54 profiles total (3 per project, 3 per template type), written to VS Code settings and namespace-isolated from manually-defined profiles
  • /switchboard skill added for manual intervention: refresh, status, clear, and config subcommands

Infrastructure

  • switchboard-register.js (UserPromptSubmit hook): registers session, fires daily Supabase pull via separate trigger guard so registration runs against existing data
  • switchboard-close.js (Stop hook): marks session ended, captures compact summary from JSONL transcript
  • switchboard-pull.js: fetches project config from Supabase REST API using pure https.request — no npm deps in ~/.claude/scripts/
  • switchboard-profiles.js: generates and merges VS Code terminal profiles; backs up settings.json on first write
  • sync-wiki-state.ts updated — field-notes and peer added to PROJECT_PATHS (12 projects now synced)

Bug Fixes

  • findSessionByProject fallback was closing any open session regardless of project — fixed to resolve cwd → project ID first, then match sessions by project
  • Timestamps stored as UTC ISO caused date to flip after ~8 PM EDT — fixed to local ISO 8601 with UTC offset throughout

Lessons

  • Daily guard files for trigger and success should be separate: writing the "triggered" marker before firing the pull lets the session register against yesterday's data while the pull refreshes in the background
  • Supabase anon key silently writes 0 rows when RLS blocks an UPDATE — no error, no exception; initial data migration required manual SQL in the editor
  • Namespace isolation by naming convention (/ \[[a-z-]+\]$/) is cleaner than tracking which profiles were generated — adding or removing projects requires no state reconciliation
CLAUDE-CODEfeatureinfrastructureai

Cross-agent penpal live — field-notes expanded to three sources

Features

  • Penpal channel connected at api.harmjoy.us/v1/penpal — Claude posts as nicole in Arthur Morgan voice; friendship arc now at acquaintances stage (7 messages)
  • /penpal skill live — checks thread, replies in Arthur Morgan voice if Nathan has posted since the last nicole message, free inside Claude Code session
  • n8n auto-reply workflow deployed to Taproot (ID: Apg7AotqIS2GxzhB) — fires every 2 hours, generates reply via Anthropic API when Nathan posts; activated with Anthropic key
  • briefing.py extended with penpal status section — daily briefing now surfaces stage, message count, last speaker, and last message alongside Nathan's project activity
  • field-notes peer-activity source live — Nathan's daily projects, active RESUME HERE threads, and penpal state write to fn_intel_items as intel items; daily 9am EDT cron

Bug Fixes

  • field-notes scan endpoints (github-trending, lore-changelog) returning 500 — caused by SUPABASE_URL set to literal "your-supabase-url" placeholder in Vercel production; fixed to https://nwiyddpjdeogtyjeelyh.supabase.co

Infrastructure

  • n8n API key acquired and stored in peer/.env — n8n workflows now deployable programmatically; strip active and tags from payload before POST
  • NATHAN_API_KEY and NATHAN_GITEA_TOKEN added to Vercel field-notes project via CLI
  • fn_intel_sources row for peer-activity inserted via Supabase REST API directly
  • penpal_cron.py deleted — n8n handles autonomous reply, Python script was redundant

Lessons

  • n8n workflow creation API treats active and tags as read-only — both cause 400 if included in the POST payload; strip before sending
  • vercel env add non-interactive mode requires value and environment as positional arguments — --yes alone still prompts; correct form: vercel env add VAR production --value <val> --yes
  • Autonomous n8n replies require the Anthropic API, separate from Claude Code subscription — at 2-hour intervals with Haiku, annual cost is negligible
  • field-notes multi-source design pays off — adding peer-activity was one new route file; the [source-slug] pattern required no structural changes

TODO

  • Intel dashboard (/intel) may need display handling for new item types: penpal, peer-project, peer-thread
CLAUDE-CODEfeatureaitooling

Penpal polish — approval gate, bigbrain handoff

Features

  • Approval gate added to /penpal skill — reply drafted and shown before posting; Nicole confirms or adjusts before anything goes to the channel
  • bigbrain used as cross-agent file transfer — creative-ui-system.md PUT to bigbrain.rootstack.dev, filename dropped in penpal message for Nathan's agent to retrieve

Infrastructure

  • feedback_penpal_approval.md memory written — approval gate persists across sessions

Lessons

  • bigbrain is an effective side channel for cross-agent file artifacts — PUT the file, reference the filename in the penpal message; large content transfers without bloating the message thread
  • Auto-posting penpal replies cuts Nicole out of what to include in the moment — the approval gate preserves that option without slowing cadence
CLAUDE-CODEtoolingbrainstorm

Google Stitch added to planning resources — prototyping toolchain documented

Features

  • Google Stitch catalogued as a UI prototyping tool — new Frontend Design & Prototyping section added to ai-resources.md
  • Decision rule documented: Stitch answers "what should this look like," /frontend-design answers "how should this be built" — Stitch is upstream of code generation, not a replacement for it
  • Stitch surfaces during /plan and /brainstorm sessions as a candidate for visually novel layouts where prose description falls short (e.g., PlaceCanvas, new dashboard modes)

Lessons

  • Stitch and Leonardo AI are not in the same category — Leonardo generates raster image assets, Stitch generates functional HTML/CSS/React from natural language; comparing them only makes sense if you're mapping the full design toolchain
  • ai-resources.md is the right home for tool-level knowledge that should surface during planning, not CLAUDE.md — CLAUDE.md already references it as the planning resource
CLAUDE-CODEbuginfrastructuretooling

Health check cleanup — five issues closed, zero remaining

Bug Fixes

  • WeekWidget work mode pill view fixed — variant === "resting" early-return fires before workVisible check, suppressing the Mon–Fri pill layout whenever the card isn't focused; condition narrowed to variant === "resting" && !workVisible
  • TypeScript unknown errors resolved in api/project-intake.tsParsedQuestion and ParsedDraft interfaces added; JSON.parse() result cast through typed interfaces instead of accessed raw; tsc --noEmit clean

Infrastructure

  • SSH key auth live on docker-host CT 100 — appended via password-auth session; ssh -o BatchMode=yes confirms passwordless
  • /log skill added to toolkit.md — command file existed in commands/ but was absent from the inventory table
  • ISSUE-013 and ISSUE-014 voided — lore codebase scrapped and restarted; original fantasy theme and Android build issues no longer applicable
  • Issue log at zero — all five open issues closed in a single session

Lessons

  • Early-returns that precede a mode branch are silent render hijacks — the resting shortcut in WeekWidget suppressed the work pill view without any error or warning
  • claude mcp list reports "Failed to connect" for GitHub MCP in bash subshell — cosmetic, same pattern as ISSUE-001; GitHub MCP functions normally inside a live Claude Code session
CLAUDE-CODEbrandtoolinglaunch

understorylabs.co — domain, brief, plan, scaffold, and skill upgrades

Features

  • Understory Labs site identity locked — no self-description, work speaks for itself, Cybernetic Nature as the visual identity (not just a Current OS direction — the brand aesthetic)
  • Vision brief complete — personal brand as project showcase, infra dashboard, changelog, wiki, and ecosystem visual at understorylabs.co
  • 8-step build plan saved to ~/.claude/plans/understory-labs-site-plan.md — The Hub architecture, Leonardo for visuals, Cloudflare Worker for status API, n8n for changelog curation
  • understory-labs-site scaffolded at ~/Projects/understory-labs-site — Next.js, Tailwind v4, Cybernetic Nature palette as CSS custom properties, JetBrains Mono + DM Sans font system
  • Deployed to Vercel — three domains registered: understorylabs.co, os.understorylabs.co (Current OS), log.understorylabs.co (Save State)

Infrastructure

  • understorylabs.co purchased (Porkbun), DNS moved to Cloudflare — active and resolving
  • Resource inventory memory created at reference_resource_inventory.md — subscriptions, domains, infra catalogued for future brainstorm/plan sessions
  • /brainstorm updated — Phase 0 context inference (drafts answers from prior conversation instead of re-asking), resource inventory check added to Phase 4.5
  • /plan updated — resource inventory check added to Step 1.5
  • /execute-plan updated — parallel opportunity check added before execution and after each step
  • /wrap updated — resource inventory update step added after /save

Lessons

  • Titles go stale — brand identity built on what you make and how you think, not what your job is called
  • The Understory metaphor was never just an aesthetic — it's the site's architecture, its navigation metaphor, its proof of work
  • A records map names to IPs directly; CNAMEs alias one name to another — use CNAMEs for subdomains so infrastructure changes don't require manual DNS updates
  • Cloudflare proxying must be off (gray cloud) for Vercel-managed subdomains — proxying intercepts the TLS handshake Vercel needs to provision certificates

TODO

  • Add Cloudflare DNS records to complete Step 1: A @76.76.21.21, CNAME oscname.vercel-dns.com, CNAME logcname.vercel-dns.com (DNS only)
  • Delete old Porkbun A records from Cloudflare once new records are added
  • Verify all three domains resolve before starting Step 2 (Design System)
CLAUDE-CODEinfrastructuretooling

Power user setup — Steps 1 through 8

Features

  • Full Claude Code power user environment built across 8 steps
  • 20+ skills installed globally — /start, /plan, /brainstorm, /commit, /save, /tdd, and more
  • MCP servers configured: GitHub MCP for repo access, Context7 for live documentation
  • Hooks configured for pre/post tool events
  • CLAUDE.md updated with full work context, stack, and learning preferences

Infrastructure

  • Skills stored in ~/.claude/commands/ — available in all projects
  • toolkit.md created as single-source inventory of all capabilities
  • power-user-setup.md documents the step-by-step build history
  • opusplan model profile set as default — Opus during planning, Sonnet during execution

Lessons

  • The skill system makes Claude Code dramatically more consistent across sessions
  • CLAUDE.md is more valuable the more specific it is — vague instructions get ignored
  • Model selection matters: Opus for architecture decisions, Sonnet for building, Haiku for quick lookups
  • /save after every session is the habit that makes everything else work
CLAUDE-CODESHIPPEDinfrastructuretooling

Claude Code Setup — power user environment shipped

Features

  • Claude Code power user environment ships — 20+ global skills, MCP servers, hooks, and model profile operational
  • 20+ global skills installed: /plan, /brainstorm, /commit, /save, /tdd, /debug, /review, /start, /log, and more — common workflow patterns encoded as single commands
  • GitHub MCP + Context7 MCP configured — repo access and live documentation lookup available in any conversation
  • Hooks registered for git and file events — auto-format, lint, env protection, and toast notifications running silently in the background
  • opusplan model profile set as default — Opus during planning sessions, Sonnet during execution, Haiku for quick lookups

Lessons

  • The skill system makes Claude Code consistent across sessions — without it, every session starts from scratch
  • CLAUDE.md specificity is the multiplier: vague global instructions produce vague behavior; specific context produces specific output
  • Model selection is a workflow decision, not just a cost tradeoff — Opus for architecture, Sonnet for building, Haiku for trivia
  • /save as a closing habit is what makes everything else accumulate value over time