/workspace:update-domain [name-or-number] [PR link or focus hint]from Multi-Repo Workspace Manager
Mines lessons from a project session and writes them into the domain's context files, supplemental CLAUDE.md, and reference docs so future workspaces start smarter.
Ships in Multi-Repo Workspace Manager. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Close the knowledge loop: a project session often surfaces durable facts about the domain it was built from (a repo's behavior, a proven command, a cross-repo gotcha). This command mines those lessons and writes them into the domain's own files, so future workspaces built from it start smarter.
The first token in $ARGUMENTS is an optional project name or numeric
shorthand. Everything after it is an optional PR/diff link or focus hint
for lesson mining.
location: "bundled" lives under ${CLAUDE_PLUGIN_ROOT}/domains/ — the
plugin's own shipped, read-only checkout. This is true even if you
happen to be developing this very plugin and that directory is a
writable git checkout you could technically edit: it is not this
workspace's copy, and editing it silently changes the plugin for every
other workspace instead of this one. Always run
domain-info.py --copy-on-write (Step 5) first and use only the dir
path it returns for Edit/Write calls.domain.yaml (domain identity), the domain's own
dev-env.yaml (repo list), the workspace root dev-env.yaml,
settings.local.json.tpl, projects/ files (that's
/workspace:update-project's territory), memory files. Never delete a
domain file.context/<repo>.md over an already-cloned repo's DOMAIN-CONTEXT.md.
Never overwrite a repo's own CLAUDE.md from supplemental/<repo>.md;
it can have diverged. Tell the user instead.Run python3 "${CLAUDE_PLUGIN_ROOT}/scripts/resume-project.py" <first-token>
(no token: use the project loaded in this conversation, if any). If
status is not ok, do what error_message says.
Then run python3 "${CLAUDE_PLUGIN_ROOT}/scripts/domain-info.py" <project-name>.
If status is not ok, tell the user the error and stop. Note
domain.writable, domain.dir, domain.files, domain.repos, and
domain.source.type.
Read domain.files from Step 1 first — never propose a lesson that's
already documented there.
Mine from: the current session's conversation, the project's CLAUDE.md and
Reference Files detail docs, and an optional PR/diff link or focus hint
passed after the project token in $ARGUMENTS.
Categories to look for:
Filter aggressively: only durable, domain-level knowledge. Not project status, not one-off debugging detail, not anything already in the target file. If nothing qualifies, say so and stop — do not manufacture a lesson to justify writing something.
For each lesson, pick exactly one target:
| Lesson shape | Target |
|---|---|
| Repo-specific orientation | context/<repo>.md — create from ${CLAUDE_PLUGIN_ROOT}/skills/create-domain/context-template.md's shape if missing. The repo must appear in domain.repos. |
| Repo working-doc material | supplemental/<repo>.md — only if it already exists; never create a new supplemental file. |
| Domain-wide fact | context.md — keep the whole file ~20–40 lines. |
| Long-form reference | docs/<topic>.md — new or existing. |
Follow context-template.md's line discipline (30–75 lines per-repo file).
If a per-repo file would overflow, move the long-form part to docs/ and
leave a one-line pointer instead.
Show a table, one row per lesson:
| # | Lesson | Target file | New/Edit |
|---|--------|-------------|----------|
Followed by the actual diff (or full content, for new files) for each
target file — computed against the current files at domain.dir (Step 5 is a plain
copy, so the content is the same after it).
Ask via AskUserQuestion: apply all / apply a subset / cancel.
No file is written before this is answered.
If domain.writable was false in Step 1:
Explain briefly: this domain is bundled with the plugin, so the workspace
gets its own copy at domains/<name>/ before editing (shadows the
bundled one automatically; source: bundled stays untouched in
dev-env.yaml, so refresh-domain remains safe). Confirm, then run:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/domain-info.py" --copy-on-write <project-name>
If status is not ok, show error_message and stop: edit nothing.
Use the domain.dir from this response for every Edit/Write in Step
7 — not the original bundled path.
Edit or write each approved lesson in domain.dir. Then record and
redistribute in one call, with one --entry per changed file:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/domain-info.py" --record <project-name> \
--entry 'context/<repo>.md: <what changed and why>' [--entry ...]
Single-quote each --entry, writing an embedded ' as '\''; double
quotes would expand any $(...) or backticks in the lesson text. If
status is not ok, show error_message and stop; do not re-run, since
UPDATES.md may already have an entry.
It appends an entry to the domain's UPDATES.md and copies each edited
context/<repo>.md over repos/<repo>/DOMAIN-CONTEXT.md when that file
exists. It never touches a repo's own CLAUDE.md.
If domain.source.type == "git", ask via AskUserQuestion whether to open
a PR against the source repo. If yes:
domain.source.url to a temp dir.domain.source.subdir when set)
— exclude UPDATES.md by default, it's workspace-local bookkeeping.update-domain/<name>-<YYYY-MM-DD>, commit, confirm before
pushing, then create the PR (or print manual push/PR instructions if
gh isn't available or the user declines the push).Summarize: files changed, whether redistribution ran, the UPDATES.md
entry, and the PR link if one was opened.
If domain.source.type == "git", add a reminder: refresh-domain
re-fetches from the source and discards local domain edits (it warns when
UPDATES.md is present, but the safest path is merging the PR first).
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub openshift-eng/edge-tooling --plugin workspace9 skills in this plugin
/close-projectClose a project workspace, mark it done, and clean up its worktrees/consolidate-projectConsolidate a bloated project CLAUDE.md by archiving completed checklist items/create-domainBuild a custom multi-repo workspace from arbitrary repos — gather repos, clone, and generate per-repo context collaboratively/handoffSave session progress to the project docs and arm a handoff for the next /clear