@dreamforgestudiollc/emet 0.2.4 → 0.3.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 (116) hide show
  1. package/.env.example +63 -0
  2. package/CHANGELOG.md +84 -3
  3. package/CHARTER.md +19 -7
  4. package/README.md +130 -21
  5. package/areas/emet.md +18 -0
  6. package/areas/garden.md +18 -0
  7. package/areas/health.md +18 -0
  8. package/areas/home.md +18 -0
  9. package/areas/learning.md +18 -0
  10. package/areas/state.md +18 -0
  11. package/docs/AUTHORSHIP.md +3 -3
  12. package/docs/BOTS.md +4 -0
  13. package/docs/COVERAGE.md +2 -2
  14. package/docs/DEPLOY.md +41 -5
  15. package/docs/ERROR-CODES-SPEC.md +43 -0
  16. package/docs/ERROR-CODES.md +332 -0
  17. package/docs/GUARDRAILS-AND-MONORAILS.md +2 -1
  18. package/docs/GUIDED-SETUP.md +24 -3
  19. package/docs/PERMISSIONS.md +13 -7
  20. package/docs/ROADMAP.md +18 -15
  21. package/docs/SETUP.md +123 -14
  22. package/docs/SUBKEYS.md +59 -0
  23. package/gems/artifact-index.json +12 -0
  24. package/gems/bot-team-backup/floor.json +15 -0
  25. package/gems/bot-team-backup/gem.json +43 -0
  26. package/gems/bot-team-backup/guides/BOT_TEAM_BACKUP.md +27 -0
  27. package/gems/bot-team-backup/guides/BOT_TEAM_RECOVERY.md +23 -0
  28. package/gems/fieldnote/floor.json +14 -0
  29. package/gems/fieldnote/gem.json +70 -0
  30. package/gems/fieldnote/runes/fieldnote.js +4 -0
  31. package/gems/lean-six-sigma/CHANGELOG.md +10 -0
  32. package/gems/lean-six-sigma/README.md +92 -0
  33. package/gems/lean-six-sigma/floor.json +31 -0
  34. package/gems/lean-six-sigma/gem.json +1296 -0
  35. package/gems/lean-six-sigma/guides/ASSUMPTIONS.md +45 -0
  36. package/gems/lean-six-sigma/guides/BELTS.md +52 -0
  37. package/gems/lean-six-sigma/guides/DMADV.md +56 -0
  38. package/gems/lean-six-sigma/guides/DMAIC.md +127 -0
  39. package/gems/lean-six-sigma/guides/FORMULAS.md +330 -0
  40. package/gems/lean-six-sigma/guides/LEAN.md +97 -0
  41. package/gems/lean-six-sigma/guides/TEMPLATES.md +279 -0
  42. package/gems/lean-six-sigma/runes/lss_capability.js +132 -0
  43. package/gems/lean-six-sigma/runes/lss_control_limits.js +240 -0
  44. package/gems/lean-six-sigma/runes/lss_dpmo_sigma.js +81 -0
  45. package/gems/lean-six-sigma/runes/lss_hypothesis.js +298 -0
  46. package/gems/lean-six-sigma/runes/lss_sample_size.js +81 -0
  47. package/gems/neurendipity/floor.json +65 -0
  48. package/gems/neurendipity/gem.json +42 -0
  49. package/gems/neurendipity/guides/AUTISTIC_BURNOUT.md +81 -0
  50. package/{guides → gems/neurendipity/guides}/NEURODIVERGENT_SUPPORT.md +17 -8
  51. package/guides/README.md +3 -0
  52. package/package.json +12 -5
  53. package/server.json +48 -4
  54. package/src/aleph.js +18 -12
  55. package/src/annotations.js +45 -5
  56. package/src/atlas-role.js +9 -4
  57. package/src/attribution.js +555 -0
  58. package/src/conformance.js +7 -5
  59. package/src/database.js +34 -17
  60. package/src/dispatch.js +136 -16
  61. package/src/env.js +54 -9
  62. package/src/error-codes.js +394 -0
  63. package/src/error-log.js +273 -0
  64. package/src/error-report.js +245 -0
  65. package/src/floor.js +84 -41
  66. package/src/gaps.js +41 -8
  67. package/src/gem-check.js +1360 -0
  68. package/src/guides.js +31 -4
  69. package/src/host-reach.js +23 -0
  70. package/src/http-remote.js +47 -2
  71. package/src/index.js +10 -2
  72. package/src/invites.js +6 -5
  73. package/src/layers.js +9 -8
  74. package/src/lessons-to-checks.js +3 -3
  75. package/src/logger.js +2 -1
  76. package/src/mongo-connect.js +50 -2
  77. package/src/oauth-provider.js +30 -29
  78. package/src/owner-approvals.js +281 -0
  79. package/src/pages.js +806 -0
  80. package/src/persons.js +22 -1
  81. package/src/provenance.js +10 -10
  82. package/src/redact.js +10 -4
  83. package/src/request-log.js +1 -1
  84. package/src/rune-dispatch.js +360 -0
  85. package/src/rune-registry.js +71 -0
  86. package/src/rune-scope.js +42 -0
  87. package/src/scopes.js +3 -0
  88. package/src/session-graph.js +15 -12
  89. package/src/session.js +10 -10
  90. package/src/setup.js +307 -36
  91. package/src/socket.js +545 -0
  92. package/src/startup-pages.js +26 -8
  93. package/src/startup-payload.js +12 -8
  94. package/src/subkey-store.js +358 -0
  95. package/src/subkeys.js +947 -0
  96. package/src/tools.js +518 -204
  97. package/src/transcript-session.js +1 -1
  98. package/src/validation.js +85 -52
  99. package/src/version.js +1 -1
  100. package/templates/AREA.md +35 -0
  101. package/templates/BOARD.md +2 -2
  102. package/templates/BOTHANDOFF.md +2 -2
  103. package/templates/CHARACTER.md +1 -1
  104. package/templates/HANDOFF.md +1 -1
  105. package/templates/IDENTITY.md +1 -1
  106. package/templates/INDEX.md +21 -20
  107. package/templates/INSTALL.md +1 -1
  108. package/templates/PROCEDURE.md +1 -1
  109. package/templates/ROSTER.md +2 -2
  110. package/templates/SEED.md +2 -2
  111. package/templates/STAGING.md +2 -2
  112. package/templates/STANDARD.md +5 -5
  113. package/templates/THREAD.md +1 -1
  114. package/templates/USER.md +4 -1
  115. package/verification/load-gate/corpus.json +1765 -0
  116. package/verification/load-gate/load-gate.mjs +1246 -0
@@ -103,7 +103,7 @@ and report plainly. Read all of Part B before running anything.
103
103
  ### Stage 0 — check the ground
104
104
 
105
105
  ```
106
- node --version # need 20+ (package.json engines); 22 preferred
106
+ node --version # need 22+ (package.json engines)
107
107
  npm --version
108
108
  git --version
109
109
  ```
@@ -179,6 +179,22 @@ EMET_SOURCE_TAG=<this computer's name, e.g. laptop>
179
179
 
180
180
  **Verify:** `node -e "import('mongodb').then(async ({MongoClient}) => { const c = new MongoClient(process.env.MONGODB_URI); await c.connect(); console.log('ok', (await c.db('emet').command({ping:1})).ok); await c.close(); })"` — run with the `.env` loaded (`node --env-file=.env -e "..."` on Node 20.6+). Expect `ok 1`. If it times out, the access list has not propagated yet; wait a minute and retry once.
181
181
 
182
+ **Give `emet_app` EMET's role before the server writes.** `atlas setup` leaves a built-in role that can delete. Replace it with `emetRecordKeeper`, defined in `src/atlas-role.js`. The privilege list includes `REMOVE@<db>.error_log` (`<db>` is `emet`) so error-log rotation can delete from `error_log` only (10,000 entries or 90 days, daily summaries kept). Do not grant `REMOVE` on the database. Do not grant `REMOVE` on any other collection.
183
+
184
+ ```
185
+ atlas projects list
186
+ node scripts/atlas-role.mjs --project <projectId> --db emet --user emet_app --prefix <prefix>
187
+ node scripts/atlas-role.mjs --project <projectId> --db emet --user emet_app --prefix <prefix> --apply
188
+ ```
189
+
190
+ The dry run prints the create `scripts/atlas-role.mjs` will run.
191
+ The dry run calls the read-only `atlas customDbRoles describe emetRecordKeeper --projectId <id> --output json`. It needs Atlas auth and changes nothing.
192
+ The `--privilege` value is the full list from `src/atlas-role.js`, including `REMOVE@<db>.error_log`.
193
+ `--apply` runs that command. `--prefix <prefix>` is `EMET_COLLECTION_PREFIX` (default `emet_`). Pass it for a prefixed install. `--prefix` overrides `EMET_COLLECTION_PREFIX`. The effective prefix is `--prefix`, or else the env. Re-applying replaces prefixed privilege names if the effective prefix doesn't match the install.
194
+ Do not pass `--privilege` to `customDbRoles update` on its own. That replaces the whole role and drops find, insert, and update.
195
+
196
+ **Atlas UI, if you are not using the script.** Database Access → Custom Roles → Add New Custom Role, name `emetRecordKeeper`. On collection `error_log`, enable `REMOVE` only (`REMOVE@<db>.error_log`). Add the other actions from [SETUP.md](SETUP.md) stage 1 step 2. Leave `REMOVE` off the database-wide row and off every other collection. Edit `emet_app` and set its role to `emetRecordKeeper`.
197
+
182
198
  **Skip the vector index for now.** `semantic_recall` is optional; keyword recall works without
183
199
  it, and Atlas Automated Embedding is not available on every tier. It is a later step, in
184
200
  [SETUP.md](SETUP.md) stage 1, item 7, once everything else works.
@@ -267,9 +283,14 @@ deployment is real.
267
283
  Say nothing about setup. Call `emet_initialize`. On a new store it returns `setup_required` and
268
284
  the interview questions. Ask them **conversationally, one at a time** — what the assistant should
269
285
  be called and how it should carry itself, the person's name in the form they want used, what the
270
- memory is for, and optionally how they want to be worked with and this host's tag. Then
286
+ memory is for, whether more than one bot or AI will use this memory (yes or no, in their words),
287
+ whether to turn on bot-team backup (yes or no, in their words; Yes and Yes. count as yes; **yes is the recommended choice**; no, or leaving
288
+ it out, leaves it off and the answer is recorded), and optionally how they want to be worked with
289
+ and this host's tag. Then
271
290
  `emet_setup_complete`. It refuses partial answers rather than inventing an identity; that is
272
- correct behaviour.
291
+ correct behaviour. Bot-team backup does not copy prompts or settings, and secret values are never stored.
292
+
293
+ If they answer **no**, or they skip it, leave sub-keys off. If they answer **yes** on the local server that reads `.env`, `emet_setup_complete` writes the flag, a generated pepper, and version 1 into that file after the store writes succeed. The result does not contain the pepper. Do not paste it into the chat. Tell them to restart (or redeploy) the server once. If they answer **yes** against the hosted server, the call refuses before it saves anything. No pepper or .env was written. Tell them to run setup again without yes to finish the rest, and to follow the platform-variable steps in [SUBKEYS.md](SUBKEYS.md): set `EMET_SUBKEYS=1`, an `EMET_SUBKEY_PEPPER` they generate (at least 32 bytes), and `EMET_SUBKEY_PEPPER_VERSION=1`, then redeploy. Do not copy a pepper out of the server. Each bot's tag must be listed in `EMET_SOURCE_TAGS`. The rest is [SUBKEYS.md](SUBKEYS.md).
273
294
 
274
295
  Then hand the person the short instruction block from [BOOTSTRAP.md](BOOTSTRAP.md) to paste
275
296
  into their project instructions, so future sessions consult the memory without being told.
@@ -14,8 +14,11 @@ There are three places, and it is worth being clear about which is which:
14
14
  archiving before replacing, checking the order of a session's writes (the monorail) - all here.
15
15
  - **The database** decides *what the server's own login may do*. EMET's login runs under the
16
16
  least-privilege role `emetRecordKeeper` ([SETUP.md](SETUP.md), `src/atlas-role.js`): it can
17
- insert and update, and it has no permission to remove anything from the record. So "nothing is
18
- deleted" holds even against a bug in the server, not only against a model's choice.
17
+ insert and update, and it has no permission to remove anything from the record. Error-log
18
+ rotation may delete from `error_log` only, so the role includes `REMOVE@<db>.error_log`
19
+ (10,000 entries or 90 days, daily summaries kept). That action is not granted on a memory,
20
+ a controlled document, or a transcript. So "nothing is deleted" holds for the record even
21
+ against a bug in the server, not only against a model's choice.
19
22
 
20
23
  No layer can widen another. In particular, **a server cannot grant itself permission**. Nothing in
21
24
  this repository can stop your host from asking you to approve every call, and nothing in it should
@@ -37,18 +40,19 @@ Every tool carries MCP annotations, declared in one table in `src/annotations.js
37
40
  | `idempotentHint` | Calling it again with the same arguments changes nothing further. |
38
41
  | `openWorldHint` | It reaches systems outside this server's own store. |
39
42
 
40
- Of the 29 tools:
43
+ Of the 34 tools (`EMET_SUBKEYS=1` adds the four sub-key tools below; with the flag off they are not registered):
41
44
 
42
- - **11 are read-only.** `emet_gaps`, `emet_floor`, `recall`, `semantic_recall`,
45
+ - **15 are read-only.** `emet_gaps`, `emet_page`, `emet_pages`, `emet_page_lint`, `emet_error_report`, `emet_floor`, `recall`, `semantic_recall`,
43
46
  `corpus_recall`, `query_layer`, `query_transcripts`, `read_doc`, `read_doc_history`, `list_docs`,
44
- `validate_doc`. These cannot change the store under any arguments.
47
+ `validate_doc`. These cannot change the store under any arguments. `emet_page`, `emet_pages`, and `emet_page_lint` are owner-only views: they compute a topic page and never write it back. `emet_error_report` is owner-only and reads the operational error log. It sends nothing.
45
48
  - **10 are additive writes.** `emet_initialize` (it provisions a missing board), `save_to_layer`, `revise_memory`, `save_transcript`,
46
49
  `revise_transcript`, `emet_session_open`, `emet_transcript_append`, `emet_session_close` (it
47
50
  records blocked attempts), `rename_doc`, `accept_nonconformance`. They add; they do not remove or replace.
48
51
  `emet_session_open` still needs the `emet.write` scope, because it stamps the drop list a board edit trusts.
49
52
  `emet_initialize` stays a read.
50
- - **6 can replace what is already there, or hand out access.** `write_doc`, `patch_doc`, `restore_doc`, `emet_setup_complete`,
51
- `emet_invite_create`, `emet_member_access_create`. Prior versions of a document are archived to the history
53
+ - **7 can replace what is already there, or hand out access.** `write_doc`, `patch_doc`, `restore_doc`, `emet_setup_complete`,
54
+ `emet_invite_create`, `emet_member_access_create`, `emet_client_approve` (it admits or refuses a new client).
55
+ Prior versions of a document are archived to the history
52
56
  collection first, but the visible content a person may be relying on is replaced. A code that grants access
53
57
  is marked the same way: it is not a harmless add.
54
58
  - **1 marks a document obsolete.** `retire_doc`. Neither a removal nor a replacement: the
@@ -61,6 +65,8 @@ Of the 29 tools:
61
65
  detect a broken write path. A read-scoped token may call it without `probe`. With `probe: true` it needs
62
66
  `emet.write`. The probe deletes only that document. It does not drop the collection.
63
67
 
68
+ With `EMET_SUBKEYS=1` the host also receives four tools: `emet_subkey_request`, `emet_subkey_claim`, and `emet_subkey_end_session` (additive), and `emet_subkey_revoke` (it retires a key's authority; the record stays). Write tools gain `session_handle`. `emet_session_open` and `emet_session_close` gain `subkey`. With the flag off those names and fields are absent. First-use setup turns the flag on only when the owner says yes and the server reads `.env`. A hosted server refuses that yes. A single client stays on the flag-off list. See [SUBKEYS.md](SUBKEYS.md).
69
+
64
70
  **`openWorldHint` is false on every tool.** The tools talk to this server's configured database
65
71
  and nothing else: no filesystem and no shell. The sign-in server fetches a client's metadata
66
72
  document, and only from a public address it has already checked. That is the main reason a memory
package/docs/ROADMAP.md CHANGED
@@ -1,23 +1,24 @@
1
1
  # EMET — Next Steps and Proposed Features
2
2
 
3
- Status as of 2026-10-07. This is a working roadmap, not a commitment: items move when the owner rules on them. Nothing here is built unless it says so.
3
+ Status as of 2026-10-11 (last full report: [status/2026-09-29-state-of-the-system.md](status/2026-09-29-state-of-the-system.md)). This is a working roadmap, not a commitment: items move when the owner rules on them. Nothing here is built unless it says so.
4
4
 
5
5
  ## Where things stand
6
6
 
7
- - **Live:** 29 tools (11 read-only); layer writes and reads native to MongoDB; server-side checks on session start and close (machine line on the first transcript append, blocked-close cap with scope, pending lessons at startup); receipts required at close; the handoff is a record, superseded and never amended.
7
+ - **Live:** 34 tools (15 read-only); `EMET_SUBKEYS=1` adds four sub-key tools. Layer writes and reads native to MongoDB; server-side checks on session start and close (machine line on the first transcript append, blocked-close cap with scope, pending lessons at startup); receipts required at close; the handoff is a record, superseded and never amended.
8
8
  - **The aleph** verifies every write by reading it back before any receipt, and every later read by its digests, signature and place in its layer's hash chain. `emet_gaps` walks the whole chain for any host.
9
9
  - **Guardrails & Monorails** ([docs/GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md)): the server checks the order of a session's writes. Enforce only since 0.2.1 (deployed 2026-10-03; report mode 2026-09-29 to 2026-10-03): every skipped step is refused with the way to pass, and every check is stored as a timestamped lab result.
10
10
  - **The database** login runs under the least-privilege role `emetRecordKeeper`: it can insert and update, never remove the record.
11
11
  - **Startup load:** since 0.2.1, `emet_initialize` is served in pages of at most 18,000 bytes as received (on a live-sized store, five pages totalling about 68 KB as received, or about 64 KB whole), so a host that cuts long results short still reads all of it; `page: "all"` returns it whole on a host with no size limit.
12
+ - **GEM standard:** drafted 2026-10-11, revision Draft. The socket seats bundled prompt GEMs. Neurendipity is installed at `gems/neurendipity` and off unless `EMET_ACTIVE_GEMS` names it. The text is in [`gem-library/`](../gem-library/README.md). Canonical home: private repository [EMET-GEMs](https://github.com/dreamforgestudiollc/EMET-GEMs).
12
13
 
13
14
  ## Next steps, in order
14
15
 
15
16
  1. **Monorail: enforce only** (decided and deployed 2026-10-03, release 0.2.1). Every skipped step is refused and the refusal says how to pass; there is no report mode or off switch. Every host and scheduled routine must now read its startup, open a session with its `load_id`, and pass the `session_id` on its writes.
16
17
  2. **Admission test on the proposed items.** Every proposed feature below answers the four questions of charter commitment 6 before it is built (2026-09-30 read: the compiled-pages pilot passes; the lint pass needs a named measure; hybrid search, graph links and confidence scores do not pass yet).
17
18
  3. **Initialize payload trim.** Character document trim; measure the payload again.
18
- 4. ~~**Register or retire the `cloud-scheduled-intake` source tag.**~~ Retired 2026-10-02 (the owner, a decision record, item 7): it is a legacy tag; the weekly intake now runs under `intake-bot`, with no `session_id` on its writes; under enforce-only those writes are refused (`no_session`) until it opens a session with its startup's `load_id` (item 1). The existing rows keep counting as ambiguous in `emet_gaps` rather than being re-attributed, and the count stops growing as long as nothing new is written under the old tag. The prefix `cloud-scheduled-<task>` does not count as registered. Only an exact tag in `EMET_SOURCE_TAGS` is accepted, and a refusal does not publish the list.
19
- 5. **Monorail switches.** Small logic at each junction where a session's flow must fork, routing it to the right guardrail space: tripped only by its condition, like a transistor; no hosted model, no API; each designed from the function it serves and the flow of information and tasking through it ([GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md), decided 2026-09-29). First candidate junctions come with the socket, where a switch picks the GEM.
20
- 6. **The socket** — see below.
19
+ 4. ~~**Register or retire the `cloud-scheduled-intake` source tag.**~~ Retired 2026-10-02 (Alex, procedural ref 405 item 7): it is a legacy tag; the weekly intake now runs under `intake-bot`, with no `session_id` on its writes; under enforce-only those writes are refused (`no_session`) until it opens a session with its startup's `load_id` (item 1). The existing rows keep counting as ambiguous in `emet_gaps` rather than being re-attributed, and the count stops growing as long as nothing new is written under the old tag. The prefix `cloud-scheduled-<task>` does not count as registered. Only an exact tag in `EMET_SOURCE_TAGS` is accepted, and a refusal does not publish the list.
20
+ 5. **Monorail switches.** Small logic at each junction where a session's flow must fork, routing it to the right guardrail space: tripped only by its condition, like a transistor; no hosted model, no API; each designed from the function it serves and the flow of information and tasking through it ([GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md), decided 2026-09-29). A switch that picks a GEM waits for its own proposal. It is not one of the socket phases below.
21
+ 6. **The socket.** Phased plan under GEM socket, below. The standard is drafted. The socket, Neurendipity, and RUNED execution are in the tree. A RUNED GEM stays off unless the install names it. Activation beyond `EMET_ACTIVE_GEMS` is not.
21
22
 
22
23
  ## Done since the last revision (2026-09-28)
23
24
 
@@ -29,18 +30,23 @@ Status as of 2026-10-07. This is a working roadmap, not a commitment: items move
29
30
  - Least-privilege Atlas role, scripted and documented for new users.
30
31
  - Provenance stamped from the transcript; semantic and procedural writes with no source refused.
31
32
  - Guardrails & Monorails and lab results.
32
- - Charter revised 2026-09-29 (the aleph, the monorail, the database boundary, the per-exchange transcript) and again 2026-09-30 (the admission test in commitment 6).
33
+ - Charter revised 2026-09-29 (the aleph, the monorail, the database boundary, the per-exchange transcript) and again 2026-09-30 (the admission test in commitment 6; procedural ref 404).
33
34
 
34
35
  ## Proposed features and functions
35
36
 
36
- - **GEM socket (plug-in standard).** A GEM is a nested module inside EMET that modifies engagement; a RUNED GEM also carries tools (RUNEs). The socket must mount several GEMs, switch each on or off, and prioritise the active ones in a running schema that prevents conflicts — with a cap on sockets, a cap on active GEMs, and a priority order, because every active GEM costs the model context. Includes a developer guide for building one.
37
+ - **GEM socket (phased).** GEM means Golem Expertise Module. A RUNED directive (Registered Utility Node Executable Directive) is a declared, registered tool built into a GEM. The 2026-09-08 expansions (Guided Engagement Module, Registered Utility Node Extension) are superseded. The standard, schema, authoring guide, conformance checks, and GEP-0001 are in [`gem-library/`](../gem-library/README.md), which moves to EMET-GEMs after this revision is approved.
38
+ - PR 2 (in the tree): `src/socket.js` and `gem-check` for a bundled prompt GEM (schema, spec revision, hashes, sizes, path safety, floor-negation lint, secret scan, no code), plus a conformance test. A refused GEM does not stop initialize.
39
+ - PR 3 (in the tree): `gems/neurendipity`. `reading_people`, the neurodivergent lines, the wellbeing corpus lines, the matching reassertion lines, and the guide (the old id aliases for one release). Default off. Set `EMET_ACTIVE_GEMS=neurendipity` to turn it on. Core floor keeps persistence, general epistemic honesty, the epistemic corpus lines, and the honesty protections. `emet_floor` takes a `gem` argument. The available list shows Neurendipity installed and off unless that setting names it.
40
+ - PR 4 (proposed, EMET-private branch `gem-socket/pr4-status-cost`): each GEM's byte cost in `emet_status` (`gems`: installed and active counts, active floor bytes, headroom, the enforced caps, and per-GEM id, version, kind, bytes and refusal reason; read-only, no floor text). Caps, priority, consent when `overrides` is non-empty, and the available list in the startup text are already enforced. `EMET_ACTIVE_GEMS` is how an install asks for a GEM.
41
+ - PR 5 (in the tree): RUNED registration through dispatch, static analysis, and `gems/fieldnote`, bundled and off by default. No GEM from outside the release loads. GEP-0003 supersedes the GEP-0002 sandbox: the sandbox is removed, and the socket serves each RUNE and does not run it.
42
+ - Later, each by its own GEP: the creator keyring and signature checks, the public submission repository and its CI gate, accepting a library GEM onto the load list, and a monorail switch that picks a GEM.
37
43
  - **Claim-status grading.** Extend provenance so every recorded claim carries a status: established, deduced, proposed, still owed, or rejected — and rejected routes stay on the record with the reason they failed. (Idea taken from a physics research corpus that grades its own claims this way.)
38
44
  - **Index-first retrieval.** Score candidates against a one-line-per-item index before opening anything, open only the best match, follow one link at most — finding is logic, not a model call. EMET already has the shape (handoff and board as router, document list as index); the work is keeping the startup router small.
39
45
  - **Composite retrieval scoring.** Live as of this revision: recall ranks by how many query words match, then by importance. Current entries come first in every order, including time order. Time order is `order: 'latest'`, or a standalone latest, newest, or most recent together with other words. That phrase only reorders rows that already match. Nothing fades or is down-weighted for age. A superseded or expired entry stays in the result, marked with its end date and what replaced it. `history: true` reads the ended entries when current ones fill the limit. A recall or layer query ranks matching rows in the store (current before ended, then keyword hits and importance, or time when you asked for the latest) and then keeps a bounded window (at least 200 rows, or 20 times the page), not the whole layer. A blank sort value comes first when ascending and last when descending.
40
46
  - **Export, import, restore-and-compare.** Not built; listed in the README's known gaps.
41
47
  - **Organizational use.** Many private EMETs and a document gateway between them. Nothing built before a named customer.
42
- - **Shared hive memory for AI bots (proposed 2026-09-30).** One EMET as a common memory that several agent bots read and write as users, each keeping its own memories — candidates are Grok Bot, OpenAI dots and Meta Muse, all of which can reach a remote MCP server. A GEM per bot, seated in the socket, if needed. Taken up with the socket; the first design question is each bot's source tag and scope.
43
- - **Compiled topic pages, pilot (proposed 2026-09-30).** After the LLM-wiki pattern: a document prefix of topic pages compiled from semantic entries. Every claim cites its entry or transcript span; a compiled page never cites another compiled page as evidence; pages are derived, never the source of truth; one compiler role builds pages, others write entries only. No database change — the document store already versions, hashes, signs and checks form. Pilot page: the hive-memory idea. Nothing added beyond what the pilot needs.
48
+ - **Shared hive memory for AI bots.** Closed as a separate item on 2026-10-11. Folded into the GEM socket work above. A bot that shares one EMET still needs its own source tag and scope. That question stays with the socket.
49
+ - **Compiled topic pages, pilot (proposed 2026-09-30).** After the LLM-wiki pattern: a document prefix of topic pages compiled from semantic entries. Every claim cites its entry or transcript span; a compiled page never cites another compiled page as evidence; pages are derived, never the source of truth; one compiler role builds pages, others write entries only. No database change. The document store already versions, hashes, signs and checks form. Pilot page: the hive-memory idea. The hive-memory feature is closed as its own item (2026-10-11) and folded into the socket. If this pilot is built, it needs a different page. Nothing added beyond what the pilot needs.
44
50
  - **Lint pass over the semantic layer (proposed 2026-09-30).** A scheduled sweep for contradictions between entries, outdated claims a newer entry supersedes, entries that should link and don't, and subjects mentioned often with no compiled page. Findings are reported, never applied automatically; corrections go through supersession. Built after the pilot page, and only once it names its measure. Design inputs from the LLM Wiki v2 review (typed links, multi-agent sync rules, drift invariants, confidence only on top of provenance) are each weighed against commitment 6 before adoption. Its idea of letting entries fade from what surfaces is not taken: nothing in EMET fades.
45
51
  - **Advisory judge for team traffic (parked).** A fast external decision model (TypeSafe's Jev was evaluated) could sort traffic and interactions when many people and hosts share one EMET. Never in the write path — no model decides what EMET stores. Not for single-user installs.
46
52
  - **Local open-weight model as a host.** A read-only trial of EMET under a locally run model, once the host machine's GPU and RAM are on record.
@@ -50,10 +56,7 @@ Status as of 2026-10-07. This is a working roadmap, not a commitment: items move
50
56
 
51
57
  ## Design commitments these must keep
52
58
 
53
- - No model in the write path: EMET stores only what the assistant deliberately chose to write.
54
- - Controls, not reminders: a rule that matters is checked by the server.
55
- - Over-engineering is a defect, and the check comes before the build. Nothing is built until it
56
- names the failure it fixes, what it replaces, how we will know it worked, and what keeps it
57
- working (charter commitment 6). While EMET is in design it follows DMADV (define, measure,
58
- analyze, design, verify); once stable, DMAIC (define, measure, analyze, improve, control).
59
+ - No model in the write path: EMET stores what the assistant deliberately chose to write.
60
+ - Controls, not reminders — a rule that matters is checked by the server.
61
+ - Over-engineering is a defect, and the check comes before the build: nothing is built until it names the failure it fixes, what it replaces, how we will know it worked, and what holds it once it works (charter commitment 6). DMADV while EMET is in design; DMAIC once stable.
59
62
  - Correct the record by superseding, never by editing.
package/docs/SETUP.md CHANGED
@@ -36,29 +36,52 @@ when you want a second device to reach the same memory.
36
36
 
37
37
  | On | Allowed |
38
38
  |---|---|
39
- | your whole EMET database | find, insert, update, create collection, create index, list collections, list indexes, list search indexes, collection and database stats |
39
+ | your whole EMET database | find, insert, update, create collection, create index, list collections, list indexes, list search indexes, collection and database stats. Not `REMOVE`. |
40
40
  | `<prefix>oauth_tokens` | remove — revoking a sign-in token |
41
41
  | `_emet_verify` | remove — the status check deletes its probe document and does not drop the collection |
42
+ | `error_log` | `REMOVE` — rotation deletes old rows (10,000 entries or 90 days) after a daily summary is kept in `error_log_summary`. The name is not prefixed. It is not the record. |
42
43
 
43
- Nothing else may be removed or dropped. `tests/atlas-role.test.js` fails if the code ever
44
- starts deleting from a collection this role does not allow.
44
+ `REMOVE` on `error_log` is the rotation privilege. Do not grant `REMOVE` on the database.
45
+ Do not grant `REMOVE` on any other collection. `error_log_summary` is insert and update only.
46
+ A document-controlled collection cannot be deleted. Nothing else may be removed or
47
+ dropped. `tests/atlas-role.test.js` fails if the code ever starts deleting from a
48
+ collection this role does not allow.
45
49
 
46
50
  **The quick way (Atlas CLI).** Install it (`winget install MongoDB.MongoDBAtlasCLI`, or
47
51
  see mongodb.com/docs/atlas/cli), sign in with `atlas auth login` in your own terminal —
48
52
  it asks you to pick options, so it needs a real keyboard — then from the EMET folder:
49
53
 
50
54
  ```
