Skip to content

Experimental bartender ask: smallest-sufficient cards or NO_MATCH - #304

Draft
JordanCoin wants to merge 2 commits into
mainfrom
cursor/bartender-ask-prototype-09fe
Draft

JordanCoin wants to merge 2 commits into
mainfrom
cursor/bartender-ask-prototype-09fe

Conversation

@JordanCoin

@JordanCoin JordanCoin commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

Prototype of bartender ideas (by everoo) inside codemap, behind an opt-in experimental CLI/MCP surface. Default commands and behavior on main are unchanged.

Agents can ask a question and get the smallest sufficient context as compact, deduplicated summary cards derived from codemap’s existing map — or an explicit NO_MATCH.

Surfaces

codemap ask "how does find rank files"
codemap ask --json --budget 900 "UseTheme SaveTheme"

MCP tool: ask (description marked [EXPERIMENTAL bartender prototype]).

Schema: codemap.ask/v1-experimental.

Example output

Run against codemap's own repo:

$ codemap ask "how does find rank files"
MATCH — 3 compact cards (adaptive shortlist)
1. find/find.go [hub] find.go hub
   go · ←4 · →11 · symbols: Run, Rank, rankAll, sortHits, truncate · matched: find.go, Rank, rankAll
   links: ask.go, ask_test.go, astgrep.go, cargofallback.go, contracts.go, find_cmd.go
   id=file:find/find.go rev=444d05f872b4 score=13.022
2. find/find_test.go [file] find_test.go
   go · →8 · symbols: TestRankPrefersSymbolVocabulary, TestRenderShape, TestRunFallsBackToBodyText, TestBodyHitsHonorsCancellation · matched: find_test.go, TestRankPrefersSymbolVocabulary
   links: astgrep.go, cargofallback.go, contracts.go
   id=file:find/find_test.go rev=a5ca8be102ac score=11.796
3. scanner/walker.go [package] codemap/scanner package
   go · ←83 · →14 · symbols: NewGitIgnoreCache, loadRepoExcludes, findGitDirs, globalExcludesFile, readIgnoreLines · matched: findGitDirs, ScanFiles, ScanFilesBounded
   id=package:codemap/scanner rev=97cb438345ab score=6.686
budget_cap: 1200 bytes

$ codemap ask "stripe billing webhook"
NO_MATCH — no sufficiently reliable relevant record found

JSON (codemap ask --json --budget 600 "hook session start", trimmed):

{
  "schema": "codemap.ask/v1-experimental",
  "status": "MATCH",
  "message": "MATCH — smallest sufficient card",
  "cards": [{
    "id": "package:codemap/cmd",
    "revision": "3d958f00b79f",
    "type": "package",
    "capsule": "go · ←7 · →23 · matched: resolveValidatedHookFiles, RunHookWithTimeout, HookTimeoutFromEnv, runSubagentStart",
    "paths": ["cmd/hooks.go"],
    "score": 18.048
  }]
}

Note: result 3 is a weak lexical hit (findGitDirs contains "find"), which is the AFR-vs-lexical question for everoo.

What works in this slice

  • Cards built from one ScanForDeps + FileGraph (Alexandria-inspired id + revision)
  • Lexical retrieval via existing find.Rank, adaptive shortlist + byte budget
  • Explicit NO_MATCH when nothing is reliable enough
  • CLI + MCP + tests + design note with concept map and open questions

Design / credit: docs/design/BARTENDER-ASK.md

Non-goals

  • No change to hooks, session-start dumps, or default tool behavior
  • No persistent Alexandria store, embeddings, or outcome learning yet

Open questions for everoo

Listed in the design note (persistence vs ephemeral cards, AFR vs lexical, expand protocol, synonym/NO_MATCH policy, attribution).

CI note

Follow-up commit fixes gofmt (Lint) and adds broader ask CLI/helper coverage. Codecov patch % is informational (fail_ci_if_error: false); total coverage floor already passed on the first run.

Open in Web Open in Cursor 

Prototype Alexandria-style summary cards and AFR-style shortlisting behind
codemap ask / MCP ask, returning MATCH with compact cards or explicit
NO_MATCH. Opt-in only; credits everoo/bartender and documents the mapping.

Co-authored-by: Jordan Coin Jackson <jordancoinjackson@gmail.com>
@codecov-commenter

codecov-commenter commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.08287% with 54 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ask/ask.go 88.01% 18 Missing and 14 partials ⚠️
ask_cmd.go 85.07% 7 Missing and 3 partials ⚠️
main.go 0.00% 5 Missing and 1 partial ⚠️
mcp/main.go 72.72% 4 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Satisfy CI formatting check and cover JSON/validation CLI paths plus
graph-backed card rendering helpers.

Co-authored-by: Jordan Coin Jackson <jordancoinjackson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants