maintain-ontology
Keeps 00-vision/01-ontology.ttl well-formed, internally consistent, and aligned with adapter cards under .eposforge/ so Cognee extraction remains ontology-grounded.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-12
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- maintain-ontology
- description
- Keeps 00-vision/01-ontology.ttl well-formed, internally consistent, and aligned with adapter cards under .eposforge/ so Cognee extraction remains ontology-grounded.
02 资源文件 3
- 参考文档references/owl-turtle-primer.md7.7 KB
- 脚本scripts/drift-window.sh3.1 KB
- 脚本scripts/test-drift-window.sh4.5 KB
03 SKILL.md 正文
Maintains 00-vision/01-ontology.ttl — the EposForge file that combines the domain ontology (OWL: the dark factory pattern model) and knowledge taxonomy (SKOS + ef:kind: the canonical tree organization of concepts, guidance, tenets, pillars, etc.). It grounds Cognee entity extraction for the Spec Graph so agents receive consistent, pattern-aligned knowledge.
This skill implements the editorial workflow. Distinguish:
- Domain ontology (OWL classes like ef:Component, properties like fulfillsSlot) — the pattern.
- Knowledge taxonomy (SKOS for labels/hierarchy on tree items + our NodeKind discriminator) — how we organize what we know.
When maintaining the taxonomy, also maintain discoverable usage guidance for adopter agents via the EposForge Cognee MCP:
- Add/update skos:scopeNote on ef:KnowledgeTree and ef:NodeKind with current access model (SKOS for tree navigation; OWL + ef:kind for pattern semantics).
- Keep ef:EposForgeMCPUsage (and similar guidance nodes) accurate and linked.
- Ensure new items have clear skos:prefLabel / skos:definition suitable for recall.
The TTL remains the single source of truth. See also the updated owl-turtle-primer for SKOS usage. The ontology & taxonomy policy is now at 04-standards/02-ontology-taxonomy/ontology-taxonomy.md (supersedes the previous vocabulary standard).
Primary purpose: keep the ontology internally coherent and aligned with installed adapter cards so entities extracted by Cognee remain anchored to stable EposForge IRIs. This enables external EposForge consumers to point their agents at the EposForge Cognee MCP server and use graph-backed guidance to automate dark-factory design and creation.
If this ontology drifts, consumer agents can still query Cognee MCP, but the guidance quality degrades (missing entities, weak relationships, or inconsistent terminology). This skill exists to prevent that drift.
Prerequisites
00-vision/01-ontology.ttl— the ontology file under review- previous ontology-grounded KG state via Cognee MCP when available — use it as the last published graph-backed memory of the ontology, not as authority over newer unrebuild corpus changes
- last full KG rebuild —
.eposforge/spec-graph/cognee/sync/last-full-rebuild(written bybulk-rebuild.sh) or, if missing, the majoritysynced_atcluster in.cognee-state.db - adapter cards and specs —
.eposforge/,.eposforge/SPEC.md, and core spec files under00-vision/,01-architecture/,02-roadmap/,04-standards/ - owl-turtle-primer — OWL/Turtle reference (load when coaching is needed)
Detect drift since the last full KG rebuild
The live graph last re-anchored at the last full KG rebuild, not the last TTL edit. A TTL commit can land without a rebuild; corpus between the rebuild and that TTL edit is still unanchored drift. Do not use git log -- 00-vision/01-ontology.ttl as the window.
bash "${EPOSFORGE_HOME:?set EPOSFORGE_HOME}/skills/maintain-ontology/scripts/drift-window.sh"
The program prints rebuild_commit, rebuild_date, and git diff --name-only ${rebuild}..HEAD -- "*.md". For each listed file, inspect the diff to identify new terms, new relationship keywords, new component docs, or new status values:
git diff "${rebuild}..HEAD" -- <file>
The drift report is that file list and the new concepts or relationships found in their diffs.
Query the previous KG first when available
When Cognee MCP is available, query the most recent ontology-grounded KG before editing the TTL. Use it as the last rebuilt memory of what the ontology already meant in graph form.
Ask for:
- the candidate term itself
- nearby related concepts already in the graph
- existing aliases or overlapping labels
- current relationship structure around the candidate term
Use the KG to answer: "what did the last ontology-backed graph already think this term meant?"
Important constraint:
- if the KG predates recent conceptual work, treat it as previous-state evidence only
- the current corpus and
00-vision/01-ontology.ttlremain the source of truth for the next edit - if Cognee is unavailable or stale, fall back to repo files and the drift report
This is specifically useful for the adopted editorial doctrine already modeled in the ontology: the tenet Randian concept formation; the concepts Rule of Fundamentality, measurement-omission, contextual essentiality, and explanatory power; and the guidance essential-characteristic node selection.
The previous-kg report is the set of nearest existing graph terms and relationships around the candidate concept.
Apply the concept-formation gate before minting terms
Before adding a new class, property, or individual to the TTL, force the proposal through the adopted concept-formation gate:
- Name the units being grouped.
- State the proposed essential characteristic.
- Test whether that characteristic explains the greatest number of other characteristics of those units.
- Check whether the characteristic is present across different measures or variants rather than being a one-off surface feature.
- Ask whether this is the deepest available distinction supported by current knowledge, or whether a later/more abstract/sibling term already captures it.
If the proposal fails these checks:
- do not mint a new ontology term
- prefer an alias on an existing term, a prose explanation in guidance, or no explicit modeling yet
This is the engineering-use slice of Rand's epistemology adopted by EposForge. The goal is not to encode philosophy for its own sake; the goal is to keep the ontology grounded in explanatory structure so Cognee extraction stays useful.
Scan corpus for ontology impacts
Walk the spec and adapter corpus in order, looking for concepts not yet modeled in the ontology.
Scan targets and what to look for:
| File / Glob | Signal | Maps to |
|---|---|---|
00-vision/01-ontology.ttl |
Existing class/property model | Baseline consistency |
01-architecture/00-adapter-pattern/adapter-pattern.md |
Metadata field names, status values | Properties, AdapterStatus individuals |
01-architecture/02-components/*.md |
Component names (one file = one Component individual) | ef:Component individuals |
02-roadmap/*.md |
Phase names (Phase 0–4, A–F) | ef:Phase individuals |
04-standards/**/*.md |
Standard titles, relationship keywords | ef:Standard individuals |
.eposforge/**/*.md |
Adapter status/capabilities and slot mapping | ef:Adapter model alignment |
AGENTS.md |
RELATIONSHIP KEYWORDS in caps | Object properties |
.scratchpad/knowledge-tree.txt |
Node kind tags ([concept], [guidance], [tenet], [group]) |
ef:Concept, ef:Guidance, ef:Tenet, ef:Group individuals |
| previous Cognee KG state | last rebuilt meaning/aliases/nearby edges for existing terms | editorial disambiguation before minting new terms |
Relationship keywords to detect (from AGENTS.md):
FULFILLS_SLOT, "fulfills", "fills slot" ->ef:fulfillsSlotDEPENDS_ON, "depends on", "requires" ->ef:dependsOnMATURES_TO, "matures", "operational at phase" ->ef:maturesToGOVERNED_BY, "governed by", "enforced by" ->ef:governedByIMPLEMENTS, "implements" ->ef:implementsLEGACY_SHAPE_OF,TARGET_SHAPE_OF->ef:legacyShapeOf,ef:targetShapeOfHAS_COMPONENT->ef:hasComponentHAS_STATUS->ef:hasStatus(Adapters only)KIND->ef:kind(node kind discriminator: pillar|group|component|concept|guidance|tenet)LIFECYCLE_STATUS->ef:lifecycleStatus(Concept/Guidance/Tenet only: proposed|adopted|retired)
The gap report is the set of concepts and relationships found in the corpus but absent from the TTL.
Apply TTL edits
For each item in the gap report, model it in 00-vision/01-ontology.ttl following these rules:
New Class (domain ontology — a type of thing in the dark factory pattern):
ef:MyClass rdf:type owl:Class ;
rdfs:label "My Class" ;
rdfs:comment "One-sentence definition from the glossary." .
Subclass (specialization in the domain model):
ef:MySubclass rdf:type owl:Class ;
rdfs:subClassOf ef:ParentClass ;
rdfs:label "My Subclass" ;
rdfs:comment "Definition." .
New Object Property (domain relation):
ef:myRelation rdf:type owl:ObjectProperty ;
rdfs:label "MY_RELATION" ;
rdfs:domain ef:SubjectClass ;
rdfs:range ef:ObjectClass .
Omit domain/range when open.
Knowledge tree item (use SKOS for taxonomy layer + our kinds):
ef:MyConcept rdf:type ef:Concept, skos:Concept ;
skos:prefLabel "My Concept" ;
skos:definition "..." ;
skos:inScheme ef:KnowledgeTree ;
ef:kind ef:NodeKindConcept ;
ef:lifecycleStatus ef:StatusAdopted .
MCP usage / agent guidance node (high-signal entry point for adopter agents):
ef:MyUsage rdf:type ef:Guidance, skos:Concept ;
skos:prefLabel "My Usage Guide" ;
skos:definition "How agents should query this area via the EposForge Cognee MCP..." ;
skos:inScheme ef:KnowledgeTree ;
ef:kind ef:NodeKindGuidance ;
ef:lifecycleStatus ef:StatusAdopted .
New Individual (domain or taxonomy item belonging to a class):
ef:MyThing rdf:type ef:MyClass ;
rdfs:label "My Thing" ;
rdfs:comment "Optional detail." .
Placement rules:
- New classes -> add under
### Classes, in alphabetical order within logical groupings - New properties -> add under
### Object Properties (Relationships) - New component individuals -> add under
### Individuals (The 14 Core Components), update the count in the heading if adding - New status individuals -> add under
### Adapter Status Individuals - New node kind individuals -> add under
### Node Kind Discriminator - New lifecycle status individuals -> add under
### Lifecycle Status - New Concept/Guidance/Tenet individuals -> add under a new
### Knowledge-Tree Individualssection before the### Adapter Status Individualssection - Usage / agent guidance nodes (ef:XXXMCPUsage style) -> place early in the main Knowledge-Tree Individuals section so they are highly recallable; link from ef:KnowledgeTree via skos:related or scopeNote.
After editing, verify the file is syntactically valid Turtle (no unclosed blocks, every statement ends with .).
Also verify the editorial rationale still passes the concept-formation gate: the new term should survive comparison against the nearest existing graph terms from the previous KG and the nearest current-corpus neighbors.
Rebuild the graph after editing
A TTL edit does not change the live graph on its own — Cognee only re-anchors at cognify time, and its content-hash dedup skips re-extraction of unchanged docs. So editing the ontology requires a full rebuild with a KG wipe, not an incremental sync. Hand off to update-spec-graph to run it; that skill owns the wipe + bulk-rebuild.sh flow and the verification that anchoring took. Document-only changes stay incremental and are also handled there.
Coach on OWL/Turtle + SKOS
Load [owl-turtle-primer](./references/owl-turtle-primer.md) (now includes SKOS section) when the user asks about modeling. Key topics:
- OWL for domain ontology (dark factory pattern classes/properties/constraints)
- SKOS for knowledge taxonomy (labels, definitions, hierarchy on tree items + ef:kind)
- Triple structure, shortcuts, Class vs Individual vs Property
- When a knowledge item should be typed as both ef:XXX and skos:Concept
- Adding skos:scopeNote on schemes and maintaining ef:EposForgeMCPUsage-style nodes so adopter agents can discover proper MCP usage patterns via recall
- How Cognee uses the combined ontology (anchoring + richer properties)
- Preferred navigation for agents: SKOS layer for tree/hierarchy; OWL + ef:kind for pattern relationships
Outputs
drift report— markdown files changed since the last full KG rebuild, with new concepts highlightedprevious-kg report— existing ontology-grounded graph terms relevant to the candidate concept, when Cognee is availablegap report— concepts and relationships in the corpus not yet modeled in the TTL- updated
00-vision/01-ontology.ttl— ontology with all identified gaps closed consumer guidance readiness— confirmation that ontology-backed graph terms remain aligned for agent use through the EposForge Cognee MCP server
04 同仓库更多 Skills
upstream-bug-report
File a well-formed bug report against an upstream open-source dependency (GitHub issue). Use when EposForge or one of its adapter dependencies exhibits a reproducible defect that must be fixed upstream, particularly for silent failures, incorrect defaults, or API contract violations that affect ontology grounding, graph correctness, or agent reliability.
update-spec-graph
Keeps the Cognee Spec Graph (Component 6) knowledge graph in sync with the repo. Use to update the KG after doc changes (incremental), rebuild it from scratch or after editing the ontology (full), or when recall is stale, the graph looks wrong, or entities are not ontology-anchored.
refine-prompt
Technique-driven prompt transformation for under-specified asks. Discovers techniques from data files, elicits missing required slots in one batch, rewrites with strict traceability, and gates submission behind explicit yes/no confirmation.
portfolio-review
暂无简介
milestone-elicitation
Guided interview for discovering milestones and value-harvest points. Writes confirmed anchors back as ordinary backlog items and keeps durable elicitation records. Re-runnable — subsequent runs diff against existing anchors and prior records so the milestone map evolves without replaying history.
idea-capture
Keep a per-repo register of notional product ideas — ideas not yet decided, kept as food for future development instead of being forgotten, and kept out of the backlog. Captures napkin notes as structured idea entries (one per idea, duplicate-checked, with typed edges to related ideas and backlog items), promotes an idea to an ordinary backlog item, rejects an idea with a reason, and reads the register as a graph. Use when the operator says "capture this idea", "napkin note", "notional feature", "food for future development", "add to ideas", "park this idea", "not a backlog item yet", "promote IDEA-NNN to the backlog", "reject that idea", or "what's in the ideas register". Do not use for work that is already decided — that is a backlog item.