docs(ai-memory): MemPalace → MIF Level-1 mapping + examples#65
docs(ai-memory): MemPalace → MIF Level-1 mapping + examples#65perlowja wants to merge 3 commits into
Conversation
Add a draft MemPalace -> MIF AI-Memory profile mapping at Level 1 (OKF-valid + cognitive-triad typing), with two worked example concepts: - mempalace-observation.md: a MemPalace entity -> semantic observation, with a knowledge-graph triple rendered as a typed MIF relationship. - mempalace-session.md: a MemPalace drawer -> episodic session (filed_at -> created; wing/room -> namespace path). MEMPALACE-MAPPING.md documents the structure/field mapping, the triple -> relationship rules (entity-object vs literal-object), the UUIDv5 id derivation, and what is deferred to Levels 2/3 (bitemporal validity -> version-DAG sidecar, trust tiers, compression manifest). Both examples pass scripts/okf_validate.py and the scripts/mif_convert.py roundtrip lossless check. Related modeled-information-format#60.
There was a problem hiding this comment.
Pull request overview
This PR adds a first-pass (Level-1 / OKF-valid) documentation mapping from MemPalace’s model (entities, drawers, triples) into the MIF AI-memory profile, plus two worked .md concept examples intended to ground discussion from #60.
Changes:
- Added a draft MemPalace → MIF Level-1 field/structure mapping reference.
- Added an
episodic“drawer → session” example concept. - Added a
semantic“entity → observation” example concept with a relationship + mirrored body link.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| profiles/ai-memory/MEMPALACE-MAPPING.md | Draft mapping reference for MemPalace constructs/fields to MIF AI-memory Level-1. |
| profiles/ai-memory/examples/mempalace-session.md | Example Level-1 episodic session concept derived from a MemPalace drawer. |
| profiles/ai-memory/examples/mempalace-observation.md | Example Level-1 semantic observation concept with a relationship and body sync. |
| Derived from a MemPalace **entity** (`name: "Alice Chen"`, `type: person`) and the | ||
| knowledge-graph **triple** `Alice Chen — works-on — Project Phoenix`. A MemPalace | ||
| entity is decontextualized, stably-true world knowledge, so it maps to the | ||
| cognitive-triad `semantic` type (the AI-memory `observation` reinterpretation). | ||
| The triple is rendered as a typed MIF relationship to the concept it references. |
| Derived from a MemPalace **drawer** (wing `Project Phoenix`, room `Incidents`, | ||
| `filed_at: 2026-01-15T10:30:00Z`, `source: chat`, `added_by: agent`). A drawer is | ||
| a time-anchored record of something the agent lived through, so it maps to the | ||
| cognitive-triad `episodic` type (the AI-memory `session` reinterpretation): the | ||
| drawer's `filed_at` becomes `created`, and its wing/room become the | ||
| `_episodic/sessions` namespace path. |
| See [`examples/mempalace-observation.md`](examples/mempalace-observation.md) | ||
| (entity → `semantic` observation, with a triple rendered as a `derived-from` | ||
| relationship) and [`examples/mempalace-session.md`](examples/mempalace-session.md) | ||
| (drawer → `episodic` session). Both pass `scripts/okf_validate.py` and the | ||
| `scripts/mif_convert.py roundtrip` lossless check. |
zircote
left a comment
There was a problem hiding this comment.
The review of PR #65 surfaced three problems the existing validators could not
catch, because okf_validate and mif_convert verify structure and lossless
round-trip rather than semantics. PR #79 (now merged into develop/v1.0.0) adds
the tooling to detect two of them and implements the third. Recommendations
follow each item.
1. Temporal inconsistency (fixed in develop/v1.0.0)
examples/mempalace-observation.md declares itself derived-from a session
whose created timestamp falls roughly ten months in its future. A derivation
cannot precede its source.
okf_validate now enforces that a derived-from, supersedes or cites target
is never created after the concept that derives from it.
- The check emits a warning by default and does not block. The
--strict-temporal
flag promotes the warning to a continuous integration (CI) failure once a
corpus is known clean. - Impact: zero false positives across the four canonical examples. Edges whose
target does not resolve, escapes the bundle, or whosecreatedvalue is absent
or unparseable, are skipped.
2. The Section 4 triple-to-relationship rule is unimplemented (for the #65 author to decide)
The example carries a single relationship, derived-from to the session, rather
than the works-on to Project Phoenix triple that Section 4 prescribes.
Section 4 and Section 6 also disagree (Section 6 describes the triple as a
derived-from relationship).
This is the one open item, and it sits in PR #65, not in the merged tooling. PR
#65 is not mine to edit, so I raise it here as a recommendation for its author.
Either correction resolves it:
- (a) reconcile the Section 4 and Section 6 wording, or
- (b) add the
works-onedge to the example, pointing at aProject Phoenix
concept.
The merged validators do not modify PR #65.
3. Scalar-properties gap (implemented in develop/v1.0.0)
Literal-object triples had no first-class representation and relied on a body
## Properties table. develop/v1.0.0 now provides a first-class scalar
properties field (values constrained to string, number, boolean or null) in
both the schema and the converter, lossless in each direction.
- Impact: the change is additive and backward compatible. It supersedes the
body-table workaround documented inMEMPALACE-MAPPING.md. - Follow-up: add a
SPECIFICATION.mdsection that documentsproperties.
All conversions remain lossless. The full chain (Modeled Information Format to
Open Knowledge Format projection to Modeled Information Format to JSON
serialization and back) is now covered by a regression test that enumerates every
top-level schema field and asserts none is dropped or clobbered. That test also
recovered two pre-existing lossless gaps (compressedAt and memoryType), which
are fixed in the same merge.
|
@perlowja please reopen to main now that it is stable |
|
Reopened as #206 against |
Per the discussion in #60 — here is the Level-1 first step of the MemPalace → MIF AI-Memory mapping (OKF-valid + cognitive-triad typing), against
develop/v1.0.0.What's here
profiles/ai-memory/MEMPALACE-MAPPING.md— the draft field mapping (open for your feedback).examples/mempalace-observation.md— a MemPalace entity →semanticobservation, with a KG triple rendered as a typed MIF relationship.examples/mempalace-session.md— a MemPalace drawer →episodicsession.Mapping at a glance
typesemantic(observation)filed_at/source/added_by)episodic(session)procedural(skill)relationships[](predicate→type, object→target path, confidence→strength); literal-object → body## Propertiestable (surfaces the absence of a first-class scalar-propertiesconstruct — flagged).valid_from/valid_to→ Level-3 version-DAG sidecar (deliberately not folded intocreated/modified); trust tiers → L2; compression manifest → L3.Validation
Opened as draft since the mapping is the discussion basis you asked for in #60. Happy to adjust the triad assignment, namespacing, or the literal-object handling before we layer up to L2/L3 (and I'll follow with the bidirectional converter + the edge-case test vectors from the MNEMOS portability review). Related #60.