-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmif-base.ontology.yaml
More file actions
202 lines (187 loc) · 6.25 KB
/
mif-base.ontology.yaml
File metadata and controls
202 lines (187 loc) · 6.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
---
# MIF Base Ontology - Cognitive Triad Model
#
# This ontology defines the hierarchical namespace structure based on the
# cognitive science triad: semantic, episodic, and procedural memory.
#
# Version: 0.1.0
# Last Updated: 2026-01-26
ontology:
id: mif-base
version: "0.1.0"
description: "MIF base ontology with cognitive triad namespace hierarchy"
schema_url: >-
https://mif-spec.dev/schema/ontology/ontology.schema.json
# Cognitive Triad Namespace Hierarchy
#
# Three top-level namespaces based on memory types:
# - semantic: Facts, concepts, relationships (declarative knowledge)
# - episodic: Events, experiences, timelines (autobiographical memory)
# - procedural: Step-by-step processes (skill-based knowledge)
#
# Each top-level has sub-namespaces for organization.
# Path format: _{top-level}/{sub-namespace}
# Example: _semantic/decisions, _episodic/incidents, _procedural/runbooks
namespaces:
_semantic:
description: "Facts, concepts, relationships - declarative knowledge"
type_hint: semantic
children:
decisions:
description: "Architectural choices with rationale"
type_hint: semantic
knowledge:
description: "APIs, context, learnings, security - factual knowledge"
type_hint: semantic
entities:
description: "Entity definitions - technologies, components, systems"
type_hint: semantic
preferences:
description: "User preferences, settings, configuration choices"
type_hint: semantic
_episodic:
description: "Events, experiences, timelines - autobiographical memory"
type_hint: episodic
children:
incidents:
description: "Production issues, outages, postmortems"
type_hint: episodic
sessions:
description: "Debug sessions, work sessions, meeting notes"
type_hint: episodic
blockers:
description: "Impediments, issues preventing progress"
type_hint: episodic
_procedural:
description: "Step-by-step processes - skill-based knowledge"
type_hint: procedural
children:
runbooks:
description: "Operational procedures, SOPs, playbooks"
type_hint: procedural
patterns:
description: "Code conventions, best practices, testing strategies"
type_hint: procedural
migrations:
description: "Migration steps, upgrade procedures, data transformations"
type_hint: procedural
# Base entity types
# These are the fundamental memory types that all entities inherit from.
# Custom ontologies define domain-specific entity types with these as base.
entity_types: []
# Base traits
# Reusable mixins that can be composed into entity types.
traits:
timestamped:
description: "Adds creation and update timestamps"
fields:
created_at:
type: string
format: date-time
description: "When the memory was created"
updated_at:
type: string
format: date-time
description: "When the memory was last updated"
confidence:
description: "Adds confidence score for memory decay"
fields:
confidence:
type: number
description: "Confidence score (0.0-1.0)"
provenance:
description: "Adds source tracking"
fields:
source:
type: string
description: "Where this knowledge came from"
author:
type: string
description: "Who captured this memory"
# Base relationships
# Standard relationships that apply across all memory types.
relationships:
relates_to:
description: "General association between memories"
from: []
to: []
symmetric: true
supersedes:
description: "Newer memory replaces older one"
from: []
to: []
symmetric: false
derived_from:
description: "Memory was derived from another"
from: []
to: []
symmetric: false
# Discovery patterns for automatic namespace suggestion
discovery:
enabled: true
confidence_threshold: 0.8
# Content patterns - matched against user prompts
content_patterns:
- pattern: "\\blet'?s use\\b|\\bdecided to\\b|\\bwe will use\\b"
namespace: _semantic/decisions
- pattern: "\\bgoing with\\b|\\bchose\\b|\\bpicked\\b"
namespace: _semantic/decisions
- pattern: "\\bthe plan is\\b|\\bour approach\\b"
namespace: _semantic/decisions
- pattern: "\\blearned that\\b|\\bturns out\\b|\\bTIL\\b"
namespace: _semantic/knowledge
- pattern: "\\brealized\\b|\\bthe fix was\\b|\\bthe solution\\b"
namespace: _semantic/knowledge
- pattern: "\\bdon'?t forget\\b|\\bremember this\\b"
namespace: _semantic/knowledge
- pattern: "\\bshould always\\b|\\balways use\\b"
namespace: _procedural/patterns
- pattern: "\\bconvention\\b|\\bbest practice\\b"
namespace: _procedural/patterns
- pattern: "\\bblocked by\\b|\\bstuck on\\b"
namespace: _episodic/blockers
- pattern: "\\boutage\\b|\\bincident\\b|\\bpostmortem\\b"
namespace: _episodic/incidents
- pattern: "\\brunbook\\b|\\bplaybook\\b|\\bSOP\\b"
namespace: _procedural/runbooks
# File patterns - matched against file paths being edited
file_patterns:
- pattern: "auth|login|session|jwt|oauth|token"
namespaces:
- _semantic/knowledge
- _semantic/decisions
context: authentication
- pattern: "api|endpoint|route|controller|handler"
namespaces:
- _semantic/knowledge
- _semantic/decisions
context: API design
- pattern: "db|database|model|schema|migration|sql"
namespaces:
- _semantic/decisions
- _procedural/migrations
context: database
- pattern: "test|spec|mock|fixture"
namespaces:
- _procedural/patterns
context: testing
- pattern: "config|settings|env"
namespaces:
- _semantic/decisions
- _semantic/knowledge
context: configuration
- pattern: "deploy|docker|kubernetes|helm|ci|cd"
namespaces:
- _procedural/runbooks
- _semantic/decisions
context: deployment
- pattern: "security|encrypt|hash|sanitize"
namespaces:
- _semantic/knowledge
- _semantic/decisions
context: security
- pattern: "service|component|module"
namespaces:
- _semantic/entities
- _semantic/decisions
context: components