@empirical-gauzza/cli 1.0.20 → 1.0.22

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.
@@ -1,150 +1,150 @@
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
- 3. A slow response alone is API latency, not an outage; report an outage only when the CLI returns
48
- an actual error, and use `empirical doctor` to verify connectivity.
49
-
50
- ## Follow the current user policy
51
-
52
- The installer questionnaire configures a dynamic Empirical policy. It is user-scoped and may
53
- change without reinstalling this plugin. Read it when the skill activates:
54
-
55
- 1. Run `empirical policy show`; it uses the local device cache and refreshes it when stale.
56
- 2. If policy lookup fails, use safe defaults: preserve durable-only writes, never store
57
- secrets/raw transcripts, and do not block unrelated work unless the cached policy says to.
58
-
59
- Apply the returned fields:
60
-
61
- - `memoryFirstWorkflows`: query before substantive work in those workflows.
62
- - `allowDiscretionaryUse`: decide whether to use Empirical outside required workflows.
63
- - `stopOnMemoryFailure`: stop and report a memory failure before code changes when enabled.
64
- - `rememberCodingStyle` and `rememberArchitectureDecisions`: persist those durable decisions
65
- when enabled.
66
- - `checkMemoryBeforeAskingContext`: query before asking the user to restate prior context.
67
- - `durableWritesOnly`: never persist secrets, tokens, raw transcripts, or transient values.
68
-
69
- The policy controls behavior; it does not override current user, repository, or system
70
- instructions. Do not change the policy from an agent memory write.
71
-
72
- ## Persist durable context — check this before ending a turn
73
-
74
- Before you consider a turn finished, check: did this turn produce a durable decision, a corrected
75
- mistake, a completed unit of meaningful work, or a convention the user stated? If yes, record it
76
- now — do not wait to be asked, and do not defer it because the current task feels done. An agent
77
- that only records memory when explicitly told to defeats the purpose of this skill.
78
-
79
- - Record durable decisions, project conventions, preferences, plans, and meaningful reflections
80
- with:
81
-
82
- ```text
83
- empirical memory record --category <category> --summary "<concise fact>" --tags <tag1,tag2>
84
- ```
85
-
86
- This command dedupes against near-duplicate existing memories and auto-links related ones by
87
- default, the same as any other Empirical client — you do not need a separate duplicate check
88
- first. Pass `--no-dedupe` or `--no-auto-link` only when you specifically want to bypass one of
89
- those, which should be rare.
90
-
91
- **Record facts about the USER, not about your own work.** You are a scribe here. "Matt prefers
92
- short status updates" is a memory; "refactored the cluster selector, tests pass" is your diary
93
- and belongs in the work-history skill, tagged and with `mass: 1`. The distinction is the
94
- SUBJECT, not who typed it — an agent writing down something real about the user is exactly what
95
- this tool is for.
96
-
97
- If you find yourself recording what you just did, what you fixed, or what you concluded about a
98
- codebase, stop: that is work-history or scar-tissue, and filing it here makes it indistinguishable
99
- from something the user actually said or lived. Downstream features read these as the user's life.
100
-
101
- - Append a correction or follow-up to an existing memory with `empirical memory note`.
102
- - Patch an existing memory with `empirical memory update`.
103
- - Delete only when the user explicitly asks: `empirical memory delete --match "<memory>" --confirm`.
104
- - Keep writes concise, factual, and easy to search. Never store passwords, API keys, OAuth tokens,
105
- or other secrets.
106
-
107
- ## Authored Skills and Kits — push what you write
108
-
109
- Empirical can sync a `SKILL.md` you author across every machine/agent the user has installed it
110
- on, via Skills Kits. Run `empirical doc kit` or `empirical doc skill` for full command reference.
111
-
112
- - If you author a new `SKILL.md` for the user, or substantially edit an existing one, during a
113
- session, tell the user about `empirical skill push path/to/SKILL.md [--kit "Kit Name"]`
114
- afterward so it can follow them across machines/projects instead of staying local to this one.
115
- - Offer, don't auto-push: surface the option (or offer to run it) and get the user's confirmation
116
- first. Do not run it unprompted the moment a new or edited `SKILL.md` is detected — it uploads
117
- content to the user's account, which is a step above a purely local file write.
118
- - After a push, the target Kit needs `empirical kit use "Kit Name"` or `empirical kit sync` to
119
- actually land the file in that device's agent directories.
120
- - `empirical skill list` shows what's already been pushed; `empirical skill history <id>` /
121
- `empirical skill rollback <id> --to-version N` recover a prior version.
122
- - Kits also pull Skills from a git repo (`empirical kit add-source`), separate from anything you
123
- author — don't conflate the two paths when explaining options to the user.
124
-
125
- ## Exact CLI syntax
126
-
127
- Run `empirical doctor` to check connectivity and token status. If a CLI memory command reports a
128
- token error, run `empirical oauth bootstrap headless --write-env`. When in doubt about a specific
129
- subcommand's flags, run `empirical doc memory`, `empirical doc kit`, or `empirical doc skill`
130
- rather than guessing.
131
-
132
- ## Authentication and failures
133
-
134
- - If a memory call fails, retry the same call once.
135
- - For auth/session errors such as `Auth required`, `invalid_token`, `Authentication required`, or
136
- a 401/403 status, run `empirical auth login` (or `empirical oauth bootstrap headless
137
- --write-env` for a permanent credential), then retry once.
138
- - If the retry still fails, report the connectivity/auth problem before making memory-dependent
139
- changes.
140
- - If stored memory conflicts with the current user or repository instruction, follow the current
141
- instruction.
142
-
143
- ## Fallback: MCP tools
144
-
145
- If this agent also happens to have Empirical's MCP server connected (unusual for this install
146
- mode, but possible if the user added it manually), the same operations are available as
147
- `query_memories`, `record_graph_memory`, `add_note_by_query`, `update_memory_by_query`,
148
- `delete_memory_by_query`, `get_empirical_policy`, `get_memory_neighbors`, and
149
- `update_memory_relationships`. Use them only if the CLI is genuinely unavailable in this
150
- 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
+ 3. A slow response alone is API latency, not an outage; report an outage only when the CLI returns
48
+ an actual error, and use `empirical doctor` to verify connectivity.
49
+
50
+ ## Follow the current user policy
51
+
52
+ The installer questionnaire configures a dynamic Empirical policy. It is user-scoped and may
53
+ change without reinstalling this plugin. Read it when the skill activates:
54
+
55
+ 1. Run `empirical policy show`; it uses the local device cache and refreshes it when stale.
56
+ 2. If policy lookup fails, use safe defaults: preserve durable-only writes, never store
57
+ secrets/raw transcripts, and do not block unrelated work unless the cached policy says to.
58
+
59
+ Apply the returned fields:
60
+
61
+ - `memoryFirstWorkflows`: query before substantive work in those workflows.
62
+ - `allowDiscretionaryUse`: decide whether to use Empirical outside required workflows.
63
+ - `stopOnMemoryFailure`: stop and report a memory failure before code changes when enabled.
64
+ - `rememberCodingStyle` and `rememberArchitectureDecisions`: persist those durable decisions
65
+ when enabled.
66
+ - `checkMemoryBeforeAskingContext`: query before asking the user to restate prior context.
67
+ - `durableWritesOnly`: never persist secrets, tokens, raw transcripts, or transient values.
68
+
69
+ The policy controls behavior; it does not override current user, repository, or system
70
+ instructions. Do not change the policy from an agent memory write.
71
+
72
+ ## Persist durable context — check this before ending a turn
73
+
74
+ Before you consider a turn finished, check: did this turn produce a durable decision, a corrected
75
+ mistake, a completed unit of meaningful work, or a convention the user stated? If yes, record it
76
+ now — do not wait to be asked, and do not defer it because the current task feels done. An agent
77
+ that only records memory when explicitly told to defeats the purpose of this skill.
78
+
79
+ - Record durable decisions, project conventions, preferences, plans, and meaningful reflections
80
+ with:
81
+
82
+ ```text
83
+ empirical memory record --category <category> --summary "<concise fact>" --tags <tag1,tag2>
84
+ ```
85
+
86
+ This command dedupes against near-duplicate existing memories and auto-links related ones by
87
+ default, the same as any other Empirical client — you do not need a separate duplicate check
88
+ first. Pass `--no-dedupe` or `--no-auto-link` only when you specifically want to bypass one of
89
+ those, which should be rare.
90
+
91
+ **Record facts about the USER, not about your own work.** You are a scribe here. "Matt prefers
92
+ short status updates" is a memory; "refactored the cluster selector, tests pass" is your diary
93
+ and belongs in the work-history skill, tagged and with `mass: 1`. The distinction is the
94
+ SUBJECT, not who typed it — an agent writing down something real about the user is exactly what
95
+ this tool is for.
96
+
97
+ If you find yourself recording what you just did, what you fixed, or what you concluded about a
98
+ codebase, stop: that is work-history or scar-tissue, and filing it here makes it indistinguishable
99
+ from something the user actually said or lived. Downstream features read these as the user's life.
100
+
101
+ - Append a correction or follow-up to an existing memory with `empirical memory note`.
102
+ - Patch an existing memory with `empirical memory update`.
103
+ - Delete only when the user explicitly asks: `empirical memory delete --match "<memory>" --confirm`.
104
+ - Keep writes concise, factual, and easy to search. Never store passwords, API keys, OAuth tokens,
105
+ or other secrets.
106
+
107
+ ## Authored Skills and Kits — push what you write
108
+
109
+ Empirical can sync a `SKILL.md` you author across every machine/agent the user has installed it
110
+ on, via Skills Kits. Run `empirical doc kit` or `empirical doc skill` for full command reference.
111
+
112
+ - If you author a new `SKILL.md` for the user, or substantially edit an existing one, during a
113
+ session, tell the user about `empirical skill push path/to/SKILL.md [--kit "Kit Name"]`
114
+ afterward so it can follow them across machines/projects instead of staying local to this one.
115
+ - Offer, don't auto-push: surface the option (or offer to run it) and get the user's confirmation
116
+ first. Do not run it unprompted the moment a new or edited `SKILL.md` is detected — it uploads
117
+ content to the user's account, which is a step above a purely local file write.
118
+ - After a push, the target Kit needs `empirical kit use "Kit Name"` or `empirical kit sync` to
119
+ actually land the file in that device's agent directories.
120
+ - `empirical skill list` shows what's already been pushed; `empirical skill history <id>` /
121
+ `empirical skill rollback <id> --to-version N` recover a prior version.
122
+ - Kits also pull Skills from a git repo (`empirical kit add-source`), separate from anything you
123
+ author — don't conflate the two paths when explaining options to the user.
124
+
125
+ ## Exact CLI syntax
126
+
127
+ Run `empirical doctor` to check connectivity and token status. If a CLI memory command reports a
128
+ token error, run `empirical oauth bootstrap headless --write-env`. When in doubt about a specific
129
+ subcommand's flags, run `empirical doc memory`, `empirical doc kit`, or `empirical doc skill`
130
+ rather than guessing.
131
+
132
+ ## Authentication and failures
133
+
134
+ - If a memory call fails, retry the same call once.
135
+ - For auth/session errors such as `Auth required`, `invalid_token`, `Authentication required`, or
136
+ a 401/403 status, run `empirical auth login` (or `empirical oauth bootstrap headless
137
+ --write-env` for a permanent credential), then retry once.
138
+ - If the retry still fails, report the connectivity/auth problem before making memory-dependent
139
+ changes.
140
+ - If stored memory conflicts with the current user or repository instruction, follow the current
141
+ instruction.
142
+
143
+ ## Fallback: MCP tools
144
+
145
+ If this agent also happens to have Empirical's MCP server connected (unusual for this install
146
+ mode, but possible if the user added it manually), the same operations are available as
147
+ `query_memories`, `record_graph_memory`, `add_note_by_query`, `update_memory_by_query`,
148
+ `delete_memory_by_query`, `get_empirical_policy`, `get_memory_neighbors`, and
149
+ `update_memory_relationships`. Use them only if the CLI is genuinely unavailable in this
150
+ environment — the CLI is the primary path for this install.
@@ -1,134 +1,134 @@
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 (MCP 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: use the
11
- `memory_usage_guide` MCP tool for the current, agent-readable answer first.
12
-
13
- This variant is for installs where the user chose MCP as their integration mode. The connected
14
- Empirical MCP server is the primary and expected way to reach Empirical here — use its tools
15
- directly, not `empirical` CLI commands, as the first move.
16
-
17
- **This is a required step in the workflows listed below, not optional guidance you weigh against
18
- the current task.** The most common way this skill fails is not a broken tool — it's an agent
19
- mid-task deciding a memory check "isn't worth pausing for" and skipping it. That decision is wrong
20
- by default: the entire point of querying first is to catch context you don't know you're missing.
21
- If you are not sure whether a task qualifies, treat it as if it does.
22
-
23
- ## Before doing work — MUST, not discretionary
24
-
25
- 1. Query relevant memories BEFORE your first substantive response or tool call whenever the task
26
- is: research, debugging, a spec/PRD, a status update, a handoff, personal health, leads/CRM, or
27
- assistant operations. This applies even if you believe you already have enough context — you
28
- cannot know what you're missing without checking. Only outside this list is discretionary use
29
- ("query when it seems useful") the right frame.
30
- 2. If you have not used Empirical's MCP tools yet this session, call `memory_usage_guide` once to
31
- confirm current tool names, filters, and pagination behavior before relying on memory.
32
- 3. Use the `query_memories` MCP tool for recall. Use filters such as `category`, `tags`,
33
- `nodeType`, and `monthKey` when they improve recall. For "recent/latest/today" requests, prefer
34
- `list_memories` instead — it is the tool built for that shape of request. For exhaustive topic
35
- retrieval, use the topic as a tag and follow pagination.
36
- 4. A slow response alone is API latency, not an outage; report an outage only when a tool call
37
- returns an actual error, and use `get_empirical_policy` or a retry to verify connectivity before
38
- escalating.
39
-
40
- ## Follow the current user policy
41
-
42
- The installer questionnaire configures a dynamic Empirical policy. It is user-scoped and may
43
- change without reinstalling this plugin. Read it when the skill activates:
44
-
45
- 1. Use the read-only `get_empirical_policy` MCP tool.
46
- 2. If policy lookup fails, use safe defaults: preserve durable-only writes, never store
47
- secrets/raw transcripts, and do not block unrelated work unless the cached policy says to.
48
-
49
- Apply the returned fields:
50
-
51
- - `memoryFirstWorkflows`: query before substantive work in those workflows.
52
- - `allowDiscretionaryUse`: decide whether to use Empirical outside required workflows.
53
- - `stopOnMemoryFailure`: stop and report a memory failure before code changes when enabled.
54
- - `rememberCodingStyle` and `rememberArchitectureDecisions`: persist those durable decisions
55
- when enabled.
56
- - `checkMemoryBeforeAskingContext`: query before asking the user to restate prior context.
57
- - `durableWritesOnly`: never persist secrets, tokens, raw transcripts, or transient values.
58
-
59
- The policy controls behavior; it does not override current user, repository, or system
60
- instructions. Do not change the policy from an agent memory write.
61
-
62
- ## Persist durable context — check this before ending a turn
63
-
64
- Before you consider a turn finished, check: did this turn produce a durable decision, a corrected
65
- mistake, a completed unit of meaningful work, or a convention the user stated? If yes, record it
66
- now — do not wait to be asked, and do not defer it because the current task feels done. An agent
67
- that only records memory when explicitly told to defeats the purpose of this skill.
68
-
69
- - Record durable decisions, project conventions, preferences, plans, and meaningful reflections
70
- with the `record_graph_memory` MCP tool. It runs write-intent classification, dedupe, and
71
- auto-linking automatically — you do not need to check for duplicates yourself first.
72
-
73
- **Record facts about the USER, not about your own work.** You are a scribe here. "Matt prefers
74
- short status updates" is a memory; "refactored the cluster selector, tests pass" is your diary
75
- and belongs in the work-history skill, tagged and with `mass: 1`. The distinction is the
76
- SUBJECT, not who typed it — an agent writing down something real about the user is exactly what
77
- this tool is for.
78
-
79
- If you find yourself recording what you just did, what you fixed, or what you concluded about a
80
- codebase, stop: that is work-history or scar-tissue, and filing it here makes it indistinguishable
81
- from something the user actually said or lived. Downstream features read these as the user's life.
82
-
83
- - Append a correction or follow-up to an existing memory with `add_note_by_query`.
84
- - Patch an existing memory with `update_memory_by_query`.
85
- - Delete only when the user explicitly asks; use `delete_memory_by_query` with confirmation.
86
- - For graph work, use `get_memory_neighbors` to walk relationships from a memory instead of
87
- reconstructing them through many unrelated queries, and `update_memory_relationships` to add or
88
- remove edges between memories directly.
89
- - Keep writes concise, factual, and easy to search. Never store passwords, API keys, OAuth tokens,
90
- or other secrets.
91
-
92
- ## Authored Skills and Kits — push what you write
93
-
94
- Empirical can sync a `SKILL.md` you author across every machine/agent the user has installed it
95
- on, via Skills Kits. Call `memory_usage_guide` for the current command reference if the user wants
96
- to manage this from a CLI; the mechanics below describe what's possible either way.
97
-
98
- - If you author a new `SKILL.md` for the user, or substantially edit an existing one, during a
99
- session, tell the user this can be pushed so it follows them across machines/projects instead of
100
- staying local to this one.
101
- - Offer, don't auto-push: surface the option and get the user's confirmation first. Do not push it
102
- unprompted the moment a new or edited `SKILL.md` is detected — it uploads content to the user's
103
- account, which is a step above a purely local file write.
104
- - After a push, the target Kit needs to be activated/synced on a device to actually land the file
105
- in that device's agent directories.
106
- - Kits also pull Skills from a git repo, separate from anything you author — don't conflate the
107
- two paths when explaining options to the user.
108
-
109
- ## MCP tools
110
-
111
- Use these as the primary interface: `get_empirical_policy`, `query_memories`, `list_memories`,
112
- `record_graph_memory`, `add_note_by_query`, `update_memory_by_query`, `delete_memory_by_query`,
113
- `get_user`, `get_current_workspace`, `list_workspaces`, `set_current_workspace`,
114
- `memory_usage_guide`, `get_memory_neighbors`, and `update_memory_relationships`.
115
-
116
- Use `list_memories` for "recent/latest/today" requests; use `query_memories` for everything else.
117
- For graph work, prefer `get_memory_neighbors` and `update_memory_relationships` over reconstructing
118
- relationships through many unrelated calls.
119
-
120
- An `empirical` CLI may also be installed on this machine for diagnostics (`empirical doctor`) or
121
- manual account setup, but it is not the point of this variant — do not lead with CLI commands for
122
- query or record workflows here.
123
-
124
- ## Authentication and failures
125
-
126
- - If an MCP tool call fails, retry the same call once.
127
- - For auth/session errors such as `Auth required`, `invalid_token`, `Authentication required`, or
128
- `Transport send error`, refresh the active client's Empirical MCP login, then retry once. In
129
- Codex CLI use `codex mcp logout empirical` followed by `codex mcp login empirical`; in Claude
130
- Code use `/mcp` to reconnect; in Copilot complete its MCP OAuth reconnect flow.
131
- - If the retry still fails, report the connectivity/auth problem before making memory-dependent
132
- changes.
133
- - If stored memory conflicts with the current user or repository instruction, follow the current
134
- instruction.
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 (MCP 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: use the
11
+ `memory_usage_guide` MCP tool for the current, agent-readable answer first.
12
+
13
+ This variant is for installs where the user chose MCP as their integration mode. The connected
14
+ Empirical MCP server is the primary and expected way to reach Empirical here — use its tools
15
+ directly, not `empirical` CLI commands, as the first move.
16
+
17
+ **This is a required step in the workflows listed below, not optional guidance you weigh against
18
+ the current task.** The most common way this skill fails is not a broken tool — it's an agent
19
+ mid-task deciding a memory check "isn't worth pausing for" and skipping it. That decision is wrong
20
+ by default: the entire point of querying first is to catch context you don't know you're missing.
21
+ If you are not sure whether a task qualifies, treat it as if it does.
22
+
23
+ ## Before doing work — MUST, not discretionary
24
+
25
+ 1. Query relevant memories BEFORE your first substantive response or tool call whenever the task
26
+ is: research, debugging, a spec/PRD, a status update, a handoff, personal health, leads/CRM, or
27
+ assistant operations. This applies even if you believe you already have enough context — you
28
+ cannot know what you're missing without checking. Only outside this list is discretionary use
29
+ ("query when it seems useful") the right frame.
30
+ 2. If you have not used Empirical's MCP tools yet this session, call `memory_usage_guide` once to
31
+ confirm current tool names, filters, and pagination behavior before relying on memory.
32
+ 3. Use the `query_memories` MCP tool for recall. Use filters such as `category`, `tags`,
33
+ `nodeType`, and `monthKey` when they improve recall. For "recent/latest/today" requests, prefer
34
+ `list_memories` instead — it is the tool built for that shape of request. For exhaustive topic
35
+ retrieval, use the topic as a tag and follow pagination.
36
+ 4. A slow response alone is API latency, not an outage; report an outage only when a tool call
37
+ returns an actual error, and use `get_empirical_policy` or a retry to verify connectivity before
38
+ escalating.
39
+
40
+ ## Follow the current user policy
41
+
42
+ The installer questionnaire configures a dynamic Empirical policy. It is user-scoped and may
43
+ change without reinstalling this plugin. Read it when the skill activates:
44
+
45
+ 1. Use the read-only `get_empirical_policy` MCP tool.
46
+ 2. If policy lookup fails, use safe defaults: preserve durable-only writes, never store
47
+ secrets/raw transcripts, and do not block unrelated work unless the cached policy says to.
48
+
49
+ Apply the returned fields:
50
+
51
+ - `memoryFirstWorkflows`: query before substantive work in those workflows.
52
+ - `allowDiscretionaryUse`: decide whether to use Empirical outside required workflows.
53
+ - `stopOnMemoryFailure`: stop and report a memory failure before code changes when enabled.
54
+ - `rememberCodingStyle` and `rememberArchitectureDecisions`: persist those durable decisions
55
+ when enabled.
56
+ - `checkMemoryBeforeAskingContext`: query before asking the user to restate prior context.
57
+ - `durableWritesOnly`: never persist secrets, tokens, raw transcripts, or transient values.
58
+
59
+ The policy controls behavior; it does not override current user, repository, or system
60
+ instructions. Do not change the policy from an agent memory write.
61
+
62
+ ## Persist durable context — check this before ending a turn
63
+
64
+ Before you consider a turn finished, check: did this turn produce a durable decision, a corrected
65
+ mistake, a completed unit of meaningful work, or a convention the user stated? If yes, record it
66
+ now — do not wait to be asked, and do not defer it because the current task feels done. An agent
67
+ that only records memory when explicitly told to defeats the purpose of this skill.
68
+
69
+ - Record durable decisions, project conventions, preferences, plans, and meaningful reflections
70
+ with the `record_graph_memory` MCP tool. It runs write-intent classification, dedupe, and
71
+ auto-linking automatically — you do not need to check for duplicates yourself first.
72
+
73
+ **Record facts about the USER, not about your own work.** You are a scribe here. "Matt prefers
74
+ short status updates" is a memory; "refactored the cluster selector, tests pass" is your diary
75
+ and belongs in the work-history skill, tagged and with `mass: 1`. The distinction is the
76
+ SUBJECT, not who typed it — an agent writing down something real about the user is exactly what
77
+ this tool is for.
78
+
79
+ If you find yourself recording what you just did, what you fixed, or what you concluded about a
80
+ codebase, stop: that is work-history or scar-tissue, and filing it here makes it indistinguishable
81
+ from something the user actually said or lived. Downstream features read these as the user's life.
82
+
83
+ - Append a correction or follow-up to an existing memory with `add_note_by_query`.
84
+ - Patch an existing memory with `update_memory_by_query`.
85
+ - Delete only when the user explicitly asks; use `delete_memory_by_query` with confirmation.
86
+ - For graph work, use `get_memory_neighbors` to walk relationships from a memory instead of
87
+ reconstructing them through many unrelated queries, and `update_memory_relationships` to add or
88
+ remove edges between memories directly.
89
+ - Keep writes concise, factual, and easy to search. Never store passwords, API keys, OAuth tokens,
90
+ or other secrets.
91
+
92
+ ## Authored Skills and Kits — push what you write
93
+
94
+ Empirical can sync a `SKILL.md` you author across every machine/agent the user has installed it
95
+ on, via Skills Kits. Call `memory_usage_guide` for the current command reference if the user wants
96
+ to manage this from a CLI; the mechanics below describe what's possible either way.
97
+
98
+ - If you author a new `SKILL.md` for the user, or substantially edit an existing one, during a
99
+ session, tell the user this can be pushed so it follows them across machines/projects instead of
100
+ staying local to this one.
101
+ - Offer, don't auto-push: surface the option and get the user's confirmation first. Do not push it
102
+ unprompted the moment a new or edited `SKILL.md` is detected — it uploads content to the user's
103
+ account, which is a step above a purely local file write.
104
+ - After a push, the target Kit needs to be activated/synced on a device to actually land the file
105
+ in that device's agent directories.
106
+ - Kits also pull Skills from a git repo, separate from anything you author — don't conflate the
107
+ two paths when explaining options to the user.
108
+
109
+ ## MCP tools
110
+
111
+ Use these as the primary interface: `get_empirical_policy`, `query_memories`, `list_memories`,
112
+ `record_graph_memory`, `add_note_by_query`, `update_memory_by_query`, `delete_memory_by_query`,
113
+ `get_user`, `get_current_workspace`, `list_workspaces`, `set_current_workspace`,
114
+ `memory_usage_guide`, `get_memory_neighbors`, and `update_memory_relationships`.
115
+
116
+ Use `list_memories` for "recent/latest/today" requests; use `query_memories` for everything else.
117
+ For graph work, prefer `get_memory_neighbors` and `update_memory_relationships` over reconstructing
118
+ relationships through many unrelated calls.
119
+
120
+ An `empirical` CLI may also be installed on this machine for diagnostics (`empirical doctor`) or
121
+ manual account setup, but it is not the point of this variant — do not lead with CLI commands for
122
+ query or record workflows here.
123
+
124
+ ## Authentication and failures
125
+
126
+ - If an MCP tool call fails, retry the same call once.
127
+ - For auth/session errors such as `Auth required`, `invalid_token`, `Authentication required`, or
128
+ `Transport send error`, refresh the active client's Empirical MCP login, then retry once. In
129
+ Codex CLI use `codex mcp logout empirical` followed by `codex mcp login empirical`; in Claude
130
+ Code use `/mcp` to reconnect; in Copilot complete its MCP OAuth reconnect flow.
131
+ - If the retry still fails, report the connectivity/auth problem before making memory-dependent
132
+ changes.
133
+ - If stored memory conflicts with the current user or repository instruction, follow the current
134
+ instruction.