Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Corpus

skills.sh

corpus is a skill for creating and maintaining a permanent knowledge base for your agents. Simply bootstrap the corpus, then point the agent to any source materials or documents you want the corpus to ingest. These documents will be permanently indexed and added to your project corpus and can be consulted at any point in the future by your agents.

learning

Above: your agent invoking corpus

Version: 0.2.2

Install

npx skills add NathanAB/corpus-skill

Use

Corpus is used in three ways

  • Setup: A one-time setup to bootstrap the corpus.

    "Set up a /corpus for product and policy evidence"

  • Ingest: Adding one or more new source materials to the corpus.

    "Ingest the entire research folder into the /corpus"

  • Consult: Pull relevant information from the corpus.

    "Consult the /corpus about record retention and show the full picture."

Setup infers purpose from the repo, consults during relevant work, and adds an agent pointer unless you say otherwise. It still asks what belongs in Git, because that choice controls whether clones can read the evidence.

Limits

  • Scanned or image-only PDFs fail. There is no OCR path in this skill.
  • Word, PowerPoint, and text PDFs are converted with whatever tools the agent already has. Corpus stores the result as evidence; it does not ship a converter.
  • Already-readable markdown and text copy through as-is.
  • Claims must come from CONTENT.md, not from summaries or the topic index.

Corpus structure

corpus/
├── CORPUS.md
├── INDEX.md
├── .work/                         # ignored, present only during ingestion
└── sources/
    ├── .gitkeep
    └── <source-id>/
        ├── SOURCE.md
        ├── CONTENT.md
        ├── map/                   # present when source navigation is large
        └── original or original.*
  • CORPUS.md records purpose, policies, Git scope, and agent guidance.
  • INDEX.md maps topics to every relevant source and the smallest useful navigation route.
  • SOURCE.md records provenance, navigation summaries, an exhaustive content map, topics, relationships, and extraction warnings.
  • CONTENT.md is the faithful agent-readable evidence.
  • map/ holds bounded source-map nodes when the complete map does not fit in SOURCE.md.
  • original or original.* is the unchanged source copy.
  • .work/ holds ignored resumable process state. Successful ingestion removes it.

Summaries and index entries guide discovery. Claims cite CONTENT.md, with original page or section details when available.

Large sources

Ingestion keeps large documents out of agent context. It extracts directly to disk, resumes interrupted work, and builds one canonical CONTENT.md from bounded evidence units.

Each evidence unit follows natural source boundaries and stays within both limits:

  • 32 KiB;
  • 4,000 words.

An exhaustive content map gives every evidence unit its own leaf. Map nodes contain at most 32 entries and 16 KiB. Consultation descends through those nodes, reads exact evidence ranges, and runs a bounded text search to catch incomplete topic routes.

License

MIT

About

Agent skill: git-tracked evidence corpus. Ingest markdown, PDF, or Word and consult with citations to source text.

Topics

Resources

Stars

11 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors