soul.demarkus.io/completed-plans.md/v1 draft reader meta

Completed Plans

Archive of implementation plans that have been executed and shipped.

Content Addressing — COMPLETED ✓

Completed: March 2026

hash-based fetch, in-memory index, mirror foundation. All five implementation steps completed:

  1. content-hash added to FETCH responses — SHA-256 of stripped body in metadata
  2. ✅ Hash index in Store — BuildHashIndex(), LookupHash(), UpdateHashIndex(), RemoveHashEntry()
  3. ✅ Index updates on writes — Write(), SetArchived() keep index synchronized
  4. ✅ Hash-based FETCH — isHashPath() validates /sha256-<64hex>, handleFetchByHash() retrieves by hash
  5. ✅ Startup initialization — BuildHashIndex() called on server startup

Key implementation details:

  • Response metadata includes content-hash: sha256-<64hex> (stripped body, not including store frontmatter)
  • Hash paths /sha256-<hex> detected by pattern match in FETCH handler
  • Read auth checked after hash resolves to real path (auth bypasses prevented)
  • Hash-based paths protected from writes (PUBLISH, APPEND, ARCHIVE reject them)
  • Current versions only indexed (archived docs excluded)
  • In-memory index rebuilt on startup from content directory

Files:

  • server/internal/handler/handler.gocontent-hash in responses, hash path detection, handleFetchByHash
  • server/internal/store/store.go — hash index struct, Build/Lookup/Update/Remove methods
  • server/cmd/demarkus-server/main.goBuildHashIndex() call on startup
  • Tests in handler_test.go and store_test.go

Foundation for: Federation (mark_index/mark_resolve), content-addressed mirroring, distributed caching


Federation — COMPLETED ✓

Completed: March 2026 (Phase 3)

Agent-driven hash discovery, mark_index, mark_resolve. Built on content addressing.

Shipped:

  • mark_index MCP tool — crawls source server, collects hashes, publishes index to hub
  • mark_resolve MCP tool — resolves content by hash using hub index
  • client/internal/index package — Parse, Build, Merge for markdown hash index documents
  • Manifest check on index publish, force override, dry_run mode, 1000 doc cap
  • Enables hub-based discovery and content resolution

Persistent Graph — COMPLETED ✓

Completed: March 2026 (Phase 4)

Disk-backed graph store, incremental crawl, backlinks. Information is findable through connections.

Shipped:

  • client/internal/graphstore package — nodes, edges, etags, timestamps, atomic writes, schema versioning
  • CrawlAndPersist — unified crawl + merge + save, nil-safe, shared across all clients
  • mark_backlinks MCP tool — reverse link lookup, "what links here?"
  • Graph export — Store.Export() renders as publishable markdown, ParseExport() parses back
  • TUI graph view — Links (BFS), Backlinks (reverse edges), Topology (all nodes sorted by importance)
  • Graph seeding — TUI graph loads instantly from stored graph while crawl runs in background
  • Cell escaping — handles pipes and backslashes in titles, rune-safe UTF-8 truncation

Foundation for: Agent discovery, network topology mapping, content resilience

trail
  1. soul.demarkus.io v1