---
title: Agent System
description: CLAUDE.md drives all agent behavior -- project instructions, slash commands, memory-based developer profile, and three-tier adaptive guidance
loadWhen: "Configuring agent behavior or capabilities"
---

The agent system is the set of files that shape how Claude Code behaves in your SDK project. It consists of four parts: `CLAUDE.md` (the instruction file), slash commands (structured task entry points), the developer profile stored in `memory/profile/`, and the adaptive guidance rules that translate profile data into concrete agent behavior.

Nothing here requires configuration. The agent reads these files at session start and adapts automatically.

## CLAUDE.md

`CLAUDE.md` is the project instruction file for Claude Code. It is read at the start of every session and governs all agent behavior. In an Elevasis SDK project, it is generated by `elevasis-sdk init` and lives at the project root.

The file is instruction-driven by design. Non-technical developers should never need to edit it. When the agent learns a new rule worth preserving -- such as an error pattern that recurs three times -- it promotes that rule into `CLAUDE.md` automatically.

### Sections

The generated `CLAUDE.md` contains these sections:

- **Session Initialization** -- Checks the `<!-- initialized: false -->` auto-init flag; if false, runs `/meta init` automatically. Otherwise reads `memory/profile/skills.md` for adaptive behavior, reads `memory/index.md` for project context, checks if the template version is current, and suggests `/tutorial` for users with no Platform Navigation experience.
- **Identity** -- Project orientation: what an Elevasis SDK project is, the developer's role, and how to adapt to non-technical users.
- **Navigation** -- A table mapping concepts to file paths with load conditions (when to load each file). Includes SDK reference docs, credential model, error history, `docs/project-map.mdx`, and `docs/priorities.mdx`.
- **Rules** -- Points to auto-loaded rule files in `.claude/rules/`. SDK patterns load automatically; project-specific patterns live in `workspace-patterns.md`. Includes error handling protocol.
- **Interaction Guidance** -- Per-dimension behavior rules derived from `memory/profile/skills.md`. Covers vocabulary, code completeness, explanation depth, and growth logging.
- **Commands** -- Table of the 4 slash commands (`/meta`, `/docs`, `/work`, `/tutorial`) with one-line purpose descriptions.
- **Skills** -- Auto-trigger conditions for the `creds` skill.
- **Maintaining Memory** -- Hierarchical structure, pruning rules, and what belongs in memory vs. `docs/` vs. `.claude/rules/`.

### Session Initialization

At the start of every session the agent runs these steps silently before responding:

0. Check the `<!-- initialized: ... -->` flag at the top of `CLAUDE.md`. If `false`, run the `/meta init` flow automatically. If `true`, proceed with steps below.
1. Read `.claude/memory/profile/skills.md` -- adapt all responses to the user's assessed skill levels (see Interaction Guidance below).
2. Read `.claude/memory/index.md` if it exists -- drill into relevant topic files as needed, balancing context relevance against token usage.
3. Check the installed `@elevasis/sdk` template version against `templateVersion` in `elevasis.config.ts`. If the SDK has a newer version, notify the user and suggest running `/meta fix`.
4. If `.claude/memory/` does not exist, suggest running `/meta init` to set up the project.
5. If the user's Platform Navigation level is none (from skills.md) and `.claude/memory/tutorial-progress.md` does not exist, suggest `/tutorial`.

## Slash Commands

Skills are Markdown instruction files in `.claude/skills/`. When you type `/skill-name` in a Claude Code session, the agent reads the corresponding `SKILL.md` and follows its instructions.

The following skills are scaffolded by `elevasis-sdk init` and committed to version control so collaborators get the same experience:

| Skill       | File                       | Purpose                                                  |
| ----------- | -------------------------- | -------------------------------------------------------- |
| `/work`     | `skills/work/SKILL.md`     | Task tracking -- list, create, save, resume, complete    |
| `/elevasis` | `skills/elevasis/SKILL.md` | SDK operations -- check, deploy, exec                    |
| `/deploy`   | `skills/deploy/skill.md`   | Full deploy pipeline (test, build, commit, push)         |
| `/setup`    | `skills/setup/SKILL.md`    | First-time project setup (placeholder replacement, deps) |
| `/status`   | `skills/status/SKILL.md`   | Quick project health check                               |
| `/continue` | `skills/continue/SKILL.md` | Resume in-progress work from docs                        |
| `/project`  | `skills/project/SKILL.md`  | Route project management to `elevasis-sdk project:*`     |
| `/sync`     | `skills/sync/SKILL.md`     | Pull latest, wipe caches, fresh reinstall                |
| `/explore`  | `skills/explore/SKILL.md`  | Codebase exploration anchored to docs                    |
| `/save`     | `skills/save/SKILL.md`     | Auto-manage docs from conversation context               |
| `/dsp`      | `skills/dsp/SKILL.md`      | Parallel agent dispatch for implementation tasks         |

### Key Skills

**`/setup`** -- First-time project setup. Replaces template placeholders, installs dependencies, configures `.env`, verifies the project, and optionally runs a first deploy.

