# How it fits together

> What superclaude is and the parts it joins into a session, with vaults, the profiles home, the manifest, plugins, the daemon, memory and code_repo worktrees in folds.
>
> sc starts the Claude Code you already have inside a named workspace, built from a manifest, plugins and a memory hub. This page names each part and how they relate.

superclaude is an orchestrator for Claude Code projects that closes the loop: it customizes, optimizes, and configures a project by itself, ships with a curated set of default plugins, and gives multiple projects a real UX instead of folders.

`sc` launches the stock `claude` binary you already have, signed in. It is not a fork and not a hosted service. For each session it joins these parts, and each workspace has one manifest (`.claude/superclaude.toml`):

| Part | Where | What it is |
|---|---|---|
| `sc` | `~/.local/bin/sc`, with a `superclaude` symlink | the launcher and every management command |
| profiles home | `~/.superclaude/` | `config.toml`, the vendored plugins, the shared prompt library, the `system/` workspace; one per machine |
| vault | any registered directory | projects and agents, the memory hub, vault plugins; you can have several |
| workspace | `<vault>/p/<project>/a/<agent>` | one agent, launched with `sc <project> <agent>` |
| manifest | `.claude/superclaude.toml` in the workspace | the agent's identity: prompt sections, in order, and the plugin list |
| plugins | `$SC_PLUGINS/<name>`, `$SC_VAULT_PLUGINS/<name>` | capability: skills, subagents, hooks, MCP servers |
| daemon | one background `sc` process | session tracking; it outlives sessions |
| gateway | inside the daemon | routes a session's model requests to other endpoints |
| memory hub | `<vault>/memories` | memory every workspace in the vault reads |

Identity goes in the manifest and capability goes in plugins. `~/.superclaude/plugins/` belongs to `sc system`, which replaces it on every refresh, so your own plugins go in `<vault>/plugins/`.

These three commands show your own setup:

```sh
sc vault ls
sc list
sc <project> <agent> --prompt --plugins
```

The first lists your vaults, the second the projects and agents in the default one, and the third prints what one agent's session is built from, without starting it.

- `sc` launches the `claude` binary you already have installed and signed in.
- It passes the assembled system prompt and the plugin list as ordinary `claude` arguments.
- Its plugins are ordinary Claude Code plugins. Skills are invoked as `/<plugin>:<skill>`.
- Claude Code flags pass through after the agent name.

**I already use Claude Code, or the old SuperClaude**

`sc` changes nothing outside the sessions it launches. Read [Coming from Claude Code](/docs/from-claude-code) if you use plain Claude Code, [Moving from the old SuperClaude](/docs/migrate-superclaude) if you use the old folders, and [How it compares](/docs/compare) if you are weighing it against Hermes Agent, Pi, OpenClaw, OpenCode or Codex CLI.

**Who is it for, and where does it run?**

superclaude is for anyone running several long-lived Claude Code projects on one machine, each with its own setup. Without it, each project is a directory you `cd` into, with its prompt, plugins and memory arranged by hand. With it, each project and agent has a name, a manifest you can check, and a shared plugin set you refresh in one place.

It runs on macOS (Apple silicon and Intel) and Linux (x86_64 and ARM64). A few features, such as `--isolate-vault`, are macOS-only. See [Install](/docs/install) for requirements.

**What does sc hand to claude?**

superclaude depends on Claude Code and replaces no part of it. It builds on Claude Code's own extension points: system prompts, plugins, hooks and environment variables. You keep your Claude Code install, your login and your upgrades.

"Orchestrator" here means orchestration of configuration and launch. superclaude decides what a session is made of, starts it, and watches it. Fan-out to subagents is Claude Code's own Agent tool.

Before a launch, you can see exactly what `sc` will hand to `claude`. These report selectors resolve the launch and print instead of starting a session:

```sh
sc <project> <agent> --prompt
sc <project> <agent> --plugins
sc <project> <agent> --doctor
```

`--prompt` shows the assembled system prompt and which file and section each part came from. `--plugins` shows each plugin and the directory it resolved to. `--doctor` reports conformance for that workspace. `sc doctor` runs the same checks across every workspace in every registered vault, plus the machine-level checks.

**What lives in ~/.superclaude?**

`sc` reads from two kinds of directory. They sit on different axes, and most of the path rules on this page follow from that split.

| Tree | Where | Holds |
|---|---|---|
| profiles home | `~/.superclaude/` (override with `$SUPERCLAUDE_HOME`) | `config.toml`, the vendored plugins, the shared prompt library, the `system/` workspace |
| vault | any registered directory, for example `~/.superclaude/personal` | projects and their agents, the memory hub, vault plugins, the workflow store |

There is one profiles home per machine. There can be many vaults. The profiles home is machine-level and shared by every vault:

```text
~/.superclaude/
├── config.toml               vaults, endpoints, profiles, daemon settings
├── plugins/                  the vendored plugin tree ($SC_PLUGINS)
├── _global/shared/prompt/    the shared prompt library ($SC_PROMPTS), with core.toml
├── system/                   the system workspace that `sc system` launches
└── worktree-state/           per-repo bookkeeping for sc-provisioned worktrees
```

`sc system` refreshes `plugins/` from the release and replaces each plugin whose content changed. Never hand-edit anything under it. It also installs `core.toml` and keeps it current while you leave it unedited. The `system/` workspace is flat: it does not use the `p/<project>/a/<agent>` layout.

**How do I register, choose and isolate vaults?**

A vault is a registered directory that holds projects, their memories and vault plugins. There is no auto-discovery. A directory is a vault only if [`config.toml`](/docs/config-toml) names it under `[vaults.<name>]`. You can keep more than one vault, for example `personal` and `work`:

```toml
default = "personal"

[vaults.personal]
path = "~/.superclaude/personal"

[vaults.work]
path = "~/vaults/work"
```

Create, register and inspect vaults with `sc vault`. `sc list` shows the projects and agents in one:

```sh
sc vault new <name> --bare
sc vault add work ~/vaults/work
sc vault ls
sc vault default personal
```

`sc vault new <name>` creates the container at `~/.superclaude/<name>` and registers it. Without `--bare` it also writes one starter workspace at `p/<name>/a/main`, or wherever `--workspace <project>/<agent>` puts it. With `--bare` it creates the container only, and you create workspaces from `sc system` instead. See [Add projects and agents](/docs/workspaces).

A vault container looks like this:

```text
<vault>/
├── p/<project>/a/<agent>/    workspaces
├── memories/                 the memory hub ($CLAUDE_MEMORY_HUB)
├── plugins/                  vault plugins ($SC_VAULT_PLUGINS)
└── workflows/                the workflow store ($SC_WORKFLOWS)
```

`sc` picks the vault for a launch in this order:

1. `-v <name>`, looked up in the registry
2. `$SUPERCLAUDE_VAULT`, an explicit path that bypasses the registry
3. the top-level `default` key in `config.toml` (a vault named `default` is used if the key is absent)
4. otherwise an error: no vault selected

Vault names match exactly. Project and agent names are fuzzy.

On macOS, a session in one vault can be blocked by the kernel from reading any other registered vault. It is off by default. Turn it on for one launch with `--isolate-vault`, or for every launch with `[vault_isolation]` `enabled = true` in `config.toml`.

**How is a project laid out?**

Inside a vault, each workspace lives at a fixed path shape:

```text
<vault>/p/<project>/a/<agent>/
```

A project is a named group of agents. An agent is one workspace in a project, with its own manifest, plugin set, memory and configuration. This shape is what makes a workspace addressable by name:

```sh
sc <project> <agent>
sc <project>
sc
sc list
```

`sc <project> <agent>` launches that agent's workspace from any directory. `sc <project>` launches the project's `main` agent, or its only agent. Bare `sc` launches the workspace you are standing in, and prints the project list when you are not in one. `sc list` prints each project in the resolved vault with its agents.

Names resolve case-insensitively in the order exact, prefix, substring, subsequence. A single best match wins. A tie or no match lists the candidates and exits non-zero. A project name that collides with one of `sc`'s own commands is shadowed by the command.

> [!NOTE]
> The layout is a convention the name resolver relies on, not a check. A workspace at any other depth still launches, but only by standing in it or with `--spf`, never by `sc <project> <agent>`.

**What goes in the manifest and what in plugins?**

The manifest and plugins have separate jobs:

| Layer | Carries | Lives in |
|---|---|---|
| manifest | identity: the system prompt, as named sections in order, and the list of plugins to load | `.claude/superclaude.toml` in the workspace |
| plugins | capability: skills, subagents, hooks and MCP servers | `$SC_PLUGINS/<name>` or `$SC_VAULT_PLUGINS/<name>` |

At launch, `sc` renders the manifest's `system_prompt` list into the session's system prompt and passes each `plugins` entry to `claude` as a `--plugin-dir` flag. A plugin can also publish prompt sections under `<plugin>:<section>`. The ones it injects render in every workspace that loads it; any other renders only where the manifest's `system_prompt` names it. Under a plain `claude` launch the plugin's skills, hooks and agents load as usual, and its sections do not exist.

A small manifest:

```toml
code_repo = "~/code/backend"

import = [
  { from = "$SC_PROMPTS/core.toml", use = ["communication", "git_policy"] },
]

system_prompt = [
  "identity",
  "communication",
  "git_policy",
]

plugins = [
  "$SC_PLUGINS/sc-memory",
  "$SC_PLUGINS/sc-web",
  "$SC_VAULT_PLUGINS/backend-tools",
]

[section.identity]
content = """
<identity>
You own the backend service in code_repo. You may edit its source and tests.
Deployment configuration is out of scope.
</identity>
"""
```

Root keys such as `code_repo`, `import`, `system_prompt` and `plugins` must come before the first `[section.*]` header. The `import` line reads the shared section library, `$SC_PROMPTS/core.toml`. `sc system` installs it from the release and keeps it current while you leave it unedited. Check a workspace's manifest, and print the full specification generated by the binary:

```sh
sc validate <workspace-dir>
sc prompt example
```

Every key is covered in [superclaude.toml](/docs/superclaude-toml). Shared sections such as `communication` come from the [shared system prompt](/docs/system-prompt). The [prompts page](/prompts) publishes every shipped section verbatim.

**What can an agent do out of the box?**

You never call a plugin by name. Ask in plain words, and the agent picks the plugin and the skill that fit. A curated set ships with superclaude under `~/.superclaude/plugins/`, and `sc system` replaces that tree on every refresh. A workspace loads the plugins its manifest's `plugins` list names, and no plugin needs another. sc expects the default plugins in every workspace, and `sc doctor` flags a manifest that leaves one out. Opt-in plugins are off until you add them. Each row gives a plugin's placement and one thing you can ask for:

| Plugin | Placement | What you can ask for |
|---|---|---|
| [sc-memory](/docs/memory) | Default | "What did we decide about caching?" It remembers what each project concluded. |
| [sc-web](/docs/web-research) | Default | "What changed in the last three Rust releases?" It searches the web and cites its sources. |
| [sc-browse](/docs/browser) | Default | "Look at our pricing page and tell me what is confusing." It uses your own Chrome. |
| [sc-artifacts](/docs/artifacts) | Opt-in, Beta | "Show me this comparison as a page I can comment on." |
| [sc-frontend](/docs/frontend) | Opt-in | "Build a settings page for notifications." It keeps UI work on one library and theme. |
| [jev](/docs/judgments) | Opt-in | "Score these drafts for urgency." Typed judgments with probabilities. |

Each vault also has its own `<vault>/plugins/` directory for capability specific to that vault's work, and the refresh never touches it.

**Where do plugin and prompt paths point?**

A manifest never hardcodes where plugins or the prompt library live. It uses three built-in path prefixes, written as `$VAR/rest/of/path`. Each has a computed default, so nothing needs to be exported. An exported variable of the same name overrides the default. The full list of what `sc` reads is on [Environment variables](/docs/environment).

| Variable | Resolves to | Axis | Use it for |
|---|---|---|---|
| `$SC_PROMPTS` | `<profiles home>/_global/shared/prompt` | profiles home | importing shared sections, for example `$SC_PROMPTS/core.toml` |
| `$SC_PLUGINS` | `<profiles home>/plugins` | profiles home | the vendored plugins that ship with superclaude |
| `$SC_VAULT_PLUGINS` | `<vault>/plugins` | vault | your own plugins for this vault's work |

