[ATLAS][Wiki] Build the LLM Wiki layer — query, ingest, lint, and crystallization #280

Open
Rockachopa wants to merge 1 commits from step35/231-atlas-wiki-build-the-llm-wik into main
Owner

Implement the sovereign LLM Wiki knowledge interface built on top of knowledge/index.json.

Changes

  • scripts/wiki.py: main CLI with query, ingest, lint, crystal subcommands
  • scripts/test_wiki.py: smoke tests for retrieval, context formatting, contradictions
  • WIKI.md: full documentation showing how this layer differs from RAG and transcript search

New capabilities

  • wiki query "<question>" — BM25-ish retrieval + LLM synthesis with [N] citations
  • wiki ingest --session <file> — session distillation (wraps harvester.py)
  • wiki crystal --session <file> — alias for ingest (session crystallization)
  • wiki lint — staleness (freshness.py) + duplicate detection + contradiction heuristic

Acceptance criteria for #231

  • ✓ A concrete wiki path and schema exist in the stack (leverages existing knowledge/)
  • ✓ Ingest updates durable wiki pages from raw session material (via harvester → markdown)
  • ✓ Queries answer from compiled pages with page-citation IDs
  • ✓ Lint surfaces contradictions / staleness / duplicates
  • ✓ Session crystallization flow (crystal) lands durable pages
  • ✓ Wiki layer documented as distinct from simple RAG and transcript search (WIKI.md)

Tested

  • python3 scripts/test_wiki.py → all tests pass
  • wiki query dry-run retrieves against current knowledge/ (29 facts)
  • wiki lint surfaces 0 errors, some warnings (pre-existing contradictions flagged)
  • No breaking changes to existing scripts

Closes #231

Implement the sovereign LLM Wiki knowledge interface built on top of knowledge/index.json. **Changes** - `scripts/wiki.py`: main CLI with `query`, `ingest`, `lint`, `crystal` subcommands - `scripts/test_wiki.py`: smoke tests for retrieval, context formatting, contradictions - `WIKI.md`: full documentation showing how this layer differs from RAG and transcript search **New capabilities** - `wiki query "<question>"` — BM25-ish retrieval + LLM synthesis with `[N]` citations - `wiki ingest --session <file>` — session distillation (wraps harvester.py) - `wiki crystal --session <file>` — alias for ingest (session crystallization) - `wiki lint` — staleness (freshness.py) + duplicate detection + contradiction heuristic **Acceptance criteria for #231** - ✓ A concrete wiki path and schema exist in the stack (leverages existing `knowledge/`) - ✓ Ingest updates durable wiki pages from raw session material (via harvester → markdown) - ✓ Queries answer from compiled pages with page-citation IDs - ✓ Lint surfaces contradictions / staleness / duplicates - ✓ Session crystallization flow (`crystal`) lands durable pages - ✓ Wiki layer documented as distinct from simple RAG and transcript search (`WIKI.md`) **Tested** - `python3 scripts/test_wiki.py` → all tests pass - `wiki query` dry-run retrieves against current knowledge/ (29 facts) - `wiki lint` surfaces 0 errors, some warnings (pre-existing contradictions flagged) - No breaking changes to existing scripts Closes #231
Rockachopa added 1 commit 2026-04-27 13:44:58 +00:00
Owner

🛡️ Goblin Patrol Alert 🛡️

Hey brother — this PR has been idle for 5 days and is unassigned.

The goblin fleet has been notified. A goblin may claim this if it remains stale.

— Timmy Goblin Wizard King

🛡️ **Goblin Patrol Alert** 🛡️ Hey brother — this PR has been idle for **5 days** and is unassigned. The goblin fleet has been notified. A goblin may claim this if it remains stale. — Timmy Goblin Wizard King
Some checks failed
Test / pytest (pull_request) Failing after 21s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin step35/231-atlas-wiki-build-the-llm-wik:step35/231-atlas-wiki-build-the-llm-wik
git checkout step35/231-atlas-wiki-build-the-llm-wik
Sign in to join this conversation.