memoir-cli 3.12.0 → 3.14.0

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 (73) hide show
  1. package/README.md +128 -137
  2. package/bin/memoir-work.js +9 -0
  3. package/bin/memoir.js +50 -8
  4. package/docs/AUDIT-REMEDIATION.md +55 -0
  5. package/docs/CASE_TAPE_AMNESIA.md +39 -0
  6. package/docs/HANDOFF-SECURITY-AUDIT.md +106 -0
  7. package/docs/LOCAL-HANDOFF-VALIDATION.md +129 -0
  8. package/docs/MCP-V2-MIGRATION.md +17 -0
  9. package/docs/PROJECT-HANDOFF.md +255 -0
  10. package/docs/PROJECT-VIEW-DEBUG.md +66 -0
  11. package/docs/PROJECT-VIEW-VALIDATION.md +136 -0
  12. package/docs/RELEASE-3.14-VALIDATION.md +36 -0
  13. package/docs/RELIABILITY-ROLLOUT.md +57 -0
  14. package/docs/RETRIEVAL-INDEX.md +45 -0
  15. package/docs/RETRIEVAL-RESULTS.md +26 -0
  16. package/docs/SPEC.md +684 -0
  17. package/evals/CONTINUITY-PROTOCOL.md +45 -0
  18. package/evals/cases.json +200 -0
  19. package/evals/results/retrieval-2026-09-05.json +5333 -0
  20. package/evals/retrieval-performance.mjs +99 -0
  21. package/evals/run.mjs +87 -0
  22. package/package.json +13 -5
  23. package/src/adapters/index.js +13 -6
  24. package/src/adapters/restore.js +83 -36
  25. package/src/cloud/storage.js +130 -93
  26. package/src/commands/activate.js +18 -7
  27. package/src/commands/cloud.js +55 -4
  28. package/src/commands/consolidate.js +49 -10
  29. package/src/commands/diff.js +2 -2
  30. package/src/commands/doctor.js +3 -3
  31. package/src/commands/push.js +156 -161
  32. package/src/commands/recall.js +1 -1
  33. package/src/commands/restore.js +32 -44
  34. package/src/commands/resume.js +15 -164
  35. package/src/commands/session.js +51 -9
  36. package/src/commands/snapshot.js +6 -7
  37. package/src/commands/status.js +23 -1
  38. package/src/commands/upgrade.js +11 -9
  39. package/src/commands/validate.js +3 -0
  40. package/src/commands/view.js +2 -2
  41. package/src/commands/why.js +4 -3
  42. package/src/config.js +9 -40
  43. package/src/context/capture.js +126 -32
  44. package/src/context/handoffs.js +72 -0
  45. package/src/events/summary.js +122 -0
  46. package/src/integrations/setup.js +88 -0
  47. package/src/mcp.js +105 -152
  48. package/src/memory/lexical-index.js +65 -0
  49. package/src/memory/repository.js +16 -0
  50. package/src/memory/scope.js +65 -0
  51. package/src/memory/search.js +165 -70
  52. package/src/memory/store.js +141 -0
  53. package/src/providers/index.js +182 -51
  54. package/src/providers/restore.js +5 -1
  55. package/src/security/encryption.js +34 -60
  56. package/src/security/files.js +155 -0
  57. package/src/session/brief.js +47 -0
  58. package/src/session/inject.js +12 -6
  59. package/src/session/lock.js +39 -118
  60. package/src/session/migrations.js +6 -0
  61. package/src/session/render.js +34 -4
  62. package/src/session/state.js +200 -33
  63. package/src/work/cli.js +64 -0
  64. package/src/work/errors.js +8 -0
  65. package/src/work/server.js +28 -0
  66. package/src/work/setup.js +96 -0
  67. package/src/work/store.js +340 -0
  68. package/src/work/ui/app.js +205 -0
  69. package/src/work/ui/index.html +30 -0
  70. package/src/work/ui/style.css +3 -0
  71. package/src/work/view.js +93 -0
  72. package/src/workspace/tracker.js +84 -332
  73. package/supabase/migrations/202609050001_backup_versions.sql +50 -0
@@ -0,0 +1,45 @@
1
+ # Coding continuity comparison protocol — proposal v1
2
+
3
+ This protocol defines future evaluation. It does not contain a completed user study, held-out task corpus, or competitor score. Existing `cases.json` is a development regression fixture; the retrieval performance corpus measures latency only.
4
+
5
+ ## Primary question
6
+
7
+ Does memory help a returning developer or coding agent take the first appropriate action and finish a paused task, compared with the strongest practical baseline?
8
+
9
+ The primary proposed outcome is elapsed reorientation time: from receiving the resumed task to the first action that a prewritten task verifier or a blinded reviewer considers appropriate. Count failures and timeouts explicitly. Task completion, repeated failed approaches, unsupported claims, and total operating cost are required secondary outcomes.
10
+
11
+ ## Freeze before testing
12
+
13
+ - Start with 30 continuation tasks across several repositories and at least three languages. Treat this as a pilot. Split by repository/task family; near-duplicate histories must not cross development/evaluation boundaries.
14
+ - Include decisions and rationale, changed code/branches, failed approaches, cross-client handoffs, conflicting updates, absent evidence, scope/deletion boundaries, and multilingual wording.
15
+ - For each task, record the repository revision, prior session history, interruption point, permitted sources, valid and invalid next actions, completion verifier, timeout, and failure labels. Freeze a manifest hash before tuning prompts or retrieval on the evaluation tasks.
16
+ - Keep the held-out material outside training/tuning fixtures. Publishing a protocol or generating new examples in the same development session does not make the examples independent.
17
+
18
+ ## Conditions
19
+
20
+ Compare Memoir with native client memory enabled where available, a plain project plan/findings/progress baseline, and a small relevant external set: Claude-Mem, Engram, and Cass Memory first; EverOS for the portable-file/index comparison. Record the exact release/commit and actual integration support. A current default-branch README is not proof of a tested release.
21
+
22
+ Use the same task, history, downstream model, permissions, context budget, and verifier where feasible. Record differences that cannot be normalized. Use isolated workspaces and memory stores for every condition to prevent contamination. Randomize/counterbalance condition order and repeat nondeterministic runs. Never feed a failed condition's discoveries into a later condition's starting state.
23
+
24
+ ## Required record for each run
25
+
26
+ | Field | Meaning |
27
+ |---|---|
28
+ | task_id, task_manifest_hash, condition, repetition | Identity and reproducibility |
29
+ | repository_commit, harness_commit, memory_version | Exact code and system revision |
30
+ | model, embedding_model, judge, configuration_hash | Model/configuration differences |
31
+ | start, first_appropriate_action, end, timeout | Timings; absent events must remain absent |
32
+ | completion_verified, verifier_output | Outcome and evidence |
33
+ | repeated_failed_approach, unsupported_memory, wrong_scope, stale_state_used | Failure labels with supporting traces |
34
+ | ingestion_tokens, maintenance_tokens, retrieval_tokens, answer_tokens | Whole-lifecycle usage, not just the final prompt |
35
+ | cost, retrieved_evidence_ids, memory_edits, setup_minutes | Cost, traceability, and operational burden |
36
+
37
+ Use public/synthetic histories or explicitly consented, redacted user material. The project's distribution constraint remains SEO/automation only; obtain participants through inbound opt-in, not unsolicited outreach.
38
+
39
+ ## Analysis and decision
40
+
41
+ Report paired differences, sample counts, medians, p95 where adequately sampled, confidence intervals, and failures by category. Retrieval Recall@k is a diagnostic and must not be relabeled answer accuracy or task completion.
42
+
43
+ Proposed investment gate: at least 25% lower median reorientation time against the strongest tested baseline without worse completion or more serious memory errors. Pre-register the actual gate before running the pilot. If intervals remain wide or only a few tasks drive the result, expand the sample rather than declaring success.
44
+
45
+ A release still requires the separate isolation, recovery, client acceptance, and cloud policy checks. No benchmark result compensates for a lost acknowledged write. Zero observed violations in a finite suite does not establish universal safety. A SOTA claim must name the precise task/configuration, release reproduction artifacts, and obtain independent confirmation.
@@ -0,0 +1,200 @@
1
+ {
2
+ "version": 1,
3
+ "records": [
4
+ {
5
+ "key": "retry",
6
+ "text": "Retry failed recovery jobs with exponential backoff and a maximum of five attempts."
7
+ },
8
+ {
9
+ "key": "payments",
10
+ "text": "Payment webhooks require idempotency keys before changing account state."
11
+ },
12
+ {
13
+ "key": "database-a",
14
+ "text": "Project database choice is PostgreSQL; transactions protect recovery tokens."
15
+ },
16
+ {
17
+ "key": "database-b",
18
+ "project": "beta",
19
+ "text": "Project database choice is SQLite for the offline desktop client."
20
+ },
21
+ {
22
+ "key": "preference",
23
+ "project": "shared",
24
+ "text": "Prefer concise explanations with concrete examples."
25
+ },
26
+ {
27
+ "key": "alias",
28
+ "text": "The interface uses a vertical swipe feed.",
29
+ "aliases": [
30
+ "short video navigation"
31
+ ]
32
+ },
33
+ {
34
+ "key": "chinese",
35
+ "text": "数据库使用 PostgreSQL,备份每天运行。"
36
+ },
37
+ {
38
+ "key": "spanish",
39
+ "text": "La autenticación usa códigos de recuperación de un solo uso."
40
+ },
41
+ {
42
+ "key": "hidden",
43
+ "text": "hidden-canary-marker must never be recalled.",
44
+ "metadata": {
45
+ "hidden": true
46
+ }
47
+ },
48
+ {
49
+ "key": "expired",
50
+ "text": "expired-canary-marker used the old deployment endpoint.",
51
+ "metadata": {
52
+ "valid_until": "2020-01-01T00:00:00Z"
53
+ }
54
+ },
55
+ {
56
+ "key": "future",
57
+ "text": "future-canary-marker is not effective yet.",
58
+ "metadata": {
59
+ "valid_from": "2099-01-01T00:00:00Z"
60
+ }
61
+ },
62
+ {
63
+ "key": "superseded",
64
+ "text": "superseded-canary-marker is obsolete.",
65
+ "metadata": {
66
+ "superseded_by": "replacement"
67
+ }
68
+ },
69
+ {
70
+ "key": "negation",
71
+ "text": "Do not retry a consumed recovery token; issue a new token."
72
+ },
73
+ {
74
+ "key": "numeric",
75
+ "text": "Incident 42 affected retry workers; incident 43 affected webhooks."
76
+ }
77
+ ],
78
+ "cases": [
79
+ {
80
+ "name": "exact evidence",
81
+ "query": "idempotency",
82
+ "expected": [
83
+ "payments"
84
+ ]
85
+ },
86
+ {
87
+ "name": "multi-term evidence",
88
+ "query": "exponential backoff",
89
+ "expected": [
90
+ "retry"
91
+ ]
92
+ },
93
+ {
94
+ "name": "alpha scope",
95
+ "query": "database choice",
96
+ "expected": [
97
+ "database-a"
98
+ ],
99
+ "forbidden": [
100
+ "database-b"
101
+ ]
102
+ },
103
+ {
104
+ "name": "beta scope",
105
+ "project": "beta",
106
+ "query": "database choice",
107
+ "expected": [
108
+ "database-b"
109
+ ],
110
+ "forbidden": [
111
+ "database-a"
112
+ ]
113
+ },
114
+ {
115
+ "name": "shared preference",
116
+ "project": "beta",
117
+ "query": "concise explanations",
118
+ "expected": [
119
+ "preference"
120
+ ]
121
+ },
122
+ {
123
+ "name": "alias expansion",
124
+ "query": "short video navigation",
125
+ "expected": [
126
+ "alias"
127
+ ]
128
+ },
129
+ {
130
+ "name": "Chinese",
131
+ "query": "数据库",
132
+ "expected": [
133
+ "chinese"
134
+ ]
135
+ },
136
+ {
137
+ "name": "accented Spanish",
138
+ "query": "autenticación recuperación",
139
+ "expected": [
140
+ "spanish"
141
+ ]
142
+ },
143
+ {
144
+ "name": "hidden abstention",
145
+ "query": "hidden-canary-marker",
146
+ "expected": [],
147
+ "forbidden": [
148
+ "hidden"
149
+ ]
150
+ },
151
+ {
152
+ "name": "expired abstention",
153
+ "query": "expired-canary-marker",
154
+ "expected": [],
155
+ "forbidden": [
156
+ "expired"
157
+ ]
158
+ },
159
+ {
160
+ "name": "future abstention",
161
+ "query": "future-canary-marker",
162
+ "expected": [],
163
+ "forbidden": [
164
+ "future"
165
+ ]
166
+ },
167
+ {
168
+ "name": "superseded abstention",
169
+ "query": "superseded-canary-marker",
170
+ "expected": [],
171
+ "forbidden": [
172
+ "superseded"
173
+ ]
174
+ },
175
+ {
176
+ "name": "unknown abstention",
177
+ "query": "unrecorded-kubernetes-pod",
178
+ "expected": []
179
+ },
180
+ {
181
+ "name": "negation evidence",
182
+ "query": "not retry consumed token",
183
+ "expected": [
184
+ "negation"
185
+ ]
186
+ },
187
+ {
188
+ "name": "numeric evidence",
189
+ "query": "incident 42",
190
+ "expected": [
191
+ "numeric"
192
+ ]
193
+ },
194
+ {
195
+ "name": "empty abstention",
196
+ "query": "",
197
+ "expected": []
198
+ }
199
+ ]
200
+ }