// ai client LIVE

Claude Code

Primary client, deepest integration

Claude is the assistant I use most, so it has the deepest wiring into Fulltrace. Every session starts already knowing my context, and auto-sync hooks keep that context current in both directions with no manual steps. Configuration composes across three layers: a behavioural contract, memory, and shared commands. Permissions run broad by default and save their attention for a handful of fail-closed carve-outs, and routine chores are routed through MCP tools at lightweight-model rates so costs stay down.

03 config layers 16 shared commands 02 auto-sync hooks 21 permission carve-outs
configuration_model [01]

Three Layers

Claude Code's configuration composes across three files in clients/claude/: how to act, what to know, and what to do. Keeping them separate makes each easier to maintain and look after independently.

How to act
CLAUDE.md

A written contract for how the assistant communicates: output style, language rules (no em dashes, no AI openers), assumed knowledge level, and formatting standards. Loaded unconditionally every session, synced to ~/.claude/CLAUDE.md.

What to know
memory/

A memory of who I am, what I am working on, and what is already settled, carried into every session. Shared memory (global.md, conventions.md, projects/*.md) loads every time; per-project auto-memory under ~/.claude/projects/[slug]/memory/ is written by the assistant as it learns.

What to do
commands/

Shared shortcuts for repeatable jobs, available in any project via the /jn-* prefix: compiling and deploying extensions, updating changelogs and docs, syncing memory and config, so routine work runs the same way every time.

session_context [02]

How Claude Code Loads Context

Claude Code assembles context from several sources at session start. The global layer always loads; the project layer loads only when Claude runs inside a project directory.

Global, every session

Three files load unconditionally: the behavioural contract at ~/.claude/CLAUDE.md, the memory index at ~/.claude/memory/MEMORY.md (which pulls in individual memory files from the index on demand), and the global slash commands under ~/.claude/commands/*.md.

Project, per directory

A project-level [project]/.claude/CLAUDE.md merges on top of global and sets project identity. Project memory lives under a sanitised path, ~/.claude/projects/[sanitised]/memory/, replacing : with - and /\ with -: D:\Development\AI becomes d--Development-AI. The same project on a different drive gets a different slug, which is why slug aliases collapse them onto one canonical directory.

sync [03]

sync.ps1 and Auto-Sync Hooks

The repo is the canonical source. sync.ps1 deploys to the runtime and cleans stale files. Two hooks in settings.json automate routine sync so manual intervention is rarely needed.

01
sync.ps1 push-runtime

Deploys CLAUDE.md, memory files (sourced from clients/shared/memory/), shared commands (sourced from clients/shared/skills/), and settings.json to ~/.claude/. Cleans stale files from prior runs. Safe to run repeatedly. This is the only command that writes to the runtime.

02
Project auto-memory, both ways

The exception to one-way sync, because the assistant writes memory as it learns and the repo cannot be the only author. A three-way SHA256 reconciliation against a recorded base hash decides direction per file: unchanged sides are left alone, one-sided changes propagate, and a genuine both-sides conflict keeps the live copy and archives the displaced one rather than picking silently. Git mtimes are never trusted. Slug aliases collapse the same project on different drives or machines onto one canonical memory directory.

03
Stop Hook (auto-sync on session end)

Registered in settings.json. Runs sync.ps1 push-runtime every time Claude Code exits. Any in-session config changes (memory writes, command edits) are captured back into source control automatically. No manual sync needed during normal use.

04
PostToolUse Write Hook (real-time memory push)

Fires immediately when Claude writes any file inside ~/.claude/memory/ or ~/.claude/commands/. Runs push-runtime in-session, not waiting for the Stop hook. Memory writes are pushed to the repo in real time.

Command What it does
push-runtime Deploys canonical config to ~/.claude/, expanding every {{TOKEN}} placeholder (machine paths, the lightweight model id, the MCP bearer) at deploy time, so the same repo deploys to any machine or drive. Cleans stale files first. One-way for config; project auto-memory is the one bidirectional lane.
pull-extracted Stages files from ~/.claude/memory/_extracted/ into memory/_extracted/ for review. Does not auto-commit.
clean-runtime Removes all managed files from ~/.claude/, then re-runs push-runtime. Handles orphan cleanup on restructures.
cost_optimisation [04]

Cheap Work at Cheap Rates

Mechanical steps should not be billed like reasoning. A skill does the thinking once, then hands the mechanical parts to tools and records them against the model that deserves them, so the cost of a deploy reflects the one decision in it rather than the four commands.

Portfolio reads go direct

jn-read-context reads a portfolio:// resource straight off the MCP server in the main session. No sub-agent, no orchestration: the server already holds the file, so the cheapest possible read is the one that does not spawn anything.

Mechanical steps become tools

jn-ext-deploy calls the MCP server's own agentOS_ext_compile, package and install tools rather than shelling out. The orchestrator is logged as Sonnet; each mechanical sub-step is logged as {{LIGHTWEIGHT_MODEL}}, expanded per client at deploy time so the analytics attribute compile and package at Haiku rates.

Sub-agents where isolation is the point

The default remains a real sub-agent launch: separate context, its own tool constraints, nothing leaking back but the result. That is the right shape for anything whose whole value is not carrying the calling session's baggage.

And where it is not

An agent can now declare interactive: true and run as an inlined persona in the main conversation instead. The reason is structural rather than stylistic: a sub-agent has no channel back to me mid-run, so it can never ask a question and wait for the answer. That makes an interview impossible to run as one. The portfolio interviewer is the first consumer.

The --auto flag lets orchestration commands skip confirmation gates when chained. jn-website-commit passes --auto to changelog, docs, git, and publish steps so the entire post-build workflow runs uninterrupted after one changelog approval.
friction_reduction [05]

Broad Allow, Narrow Carve-Outs

The permission model inverted as trust grew. Prompting on every routine command trains you to click approve without reading, which makes the prompt worse than useless: it manufactures consent. So settings.json runs acceptEdits by default with a broad allow list, and spends its attention on the few things that genuinely must stop. What matters is not the size of the allow list, it is which carve-outs are fail-closed.

Allow: 44 entries

Routine tooling runs unprompted, ending in the broad patterns (Bash(*), PowerShell(*), Edit(*), Write(*)). The narrower entries above them are not security, they are documentation of the common paths.

Ask: 8 entries

Two things always stop and ask. Granting or revoking Fulltrace apply authority (approval-cli grant and revoke), because that is the gate on every write to my code. And force-pushing, because it rewrites history that other machines depend on.

Deny: 13 entries

Never, regardless of context: drive-root and home-directory wipes, and reads of secret files. A deny is not a prompt. It is the answer already given.

The carve-out was rebuilt after a self-audit found it dead. Testing whether a grant would prompt, it executed silently: the control was enforced by none of its three supposed layers, and under bypass mode an ask rule is swallowed entirely. A permission gate that fails open is worse than none, because it is the one you stopped checking. It now returns an explicit allow, ask or deny decision per command, so a compound command cannot slip through on the analyser's uncertainty.
file_mapping [06]

Canonical to Runtime

clients/claude/ in the repo is canonical. sync.ps1 deploys every file below to its runtime location under ~/.claude/.

path_mapevery repo path, where it deploys, what it is
Repo path Deployed to Purpose
clients/claude/CLAUDE.md ~/.claude/CLAUDE.md Behavioral contract
clients/shared/memory/global.md ~/.claude/memory/global.md Identity and stack
clients/shared/memory/conventions.md ~/.claude/memory/conventions.md Technical conventions (Salesforce, git, code standards)
clients/shared/memory/projects/*.md ~/.claude/memory/projects/*.md Per-project context files
clients/shared/skills/*.md ~/.claude/commands/*.md 16 shared global slash commands
clients/claude/settings.json ~/.claude/settings.json Hooks and permission allowlists
shared_commands [07]

16 Commands via /jn-*

All sourced from clients/shared/skills/ and deployed to all three clients. Available in Claude Code as slash commands. Each is logged to the MCP server on invocation via the PreToolUse hook.

/jn-ext-compile

Compile VSCode extension TypeScript source

/jn-ext-package

Package extension to .vsix, auto-bumps version in package.json

/jn-ext-install

Install latest .vsix into VSCode, via the MCP server's install tool

/jn-ext-reload

Reload the extension host so the new build is live

/jn-ext-deploy

Orchestrates compile → package → install → reload, each step billed at lightweight rates

/jn-changelog-docs-commit

Changelog, then docs, then commit, as one gated sub-orchestrator

/jn-git-commit

Staged commit with confirmation gate (skipped with --auto)

/jn-git-push

Push to remote with confirmation gate (skipped with --auto)

/jn-read-context

Read portfolio resources from the MCP server

/jn-sync-claude

Run sync.ps1 push-runtime to deploy canonical config

/jn-sync-cursor

Run Cursor client sync.ps1 push-runtime

/jn-update-changelog

Draft and prepend a dated changelog entry with confirmation

/jn-update-docs

Identify and update affected .md files from git diff

/jn-website-content

Draft and write showcase site copy for current project

/jn-website-commit

Full post-build orchestrator: changelog → docs → site copy → commit → push

/jn-update-claude-stats-cache

Refresh cached analytics data for the dashboard