@aeondave/pi-persona-mind 0.9.1 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,145 +1,169 @@
1
- <h1 align="center">pi-persona-mind</h1>
2
-
3
- <p align="center">
4
- <img src="https://raw.githubusercontent.com/AeonDave/pi-persona-mind/v0.9.1/assets/banner.png" alt="pi-persona-mind — durable memory for Pi">
5
- </p>
6
-
7
- [![CI](https://github.com/AeonDave/pi-persona-mind/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AeonDave/pi-persona-mind/actions/workflows/test.yml)
8
- [![npm version](https://img.shields.io/npm/v/@aeondave/pi-persona-mind?logo=npm)](https://www.npmjs.com/package/@aeondave/pi-persona-mind)
9
- [![License](https://img.shields.io/github/license/AeonDave/pi-persona-mind)](LICENSE)
10
-
11
- **Local, scoped memory for Pi.** Keep useful project decisions, persona preferences, session notes
12
- and deferred work without turning every conversation into permanent memory.
13
- Mind complements Pi's native conversation history and compaction; it does not replace them.
14
-
15
- | What you need | What Mind provides |
16
- |---|---|
17
- | Continue a long project | Durable repository decisions, scoped preferences and session notes that survive compaction |
18
- | Keep context focused | Bounded retrieval by words, tags and paths, with explicit full-record reads |
19
- | See what the agent remembers | **F10**: saved facts, prepared context and an active-branch timeline |
20
- | Maintain a growing archive | Bounded consolidation, evidence-grounded review, change history and guarded undo |
21
-
22
- Memory is stored in local files and Pi's native session history. Recall and browsing need no model
23
- call. [Automatic consolidation](#quiet-automatic-maintenance) is on by default; it and explicit
24
- knowledge reviews use the current session model and incur model usage.
25
-
26
- ## Quick start
27
-
28
- Mind 0.9.1 requires **Pi 1.5.2**, **Node.js 22.19.0+**, and
29
- [**pi-persona 1.18.1+**](https://github.com/AeonDave/pi-persona) loaded in the same instance.
30
-
31
- ```bash
32
- pi install npm:@aeondave/pi-persona
33
- pi install npm:@aeondave/pi-persona-mind
34
- ```
35
-
36
- For existing installations, use `pi update npm:@aeondave/pi-persona` and
37
- `pi update npm:@aeondave/pi-persona-mind`. Restart Pi or run **`/reload`** after installing or
38
- updating; `/persona reload` alone does not reload extension code. Keep only one installation source
39
- per extension and remove the old source before switching between npm and Git.
40
-
41
- Mind needs a **compatible, running Persona**, not just an installed package or settings file.
42
- Without that companion and its current session owner, memory operations and background activity stay
43
- inactive. See [host and companion integration](docs/DESIGN.md#scope-and-companion-integration).
44
-
45
- Try asking your agent:
46
-
47
- - “Save this as a durable project decision: schema changes require a migration.”
48
- - “Keep this constraint only for the current session.”
49
- - “Remember this preference across projects for this persona.”
50
- - “Put the blocked migration in the backlog and remind me tomorrow.”
51
- - “Recall the decision about retries and show the complete saved record.”
52
-
53
- Press **F10** to inspect what Mind has saved and prepared. Use **`/mind`** for a snapshot,
54
- **`/mind help`** for commands and **`/mind doctor`** for effective settings and storage warnings.
55
-
56
- ## Memory that fits the work
57
-
58
- Choose the lifetime and scope that match your intent:
59
-
60
- | Memory | Where it belongs | Lifetime |
61
- |---|---|---|
62
- | Session notes | The active native session branch | Survive compaction and persisted resume; stay out of new sessions and workers |
63
- | Project working memory | Temporary repository context | 48 hours by default |
64
- | Durable project memory | Repository decisions | Until changed or forgotten |
65
- | Persona memory | One persona across projects | Until changed or forgotten |
66
- | Shared memory | Deliberately shared across personas | Until changed or forgotten |
67
- | Backlog | Deferred project work and reminders | 48 hours by default; later reminders extend expiry |
68
-
69
- The agent chooses scope from your intent; durable saves require an explicit `project`, `persona`
70
- or `shared` destination. Strong direct-user cues may be captured automatically, but
71
- **automatic capture creates provisional session notes only**, even for “remember” or “from now on”.
72
- Broader retention requires a separate deliberate `memory` call with an explicit durable scope.
73
-
74
- Reminders notify you while Pi is open; they do not wake the model. Delegated workers receive a lean
75
- memory selection, without session notes or memory/backlog write tools. Home-directory sessions skip
76
- project injection and reminders. See [lifetimes and scope](docs/DESIGN.md#four-lifetimes) and
77
- [session notes](docs/DESIGN.md#session-notes) for persistence, branch-local forgetting and expiry.
78
-
79
- ## Retrieval and inspection
80
-
81
- Mind selects relevant excerpts each turn within one shared context budget. Words, tags and paths
82
- drive retrieval; lexical matching can miss paraphrases or conflicting facts. Use `memory recall`
83
- to search and `memory read` to inspect a complete record. The budget is an estimate, not a billing counter.
84
-
85
- **F10** toggles the read-only inspector in the interactive TUI:
86
-
87
- - **Memories** browses scoped facts, full text, dates, tags and available recording provenance.
88
- - **Context** shows the last block prepared by Mind, including omissions—not the final provider payload.
89
- - **Timeline** shows bounded user/assistant text and session-note events on the active branch.
90
-
91
- Open a record for detail and press **s** for its recording source, when available. Recording provenance
92
- shows how a fact was saved; it does not verify the assertion. Timeline and source lookup cover a
93
- bounded active-branch window.
94
-
95
- In Memories, **a** opens maintenance actions; `/mind browse`, `/mind browse context` and `/mind timeline`
96
- are command alternatives. Browsing alone is read-only and makes no model calls.
97
-
98
- F10 shares Persona's F9 window frame and theme. **PageUp/PageDown** follow visible rows, narrow
99
- windows keep the selection visible, and **?** opens help. See the
100
- [inspector design](docs/DESIGN.md#read-only-memory-inspector) for navigation, sources and coverage.
101
-
102
- ## Maintain knowledge deliberately
103
-
104
- **Consolidation** merges compatible saved facts and applies validated changes. `/mind optimize`
105
- reviews one bounded window per allowed project/persona tier; `/mind optimize project-long` selects
106
- durable project memory alone. Inspect changes with `/mind optimize history`; `/mind optimize undo`
107
- restores affected facts only when its conflict checks pass. This reorganizes saved knowledge; it does
108
- not verify it against your repository. [Consolidation and undo details →](docs/DESIGN.md#explicit-consolidation)
109
-
110
- **Knowledge review** runs in the interactive terminal and checks selected facts against repository
111
- files you choose and bounded active-branch user-role text. Repository evidence requires project trust.
112
- The worker proposes corrections, conflicts, insufficient-evidence findings or retirement
113
- recommendations for your review.
114
-
115
- 1. Choose **F10 → Memories → a**, or run `/mind review project-long` (also `project` or `persona`).
116
- 2. Select evidence and confirm the model call. Inspect the proposal with `/mind review show`.
117
- 3. Use `/mind review apply` to separately approve corrections, or `/mind review discard` to discard them.
118
- Application rechecks evidence and memory freshness. Retirement is a recommendation; forgetting a
119
- fact is a separate deliberate action.
120
-
121
- Both workflows use a **visible Persona-hosted Mind worker on the current session model** and incur
122
- model usage. Choose a model with `/model` before starting. New input or model, branch, session and
123
- owner changes invalidate pending review work. Shared memory and session notes are excluded from
124
- these model-driven mutations. Reviews and undo history are bounded; a reviewed window is not a
125
- whole-archive audit or a guarantee of truth.
126
-
127
- ### Quiet automatic maintenance
128
-
129
- Automatic consolidation is on by default. After eligible saves, it waits for the foreground to become
130
- idle and respects usage, cooldown and ownership limits. A real worker is visible in Persona;
131
- successful changes produce one small **mind** notification, while routine no-ops stay quiet.
132
- Failures and important warnings remain visible, and applied changes retain history for guarded undo.
133
-
134
- Use `/mind optimize auto status`, `/mind optimize auto off` or `/mind optimize auto on` for the current
135
- session. `PI_PERSONA_MIND_OPTIMIZE=off` disables automatic optimization at startup. Capture can be set
136
- with `PI_PERSONA_MIND_CAPTURE=auto|prompt|off`, and `PI_PERSONA_MIND_NUDGE=off` disables suggestions.
137
- See [automatic review](docs/DESIGN.md#automatic-semantic-review) for admission and cost details.
138
-
139
- ## Learn more
140
-
141
- - [Design: lifetimes, storage, limits, commands and safeguards](docs/DESIGN.md)
142
- - [Evidence-grounded review and approval](docs/DESIGN.md#evidence-grounded-knowledge-review)
143
- - [Storage recovery and concurrent writes](docs/DESIGN.md#durable-files-and-recovery)
144
- - [Architecture decisions and evaluation boundaries](docs/MEMORY-RESEARCH.md)
145
- - [Release history](CHANGELOG.md) · [MIT license](LICENSE)
1
+ <h1 align="center">pi-persona-mind</h1>
2
+
3
+ <p align="center">
4
+ <img src="https://raw.githubusercontent.com/AeonDave/pi-persona-mind/v0.9.3/assets/banner.png" alt="pi-persona-mind — durable memory for Pi">
5
+ </p>
6
+
7
+ [![CI](https://github.com/AeonDave/pi-persona-mind/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AeonDave/pi-persona-mind/actions/workflows/test.yml)
8
+ [![npm version](https://img.shields.io/npm/v/@aeondave/pi-persona-mind?logo=npm)](https://www.npmjs.com/package/@aeondave/pi-persona-mind)
9
+ [![License](https://img.shields.io/github/license/AeonDave/pi-persona-mind)](LICENSE)
10
+
11
+ **Local, scoped memory for Pi.** Keep useful project decisions, persona preferences, session notes
12
+ and deferred work without turning every conversation into permanent memory.
13
+ Mind complements Pi's native conversation history and compaction; it does not replace them.
14
+
15
+ ## Features
16
+
17
+ | What you need | What Mind provides |
18
+ |---|---|
19
+ | Continue a long project | Durable repository decisions, session notes and explicit handoffs for the next session |
20
+ | Keep context focused | Bounded retrieval by words, code identifiers, tags and paths, with explicit full-record reads |
21
+ | See what the agent remembers | **F10**: saved facts, prepared context and an active-branch timeline |
22
+ | Maintain a growing archive | Bounded consolidation, evidence-grounded review, change history and guarded undo |
23
+ | Understand a changed decision | Retained before/after records for explicit replacements, kept out of active recall |
24
+
25
+ Memory is stored in local files and Pi's native session history. Recall and browsing need no model
26
+ call. [Automatic consolidation](#quiet-automatic-maintenance) is on by default; it and explicit
27
+ knowledge reviews use the current session model and incur model usage.
28
+
29
+ ## Quick start
30
+
31
+ Mind 0.9.3 requires **Pi 1.6.0**, **Node.js 22.19.0+**, and
32
+ [**pi-persona 1.18.1+**](https://github.com/AeonDave/pi-persona) loaded in the same instance.
33
+
34
+ ```bash
35
+ pi install npm:@aeondave/pi-persona
36
+ pi install npm:@aeondave/pi-persona-mind
37
+ ```
38
+
39
+ For existing installations, use `pi update npm:@aeondave/pi-persona` and
40
+ `pi update npm:@aeondave/pi-persona-mind`. Restart Pi or run **`/reload`** after installing or
41
+ updating; `/persona reload` alone does not reload extension code. Keep only one installation source
42
+ per extension and remove the old source before switching between npm and Git.
43
+
44
+ Mind needs a **compatible, running Persona**, not just an installed package or settings file.
45
+ Without that companion and its current session owner, memory operations and background activity stay
46
+ inactive. See [host and companion integration](docs/DESIGN.md#scope-and-companion-integration).
47
+
48
+ Try asking your agent:
49
+
50
+ - “Save this as a durable project decision: schema changes require a migration.”
51
+ - “Keep this constraint only for the current session.”
52
+ - “Remember this preference across projects for this persona.”
53
+ - “Put the blocked migration in the backlog and remind me tomorrow.”
54
+ - “Recall the decision about retries and show the complete saved record.”
55
+ - “Save a handoff with the goal, completed work, remaining work, next step and references.”
56
+
57
+ Press **F10** to inspect what Mind has saved and prepared. Use **`/mind`** for a snapshot,
58
+ **`/mind help`** for commands and **`/mind doctor`** for effective settings and storage warnings.
59
+
60
+ ## Memory that fits the work
61
+
62
+ Choose the lifetime and scope that match your intent:
63
+
64
+ | Memory | Where it belongs | Lifetime |
65
+ |---|---|---|
66
+ | Session notes | The active native session branch | Survive compaction and persisted resume; stay out of new sessions and workers |
67
+ | Project working memory | Temporary repository context | 48 hours by default |
68
+ | Durable project memory | Repository decisions | Until changed or forgotten |
69
+ | Persona memory | One persona across projects | Until changed or forgotten |
70
+ | Shared memory | Deliberately shared across personas | Until changed or forgotten |
71
+ | Backlog | Deferred project work and reminders | 48 hours by default; later reminders extend expiry |
72
+
73
+ The agent chooses scope from your intent; durable saves require an explicit `project`, `persona`
74
+ or `shared` destination. Strong direct-user cues may be captured automatically, but
75
+ **automatic capture creates provisional session notes only**, even for “remember” or “from now on”.
76
+ Broader retention requires a separate deliberate `memory` call with an explicit durable scope.
77
+
78
+ Reminders notify you while Pi is open; they do not wake the model. Delegated workers receive a lean
79
+ memory selection, without session notes or memory/backlog write tools. Home-directory sessions skip
80
+ project injection and reminders. See [lifetimes and scope](docs/DESIGN.md#four-lifetimes) and
81
+ [session notes](docs/DESIGN.md#session-notes) for persistence, branch-local forgetting and expiry.
82
+
83
+ ## Retrieval and inspection
84
+
85
+ Mind selects relevant excerpts each turn within one shared context budget. Exact words and paths
86
+ receive more weight than matches across code identifiers (`HTTPResponseParser` → “HTTP response parser”)
87
+ and vowel accents (`café` → “cafe”). Unicode text remains searchable. This is lexical retrieval;
88
+ it can miss paraphrases or conflicting facts. Use `memory recall`
89
+ to search and `memory read` to inspect a complete record. The budget is an estimate, not a billing counter.
90
+
91
+ **F10** toggles the read-only inspector in the interactive TUI:
92
+
93
+ - **Memories** browses scoped facts, full text, dates, tags and available recording provenance.
94
+ - **Context** shows the last block prepared by Mind, including omissions—not the final provider payload.
95
+ - **Timeline** shows bounded user/assistant text and session-note events on the active branch.
96
+
97
+ Open a record for detail and press **s** for its recording source, when available. Recording provenance
98
+ shows how a fact was saved; it does not verify the assertion. Timeline and source lookup cover a
99
+ bounded active-branch window.
100
+
101
+ In Memories, **a** opens maintenance actions; `/mind browse`, `/mind browse context` and `/mind timeline`
102
+ are command alternatives. Browsing alone is read-only and makes no model calls.
103
+
104
+ F10 shares Persona's F9 window frame and theme. **PageUp/PageDown** follow visible rows, narrow
105
+ windows keep the selection visible, and **?** opens help. See the
106
+ [inspector design](docs/DESIGN.md#read-only-memory-inspector) for navigation, sources and coverage.
107
+
108
+ ## Maintain knowledge deliberately
109
+
110
+ **Decision history** keeps the previous fact when an explicit replacement retires it. Use
111
+ `/mind history project-long` to find a receipt and `/mind history show <receiptId> project-long`
112
+ to inspect its before/after records. Old facts stay out of active recall and injected context.
113
+ History is bounded; ordinary replacements are inspectable, while guarded undo applies to consolidation.
114
+ [History and retention →](docs/DESIGN.md#replacement-history)
115
+
116
+ **Consolidation** merges compatible saved facts and applies validated changes. `/mind optimize`
117
+ reviews one bounded window per allowed project/persona tier; `/mind optimize project-long` selects
118
+ durable project memory alone. Inspect changes with `/mind optimize history`; `/mind optimize undo`
119
+ restores affected facts only when its conflict checks pass. This reorganizes saved knowledge; it does
120
+ not verify it against your repository. [Consolidation and undo details →](docs/DESIGN.md#explicit-consolidation)
121
+
122
+ **Knowledge review** runs in the interactive terminal and checks selected facts against repository
123
+ files you choose and bounded active-branch user-role text. Repository evidence requires project trust.
124
+ The worker proposes corrections, conflicts, insufficient-evidence findings or retirement
125
+ recommendations for your review.
126
+
127
+ 1. Choose **F10 → Memories → a**, or run `/mind review project-long` (also `project` or `persona`).
128
+ 2. Select evidence and confirm the model call. Inspect the proposal with `/mind review show`.
129
+ 3. Use `/mind review apply` to separately approve corrections, or `/mind review discard` to discard them.
130
+ Application rechecks evidence and memory freshness. Retirement is a recommendation; forgetting a
131
+ fact is a separate deliberate action.
132
+
133
+ Both workflows use a **visible Persona-hosted Mind worker on the current session model** and incur
134
+ model usage. Choose a model with `/model` before starting. New input or model, branch, session and
135
+ owner changes invalidate pending review work. Shared memory and session notes are excluded from
136
+ these model-driven mutations. Reviews and undo history are bounded; a reviewed window is not a
137
+ whole-archive audit or a guarantee of truth.
138
+
139
+ ### Quiet automatic maintenance
140
+
141
+ Automatic consolidation is on by default. After eligible saves, it waits for the foreground to become
142
+ idle and respects usage, cooldown and ownership limits. A real worker is visible in Persona;
143
+ successful changes produce one small **mind** notification, while routine no-ops stay quiet.
144
+ Failures and important warnings remain visible, and applied changes retain history for guarded undo.
145
+
146
+ Use `/mind optimize auto status`, `/mind optimize auto off` or `/mind optimize auto on` for the current
147
+ session. `PI_PERSONA_MIND_OPTIMIZE=off` disables automatic optimization at startup. Capture can be set
148
+ with `PI_PERSONA_MIND_CAPTURE=auto|prompt|off`, and `PI_PERSONA_MIND_NUDGE=off` disables suggestions.
149
+ See [automatic review](docs/DESIGN.md#automatic-semantic-review) for admission and cost details.
150
+
151
+ ## Hand off a long task
152
+
153
+ Ask the agent to save a handoff before switching sessions. It records the goal, completed work,
154
+ pending work, next step and references, together with the originating session and branch.
155
+ In a new session with the same project and persona, use **`/mind handoff list`** and
156
+ **`/mind handoff show <id>`** to consult it.
157
+
158
+ A handoff is an explicit work snapshot, not proof that a task is complete. It is never injected or
159
+ executed automatically. Completion requires a resolution; forgetting is explicit. Up to 32 handoffs
160
+ share a bounded project file, with no automatic expiry or eviction.
161
+ [Commands, ownership and limits →](docs/DESIGN.md#cross-session-handoffs)
162
+
163
+ ## Learn more
164
+
165
+ - [Design: lifetimes, storage, limits, commands and safeguards](docs/DESIGN.md)
166
+ - [Evidence-grounded review and approval](docs/DESIGN.md#evidence-grounded-knowledge-review)
167
+ - [Storage recovery and concurrent writes](docs/DESIGN.md#durable-files-and-recovery)
168
+ - [Architecture decisions and evaluation boundaries](docs/MEMORY-RESEARCH.md)
169
+ - [Release history](CHANGELOG.md) · [MIT license](LICENSE)