**`/deploy`** -- Full deploy pipeline: type-check, validate resources, commit, deploy (auto-regenerates `docs/index.md` and `docs/resources.md`), verify platform, and optionally push.

**`/elevasis`** -- SDK operations entry point: `check` validates resource definitions, `deploy` bundles and uploads, `exec` runs a resource with input.

**`/work`** -- File-based task lifecycle. Creates, resumes, saves, and completes task docs in `docs/in-progress/`. It tracks in-progress work state, not project records.

**`/status`** -- Quick project health check: shows SDK version, deployed resources, last deploy date, and environment status.

**`/save`** -- Auto-manages docs from conversation context: writes or updates docs based on what was discussed in the session.

**`/explore`** -- Codebase exploration anchored to `docs/`. Reads the doc map first, then drills into source as needed.

**`/continue`** -- Resumes in-progress work by reading `docs/in-progress/` and picking up where the last session left off.

**`/project`** -- Project-management routing for milestones, tasks, notes, and status. It should call the canonical `elevasis-sdk project:*` CLI surface rather than inventing a parallel workflow.

That routing is interface-first, not a separate semantic model. `/project` should treat the SDK CLI as the operational entrypoint for the Organization OS delivery/projects contract: `deliveryManifest` in the shared UI, `featureId: 'projects'` in the organization model, and `organizationModel.delivery` for project/milestone/task status semantics.

When these command families overlap conceptually, use this boundary:

- `/project` -- update or inspect project data in the shared Projects system
- `/work` -- capture implementation progress and resume context in docs
- `/adev` -- build, debug, test, or execute resources

**`/dsp`** -- Dispatches subagents in parallel for implementation tasks that can run concurrently.

**`/sync`** -- Pulls latest changes, wipes all `node_modules` and caches, and runs a fresh reinstall.

## Developer Profile

The developer profile is stored in `.claude/memory/profile/` as a set of markdown files. It is gitignored -- personal to each developer, not shared with collaborators. Profile data lives in the memory system alongside error patterns, deployment state, and decisions.

### Onboarding Flow

Profile data is created during `/meta init`. The command runs a 6-question assessment and writes the responses to `memory/profile/`:

- **Identity & Goals (3 questions):** What the business does, what to automate, which tools are already in use.
- **Competency (2 questions):** Command Center familiarity (maps to `platformNavigation`), automation tool familiarity (maps to `automation`). Two additional dimensions (`apiIntegration`, `domainExpertise`) are inferred from these answers.
- **Communication (1 question):** Step-by-step explanations vs. concise answers.

### Profile Structure

```
.claude/memory/profile/
├── index.md          # Profile summary with links to sub-files
├── identity.md       # Organization, industry, goals, integrations
├── skills.md         # Skill dimensions (platformNavigation, apiIntegration, automation, domainExpertise)
└── preferences.md    # Verbosity, guidance style, interaction patterns
```

`identity.md` records the organization name, industry, size, project goals, and known tool integrations. `skills.md` stores four skill dimensions as structured values (`platformNavigation`, `apiIntegration`, `automation`, `domainExpertise`) along with a Growth Log table. See [Interaction Guidance](interaction-guidance.mdx) for the full set of per-dimension adaptation rules. `preferences.md` stores verbosity (`detailed / concise`) and proactive guidance preference.

### Auto-Update Triggers

The agent updates `memory/profile/` files when it observes:

- The user successfully completes an advanced task (level upgrade candidate in `skills.md`)
- The user mentions new tools or integrations not in `identity.md`
- The user explicitly asks to change preferences

The agent does not prompt for confirmation on minor updates. Major changes (level upgrades) are surfaced to the user before writing.

## Rules System

Ten rule files are scaffolded in `.claude/rules/`. Rule files are auto-injected by Claude Code when their path patterns match the current file being edited -- no manual loading needed.

Rules injected for operations source files (`operations/src/`):

- **`platform.md`** -- SDK adapter patterns, typed adapters, platform tool usage.
- **`error-handling.md`** -- Error types (`ExecutionError`, `PlatformToolError`), retry behavior.
- **`execution.md`** -- Worker thread model, timeouts, concurrency, org isolation.
- **`observability.md`** -- Logging with `context.logger`, step-level auto-logging, debugging.
- **`deployment.md`** -- Deploy commands, dev vs prod, version bumping, common errors.

Rules injected for docs files (`docs/`):

- **`docs.md`** -- Documentation structure, frontmatter conventions, auto-generated files.
- **`task-tracking.md`** -- Task doc conventions, injected for in-progress files.

Additional contextual rules:

- **`frontend.md`** -- React/Mantine patterns, injected for UI source files.
- **`shared-types.md`** -- Cross-runtime type conventions, injected for foundations files.
- **`organization-os.md`** -- Organization model and feature shell conventions.

## Interaction Guidance

The `CLAUDE.md` Interaction Guidance section translates skill dimensions from `memory/profile/skills.md` into concrete behavior rules -- adapting vocabulary, code completeness, explanation depth, and growth logging per dimension. For the full set of per-dimension adaptation rules, see [Interaction Guidance](interaction-guidance.mdx).

---

**Last Updated:** 2026-04-17
