# Local memory language and workbench The Memory & bindings tab is a bounded text adapter around a finite memory interface. It does not interpret arbitrary English or execute external actions. The Request plans tab continues to use the independent existing grammar parser. ## Version-1 statements (retained exactly) ``` Remember that "project color" is "green". What is "project color"? Change "project color" to "blue". What is "project color"? Reset memory. What is "project color"? ``` Each statement ends at an unquoted period, question mark, exclamation mark, or newline. Double-quoted labels support JSON string escapes and punctuation. Unquoted labels contain only Unicode word characters or hyphens. Labels are case sensitive and contain 1–128 characters, with no outer whitespace or control characters. Command keywords are case insensitive. Unsupported text remains an unresolved event and changes no binding. Remember creates or overwrites a binding. Change requires a currently remembered key. Recall of an unwritten key returns Unknown without allocating a key or value. Reset memory clears slots and live provenance; the session vocabulary remains reserved. The Reset session button clears the browser's whole memory record, including vocabulary and revisions. Every server replay starts from empty memory. The default session has at most 32 distinct written keys, 64 distinct written values, 128 statements, and 20,000 Unicode source characters. At most 16 previous source revisions and 40,000 total source characters can be retained. Capacity failures remain explicit unresolved events; neither vocabulary changes partially. A configured artifact can impose smaller key/value capacities. The complete pretty-printed record must also fit the 256 KiB import limit; an oversized replay fails explicitly rather than producing a record that cannot be restored. User labels map to the finite existing key/value IDs. Accepting new text labels is not evidence of learned vocabulary or semantic generalization. ## Engines and source provenance Without `renigma workbench --memory-artifact PATH`, the UI explicitly identifies the **dictionary reference, not learned**. A trusted local artifact supplied at server launch is checked using the memory artifact schema, requires an injective key-to-slot map, and executes via the standard-library exact memory interpreter. The interface shows the actual artifact file SHA-256 and retains the checkpoint SHA-256. Configuration alone is not independent evidence of training quality. Failed or colliding artifacts belong in experimental diagnostics, not this view. Only successful writes allocate integer session IDs: keys are zero based, values are one based, and zero is Unknown. The adapter replays the full operation stream through the configured engine and uses its returned answers. It records selected slots, actual last-write event IDs, overwritten-write IDs, and exact source spans in Unicode code points. Queries after reset have no live last-write source. To correct a conversation, edit its source and explicitly review it again. In version 1, earlier source texts are retained in `prior_sources`; the current trace is recomputed. Source buttons highlight event wording. Query provenance buttons highlight the write that supplied the selected slot, while overwrite links expose earlier writes. ## Version-1 document and API compatibility Memory documents use `format: "renigma.memory-session"`, `version: 1`, and the fields `source_text`, `prior_sources`, `engine`, `vocabulary`, `events`, and `bindings`. The full trace is exported, not a replacement for original source. Show memory JSON and Select memory JSON work without browser download support. Save memory JSON requests a download. Paste and file imports send raw JSON for duplicate-key rejection, verify the configured engine, and require exact canonical replay agreement before replacing the current browser session. A document from a different engine requires that artifact configured locally or a deliberate source review and rerun; the server never loads a path supplied in a document. - `GET /api/memory/config`: current engine identity and capacities. - `POST /api/memory/run`: `{ "text": "...", "prior_sources": [] }`. - `POST /api/memory/validate`: complete memory document; returns it only after schema, engine, and replay verification. The existing loopback Host/Origin checks, fixed resources, CSP, 256 KiB request limit, duplicate-key validation, and absence of server request logging apply. No server conversation persistence, automatic file writes, telemetry, personal-data training, or model-file uploads are introduced. ## LANG-002: explicit phrases and review Version 2 retains the original four phrase forms and adds the following six. This is deterministic grammar coverage, not a trained encoder or evidence of understanding unseen expressions. The command keywords are case insensitive. | Form | Canonical operation | Behavior | |---|---|---| | `Remember KEY is VALUE` | remember | Create or overwrite | | `Set KEY to VALUE` | remember | Create or overwrite | | `Store VALUE under KEY` | remember | Create or overwrite; note the value-first order | | `Update KEY to VALUE` | change | Change a currently remembered key | | `Recall KEY` | recall | Read or return Unknown | | `Clear memory` | reset | Clear live state and provenance | The original quote rules, codepoint spans, capacities and whole-clause matching still apply. Each clause is handled separately: a supported clause can succeed even when another is unresolved. There is no optional `Please` prefix in this version. Negated, conditional, joined or incomplete commands outside these forms remain unresolved. Bare assertions are not implicit writes. Version 2 reserves these unquoted label tokens, case insensitively, in both key and value positions: `it`, `its`, `this`, `that`, `these`, `those`, `he`, `she`, `him`, `her`, `they`, `them`, `their`, `you`, `your`, `we`, `us`, `our`, `me`, `my`. Such a clause stays unresolved without allocating vocabulary or modifying memory. This finite rejection rule does not amount to general ambiguity detection. Double quotes make any of these a literal label: `Set "it" to blue` explicitly names the key `it`. No referent is inferred from surrounding text. The new workflow is **Review interpretation → Use reviewed result**. A review shows canonical operations, actual-engine answers, source links and unresolved clauses, replayed from empty memory. The accepted document remains separate and is the only document exported. Editing source invalidates the review; canceling it leaves the accepted document intact. Adopting a review sends the exact source, versioned history and digest back for fresh replay and a full-document comparison. The SHA-256 digest detects changed interpretation or engine configuration; it is a consistency check, not an authentication credential or durable approval record. Version-2 documents use `version: 2`, `language_version: 2` and `prior_revisions: [{source_text, language_version}]` instead of `prior_sources`. Every history language version is exactly integer 1 or 2. The rest of the document retains the same vocabulary, event, binding and engine structures. History records the wording and parser profile used at each revision; it is not automatically executed or carried into the current memory state. Existing history and source limits apply, and revisions are never silently discarded to fit them. Importing version 1 preserves its original parser and document. In particular, `Set color to green` remains unsupported inside a version-1 export. Only an explicit review and adoption creates a version-2 interpretation; the old source is then retained with language version 1, even if its text is unchanged. Engine identity metadata is unchanged, and import validation rejects altered traces, unrecognized versions and mismatched engines before replacing the accepted record. - `POST /api/memory/preview`: exact fields `text` and `prior_revisions`; returns `{document, review_sha256}` after version-2 replay. - `POST /api/memory/apply`: exact fields `text`, `prior_revisions`, and `review_sha256`; returns the freshly replayed document only if its digest agrees. - `POST /api/memory/validate`: accepts the strict version-1 or version-2 schema and validates with that version's parser. The original `/run` remains version 1. Acceptance uses a frozen, synthetic, authored grammar corpus: 20 examples per phrase form, 200 negative clauses, and 80 multi-step episodes. Known templates with held-out label/sequence combinations are contract tests, not an unseen- language benchmark. Record event, span, answer, provenance and final-state agreement, by form and failure family, alongside the unchanged version-1 baseline.