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

# Memory Vault

> Browse, edit, export, and import everything the co-founder agent has learned about your apps.

The **Memory Vault** is your control panel for the agent's long-term memory. It lives at `Co-founder → Vault` in the dashboard.

Think of it as the answer to the question *"what does my AI co-founder actually know about me?"* — and just as importantly, *"can I correct it, back it up, or transfer it to a new app?"*

***

## The graph

The vault renders the agent's memory as a force-directed graph:

* Each **app** in your workspace is an anchor node, drawn with its real App Store icon.
* A **Global** anchor holds knowledge that applies across every app you own.
* Around each anchor sit the **facts** and **episodes** scoped to it.

### What the colors mean

| Color                          | What it is                                                                                                                                                                                                                                                       |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🔵 **Blue**                    | An app anchor                                                                                                                                                                                                                                                    |
| 🟣 **Purple**                  | The global (cross-app) anchor                                                                                                                                                                                                                                    |
| 🟢 **Green (fact)**            | A fact you confirmed yourself — highest weight in the agent's prompt                                                                                                                                                                                             |
| ⚪️ **Gray (fact)**             | A fact the agent inferred. Useful but lower confidence — feel free to correct or supersede                                                                                                                                                                       |
| 🟠 **Orange (constraint)**     | A rule the agent must respect (e.g. *"don't change the \$9.99 tier"*)                                                                                                                                                                                            |
| 🔴 **Red (anti-pattern)**      | A *"never do this"* — the agent will refuse to propose actions that violate it                                                                                                                                                                                   |
| 🟡 **Amber (pending)**         | An imported fact awaiting your approval. Invisible to the agent until you click **Approve**                                                                                                                                                                      |
| 🟢 **Green (episode +)**       | An applied action whose 14-day follow-up showed an improvement                                                                                                                                                                                                   |
| 🔴 **Red (episode −)**         | An applied action whose follow-up showed a regression. Used to avoid repeating the loser                                                                                                                                                                         |
| 🟡 **Amber (episode ?)**       | Outcome unknown — either still inside the 14-day window or no clear signal                                                                                                                                                                                       |
| 📄 **Source**                  | A knowledge source you ingested — an article, note, file, or Notion page (see below)                                                                                                                                                                             |
| 🟪 **Purple edges (animated)** | **Causal links** — show provenance. A purple edge from a fact to an episode means *"this fact was distilled from that outcome"*, and from a fact to a source means *"this belief came from that article"*. Used to audit why the agent believes what it believes |

Click any node to open the detail sheet on the right with the full record, including its **kind**, **confidence**, **importance**, scope, and (for facts) any prior value the row used to hold.

***

## Adding a fact manually

Click **Add fact** at the top right. Fill in:

* **Scope** — *Global* (applies to every app) or a specific app
* **Kind** — see the table above. Pick **anti-pattern** if it's a hard "never do this", **constraint** for a rule the agent must respect, **preference** for a soft direction, **observation** for background context
* **Key** — a short snake\_case label (e.g. `brand_voice`, `target_audience`, `never_localize_to`)
* **Value** — the actual content; written in plain English

Manually-added facts get full confidence and start with a high importance score. They outrank anything the agent inferred on its own.

### Example seeds

| Key                 | Value                                                       | Kind          |
| ------------------- | ----------------------------------------------------------- | ------------- |
| `brand_voice`       | *"Minimal, premium, technical. No exclamation marks."*      | preference    |
| `target_audience`   | *"Indie iOS developers 25–34, EN/DE/FR/TR markets."*        | observation   |
| `pricing_locked`    | *"Don't propose changing the \$9.99/mo subscription tier."* | constraint    |
| `never_localize_to` | *"ja, ko, zh — we don't have CJK support in the UI yet."*   | anti\_pattern |

Every one of these will show up in the next run's prompt under **What you already know**, with anti-patterns and constraints rendered as guard-rails the agent must honor.

***

## Reflect now

The **Reflect now** button at the top of the page kicks off an immediate distillation pass. The agent reads every episode of yours that has a measured outcome and turns the patterns into stable facts (preferences, constraints, observations, anti-patterns) — the same job that runs automatically every Monday at 06:00 UTC.

Use it right after a meaningful experiment landed (say, you just got 14-day after-data on a metadata change) and you want the agent to internalize the lesson before tomorrow's run rather than next Monday's reflection.

The result lands inline on the button (`Done (3+1)` = 3 new facts, 1 refined). The full history of the last reflections is pinned in the **Recent reflections** strip above the graph — green = produced new knowledge, gray = no new evidence to distill, red = failed.

***

## Superseding facts

Open any active fact and click **Supersede**. It moves to the `superseded` status — invisible to the agent but still in the database for audit. Toggle **Show superseded facts** at the top of the page to see (and graph) them.

This is a soft delete by design: the history of what the agent used to believe is often as valuable as what it believes today, especially when debugging a wrong recommendation.

***

## Ingest outside knowledge

The **Ingest** button (top right) is how you feed the vault knowledge that didn't come from your own runs — an article, a pasted note, a file, or a Notion page. The co-founder reads it, summarizes it, and lands the durable takeaways as **amber pending facts**. Open each one and click **Approve** to let the agent use it.

Ingested sources show up as their own 📄 nodes in the graph, linked to the facts they produced — so you can always trace a belief back to the article it came from.

The full flow (all the ways to feed it, plus the audit) lives in **[Second Brain](../capabilities/second-brain)**.

### Fact badges

Open any fact and the detail sheet shows its state at a glance:

* 🟢 **Verified** — active and in use on every run.
* 🟡 **Pending review** — ingested or imported, waiting for your approval; the agent can't see it yet.
* **Confirmed by you** — you typed or approved it yourself (highest weight).

### Source badges & "Review due"

Each source wears a badge showing whether it still holds up:

* 🟢 **Self-maintained** — audited recently and consistent with your playbook.
* 🟡 **Review due** — new, flagged after an anomaly on that app, or last audited over 30 days ago.
* 🔴 **Needs changes** — the last audit found a conflict.

Click **Audit against my workflow** on a source to re-check it against your current facts; that clears a "Review due" flag. The co-founder also re-checks flagged sources on its own — see [Second Brain → self-maintenance](../capabilities/second-brain).

***

## Export

Click **Export** to download everything (or just one app's slice if a filter is active) as either:

* **JSON** — the canonical format. Re-importable, lossless.
* **Markdown** — a human-readable summary for sharing or archiving.

Use it for backups, sharing knowledge with another founder you trust, or migrating between environments.

***

## Import

This is where the vault stops being a viewer and starts being a force multiplier.

Click **Import**, paste a JSON payload (the same shape you get from Export), pick a **Mode**, and optionally **remap to a target app**.

### Mode

* **Pending** *(recommended default)* — every imported fact lands with `status='pending'`. The agent **completely ignores pending facts** until you open each one in the vault and click *"Approve — let the agent use this"*. This is the safe option: even a malicious or careless file can't influence the next run without you OK'ing it row by row.
* **Active** — apply the import immediately. Use this only for trusted backups you exported yourself.

### Remap to a target app

Pick a specific app and **every per-app fact and episode in the file is rewritten to that app**. This is what makes seeding possible:

* Spin up a new app and import the memory pack from your existing one in one click.
* Build a domain-specific pack ("photo-editor app ASO learnings") once and reuse it across every app in that category.
* Recover a corrupted vault from a backup.

### Built-in safety rails

Every import is wrapped in:

* **Schema validation** — every row is checked (key length, value length, kind whitelist, app id presence). One bad row aborts the whole import; you never end up with a partial write.
* **Owner enforcement** — the file's claimed `owner_email` is ignored. Imports always land under the calling user's account.
* **Confidence demotion** — imported facts are tagged with 50% confidence, sitting between agent guesses (40%) and your hand-typed facts (100%). Even an active import can't silently override knowledge you confirmed yourself.
* **Batch tracking** — every import gets a unique batch id stamped on every row. The success banner shows the id and a one-click **Undo this import** button.
* **Hard cap** of 5,000 rows per request.

### Undo

Every import is fully reversible:

* Facts that **overwrote** a previous value have that value restored from the snapshot the importer took.
* Facts that were **freshly inserted** by this import are deleted outright.
* Episodes from this import are deleted.

You can undo any time from the import dialog right after the import (one click), or via the API by `DELETE /cofounder/memory/import/<batchId>`.

***

## Example import pack

Here's a starter pack you can paste into the import dialog to test the flow. Set Mode to **Pending** and either Remap to a specific app or remove the `episodes` block (the seed `app_id` placeholder isn't a real id).

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "version": 1,
  "facts": [
    { "key": "brand_voice",          "value": "Minimal, premium, technical. No exclamation marks.",                                            "kind": "preference",   "importance": 0.85 },
    { "key": "target_audience",      "value": "Indie iOS developers 25–34, EN/DE/FR/TR markets.",                                              "kind": "observation",  "importance": 0.75 },
    { "key": "never_localize_to",    "value": "ja, ko, zh — we don't have CJK support in the UI yet.",                                          "kind": "anti_pattern", "importance": 0.95 },
    { "key": "pricing_locked",       "value": "Do not propose changing the $9.99/mo subscription tier.",                                       "kind": "constraint",   "importance": 0.9  },
    { "key": "tr_localization_works","value": "TR localization on similar apps consistently lifted non-US downloads by ~22% in 14 days.",      "kind": "observation",  "importance": 0.8  }
  ]
}
```

After importing, open each amber pending node, read the value, and click **Approve** to let the agent start using it. From the next run on, anti-patterns will appear at the top of the prompt under **HARD STOPS — never propose these**.

***

## How vault edits affect runs

Any change in the vault takes effect on the **next run** — there's no manual sync.

* Adding a fact → it's eligible for prompt injection on the next run.
* Approving a pending fact → same as above.
* Superseding a fact → the agent stops seeing it on the next run.
* Importing → pending rows are inert until approved; active rows participate immediately.
* Undoing an import → instant; the next run sees the original state.

If you want the agent to act on a vault change *right now*, trigger a manual run from `Co-founder → Runs → Run now`.
