@lebronj/pi-suite 0.1.16 → 0.1.18

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.
Files changed (29) hide show
  1. package/README.md +13 -4
  2. package/extensions/goal-mode.ts +261 -33
  3. package/package.json +1 -1
  4. package/skills/pi-skill/SKILL.md +32 -7
  5. package/vendor/pi-memory/README.md +87 -56
  6. package/vendor/pi-memory/index.ts +522 -310
  7. package/vendor/pi-memory/package.json +1 -1
  8. package/vendor/pi-memory/src/cli.ts +56 -32
  9. package/vendor/pi-memory/src/evolution/config.ts +8 -2
  10. package/vendor/pi-memory/src/governance/share-candidates.ts +72 -0
  11. package/vendor/pi-memory/src/index.ts +68 -25
  12. package/vendor/pi-memory/src/learning/review-compact.ts +36 -0
  13. package/vendor/pi-memory/src/learning/review-summary.ts +81 -0
  14. package/vendor/pi-memory/src/manager/local-curator-manager.ts +146 -0
  15. package/vendor/pi-memory/src/paths/resolve-roots.ts +155 -0
  16. package/vendor/pi-memory/src/profile/generator.ts +45 -0
  17. package/vendor/pi-memory/src/service-controller.ts +156 -84
  18. package/vendor/pi-memory/src/skills/lifecycle.ts +205 -0
  19. package/vendor/pi-memory/src/sync/connector.ts +146 -0
  20. package/vendor/pi-memory/src/sync/downflow.ts +54 -0
  21. package/vendor/pi-memory/src/sync/feedback.ts +30 -0
  22. package/vendor/pi-memory/src/sync/queue.ts +40 -0
  23. package/vendor/pi-memory/src/sync/schemas.ts +44 -0
  24. package/vendor/pi-memory/src/sync/sensitivity.ts +18 -0
  25. package/vendor/pi-memory/test/manager-service.test.ts +17 -0
  26. package/vendor/pi-memory/test/resolve-roots.test.ts +63 -0
  27. package/vendor/pi-memory/test/review-summary.test.ts +36 -0
  28. package/vendor/pi-memory/test/skill-lifecycle.test.ts +75 -0
  29. package/vendor/pi-memory/test/sync-local-loop.test.ts +101 -0
@@ -27,7 +27,9 @@ When adding, removing, renaming, or materially changing any pi capability in thi
27
27
 
28
28
  Installed memory capability comes from `@jhp/pi-memory`, vendored inside `@lebronj/pi-suite` and also usable as a standalone pi package.
29
29
 
30
- Memory files live under `~/.pi/agent/memory/`:
30
+ Memory files live under the resolved memory root. Standalone fallback is `~/.pi/agent/memory`; Multica-connected runs can resolve to `~/multica_workspaces/<workspace_id>/.pi/agents/<agent_id>/memory` with skill drafts under that agent's `skills/drafts`.
31
+
32
+ Memory files include:
31
33
 
32
34
  - `MEMORY.md`: durable facts, decisions, and preferences.
33
35
  - `USER.md`: structured user profile and stable preferences.
@@ -38,7 +40,8 @@ Memory files live under `~/.pi/agent/memory/`:
38
40
  - `.curator-state.json`: last curator run state.
39
41
  - `.curator-service.json`: external curator service state.
40
42
  - `audit/curator.jsonl`: curator audit trail.
41
- - `~/.pi/agent/skill-drafts/<slug>/SKILL.md`: disabled skill drafts created after explicit approval.
43
+ - Resolved skill draft root `<slug>/SKILL.md`: disabled skill drafts created after explicit approval.
44
+ - Multica agent roots also contain `inbox/`, `shared-cache/`, `skills/generated/`, `profile/`, `feedback/feedback.jsonl`, and `sync_queue/`.
42
45
 
43
46
  Memory tools:
44
47
 
@@ -47,10 +50,15 @@ Memory tools:
47
50
  - `memory_edit`: read/add/replace/remove/replace_all/compact structured entries in `MEMORY.md`, `USER.md`, `STATE.md`, and `REVIEW.md`.
48
51
  - `scratchpad`: add/done/undo/clear/list checklist items.
49
52
  - `memory_search`: qmd-backed keyword, semantic, or deep search across memory files.
50
- - `memory_curate`: manually run curator lifecycle rules and scan yesterday's daily log into `REVIEW.md` when learning is enabled.
53
+ - `memory_curate`: manually run curator lifecycle rules and scan yesterday's daily log into `REVIEW.md` when learning is enabled; output includes pending proposal counts.
51
54
  - `memory_learning_approve`: approve a proposed memory promotion or disabled skill draft by exact id.
52
55
  - `memory_learning_reject`: reject or archive a review candidate/proposal without deleting it.
53
56
  - `memory_skill_drafts`: list proposed skill drafts.
57
+ - `memory_skill_list`: list current-agent draft, generated, and enabled memory-managed skills.
58
+ - `memory_skill_enable`: explicitly enable a `draft:<slug>` or `generated:<id>` skill by copying it into `skills/enabled/<skill-name>/` and auditing the action.
59
+ - `memory_skill_disable`: remove an enabled skill copy while preserving its draft/generated source.
60
+ - `/memory-skill`: slash command to list/enable/disable current-agent memory-managed skills.
61
+ - `/memory-review`: slash command to list/show/approve/reject/archive pending memory and skill proposals in the current resolved root.
54
62
  - `memory_curator_enable`: enable the external daily curator service using systemd user timer or cron fallback.
55
63
  - `memory_curator_disable`: disable and uninstall the external daily curator service.
56
64
  - `memory_curator_status`: show service backend, schedule, and state.
@@ -59,6 +67,11 @@ Memory tools:
59
67
  - `memory_version_list`: list recent snapshots.
60
68
  - `memory_version_restore`: restore `memory`, `skill-drafts`, or `all` from a snapshot id after creating a pre-restore backup.
61
69
  - `memory_version_push`: manually push the local evolution repo to GitHub.
70
+ - `memory_sync_upload` / `/memory-sync-upload`: upload governed candidates, profiles, and feedback to Multica when remote config is set.
71
+ - `memory_sync_pull` / `/memory-sync-pull`: pull only current-agent deliveries into local inbox/cache/generated-skill directories.
72
+ - `memory_feedback`: append injected/used/ignored/success/failure/conflict feedback for a shared unit.
73
+ - `memory_curator_manager_mark_dirty` and `memory_curator_manager_scan` / `/memory-curator-manager-scan`: register dirty roots and process them through the singleton Local Curator Manager.
74
+ - `memory_curator_manager_enable`, `memory_curator_manager_status`, `memory_curator_manager_disable` and `/memory-curator-manager-*` commands: manage the singleton manager service; default schedule is every 6 hours and it only processes dirty roots.
62
75
 
63
76
  Structured metadata example:
64
77
 
@@ -77,12 +90,17 @@ Curator and learning behavior:
77
90
  - Session shutdown may extract conservative learning candidates into `REVIEW.md`; they are not injected as normal memory and are not auto-enabled.
78
91
  - `memory_curate` scans yesterday's daily log once per content hash into review candidates, then curator lifecycle and proposal rules process those candidates.
79
92
  - Repeated candidates can become proposed memory promotions or proposed disabled skill drafts after `memory_curate`.
80
- - Approval is explicit by default: memory proposals write to memory stores; skill proposals write disabled drafts under `~/.pi/agent/skill-drafts/`.
93
+ - Approval is explicit by default: memory proposals write to memory stores; skill proposals write disabled drafts under the resolved skill draft root.
94
+ - Draft and generated skills stay disabled until `memory_skill_enable` copies them into `skills/enabled`; enabled skills are injected as `<available_skills>` metadata for the current agent.
95
+ - Pi session start can show one pending-review hint; disable with `PI_MEMORY_REVIEW_STARTUP_HINT=0`.
96
+ - Local multi-agent self-evolution supports one Local Curator Manager registry/dirty-root API for many agent roots, plus a manager service that runs `manager-scan` every 6 hours and exits quickly when no root is dirty.
97
+ - The local loop also covers share candidate queue, profile generation, sync upload/pull, downflow receive cache, generated skills, enabled skill lifecycle, and feedback JSONL helpers.
98
+ - Server downflow is per-Agent delivery, not broadcast; local receive writes only `inbox/`, `shared-cache/`, or `skills/generated/` and never overwrites formal memory or auto-enables skills.
81
99
  - The curator avoids semantic auto-delete/merge; ambiguous learning stays in review first.
82
100
 
83
101
  Memory versioning:
84
102
 
85
- - Runtime memory remains authoritative at `~/.pi/agent/memory`; disabled skill drafts remain authoritative at `~/.pi/agent/skill-drafts`.
103
+ - Runtime memory remains authoritative at the resolved memory root; disabled skill drafts remain authoritative at the resolved skill draft root.
86
104
  - Versioning mirror and snapshots live at `~/.pi/agent/evolution` by default.
87
105
  - No remote is configured by default; memory evolution stays local per user/machine unless the user adds a personal private remote.
88
106
  - Automatic local snapshot + commit is enabled by default; automatic push is disabled unless `PI_EVOLUTION_AUTO_PUSH=1`.
@@ -114,6 +132,10 @@ QMD search:
114
132
  Useful memory environment variables:
115
133
 
116
134
  - `PI_MEMORY_DIR`: override memory storage directory.
135
+ - `PI_SKILL_DRAFTS_DIR`: override disabled skill draft root.
136
+ - `PI_AGENT_ROOT`: current local agent root; derives memory, skill drafts, inbox, shared cache, profile, feedback, and sync queue.
137
+ - `MULTICA_WORKSPACE_ID`, `MULTICA_AGENT_ID`, `MULTICA_WORKSPACES_ROOT`, `MULTICA_RUN_ID`: Multica scoped root and feedback context.
138
+ - `PI_AGENT_INBOX_DIR`, `PI_AGENT_SHARED_CACHE_DIR`, `PI_AGENT_PROFILE_DIR`, `PI_AGENT_FEEDBACK_DIR`, `PI_AGENT_SYNC_QUEUE_DIR`: override agent subdirectories.
117
139
  - `PI_MEMORY_SNAPSHOT`: `stable` or `per-turn` context injection mode.
118
140
  - `PI_MEMORY_QMD_UPDATE`: `background`, `manual`, or `off`.
119
141
  - `PI_MEMORY_NO_SEARCH=1`: disable per-turn search injection.
@@ -123,6 +145,8 @@ Useful memory environment variables:
123
145
  - `PI_MEMORY_AUTO_APPROVE_MEMORY=1`: automatically approve newly created memory proposals.
124
146
  - `PI_MEMORY_AUTO_APPROVE_SKILL_DRAFTS=1`: automatically create newly proposed disabled skill drafts.
125
147
  - `PI_MEMORY_CURATOR_STARTUP_HINT=0`: hide the disabled-curator startup hint.
148
+ - `PI_MEMORY_REVIEW_STARTUP_HINT=0`: hide pending review proposal startup hints.
149
+ - `PI_MEMORY_REMOTE_URL` and `PI_MEMORY_REMOTE_TOKEN`: enable Multica candidate/profile/feedback upload and current-agent delivery pull.
126
150
  - `PI_EVOLUTION_ENABLED=0`: disable snapshot + git versioning.
127
151
  - `PI_EVOLUTION_DIR`: override evolution repo directory; default `~/.pi/agent/evolution`.
128
152
  - `PI_EVOLUTION_REMOTE`: optional personal private Git remote; unset by default.
@@ -190,9 +214,10 @@ Autogoal is provided by `autogoal.ts`.
190
214
  Goal mode is provided by `goal-mode.ts`.
191
215
 
192
216
  - Start with `/goal <objective>`.
