Implement the offline search library and CLI #23

Open
opened 2026-07-24 19:38:21 -04:00 by JackFrostbyte · 0 comments

Goal

    Provide a reusable offline search library and a small CLI that returns ranked pilot chunks with useful filters and clear no-result behavior.

    ## Why

    Arkive must prove direct, AI-independent access to validated knowledge before any generated-answer layer is considered.

    ## Scope

    - Implement a search-core library separate from presentation.
  • Open and query the selected lexical index locally.

  • Support text queries and configurable result count.

  • Return ranked chunk results with source, document, and chunk identifiers.

  • Support language, domain, source, or other justified metadata filters grounded in existing records.

  • Define deterministic tie handling where practical.

  • Provide clear empty-query, invalid-filter, missing-index, and no-result behavior.

  • Add a small command-line interface following the project convention.

  • Ensure the library and CLI make no network calls and require no AI component.

      ## Out of scope
    
      - Citation passage rendering beyond the identifiers and metadata needed by the next issue.
    
  • A graphical or web interface.

  • Vector retrieval.

  • Query expansion using an LLM.

  • Generated answers or summaries.

      ## Dependencies
    
      - #22 — Implement deterministic full-text index generation
    
      ## Acceptance criteria
    
      - The CLI accepts a query and returns ranked pilot chunk results.
    
  • Result count and supported filters work as documented.

  • Every result includes stable lineage identifiers.

  • No-result and invalid-input cases are clear and non-crashing.

  • The search core is reusable independently of the CLI.

  • Search runs without network access or an LLM.

  • Initial M2-01 fixture expectations can be exercised programmatically.

      ## Validation
    
      - Run the complete unit-test suite.
    
  • Run representative single-result, multiple-result, filtered, and no-result queries.

  • Run with networking disabled and no model software installed.

  • Verify deterministic result ordering for repeat queries.

      ## Suggested branch
    
      `feature/issue-23-offline-search-cli`
    
      <!-- arkive-planning-automation:2026-07-24-v3:M2-05 -->
    
## Goal Provide a reusable offline search library and a small CLI that returns ranked pilot chunks with useful filters and clear no-result behavior. ## Why Arkive must prove direct, AI-independent access to validated knowledge before any generated-answer layer is considered. ## Scope - Implement a search-core library separate from presentation. - Open and query the selected lexical index locally. - Support text queries and configurable result count. - Return ranked chunk results with source, document, and chunk identifiers. - Support language, domain, source, or other justified metadata filters grounded in existing records. - Define deterministic tie handling where practical. - Provide clear empty-query, invalid-filter, missing-index, and no-result behavior. - Add a small command-line interface following the project convention. - Ensure the library and CLI make no network calls and require no AI component. ## Out of scope - Citation passage rendering beyond the identifiers and metadata needed by the next issue. - A graphical or web interface. - Vector retrieval. - Query expansion using an LLM. - Generated answers or summaries. ## Dependencies - #22 — Implement deterministic full-text index generation ## Acceptance criteria - The CLI accepts a query and returns ranked pilot chunk results. - Result count and supported filters work as documented. - Every result includes stable lineage identifiers. - No-result and invalid-input cases are clear and non-crashing. - The search core is reusable independently of the CLI. - Search runs without network access or an LLM. - Initial M2-01 fixture expectations can be exercised programmatically. ## Validation - Run the complete unit-test suite. - Run representative single-result, multiple-result, filtered, and no-result queries. - Run with networking disabled and no model software installed. - Verify deterministic result ordering for repeat queries. ## Suggested branch `feature/issue-23-offline-search-cli` <!-- arkive-planning-automation:2026-07-24-v3:M2-05 -->
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Arkive/arkive#23
No description provided.