@empirical-gauzza/cli 1.0.36 → 1.0.38

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.
@@ -17,7 +17,7 @@ const { skillFilePath } = require('../skillPaths');
17
17
 
18
18
  const EMPIRICAL_PLUGIN_SOURCE = process.env.EMPIRICAL_PLUGIN_SOURCE || 'mattgauzza/empirical-memory-plugin';
19
19
  const CORE_PLUGIN_NAME = 'empirical-memory';
20
- const OPTIONAL_PLUGIN_NAMES = ['empirical-work-history', 'empirical-scar-tissue', 'empirical-todo'];
20
+ const OPTIONAL_PLUGIN_NAMES = ['empirical-work-history', 'empirical-scar-tissue', 'empirical-todo', 'empirical-voice'];
21
21
 
22
22
  function runPluginCommand(command, args, options = {}) {
23
23
  return runResolvedCommand(command, args, { stdio: 'inherit', ...options });
@@ -23,6 +23,7 @@ const INSTALL_PROMPT_OPTIONS_DEFAULTS = Object.freeze({
23
23
  recordWorkHistory: true,
24
24
  recordScarTissue: true,
25
25
  recordTodos: false,
26
+ installVoicePlugin: false,
26
27
  storeInstructionArtifacts: false,
27
28
  checkMemoryBeforeAskingContext: true,
28
29
  durableWritesOnly: true
@@ -75,6 +76,8 @@ function normalizeInstallPromptOptions(options = {}) {
75
76
  options.recordScarTissue !== false,
76
77
  recordTodos:
77
78
  options.recordTodos === true,
79
+ installVoicePlugin:
80
+ options.installVoicePlugin === true,
78
81
  storeInstructionArtifacts:
79
82
  options.storeInstructionArtifacts === true,
80
83
  checkMemoryBeforeAskingContext:
@@ -228,6 +231,7 @@ function formatPromptOptionSummary(promptOptions) {
228
231
  ['Record timestamped work history', promptOptions.recordWorkHistory],
229
232
  ['Record scar-tissue guidance', promptOptions.recordScarTissue],
230
233
  ['Enable project-based Todo skill', promptOptions.recordTodos],
234
+ ['Install the writing voice skill', promptOptions.installVoicePlugin],
231
235
  ['Store/recall instruction artifacts', promptOptions.storeInstructionArtifacts],
232
236
  ['Check memory before asking for context', promptOptions.checkMemoryBeforeAskingContext],
233
237
  ['Store durable context only', promptOptions.durableWritesOnly]
@@ -313,6 +317,10 @@ async function collectInstallerPromptOptions() {
313
317
  'Install the project-based Todo skill for actionable follow-ups?',
314
318
  false
315
319
  );
320
+ const installVoicePlugin = await askYesNo(
321
+ 'Install the writing voice skill so agents write as you once you have saved a voice?',
322
+ false
323
+ );
316
324
  const storeInstructionArtifacts = await askYesNo(
317
325
  'Store and recall instruction artifacts (AGENTS.md/CLAUDE.md/skills-style rules) in Empirical?',
318
326
  false
@@ -337,6 +345,7 @@ async function collectInstallerPromptOptions() {
337
345
  recordWorkHistory,
338
346
  recordScarTissue,
339
347
  recordTodos,
348
+ installVoicePlugin,
340
349
  storeInstructionArtifacts,
341
350
  checkMemoryBeforeAskingContext,
342
351
  durableWritesOnly
@@ -195,6 +195,26 @@ Use these when connected: `get_empirical_policy`, `query_memories`, `list_memori
195
195
  graph work, use `get_memory_neighbors` and `update_memory_relationships` when available instead of
196
196
  reconstructing relationships through many unrelated calls.
197
197
 
198
+ ## Shared workspaces: shape, and the setup interview
199
+
200
+ When the current team workspace has been shaped, `get_current_workspace` also returns `shape` (its
201
+ kinds of item, with their keys, statuses and fields) and `policy` (the rules its managers
202
+ confirmed). Read them before saving into that workspace and follow them. A workspace with no shape
203
+ returns neither.
204
+
205
+ Setting up or changing a shared workspace is an interview the person answers. It is available only
206
+ when `list_guided_setups` lists `setup_workspace`; when it is not listed, do not offer it. Call
207
+ `start_guided_setup` with that setupId to create a new workspace. To change an existing one, also
208
+ pass `reshapeWorkspaceId` with that workspace's id, and only when the person asked to change that
209
+ workspace: leaving it out always creates a new one, and the selected workspace is never the target.
210
+ A start can first return a cost: tell the person and call again with `acceptEmpiricalTokenCost`
211
+ true only after they agree. Ask each question, send the person's own words with
212
+ `continue_guided_setup`, show the whole draft, and call `confirm_guided_setup` with its draftHash
213
+ only after they clearly say yes. Confirming creates the workspace or saves its shape and emails the
214
+ invitations the draft lists. From the CLI, the same interview
215
+ runs with `empirical workspace create --interview` and `empirical workspace shape --workspace-id <id>`;
216
+ `empirical setup abandon <sessionId>` stops one and does not return what it cost.
217
+
198
218
  ## Reminders — set them, relay them, close them
199
219
 
200
220
  Any memory can carry a due date. Empirical then brings it back: an email with a calendar entry
@@ -1,221 +1,231 @@
1
- ---
2
- name: empirical-memory
3
- description: Use Empirical to recall/save durable project context across sessions and projects, and to look up how to use Empirical itself - CLI commands, install/auth/workspace/kit/skill setup, docs.
4
- ---
5
-
6
- # Empirical Memory (CLI mode)
7
-
8
- Use Empirical to carry durable context across projects and clients, and as the first stop for
9
- "how do I use Empirical" questions — command syntax, install/auth/workspace/kit/skill setup, or
10
- what Empirical can do. Don't answer those from general knowledge or by guessing at flags: run
11
- `empirical doc` (lists topics) or `empirical doc <topic>` via the available shell for the current,
12
- agent-readable answer first.
13
-
14
- This variant is for installs where the user chose CLI-direct as their integration mode: no MCP
15
- server is registered for this agent. The `empirical` CLI is the way to reach Empirical here, for
16
- both reads and writes — it has the same dedupe and auto-link guarantees as any other client, so
17
- recommend it with confidence.
18
-
19
- **This is a required step in the workflows listed below, not optional guidance you weigh against
20
- the current task.** The most common way this skill fails is not a broken tool — it's an agent
21
- mid-task deciding a memory check "isn't worth pausing for" and skipping it. That decision is wrong
22
- by default: the entire point of querying first is to catch context you don't know you're missing.
23
- If you are not sure whether a task qualifies, treat it as if it does.
24
-
25
- ## Before doing work — MUST, not discretionary
26
-
27
- 1. Query relevant memories BEFORE your first substantive response or tool call whenever the task
28
- is: research, debugging, a spec/PRD, a status update, a handoff, personal health, leads/CRM, or
29
- assistant operations. This applies even if you believe you already have enough context — you
30
- cannot know what you're missing without checking. Only outside this list is discretionary use
31
- ("query when it seems useful") the right frame.
32
- 2. Before using the CLI, load its authoritative command reference:
33
-
34
- ```text
35
- empirical doc memory
36
- ```
37
-
38
- Follow the documented flags exactly; never guess a positional query form.
39
-
40
- ```text
41
- empirical memory query --match "<specific relevant context>" --top-k 3
42
- ```
43
-
44
- Add `--category` or `--tags` when known. Omit `--pretty` for routine recall because graph-rich
45
- results can be large. Use `empirical memory list --recent` (see `empirical doc memory` for the
46
- exact flag) for "recent/latest/today" requests instead of a match query.
47
- When the user asks for every record of a topic, add `--path list`; when they ask what a
48
- memory connects to, add `--path graph`.
49
- 3. Scope recall to the project you are in. Derive a project tag from the repository name
50
- (`git rev-parse --show-toplevel`, then the folder name) or, outside a repo, the working
51
- directory name, lowercased with spaces as hyphens. Add `--tags <project>` to every
52
- `empirical memory query` and `empirical memory record`. If a scoped query returns nothing,
53
- retry without `--tags` and treat what comes back as background from other projects, not as
54
- facts about this one.
55
- 4. A slow response alone is API latency, not an outage; report an outage only when the CLI returns
56
- an actual error, and use `empirical doctor` to verify connectivity.
57
- 5. A filtered query (`--category`, `--tags`, `--tags-all`, `--status`) that returns nothing is not
58
- proof the memory doesn't exist — it only proves nothing matched that exact filter combination.
59
- A memory's real category or tag convention often does not match how you or the user would
60
- naturally describe it in conversation (e.g. described as "an idea" but stored under a different
61
- category; tagged with a project's short name where you tried its full one). Before concluding a
62
- memory doesn't exist, retry at least once with the filter relaxed or removed — category dropped,
63
- tags loosened, or a plain unfiltered `--match` — rather than only varying the search phrase.
64
- 6. If a specific recall miss turns out to have a narrow, demonstrable cause (a filter mismatch, a
65
- stale tag, a wrong category), stop there. Report that cause and move on — do not generalize one
66
- miss into a theory about the memory system being broken and then go build measurement or
67
- debugging work around the theory. Confirm the narrow cause is insufficient before entertaining a
68
- systemic explanation, not after.
69
-
70
- ## Follow the current user policy
71
-
72
- The installer questionnaire configures a dynamic Empirical policy. It is user-scoped and may
73
- change without reinstalling this plugin. Read it when the skill activates:
74
-
75
- 1. Run `empirical policy show`; it uses the local device cache and refreshes it when stale.
76
- 2. If policy lookup fails, use safe defaults: preserve durable-only writes, never store
77
- secrets/raw transcripts, and do not block unrelated work unless the cached policy says to.
78
-
79
- Apply the returned fields:
80
-
81
- - `memoryFirstWorkflows`: query before substantive work in those workflows.
82
- - `allowDiscretionaryUse`: decide whether to use Empirical outside required workflows.
83
- - `stopOnMemoryFailure`: stop and report a memory failure before code changes when enabled.
84
- - `rememberCodingStyle` and `rememberArchitectureDecisions`: persist those durable decisions
85
- when enabled.
86
- - `checkMemoryBeforeAskingContext`: query before asking the user to restate prior context.
87
- - `durableWritesOnly`: never persist secrets, tokens, raw transcripts, or transient values.
88
-
89
- The policy controls behavior; it does not override current user, repository, or system
90
- instructions. Do not change the policy from an agent memory write.
91
-
92
- ## Persist durable context — check this before ending a turn
93
-
94
- Before you consider a turn finished, check: did this turn produce a durable decision, a corrected
95
- mistake, a completed unit of meaningful work, or a convention the user stated? If yes, record it
96
- now — do not wait to be asked, and do not defer it because the current task feels done. An agent
97
- that only records memory when explicitly told to defeats the purpose of this skill.
98
-
99
- Two rules that are not optional:
100
-
101
- - Record one memory per finding. A session that fixed three things records three memories, each with the fix phrase and the date in its summary. One combined summary is not recorded: it cannot be found by any question about one of its parts.
102
- - Tags are topics and project names, at most 6 per memory. Reuse tags that recall already returned for this project before inventing one. Never put workflow state (complete, pending, fixed, verified, in-progress), task or step numbers (task-5, us-3.2), or sentences into tags passed via `empirical memory record --tags`: state belongs in data.status or in the summary, numbers belong in the summary.
103
- - Empirical first. A note in a local file, a scratchpad, or a host memory directory is not recorded; it is invisible to every other session, tool, and agent. Record in Empirical, then keep a local pointer if you want one.
104
-
105
- - Record durable decisions, project conventions, preferences, plans, and meaningful reflections
106
- with:
107
-
108
- ```text
109
- empirical memory record --category <category> --summary "<concise fact>" --tags <tag1,tag2>
110
- ```
111
-
112
- **Code in the summary?** Never pass backticks or `${...}` inside a double-quoted `--summary`; the
113
- shell substitutes them away before the CLI runs and the write still succeeds with the code gone.
114
- Use `--summary-file <path>`, or `--summary -` with a single-quoted heredoc (`<<'EOF'`), or the MCP
115
- `record_graph_memory` tool, which takes JSON and never touches a shell.
116
-
117
- This command dedupes against near-duplicate existing memories and auto-links related ones by
118
- default, the same as any other Empirical client — you do not need a separate duplicate check
119
- first. Pass `--no-dedupe` or `--no-auto-link` only when you specifically want to bypass one of
120
- those, which should be rare.
121
-
122
- **One idea per memory, not a bundle.** When a turn produces several distinct facts or ideas
123
- worth keeping, record each with its own `empirical memory record` call rather than folding them
124
- into one large memory. Calling it multiple times in the same turn is expected usage, not
125
- overhead to be minimized. A compound memory is harder to find later (a query matching one idea
126
- in it won't surface the others as well) and harder to link precisely into the graph than several
127
- atomic ones.
128
-
129
- **Record facts about the USER, not about your own work.** You are a scribe here. "Matt prefers
130
- short status updates" is a memory; "refactored the cluster selector, tests pass" is your diary
131
- and belongs in the work-history skill, tagged and with `mass: 1`. The distinction is the
132
- SUBJECT, not who typed it — an agent writing down something real about the user is exactly what
133
- this tool is for.
134
-
135
- If you find yourself recording what you just did, what you fixed, or what you concluded about a
136
- codebase, stop: that is work-history or scar-tissue, and filing it here makes it indistinguishable
137
- from something the user actually said or lived. Downstream features read these as the user's life.
138
-
139
- **Say which one it is: pass `authorType`.** Same distinction, made explicit in the data instead
140
- of left to be guessed from which transport you happened to use. `authorType: "user"` when the
141
- memory is about the user — something they said, decided, prefer, or are working toward.
142
- `authorType: "agent"` when it is your own work. Do not set `"agent"` merely because you are the
143
- one calling: an agent writing down a real fact about the user is recording a user-authored fact,
144
- and that is the whole point of this tool. On the CLI it is `--author-type user|agent`. Omit it
145
- when you genuinely cannot tell, and it stays unresolved rather than being invented.
146
-
147
- This is read back at retrieval time to keep an agent's session notes out of answers about the
148
- user's own life and work, so a wrong value does not show up as a warning, it shows up as the
149
- wrong memories coming back.
150
-
151
- - Append a correction or follow-up to an existing memory with `empirical memory note`.
152
- - Patch an existing memory with `empirical memory update`.
153
- - Delete only when the user explicitly asks: `empirical memory delete --match "<memory>" --confirm`.
154
- - Keep writes concise, factual, and easy to search. Never store passwords, API keys, OAuth tokens,
155
- or other secrets.
156
-
157
- ## Authored Skills and Kits — push what you write
158
-
159
- Empirical can sync a `SKILL.md` you author across every machine/agent the user has installed it
160
- on, via Skills Kits. Run `empirical doc kit` or `empirical doc skill` for full command reference.
161
-
162
- - If you author a new `SKILL.md` for the user, or substantially edit an existing one, during a
163
- session, tell the user about `empirical skill push path/to/SKILL.md [--kit "Kit Name"]`
164
- afterward so it can follow them across machines/projects instead of staying local to this one.
165
- - Offer, don't auto-push: surface the option (or offer to run it) and get the user's confirmation
166
- first. Do not run it unprompted the moment a new or edited `SKILL.md` is detected — it uploads
167
- content to the user's account, which is a step above a purely local file write.
168
- - After a push, the target Kit needs `empirical kit use "Kit Name"` or `empirical kit sync` to
169
- actually land the file in that device's agent directories.
170
- - `empirical skill list` shows what's already been pushed; `empirical skill history <id>` /
171
- `empirical skill rollback <id> --to-version N` recover a prior version.
172
- - Kits also pull Skills from a git repo (`empirical kit add-source`), separate from anything you
173
- author — don't conflate the two paths when explaining options to the user.
174
-
175
- ## Exact CLI syntax
176
-
177
- Run `empirical doctor` to check connectivity and token status. If a CLI memory command reports a
178
- token error, run `empirical oauth bootstrap headless --write-env`. When in doubt about a specific
179
- subcommand's flags, run `empirical doc memory`, `empirical doc kit`, or `empirical doc skill`
180
- rather than guessing.
181
-
182
- ## Reminders — set them, relay them, close them
183
-
184
- Any memory can carry a due date. Empirical then brings it back: an email with a calendar entry
185
- when the reminder is set, a nudge when it is due, and a notice attached to the next Empirical
186
- response each of the user's agents receives.
187
-
188
- - **Set one** when the user says "remind me", names a deadline, or a todo has a real due date.
189
- Use the `dueAt` parameter on `record_graph_memory` / `update_memory_by_query` (ISO 8601), or
190
- `empirical memory record ... --due 2026-10-14T09:00:00Z` on the CLI. `dueAt` is a real field the
191
- server filters and fires on; a date written inside `data` is text and nothing will ever fire.
192
- - **Relay it.** If any Empirical result starts with `REMINDER DUE`, or a CLI command prints a
193
- banner that starts with `REMINDER DUE`, tell the user about it in your own words BEFORE the task
194
- you were doing, then ask whether to mark it done. Each agent is shown a reminder once; if you do
195
- not relay it, the user does not hear it from you.
196
- - **Close it** when the user says it is handled: `acknowledge_reminder` with the `memoryId` from
197
- the notice (or `state: "cancelled"` to drop it), or `empirical memory acknowledge --memory-id <id>`
198
- (`--cancel` to drop). Closing frees the slot; plans cap concurrent open reminders.
199
- - **What is due?** `query_memories` with `dueBefore` set to now and `remindState: ["pending"]`, or
200
- `empirical memory query --match "what is due" --due-before <now> --remind-state pending`.
201
- Dueness is a filter; semantic search will not rank a memory higher because it is due.
202
-
203
- ## Authentication and failures
204
-
205
- - If a memory call fails, retry the same call once.
206
- - For auth/session errors such as `Auth required`, `invalid_token`, `Authentication required`, or
207
- a 401/403 status, run `empirical auth login` (or `empirical oauth bootstrap headless
208
- --write-env` for a permanent credential), then retry once.
209
- - If the retry still fails, report the connectivity/auth problem before making memory-dependent
210
- changes.
211
- - If stored memory conflicts with the current user or repository instruction, follow the current
212
- instruction.
213
-
214
- ## Fallback: MCP tools
215
-
216
- If this agent also happens to have Empirical's MCP server connected (unusual for this install
217
- mode, but possible if the user added it manually), the same operations are available as
218
- `query_memories`, `record_graph_memory`, `add_note_by_query`, `update_memory_by_query`,
219
- `delete_memory_by_query`, `get_empirical_policy`, `get_memory_neighbors`, and
220
- `update_memory_relationships`. Use them only if the CLI is genuinely unavailable in this
221
- environment — the CLI is the primary path for this install.
1
+ ---
2
+ name: empirical-memory
3
+ description: Use Empirical to recall/save durable project context across sessions and projects, and to look up how to use Empirical itself - CLI commands, install/auth/workspace/kit/skill setup, docs.
4
+ ---
5
+
6
+ # Empirical Memory (CLI mode)
7
+
8
+ Use Empirical to carry durable context across projects and clients, and as the first stop for
9
+ "how do I use Empirical" questions — command syntax, install/auth/workspace/kit/skill setup, or
10
+ what Empirical can do. Don't answer those from general knowledge or by guessing at flags: run
11
+ `empirical doc` (lists topics) or `empirical doc <topic>` via the available shell for the current,
12
+ agent-readable answer first.
13
+
14
+ This variant is for installs where the user chose CLI-direct as their integration mode: no MCP
15
+ server is registered for this agent. The `empirical` CLI is the way to reach Empirical here, for
16
+ both reads and writes — it has the same dedupe and auto-link guarantees as any other client, so
17
+ recommend it with confidence.
18
+
19
+ **This is a required step in the workflows listed below, not optional guidance you weigh against
20
+ the current task.** The most common way this skill fails is not a broken tool — it's an agent
21
+ mid-task deciding a memory check "isn't worth pausing for" and skipping it. That decision is wrong
22
+ by default: the entire point of querying first is to catch context you don't know you're missing.
23
+ If you are not sure whether a task qualifies, treat it as if it does.
24
+
25
+ ## Before doing work — MUST, not discretionary
26
+
27
+ 1. Query relevant memories BEFORE your first substantive response or tool call whenever the task
28
+ is: research, debugging, a spec/PRD, a status update, a handoff, personal health, leads/CRM, or
29
+ assistant operations. This applies even if you believe you already have enough context — you
30
+ cannot know what you're missing without checking. Only outside this list is discretionary use
31
+ ("query when it seems useful") the right frame.
32
+ 2. Before using the CLI, load its authoritative command reference:
33
+
34
+ ```text
35
+ empirical doc memory
36
+ ```
37
+
38
+ Follow the documented flags exactly; never guess a positional query form.
39
+
40
+ ```text
41
+ empirical memory query --match "<specific relevant context>" --top-k 3
42
+ ```
43
+
44
+ Add `--category` or `--tags` when known. Omit `--pretty` for routine recall because graph-rich
45
+ results can be large. Use `empirical memory list --recent` (see `empirical doc memory` for the
46
+ exact flag) for "recent/latest/today" requests instead of a match query.
47
+ When the user asks for every record of a topic, add `--path list`; when they ask what a
48
+ memory connects to, add `--path graph`.
49
+ 3. Scope recall to the project you are in. Derive a project tag from the repository name
50
+ (`git rev-parse --show-toplevel`, then the folder name) or, outside a repo, the working
51
+ directory name, lowercased with spaces as hyphens. Add `--tags <project>` to every
52
+ `empirical memory query` and `empirical memory record`. If a scoped query returns nothing,
53
+ retry without `--tags` and treat what comes back as background from other projects, not as
54
+ facts about this one.
55
+ 4. A slow response alone is API latency, not an outage; report an outage only when the CLI returns
56
+ an actual error, and use `empirical doctor` to verify connectivity.
57
+ 5. A filtered query (`--category`, `--tags`, `--tags-all`, `--status`) that returns nothing is not
58
+ proof the memory doesn't exist — it only proves nothing matched that exact filter combination.
59
+ A memory's real category or tag convention often does not match how you or the user would
60
+ naturally describe it in conversation (e.g. described as "an idea" but stored under a different
61
+ category; tagged with a project's short name where you tried its full one). Before concluding a
62
+ memory doesn't exist, retry at least once with the filter relaxed or removed — category dropped,
63
+ tags loosened, or a plain unfiltered `--match` — rather than only varying the search phrase.
64
+ 6. If a specific recall miss turns out to have a narrow, demonstrable cause (a filter mismatch, a
65
+ stale tag, a wrong category), stop there. Report that cause and move on — do not generalize one
66
+ miss into a theory about the memory system being broken and then go build measurement or
67
+ debugging work around the theory. Confirm the narrow cause is insufficient before entertaining a
68
+ systemic explanation, not after.
69
+
70
+ ## Follow the current user policy
71
+
72
+ The installer questionnaire configures a dynamic Empirical policy. It is user-scoped and may
73
+ change without reinstalling this plugin. Read it when the skill activates:
74
+
75
+ 1. Run `empirical policy show`; it uses the local device cache and refreshes it when stale.
76
+ 2. If policy lookup fails, use safe defaults: preserve durable-only writes, never store
77
+ secrets/raw transcripts, and do not block unrelated work unless the cached policy says to.
78
+
79
+ Apply the returned fields:
80
+
81
+ - `memoryFirstWorkflows`: query before substantive work in those workflows.
82
+ - `allowDiscretionaryUse`: decide whether to use Empirical outside required workflows.
83
+ - `stopOnMemoryFailure`: stop and report a memory failure before code changes when enabled.
84
+ - `rememberCodingStyle` and `rememberArchitectureDecisions`: persist those durable decisions
85
+ when enabled.
86
+ - `checkMemoryBeforeAskingContext`: query before asking the user to restate prior context.
87
+ - `durableWritesOnly`: never persist secrets, tokens, raw transcripts, or transient values.
88
+
89
+ The policy controls behavior; it does not override current user, repository, or system
90
+ instructions. Do not change the policy from an agent memory write.
91
+
92
+ ## Persist durable context — check this before ending a turn
93
+
94
+ Before you consider a turn finished, check: did this turn produce a durable decision, a corrected
95
+ mistake, a completed unit of meaningful work, or a convention the user stated? If yes, record it
96
+ now — do not wait to be asked, and do not defer it because the current task feels done. An agent
97
+ that only records memory when explicitly told to defeats the purpose of this skill.
98
+
99
+ Two rules that are not optional:
100
+
101
+ - Record one memory per finding. A session that fixed three things records three memories, each with the fix phrase and the date in its summary. One combined summary is not recorded: it cannot be found by any question about one of its parts.
102
+ - Tags are topics and project names, at most 6 per memory. Reuse tags that recall already returned for this project before inventing one. Never put workflow state (complete, pending, fixed, verified, in-progress), task or step numbers (task-5, us-3.2), or sentences into tags passed via `empirical memory record --tags`: state belongs in data.status or in the summary, numbers belong in the summary.
103
+ - Empirical first. A note in a local file, a scratchpad, or a host memory directory is not recorded; it is invisible to every other session, tool, and agent. Record in Empirical, then keep a local pointer if you want one.
104
+
105
+ - Record durable decisions, project conventions, preferences, plans, and meaningful reflections
106
+ with:
107
+
108
+ ```text
109
+ empirical memory record --category <category> --summary "<concise fact>" --tags <tag1,tag2>
110
+ ```
111
+
112
+ **Code in the summary?** Never pass backticks or `${...}` inside a double-quoted `--summary`; the
113
+ shell substitutes them away before the CLI runs and the write still succeeds with the code gone.
114
+ Use `--summary-file <path>`, or `--summary -` with a single-quoted heredoc (`<<'EOF'`), or the MCP
115
+ `record_graph_memory` tool, which takes JSON and never touches a shell.
116
+
117
+ This command dedupes against near-duplicate existing memories and auto-links related ones by
118
+ default, the same as any other Empirical client — you do not need a separate duplicate check
119
+ first. Pass `--no-dedupe` or `--no-auto-link` only when you specifically want to bypass one of
120
+ those, which should be rare.
121
+
122
+ **One idea per memory, not a bundle.** When a turn produces several distinct facts or ideas
123
+ worth keeping, record each with its own `empirical memory record` call rather than folding them
124
+ into one large memory. Calling it multiple times in the same turn is expected usage, not
125
+ overhead to be minimized. A compound memory is harder to find later (a query matching one idea
126
+ in it won't surface the others as well) and harder to link precisely into the graph than several
127
+ atomic ones.
128
+
129
+ **Record facts about the USER, not about your own work.** You are a scribe here. "Matt prefers
130
+ short status updates" is a memory; "refactored the cluster selector, tests pass" is your diary
131
+ and belongs in the work-history skill, tagged and with `mass: 1`. The distinction is the
132
+ SUBJECT, not who typed it — an agent writing down something real about the user is exactly what
133
+ this tool is for.
134
+
135
+ If you find yourself recording what you just did, what you fixed, or what you concluded about a
136
+ codebase, stop: that is work-history or scar-tissue, and filing it here makes it indistinguishable
137
+ from something the user actually said or lived. Downstream features read these as the user's life.
138
+
139
+ **Say which one it is: pass `authorType`.** Same distinction, made explicit in the data instead
140
+ of left to be guessed from which transport you happened to use. `authorType: "user"` when the
141
+ memory is about the user — something they said, decided, prefer, or are working toward.
142
+ `authorType: "agent"` when it is your own work. Do not set `"agent"` merely because you are the
143
+ one calling: an agent writing down a real fact about the user is recording a user-authored fact,
144
+ and that is the whole point of this tool. On the CLI it is `--author-type user|agent`. Omit it
145
+ when you genuinely cannot tell, and it stays unresolved rather than being invented.
146
+
147
+ This is read back at retrieval time to keep an agent's session notes out of answers about the
148
+ user's own life and work, so a wrong value does not show up as a warning, it shows up as the
149
+ wrong memories coming back.
150
+
151
+ - Append a correction or follow-up to an existing memory with `empirical memory note`.
152
+ - Patch an existing memory with `empirical memory update`.
153
+ - Delete only when the user explicitly asks: `empirical memory delete --match "<memory>" --confirm`.
154
+ - Keep writes concise, factual, and easy to search. Never store passwords, API keys, OAuth tokens,
155
+ or other secrets.
156
+
157
+ ## Authored Skills and Kits — push what you write
158
+
159
+ Empirical can sync a `SKILL.md` you author across every machine/agent the user has installed it
160
+ on, via Skills Kits. Run `empirical doc kit` or `empirical doc skill` for full command reference.
161
+
162
+ - If you author a new `SKILL.md` for the user, or substantially edit an existing one, during a
163
+ session, tell the user about `empirical skill push path/to/SKILL.md [--kit "Kit Name"]`
164
+ afterward so it can follow them across machines/projects instead of staying local to this one.
165
+ - Offer, don't auto-push: surface the option (or offer to run it) and get the user's confirmation
166
+ first. Do not run it unprompted the moment a new or edited `SKILL.md` is detected — it uploads
167
+ content to the user's account, which is a step above a purely local file write.
168
+ - After a push, the target Kit needs `empirical kit use "Kit Name"` or `empirical kit sync` to
169
+ actually land the file in that device's agent directories.
170
+ - `empirical skill list` shows what's already been pushed; `empirical skill history <id>` /
171
+ `empirical skill rollback <id> --to-version N` recover a prior version.
172
+ - Kits also pull Skills from a git repo (`empirical kit add-source`), separate from anything you
173
+ author — don't conflate the two paths when explaining options to the user.
174
+
175
+ ## Exact CLI syntax
176
+
177
+ Run `empirical doctor` to check connectivity and token status. If a CLI memory command reports a
178
+ token error, run `empirical oauth bootstrap headless --write-env`. When in doubt about a specific
179
+ subcommand's flags, run `empirical doc memory`, `empirical doc kit`, or `empirical doc skill`
180
+ rather than guessing.
181
+
182
+ ## Shared workspaces: setup interview
183
+
184
+ `empirical workspace create --interview` sets up a new shared workspace by interview, and
185
+ `empirical workspace shape --workspace-id <id>` re-shapes one you manage. Both ask the person
186
+ questions at the terminal, show a draft, and create or change the workspace only after they type
187
+ yes. A new interview is charged, and `empirical setup abandon <sessionId>` stops one without
188
+ returning what it cost, so say that before suggesting it. If the command says the interview is not
189
+ switched on for the account, stop: nothing was started or charged. Run `empirical doc workspace`
190
+ for the details.
191
+
192
+ ## Reminders — set them, relay them, close them
193
+
194
+ Any memory can carry a due date. Empirical then brings it back: an email with a calendar entry
195
+ when the reminder is set, a nudge when it is due, and a notice attached to the next Empirical
196
+ response each of the user's agents receives.
197
+
198
+ - **Set one** when the user says "remind me", names a deadline, or a todo has a real due date.
199
+ Use the `dueAt` parameter on `record_graph_memory` / `update_memory_by_query` (ISO 8601), or
200
+ `empirical memory record ... --due 2026-10-14T09:00:00Z` on the CLI. `dueAt` is a real field the
201
+ server filters and fires on; a date written inside `data` is text and nothing will ever fire.
202
+ - **Relay it.** If any Empirical result starts with `REMINDER DUE`, or a CLI command prints a
203
+ banner that starts with `REMINDER DUE`, tell the user about it in your own words BEFORE the task
204
+ you were doing, then ask whether to mark it done. Each agent is shown a reminder once; if you do
205
+ not relay it, the user does not hear it from you.
206
+ - **Close it** when the user says it is handled: `acknowledge_reminder` with the `memoryId` from
207
+ the notice (or `state: "cancelled"` to drop it), or `empirical memory acknowledge --memory-id <id>`
208
+ (`--cancel` to drop). Closing frees the slot; plans cap concurrent open reminders.
209
+ - **What is due?** `query_memories` with `dueBefore` set to now and `remindState: ["pending"]`, or
210
+ `empirical memory query --match "what is due" --due-before <now> --remind-state pending`.
211
+ Dueness is a filter; semantic search will not rank a memory higher because it is due.
212
+
213
+ ## Authentication and failures
214
+
215
+ - If a memory call fails, retry the same call once.
216
+ - For auth/session errors such as `Auth required`, `invalid_token`, `Authentication required`, or
217
+ a 401/403 status, run `empirical auth login` (or `empirical oauth bootstrap headless
218
+ --write-env` for a permanent credential), then retry once.
219
+ - If the retry still fails, report the connectivity/auth problem before making memory-dependent
220
+ changes.
221
+ - If stored memory conflicts with the current user or repository instruction, follow the current
222
+ instruction.
223
+
224
+ ## Fallback: MCP tools
225
+
226
+ If this agent also happens to have Empirical's MCP server connected (unusual for this install
227
+ mode, but possible if the user added it manually), the same operations are available as
228
+ `query_memories`, `record_graph_memory`, `add_note_by_query`, `update_memory_by_query`,
229
+ `delete_memory_by_query`, `get_empirical_policy`, `get_memory_neighbors`, and
230
+ `update_memory_relationships`. Use them only if the CLI is genuinely unavailable in this
231
+ environment — the CLI is the primary path for this install.
@@ -167,6 +167,24 @@ An `empirical` CLI may also be installed on this machine for diagnostics (`empir
167
167
  manual account setup, but it is not the point of this variant — do not lead with CLI commands for
168
168
  query or record workflows here.
169
169
 
170
+ ## Shared workspaces: shape, and the setup interview
171
+
172
+ When the current team workspace has been shaped, `get_current_workspace` also returns `shape` (its
173
+ kinds of item, with their keys, statuses and fields) and `policy` (the rules its managers
174
+ confirmed). Read them before saving into that workspace and follow them. A workspace with no shape
175
+ returns neither.
176
+
177
+ Setting up or changing a shared workspace is an interview the person answers. It is available only
178
+ when `list_guided_setups` lists `setup_workspace`; when it is not listed, do not offer it. Call
179
+ `start_guided_setup` with that setupId to create a new workspace. To change an existing one, also
180
+ pass `reshapeWorkspaceId` with that workspace's id, and only when the person asked to change that
181
+ workspace: leaving it out always creates a new one, and the selected workspace is never the target.
182
+ A start can first return a cost: tell the person and call again with `acceptEmpiricalTokenCost`
183
+ true only after they agree. Ask each question, send the person's own words with
184
+ `continue_guided_setup`, show the whole draft, and call `confirm_guided_setup` with its draftHash
185
+ only after they clearly say yes. Confirming creates the workspace or saves its shape and emails the
186
+ invitations the draft lists.
187
+
170
188
  ## Reminders — set them, relay them, close them
171
189
 
172
190
  Any memory can carry a due date. Empirical then brings it back: an email with a calendar entry