Skip to content
published Visibility internal Owner erik@uvilo.com Approver _ Created _ Updated _

TypeSense Index Research Decisions

Extracted from TypeSense_Index_Research.md. This file preserves the exact decision content so the Spec can reference it without paraphrasing.


R1 Decision — Incremental Indexing via Diff

Trigger on **/*.md (no path narrowing on the workflow trigger), but only index the .md files that changed since the last push. The filtering logic moves from the workflow trigger to the indexer itself, which diffs against the last push to determine changed files and only processes those. This simplifies the trigger config and makes the indexer incremental by default.

R2 Decision — p-limit Concurrency

Use p-limit for concurrency. Concurrency of 5–8, configurable. Summary and embedding calls for the same file run in parallel (they’re independent). Multiple files process in parallel. Batch upsert to Typesense batches by BATCH_SIZE (40 docs).

R3 Decision — index-department.yml GitHub Action

New index-department.yml workflow with workflow_dispatch trigger. Supports inputs:

  • mode — incremental / all / department
  • department — (optional) department name for department mode
  • since_ref — (optional) defaults to HEAD~1

Runs on ubuntu-latest runners, eliminating Railway timeout issues.

R4/R5 Decision — Separate Bundled TypeScript Projects

Two separate bundled TypeScript projects:

  • index-department — at Forge/Typesense/Maintenance/index-department/
  • typesense-mcp — at Forge/Configs/MCP_Servers/typesense-mcp/

Collection setup script: Forge/Typesense/Maintenance/create-typesense-collections.ts (moved from Forge/Configs/).

Minimal shared code is acceptable to duplicate (HTTP helpers, env var reading).

R6 Decision — Update Skill Docs After Migration

Update Typesense MCP skill documentation after R4/R5 TypeScript migration is complete, as part of the same implementation cycle. Remove: “no curl in container” references, Python dependency references, /proc/1/environ-only env var pattern references.

R7 Decision — Default Status Filter

Default status to "published". "all" omits the filter entirely. Any explicit status value filters normally.

Original Python Indexer Constants

ConstantValue
COLLECTIONuvilo
CHUNK_WORD_LIMIT800
HEADING_CHUNK_MIN_WORDS50
BATCH_SIZE40
MAX_RETRIES3
RETRY_DELAY2
OPENAI modelsgpt-5.4-nano (summary), text-embedding-3-small (embedding)

Original OpenAI Summary Prompt

You generate concise summaries of documentation files. Summarize the purpose and key content of the file in 100 words or fewer. Be factual and specific. Do not use phrases like ‘this file contains’ or ‘this document describes’.

Original index-department.py Usage (TypeScript equivalent)

node Forge/Typesense/Maintenance/index-department/dist/index.js Product
node Forge/Typesense/Maintenance/index-department/dist/index.js Technology Planning Operations
node Forge/Typesense/Maintenance/index-department/dist/index.js Forge --subpath=Projects/Agentic_Execution
node Forge/Typesense/Maintenance/index-department/dist/index.js Forge --subpath=root
node Forge/Typesense/Maintenance/index-department/dist/index.js --root
node Forge/Typesense/Maintenance/index-department/dist/index.js --all
node Forge/Typesense/Maintenance/index-department/dist/index.js --incremental
node Forge/Typesense/Maintenance/index-department/dist/index.js --incremental --since=HEAD~5