bubbles-code-index-adapter

Wire and consume an opt-in code-index adapter that derives structural source facts for advisory gates.

1|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/pkirsanov/bubbles --skill bubbles-code-index-adapter-pkirsanov
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bubbles-code-index-adapter
Source: https://github.com/pkirsanov/bubbles/tree/main/skills/bubbles-code-index-adapter
Command: npx skills add https://github.com/pkirsanov/bubbles --skill bubbles-code-index-adapter-pkirsanov

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Gates and lints that enumerate their own scope by hand can emit absolute correctness claims about code they never covered, staying green while missing real defects. This Skill replaces hand-maintained lists with structural facts (symbols, blast radius, affected tests, route inventory) derived from a swappable code-index provider, while keeping the framework fully functional when no provider is configured. ## Core Features & Use Cases - Eight-verb adapter contract: Query symbols, impact, affected, routes, indexed, status, freshness, and sync through normalized JSON shapes with strict exit-code semantics (exit 2 for stale indexes, exit 1 for unavailable providers). - Opt-in project wiring: Configure codeIndex.adapter in .github/bubbles-project.yaml and resolve it via codeindex-resolve.sh; the default none adapter keeps the framework dependency-free. - Provider authoring guidance: Add providers like codegraph or codebase-memory with normalization rules, honest unsupported capability declarations, and offline shape selftests. - Use Case: A lint needs to know which tests a diff can actually reach. Instead of a hand-maintained impact map, it calls the adapter's affected verb, checks freshness first, and degrades to the full suite if the index is missing or stale. ## Quick Start Ask the agent to wire a code-index adapter into the project config and show how a gate would consume the affected-tests verb with proper freshness and degradation handling.

Frequently Asked Questions about bubbles-code-index-adapter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I wire a code-index adapter into my repository?▼

Add a `codeIndex` block with an `adapter` key (codegraph, codebase-memory, or none) to `.github/bubbles-project.yaml`. Resolve it with `bash bubbles/scripts/codeindex-resolve.sh --repo-root . --names-only`; absent config resolves to the neutral `none` adapter with exit 0.

How do I find which tests a code change affects?▼

Call the adapter's `affected` verb with repo-relative file paths to derive reachable tests from the dependency graph. Check `freshness` first (exit 2 means stale), and fall back to the full test suite on exit 1 or unsupported capabilities.

Which code-index provider should I choose for my repository?▼

Match the provider's grammar set to your repository's actual composition, measured with `git ls-files` extension counts. AST-based indexers suit typed languages like Go, Rust, and TypeScript; codebase-memory is the only shipped provider that parses shell.

Why does the adapter return exit code 1 instead of an empty result?▼

Exit 1 means the provider is missing, no index exists, or the provider failed, while an empty array with exit 0 means the index was queried and found nothing. Consumers must not conflate these, or they will report clean results for unindexed repositories.

Can the code-index adapter block a gate verdict?▼

No. Structural facts feed advisory nudges only; the authoritative verdict stays with existing framework checks. A third-party index inside a blocking gate is considered a worse dependency than the gap it closes.

Why does a symbol query return hundreds of markdown headings?▼

Providers like codebase-memory index markdown headings as symbols, so generic queries in documentation-heavy repositories return prose structure instead of code. Query distinctive symbol names rather than common words to get discriminating results.