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

> ## Agent Instructions
> Agents: start with https://docs.pre.dev/agents.md, which has complete recipes, plan access, polling rules, errors and limits.
> Authenticate with the workspace API key (pdk_…) from Integrations → Built-in, sent as Authorization: Bearer <key>.
> REST API: https://api.pre.dev (OpenAPI: https://docs.pre.dev/api-reference/openapi.json). AI Gateway: https://api.pre.dev/v1, OpenAI-compatible (OpenAPI: https://docs.pre.dev/api-reference/ai-gateway.openapi.json).
> pre.dev MCP server: npx -y @predotdev/mcp setup adds it to every local coding agent with every pre.dev tool plus the user's own Chrome; the hosted server is https://api.pre.dev/mcp. Search these docs over MCP at https://docs.pre.dev/mcp.

# Work on an existing repo

> Map a local codebase and make changes you can review with Git.

**1. Start in the checkout**

```bash theme={null}
cd my-existing-app
predev
```

The current directory is the workspace. The CLI associates it with a pre.dev project and resumes that association on later launches. `--new` creates a fresh association.

**2. Map the architecture**

Accept the existing-codebase analysis prompt when offered, or run `/reverse`. Inspect the result with `/arch`. Rerun analysis after major structural changes when the stored architecture needs refreshing.

**3. Describe a change**

```text theme={null}
Fix invoice date formatting for non-US locales. Preserve the
existing timezone handling and add a regression test.
```

Ask for a plan in your message, or use `/plan`, if you want to develop the approach first. For separate workstreams, use `/sprint` or `/fork` with a clear task description.

**4. Inspect the result**

```bash theme={null}
git status
git diff
```

Read the reported tests, review changes in the active checkout or session worktree, and resolve any conflicts before committing or merging. Request the commit, PR, or review behavior you want explicitly in the task.

Project planning artifacts are also available in the web workspace. Local and hosted code still follow your repository's synchronization workflow. For a hosted checkout, use [GitHub import](https://predev.mintlify.site/coding-agent/projects/importing-repos.md).


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