The axis matters. `sc system` owns `$SC_PLUGINS` and replaces a plugin there whenever the release changes it, so your own work does not belong there. `$SC_VAULT_PLUGINS` is never touched by vendoring, which makes `<vault>/plugins/<name>` the home for a workspace's own plugin. One `plugins` array can mix both prefixes.

To load an opt-in plugin for one launch without editing the manifest, use `--with`. `--without` leaves out, for one launch, a plugin the manifest names:

```sh
sc <project> <agent> --with sc-artifacts
sc <project> <agent> --without sc-frontend
sc <project> <agent> --plugins
```

`--plugins` reports which directory each plugin resolved to, then the vendored plugins this launch does not load.

**What runs in the background?**

The [daemon](/docs/daemon) is one background `sc` process per machine, local to it. It outlives any session. `sc` starts it on launch if it is not already running, except under `-i` or `--no-daemon`:

```sh
sc daemon status
sc daemon start
```

The launcher wires Claude Code's lifecycle hooks to the daemon, so the daemon sees exactly the sessions `sc` started. Per session it tracks live state (working, or waiting on you), turn and token counts, the model in use, and the subagents under it. On macOS it can raise a desktop notification when a session starts waiting on you. `sc dash` opens a browser console over that roster. A session started with plain `claude` is not visible to it.

The daemon also hosts the gateway, which routes a session's model requests to the endpoints in `config.toml`. `sc -u <profile> <project> <agent>` runs a session on a gateway profile, and the gateway routes each Claude role (fable, opus, sonnet, haiku) to a model on one of your endpoints. `sc profiles` lists the configured profiles, and `-u direct` is plain Claude. `--no-daemon` launches first-party `claude` with no gateway at all. See [How the gateway routes](/docs/gateways).

The control port is `48770` on loopback by default. Change it with `[daemon]` `port` in `config.toml` or `$SUPERCLAUDE_DAEMON_PORT`.

**Where does memory live?**

[sc-memory](/docs/memory) keeps memory as small typed Markdown files in eight kinds: decisions, gotchas, patterns, preferences, references, notes, quests and artifacts. It writes to two roots:

| Root | Where | Holds |
|---|---|---|
| project memory | `<workspace>/.claude/memory/` | kinds tied to this workspace: decisions, notes, quests, repo-specific gotchas |
| memory hub | `<vault>/memories/`, exported as `$CLAUDE_MEMORY_HUB` | kinds that transfer: preferences, references, patterns, artifacts, tool and platform gotchas |

`sc` exports `$CLAUDE_MEMORY_HUB` into every session it launches when `<vault>/memories` exists, so every workspace in a vault reads the same hub. Each vault has its own hub. Each session and each subagent opens with a map of what memory exists (kinds, counts, titles and paths, no content). A background subagent then decides what deserves to outlive the session and writes it, on the cadence the [sc-memory](/docs/memory) page describes. The next session opens with the map that pass produced.

If your shell already exports `$CLAUDE_MEMORY_HUB`, that value wins. The same rule applies to `$SC_WORKFLOWS`, which points at `<vault>/workflows`.

**How do code_repo and worktrees work?**

A workspace is where an agent's manifest and memory live. The code it works on is usually somewhere else. `code_repo` in the manifest names that git repository:

```toml
code_repo = "~/code/backend"
```

Because the workspace is not the code repository, Claude Code's built-in git worktree path cannot work there. `sc` provisions worktrees itself, through Claude Code's `WorktreeCreate` and `WorktreeRemove` hooks. Worktrees land at `../worktrees` relative to `code_repo`, a sibling of the repo. Set `$SC_RELATIVE_WORKTREE_ROOT` to change that.

```sh
sc worktree ls
sc worktree prune
```

`git worktree list` is the source of truth. `sc` stores only what git cannot answer (the owning workspace, the base commit, a detached flag) under `~/.superclaude/worktree-state/`, never in the manifest. Removing a worktree from a session only marks it `detached`. `sc worktree prune` reclaims the disk, and skips anything dirty, locked, carrying commits beyond its base, or the worktree you are standing in.

`claude`'s own `-w` / `--worktree` flag is refused at the launch position, because `sc` provisions worktrees through the `WorktreeCreate` hook instead. `--spf <path>` swaps in a different manifest for a launch, but `code_repo` still resolves against the real workspace.