193
- - It injects hidden goal context, enables the `goal` tool, and auto-continues until the objective is complete, paused, dropped, blocked, or interrupted.
217
+ - It injects hidden goal context, enables the `goal` tool, and auto-continues until the objective is complete, paused, dropped, budget-limited, or interrupted.
218
+ - It tracks assistant token usage and elapsed time, supports `/goal budget <tokens|off>`, and treats budget exhaustion as not completion.
194
219
  - The agent must verify current files/checks before calling `goal({ op: "complete" })`.
195
- - Useful commands: `/goal show`, `/goal pause`, `/goal resume`, `/goal drop`, `/goal auto on`, `/goal auto off`.
220
+ - Useful commands: `/goal show`, `/goal pause`, `/goal resume`, `/goal drop`, `/goal budget <tokens|off>`, `/goal auto on`, `/goal auto off`.
196
221
 
197
222
  ## Pet Companion
198
223
 
@@ -4,15 +4,15 @@ Structured, time-aware memory extension for pi. It stores memory as plain Markdo
4
4
 
5
5
  ## Features
6
6
 
7
- - Plain Markdown storage under `~/.pi/agent/memory`.
7
+ - Plain Markdown storage under resolved memory roots: standalone `~/.pi/agent/memory`, explicit `PI_MEMORY_DIR`, or Multica `~/multica_workspaces/<workspace>/.pi/agents/<agent>/memory`.
8
8
  - Unified tools for memory write/read/edit/search and scratchpad management.
9
9
  - Structured `USER.md`, `STATE.md`, and `REVIEW.md` entries with metadata.
10
10
  - Optional qmd-powered keyword, semantic, and deep search.
11
11
  - KV cache-stable context injection by default.
12
12
  - Curator core for exact dedupe, event lifecycle updates, temporary review, quota reset, and audit logs.
13
- - Review-first learning candidates that can become memory promotions or disabled skill drafts after approval.
13
+ - Review-first learning candidates that can become memory promotions or disabled skill drafts after approval, with `/memory-review` pending reminders.
14
+ - Local multi-agent self-evolution layout for Multica: scoped memory/skill roots, `sync_queue/`, `inbox/`, `shared-cache/`, `profile/`, and `feedback/`.
14
15
  - Optional external curator service via systemd user timer or cron so curation can run even when pi is closed.
15
- - Snapshot + git versioning for `memory/` and disabled `skill-drafts/`, with restore support.
16
16
 
17
17
  ## Installation
18
18
 
@@ -39,22 +39,26 @@ The extension auto-creates the `pi-memory` qmd collection and path contexts on s
39
39
  ## File Layout
40
40
 
41
41
  ```text
42
+ # Standalone fallback
42
43
  ~/.pi/agent/memory/
43
- MEMORY.md # Durable facts, decisions, and preferences
44
- USER.md # Structured user profile and stable preferences
45
- STATE.md # Current dated state, events, temporary facts, quotas
46
- REVIEW.md # Review queue for stale or merge-candidate memories
47
- SCRATCHPAD.md # Checklist of open items
48
- .curator-state.json # Last curator run state
49
- audit/curator.jsonl # Curator audit trail
50
- daily/YYYY-MM-DD.md # Daily append-only logs
51
44
  ~/.pi/agent/skill-drafts/
52
- <slug>/SKILL.md # Disabled skill drafts created after approval
53
- ~/.pi/agent/evolution/
54
- memory/ # Current memory mirror
55
- skill-drafts/ # Current skill draft mirror
56
- snapshots/<id>/ # Point-in-time backup with manifest.json
57
- manifests/<id>.json # Snapshot manifest index
45
+
46
+ # Multica-connected scoped root
47
+ ~/multica_workspaces/<workspace_id>/.pi/agents/<agent_id>/
48
+ memory/
49
+ MEMORY.md USER.md STATE.md REVIEW.md SCRATCHPAD.md
50
+ .curator-state.json
51
+ audit/curator.jsonl
52
+ daily/YYYY-MM-DD.md
53
+ skills/
54
+ drafts/<slug>/SKILL.md # Disabled skill drafts created after approval
55
+ generated/ # Downflow skill deliveries, not auto-enabled
56
+ enabled/ # Reserved for explicit enablement
57
+ inbox/memory/ inbox/skills/ # Raw downflow deliveries for this agent only
58
+ shared-cache/memory/ shared-cache/skills/
59
+ profile/user-profile.md agent-profile.md task-profile.md capability-profile.md
60
+ feedback/feedback.jsonl
61
+ sync_queue/memory-candidates.jsonl skill-candidates.jsonl
58
62
  ```
