← Back to Articles & Artefacts
artefactswest

RISE Enhanced Architecture: Indigenous AI DSL Server

IAIP Research
iaip-dsl-lsp

RISE Enhanced Architecture: Indigenous AI DSL Server

Desired Outcome

A dual-protocol semantic framework server (LSP + MCP) that makes the IAIP research framework a first-class participant in both IDE environments and multi-agent workflows, grounded in medicine-wheel ontology types and governed by Indigenous data sovereignty (OCAP).

Current Reality

The original January 2026 scaffolding defined a Python LSP server with 5 components (Concept Registry, LSP Operations, Relational Graph, Indigenous Knowledge Mapper, Plugin Lifecycle). Since then, the ecosystem has evolved: medicine-wheel npm packages provide typed ontology primitives, agent orchestration patterns have been analyzed, MCP has become the agent integration standard, and ceremony protocol workflows have been formalized.

Structural Tension

The gap between a standalone LSP concept server and a fully integrated ontology-aware, agent-participatory, ceremony-governed semantic framework that serves as the knowledge backbone for the entire IAIP ecosystem.


Enhanced Architecture

``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ IAIP DSL Server β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ LSP Layer β”‚ β”‚ MCP Layer β”‚ β”‚ Ceremony Gate β”‚ β”‚ β”‚ β”‚ (pygls) β”‚ β”‚ (mcp-sdk) β”‚ β”‚ (OCAP+4Dir) β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Unified Query Engine β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β”‚ β”‚ Concept β”‚ β”‚Relationalβ”‚ β”‚ Indigenous Knowledgeβ”‚ β”‚ β”‚ β”‚ β”‚ β”‚ Registry β”‚ β”‚ Graph β”‚ β”‚ Mapper β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ Engine β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β”‚ β”‚ Ontology Bridge Layer β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ (medicine-wheel-ontology-core alignment) β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ RelationalNode Β· Relation Β· OcapFlags β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ CeremonyLog Β· NarrativeBeat Β· Direction β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Storage & Persistence β”‚ β”‚ β”‚ β”‚ YAML Registry Β· JSON Index Β· Wisdom Ledger (SQLite) β”‚ β”‚ β”‚ β”‚ OCAP Audit Log Β· Ceremony Change Journal β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ IDE Clients AI Agents Orchestrators (Claude Code, (mia-code, (LangGraph, VS Code) miadi-code, A2A, NATS) Heyva, Anikwag) ```

Component Inventory

Tier 1: Core (Original + Refined)

ComponentSource SpecWhat It Creates
Concept Registryrispecs.md Β§1Indexed, queryable store of 40+ IAIP concepts with full relational and Indigenous knowledge context
LSP Operations Handlerrispecs.md Β§2IDE-native semantic navigation (hover, goToDefinition, findReferences, diagnostics) for framework concepts
Relational Graph Enginerispecs.md Β§3Knowledge graph with typed relationships (foundational, complementary, enables, contextualizes, ceremonial)
Indigenous Knowledge Mapperrispecs.md Β§4Four-lens enrichment (Two-Eyed Seeing, polycentric, relational, ceremonial) on every concept operation
Plugin Lifecyclerispecs.md Β§5Auto-install, start, health-check, graceful shutdown

Tier 2: Ontology Bridge (New)

ComponentSource SpecWhat It Creates
Ontology Type Alignmentrispecs-ontology-bridge.mdConcept entries that are structurally compatible with RelationalNode, Relation, OcapFlags from medicine-wheel-ontology-core
OCAP Governance Layerrispecs-ceremony-protocol.mdOwnership/Control/Access/Possession enforcement on every concept access
Four Directions Enrichmentrispecs-ceremony-protocol.mdEvery concept and operation carries directional alignment metadata
Export Pipelinerispecs-ontology-bridge.mdGenerate JSON Schema, OWL/SHACL, JSON-LD from the concept registry

Tier 3: Agent Integration (New)

ComponentSource SpecWhat It Creates
MCP Tool Exposurerispecs-mcp-tools.md8+ MCP tools for agent-driven concept resolution, relationship queries, coherence validation
Agent Orchestration Interfacerispecs-agent-orchestration.mdServer participates in multi-agent workflows as concept-resolution specialist
Wisdom Ledgerrispecs-wisdom-ledger.mdTemporal tracking of concept usage, evolution, and cross-session learning
Ceremony Change Protocolrispecs-ceremony-protocol.mdConcept changes wrapped in ceremony-aware workflows with consent and reflection

Technology Stack

``` Language: Python 3.10+ LSP Library: pygls >= 1.0 MCP Library: mcp (official Python SDK) Graph Library: networkx (in-memory relational graph) Storage: YAML (source) + JSON (index) + SQLite (wisdom ledger) Validation: pydantic (type alignment with medicine-wheel types) Export: rdflib (OWL/SHACL generation, optional) Testing: pytest + pytest-asyncio Packaging: pyproject.toml with optional dependency groups ```

Data Flow

Concept Query Flow (LSP)

``` User hovers over "structural tension" in .md file β†’ LSP Client sends textDocument/hover β†’ Server tokenizes position, matches concept ID β†’ Concept Registry returns full entry β†’ Indigenous Knowledge Mapper enriches with 4 lenses β†’ OCAP layer checks access flags β†’ Formatted Markdown response returned to client β†’ Response includes: definition, relationships, Indigenous context, directional alignment β†’ Latency: <50ms ```

Concept Query Flow (MCP)

``` Agent calls iaip_concept_lookup tool with {"concept": "creative-orientation"} β†’ MCP handler receives tool call β†’ Same Unified Query Engine processes request β†’ Returns structured JSON with concept, relationships, Indigenous context β†’ Agent integrates into its reasoning context β†’ Latency: <100ms ```

Concept Change Flow (Ceremony Protocol)

``` Human edits concept-registry.yaml β†’ File watcher detects change β†’ Ceremony Gate activates: 1. Diff analysis: what changed? 2. OCAP check: does editor have authority? 3. Directional check: which direction does this change serve? 4. If significant change β†’ ceremony-required flag set 5. Change journaled in Ceremony Change Log β†’ Registry reloaded β†’ Wisdom Ledger updated with change event β†’ Connected agents notified via MCP ```

File Structure (Generated)

``` indigenous_ai_dsl_server/ β”œβ”€β”€ init.py β”œβ”€β”€ main.py # Entry point β”œβ”€β”€ server.py # Dual-protocol server setup (LSP + MCP) β”œβ”€β”€ config.py # Configuration and paths β”‚ β”œβ”€β”€ registry/ β”‚ β”œβ”€β”€ init.py β”‚ β”œβ”€β”€ loader.py # YAML β†’ JSON β†’ in-memory index β”‚ β”œβ”€β”€ concept.py # Concept data model (pydantic) β”‚ β”œβ”€β”€ index.py # Fast lookup index β”‚ └── watcher.py # File change detection β”‚ β”œβ”€β”€ graph/ β”‚ β”œβ”€β”€ init.py β”‚ β”œβ”€β”€ engine.py # networkx-based relational graph β”‚ β”œβ”€β”€ relationships.py # Typed relationship definitions β”‚ └── traversal.py # Path finding, context expansion β”‚ β”œβ”€β”€ knowledge/ β”‚ β”œβ”€β”€ init.py β”‚ β”œβ”€β”€ mapper.py # Indigenous Knowledge Mapper β”‚ β”œβ”€β”€ directions.py # Four Directions enrichment β”‚ └── ocap.py # OCAP governance enforcement β”‚ β”œβ”€β”€ lsp/ β”‚ β”œβ”€β”€ init.py β”‚ β”œβ”€β”€ handler.py # LSP operation handlers β”‚ β”œβ”€β”€ diagnostics.py # Terminology validation β”‚ └── formatters.py # Response formatting (Markdown) β”‚ β”œβ”€β”€ mcp/ β”‚ β”œβ”€β”€ init.py β”‚ β”œβ”€β”€ tools.py # MCP tool definitions β”‚ β”œβ”€β”€ resources.py # MCP resource exposure β”‚ └── prompts.py # MCP prompt templates β”‚ β”œβ”€β”€ ontology/ β”‚ β”œβ”€β”€ init.py β”‚ β”œβ”€β”€ bridge.py # medicine-wheel type alignment β”‚ β”œβ”€β”€ export.py # OWL/SHACL/JSON-LD generation β”‚ └── types.py # Pydantic models aligned to MW types β”‚ β”œβ”€β”€ wisdom/ β”‚ β”œβ”€β”€ init.py β”‚ β”œβ”€β”€ ledger.py # SQLite-based usage tracking β”‚ └── ceremony.py # Change ceremony protocol β”‚ β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ concept-registry.yaml # Source of truth β”‚ β”œβ”€β”€ concept-registry.json # Generated index β”‚ └── wisdom.db # Wisdom Ledger SQLite β”‚ β”œβ”€β”€ tests/ β”‚ β”œβ”€β”€ test_registry.py β”‚ β”œβ”€β”€ test_graph.py β”‚ β”œβ”€β”€ test_lsp.py β”‚ β”œβ”€β”€ test_mcp.py β”‚ β”œβ”€β”€ test_ocap.py β”‚ └── test_ceremony.py β”‚ β”œβ”€β”€ plugin.json # Claude Code plugin manifest β”œβ”€β”€ .lsp.json # LSP routing configuration β”œβ”€β”€ pyproject.toml # Package definition └── README.md # Installation and usage ```

Advancing Patterns

  1. Concept β†’ Ontology β†’ Agent Intelligence: Each concept lookup enriches the requesting agent's understanding, creating a flywheel where agents become more framework-literate with each interaction
  2. YAML edit β†’ Ceremony β†’ Community consensus: Concept evolution is never unilateral; the ceremony protocol ensures changes are witnessed and consented
  3. Usage tracking β†’ Wisdom Ledger β†’ Emergent patterns: Over time, the Wisdom Ledger reveals which concepts are most queried, which relationships are most traversed, and which directional alignments emerge naturally
  4. LSP + MCP β†’ Universal access: Whether a human is writing in their IDE or an agent is reasoning in a multi-agent workflow, the same semantic knowledge is accessible through the appropriate protocol