51
- node scripts/atlas-role.mjs --project <projectId> --db <database> --user emet_app
55
+ node scripts/atlas-role.mjs --project <projectId> --db <database> --user emet_app --prefix <prefix>
56
+ node scripts/atlas-role.mjs --project <projectId> --db <database> --user emet_app --prefix <prefix> --apply
52
57
  ```
53
58
 
54
- That is a dry run: it prints the commands. Add `--apply` to create the role and move the
55
- user onto it; `--rollback` puts the user back on `readWrite@<database>`. Find the project id
56
- with `atlas projects list`. A non-default `EMET_COLLECTION_PREFIX` is picked up, or pass
57
- `--prefix`.
58
-
59
- **The click way.** Database Access → Custom Roles → Add New Custom Role, name
60
- `emetRecordKeeper`, add the actions in the table above against your database and the two
61
- collections; then edit the user and set its role to `emetRecordKeeper`.
59
+ The first command is a dry run. `scripts/atlas-role.mjs` prints the create it will run.
60
+ The dry run calls the read-only `atlas customDbRoles describe emetRecordKeeper --projectId <id> --output json`. It needs Atlas auth and changes nothing.
61
+ The `--privilege` value is the full list from `src/atlas-role.js`, which includes `REMOVE@<db>.error_log`.
62
+ It does not grant `REMOVE` on any other collection. The second command creates the role
63
+ and moves the user onto it. `--rollback` puts the user back on `readWrite@<database>`.
64
+ Find the project id with `atlas projects list`. `<db>` is the `MONGODB_DB` you pass as `--db`.
65
+ `--prefix <prefix>` is `EMET_COLLECTION_PREFIX` (default `emet_`). Pass it for a prefixed install.
66
+ `--prefix` overrides `EMET_COLLECTION_PREFIX`. The effective prefix is `--prefix`, or else the env. Re-applying replaces prefixed privilege names if the effective prefix doesn't match the install.
67
+ Do not pass `--privilege` to `customDbRoles update` on its own.
68
+ That replaces the whole role and drops find, insert, and update.
69
+
70
+ **Atlas UI.** Database Access → Custom Roles → Add New Custom Role, name
71
+ `emetRecordKeeper`. Add the actions in the table. For `error_log`, set the database to
72
+ `<db>`, the collection to `error_log` (not blank, not every collection), and enable the
73
+ action `REMOVE` only. That is `REMOVE@<db>.error_log`. Leave `REMOVE` off the
74
+ database-wide row. Leave `REMOVE` off every other collection. Then edit the user and
75
+ set its role to `emetRecordKeeper`.
76
+
77
+ **Local MongoDB.** `scripts/atlas-role.mjs` is Atlas only. On a server with users, in the
78
+ EMET database, `db.createRole` with the same rows. The shell action is lowercase. The
79
+ log privilege is the resource below, which is the Atlas privilege `REMOVE@<db>.error_log`.
80
+ Do not grant that action on any other collection.
81
+
82
+ ```javascript
83
+ { resource: { db: "<db>", collection: "error_log" }, actions: ["remove"] }
84
+ ```
62
85
 
63
86
  **Prove it.** From any EMET host, run `emet_status` with `probe: true`. It writes, reads
64
87
  back and removes a test document, so a role missing something fails there, loudly, instead
@@ -153,13 +176,19 @@ have to. A new store returns a short interview; an established one returns the a
153
176
  identity, your profile, and recent context. Requiring a command would have been backwards —
154
177
  the one session you would need it is the first one, before you have read any of this.
155
178
 
156
- The interview asks six things, four required and two optional:
179
+ The interview asks eight things, four required and four optional:
157
180
 
158
181
  - **What the assistant should be called**, and **how it should carry itself.** This becomes
159
182
  the identity it speaks from in every session on every host.
160
183
  - **Your name**, in the form you actually want used.
161
184
  - **What you are using this memory for**, which shapes what gets treated as worth saving.
162
- - Optionally: how you want to be worked with, and this host's source tag.
185
+ - Optionally: how you want to be worked with, this host's source tag, and whether more than
186
+ one bot or AI will use this memory. Leaving that one out leaves sub-keys off. The
187
+ walkthrough is [SUBKEYS.md](SUBKEYS.md).
188
+ - Optionally: whether to turn on bot-team backup. **Yes is the recommended choice.** Yes and
189
+ Yes. count as yes, the same way as the multi-bot question. No, or leaving it out, leaves it
190
+ off. The answer is recorded. EMET does not copy prompts or
191
+ settings itself, and secret values are never stored. The recipe is `gems/bot-team-backup/guides/BOT_TEAM_BACKUP.md`.
163
192
 
164
193
  Your assistant asks these conversationally, one at a time — not as a form — then calls
165
194
  `emet_setup_complete`.
@@ -219,6 +248,81 @@ it should come back `ready` with your existing identity, not `setup_required`. I
219
248
  `setup_required`, one of the four variables above is wrong; **do not run the setup interview,
220
249
  which would write a new identity over your existing one.**
221
250
 
251
+ ## Upgrading to 0.3.0
252
+
253
+ 0.3.0 rotates `error_log`. The log is capped at 10,000 entries or 90 days, and the daily summaries are kept in `error_log_summary`. Rotation deletes from `error_log`, so an existing `emetRecordKeeper`
254
+ role — or whatever custom role you created at setup — needs the `REMOVE` action on
255
+ `<db>.error_log`. Without it, rotation fails. Add `REMOVE` on `error_log` only. Do not add
256
+ `REMOVE` on the database. Do not add `REMOVE` on any other collection. Memories, controlled
257
+ documents, and transcripts stay non-deletable.
258
+ ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
259
+
260
+ `<db>` is your `MONGODB_DB`. `<id>` is the project id from `atlas projects list`. If the role is
261
+ not named `emetRecordKeeper`, use the name you created.
262
+
263
+ **Save the role first.**
264
+
265
+ ```
266
+ atlas customDbRoles describe emetRecordKeeper --projectId <id> --output json > role-before.json
267
+ ```
268
+
269
+ Keep `role-before.json`. It is the copy you can read if the next command is wrong.
270
+
271
+ **Atlas CLI.** This command adds `REMOVE` on `error_log` and leaves the rest of the role in place.
272
+ Passing `--privilege` to `customDbRoles update` on its own replaces the role's privileges, including find, insert, and update.
273
+
274
+ ```
275
+ atlas customDbRoles update emetRecordKeeper --privilege REMOVE@<db>.error_log --append --projectId <id>
276
+ ```
277
+
278
+ **Atlas UI.** Database Access → Custom Roles → edit `emetRecordKeeper` → add a privilege.
279
+ Database `<db>`, collection `error_log`, action `REMOVE`. Do not enable `REMOVE` on the
280
+ database-wide row. Do not enable `REMOVE` on any other collection. Save. Then confirm the
281
+ database user still has that custom role and no broader built-in role.
282
+
283
+ **Local MongoDB.** In the database where you created the role:
284
+
285
+ ```javascript
286
+ db.grantPrivilegesToRole("emetRecordKeeper", [
287
+ { resource: { db: "<db>", collection: "error_log" }, actions: ["remove"] }
288
+ ])
289
+ ```
290
+
291
+ That shell action is the Atlas privilege `REMOVE@<db>.error_log`.
292
+
293
+ ### Clear a stray DROP_COLLECTION
294
+
295
+ **Confirm `DROP_COLLECTION` is gone.** Describe the role again:
296
+
297
+ ```
298
+ atlas customDbRoles describe emetRecordKeeper --projectId <id> --output json
299
+ ```
300
+
301
+ `DROP_COLLECTION` must not appear anywhere in that output. An older stray `DROP_COLLECTION` on `_emet_verify` is not cleared by that append command. That append command cannot remove a privilege. Remove it by re-applying the definition, which has no `DROP_COLLECTION`. Dry run first, then apply. The dry run calls the read-only `atlas customDbRoles describe emetRecordKeeper --projectId <id> --output json`. It needs Atlas auth and changes nothing. `--prefix <prefix>` is `EMET_COLLECTION_PREFIX` (default `emet_`). `--prefix` overrides `EMET_COLLECTION_PREFIX`. The effective prefix is `--prefix`, or else the env. Re-applying replaces prefixed privilege names if the effective prefix doesn't match the install.
302
+
303
+ ```
304
+ node scripts/atlas-role.mjs --project <id> --db <db> --user <dbUsername> --prefix <prefix>
305
+ node scripts/atlas-role.mjs --project <id> --db <db> --user <dbUsername> --prefix <prefix> --apply
306
+ ```
307
+
308
+ Or in the Atlas UI: Database Access → Custom Roles → edit `emetRecordKeeper` and clear `DROP_COLLECTION` from `_emet_verify` and from every other resource. Then describe the role again and confirm `DROP_COLLECTION` is still absent.
309
+
310
+ **Verify `REMOVE`.** The same describe output is the check:
311
+
312
+ ```
313
+ atlas customDbRoles describe emetRecordKeeper --projectId <id> --output json
314
+ ```
315
+
316
+ Pass when all of these are true:
317
+
318
+ - An `actions` entry has `"action": "REMOVE"` and a resource with `"db"` equal to `<db>` and `"collection": "error_log"`.
319
+ - No `REMOVE` resource has an empty collection. An empty collection is the whole database.
320
+ - Every collection on a `REMOVE` action is either `error_log` or one of the two rows above it in the Stage 1 table. This upgrade adds `error_log` and no other collection.
321
+
322
+ From a machine that has the server's `MONGODB_URI`, `node scripts/db-privileges.mjs` prints
323
+ `<db>.error_log` with `remove`, and `<db>.*` does not include `remove`. Then, from any EMET
324
+ host, `emet_status` with `probe: true` still passes.
325
+
222
326
  ## Stage 4 — tell your assistant to use it
223
327
 
224
328
  Setup gives the store an identity. It does not tell your assistant to consult it. See
@@ -243,6 +347,10 @@ the thing is doing its job.
243
347
 
244
348
  ---
245
349
 
350
+ ## Error reports
351
+
352
+ `emet_error_report` is owner-only and read-only. It returns the report and a draft. EMET does not send mail. The draft address is `EMET_REPORT_EMAIL`. When that variable is unset, the address is `reports@example.com`. That address is a placeholder, not a mailbox. Configure `EMET_REPORT_EMAIL` to a real address, or the report is returned and goes nowhere. An empty string, or any value that is not one plain address, returns the report and no email.
353
+
246
354
  ## When it does not work
247
355
 
248
356
  | Symptom | Cause |
@@ -253,6 +361,7 @@ the thing is doing its job.
253
361
  | `semantic entries must carry their source` | Open a session with `emet_session_open` and pass its `session_id` on the save. |
254
362
  | `vector_index: not queryable on this deployment tier` | Normal on a local MongoDB or before the Atlas index exists; only `semantic_recall` needs it. |
255
363
  | Connect times out | Your IP is not in Atlas Network Access, or the cluster is paused. |
364
+ | Error-log rotation fails, unauthorized to remove | The role has no `REMOVE` on `error_log`. Follow [Upgrading to 0.3.0](#upgrading-to-030) and append `REMOVE@<db>.error_log`. |
256
365
  | Auth fails | The password in the URI needs percent-encoding if it contains `@ : / ?` etc. |
257
366
  | `semantic_recall` returns nothing, keyword search works | The vector index is missing or was dropped by a tier migration. |
258
367
  | Writes land but another device cannot see them | The two hosts point at different `MONGODB_DB` values. |
@@ -0,0 +1,59 @@
1
+ # When more than one bot uses EMET
2
+
3
+ One EMET. One owner login. If more than one bot or AI writes through that login, each bot that can keep a key file gets its own key. The server stamps the tag on the key. A bot does not get to name another bot's tag and have that stamp stick.
4
+
5
+ This is part of EMET. It is the same server, the same owner page, and the same keys. It is not a second product, and it is not a fork.
6
+
7
+ The Charter and the floor are unchanged. This supports ISO 9001:2015 clause 7.5.3 and ISO 13485:2016 clause 4.2.5 (identification of who changed a record, retention of records, nothing deleted), as the README and the Charter word it. EMET claims no certification. The organization validates EMET for its own use.
8
+
9
+ ## Turn it on
10
+
11
+ Say **initialize**. Your assistant asks whether more than one bot or AI will use this memory. Answer in your own words. Leaving it out is the same as no.
12
+
13
+ - **No.** Sub-keys stay off. That one client uses its own source tag. The tool list does not grow.
14
+ - **Yes, and this server reads a `.env` file.** Setup writes three settings into that file after your identity is saved: sub-keys on, a pepper the server generates, and version 1. You do not type the pepper, and it is not repeated. Restart (or redeploy) the server once. The tools and `/owner/approvals` appear together after that restart. They do not turn on in the server that is already running.
15
+ - **Yes, and the server takes its settings from the platform** (Railway or anything else that injects environment variables). Setup refuses before it saves anything. No pepper or .env was written. Run setup again without yes to finish the rest. Then set these in the platform's variables and redeploy:
16
+ 1. `EMET_SUBKEYS=1`
17
+ 2. `EMET_SUBKEY_PEPPER` — generate it yourself, at least 32 bytes, for example with `openssl rand -hex 32`
18
+ 3. `EMET_SUBKEY_PEPPER_VERSION=1`
19
+
20
+ Do not paste the pepper into the chat or into any EMET document.
21
+
22
+ A single client does not get this turned on. The page and the tools ship with EMET. They stay quiet until the answer is yes and the server has restarted with the flag on.
23
+
24
+ If this memory is already set up and you later add bots, say so. Your assistant turns sub-keys on only after you explicitly agree to run setup again. That writes a new version of your identity documents. The previous version is kept.
25
+
26
+ ## Approve a bot
27
+
28
+ List each bot's tag in `EMET_SOURCE_TAGS` before it asks for a key. An empty list refuses every request.
29
+
30
+ 1. Open `/owner/approvals` on the same host you already use for this memory. Enter the passphrase you already use when you connect a device. A correct passphrase opens a short session. A wrong one is counted with the other passphrase attempts.
31
+ 2. Each bot that can keep a key file asks for a key with its own tag.
32
+ 3. On the approvals page, approve that request. Deny applies only to a pending request.
33
+ 4. The bot claims the key within 24 hours. It keeps the key where the other bots cannot read it. The key is never written into EMET.
34
+
35
+ A bot then opens a session with that key and passes the session handle the server gives back on later writes in that session.
36
+
37
+ ## A key lasts 30 days
38
+
39
+ To renew a key, the bot asks again with the same tag, you approve it on the page, and the bot claims the new key within 24 hours. The previous key works for a few minutes while the bot switches, then it stops. Earlier writes stay as they were written.
40
+
41
+ ## Revoking your login
42
+
43
+ Revoking the owner login stops every sub-key. The keys hang off that login. They do not keep working after it is gone.
44
+
45
+ ## A phone, or a web project
46
+
47
+ A host that cannot store a key file does not take a sub-key. A phone, or a web project instance, uses the tag on its own connection.
48
+
49
+ ## Security
50
+
51
+ The pepper is a server secret. When this server reads `.env`, setup writes that file and does not put the pepper in the database, in a document, or in the answer it gives your assistant. An MCP call is what writes the file, and only on that kind of server. A hosted server does not get a pepper written into its container.
52
+
53
+ The approvals page uses the same passphrase as connecting a device, and a wrong passphrase counts toward the same lockout.
54
+
55
+ What a sub-key shows is that a write was made with a key you approved. If several bots can read each other's files, EMET cannot prove which program was holding the key. If you think an active key has leaked, revoke it from your own login (`emet_subkey_revoke`), then the bot requests a new key and you approve it on the page. Deny only applies to a pending request.
56
+
57
+ ## Building a bot team
58
+
59
+ For designing a team of bots, see Lauren Tan (@poteto, https://x.com/poteto), who works on Grok Bot and describes choosing a bot topology (one generalist, several narrow specialists, or generalists each owning a project) in [this post](https://x.com/poteto/status/2109781899610874002). Her bot designer, [dr eggbot](https://x.ai/bot/93gOz3op1UQdBdbekQFLK) ([source](https://x.com/poteto/status/2106895160298852470)), helped design the EMET author's own bot team.
@@ -0,0 +1,12 @@
1
+ {
2
+ "sha256:c9f58a0ef18f7468b9618d0f1e96ddd8c50845243e098e84480908ca8cb0a528": {
3
+ "gem": "fieldnote",
4
+ "rune": "fieldnote",
5
+ "version": "1.0.0"
6
+ },
7
+ "sha256:cfb62b669f67c69f53989ed2621a40bfbfa60a744f1b4040e5b8496755598a35": {
8
+ "gem": "fieldnote",
9
+ "rune": "fieldnote",
10
+ "version": "1.0.1"
11
+ }
12
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "sections": {
3
+ "bot_team_backup": {
4
+ "title": "Bot-team backup",
5
+ "note": "Optional. Off unless the recorded setup answer is yes. This floor does not copy documents by itself.",
6
+ "lines": {
7
+ "follow_the_recipe": "When bootstrap/USER.md records bot-team backup as yes, follow guides/BOT_TEAM_BACKUP.md. Write each bot's name, prompt, settings, routines and skills to bot-team/<bot>.md. Revise a document only when it changed. Supersede; do not delete.",
8
+ "no_secrets": "Never store secret values, tokens, passwords or card data in a bot-team document. Connectors, logins and secrets are reconnected by hand. Name those items in bot-team/RECOVERY.md. Do not write the values."
9
+ }
10
+ }
11
+ },
12
+ "reassertion": [
13
+ "Bot-team backup stores no secret values."
14
+ ]
15
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "spec": "2026-10-12",
3
+ "id": "bot-team-backup",
4
+ "name": "Bot-team backup",
5
+ "description": "Optional recipe for writing each bot's name, prompt, settings, routines and skills as controlled documents. Off unless the recorded setup answer is yes. Does not store tokens, passwords or card data.",
6
+ "version": "1.0.0",
7
+ "kind": "gem",
8
+ "requires": {
9
+ "emet": ">=0.2.6"
10
+ },
11
+ "priority": 10,
12
+ "defaultOn": false,
13
+ "released": true,
14
+ "overrides": [],
15
+ "distribution": "bundled",
16
+ "floor": "floor.json",
17
+ "guides": [
18
+ "guides/BOT_TEAM_BACKUP.md",
19
+ "guides/BOT_TEAM_RECOVERY.md"
20
+ ],
21
+ "runes": [],
22
+ "files": [
23
+ {
24
+ "path": "floor.json",
25
+ "digest": "sha256:7182ec1d78bed4234c9a309bd03b4ca4099fa3b031e6b743d554378862230862",
26
+ "size": 802
27
+ },
28
+ {
29
+ "path": "guides/BOT_TEAM_BACKUP.md",
30
+ "digest": "sha256:aa912c28c08745e4cde13d156488af94a74745573e7d184a10007ee453de2d12",
31
+ "size": 1384
32
+ },
33
+ {
34
+ "path": "guides/BOT_TEAM_RECOVERY.md",
35
+ "digest": "sha256:8fbccbc7985c2e1696c42293c73c1257e2fbf9548717b19a8086306b2ed0db0e",
36
+ "size": 1305
37
+ }
38
+ ],
39
+ "authors": [
40
+ "Dreamforge Studio LLC"
41
+ ],
42
+ "license": "MIT"
43
+ }
@@ -0,0 +1,27 @@
1
+ # Bot-team backup
2
+
3
+ Optional. Off unless the first-run answer recorded in `bootstrap/USER.md` under BOT-TEAM BACKUP is `yes`. Yes is the recommended choice. Leaving the question out records `no`.
4
+
5
+ EMET does not run this recipe. The assistant does, and only after that recorded yes.
6
+
7
+ ## What to write
8
+
9
+ For each bot the install uses, keep one controlled document at `bot-team/<bot>.md`. Use the bot's own tag as `<bot>`, the same tag its writes already carry. The document holds:
10
+
11
+ - the bot's name
12
+ - the prompt it runs with
13
+ - the settings that are not secret
14
+ - the routines it follows
15
+ - the skills it uses
16
+
17
+ Write the document through the normal document tools. A later change is a new revision of the same id. Do not delete the previous copy. If nothing changed since the last revision, do not write again.
18
+
19
+ Check on a steady cadence the install chooses, such as at session close, and only write when the text would differ.
20
+
21
+ ## What never goes in
22
+
23
+ Never store secret values, tokens, passwords or card data. Not in `bot-team/<bot>.md`, not in `bot-team/RECOVERY.md`, and not in any other bot-team document. A name of a connector or a login is not a secret. The value behind it is.
24
+
25
+ ## Recovery
26
+
27
+ Keep the rebuild order in `bot-team/RECOVERY.md`, filled from `guides/BOT_TEAM_RECOVERY.md`. That document lists what a person must reconnect by hand. It does not store the secrets themselves.
@@ -0,0 +1,23 @@
1
+ # Bot-team recovery
2
+
3
+ Copy this into the store as `bot-team/RECOVERY.md` when bot-team backup is on. Revise it when the rebuild order changes. Supersede; do not delete.
4
+
5
+ Never store secret values, tokens, passwords or card data here. Name the item that has to be reconnected. Leave the value out.
6
+
7
+ ## Rebuild order
8
+
9
+ 1. Restore the memory server and its database from the operator's own backup of that service.
10
+ 2. Read `bot-team/<bot>.md` for each bot and put back that bot's name, prompt, settings, routines and skills.
11
+ 3. Reconnect, by hand, every item in the list below. The documents do not contain what those items need in order to authenticate.
12
+
13
+ ## Reconnect by hand
14
+
15
+ | Item | Where it lives | What the person does |
16
+ |---|---|---|
17
+ | Connectors | The host's connector settings | Connect each one again. The document may name the connector. It must not hold a key. |
18
+ | Logins | The host account for each bot | Sign in again. The document may name the account. It must not hold a password. |
19
+ | Secrets | The host's secret store | Put each secret back from the place the operator keeps secrets. This document names the slot, not the value. |
20
+
21
+ ## Rule
22
+
23
+ If a value is a token, a password, a card number, or any other secret, it does not belong in EMET. Record that the item must be reconnected. Stop there.
@@ -0,0 +1,14 @@
1
+ {
2
+ "sections": {
3
+ "field_notes": {
4
+ "title": "Field notes",
5
+ "note": "A count of the working layer is a note about what is already stored. It does not add a store.",
6
+ "lines": {
7
+ "count_only": "Report the count. The count is not a list, and it is not a new record."
8
+ }
9
+ }
10
+ },
11
+ "reassertion": [
12
+ "The working layer is memory, and a count is not a new store."
13
+ ]
14
+ }