Skip to content

feat: Add --data-dir flag to ruvector mcp start #2

@dmoellenbeck

Description

@dmoellenbeck

Problem

ruvector mcp start hardcodes the data directory to process.cwd()/.ruvector/ and process.cwd()/ruvector.db. There is no way to configure where ruvector stores its data.

This is problematic when:

  • The project directory should only contain source code, not runtime data
  • Multiple projects share the same ruvector intelligence data
  • Users want all application data in a centralized location (e.g., ~/.claude-coach/)
  • The ruvector.db (redb) file appears in the project root alongside source files

Current behavior

getIntelPath() {
  const projectPath = path.join(process.cwd(), '.ruvector', 'intelligence.json');
  // ... fallback to ~/.ruvector/
}
  • No --data-dir flag on ruvector mcp start
  • No RUVECTOR_DATA_DIR environment variable
  • No config option in ~/.ruvector/config.json

Current workaround

Symlinks:

ln -s ~/.claude-coach/ruvector .ruvector
ln -s ~/.claude-coach/ruvector.db ruvector.db

This works but is fragile (symlinks can break on clone, CI, etc.).

Proposed solution

Add a --data-dir flag to ruvector mcp start:

ruvector mcp start --data-dir ~/.claude-coach/ruvector

This should control where:

  • intelligence.json, learning-state.json, biometric-index.json are stored
  • ruvector.db (redb) is created
  • Any future data files are placed

Also support environment variable

RUVECTOR_DATA_DIR=~/.claude-coach/ruvector ruvector mcp start

Resolution order (proposed)

  1. --data-dir CLI flag (highest priority)
  2. RUVECTOR_DATA_DIR environment variable
  3. ~/.ruvector/config.jsondata_dir key
  4. Current behavior (.ruvector/ in cwd, fallback to ~/.ruvector/)

Context

Using ruvector as intelligence layer for a coaching application. All application data lives in ~/.claude-coach/ but ruvector scatters files across the project directory (.ruvector/, ruvector.db). This makes clean separation of code vs. data difficult.

Affected components

  • bin/mcp-server.jsgetIntelPath() method
  • ruvector.db path resolution
  • learning-state.json save/load paths

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions