> ## Documentation Index
> Fetch the complete documentation index at: https://evoke-f0bfabff.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code Adapter

> Asset adapter for Claude Code — agents, commands, and skills via CLAUDE.md.

## Overview

Claude Code can use project/user subagents and slash commands. RStack runs in Claude Code today as portable agent assets — the Pi-native lifecycle hooks are not available, but the full agent/skill/plugin library is.

## Recommended: npm init

```bash theme={null}
cd your-project
npm install rstack-agents
npx rstack-agents init --framework claude-code --profile business-flex
```

`init` creates `.rstack/`, scaffolds `CLAUDE.md`, `SOUL.md`, and `HEARTBEAT.md` from the package templates, writes `.claude/rstack-sdlc.md`, and optionally a SessionStart hub hook snippet. Existing files are never overwritten.

## How invocation works

Claude Code does not call `sdlc_start` or any other Pi tool directly. It invokes RStack through portable files:

| Surface                | Source                                                           | How it is invoked                                                                                                                                                         |
| ---------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Bootstrap instructions | `CLAUDE.md`, `SOUL.md`, `HEARTBEAT.md`, `.claude/rstack-sdlc.md` | Loaded by Claude Code as project guidance                                                                                                                                 |
| Core and SDLC agents   | `agents/**/*.md`, optionally copied to `.claude/agents/rstack/`  | Run through Claude Code's subagent mechanism or by explicitly asking for the named RStack agent                                                                           |
| Skills                 | `skills/**/SKILL.md`                                             | Used by Claude Code when a task matches the skill trigger                                                                                                                 |
| Plugins                | `plugins/*/plugin.json` plus plugin assets                       | Installed/copied by package or project convention, then routed by Claude Code/plugin metadata                                                                             |
| Slash-command prompts  | `prompts/*.md`, optionally copied to `.claude/commands/rstack/`  | Exposed by Claude Code according to its command-file naming convention, for example `.claude/commands/rstack/build.md` becomes the RStack `build` command namespace entry |
| CLI bridge             | `rstack-agents`                                                  | Runs setup, validation, decision queue, readiness, and hub commands outside the model runtime                                                                             |

The practical difference from Pi is enforcement. Claude Code can follow RStack's orchestrator/builder/validator contracts and write `.rstack/runs/<run_id>/` state, but the package cannot intercept every Claude Code tool call the way the Pi `tool_call` hook can. Use approval and validation contracts in Claude Code, but treat destructive-action blocking as a Pi-native guarantee unless a future Claude Code adapter adds equivalent tool gating.

## Manual asset copy (optional)

If you prefer a local vendor copy instead of reading from `node_modules/rstack-agents/`:

```bash theme={null}
export RSTACK_HOME=/path/to/SDLC-rstack

mkdir -p .claude/agents/rstack .claude/commands/rstack .rstack/vendor/rstack
cp -R "$RSTACK_HOME/agents"    .rstack/vendor/rstack/
cp -R "$RSTACK_HOME/skills"    .rstack/vendor/rstack/
cp -R "$RSTACK_HOME/plugins"   .rstack/vendor/rstack/
cp -R "$RSTACK_HOME/prompts"   .rstack/vendor/rstack/
cp -R "$RSTACK_HOME/agents"/*  .claude/agents/rstack/
cp "$RSTACK_HOME/prompts"/*.md .claude/commands/rstack/ 2>/dev/null || true
```

## CLAUDE.md configuration

Run `init`, or copy the canonical template from the package:

```bash theme={null}
cp node_modules/rstack-agents/templates/bootstrap/CLAUDE.md ./CLAUDE.md
cp node_modules/rstack-agents/templates/bootstrap/SOUL.md ./SOUL.md
cp node_modules/rstack-agents/templates/bootstrap/HEARTBEAT.md ./HEARTBEAT.md
```

| File           | Purpose                                                                    |
| -------------- | -------------------------------------------------------------------------- |
| `CLAUDE.md`    | Claude Code bootstrap — asset paths, slash commands, optional hooks        |
| `SOUL.md`      | Governance identity — orchestrator/builder/validator roles, evidence rules |
| `HEARTBEAT.md` | Optional standby checks — approvals, budget, stalled tasks                 |

The template covers orchestrator/builder/validator routing, `.rstack/rstack.config.json` profile awareness, run state under `.rstack/runs/<run_id>/`, and optional SessionStart hub hooks.

## Limitations vs. Pi

| Feature               | Pi | Claude Code   |
| --------------------- | -- | ------------- |
| `tool_call` gating    | ✅  | ❌             |
| Lifecycle hooks       | ✅  | ❌             |
| Native slash commands | ✅  | Via commands/ |
| Agent asset library   | ✅  | ✅             |
| Skills and plugins    | ✅  | ✅             |
| Run state             | ✅  | ✅             |

A Claude Code adapter with native tool gating is on the [roadmap](/reference/configuration).
