Skip to content

P1-A: Integrate HierarchyBuilder into ingestion (books→volumes→shelves) #90

@devlux76

Description

@devlux76

Parent issue: Part of #89

Problem

The design docs describe a hierarchical memory structure (Books → Volumes → Shelves) built by HierarchyBuilder, but the current ingest pipeline only creates a single Book and never invokes hippocampus/HierarchyBuilder.ts. This means:

  • The system never builds Volume/Shelf prototypes.
  • Hotpath admission quotas for volume/shelf tiers are never exercised.
  • Downstream retrieval and consolidation logic that depends on hierarchy cannot function.

Goal

Integrate the hierarchy builder into ingest so that every ingest call constructs/updates:

  • Books (per document)
  • Volumes (clusters of books)
  • Shelves (clusters of volumes)

Ensure the hierarchy is persisted and that the SalienceEngine promotions include:

  • Book medoid → page-tier quota
  • Volume prototype → volume-tier quota
  • Shelf routing prototype → shelf-tier quota

Acceptance Criteria

  • Ingest calls buildHierarchy (or equivalent) using the new pages
  • Hierarchy objects are stored in IndexedDB (Book, Volume, Shelf records)
  • MetadataStore accessors for volumes/shelves are exercised in tests
  • Existing integration tests are updated (or new tests added) to validate hierarchy persistence
  • No regression in existing ingest/query behavior

Notes

This work is a prerequisite for the dialectical retrieval pipeline, which expects a multi-tier hotpath to exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1: highHigh priority — targets v0.5layer: cortexRetrieval orchestration (rank → expand → order)layer: hippocampusIngest orchestration (chunk → embed → persist)layer: testingTest coverage and integration tests

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions