> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corestory.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CoreStory v3 Playbooks

> Skills that teach coding agents to use CoreStory v3 for rule-grounded development, testing, analysis and modernization, and how to install them.

CoreStory v3 builds a local map of a codebase, from applications down to business rules, each traced to the code behind it, and serves that map to coding agents over MCP. The v3 skills are short recipes that tell an agent which CoreStory v3 tools to call, in what order, and which file to write the result to.

> [!NOTE]
>
> These playbooks are for CoreStory v3: the desktop app, or a project ingested with v3. For other CoreStory projects, use the [Playbooks](https://docs.corestory.ai/playbooks/index.md) section.

## What a v3 skill is

A skill is a folder with a `SKILL.md` file that an agent loads when the task matches. Every v3 skill follows the same pattern:

* **Preflight first.** It calls `status` and `corpus_info`. If the repository is not indexed, or the last ingest failed, it stops and relays the next step. It never runs `init` or `ingest` without your explicit OK.
* **Rules are leads until checked.** It reads the cited source lines before relying on a rule, and cites only lines it read.
* **Output goes to a file in your repository**, such as `BUG-NOTES.md` or `RULES.md`, not to the chat. Each file ends with a `Not verified` section.
* **CoreStory does not run code.** It reads and indexes it. Any test results come from commands the agent ran.

For the tools themselves and their limits, see [Using CoreStory v3](https://docs.corestory.ai/playbooks/v3/using-corestory.md).

## Install CoreStory v3

**1. Download the command-line tool**

Get the `corestory` command-line tool from [get.corestory.ai](https://get.corestory.ai/). Builds are published for macOS (Apple silicon), Linux (x64) and Windows (x64). Put `corestory` on your PATH and check it with `corestory --version`.

**2. Run setup yourself**

Run `corestory setup` in your own terminal. It is interactive: you accept the Terms of Use and Privacy Policy, choose your telemetry setting, and add a model key (OpenAI, Azure OpenAI or Anthropic). An agent should never do this for you, and other commands refuse to run until setup is done.

**3. Index the repository**

From the repository folder, run `corestory init` and then `corestory ingest`. Ingest calls your model provider and can cost money, so run it yourself. Add `.corestory/` to your `.gitignore`.

**4. Connect your agent**

`corestory mcp` is a stdio MCP server for the repository it is started in. It takes no path argument, so it must start from the repository folder. See the options below.

### Connect your agent

> [tab] Claude Code plugin
>
> ```bash theme={null}
> claude plugin marketplace add corestoryai/agent-skills
> claude plugin install corestory-local@corestory
> ```
>
> The plugin starts `corestory mcp` in the folder Claude Code is working in, and installs the skills and the session hook described below.

> [tab] GitHub Copilot
>
> Create `.mcp.json` at the repository root. This also works for Claude Code without the plugin.
>
> ```json theme={null}
> {"mcpServers":{"corestory":{"type":"stdio","command":"corestory","args":["mcp"]}}}
> ```

> [tab] Cursor
>
> Create `.cursor/mcp.json`. The `cd` makes the server start in your workspace folder.
>
> ```json theme={null}
> {"mcpServers":{"corestory":{"type":"stdio","command":"sh","args":["-c","cd \"$0\" && exec corestory mcp","${workspaceFolder}"]}}}
> ```

> [tab] Codex
>
> Add this to `~/.codex/config.toml`, with the absolute path of the repository.
>
> ```toml theme={null}
> [mcp_servers.corestory]
> command = "corestory"
> args = ["mcp"]
> cwd = "/absolute/path/to/your/repository"
> ```

Outside the Claude Code plugin, the skills themselves are installed from the [agent-skills repository](https://github.com/CoreStoryAI/agent-skills). A machine-readable catalog is at [get.corestory.ai](https://get.corestory.ai/.well-known/agent-skills/index.json).

### How the agent finds the skills

Agents use the skills far more reliably when pointed to them than when left to discover them.

* **Claude Code plugin.** The plugin ships a `SessionStart` hook that adds one line to the agent's context, pointing it to the CoreStory skills for code changes and codebase questions.
* **Everywhere else.** Put the same line in `CLAUDE.md` or `AGENTS.md`:

```text theme={null}
For any change to this code or any question about it, first use the matching CoreStory skill (implement-feature, bug-resolver, generate-tests, corestory-ask) before editing or answering.
```

## Playbooks

### AI-assisted development

> [card] [Using CoreStory v3](https://docs.corestory.ai/playbooks/v3/using-corestory.md)
>
> Answer questions about code with cited evidence, and learn the tools and their limits.

> [card] [Bug Resolution](https://docs.corestory.ai/playbooks/v3/bug-resolver.md)
>
> Find a root cause, fix it test-first, and check rules enforced in other layers.

> [card] [Feature Implementation](https://docs.corestory.ai/playbooks/v3/implement-feature.md)
>
> Build a change test-first with the rules a ticket never mentions found up front.

> [card] [Spec-Driven Development](https://docs.corestory.ai/playbooks/v3/spec-driven-development.md)
>
> Write a delta spec grounded in existing rules before coding.

> [card] [Constraint Tickets](https://docs.corestory.ai/playbooks/v3/constraint-tickets.md)
>
> Turn a request into one-constraint tickets and an optional completion hook.

> [card] [CoreStory v3 with Jira](https://docs.corestory.ai/playbooks/v3/using-corestory-with-jira.md)
>
> Work a Jira ticket against the code through a Jira MCP server.

> [card] [Compare with Source](https://docs.corestory.ai/playbooks/v3/corestory-ask.md)
>
> Audit a CoreStory answer against source and record the differences.

### Testing and verification

> [card] [Test Router](https://docs.corestory.ai/playbooks/v3/spec-driven-test-generation.md)
>
> Choose between behavioral and end-to-end tests.

> [card] [Behavioral Tests](https://docs.corestory.ai/playbooks/v3/generate-tests.md)
>
> Rule-grounded unit and integration tests with a coverage map.

> [card] [End-to-End Tests](https://docs.corestory.ai/playbooks/v3/generate-e2e-tests.md)
>
> Journey tests traced from code and verified rules.

### Analysis

> [card] [Business Rules Extraction](https://docs.corestory.ai/playbooks/v3/business-rules-extraction.md)
>
> A rules inventory where each entry was read back against source.

> [card] [Feature Gap Analysis](https://docs.corestory.ai/playbooks/v3/feature-gap-analysis.md)
>
> What exists, what is missing, and the order of work before building.

> [card] [Codebase Assessment](https://docs.corestory.ai/playbooks/v3/codebase-assessment.md)
>
> Readiness and risk by area for a legacy system.

> [card] [M\&A Technical Due Diligence](https://docs.corestory.ai/playbooks/v3/ma-technical-due-diligence.md)
>
> A code-grounded risk review of an acquisition target.

### Modernization

Modernization runs as phases, one per session, with human approval between them. State lives in `modernization/` files in your repository, described on the [Code Modernization](https://docs.corestory.ai/playbooks/v3/code-modernization.md) page.

> [card] [Code Modernization](https://docs.corestory.ai/playbooks/v3/code-modernization.md)
>
> The router, and the phase-file convention the others use.

> [card] [Target Architecture](https://docs.corestory.ai/playbooks/v3/target-architecture.md)
>
> Strategy options and trade-offs, with the decision left to a person.

> [card] [Decomposition and Sequencing](https://docs.corestory.ai/playbooks/v3/decomposition-sequencing.md)
>
> Dependency-ordered work packages.

> [card] [Monolith to Microservices](https://docs.corestory.ai/playbooks/v3/monolith-to-microservices.md)
>
> Design one strangler-fig service extraction.

> [card] [Behavioral Verification](https://docs.corestory.ai/playbooks/v3/behavioral-verification.md)
>
> Rule-by-rule comparison of legacy and modernized code.

> [card] [Vibe Modernization](https://docs.corestory.ai/playbooks/v3/vibe-modernization.md)
>
> Agent-led, human-gated migration with an independent audit.

> [card] [Vibe Conformance Audit](https://docs.corestory.ai/playbooks/v3/vibe-conformance-audit.md)
>
> A read-only audit of delivered code at the grain of single behaviors.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.