agentleFS
modeled-information-formatmodeled-information-format/mnemonic/skills/ontology/SKILL.md

ontology

Skill23 starsChanged 10 months agoMITView on GitHub

Ontology-based entity discovery and validation for mnemonic memories. Define custom namespaces, entity types, traits, and relationships.

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use find-skills.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    find-skills

    Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run /mnemonic:list --namespaces to see available namespaces from loaded ontologies.

    line 24
  2. Distinctive:

    Create typed entities (semantic, episodic, procedural)

    line 40
  3. Distinctive:

    Use traits/mixins for reusable field sets

    line 42
  4. Distinctive:

    All entity types inherit from one of three base memory types:

    line 47

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- BEGIN MNEMONIC PROTOCOL -->

Memory

Search first: /mnemonic:search {relevant_keywords} Capture after: /mnemonic:capture {namespace} "{title}"

Run /mnemonic:list --namespaces to see available namespaces from loaded ontologies.

<!-- END MNEMONIC PROTOCOL -->

Ontology Skill

Provides custom ontology support for extending mnemonic with domain-specific knowledge structures.

Requirements

  • PyYAML - Optional but recommended for YAML parsing. The library works without it but with limited functionality.

Capabilities

  • Load and validate ontology definitions (YAML)
  • Define custom namespaces beyond the 9 base namespaces
  • Create typed entities (semantic, episodic, procedural)
  • Establish relationships between entities
  • Use traits/mixins for reusable field sets
  • Entity discovery patterns

Cognitive Memory Type Triad

All entity types inherit from one of three base memory types:

TypePurposeExamples
SemanticFacts, conceptsComponents, technologies, decisions
EpisodicEvents, experiencesIncidents, debug sessions
ProceduralStep-by-step processesRunbooks, deployments

Usage

ontology_validator.py

Validate ontology YAML files against the schema.

python ${SKILL_DIR}/lib/ontology_validator.py <file> [--json]
OptionDescription
<file>Ontology YAML file to validate (required)
--jsonOutput validation results as JSON

ontology_registry.py

Load and query ontologies.

python ${SKILL_DIR}/lib/ontology_registry.py [OPTIONS]
OptionDescription
--listList all loaded ontologies
--namespacesList all available namespaces
--typesList all entity types
--validate <NS>Validate a specific namespace
--jsonOutput as JSON

entity_resolver.py

Resolve and search entity references across memories.

python ${SKILL_DIR}/lib/entity_resolver.py [OPTIONS]
OptionDescription
--build-indexBuild complete entity index from memory files
--search <query>Search for entities by name or content
--resolve <ref>Resolve entity reference (e.g., @[[Name]])
--jsonOutput results as JSON

Entity Reference Syntax

  • Simple: @[[Entity Name]] - Resolves by name
  • Typed: [[technology:postgres-id]] - Resolves by type and ID

Discovery Patterns

Ontologies can define patterns for automatic namespace suggestion during memory capture.

Content Patterns

Match text content to suggest appropriate namespaces:

discovery:
  content_patterns:
    - pattern: "\\bdecided to\\b|\\bwe will use\\b"
      namespace: _semantic/decisions
    - pattern: "\\blearned that\\b|\\bthe fix was\\b"
      namespace: _semantic/knowledge

File Patterns

Match file paths for contextual namespace hints:

discovery:
  file_patterns:
    - pattern: "auth|login|session"
      namespaces:
        - _semantic/knowledge
        - _semantic/decisions
      context: authentication

Configuration

discovery:
  enabled: true
  confidence_threshold: 0.8  # Minimum confidence to suggest

See fallback/ontologies/mif-base.ontology.yaml for complete examples.

Files

  • lib/ontology_registry.py - Load and manage ontologies
  • lib/ontology_validator.py - Validate ontology YAML
  • lib/ontology_loader.py - Centralized ontology loading with caching
  • lib/entity_resolver.py - Resolve entity references
  • fallback/ontologies/mif-base.ontology.yaml - Standard mnemonic namespaces
  • fallback/schema/ontology/ontology.schema.json - JSON Schema

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.