59
63
 
60
64
  Structured entries are separated by `§` and may start with metadata:
@@ -88,14 +92,22 @@ Metadata keys currently supported by tools and curator rules:
88
92
  | `memory_learning_approve` | Approve one proposed memory or skill promotion by exact id |
89
93
  | `memory_learning_reject` | Reject or archive one review item by exact id |
90
94
  | `memory_skill_drafts` | List proposed skill drafts |
95
+ | `memory_skill_list` | List current-agent draft, generated, and enabled skills |
96
+ | `memory_skill_enable` | Enable a draft/generated skill into `skills/enabled` |
97
+ | `memory_skill_disable` | Disable an enabled skill while preserving its source |
91
98
  | `memory_curator_enable` | Enable the external daily curator service |
92
99
  | `memory_curator_disable` | Disable the external daily curator service |
93
100
  | `memory_curator_status` | Show service backend, schedule, and state |
94
- | `memory_version_status` | Show local evolution git repo status |
95
- | `memory_version_snapshot` | Manually snapshot memory and skill drafts |
96
- | `memory_version_list` | List recent snapshots |
97
- | `memory_version_restore` | Restore `memory`, `skill-drafts`, or `all` from a snapshot id |
98
- | `memory_version_push` | Manually push the evolution repo to GitHub |
101
+ | `memory_sync_upload` / `/memory-sync-upload` | Upload governed candidates, profiles, and feedback when Multica remote config is set |
102
+ | `memory_sync_pull` / `/memory-sync-pull` | Pull current-agent deliveries into inbox/cache/generated-skill locations |
103
+ | `memory_feedback` | Append shared unit usage feedback to `feedback/feedback.jsonl` |
104
+ | `memory_curator_manager_mark_dirty` | Register and mark the current agent root dirty |
105
+ | `memory_curator_manager_scan` / `/memory-curator-manager-scan` | Process dirty roots from the singleton manager registry |
106
+ | `memory_curator_manager_enable` | Enable the singleton manager service; default checks dirty roots every 6 hours |
107
+ | `memory_curator_manager_disable` | Disable the singleton manager service |
108
+ | `memory_curator_manager_status` | Show singleton manager service status |
109
+ | `/memory-skill` | Slash command for list/enable/disable skill lifecycle actions |
110
+ | `/memory-review` | List/show/approve/reject/archive/compact pending memory and skill proposals in the current root |
99
111
 
100
112
  ### memory_write Targets
101
113
 
@@ -127,6 +139,8 @@ By default, pi-memory injects a stable snapshot into the system prompt. It inclu
127
139
  5. current `STATE.md` entries, excluding `status:past` and `status:archived`
128
140
  6. `MEMORY.md`
129
141
  7. Yesterday's daily log
142
+ 8. Matched shared-cache memories/generated skills for Multica-scoped roots
143
+ 9. Explicitly enabled current-agent skills as `<available_skills>` metadata
130
144
 
131
145
  The stable snapshot refreshes on session start, compaction, long-term or structured writes, and day rollover. Use `memory_read` or `memory_search` for the latest authoritative state.
132
146
 
@@ -170,45 +184,58 @@ When candidates repeat, pi-memory updates the existing candidate instead of appe
170
184
 
171
185
  Approval is explicit by default:
172
186
 
187
+ - `memory_curate` reports pending memory/skill proposal counts and suggests `/memory-review` plus approve/reject tools.
188
+ - Pi session start shows one lightweight pending-review hint when proposals exist; disable with `PI_MEMORY_REVIEW_STARTUP_HINT=0`.
189
+ - `/memory-review` lists pending proposals and supports `show <id>`, `approve <id>`, `reject <id>`, and `archive <id>` for the current resolved root.
173
190
  - `memory_learning_approve` on a memory proposal writes `MEMORY.md`, `USER.md`, or `STATE.md` depending on the proposal target.
174
- - `memory_learning_approve` on a skill proposal writes `~/.pi/agent/skill-drafts/<slug>/SKILL.md` and marks the proposal approved.
191
+ - `memory_learning_approve` on a skill proposal writes the current resolved skill draft root and marks the proposal approved.
175
192
  - Skill drafts are disabled. They are not moved into enabled skill directories automatically.
193
+ - `memory_skill_enable` explicitly copies a `draft:<slug>` or `generated:<id>` skill into `skills/enabled/<skill-name>/` and writes `memory/audit/skill-lifecycle.jsonl`.
194
+ - `memory_skill_disable` removes only the enabled copy; the draft/generated source remains for later review.
195
+ - Enabled skills are injected as available-skill metadata so the agent can read the corresponding `SKILL.md` when the task matches.
176
196
  - `memory_learning_reject` marks a candidate or proposal as `rejected` or `archived` without deleting it.
177
197
 
178
198
  Old candidates are lifecycle-managed without deletion. Low-confidence candidates can become `archived`; others become `needs_review` first. `REVIEW.md` remains the evidence and audit trail, so approved items are marked rather than removed.
179
199
 
180
200
  Current learning extraction is text-based: it reads user/assistant conversation messages and asks the active model for structured candidates. It does not yet inspect structured tool-call graphs directly. Curator patch audit remains in `audit/curator.jsonl`; learning approvals are tracked through `REVIEW.md` proposal metadata and status changes.
181
201
 
182
- ## Memory Versioning
202
+ ## Local Multi-Agent Self-Evolution
183
203
 
184
- Pi-memory mirrors the authoritative runtime directories into a local evolution repo and stores point-in-time snapshots before important changes:
204
+ Resolver priority:
185
205
 
186
- ```text
187
- ~/.pi/agent/evolution/
188
- memory/
189
- skill-drafts/
190
- snapshots/<snapshot-id>/
191
- memory/
192
- skill-drafts/
193
- manifest.json
194
- manifests/<snapshot-id>.json
195
- ```
206
+ 1. `PI_MEMORY_DIR` and `PI_SKILL_DRAFTS_DIR` when explicitly set.
207
+ 2. `PI_AGENT_ROOT` when set, deriving `memory/` and `skills/drafts/`.
208
+ 3. `MULTICA_WORKSPACE_ID` + `MULTICA_AGENT_ID`, deriving `~/multica_workspaces/<workspace_id>/.pi/agents/<agent_id>/` (or `MULTICA_WORKSPACES_ROOT`).
209
+ 4. Standalone fallback `~/.pi/agent/memory` and `~/.pi/agent/skill-drafts`.
196
210
 
197
- Authoritative runtime data remains `~/.pi/agent/memory` and `~/.pi/agent/skill-drafts`; `~/.pi/agent/evolution` is a versioned mirror and backup repo.
211
+ `MULTICA_MEMBER_ID` is reserved and does not change v1 paths. Agent A and Agent B therefore get separate memory, skill drafts, generated skills, profiles, feedback, and sync queues.
198
212
 
199
- Automatic hooks snapshot before and sync/commit after `memory_write`, mutating `memory_edit`, mutating `scratchpad`, `memory_curate`, learning approve/reject, session summary/handoff writes, compaction handoffs, and external `jhp-pi-memory-curator run-once`. `memory_curate` also scans yesterday's daily log into `REVIEW.md` when learning is enabled and that daily file changed since the last scan. Read-only operations do not snapshot. Snapshots use a sliding window and keep the latest 100 snapshots by default; creating snapshot 101 deletes the oldest snapshot directory and manifest.
213
+ The package includes local primitives for the full local loop:
200
214
 
201
- Tools and slash commands:
215
+ - `ensureAgentRoot()` initializes the scoped directory tree.
216
+ - `markCurrentRootDirty()` and `scanDirtyRoots()` implement a single Local Curator Manager registry, manager-level locking, stale lock cleanup, and per-root `.curator.lock` processing.
217
+ - `generateShareCandidatesFromReview()` and `appendEvolutionCandidate()` write governed share candidates to `sync_queue/` and block secret-like payloads.
218
+ - `generateProfiles()` writes conservative local profiles for remote matching input.
219
+ - `syncUpload()` / `memory_sync_upload` POST candidates, profiles, and feedback, using a checkpoint to avoid re-uploading prior candidate ids or feedback lines.
220
+ - `syncPull()` / `memory_sync_pull` pull only current-agent deliveries and call `receiveDelivery()`.
221
+ - `receiveDelivery()` writes server downflow only to `inbox/`, `shared-cache/`, or `skills/generated/`; it never overwrites formal memory or enables skills.
222
+ - `appendFeedbackEvent()` / `memory_feedback` writes injected/used/ignored/success/failure/conflict events to `feedback/feedback.jsonl` for connector upload.
202
223
 
203
- - `memory_version_status` / `/memory-version-status`
204
- - `memory_version_snapshot` / `/memory-version-snapshot [reason]`
205
- - `memory_version_list` / `/memory-version-list`
206
- - `memory_version_restore` / `/memory-version-restore <snapshot-id> [memory|skill-drafts|all]`
207
- - `memory_version_push` / `/memory-version-push`
224
+ Server delivery is per-agent matching, not broadcast. The local runtime must only pull deliveries for the current `MULTICA_AGENT_ID` and still filter before injection.
208
225
 
209
- Restore always creates a pre-restore snapshot first, then restores the selected target, syncs the mirror, and commits `memory: restore snapshot <id>`.
226
+ ### Local Curator Manager Service
227
+
228
+ The manager service is separate from the standalone daily memory curator. It runs `jhp-pi-memory-curator manager-scan` against the registry and only processes roots marked `dirty`; when there are no dirty roots it exits after a cheap registry check.
229
+
230
+ Default cadence is every six hours using cron syntax `0 */6 * * *`. Enable, inspect, or disable it with:
231
+
232
+ ```bash
233
+ jhp-pi-memory-curator manager-enable
234
+ jhp-pi-memory-curator manager-status
235
+ jhp-pi-memory-curator manager-disable
236
+ ```
210
237
 
211
- No remote is configured by default. This keeps each user's memory evolution local to their machine and avoids writing personal memory into a shared team repo. If remote backup is desired, set `PI_EVOLUTION_REMOTE` to a personal private repo before setup, or add `origin` manually later. Auto commit is on; auto push is off unless `PI_EVOLUTION_AUTO_PUSH=1` is set. Any remote should be private because memory contents are committed in plaintext, including any secret accidentally written to memory.
238
+ Pi tools provide the same flow: `memory_curator_manager_enable`, `memory_curator_manager_status`, and `memory_curator_manager_disable`. Slash commands `/memory-curator-manager-enable`, `/memory-curator-manager-status`, and `/memory-curator-manager-disable` are also available. Pass `--registry` or the tool `registry` parameter to override the default registry path.
212
239
 
213
240
  ## External Curator Service
214
241
 
@@ -220,8 +247,6 @@ CLI:
220
247
  jhp-pi-memory-curator enable --schedule 03:00
221
248
  jhp-pi-memory-curator status
222
249
  jhp-pi-memory-curator run-once
223
- jhp-pi-memory-curator snapshot --reason "manual backup"
224
- jhp-pi-memory-curator push
225
250
  jhp-pi-memory-curator disable
226
251
  ```
227
252
 
@@ -237,23 +262,29 @@ The controller uses a systemd user timer when available and falls back to cron.
237
262
 
238
263
  | Variable | Values | Default | Description |
239
264
  | --- | --- | --- | --- |
240
- | `PI_MEMORY_DIR` | path | `~/.pi/agent/memory` | Override storage directory |
265
+ | `PI_MEMORY_DIR` | path | resolved fallback | Override memory root |
266
+ | `PI_SKILL_DRAFTS_DIR` | path | resolved fallback | Override disabled skill draft root |
267
+ | `PI_AGENT_ROOT` | path | derived from Multica env when present | Current local agent root |
268
+ | `MULTICA_WORKSPACES_ROOT` | path | `~/multica_workspaces` | Base for derived Multica roots |
269
+ | `MULTICA_WORKSPACE_ID` | string | unset | Current Multica workspace id |
270
+ | `MULTICA_AGENT_ID` | string | unset | Current Multica agent id |
271
+ | `MULTICA_RUN_ID` | string | unset | Current Multica run id for feedback |
272
+ | `PI_AGENT_INBOX_DIR` | path | `$PI_AGENT_ROOT/inbox` | Downflow inbox override |
273
+ | `PI_AGENT_SHARED_CACHE_DIR` | path | `$PI_AGENT_ROOT/shared-cache` | Shared cache override |
274
+ | `PI_AGENT_PROFILE_DIR` | path | `$PI_AGENT_ROOT/profile` | Profile directory override |
275
+ | `PI_AGENT_FEEDBACK_DIR` | path | `$PI_AGENT_ROOT/feedback` | Feedback directory override |
276
+ | `PI_AGENT_SYNC_QUEUE_DIR` | path | `$PI_AGENT_ROOT/sync_queue` | Upload queue override |
277
+ | `PI_MEMORY_MANAGER_SCHEDULE` | cron/systemd schedule | `0 */6 * * *` | Suggested schedule for the Local Curator Manager dirty-root scan service |
278
+ | `PI_MEMORY_REVIEW_STARTUP_HINT` | `0`/unset | unset | Set `0` to hide startup pending review hints |
241
279
  | `PI_MEMORY_SNAPSHOT` | `stable`, `per-turn` | `stable` | Stable context injection or legacy per-turn rebuild |
242
280
  | `PI_MEMORY_QMD_UPDATE` | `background`, `manual`, `off` | `background` | Control qmd update after writes |
243
281
  | `PI_MEMORY_NO_SEARCH` | `1` | unset | Disable per-turn search injection |
244
282
  | `PI_MEMORY_SUMMARIZE_TRANSITIONS` | `1`, `true`, `yes`, `on` | unset | Also summarize lifecycle transitions |
245
- | `PI_MEMORY_LEARNING` | `off`, `review`, `auto-review` | `review` | Control session and curator daily learning candidate extraction |
283
+ | `PI_MEMORY_LEARNING` | `off`, `review`, `auto-review` | `review` | Control session learning candidate extraction |
246
284
  | `PI_MEMORY_LEARNING_MIN_CONFIDENCE` | `low`, `medium`, `high` | `medium` | Minimum extractor confidence to keep |
247
285
  | `PI_MEMORY_SKILL_DRAFTS` | `off`, `review` | `review` | Allow curator to propose disabled skill drafts |
248
286
  | `PI_MEMORY_AUTO_APPROVE_MEMORY` | `1`, `true`, `yes`, `on` | unset | YOLO mode for approving newly created memory proposals |
249
287
  | `PI_MEMORY_AUTO_APPROVE_SKILL_DRAFTS` | `1`, `true`, `yes`, `on` | unset | YOLO mode for creating newly proposed disabled skill drafts |
250
- | `PI_EVOLUTION_ENABLED` | `0`, `1`, `true`, `false` | `1` | Enable snapshot + git versioning |
251
- | `PI_EVOLUTION_DIR` | path | `~/.pi/agent/evolution` | Local evolution repo directory |
252
- | `PI_EVOLUTION_REMOTE` | URL | unset | Optional personal private Git remote for manual/optional push |
253
- | `PI_EVOLUTION_BRANCH` | branch | `main` | Local branch used for init/clone |
254
- | `PI_EVOLUTION_AUTO_COMMIT` | `0`, `1`, `true`, `false` | `1` | Commit sync/snapshot changes automatically |
255
- | `PI_EVOLUTION_AUTO_PUSH` | `0`, `1`, `true`, `false` | `0` | Push after commits automatically |
256
- | `PI_EVOLUTION_MAX_SNAPSHOTS` | positive integer | `100` | Maximum snapshots to keep in the local sliding window |
257
288
 
258
289
  ## Development
259
290