From 301ed4c9729066ed13b348e419ff09ec16a252aa Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Thu, 2 Jul 2026 12:49:46 -0700 Subject: [PATCH] chore(skills): add create-workspace skill for topic jj workspaces --- .claude/skills/create-workspace/SKILL.md | 64 ++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .claude/skills/create-workspace/SKILL.md diff --git a/.claude/skills/create-workspace/SKILL.md b/.claude/skills/create-workspace/SKILL.md new file mode 100644 index 0000000000..de60b8a4da --- /dev/null +++ b/.claude/skills/create-workspace/SKILL.md @@ -0,0 +1,64 @@ +--- +name: create-workspace +description: Create a new shared topic workspace with fresh jj workspaces for agent-os and secure-exec under ~/workspaces/{topic}/, each on a new change off latest main. Trigger ANY time the user says "create a new workspace" (or asks for a new worktree/workspace for a topic). +--- + +# Create a topic workspace (agent-os + secure-exec) + +Creates `~/workspaces//` with sibling jj workspaces `agentos/` and +`secure-exec/`, each with a fresh working copy on top of the freshly fetched +`main@origin`. + +Derive `` as a short kebab-case slug from the user's ask (e.g. +"create a new workspace for the poll rework" → `poll-rework`). If the user +did not imply a topic, ask for one. + +## Steps + +```bash +topic= +mkdir -p ~/workspaces/$topic + +# agent-os +cd ~/agent-os +jj git fetch +jj workspace add --name $topic ~/workspaces/$topic/agentos +cd ~/workspaces/$topic/agentos +jj new 'main@origin' -m "wip: $topic" + +# secure-exec +cd ~/secure-exec +jj git fetch +jj workspace add --name $topic ~/workspaces/$topic/secure-exec +cd ~/workspaces/$topic/secure-exec +jj new 'main@origin' -m "wip: $topic" +``` + +If `jj workspace add` fails because the name is taken, suffix it +(`$topic-2`) — the directory path stays as requested. + +## STRICT: these workspaces ARE the session's working directories + +From the moment this skill runs, ALL work for the rest of the session happens +inside `~/workspaces//agentos` and `~/workspaces//secure-exec`. + +- NEVER edit, build, or run jj/git state-changing commands in the main + checkouts (`~/agent-os`, `~/secure-exec`) or in any other workspace for the + remainder of the session. They belong to other sessions; their working + copies are live shared state. +- The ONLY allowed operations against the main checkouts are read-only git + plumbing that does not touch a working copy (e.g. `git -C ~/agent-os + fetch`, `gh` calls, creating a temporary `git worktree` for assembling a + PR branch). +- If a command needs a repo path, spell out the workspace path explicitly — + do not rely on a remembered cwd. + +## Notes + +- The two workspaces are siblings, so agent-os local dep mode works + unchanged: run `just secure-exec-local` inside the new `agentos/` workspace + to point deps at `../secure-exec`. +- `dist/`, `vendor/`, `node_modules/`, registry artifacts are gitignored and + NOT present in a fresh workspace — run `pnpm install` (both repos) and the + builds the task needs (see the repo CLAUDE.md "Testing a local build" + sections) before relying on them.