Help us improve
Share bugs, ideas, or general feedback.
From runesmith-workspace
Migrate or initialize the workspace folder structure to the canonical layout defined in lib/folder-conventions.md. Auto-detects existing git repos and migrates them into the CC head; normalizes folder/repo names to kebab-case-lowercase. Writes STRUCTURE.md and refreshes a marker-bounded section in workspace CLAUDE.md so future sessions stay coherent. Use when the user says "reallocate", "fix the structure", "set up the workspace", "migrate to new layout", "tidy the workspace", "bootstrap this project's folders", or starts work in a workspace that hasn't been organized.
npx claudepluginhub runemarklabs/runesmith --plugin runesmith-workspaceHow this skill is triggered — by the user, by Claude, or both
Slash command
/runesmith-workspace:reallocateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Move the workspace to the canonical structure. Detect current state, propose a migration with naming normalization, snapshot before any change, execute on consent. Pin the conventions into `CLAUDE.md` so they survive across sessions. Idempotent.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Designs test strategies and plans with testing pyramid. Covers APIs, frontend, data pipelines, infrastructure; outputs plans including coverage targets, examples, and gaps.
Share bugs, ideas, or general feedback.
Move the workspace to the canonical structure. Detect current state, propose a migration with naming normalization, snapshot before any change, execute on consent. Pin the conventions into CLAUDE.md so they survive across sessions. Idempotent.
lib/folder-conventions.md - single source of truth for canonical layout, root keep-list, destination map, lifecycle rules. Reallocate is the writer; this file is the spec.lib/claude-md-section.md - marker-bounded folder-conventions section template written into workspace CLAUDE.mdlib/claude-md-agent-ops-section.md - marker-bounded agent-ops section template written into workspace CLAUDE.mdlib/agent-operating-principles.md - full rationale for the agent-ops sectionlib/project-instructions.md - two-tier project context model (CLAUDE.md vs Cowork UI Project Instructions field). Reallocate emits proposed Project Instructions text for the user to paste.lib/STRUCTURE.template.md - template for the STRUCTURE.md written at workspace rootlib/cc-workspace.md - CC head structure speclib/plan-format.md - plans/active/<slug>/ schemalib/comms-check.md - runs before mutationlib/naming.md - kebab-case-lowercase normalization ruleEvery question to the user in this skill MUST be a structured prompt (the host client's multi-choice / form UI, e.g. AskUserQuestion in Cowork). Never ask freeform yes/no in plain chat text.
When you need a value the user must type (a name, a path), use a single-question form with a default already populated. Show the normalized form alongside the raw input.
See lib/comms-check.md. Pause for to: user items.
Resolve workspace root (cwd or BOOTSTRAP_WORKSPACE env). Show in the upcoming migration plan, no separate confirmation prompt needed.
Use for:
Do not use for:
{PROJECT}.cc/ beyond the head's own scaffold (CLAUDE.md, marker, comms, .claude/). Reallocate has a HARD BOUNDARY at the {PROJECT}.cc/<repo>/ level - it never enters source repos. Repo internals are CC's territory; use /runesmith-cc:code-tech-debt (deployed by bootstrap-cc) for repo-level cleanup.runesmith-workspace:inbox - reallocate routes only ambiguous loose-root files; inbox handles all _INBOX/ content)Scan workspace root for known entries. Bucket each against the keep-list in lib/folder-conventions.md:
.git/. These auto-migrate into the CC head without asking. Their folder name (normalized per lib/naming.md) is the primary candidate for the CC head name.claude-code/ (legacy name) or <name>.cc/ (canonical) at workspace root._INBOX/ for inbox-skill classification, or specify another canonical home directly).plans/, notes/, drafts/, research/, source-docs/, tickets/ (legacy root dir), archive/. Touch only if explicitly part of a migration (e.g. legacy tickets/ at root → into plans).Per lib/naming.md:
<normalized-repo-name>.cc/. No prompt.Always show the resulting CC head name in the migration plan before executing.
Per detected item (no per-item prompts unless the row is ambiguous):
| Source | Target |
|---|---|
claude-code/ (legacy CC head) | {PROJECT}.cc/ (rename + normalize via CC migration sub-step) |
<git-repo-dir>/ at root | {PROJECT}.cc/<git-repo-dir>/ (auto-migrate) |
Legacy tickets/ at root | Surface as ambiguous: each JSON file needs a plan slug. Route via inbox protocol with prompt "which plan does this ticket belong to?" If user can't say, route to archive/superseded/<YYYY-MM>/tickets-orphan/. |
| Loose files at root not on keep-list | _INBOX/ for inbox classification |
| Unknown dirs at root | structured prompt: leave / move to _INBOX/ / move to specific path |
Existing _INBOX/, plans/, notes/, drafts/, research/, source-docs/, archive/ contents | leave in place |
Show the full plan as a table. One row per move. Highlight the {PROJECT}.cc/ migration as a clear summary line above the table.
Never auto-park content in _INBOX/ if it has a clear canonical home. _INBOX is for user drops and for ambiguous root content that needs the inbox skill's deeper classification. If reallocate can route directly per lib/folder-conventions.md, it does so.
Before any move, copy everything that will move to:
archive/_pre-migration/<ISO timestamp>/
CC head migration uses a separate snapshot at archive/_pre-cc-bootstrap/<ISO>/.
Surface a single structured confirmation prompt using the host client's structured-input tool (in Cowork: AskUserQuestion). Do NOT ask in chat with a freeform "should I proceed?" - that's a protocol violation against the user-input rules in this skill's frontmatter.
The prompt MUST be a single-pick form with the migration plan summary visible above it. Options:
If you find yourself typing "want me to proceed?" or "ready to execute?" in chat, STOP. Load the structured-input tool first (via ToolSearch if not already loaded), then use it. This rule applies to every consent gate in this skill - migration consent, per-item ambiguous routing, conflict resolution, Project Instructions merge mode.
If claude-code/ exists at workspace root OR git repos need to be moved in:
a. Determine final CC head name per step 2 (already resolved at plan stage).
b. If claude-code/ exists: rename claude-code/ → {PROJECT}.cc/.
c. For each detected git repo not already inside claude-code/: move it into {PROJECT}.cc/<normalized-repo-dir>/.
d. Normalize per lib/cc-workspace.md:
CLAUDE.md, README.md, .claude-code-workspace, .claude/{settings.json, skills/, commands/, agents/, hooks/}, comms/{open,archive}/, .gitignore, .gitattributes exist. Generate from templates if missing. Do not clobber existing files.
e. If applied atlassian section markers detected in old CLAUDE.md, set atlassianEnabled: true in marker JSON, copy preserved values, suggest user re-run /runesmith-sprint:enable to refresh.Move every item per the plan. Create destination dirs as needed. Preserve mtimes.
Ensure these exist per lib/folder-conventions.md (empty with .gitkeep is fine):
_INBOX/plans/active/, plans/archive/notes/drafts/features/, drafts/project-docs/, drafts/bugs/research/source-docs/archive/superseded/, archive/tickets-pushed/Do not create a root-level tickets/ - tickets live under their plan now.
Read lib/STRUCTURE.template.md. Write it to workspace root as STRUCTURE.md. No substitutions - paths in the template are conventional and don't require workspace-specific values.
Two marker-bounded sections to manage in workspace root CLAUDE.md, in this order:
<!-- folder-conventions:start --> ... <!-- folder-conventions:end --> - per lib/claude-md-section.md<!-- agent-ops:start --> ... <!-- agent-ops:end --> - per lib/claude-md-agent-ops-section.mdFor each section:
CLAUDE.md.CLAUDE.md, preceded by a blank line.CLAUDE.md doesn't exist → create with a minimal preamble plus both blocks (folder-conventions first, then agent-ops).Never touch content outside any marker pair. Workspaces commonly have project-specific rules alongside the skill-managed sections.
.gitignoreEnsure these patterns are gitignored:
_INBOX/* (drop zone, ephemeral)archive/_pre-migration/*archive/_pre-cc-bootstrap/*archive/_pre-atlassian-enable/*{PROJECT}.cc/comms/open/* (CC's open comms; archive is committed).credentialsPer lib/project-instructions.md: Cowork has TWO project-context surfaces. CLAUDE.md is the on-disk structural context (folder layout, file paths, conventions that change as the project grows). Project Instructions is a separate Cowork UI field carrying behavioral context (project mission, Cowork's role, permanent rules) - invisible to the agent, edited only via Cowork's app UI.
The hard rule: Project Instructions is behavioral; CLAUDE.md is structural. They must NOT bleed into each other.
Reallocate cannot edit the UI field directly. It MUST surface proposed text for the user to paste.
For every reallocate run:
lib/naming.md).lib/project-instructions.md, substituting {PROJECT_NAME} only.Do NOT emit Atlassian content. Reallocate produces the BASE Project Instructions only. Atlassian-specific rules are appended separately by runesmith-sprint:enable (marker-bounded so they can be added/removed independently). If you detect .atlassian-enabled at workspace root, surface a note in the report: "Atlassian is enabled for this project - your existing Project Instructions likely has an <!-- runesmith:atlassian-start/end --> block from /runesmith-sprint:enable. Preserve that block when pasting; the base template below replaces only the non-Atlassian portion."
Likewise: do not emit content for any other opt-in feature plugin (future extensions). Each skill owns its own Project Instructions supplement.
MUST NOT include in the generated text:
If any of those appear in the text, you've written the wrong content for this field - move them to CLAUDE.md instead.
Auto-written sections (reallocate generates these verbatim per the template):
## ROLE## RULES## HOW WE WORK## ATLASSIAN (only if atlassian-enabled)User-filled section (reallocate leaves a clear TODO placeholder):
## PROJECT - one to three sentences describing what the project IS. Reallocate does NOT auto-write this; it doesn't know what the user's project is about. Leave a placeholder like {Fill in: what is this project? Why does it exist? What's the goal?}.Format in the report (use this exact preamble so the user knows what to do):
─────────────────────────────────────────────────────────────
PROJECT INSTRUCTIONS - paste into Cowork's UI
Cowork's Project Instructions field (app sidebar → project
settings → Instructions) carries the project's PERMANENT
ROLE and BEHAVIORAL RULES. It is separate from CLAUDE.md
(which carries the dynamic folder structure) and cannot be
edited from here.
Open Cowork's UI and paste the block below into the
Instructions field. Fill in the PROJECT section with what
your project IS - that's the only part you need to author.
─────────────────────────────────────────────────────────────
# {PROJECT_NAME}
... (rendered template from lib/project-instructions.md) ...
If the workspace already had Project Instructions set (no programmatic way to know - ask the user via structured prompt: "Do you already have Cowork Project Instructions set for this project? - Yes, replace / Yes, merge / No, paste fresh"), surface guidance accordingly:
Do NOT skip this step. The user has no other signal that the Project Instructions field needs to exist or be updated. If you skip it, the workspace ends up half-configured - folder structure correct, role context missing or stale.
If any of the following were detected during scan, surface them at the end of the report (NOT as a blocker):
.git/config) at any path containing a literal PAT/OAuth token in the remote URL (https://ghp_*@github.com/..., https://x-access-token:*@github.com/...).env, .credentials, or similar file inside a moved repo.zip, .tar.gz) that wasn't unpacked but contains the word "credentials" or "secret" in its nameFormat:
⚠ Security review
- {PROJECT}.cc/<repo>/.git/config has a GitHub PAT in the remote URL.
Rotate at github.com → Settings → Developer settings → Tokens, then
run: git -C <path> remote set-url origin https://github.com/<owner>/<repo>.git
✓ Reallocation complete
Snapshot: archive/_pre-migration/<ISO>/
Workspace root: <path>
CC head: {PROJECT}.cc/
Moved: <n> items
- <git-repo-name>/ → {PROJECT}.cc/<git-repo-name>/ (auto-migrated)
- <root-loose-file> → _INBOX/ (run inbox to classify)
- claude-code/ → {PROJECT}.cc/ (renamed)
CLAUDE.md: folder-conventions section refreshed
STRUCTURE.md: regenerated
Next:
/runesmith-workspace:inbox - process anything sitting in _INBOX/
/runesmith-core:plan - capture a plan
If the workspace is already in canonical shape:
.gitignore patterns; add any missing.STRUCTURE.md from current template.CLAUDE.md (idempotent - replaces with current template).lib/folder-conventions.md for keep-list and destination map_INBOX/ if a canonical home is unambiguous{PROJECT}.cc/<repo>/ without per-repo prompts{PROJECT}.cc/<repo>/ to inspect or modify repo contents. Reallocate moves a repo as a whole unit when migrating, then stops at the boundary. Repo-internal cleanup is runesmith-cc:code-tech-debt (CC-side).lib/naming.md{PROJECT}.cc/tickets/ directory created (legacy)archive/superseded/ and archive/tickets-pushed/ createdSTRUCTURE.md written at root from lib/STRUCTURE.template.mdCLAUDE.md per lib/claude-md-section.mdCLAUDE.md per lib/claude-md-agent-ops-section.mdCLAUDE.md untouched.gitignore patterns addedlib/project-instructions.md.Empty workspace, nothing to migrate: Initialize canonical dirs from scratch, write STRUCTURE.md, apply CLAUDE.md section (bootstrap form), report.
Permission errors during move: Surface the file, abort the run, suggest user fix permissions and re-run.
Conflict - destination exists with different content: Surface a structured choice (single-pick): keep existing / overwrite from source / skip / abort.
Multiple *.cc/ candidates: Surface a structured choice listing each, single-pick which is active.
{PROJECT}.cc/ exists but no marker file: Treat as legacy CC head; run normalization to add marker + missing structural files.
Legacy tickets/ at root with JSONs: For each JSON, surface a structured prompt asking which plan slug it belongs to. If no plan exists, offer "create a plan now" or "route to archive/superseded/<YYYY-MM>/tickets-orphan/".
Normalized name is empty: Surface a structured prompt for the user to provide a name.
CLAUDE.md modified externally during reallocate run: Re-read, re-apply section (markers handle merge), surface a notice in the report.