@dreamforgestudiollc/emet 0.3.5 → 0.3.7

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 (103) hide show
  1. package/.env.example +29 -0
  2. package/CHANGELOG.md +49 -11
  3. package/CHARTER.md +1 -1
  4. package/CONTRIBUTING.md +21 -0
  5. package/README.md +25 -10
  6. package/RELEASE_NOTES-0.2.6.md +43 -0
  7. package/RELEASE_NOTES-0.3.6.md +29 -0
  8. package/RELEASE_NOTES-0.3.7.md +19 -0
  9. package/SECURITY.md +13 -0
  10. package/docs/BOTS.md +4 -4
  11. package/docs/DEPLOY.md +23 -4
  12. package/docs/ERROR-CODES-SPEC.md +4 -0
  13. package/docs/ERROR-CODES.md +7 -0
  14. package/docs/GUIDED-SETUP.md +1 -1
  15. package/docs/ROADMAP.md +62 -49
  16. package/docs/SETUP.md +11 -1
  17. package/docs/SUBKEYS.md +3 -1
  18. package/docs/continuity-currency-statechart.md +34 -0
  19. package/docs/features/README.md +21 -0
  20. package/docs/features/access.md +28 -0
  21. package/docs/features/documents.md +35 -0
  22. package/docs/features/errors.md +32 -0
  23. package/docs/features/gems.md +31 -0
  24. package/docs/features/memory.md +29 -0
  25. package/docs/features/pages.md +28 -0
  26. package/docs/features/record.md +27 -0
  27. package/docs/features/search.md +27 -0
  28. package/docs/features/startup.md +29 -0
  29. package/docs/features/subkeys.md +30 -0
  30. package/docs/features/transcripts.md +33 -0
  31. package/docs/per-tag-handoff-statechart.md +147 -0
  32. package/docs/subkey-session-statechart.md +57 -0
  33. package/package.json +6 -2
  34. package/server.json +27 -2
  35. package/src/annotations.js +5 -3
  36. package/src/attribution.js +2 -2
  37. package/src/carry-forward-close.js +1 -1
  38. package/src/chooser.js +74 -3
  39. package/src/conformance.js +2 -0
  40. package/src/continuity-currency-statechart.js +139 -0
  41. package/src/continuity-currency.js +869 -0
  42. package/src/database.js +1 -1
  43. package/src/dispatch.js +1 -1
  44. package/src/error-codes.js +7 -0
  45. package/src/gem-check.js +4 -1
  46. package/src/grants.js +28 -5
  47. package/src/host-reach.js +1 -1
  48. package/src/http-remote.js +29 -5
  49. package/src/index.js +3 -2
  50. package/src/invites.js +2 -2
  51. package/src/owl.js +12 -11
  52. package/src/pages.js +15 -0
  53. package/src/per-tag-handoff-statechart.js +264 -0
  54. package/src/per-tag-handoff.js +988 -0
  55. package/src/persons.js +16 -0
  56. package/src/session-graph.js +123 -12
  57. package/src/session.js +56 -12
  58. package/src/setup.js +32 -11
  59. package/src/startup-pages.js +13 -2
  60. package/src/subkey-lifecycle.js +105 -0
  61. package/src/subkey-session-statechart.js +253 -0
  62. package/src/subkeys.js +648 -89
  63. package/src/tools.js +171 -51
  64. package/src/transcript-session.js +2 -2
  65. package/src/version.js +1 -1
  66. package/templates/INDEX.md +1 -0
  67. package/templates/SESSIONDISPOSITION.md +2 -2
  68. package/templates/TAGHANDOFF.md +45 -0
  69. package/verification/continuity-currency/ContinuityCurrency.cfg +12 -0
  70. package/verification/continuity-currency/ContinuityCurrency.tla +239 -0
  71. package/verification/continuity-currency/tlc-output.txt +32 -0
  72. package/verification/continuity-currency/view.mjs +54 -0
  73. package/verification/load-gate/load-gate.mjs +1 -1
  74. package/verification/per-tag-handoff/PerTagHandoff.cfg +10 -0
  75. package/verification/per-tag-handoff/PerTagHandoff.tla +191 -0
  76. package/verification/per-tag-handoff/StampCounter.cfg +10 -0
  77. package/verification/per-tag-handoff/out/report.md +6 -0
  78. package/verification/per-tag-handoff/out-counter/chart.mmd +30 -0
  79. package/verification/per-tag-handoff/out-counter/report.md +15 -0
  80. package/verification/per-tag-handoff/out-counter/tlc.out +130 -0
  81. package/verification/per-tag-handoff/split/PerTagConflict.cfg +6 -0
  82. package/verification/per-tag-handoff/split/PerTagConflict.tla +104 -0
  83. package/verification/per-tag-handoff/split/PerTagTime.cfg +8 -0
  84. package/verification/per-tag-handoff/split/PerTagTime.tla +100 -0
  85. package/verification/per-tag-handoff/split/conflict-chart.mmd +47 -0
  86. package/verification/per-tag-handoff/split/conflict-report.md +8 -0
  87. package/verification/per-tag-handoff/split/conflict-tlc.txt +19 -0
  88. package/verification/per-tag-handoff/split/conflict-view.mjs +34 -0
  89. package/verification/per-tag-handoff/split/time-chart.mmd +44 -0
  90. package/verification/per-tag-handoff/split/time-report.md +8 -0
  91. package/verification/per-tag-handoff/split/time-tlc.txt +19 -0
  92. package/verification/per-tag-handoff/split/time-view.mjs +33 -0
  93. package/verification/per-tag-handoff/tlc-output.txt +19 -0
  94. package/verification/per-tag-handoff/v1-draft/PerTagHandoff.cfg +5 -0
  95. package/verification/per-tag-handoff/v1-draft/PerTagHandoff.tla +94 -0
  96. package/verification/per-tag-handoff/v1-draft/out/chart.mmd +37 -0
  97. package/verification/per-tag-handoff/v1-draft/out/report.md +7 -0
  98. package/verification/per-tag-handoff/v1-draft/out/tlc.out +19 -0
  99. package/verification/per-tag-handoff/v1-draft/view.mjs +20 -0
  100. package/verification/per-tag-handoff/view.mjs +31 -0
  101. package/verification/subkey-session/SubkeySession.cfg +11 -0
  102. package/verification/subkey-session/SubkeySession.tla +254 -0
  103. package/verification/subkey-session/tlc-output.txt +13 -0
@@ -243,7 +243,7 @@ railway init # from the repo root; name it emet
243
243
  railway variables --set MONGODB_URI=<from .env> --set MONGODB_DB=emet \
244
244
  --set EMET_OAUTH_PASSPHRASE=<generated passphrase> --set EMET_SOURCE_TAGS=<every host's tag, e.g. laptop,phone>
245
245
  railway up --detach
246
- railway domain # prints https://<something>.up.railway.app
246
+ railway domain # prints the public https origin
247
247
  railway variables --set PUBLIC_URL=https://<that host>
248
248
  railway up --detach # second pass: PUBLIC_URL is the OAuth issuer and must match
249
249
  ```
package/docs/ROADMAP.md CHANGED
@@ -1,63 +1,76 @@
1
1
  # EMET — Next Steps and Proposed Features
2
2
 
3
- Status as of 2026-11-10 (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.
3
+ Status as of 2026-11-11. This is a working roadmap, not a commitment. Nothing here is built unless it says so. Items move only when the owner rules on them. Each unbuilt item still has to answer the four questions in charter commitment 6 before any code is written.
4
+
5
+ EMET stays **one shared server** with verified per-client attribution. One collaborative project is one instance: one database, one deploy, one owner connect secret. There is no fork to keep in sync, and core memory work is not a GEM. Live chat stays out of EMET. The focus is document control (ISO 9001 7.5.3 / ISO 13485 4.2.5). EMET holds no certification and claims no conformity.
4
6
 
5
7
  ## Where things stand
6
8
 
7
- - **Live:** the public site and the npm package `@dreamforgestudiollc/emet` are published. 38 tools (15 read-only); `EMET_SUBKEYS=1` adds four sub-key tools. Topic pages shipped in 0.3.0: `emet_page`, `emet_pages`, and `emet_page_lint`. 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
- - **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
- - **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
- - **The database** login runs under the least-privilege role `emetRecordKeeper`: it can insert and update, never remove the record.
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).
13
-
14
- ## Next steps, in order
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.
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).
18
- 3. **Initialize payload trim.** Character document trim; measure the payload again.
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.
22
-
23
- ## Done since the last revision (2026-09-28)
24
-
25
- - SQL translator stage 2: read path native to MongoDB; the translator and the `event` mirror column removed.
26
- - Test-tree pass: one shared harness; dated suites named by subject.
27
- - Open questions answered 2026-09-29: the lessons `shadow` block dropped, the lesson key checked at the door; a coverage number published as an input to review; the character document consolidated quarterly (first pass done, SOUL.md v7).
28
- - Chain verification: one MongoDB connection path with a DNS fallback, then the chain walk moved into `emet_gaps` so no host needs the repo or a shell.
29
- - Security audit, first pass: two findings fixed; nothing open.
30
- - Least-privilege Atlas role, scripted and documented for new users.
31
- - Provenance stamped from the transcript; semantic and procedural writes with no source refused.
32
- - Guardrails & Monorails and lab results.
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).
34
-
35
- ## Proposed features and functions
36
-
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 (shipped in 0.2.6): 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.
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.)
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.
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.
46
- - **Export, import, restore-and-compare.** Not built; listed in the README's known gaps.
9
+ - **Live:** the public site and the npm package `@dreamforgestudiollc/emet` are published. Version 0.3.7 is this repository. 38 tools (15 read-only); `EMET_SUBKEYS=1` adds five sub-key tools. Topic pages shipped in 0.3.0: `emet_page`, `emet_pages`, and `emet_page_lint`. Layer writes and reads are native to MongoDB. Server-side checks run on session start and close. Receipts are required at close. The handoff is a record, superseded and never amended.
10
+ - **The extension socket is built.** It is `src/socket.js`. Its note is [gem/README.md](gem/README.md). The standard in this repository is Draft, in [`gem-library/`](../gem-library/README.md). Neurendipity and the other bundled GEMs stay off unless the install names them. A RUNED GEM stays off unless the install names it. The socket serves each RUNE and does not run it. Client-side execution shipped with the socket. A public repository for outside GEM submissions does not exist yet. Its name is not chosen.
11
+ - **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.
12
+ - **Guardrails and monorails** ([GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md)): the server checks the order of a session's writes. Enforce only since 0.2.1: every skipped step is refused with the way to pass, and every check is stored as a timestamped lab result. There is no report mode and no off switch.
13
+ - **The database** login runs under the least-privilege role `emetRecordKeeper`: it can insert and update, and it cannot remove the record.
14
+ - **Startup load:** `emet_initialize` is served in pages of at most 18,000 bytes as received, 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.
15
+ - **Attribution that already ships:** source tags, an owner door (`/owner/chooser`, `/owner/break-glass`), and member and guest access codes bound to source tags. See [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
16
+ - **Composite retrieval scoring is live.** Recall ranks by how many query words match, then by importance. Current entries come first in every order, including time order. Nothing fades or is down-weighted for age.
17
+ - **Public landing page and npm package (live).** The site in `site/` is published to GitHub Pages, and `@dreamforgestudiollc/emet` is on npm. The 0.3.5 package on npm was published before the wording cleanup in 0.3.6.
18
+
19
+ `emet_page_lint` shipped in 0.3.0 and flags a topic page. It does not edit.
20
+
21
+ ## Upcoming work
22
+
23
+ Nothing in this section is a commitment to a date or a design freeze. A status label means:
24
+
25
+ - **Proposed** — design conversation only. Not approved to build. No prototype.
26
+ - **Planned** — the direction is decided, and the public release does not contain it yet.
27
+ - **Later phase** — accepted as future work on this same server, and not scheduled as the next change.
28
+
29
+ ### Collaboration workplace
30
+
31
+ - **Workshop Village MCP (Proposed, not built).** A Workshop Village MCP server for bot-team collaboration: a shared workplace where a user's bot teams can be present in the same space, hand work off, and meet on a schedule. It may be built onto EMET, or as a separate MCP server that works with EMET. That choice is not decided. Either way, EMET stays one shared memory server with verified per-client attribution. Workshop Village does not fork EMET, does not replace EMET with a generic memory server, and does not turn core EMET memory work into a GEM. Live collaboration stays in the Village. Durable decisions, records, and "save to memory" writes stay in EMET. Scope, as currently proposed: bot teams, not a wake path for a lone chat instance on another host. The proposed workplace is a real spatial environment (a game-engine core, engine not chosen), rooms where every bot present can hear the speaker, doors and a doorbell when there is no avatar presence, Available / Do Not Disturb, spaces that scale to the people and bots in them, and scheduled meetings. If a complete physics environment is needed later, the engine should be able to support it; it is not assumed to be always on. Bots should experience workplace time. If the Village is ever sold, engine licensing must be compatible with that. A robust open-source engine is preferred when it meets the bar. No engine brand is selected. No prototype, public URL, or connector is approved.
32
+ - **Drawers (Proposed, not built).** Shared project drawers: places to save project files and documents so bot teams can share them, hand them off, and submit them, because users will not have access to each other's workstation files, and may not have a company network drive. A drawer is a shared handoff and submission store, not a personal disk. Optionally, an organization may designate its shared network drive as the storage backend, to reduce database usage. Access control per drawer, and attribution with credential-backed source tags consistent with EMET's per-client attribution, are open design questions and are not decided. Not approved to build.
33
+ - **Shared hive memory, closed as its own item.** An earlier idea of a separate shared hive memory for bots is closed. It is not part of the GEM socket. Bot-team collaboration of that kind is the Workshop Village item above, still Proposed. A bot that shares one EMET still needs its own source tag and scope.
34
+
35
+ ### Attribution, handoffs, and who can write
36
+
37
+ - **Per-source-tag handoffs (ships in 0.3.7, off unless the owner sets warn or enforce).** Each writing AI writes only its own handoff (`HANDOFF/<tag>.md`). The hub tag named by `EMET_HUB_TAG` keeps `HANDOFF.md`. A shared view is computed on read and is not stored as a second record. Read-only AIs use the shared view. `EMET_TAG_HANDOFFS` is off unless the owner sets `warn` or `enforce`. Off, the server keeps one shared `HANDOFF.md` and, for bots, `bots/<tag>/HANDOFF.md`. The flag does not block startup, and a stale handoff does not refuse a call.
38
+ - **Fuller multi-person support on one server (Later phase, not built).** EMET already supports one shared instance with per-client attribution, an owner door, and member and guest access codes bound to source tags. Richer multi-person use of that same server, beyond those doors, is a later phase. The supported model remains one collaborative project, one instance. Many separate EMET instances, or a gateway between them, is a different idea and is not built. See [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
39
+ - **Source-tag onboarding and further socket extensions (Planned).** Source tags, the owner door, and the bound-host door already ship. Stronger hardening of source-tag onboarding and client attribution is still to be done. The extension socket is built. Additional per-door extensions on that socket are Planned and are not built. A switch that picks a GEM is one of those later pieces. It is not built.
40
+
41
+ ### Document control
42
+
43
+ - **Continuity currency (ships in 0.3.7, off unless the owner sets `EMET_CONTINUITY_CURRENCY=1`).** `emet_initialize` and `emet_session_open` compare the served handoff with the live material episodic tip and return `continuity_currency`. A lag warns. The call is not refused. The server does not rewrite HANDOFF or STATE. `EMET_CONTINUITY_CURRENCY_BLOCK` is reserved and is not applied. Session close can already cite a later continuity record through `carry_forward` (shipped in 0.3.3). That close path is not this reading.
44
+ - **Topic pages with currency and lock levels (Planned).** Topic pages shipped in 0.3.0 as views computed on each request: `emet_page`, `emet_pages`, and `emet_page_lint`. A page is not a stored record. Area selectors can name a staleness window, and lint can flag a stale line. Wiki-style currency and lock levels for controlled documents are not built. Stored compiled pages are not built. If a compiled-page pilot is ever written, it needs its own page subject. It does not revive the closed hive-memory item.
45
+ - **Lint sweep of the semantic layer (Proposed).** The scheduled sweep for contradictions, outdated claims, missing links, and subjects with no page is still proposed. Findings would be reported, never applied automatically. Nothing in EMET fades.
46
+
47
+ ### Operations
48
+
49
+ - **Backup, restore verification, and a clone-instance recipe (Planned).** The clone-instance recipe is already documented in [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md): a new project is a new database, a new deploy, and a new passphrase. It does not add a tenant to an existing database. Bot-team backup, when the first-run interview records yes, is a written recipe the assistant follows. EMET does not copy prompts or settings itself. A backup and restore verification runbook, and export / import / restore-and-compare, are not built. They are listed in the README known gaps. An instance control plane that only provisions an isolated instance is not built. Charter commitment 6 is not answered for that tool.
50
+
51
+ ### Records and reads
52
+
53
+ - **Transcript and history queries, and read-tool input validation (Planned).** `query_transcripts` already reads by time range or session id. `read_doc` already accepts an expected version and an expected digest. Further query improvements and stricter validation of read-tool inputs are Planned and are not a finished change in this release.
54
+ - **Claim-status grading (Proposed).** Extend provenance so every recorded claim carries a status: established, deduced, proposed, still owed, or rejected. Rejected routes stay on the record with the reason they failed.
55
+ - **Index-first retrieval (Proposed).** Score candidates against a one-line-per-item index before opening anything, open only the best match, and follow one link at most.
56
+
57
+ ### Still proposed, and not built
58
+
59
+ - **Monorail switches.** Small logic at each junction where a session's flow must fork, tripped only by its condition. Designed, not built. No hosted model and no API. A switch that picks a GEM is the later GEM item below.
47
60
  - **Organizational use.** Many private EMETs and a document gateway between them. Nothing built before a named customer.
48
- - **Instance control plane (future, not built).** An operator tool that only provisions an isolated instance: a new MongoDB database, a new deploy, and a new passphrase. It does not add a tenant to an existing database. It does not share `EMET_OAUTH_PASSPHRASE`, `EMET_SIGNING_KEY`, `EMET_SUBKEY_PEPPER`, or `EMET_ACTIVE_GEMS`. Charter commitment 6 is not answered, so nothing is built. The supported model today is [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
49
- - **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.
50
- - **Compiled topic pages, pilot (2026-09-30).** Topic pages shipped in 0.3.0 as `emet_page`, `emet_pages`, and `emet_page_lint`: a view computed on each request, not a stored compiled page. The compiled-page pilot is still proposed. 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.
51
- - **Lint pass over the semantic layer (2026-09-30).** `emet_page_lint` shipped in 0.3.0 and flags a topic page. It does not edit. The scheduled semantic sweep is still proposed: a 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.
52
- - **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.
53
- - **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.
61
+ - **Advisory judge for team traffic (parked).** A fast external decision model could sort traffic when many people and hosts share one EMET. It would never sit in the write path. Not for single-user installs.
62
+ - **Local open-weight model as a host.** A read-only trial under a locally run model, once the host machine's capacity is on record.
54
63
  - **Stranger install.** A clean-machine install by someone who has never seen EMET, to find first-run friction.
55
64
  - **Remove Dynamic Client Registration** by 2027-06-01, as MCP moves to client ID metadata documents.
56
- - **Public landing page and npm package (live).** The site in `site/` is published to GitHub Pages, and `@dreamforgestudiollc/emet` is on npm.
65
+ - **Later GEM work, not built.** Creator keyring and signature checks, a public GEM submission repository, accepting a library GEM onto the load list, and a monorail switch that picks a GEM. Each waits on its own proposal. The socket itself is built and is not in this list.
66
+
67
+ ### How to follow progress and give feedback
68
+
69
+ This file is the public list. It changes in the repository when an item moves. Discussion belongs in [GitHub issues](https://github.com/dreamforgestudiollc/EMET/issues). Open an issue before a pull request for anything beyond a typo. Say which roadmap item you mean, and do not send passphrases, tokens, connection strings, or memory content.
57
70
 
58
71
  ## Design commitments these must keep
59
72
 
60
73
  - No model in the write path: EMET stores what the assistant deliberately chose to write.
61
- - Controls, not reminders — a rule that matters is checked by the server.
74
+ - Controls, not reminders. A rule that matters is checked by the server.
62
75
  - 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.
63
76
  - Correct the record by superseding, never by editing.
package/docs/SETUP.md CHANGED
@@ -251,9 +251,19 @@ it should come back `ready` with your existing identity, not `setup_required`. I
251
251
  `setup_required`, one of the four variables above is wrong; **do not run the setup interview,
252
252
  which would write a new identity over your existing one.**
253
253
 
254
+ ## Upgrading to 0.3.7
255
+
256
+ 0.3.7 adds per-tag handoffs, off unless the owner sets `EMET_TAG_HANDOFFS` to `warn` or `enforce`, and sub-key session renewal. Stored rows are not rewritten. No new setting is required. The handle length stays 12 hours. A stranded session is marked `auto_closed` by the sweep. The row and the transcript stay. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
257
+
258
+ ## Upgrading to 0.3.6
259
+
260
+ 0.3.6 is a docs and wording release. Stored data shapes are unchanged. No new setting. Deploy over 0.3.5 as is. The public roadmap's Upcoming work section is not built unless it says so.
261
+
262
+ ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
263
+
254
264
  ## Upgrading to 0.3.5
255
265
 
256
- 0.3.5 brings the public docs current. Stored data shapes are unchanged. The bound door's tag is `bound-host`. Writes from a stored legacy token or sub-key are stamped `bound-host`. The alias covers stored data only. The previous spelling is refused for a new consent, a new sub-key request, a new writer request, a new member or guest code, a new setup source, and a chooser decision.
266
+ 0.3.5 brings the public docs current. Stored data shapes are unchanged. The bound door's tag is `bound-host`. Writes from a stored legacy token or sub-key are stamped `bound-host`. The alias covers stored data only. The previous spelling is refused for a new consent, a new sub-key request, a new writer request, a new member or guest code, a new setup source, a chooser decision, and a break-glass reissue.
257
267
 
258
268
  ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
259
269
 
package/docs/SUBKEYS.md CHANGED
@@ -32,7 +32,9 @@ List each bot's tag in `EMET_SOURCE_TAGS` before it asks for a key. An empty lis
32
32
  3. On the chooser, approve that request. Deny applies only to a pending request.
33
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
34
 
35
- A bot opens a session with that key. `emet_session_open` returns `session_handle` once. Every later write in that session passes `session_handle`. A write that names the session and omits the handle, or sends a different one, is refused, and nothing is written. The handle is not a receipt and is not written into a document.
35
+ A bot opens a session with that key. `emet_session_open` returns `session_handle` once. Every later write in that session passes `session_handle`. A write that names the session and omits the handle, or sends a different one, is refused, and nothing is written. The handle lasts 12 hours. In the last hour, and for one hour after it expires, an open that presents the sub-key and the handle closes the old session into the new one. The server closes a session that is past that grace on its own and marks it `auto_closed`. The row and the transcript stay. A status read of a stranded session is not refused and does not write. The handle is not a receipt and is not written into a document.
36
+
37
+ The owner can set the key's kind with `emet_subkey_set_kind`: `bot` or `chat`. A key with no kind stored is a bot. A chat key whose previous turn left no wrap-up is reported unwrapped on the next open. The owner approves the kind on `/owner/chooser` as well.
36
38
 
37
39
  ## A key lasts 30 days
38
40
 
@@ -0,0 +1,34 @@
1
+ # Continuity currency
2
+
3
+ ```mermaid
4
+ stateDiagram-v2
5
+ [*] --> GateOff
6
+ GateOff --> GateOff: warn flag stays off
7
+ GateOff --> Comparing: warn flag on
8
+ Comparing --> Current: handoff cites the live material tip
9
+ Comparing --> DocumentedNoOp: documented no-op, no newer material tip
10
+ Comparing --> Current: newer episodic is scratch or diagnosis only
11
+ Comparing --> Current: version number alone
12
+ Comparing --> Warning: material tip is newer
13
+ Comparing --> FallbackOnly: only a fallback tip is newer
14
+ Comparing --> NoHandoff: no handoff to compare
15
+ Comparing --> Unreadable: the comparison could not be read
16
+ Warning --> BlockHeld: block asked, still does not block
17
+ FallbackOnly --> FallbackHeld: block asked, still does not block
18
+ Warning --> Comparing: the next initialize compares again
19
+ Current --> Comparing: the next initialize compares again
20
+ DocumentedNoOp --> Comparing: the next initialize compares again
21
+ BlockHeld --> Comparing: the next initialize compares again
22
+ FallbackOnly --> Comparing: the next initialize compares again
23
+ FallbackHeld --> Comparing: the next initialize compares again
24
+ NoHandoff --> Comparing: the next initialize compares again
25
+ Unreadable --> Comparing: the next initialize compares again
26
+ ```
27
+
28
+ The warn-only comparison of the served handoff with the material episodic tip. `EMET_CONTINUITY_CURRENCY` is off unless it is `1`. A lag warns. The server does not rewrite HANDOFF or STATE, and it does not block the call. `EMET_CONTINUITY_CURRENCY_BLOCK` is reserved and is not applied.
29
+
30
+ The model is `verification/continuity-currency/ContinuityCurrency.tla`, with `ContinuityCurrency.cfg`. TLC does not enumerate episodic ids. `newer` and `claim` are classes. `fallback` is a logged tip: it warns, and it is not block-eligible. No handoff and an unreadable comparison are phases. The executable check is `continuityCurrencyStep` in `src/continuity-currency-statechart.js`. TLC on this revision found 16 distinct states. The depth of the complete state graph is 4. No error. `TypeOK`, `NeverRewrites`, `NeverBlocks`, `WarnOnlyOnMaterialLag`, `FlagOffShowsNothing`, `NoOpIsNotAWarning`, `NoHandoffIsQuiet`, `UnreadableIsQuiet`, `FallbackOnlyIsNotBlockEligible`, `ScratchIsNotAWarning`, and `VersionAloneDoesNotWarn` hold. The run is `verification/continuity-currency/tlc-output.txt`.
31
+
32
+ The generated chart draws 10 states and 17 arrows. It joins the three Comparing to Current reasons onto one arrow, and it omits the step that stays in Gate off, the warn flag staying off. This diagram draws that step and keeps the three reasons separate. No handoff, unreadable, and fallback-only are on both.
33
+
34
+ When `EMET_TAG_HANDOFFS` is `warn` or `enforce`, the same gate is read per tag. An open session with material work is an in-progress line on the handoff view. It is not a lag. After `EMET_STALE_OPEN_HOURS` (default 24) that line is marked stale-open. The overall status is the worst status among the tags that count. A `no_handoff` tag with no material episodic rows at or after the cutoff stays on the per-tag list and is left out of that overall status. A tag with material rows at or after the cutoff, or with no readable timestamp, and no handoff still counts. While the flag is `warn` or `enforce`, `legacy_pre_attribution` is on every reading. The cutoff is the start of the UTC day 2026-09-27 (`2026-09-27T00:00:00.000Z`). A row at or after that instant with no registered source still warns. `does_not_block` stays true. No setting refuses the call. The picture for that protocol is [per-tag-handoff-statechart.md](per-tag-handoff-statechart.md).
@@ -0,0 +1,21 @@
1
+ # Feature map
2
+
3
+ This is the map of what EMET does today, written from the outside. Each file is one feature. A feature names the tools that belong to it, how a person reaches it, how `verify-emet` drives it, and the traps that waste a run.
4
+
5
+ `npm run verify` is the command. It is `scripts/verify-emet.mjs`. From a checkout it starts EMET in a temporary directory on the in-memory test database, with no `.env` and no settings copied from the machine that launched it. A tool that still needs a service or a setting a plain install does not have is a gap. The command reports the gap and does not pretend the call succeeded. Exit 0 means every driven tool passed and the selection had no gap. Exit 1 means a tool failed, Node is older than 22, or the test database is missing. Exit 2 means the command line was not understood. Exit 3 means the only problems are gaps.
6
+
7
+ | Feature | What it is |
8
+ |---|---|
9
+ | [Startup](startup.md) | First call, the interview, and the store status. |
10
+ | [Memory layers](memory.md) | Save, search, query, and supersede layer entries. |
11
+ | [Search beyond keywords](search.md) | Meaning search and an optional corpus. Both are gaps on a standalone run. |
12
+ | [Transcripts](transcripts.md) | Open a session, append each exchange, and close. |
13
+ | [Documents](documents.md) | Versioned documents, history, and obsolescence. |
14
+ | [Topic pages](pages.md) | Computed views. They are not records. |
15
+ | [Error codes and the error log](errors.md) | Stable codes, the operational log, and `emet_error_report`. |
16
+ | [The record and the floor](record.md) | Gap counts, and the floor that ships in the server. |
17
+ | [Access](access.md) | Approving a client, and the two doors for a second person. |
18
+ | [Client sub-keys](subkeys.md) | Delegated keys. Off unless you turn them on. |
19
+ | [GEMs](gems.md) | Add-on behavior the client runs. EMET checks the record. |
20
+
21
+ A registered tool that is missing from this map fails `tests/feature-map.test.js`. Add the tool to the feature file in the same change that registers it.
@@ -0,0 +1,28 @@
1
+ # Access
2
+
3
+ The store has one owner. `emet_client_approve` approves or denies a client that was flagged on a first write. `emet_invite_create` mints a one-time guest code. `emet_member_access_create` mints a one-time member code. Both doors are off unless you turn them on. A code is shown once and is not stored in the clear.
4
+
5
+ ## Sub-features
6
+
7
+ - access-approve: `emet_client_approve` takes a tag and a decision of `approve` or `deny`. Pending clients are listed by `emet_initialize` and `emet_status`.
8
+ - access-guest: `emet_invite_create` is EMET Guest Access, read-only. It stays off unless `EMET_INVITES=1`.
9
+ - access-member: `emet_member_access_create` is EMET Member Access, read and write, never the owner. It stays off unless `EMET_MEMBER_ACCESS=1`.
10
+
11
+ ## How to get to it (user POV)
12
+
13
+ A new client is read-limited until you approve it. You see the pending tag in startup or status, then call `emet_client_approve`. For a second person, turn on the door you mean, then create the code and show it once. They paste it on the connect screen instead of the passphrase. Guest access is not member access.
14
+
15
+ ## Driving it with verify-emet
16
+
17
+ ```
18
+ npm run verify -- feature access
19
+ npm run verify -- run emet_client_approve emet_invite_create emet_member_access_create
20
+ ```
21
+
22
+ On a plain install the two doors are off. The drive expects those two calls to refuse with `EMET-AUTH-030` and `EMET-AUTH-034`. That refusal is the tool working. The approve call denies a tag that exists only inside the temp database. `--dry-run` skips all three, because each one can change who has access.
23
+
24
+ ## Gotchas
25
+
26
+ - Do not invent a guest or member answer during setup. The doors stay off until the matching variable is `1`.
27
+ - A client does not approve itself.
28
+ - The code is not in the result a second time. Show it when it is created.
@@ -0,0 +1,35 @@
1
+ # Documents
2
+
3
+ Continuity documents are versioned. `write_doc` stores a new revision and archives the previous one. When a host truncates one argument, `write_doc_begin`, `write_doc_append`, and `write_doc_commit` send the same revision in parts. `write_doc_abort` drops an open stage and leaves the current document unchanged. `read_doc` reads the current text, in pages when it is long. `read_doc_history` reads a retained revision. `list_docs` lists metadata. `patch_doc` replaces one exact substring. `rename_doc` reissues a document under a new id and marks the old id obsolete. `restore_doc` writes a retained revision back. `validate_doc` checks form and continuity and writes nothing. `accept_nonconformance` records a written disposition for a marker that will not be corrected. `retire_doc` marks a drop obsolete. The document stays.
4
+
5
+ ## Sub-features
6
+
7
+ - doc-write: `write_doc` and `patch_doc` archive the prior copy and check the digest on the way back.
8
+ - doc-stage: `write_doc_begin`, `write_doc_append`, and `write_doc_commit` assemble one revision. `write_doc_abort` drops the stage.
9
+ - doc-read: `read_doc`, `read_doc_history`, and `list_docs` do not change the store.
10
+ - doc-check: `validate_doc` is the write-path check, borrowed, with no write.
11
+ - doc-reissue: `rename_doc` writes the destination first, then marks the old id obsolete.
12
+ - doc-restore: `restore_doc` copies a retained revision back through the normal write path. The source tag must be listed in `EMET_RESTORE_TAGS`.
13
+ - doc-accept: `accept_nonconformance` keeps the marker and writes the acceptance beside it.
14
+ - doc-retire: `retire_doc` is for drops. A working note is edited, not retired.
15
+
16
+ ## How to get to it (user POV)
17
+
18
+ You already have a session open. `list_docs` shows the ids. `read_doc` with a `doc_id` returns the text. For a small edit, `patch_doc` with the exact old text, the new text, and a reason of at least 10 characters. For a new document, `write_doc` with the whole text. Records such as the handoff are written whole, with `supersedes` set to the version in force. `validate_doc` before you store a draft. If a stored document is nonconforming and you will not correct it, `accept_nonconformance` with a reason. To mark a drop obsolete, `retire_doc`. `read_doc` still returns it, flagged retired.
19
+
20
+ ## Driving it with verify-emet
21
+
22
+ ```
23
+ npm run verify -- feature documents
24
+ npm run verify -- run read_doc read_doc_history write_doc write_doc_begin write_doc_append write_doc_commit write_doc_abort list_docs patch_doc rename_doc restore_doc validate_doc accept_nonconformance retire_doc
25
+ ```
26
+
27
+ The drive writes a note, patches it, restores the retained revision, renames it, writes an area, accepts a nonconforming area, and retires a drop. `--dry-run` skips the calls whose annotations say they replace what is already there.
28
+
29
+ ## Gotchas
30
+
31
+ - `patch_doc` requires the old text to match exactly once. Zero matches or several matches write nothing.
32
+ - `retire_doc` refuses a working document. Write a `drops/` id if you mean a drop.
33
+ - `restore_doc` refuses a tag that is not in `EMET_RESTORE_TAGS`. The standalone drive sets that list to its own source tag inside the temp process. It does not read your environment.
34
+ - `accept_nonconformance` refuses a document that has no nonconformance marker.
35
+ - Prior versions are retained. A correction adds a revision. It does not remove the old one.
@@ -0,0 +1,32 @@
1
+ # Error codes and the error log
2
+
3
+ Every error carries a stable code, such as `EMET-INT-001`, next to the existing error field. A new choice of the previous bound-door spelling is `EMET-AUTH-045`. The refusal sites are a new consent, a sub-key request, a writer request, a member or guest code, a setup source, `/owner/chooser`, and `/owner/break-glass`. The registry is `src/error-codes.js`. The table is `docs/ERROR-CODES.md`. A code's meaning does not change. A removed code stays retired and its number is not reused.
4
+
5
+ Operational errors go to a separate log, `error_log`. It is not a controlled record. It keeps up to 10,000 entries or 90 days, whichever is smaller, and a daily summary of each day is kept in `error_log_summary` with no end date. Rotation removes entries from `error_log` only. The log holds codes, counts, times, and the version. It holds no message text, arguments, document content, names, or secrets.
6
+
7
+ `emet_error_report` is owner-only and read-only. It returns the report and an email draft. You read it, and you press Send yourself. EMET never sends mail.
8
+
9
+ ## Sub-features
10
+
11
+ - errors-codes: each returned error includes `error.emet_code`. An uncoded error that reaches a caller is `EMET-INT-001`.
12
+ - errors-log: `error_log` and `error_log_summary` are operational. They are not superseded documents.
13
+ - errors-report: `emet_error_report` reads the log and builds a `mailto:` draft. The address is `EMET_REPORT_EMAIL` when that variable is set. When it is unset, the address is `dreamforgestudio@mail.grokbot.com`. An empty string returns the report and no email.
14
+
15
+ ## How to get to it (user POV)
16
+
17
+ When a call fails, read `error.emet_code` and look it up in `docs/ERROR-CODES.md`. To send a problem on, run `emet_error_report` as the owner. Read the report, open the link, check the email in your own mail app, then send it. Set `EMET_REPORT_EMAIL` to keep reports at an address you choose.
18
+
19
+ ## Driving it with verify-emet
20
+
21
+ ```
22
+ npm run verify -- feature errors
23
+ npm run verify -- run emet_error_report
24
+ ```
25
+
26
+ The drive calls the tool as a local owner, the way stdio does, and expects a report. It does not send mail. There is no mail sender in this command.
27
+
28
+ ## Gotchas
29
+
30
+ - A remote caller who is not the owner is refused. The local process is the owner.
31
+ - The draft is not a delivery receipt. EMET does not open a network connection for this tool.
32
+ - The log is not a controlled record. Controlled records are still superseded, retired, and retained.
@@ -0,0 +1,31 @@
1
+ # GEMs
2
+
3
+ A GEM is an add-on: knowledge and, when it is runed, tools the client runs. EMET seats a GEM only when its released flag is the boolean true. EMET does not run the GEM's computation. EMET verifies the record, not the computation. What is written back is checked the same way as any other write.
4
+
5
+ This feature has no tool of its own. `emet_floor` can read one GEM's floor without turning it on. `emet_status` reports each seated GEM's byte cost and does not include the floor text.
6
+
7
+ ## Sub-features
8
+
9
+ - gem-seat: a GEM is seated at startup only when `released` is true, and only when you name it in the active list.
10
+ - gem-floor: `emet_floor` with `gem` reads that floor. Reading is not activation.
11
+ - gem-status: `emet_status` includes a `gems` object: installed, active, and any refusal. A socket failure is reported there and does not fail the status call.
12
+ - gem-client: a runed tool runs on the client. The server checks what comes back.
13
+
14
+ ## How to get to it (user POV)
15
+
16
+ Bundled examples stay off until you ask. Set `EMET_ACTIVE_GEMS` to the id you want, restart, and call `emet_status` to see that it seated. Call `emet_floor` with `gem` set to that id to read its floor before you rely on it. The client runs any tool the GEM declares. You still save through the normal write tools.
17
+
18
+ ## Driving it with verify-emet
19
+
20
+ ```
21
+ npm run verify -- feature gems
22
+ npm run verify -- run emet_floor emet_status
23
+ ```
24
+
25
+ `feature gems` does not call a tool, because there is nothing to call that belongs only here. The two commands above are how you see seating and the floor. Neither one turns a GEM on by itself.
26
+
27
+ ## Gotchas
28
+
29
+ - A missing `released` flag is refused, except for a legacy manifest pinned by id, version, and file digests.
30
+ - A GEM ranks below the core floor. It cannot remove a protected floor line.
31
+ - Status stays successful when the socket fails closed. Read the `gems` field. Do not assume an empty active list means the call failed.
@@ -0,0 +1,29 @@
1
+ # Memory layers
2
+
3
+ Six layers hold curated claims: identity, semantic, episodic, procedural, meta, and working. `save_to_layer` writes one entry. `recall` searches by keyword. `query_layer` filters one layer. `revise_memory` supersedes an entry with a new one. The old entry stays readable.
4
+
5
+ ## Sub-features
6
+
7
+ - memory-save: `save_to_layer` writes one entry and reads it back before it reports success.
8
+ - memory-recall: `recall` ranks current entries first. Pass `order` `"latest"` for time order.
9
+ - memory-query: `query_layer` takes a layer and optional filters.
10
+ - memory-revise: `revise_memory` adds a new entry that points at the one it replaces. Episodic entries are not revised.
11
+
12
+ ## How to get to it (user POV)
13
+
14
+ After startup, open a transcript session and pass that `session_id` on the save. Name the layer. Semantic and procedural saves also need a source: the session, or `metadata.derived_from`. Search with `recall` using the words you stored. Use `query_layer` when you know the layer and want a filter. To correct an entry, `revise_memory` with the full new text. Do not edit the old row.
15
+
16
+ ## Driving it with verify-emet
17
+
18
+ ```
19
+ npm run verify -- feature memory
20
+ npm run verify -- run save_to_layer recall query_layer revise_memory
21
+ ```
22
+
23
+ The drive saves a working-layer sentence, recalls it, queries that layer, then supersedes the saved id. Keyword search does not need a vector index. That index is a different feature.
24
+
25
+ ## Gotchas
26
+
27
+ - A semantic or procedural save with no `session_id` and no `derived_from` is refused, and nothing is written.
28
+ - A governed write with no session is refused. Open one with `emet_session_open` and the startup `load_id` first.
29
+ - `revise_memory` does not accept the episodic layer. Events stay as written.
@@ -0,0 +1,28 @@
1
+ # Topic pages
2
+
3
+ A topic page is a view computed when you ask. It is not a record, it is not stored, and `recall` does not return it. `emet_pages` lists the current area documents. `emet_page` builds one page. `emet_page_lint` flags problems and writes nothing. The owner writes the selector as `areas/<slug>.md`.
4
+
5
+ ## Sub-features
6
+
7
+ - pages-list: `emet_pages` returns a line count, a stale count, and the newest source time for each area.
8
+ - pages-read: `emet_page` cites every displayed line. A line with no source is dropped.
9
+ - pages-lint: `emet_page_lint` reports contradictions, broken links, and stale lines. A fix is a person's edit, not this tool.
10
+
11
+ ## How to get to it (user POV)
12
+
13
+ The owner writes `areas/<slug>.md` with `write_doc`, filled from the area template: layers, tags, keywords, document prefixes, source clients, a staleness window, and a cap. Then `emet_pages` to see the areas, and `emet_page` with that slug to read the view. `emet_page_lint` with the same slug, or with no area, to see findings. Only the owner can read a page.
14
+
15
+ ## Driving it with verify-emet
16
+
17
+ ```
18
+ npm run verify -- feature pages
19
+ npm run verify -- run emet_pages emet_page emet_page_lint
20
+ ```
21
+
22
+ The drive writes `areas/verify.md` first, then lists, reads, and lints it. The page body is not written back.
23
+
24
+ ## Gotchas
25
+
26
+ - There is no page until an area document exists. The error tells you to write `areas/<slug>.md`.
27
+ - A local session is the owner. A remote login must be the owner person.
28
+ - Lint does not revise, retire, or accept anything. Those stay separate tools.
@@ -0,0 +1,27 @@
1
+ # The record and the floor
2
+
3
+ `emet_gaps` counts holes in the record and names the ids behind the counts. It does not fill them. `emet_floor` reads the standing description of how the assistant engages. The floor ships in the server, so setup cannot overwrite it.
4
+
5
+ ## Sub-features
6
+
7
+ - record-gaps: `emet_gaps` covers unsourced assertions, attribution, digest mismatches, broken supersession, and the other classes the tool lists. Counts are complete. The id lists are capped.
8
+ - record-floor: `emet_floor` returns the core floor. `compact: true` is the short form. `section` returns one section. `gem` reads one installed GEM's floor and does not turn that GEM on.
9
+
10
+ ## How to get to it (user POV)
11
+
12
+ Call `emet_gaps` when you want to know how trustworthy the record is, before a consolidation pass, or after a migration. Closing a gap is a person's decision. Call `emet_floor` when you need the floor again without running startup. `emet_initialize` already returns the whole floor on a ready store.
13
+
14
+ ## Driving it with verify-emet
15
+
16
+ ```
17
+ npm run verify -- feature record
18
+ npm run verify -- run emet_gaps emet_floor
19
+ ```
20
+
21
+ `emet_floor` does not need the test database. `emet_gaps` does. A floor-only run is the fast check that the command can start.
22
+
23
+ ## Gotchas
24
+
25
+ - A gap count is not a repair. The tool identifies. It does not write.
26
+ - Reading a GEM floor does not seat that GEM.
27
+ - Re-reading the floor is not the same as being bound by it.
@@ -0,0 +1,27 @@
1
+ # Search beyond keywords
2
+
3
+ `semantic_recall` searches the six memory layers by meaning. `corpus_recall` searches an optional corpus the user loaded separately. Neither is where a session starts, and neither runs for real on the standalone test database.
4
+
5
+ ## Sub-features
6
+
7
+ - search-semantic: `semantic_recall` needs a vector search index on the memory collections.
8
+ - search-corpus: `corpus_recall` needs a corpus collection you populate, and a vector index on it. Until then it is not session memory.
9
+
10
+ ## How to get to it (user POV)
11
+
12
+ Use `recall` or `query_layer` for the words you stored. Call `semantic_recall` when you want matches that do not share those words, and only after the vector index exists on your database. Call `corpus_recall` only after you have loaded a corpus of your own. An empty corpus is an empty answer, not a failure of memory.
13
+
14
+ ## Driving it with verify-emet
15
+
16
+ ```
17
+ npm run verify -- feature search
18
+ npm run verify -- run semantic_recall corpus_recall
19
+ ```
20
+
21
+ Both tools are standalone gaps, so this run exits 3. The command does not call them. An empty result from the in-memory store would look like a successful search, and that would hide the missing index.
22
+
23
+ ## Gotchas
24
+
25
+ - A gaps-only run exits 3. Do not treat that as a crash in the tool. The report says what to use instead. A failed tool still exits 1.
26
+ - `corpus_recall` is not a second copy of session memory.
27
+ - Turning the gap into a pass means giving the standalone process a real vector index, not a stub that returns no rows.
@@ -0,0 +1,29 @@
1
+ # Startup
2
+
3
+ The first thing a session does. `emet_initialize` is the only setup step a person has to know by name. A new store answers with a short interview. `emet_setup_complete` records those answers. `emet_status` says whether the store is reachable and, when asked, proves the write path.
4
+
5
+ ## Sub-features
6
+
7
+ - startup-interview: `emet_initialize` on a new store returns the questions and writes nothing.
8
+ - startup-pages: a large startup comes back in pages. Read every page before relying on it. `page` `"all"` returns the whole startup in one result.
9
+ - startup-complete: `emet_setup_complete` writes the identity documents and the owner. A second run is refused unless `reissue` is true.
10
+ - startup-status: `emet_status` reports the store. `probe: true` writes a document, reads it back, and removes that document only.
11
+
12
+ ## How to get to it (user POV)
13
+
14
+ Open a session and call `emet_initialize` with no arguments before you answer from memory. If the result says setup is required, ask the interview questions and pass the answers to `emet_setup_complete`. Call `emet_initialize` again and follow `page_notice` until the last page. Keep `startup_page.load_id`. Later, `emet_status` is the check that the store is up. Use the probe after a configuration change, not on every turn.
15
+
16
+ ## Driving it with verify-emet
17
+
18
+ ```
19
+ npm run verify -- feature startup
20
+ npm run verify -- run emet_initialize emet_setup_complete emet_status
21
+ ```
22
+
23
+ The standalone run uses the in-memory test database. `emet_setup_complete` replaces identity documents, so `--dry-run` skips it and names the call it would have made. The status probe is skipped for the same reason.
24
+
25
+ ## Gotchas
26
+
27
+ - An open without `load_id`, or with a page of that startup never fetched, is refused. Call `emet_initialize` again and read every page.
28
+ - Re-running setup on a store that is already set up is refused until the owner passes `reissue: true`.
29
+ - `probe: true` removes only the probe document. It is not a general delete.
@@ -0,0 +1,30 @@
1
+ # Client sub-keys
2
+
3
+ Delegated keys for more than one client. Off unless `EMET_SUBKEYS=1`. With the flag off, the host's tool list does not include `emet_subkey_request`, `emet_subkey_claim`, `emet_subkey_revoke`, `emet_subkey_end_session`, or `emet_subkey_set_kind`.
4
+
5
+ ## Sub-features
6
+
7
+ - subkey-request: `emet_subkey_request` asks for a key for one registered source tag. Only an authenticated owner login may call it. The result carries a one-time claim nonce.
8
+ - subkey-claim: `emet_subkey_claim` turns an approved nonce into a key shown once.
9
+ - subkey-revoke: `emet_subkey_revoke` retires a key's authority. The record stays. Later writes with that session handle are refused.
10
+ - subkey-end: `emet_subkey_end_session` ends a stuck live session and leaves the key usable.
11
+ - subkey-kind: `emet_subkey_set_kind` stores `bot` or `chat` on an approved key. A key with no kind stored is a bot.
12
+
13
+ ## How to get to it (user POV)
14
+
15
+ Leave this off for a single client. When you want it, say yes in the interview only if this server reads `.env`. Otherwise set `EMET_SUBKEYS=1`, a pepper you generate, and `EMET_SUBKEY_PEPPER_VERSION=1`, then start the server again. From the owner login, request a key, approve it, and let the client claim it once. The client keeps the key as a local secret. It is never written into EMET content.
16
+
17
+ ## Driving it with verify-emet
18
+
19
+ ```
20
+ npm run verify -- feature subkeys
21
+ npm run verify -- run emet_subkey_request emet_subkey_claim emet_subkey_revoke emet_subkey_end_session emet_subkey_set_kind
22
+ ```
23
+
24
+ All four are standalone gaps, so this run exits 3. A temp directory has no flag, no pepper, and no authenticated owner login, so the tools are not registered. The command reports that. It does not turn the flag on to hide the gap. A failed tool still exits 1.
25
+
26
+ ## Gotchas
27
+
28
+ - A server that is not reading `.env` will not write the pepper into that file. You set the three variables and start the server again.
29
+ - The claim nonce and the key are shown once.
30
+ - With the flag off, a write that presents a session handle is refused.