agentleFS
LeostrukaLeostruka/devin-bundle/skills/knowledge-modeling/SKILL.md

knowledge-modeling

Skill0 starsChanged 3 months agoMITView on GitHub

Use when building or refining a project's domain model, glossary, or bounded contexts, when validating tool outputs/data against a domain ontology before side effects, or when extracting entities, relations, evidence, and provenance from Markdown/plain text into a typed versioned knowledge graph under `.devin/`.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    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:

    Every extracted fact points back to source file:line + quote.

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Knowledge Modeling

Domain model, ontology validation, and knowledge-graph extraction — the typed-vocabulary family.

Domain modeling (active discipline)

Build and sharpen the domain model as you design — challenge terms, invent edge-case scenarios, write glossary + decisions the moment they crystallise. (Merely reading .devin/CONTEXT.md is a habit, not this skill — this is for changing the model.)

Structure: .devin/CONTEXT.md (glossary + bounded contexts) + .devin/adr/ (decisions). Formats: reference/CONTEXT-FORMAT.md, reference/ADR-FORMAT.md.

Cross-skills: research for authoritative term definitions; deep-mode for how code currently uses terms; ai-coding-dictionary for AI-coding jargon alignment.

Ontology validation (before side effects)

Pydantic at the door, ontology at the ledger.

Schema/type checks (Pydantic or equivalent) validate shape; ontology validates domain-level reasonableness. Check, before any write/insert/API call driven by tool output:

  1. Entity type valid for this domain.
  2. Status value allowed (pending/in_progress/completed…).
  3. Relationship type makes sense (contains, depends_on…).
  4. No duplicates — entity or relation already exists?
  5. Disjointness — disjoint entities treated as same?
# Schema validates shape
class Ticket(BaseModel):
    status: Literal["pending", "in_progress", "completed"]

# Ontology validates domain
if ticket.status == "completed" and ticket.depends_on_open():
    raise ValueError("Cannot complete ticket with open dependencies")

Helper: python3 scripts/validate.py (this skill's scripts/). Anti-pattern: trusting tool output because the schema allows it.

Knowledge extraction (text → typed graph)

Deterministic, provider-neutral extraction of entities, relations, evidence, and provenance from Markdown/plain text into versioned JSON + relational Markdown under .devin/. No API key, no LLM — lexical baseline (not vector search).

  • Every extracted fact points back to source file:line + quote.
  • Incremental: merge new sources without duplicating entities or silently overwriting conflicts (conflicts reported, explicit action required).
  • Baseline for evaluating Hyper-Extract/embeddings/MCP later.

Helper: python3 scripts/extract.py.

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.

Reviews can't be read right now.

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.