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

# Memory & Instructions

> Give Parsaa persistent context about your project and preferences

## Overview

Parsaa folds two kinds of persistent context into the agent at the start of every conversation:

* **Instructions** — Markdown files in your project (and globally) that define rules, conventions, and architecture.
* **Memory** — short snippets you save in-app for facts the agent should remember.

Both are managed under **Settings → Project**.

## Instructions

Instructions are Markdown files detected in your project and folded into the agent's system prompt. Each detected file has an on/off toggle in **Settings → Project → Instructions**, and the state is remembered per file.

### PARSAA.md

Drop a `PARSAA.md` at your project root. Its contents are always included. Plain Markdown.

```markdown theme={null}
# Project Instructions

## Architecture
- MVVM with SwiftUI views
- Dependencies injected via Factory

## Code Style
- Swift 6 strict concurrency
- Prefer value types over reference types
```

A **global** `~/.parsaa/PARSAA.md` holds personal preferences that follow you across every project.

```markdown theme={null}
# Global Preferences

- Always use conventional commits
- Concise comments only
```

### Modular rules

For larger setups, drop rule files under `.parsaa/rules/`. Each may declare a YAML frontmatter block:

```markdown theme={null}
---
description: Swift style conventions
globs: ["*.swift"]
alwaysApply: false
---

# Swift Style
- Use `guard` for early returns
- Mark classes as `final` by default
```

| Frontmatter   | Meaning                                                                                        |
| ------------- | ---------------------------------------------------------------------------------------------- |
| `description` | Short label shown next to the file in the UI                                                   |
| `globs`       | File patterns (e.g. `["*.swift", "*.ts"]`) — applied only when `alwaysApply` is `false`        |
| `alwaysApply` | `true` (default) always includes the rule; `false` includes it only for files matching `globs` |

### Other formats Parsaa detects

Parsaa also recognizes instruction files written for other tools, so you don't have to duplicate them:

`CLAUDE.md` · `AGENTS.md` (walks up to 3 parent directories for monorepos) · `.cursorrules` · `.cursor/rules/*.mdc` · `.github/copilot-instructions.md` · `.github/instructions/*.md` · `.windsurfrules` · `GEMINI.md` · `CODEX.md`

<Tip>
  Because instructions are plain files, they're shared with your team through git — everyone working in the repo gets the same conventions.
</Tip>

## Memory

Memory entries are short notes you save in **Settings → Project → Memory** that get folded into the agent's context.

| Field   | Description                        |
| ------- | ---------------------------------- |
| Title   | Required label for the entry       |
| Content | The note itself (plain text)       |
| Tags    | Comma-separated tags for searching |

Each entry is either **project-scoped** (tied to the current project) or **global** (available across all projects). Entries are searchable by title, content, and tags.

## Memory vs Instructions

|          | Instructions                              | Memory                       |
| -------- | ----------------------------------------- | ---------------------------- |
| Source   | Markdown files in the project / home      | Entries you create in-app    |
| Scope    | Per project, global, or parent (monorepo) | Per project or global        |
| Sharing  | Shared via git (file-based)               | Local to your device         |
| Best for | Conventions, architecture, team rules     | Personal reminders and facts |

<Note>
  Both are folded into the system prompt at the start of a conversation — instructions for declarative, team-shared rules; memory for lightweight, local notes.
</Note>
