AI Workspace Template
Set up your project workspace
A reusable, agent-aware development workspace — one shared context for Claude Code, Codex, OpenCode, and Gemini. This guide takes you from a fresh clone to a working project, whether you're a human or an AI agent.
Claude Code Codex OpenCode Gemini graphify MCP (core) gh CLI (required) MCP fragments: YouTube (opt-in)
What you get
The template is a coordination layer — not product code. It gives every agent and human a single
known place to find context, conventions, and active work. Everything project-specific is a
<…> placeholder or a stub with a header comment, so you fill in, you don't reverse-engineer.
Path in <workspace>/ | What it is |
|---|---|
CONTEXT.md | Master context, the front door (read first) |
CLAUDE.md · AGENTS.md · GEMINI.md | Symlinks to CONTEXT.md |
README.md · SPEC.md | Human pitch · product intent |
docs/ | Workspace docs (structure, setup, registries) |
docs/repo-context/ | Per-repo navigation + design docs |
skills/ | Reusable agent workflows (starts empty) |
work/ | Active project state — survives compaction |
prompt-library/ | Prompt contracts for repeatable outputs |
repos/ | Cloned product repos (gitignored) |
references/ | Cloned third-party repos (gitignored) |
scripts/ | Setup + validation scripts |
.env.example · .mcp.json.example | Copy → local, gitignored |
.claude/ · .gemini/ · .opencode/ · opencode.json | Per-runtime config |
The mental model
One file is the front door. The three agent entrypoints are symlinks to it, so every runtime reads the exact same context — edit once, all agents see it.
AGENTS.md), and Gemini all resolve to one file.Quick start
Five steps from clone to a working workspace. Steps 1–3 are mechanical; step 4 is where you make it your project.
Create your workspace from the template
On GitHub, click “Use this template”, or clone and reset git history:
git clone https://github.com/<you>/ai-workspace-template.git <project>-workspace cd <project>-workspace rm -rf .git && git initBootstrap the local files
Run the setup script — it runs a dependency preflight, then creates
.env, the agent symlinks,repos/README.md, and the per-user config copies (idempotent). Add--clone-reposfor a multi-repo workspace. Missing tools? Follow runbooks/dependencies.md../scripts/setup.sh # creates .env, symlinks, repos/README.md ./scripts/check-workspace-structure.sh # verify symlinks resolve, dirs presentWire up agents & MCP
Copy the per-user config templates (all gitignored), then authenticate. Run the check, then follow runbooks/authentication.md for anything missing; per-runtime MCP detail is in
docs/mcp-setup.md. The YouTube transcript MCP server is workspace-local and credential-free; installyt-dlpif you use it.cp -n .env.example .env cp -n .mcp.json.example .mcp.json cp -n .claude/settings.json.example .claude/settings.local.json ./scripts/check-service-access.sh # reports gaps + fix commands gh auth login # if not already authenticatedMake it your project
Replace every
<…>placeholder and resolve theTODO/ “Fill in” comments — start withCONTEXT.md(it loads into every agent session). Find what's left:grep -rIn --exclude-dir=.git -e '<[a-z-]\+>' -e 'TODO' -e 'Fill in:' .- CONTEXT.md — name, purpose, single- vs multi-repo model
- docs/repos-registry.md — one entry per product repo
- docs/service-access.md — your GitHub username; add a section per service
- SPEC.md — product intent (or delete for a pure coordination layer)
- work/ — prune the maintainer's shipped work history
(
git rm -r work/*/); it's a worked example, not machinery — see template-usage.md §5
Start building
Decide on the optional bits: graphify is the core MCP server (wired by default; it also adds
.gemini/settings.json/.opencode/plugins/graphify.js). YouTube transcript MCP is an opt-in fragment undermcp-fragments/, loaded per session — seedocs/mcp-setup.md; GitHub goes through the requiredghCLI (no MCP server). Delete what you don't use.Add reusable workflows under
skills/and list them inCONTEXT.md. The template ships four:checkpoint(session wrap-up),onboard-repo(bring a repo in),rlm(query huge contexts), anddecision-log— capture the why behind a decision (/decision) as an ephemeral note inwork/<proj>/decisions.md, promoted to a committed ADR underdocs/adr/for lasting-weight calls. See the Decision Records section ofCONTEXT.md.Checks:
scripts/run-checks.shruns every workspace check; on GitHub,.github/workflows/checks.ymlruns it on each push (delete the file to opt out), andgit config core.hooksPath scripts/git-hooksopts you in to a pre-commit run of the fast set.
Deeper reference:
- docs/template-usage.md — adapting the template to a project
- docs/workspace-setup.md — recreating the workspace on a new machine
- docs/workspace-structure.md — what every directory is for
Global vs. workspace-local setup
Setup splits into two layers. Do the GLOBAL layer once per machine; the
LOCAL layer once per clone. The local layer depends on the global one (the MCP
token and the gh login).
GLOBAL once per machine
- agent CLIs on PATH —
claude·codex·opencode·gemini - gh CLI login (required) — all GitHub operations ·
gh auth status ~/.codex/config.toml— Codex MCP registration (optional)~/.gemini/settings.json— Gemini MCP registration (optional)- OS keychain
LOCAL once per clone · fed by the global layer
.env.example→.env— non-secret identifiers only.mcp.json.example→.mcp.json— Claude Code project MCP.claude/settings.json.example→.claude/settings.local.json(permissions)./scripts/setup.sh— symlinks ·repos/README.md· clonescheck-service-access.sh→.service-access.local.json(generated)CONTEXT.md+ symlinks — tracked, ready
What's tracked vs. gitignored
Nothing secret ever enters git. Credentials stay in the keychain; the repo holds only templates and
non-secret identifiers. Full table in docs/workspace-structure.md → “Gitignored vs. Checked In”.
| Path | In git? | Why |
|---|---|---|
CONTEXT.md + CLAUDE/AGENTS/GEMINI symlinks | Yes | Agent entrypoints |
docs/ skills/ work/ prompt-library/ scripts/ | Yes | Shared docs, skills, state, tooling |
opencode.json .opencode/ .gemini/settings.json .claude/settings.json | Yes | Shared per-runtime config + hook wiring |
*.example (env, mcp, claude settings) | Yes | Templates to copy locally |
repos/README.md references/README.md | Yes | Registries (repos/README is a symlink) |
.env .mcp.json .claude/settings.local.json | No | User-specific / may hold paths |
repos/* references/* (except READMEs) | No | Separate cloned repos |
.service-access.local.json | No | Machine credential cache |
graphify-out/ temp/ tmp/ .DS_Store | No | Locally regenerated / scratch |
Recommended toolchain
Optional external tools this workflow assumes. They're global / per-user — installed once per machine, never committed to the repo — except for two that also need a per-repo step. Full setup in docs/recommended-tooling.md.
GLOBAL once per machine
- Status line —
ccstatusline·~/.config+~/.claude/settings.json - superpowers + plugins —
claude plugin install …@claude-plugins-official - Matt Pocock skills —
tdd·diagnosing-bugs·triage·to-tickets· … (agent-context) - Karpathy principles — 4 principles already in
CONTEXT.md·karpathy-examples - graphify CLI —
uv tool install "graphifyy[mcp]"·yt-dlpfor YouTube MCP
PER-REPO step for two of the global tools
- Matt Pocock config — run
setup-matt-pocock-skills→## Agent skillsblock +docs/agents/*.md - graphify graph —
/graphify(buildgraphify-out/) ·graphify update .(refresh)
Quick reference:
# status line
npm install -g ccstatusline # install once; wire statusLine in ~/.claude/settings.json
# plugins (official marketplace is built in)
claude plugin install superpowers@claude-plugins-official
# graphify
uv tool install "graphifyy[mcp]"
/graphify # build the graph for THIS repo → graphify-out/
graphify update . # refresh after code changes
# YouTube transcript MCP
yt-dlp --version # install via brew / apt / winget if missing
scripts/mcp/youtube-transcript.sh # workspace-local stdio server
# skill repos — managed via agent-context (clone, then link with agent-context-sync)
git clone https://github.com/mattpocock/skills.git ~/Developer/references/mattpocock-skills
git clone https://github.com/ForrestChang/andrej-karpathy-skills.git ~/Developer/references/karpathy-claude-md
agent-context-sync # links new skills into ~/.config/agent-context/skills
# Matt Pocock per-repo config (before to-tickets / triage / to-spec)
# run the setup-matt-pocock-skills skill in the repo
For AI agents
If you are an AI agent setting this up
- Read
CONTEXT.mdfirst — it's the front door and loads the project's conventions and the “Agent Coding Principles” / “Agent Context Discipline” rules. - Treat
docs/workspace-structure.mdas the spec. Its “Agent Bootstrap Instructions” section is a step-by-step procedure for scaffolding or extending a workspace — files to create, stub-header format, and post-scaffold verification checks. - Confirm preconditions before creating files — workspace name, repo list, editors/runtimes, and external services. Don't invent repo names or clone URLs.
- Persist intermediate state to
work/<project>/so it survives context compaction — not to conversation memory. - Disk is the source of truth. Re-read files before asserting facts; verify symlinks resolve and scripts are executable after scaffolding.
Verify before you call it done
gh auth status # global: GitHub auth
claude mcp list # local: core MCP (graphify) visible
scripts/mcp/youtube-transcript.sh # local: starts YouTube MCP (opt-in fragment)
./scripts/check-workspace-structure.sh # local: symlinks + dirs OK