DDR-001 — Faceted classification system¶
Version: 0.1.0 | Date: 2026-04-11 | Status: Accepted
Context¶
Engrama is a graph-based long-term memory framework for AI agents. Nodes represent entities (projects, problems, technologies, decisions) and edges represent relationships between them. The central question: how should entities be classified so that an agent can discover cross-domain patterns?
Traditional approaches — flat tags, folder hierarchies, or untyped links — all fail the same way: they conflate different kinds of information about an entity. "This problem is about type-safety" (identity), "it lives in the EOElite project" (context), and "it was solved by enabling strict null checks" (action) are three orthogonal facts, but flat taxonomies collapse them into a single axis.
Decision¶
Adopt a system of six orthogonal facets, adapted from Ranganathan's PMEST colon classification (1933) and enriched with concepts from BFO (Basic Formal Ontology). Every entity is classified along these independent dimensions:
| Facet | Question it answers | Relationship | Target node |
|---|---|---|---|
| Identity | What is it? | INSTANCE_OF |
Concept |
| Composition | What is it made of? | COMPOSED_OF |
Technology, Concept |
| Action | What does it do / what process? | PERFORMS / SOLVED_BY |
Concept, Decision |
| Purpose | What is it for? | SERVES |
Concept |
| Context | Where and when? | BELONGS_TO + timestamps |
Project, Client |
| Domain | Which field of knowledge? | IN_DOMAIN |
Domain |
Why these six¶
Ranganathan's PMEST (Personality, Matter, Energy, Space, Time) was designed for universal library classification. Our adaptation maps naturally to a knowledge graph:
- Personality → Identity (
INSTANCE_OF): the essential nature of the entity. - Matter → Composition (
COMPOSED_OF): what it's built from. - Energy → Action (
PERFORMS,SOLVED_BY): the process or transformation. - Space/Time → Context (
BELONGS_TO+ timestamps): anchoring in projects and time. - Purpose (added): Ranganathan didn't have this — BFO's
has_functionfills the gap. Knowing what something is for is critical for an agent deciding when to reuse it. - Domain (added): field-level filtering. An agent working on cybersecurity doesn't need photography nodes polluting recall.
Concept nodes as the bridge¶
The identity facet's target — Concept — is the most important node type. Concepts are the bridge that enables cross-domain discovery. When two Problems in different projects both INSTANCE_OF the same Concept (e.g., type-safety-violation), the agent discovers a pattern it can transfer.
Concepts must be:
- Domain-specific but project-agnostic:
type-safety-violationyes,eoelite-bug-42no. - At the right abstraction level: not too broad (
programming), not too narrow (line-47-fix). - Deduplicated: always search before creating.
Minimum classification rule¶
Every entity MUST have at least:
- Context (
BELONGS_TO) — without it, the node is unanchored.
INSTANCE_OF is MANDATORY for: Problem, Decision, Vulnerability. These types are meaningless without a Concept anchor — cross-domain discovery depends on it. INSTANCE_OF is RECOMMENDED for all other node types when it adds discovery value beyond what the label provides.
Every entity SHOULD have:
- Domain (
IN_DOMAIN) — enables field-level filtering.
Composition, action, and purpose should be applied when relevant to the entity's nature. Do not force facets that don't apply.
Consequences¶
Positive¶
- Cross-domain discovery:
MATCH (a:Problem)-[:INSTANCE_OF]->(c:Concept)<-[:INSTANCE_OF]-(b:Problem)finds similar problems across any two projects, domains, or time periods. - Orthogonal queries: each facet is independent, so queries can combine them freely. "Problems about type-safety in the cybersecurity domain solved by a Decision" is a natural graph traversal.
- Composable profiles: new domains (hacking, photography, AI) add node types and structural relations but reuse the same six facets. The classification system scales without redesign.
- Agent autonomy: the facet questions ("What is it?", "What is it made of?") are simple enough for an LLM to apply consistently without constant human correction.
Negative¶
- Learning curve: agents need the system prompt to understand the six facets. Without it, they revert to flat tagging.
- Over-classification risk: agents may force facets that don't apply. Mitigated by the rule: "do not force facets that don't apply."
- Concept drift: two agents might create subtly different Concepts for the same idea. Mitigated by the "always search before creating" rule.
References¶
- Ranganathan, S.R. (1933). Colon Classification. Madras Library Association.
- Arp, R., Smith, B., & Spear, A.D. (2015). Building Ontologies with Basic Formal Ontology. MIT Press.