agentleFS
loganware05loganware05/captains-compass-cursor/.cursor/skills/hosted-vector-db/SKILL.md

hosted-vector-db

Skill2 starsChanged 32 days agoMITView on GitHub

Syncs and queries hosted pgvector/Neon knowledge vectors with namespace isolation and TF-IDF fallback

  • Installs packages

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Default path stays file-backed (COMPASS_VECTOR_PROVIDER=file or unset):

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Hosted Vector DB (pgvector / Neon)

Use this Skill when

The Captain wants hosted semantic search for Knowledge Steward beyond file-backed TF-IDF and local dense indexes, using a shared Neon/pgvector index with per-repo namespaces.

Cost note (M13 decision)

Neon/pgvector was chosen over Pinecone for Compass scale: both are $0 on free tiers today, but Pinecone Standard carries a $50/month minimum once Starter limits are exceeded; Neon Launch is pay-as-you-go with no monthly floor.

Inputs

  • Approved IMPLEMENTATION_PLAN milestone (M13+)
  • Env COMPASS_VECTOR_PROVIDER=pgvector (live) or mock (tests)
  • Env COMPASS_VECTOR_DATABASE_URL (Neon Postgres DSN; never commit)
  • Env COMPASS_VECTOR_NAMESPACE (recommended; default is repo directory name)
  • Embedding provider: COMPASS_EMBEDDING_PROVIDER=fixture or openai-compatible
  • Optional: pip install 'psycopg[binary]' for live Neon sync/query

Procedure

  1. Default path stays file-backed (COMPASS_VECTOR_PROVIDER=file or unset):

    ./scripts/rebuild-knowledge-vector-index.sh
    ./scripts/query-knowledge.sh --query "approval gate" --mode hybrid
  2. Bootstrap pgvector schema on Neon (Captain local):

    export COMPASS_VECTOR_DATABASE_URL='postgresql://...'
    export COMPASS_VECTOR_DIMENSIONS=32   # match embedding provider
    ./scripts/init-pgvector-schema.sh --apply
  3. Sync knowledge embeddings to hosted store (explicit CLI):

    export COMPASS_VECTOR_PROVIDER=pgvector
    export COMPASS_VECTOR_NAMESPACE=captains-compass-cursor
    export COMPASS_EMBEDDING_PROVIDER=fixture   # or openai-compatible + API key
    ./scripts/sync-knowledge-vector-db.sh
  4. Query hosted vectors:

    COMPASS_VECTOR_PROVIDER=pgvector \
    COMPASS_VECTOR_DATABASE_URL='postgresql://...' \
    COMPASS_VECTOR_NAMESPACE=captains-compass-cursor \
    COMPASS_EMBEDDING_PROVIDER=fixture \
      ./scripts/query-knowledge.sh --query "matcher tuning" --mode vector
  5. On missing hosted backend, live embed failure, or empty hosted index → TF-IDF fallback (same as M11/M12).

Output

  • Rows in compass_knowledge_vectors keyed by (namespace, item_id)
  • Query results tagged vector_backend: pgvector (or pgvector-mock in tests)

Prohibited actions

  • Live Neon/pgvector in CI or default hooks
  • Committing database URLs or API keys
  • Auto-sync on workstream close
  • Removing TF-IDF fallback

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.