Skip to content

v0.5: DIKW-T framework, wisdom synthesis, FTS5 search - #1

Merged
bejranonda merged 4 commits into
mainfrom
DIKW-T-Framework
May 8, 2026
Merged

bejranonda merged 4 commits into
mainfrom
DIKW-T-Framework

Conversation

@bejranonda

@bejranonda bejranonda commented May 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • v0.4: adopt DIKW-T framework across platform (inbox/notes/knowledge/wisdom stages, classifier, /api/projects/{slug}/dikw)
  • v0.5: wisdom synthesis stub, stage promotion endpoints, persistent FTS5 search per project
  • Wire reference/ blueprints (Honcho, Obsidian, Hermes Agent) into project narrative

Test plan

  • ./.venv/bin/pytest backend/tests -q
  • ./scripts/server.sh start and verify frontend at :8787/
  • Hit /api/projects/{slug}/dikw and stage promotion endpoints

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added DIKW-T pipeline with four vault stages: Data (inbox), Information (notes), Knowledge, and Wisdom, with automatic file classification and stage tracking.
    • Promote files between stages with optional metadata.
    • Wisdom synthesis generates summaries from project Git history.
    • Persistent full-text search index for faster, reliable queries.
    • DIKW dashboard displays stage breakdowns and project timeline.
  • Documentation

    • DIKW-T framework documentation and architecture updates.
    • Comprehensive quickstart guides for all user roles.
  • Tests

    • Added frontend and end-to-end pipeline tests.

sync-bot and others added 4 commits April 18, 2026 17:33
Reframe the project around the DIKW-T pyramid (Data → Information →
Knowledge → Wisdom + Time) so every file has a well-defined stage and
the per-project Git repo is recognised as a first-class time axis.

Backend
- New backend/app/dikw.py classifier (folder + structure heuristic)
- New GET /api/projects/{slug}/dikw stage-count endpoint
- Tree response carries `stage` per markdown file
- Watcher commit reason + fs-event payload include the stage
- Project model gains wisdom_dir, mkdir'd on project create

Frontend
- New DIKW dashboard view with per-stage cards + time-axis line
- File tree renders a stage pill on every note
- Stage colours: data=blue, information=green, knowledge=amber, wisdom=violet

Docs
- New docs/dikw-t.md — authoritative framework spec
- README, CLAUDE.md, architecture, approach, guidelines, knowledge,
  known-issues, hermes-contract, and all three quickstarts rewritten to
  speak DIKW-T
- business/project-overview.md and reference/obsidian-sync-comparison.md
  updated to reflect stage model + time-series advantage

Tests
- test_smoke.py: new test_dikw_summary and test_tree_reports_dikw_stage
- Full suite 12/12 passing, confirmed stable across consecutive runs

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The reference folder now holds reconstruction-grade blueprints for Honcho
and Obsidian (local, gitignored). The project-side docs now cite those
blueprints where relevant so the lineage of design decisions is visible.

- README: new "Reverse-engineering references" section + folder tour link
- CLAUDE.md: reference/ described as reconstruction material, not comparisons
- docs/knowledge.md: new "External references" section, calling out
  the Honcho→DIKW-T mapping, the generalised Obsidian failure modes, and
  the LiveSync decision rationale
- docs/approach.md: new "Method: learning from external systems" step —
  grep reference/ before designing echoes of prior art
- docs/guidelines.md: rules for when to edit reference/ vs docs/
- docs/known-issues.md: cross-link to the generalised failure-modes table
- business/project-overview.md: cite reference/ as design input

Local improvements to reference/*.md (auth surface, DIKW-T mapping, failure
modes, vault folder overlay, Thai language note) stay on disk but are not
committed — reference/ is gitignored. Delete the old comparison file that
was moved into reference/obsidian/.

Tests: 12/12 still green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Added reconstruction-grade blueprints for the real Hermes Agent (Nous
Research) under reference/hermes/ (local, gitignored):

  platform_blueprint.md  520 lines — data model, architecture, learning
                                      loop, subagents, cron, tools,
                                      DIKW-T mapping (§8), tech stack,
                                      build order, 7 design patterns
  architecture.md        188 lines — component map + data flows
  integration_notes.md   208 lines — current contract vs. real CLI,
                                      three migration paths, wisdom-mode
                                      design, auth considerations

Project-side documentation updated to reflect the key finding that the
upstream Hermes CLI has no `process` subcommand — our
`CKP_HERMES_BIN process …` contract only works against the stub in
docs/hermes-contract.md or a wrapper script:

- README: reference/hermes/ added to the tour
- reference/README.md: folder map + reading guide extended
- docs/hermes-contract.md: new "Important: upstream CLI has no process"
  section with three migration options
- docs/known-issues.md: issue #19 for the stub-only contract
- docs/knowledge.md: Hermes↔DIKW-T mapping + integration-reality callout
- docs/approach.md: Hermes added to "learn from external systems" list

Tests 12/12 still green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes three of the items surfaced in the recent improvement review and
ships the LiveSync blueprint into the local (gitignored) reference folder.

Backend
- New backend/app/wisdom.py — deterministic Git-log-based wisdom stub.
  For every knowledge/ file with ≥ 2 commits, write a wisdom/ note
  summarising the revision chain and the triggering inbox/notes file.
  Body of _synthesise() is the one call to swap for a real LLM later.
- New backend/app/routes/stages_routes.py — POST /promote (inbox → notes
  with frontmatter) and POST /wisdom/synthesise (trigger wisdom.py over
  the whole project).
- backend/app/search.py rewritten to SQLite FTS5 at <vault>/.ckp/search.db.
  WAL mode, bm25 with 5× title weight, unicode61 tokenizer with diacritic
  stripping. Survives restart. Connections explicitly closed; no leaks.
- watcher ignores .ckp/ so the search DB never feeds back into commits.

Frontend
- New **Promote ↑** button in the editor toolbar, visible only when the
  open file lives under inbox/. Prompts for optional tags, moves the file,
  prepends YAML frontmatter, reopens the new path.
- New **Synthesise Wisdom ↻** button on the DIKW dashboard; shows
  produced/skipped counts inline and refreshes the cards.

Reference (local only — reference/ remains gitignored)
- reference/livesync/platform_blueprint.md (660 lines) + architecture.md +
  integration_notes.md — reverse-engineered via Sonnet subagent against
  the obsidian-livesync GitHub repo. Covers doc model, chunking
  (Rabin-Karp + MurmurHash), E2E encryption (AES-GCM + HKDF + SALT_OF_*
  constants), CouchDB setup, conflict resolution, DIKW-T mapping (honest:
  LiveSync is transport, not a stage producer).
- reference/honcho/architecture.md slimmed to an orientation pointer
  (was flagged as redundant with platform_blueprint).

Docs
- README: reference/livesync/ added to the tour.
- docs/knowledge.md: new "Stage promotion + Wisdom synthesis" and
  "Search — persistent FTS5" sections.
- docs/known-issues.md: #13 (in-memory search) and #17 (empty wisdom/)
  marked resolved in v0.5.
- docs/guidelines.md: note that frontend smoke tests now exist; keep
  them lightweight until UI stabilises.
- docs/approach.md: LiveSync added to "learn from external systems".
- CLAUDE.md: common-tasks table now points at the new modules.
- business/project-overview.md: success-criteria bullet lists the new
  flows and the 17-test baseline.

Tests
- New backend/tests/test_frontend.py — 3 tests: index.html scaffolding,
  app.js parses (node --check), styles.css carries stage classes.
- test_smoke.py: 2 new tests (test_promote_inbox_to_notes,
  test_wisdom_synthesise).
- Full suite 17/17 passing, confirmed stable across three consecutive
  runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bejranonda
bejranonda merged commit a0201ba into main May 8, 2026
2 of 3 checks passed
@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f1dbe35b-4ffb-4d98-9d69-0ccc6316e62c

📥 Commits

Reviewing files that changed from the base of the PR and between 0350b83 and 72e09c2.

📒 Files selected for processing (29)
  • .gitignore
  • CLAUDE.md
  • README.md
  • backend/app/dikw.py
  • backend/app/main.py
  • backend/app/projects.py
  • backend/app/routes/dikw_routes.py
  • backend/app/routes/notes_routes.py
  • backend/app/routes/stages_routes.py
  • backend/app/search.py
  • backend/app/watcher.py
  • backend/app/wisdom.py
  • backend/tests/test_frontend.py
  • backend/tests/test_smoke.py
  • business/project-overview.md
  • docs/approach.md
  • docs/architecture.md
  • docs/dikw-t.md
  • docs/guidelines.md
  • docs/hermes-contract.md
  • docs/knowledge.md
  • docs/known-issues.md
  • docs/quickstart-admin.md
  • docs/quickstart-manager.md
  • docs/quickstart-user.md
  • frontend/app.js
  • frontend/index.html
  • frontend/styles.css
  • reference/obsidian-sync-comparison.md

📝 Walkthrough

Walkthrough

This PR implements a complete DIKW-T (Data-Information-Knowledge-Wisdom-Time) framework for organizing vault files into four stages, adds persistent SQLite FTS5 search, implements Git-history-based wisdom synthesis, and exposes stage analysis, promotion, and synthesis via new API endpoints and frontend dashboard UI.

Changes

DIKW-T Framework & Implementation

Layer / File(s) Summary
Conceptual Framework & Business Alignment
docs/dikw-t.md, docs/architecture.md, business/project-overview.md
Defines DIKW-T pyramid (Data→Information→Knowledge→Wisdom+Time), maps stages to vault folders (inbox/, notes/, knowledge/, wisdom/), documents API contract for /api/projects/{slug}/dikw, and aligns business objectives to stage-based organization.
DIKW Classifier Implementation
backend/app/dikw.py
Implements classify(rel_path, body) for stage classification based on folder location and content structure (frontmatter/wikilinks/hashtags), and summarise(vault_dir) for per-vault stage counts and Git-derived commit statistics.
Project Directory & Vault Structure
backend/app/projects.py, .gitignore
Adds wisdom_dir property, ensures wisdom/ folder created on project init, updates default Git README to DIKW-T description, and ignores .ckp/ cache.
SQLite FTS5 Search Persistence
backend/app/search.py
Replaces in-memory index with per-vault SQLite FTS5 stored at .ckp/search.db, WAL mode for concurrent reads, per-vault locking for writes, and BM25 scoring with title weighting.
Git-History-Based Wisdom Synthesis
backend/app/wisdom.py
Implements synthesise_project() to generate deterministic wisdom notes by analyzing knowledge/ file Git history, extracting commit chains (hash/timestamp/author), and writing evolution reports to wisdom/.
DIKW & Stage Transition API Routes
backend/app/routes/dikw_routes.py, backend/app/routes/stages_routes.py, backend/app/main.py
Adds /api/projects/{slug}/dikw for stage breakdown, /api/projects/{slug}/promote for inbox→notes promotion with YAML frontmatter, /api/projects/{slug}/wisdom/synthesise for wisdom generation.
Notes Route & Filesystem Watcher Integration
backend/app/routes/notes_routes.py, backend/app/watcher.py
Integrates DIKW classification into /api/projects/{slug}/tree (adds stage field per file) and watcher event handler (computes stage and emits with versioning/events).
Frontend DIKW Dashboard & Promotion UI
frontend/app.js, frontend/index.html, frontend/styles.css
Adds DIKW view with stage cards (counts/percentages) and time-axis summary, file tree stage pills, promote-note button for inbox→notes with tag input, and wisdom-synthesis button.
Backend & Frontend Tests
backend/tests/test_frontend.py, backend/tests/test_smoke.py
Adds frontend smoke tests for asset serving/syntax validation and end-to-end DIKW tests: summary API, tree stages, inbox promotion, wisdom synthesis.
Documentation, Guidelines & Project Overview
README.md, CLAUDE.md, docs/approach.md, docs/guidelines.md, docs/hermes-contract.md, docs/knowledge.md, docs/quickstart-*.md, docs/known-issues.md, reference/obsidian-sync-comparison.md (deleted)
Comprehensive updates: framework specification, implementation details, stage-promotion role, DIKW mental model in development workflow, change-management rules requiring stage declaration, and updated quickstarts for users/managers/admins.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes


A rabbit hops through the vault with glee,
Data, Info, Knowledge, Wisdom—four stages flow free!
Git remembers each change with time's watchful eye, 🕐
While SQLite indexes whisper search replies. 🔍
The wisdom emerges from history's tale,
A DIKW-T framework that shall not fail! 🐇

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DIKW-T-Framework

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bejranonda
bejranonda deleted the DIKW-T-Framework branch May 8, 2026 17:30
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