Skip to content

add mini-context-graph skill - A persistent, compounding knowledge base#1495

Open
fizznix wants to merge 1 commit intogithub:stagedfrom
fizznix:mini-context-graph-skill
Open

add mini-context-graph skill - A persistent, compounding knowledge base#1495
fizznix wants to merge 1 commit intogithub:stagedfrom
fizznix:mini-context-graph-skill

Conversation

@fizznix
Copy link
Copy Markdown

@fizznix fizznix commented Apr 24, 2026

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, or workflow file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, or workflow with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the staged branch for this pull request.

Description

Introduces mini-context-graph, a skill that builds persistent, compounding knowledge bases by combining wiki pages with a structured knowledge graph. Unlike standard RAG that re-discovers knowledge on every query, this skill ingests documents once and maintains evolving knowledge that accumulates and cross-references over time.

Architecture

Three-layer knowledge storage:

  1. Raw Sources — Original documents stored immutably with chunk metadata
  2. Wiki Layer — LLM-written markdown pages with cross-references that grow richer over time
  3. Graph Layer — Extracted entities and relations with provenance links back to supporting text

What's included

  • SKILL.md — Core concepts, quick start, operations, and constraints
  • ingestion.md — Entity/relation extraction rules and workflow
  • ontology.md — Type normalization and entity deduplication
  • retrieval.md — Query execution and BFS graph traversal
  • lint.md — Wiki health checks and maintenance procedures
  • scripts/ — Python implementation:
    • contextgraph.py — Main skill interface
    • tools/ — Graph store, wiki store, document store, retrieval engine, and index management

Key features

  • Knowledge accumulation — Learns once, answers faster on subsequent queries
  • Provenance tracking — Every entity and relation links back to original source text
  • Wiki-first retrieval — Fast path using markdown pages before expensive graph traversal
  • Evidence-based answers — Returns supporting documents and reasoning chains
  • Graph-aware queries — BFS traversal across entities and relations (max depth: 2)
  • Automated wiki maintenance — Lint checks for orphaned pages, broken links, and contradictions

Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • Update to existing instruction, prompt, agent, plugin, skill, or workflow.
  • Other (please specify):

By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

@fizznix fizznix requested a review from aaronpowell as a code owner April 24, 2026 08:14
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Skill Validator Results

✅ All checks passed

Scope Checked
Skills 1
Agents 1
Total 2
Severity Count
--- ---:
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 0

Summary

Level Finding
ℹ️ Found 1 skill(s)
ℹ️ [mini-context-graph] 📊 mini-context-graph: 1,945 BPE tokens [chars/4: 2,418] (detailed ✓), 25 sections, 2 code blocks
ℹ️ ✅ All checks passed (1 skill(s))
Full validator output ```text Found 1 skill(s) [mini-context-graph] 📊 mini-context-graph: 1,945 BPE tokens [chars/4: 2,418] (detailed ✓), 25 sections, 2 code blocks ✅ All checks passed (1 skill(s)) ```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant