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

# Knowledge Files

> Long-term facts about people, projects, preferences, and decisions

# The Agent's Permanent Memory

Knowledge files are the agent's permanent memory — long-term facts that persist indefinitely and are always available in context. While episodes capture what happened and consolidation compresses the timeline, knowledge files store what Wolffish *knows* about you, your world, and your preferences.

## Location

```
~/.wolffish/workspace/brain/hippocampus/knowledge/
├── people.md
├── projects.md
├── preferences.md
├── technical.md
└── decisions.md
```

## The Five Default Files

| File             | Purpose                                                                  |
| ---------------- | ------------------------------------------------------------------------ |
| `people.md`      | People you interact with — names, roles, relationships, context          |
| `projects.md`    | Active and past projects — stack, status, key decisions                  |
| `preferences.md` | Your personal preferences — tools, workflows, communication style        |
| `technical.md`   | Technical facts — environments, APIs, credentials locations, conventions |
| `decisions.md`   | Decisions you've made — rationale, constraints, outcomes                 |

<Info>
  These five files are created during first launch. You can add more knowledge files — the agent reads everything in the `knowledge/` directory. Create `books.md`, `health.md`, or whatever categories make sense for your life.
</Info>

## How Knowledge Gets Written

Knowledge enters the system through three paths:

### 1. Automatic Promotion (LLM-driven)

During consolidation, the LLM identifies patterns that deserve permanent storage. If the same preference appears across multiple weeks, or a project keeps coming up, the consolidation process promotes it to the appropriate knowledge file.

### 2. Direct Agent Writes

When you say something like "remember that I prefer conventional commits" or "my manager's name is Sarah," the agent writes directly to the appropriate knowledge file during the conversation. The `agents.core.md` procedures instruct Wolffish to update knowledge whenever it learns a new long-term fact.

### 3. Manual Editing

Open any knowledge file in your editor and change it. The brainstem file watcher detects the change, the cortex re-indexes it, and the next conversation will use the updated information.

## Context Priority

Knowledge files have the highest memory priority after identity files (`soul.md`, `user.md`). They are **always** included in context assembly — unlike episodes and consolidated files, which pass through RAS scoring. The logic is simple: if you told the agent to remember something permanently, it should always be available.

## Example: preferences.md After a Few Weeks

```markdown theme={null}
# Preferences

## Development
- Package manager: pnpm (never npm or yarn)
- Commit style: conventional commits (feat:, fix:, chore:)
- Validation: Zod at all API boundaries
- Testing: Vitest for unit tests, Playwright for e2e
- Formatting: Biome over ESLint+Prettier

## Communication
- Prefers concise answers with code examples over lengthy explanations
- Likes bullet points over paragraphs for technical content
- Wants to be warned before destructive operations, even if flagged safe

## Workflow
- Morning sessions (08:00–12:00) for deep work — avoid scheduling interruptions
- Prefers creating a new branch per feature, never commits directly to main
- Likes PRs reviewed before merge, even on solo projects

## Tools
- Editor: VS Code with Vim keybindings
- Terminal: Warp
- Browser: Arc for development, Chrome for testing
- Notes: Obsidian with daily notes
```

## Example: people.md

```markdown theme={null}
# People

## Sarah (Manager)
- Engineering manager at current company
- Prefers async communication over meetings
- Reviews PRs on Tuesdays and Thursdays

## Omar (Co-founder)
- Working on the billing service together
- Handles infrastructure and deployment
- Timezone: UTC+3 (Riyadh)

## Alex (Design)
- UI/UX designer on the product team
- Shares Figma links for review — always check mobile breakpoints
```

## Editing Guidelines

<Tabs>
  <Tab title="Adding Facts">
    Just tell Wolffish during conversation:

    * "Remember that my API key for Stripe is in 1Password"
    * "Note that we decided to use PostgreSQL over MySQL for the new service"
    * "My flight to Riyadh is on June 3rd"

    The agent will write to the appropriate knowledge file.
  </Tab>

  <Tab title="Correcting Facts">
    If Wolffish has outdated information:

    * "Update my preferences — I switched from yarn to pnpm"
    * "Sarah got promoted, she's now VP of Engineering"

    Or edit the file directly in your editor.
  </Tab>

  <Tab title="Removing Facts">
    Delete the line from the knowledge file, or tell Wolffish:

    * "Forget about the billing service project, it was cancelled"

    The agent will remove the entry.
  </Tab>
</Tabs>

<Tip>
  Knowledge files work best when they're concise. Each entry should be a fact, not a story. If you find a knowledge file growing past 100 lines, consider splitting it into multiple topic files.
</Tip>

## Custom Knowledge Files

Create any `.md` file in the `knowledge/` directory and it becomes part of the agent's permanent memory:

```bash theme={null}
# Create a new knowledge file
touch ~/.wolffish/workspace/brain/hippocampus/knowledge/health.md
```

The brainstem file watcher will detect it, the cortex will index it, and prefrontal will include it in context assembly with the same priority as the default five files.
