Changelog
v2.0.0 β 2026-10-18β
Graph-accuracy overhaul (T1βT6, T8, T11βT12): receiver-type resolutions now land on real METHOD entities with per-source confidence tiers; unresolved reference stubs are quarantined from default query surfaces; the default ignore list covers all ecosystem lockfiles, sourcemaps/minified bundles, and agent-tool state dirs β with per-build skip reporting and an opt-out; import namespaces are now derived from repo evidence (package markers, manifests) instead of hardcoded src/lib conventions; trace_path traverses a default-deny structural whitelist with deterministic edge-priority tie-breaking; search results are scored by kind-aware ranking; and marker comments/docstrings link to the symbols they explain via RATIONALE_FOR edges; and community detection now produces readable, labeled communities β weighted input, isolate/super-hub policies, and split/merge post-processing replace the thousands of mechanical fragments.
New Featuresβ
- Receiver-type method resolution (T1):
svc.getEntity()-style member calls now resolve to first-party METHOD entities instead ofunresolved:ghosts. Type inference gains four new sources β parameter annotations from stored signatures (graph_svc: GraphService = Depends(...)β noextract_parametersneeded), DI-default expressions (Depends(get_graph_service)), position-aware assignment flow (svc = get_graph_service(); the latest binding at or before the call wins, so reassignment infers correctly), and static/module receivers. Receiver/context capture is language-neutral: Python (call), TS/JS/Go/Rust/C++ (call_expression), Java (method_invocation), and PHP (*_call_expression). Assignment bindings recordassigned_to/assigned_inneredge metadata at extraction time. - Per-source confidence tiers: annotated parameter β
receiver_param(0.90); assignment/DI-default flow βreceiver_assignment(0.75); hints/self/static/fallback βreceiver_type(0.65). Tagged on edges and stubs asresolution_strategy+resolution_confidence/confidence. - Unresolved-ref quarantine (T2):
unresolved:stubs stay in storage (provenance kept,include_unresolved=truerestores old behavior exactly) but no longer pollute defaults βsearch_entitiesexcludes them and reportsβ¦ N unresolved reference(s) suppressed,graph_querygainsinclude_unresolved(default false),graph_overviewcounts resolved entities only (unresolved_refsreported separately), and community detection excludes ghosts from clustering input. - Default ignore hygiene (T3): new built-in patterns β
pnpm-lock.yaml,bun.lock(b),deno.lock,flake.lock,pdm.lock,composer.lock,packages.lock.json,Pipfile.lock,conda-lock.yml,*.tsbuildinfo,*.map,*.min.js,*.min.css,graphify-out/,.graphify/, and agent/tool state dirs (.cursor/,.claude/,.codeium/,.specs/)..gitignoreis always honored additively. indexer.ignore_defaults(defaulttrue): set tofalsefor exotic repos to skip built-in defaults entirely (user patterns +.gitignorestill apply). Build,batho patchchange detection, watch mode (including catch-up), and incremental scans all honor the same repo-configured ignore spec β auto-patch can no longer re-index files the build excludes.- Skip reporting: after collection, build logs
ignore_skip_breakdown(INFO) with counts of paths filtered by built-in defaults vs user/gitignore patterns. - Package-root aliasing (T11): imports resolve under the namespace the repo actually declares, not the file's directory path.
__init__.pymarker chains detect package boundaries (backend/app/x.pyimported asapp.xresolves);pyproject.toml(package-dir,packages.find where),setup.cfg,Cargo.toml,go.modmodule, andtsconfigbaseUrl/paths(@/*aliases) are read as evidence; a module-suffix index joins import-path refs to file-path registrations when no marker exists (namespace packages). New resolution strategypackage_alias(confidence 0.85). The previous("src", "lib")directory-name heuristics are removed β no repo-layout names remain in the resolution path. indexer.package_roots(default[]): optional user-declared import roots for layouts with no filesystem/manifest evidence (e.g. runtimesys.pathtricks).- External-constructor receivers:
app = FastAPI()(or any capitalized external callee) now types the binding as the introspected external class, soapp.include_router()synthesizes and materializes the external member entity (fastapi/FastAPI().include_router) instead of ghosting. DI wrappers keep precedence (x = Depends(get_svc())still typesxfrom the inner callee). trace_pathdefault-deny traversal (T6): path expansion is restricted to a whitelist of structural edge kinds (TRACE_EDGE_PRIORITY); equal-length paths prefer CALLS > INHERITS/IMPLEMENTS > IMPORTS > READS/WRITES > CONTAINS via priority-sorted adjacency, andmeta.edge_priorityreports the preference order, kinds used, and kinds excluded. Annotation edges (e.g.RATIONALE_FOR) can never be traversed β even when shorter β and arelation_typesfilter can only narrow the whitelist. A manifest-driven ground-truth suite (tests/fixtures/trace_ground_truth.yaml+ checked-in fixture repos for python/ts/rust/go/java) locks endpointβservice resolution into CI.- Kind-aware search ranking (T8):
search_entitiesscores hits deterministically β exact > prefix > substring (regex-only hits score at substring strength), kind boosts (code symbols up, comments/externals down), exported and fqn/path-segment signals, plus a per-language separator hint driven by the hit's language (covers php\, go/, ts@/). Ordering is a stable total order; recall is unchanged (reorder only). Theget_entitybare-name fallback ranks candidates with the same scorer. - Rationale layer (T5): marker comments β
WHY:/NOTE:by default, per-language comment syntax (#,//,--,%,/* */,(* *),{- -}) β becomeCOMMENT_BLOCKentities, and every comment/doc entity links to its enclosing or immediately-following FUNCTION/METHOD/CLASS viaRATIONALE_FOR(confidence 0.75; 0.5 when the marker was found by the unverified line-scan fallback). Markdown documents link to modules on unique exact path-segment matches. Tunable viaextraction.rationale_markersandextraction.rationale_markers_case_sensitive.RATIONALE_FORis an annotation edge: excluded fromtrace_pathtraversal and from community-detection input. - Import-specifier resolution (T12): relative specifiers (
./x,../x,/x) now resolve against the importing file's directory via a newrelative_pathstrategy (confidence 0.85) β./spatial-collisionlands onsrc/lib/spatial-collision.ts. Manifest names strip PEP 508 extras at parse (uvicorn[standard]βuvicorn, so the package actually introspects). Rust/Ruby::-style stdlib names register dot-normalized aliases, making existing table coverage (std::io::Read,std::io::Write) reachable. Extraction noise dropped: brace-group literals ({Read, Write}) and scoped-package leaf candidates (@tauri-apps/plugin-dialogβplugin-dialog) no longer emit doomed stubs. - Community labels + pruning (T4): clustering input is now weighted (
community_detection.edge_weightsper kind Γ call-site multiplicity Γ confidence; CONTAINS defaults to 0 β file layout no longer drowns coupling), degree-0 entities attach post-hoc to their file/directory's majority community, super-hubs above the P99 degree percentile are dropped and reattached by shared weight, oversized communities re-cluster recursively, and small ones merge into their strongest neighbor or flagis_singleton. Every community gets a deterministicheuristic_label(dominant non-generic directory β c-TF-IDF tokens β common identifier affix β hub name), andgraph_overviewshows the top-12 labeled communities with one-line descriptions plus a "N smaller communities" aggregate. - Generated plugin pipeline (batho-calibrate): repository-specific
bsg-plugin.v2files can be generated into.batho/plugins/(newrules.custom_rules_dirβ each file fingerprinted into the rules config and into the AST cache variant, so plugin changes invalidate correctly), validated withbatho plugins validate, and retro-applied to an existing artifact withbatho plugins applyβ full rule-set re-enrichment (metadata + semantic overlay) without re-extracting files. - Quarantine metadata + filters: rules can stamp
bsg.noise/bsg.quarantined;search_entitiesandgraph_queryexclude quarantined entities by default with aninclude_quarantinedopt-in and report the suppressed count;graph_overviewand community detection exclude them unconditionally (graph_overviewreportsquarantined_entities). Entities stay in storage β exclusion is a view concern. - Tag-driven edge derivation (annotation layer): plugin-applied tags/metadata now materialize annotation edges β
metadata["bsg.edge_hints"]resolves declarative targets (entity id / fqn / name pattern, annotation types only, per-source cap),bsg.semantic_familyproduces directory-boundedSEMANTICALLY_SIMILAR_TOedges (top-K by name-token overlap), and test naming conventions (test_<stem>) mintTESTED_BYedges boosted by existing call/import affinity. All carryedge_class: "annotation"+ INFERRED confidence and are excluded from structural clustering andtrace_pathby construction. - Rule telemetry (
rule-stats.v1): build, patch, andplugins applywrite a per-runrule_statsrecord into therun_artifactsIPC table βrules_fingerprint,run_kind,rule_hits,plugin_hits,rule_perf,plugin_filesβ enabling longitudinal fitness scoring of generated plugins (opt-out viaartifact_blobs.run_artifacts.rule_stats). batho-calibrateagent skill (.devin/skills/batho-calibrate/): everybatho build/patchnow writes anenrich_profilegap report (noise/ghost/category/service-tag/fan-in/community stats with suggested rule shapes) and anenrich_scorerule-fitness report (promote/shadow/regenerate/disable/stale verdicts fromrule_statshistory) intorun_artifacts, plus human-readable.batho/report/overview.md+.batho/report/score.md.batho plugins validateruns the two-stage acceptance (schema + deterministic fixture gate on real sampled entities) for a single file, a directory, or β with no path β every*.yaml/*.ymlin.batho/plugins/. The skill itself is script-free β it reads reports and calls CLI verbs only.- Community hierarchy + optional LLM labels: recursive community splits now persist
parent_id/level(domain β community β sub-community whencommunity_detection.domain_groupinggroups bybsg.domain/service_tag/categoryfirst).batho communities labeloptionally writesllm_label/label_source/label_input_hashvia a configured LLM β compile-time only, hash-gated incremental re-labeling,heuristic_labelfallback preserved (community_detection.llm+BATHO_LLM_API_KEY; off by default).batho communities list --treerenders the hierarchy. batho installβ one-command agent setup (replacesbatho skills): installs the Batho skill pack (batho,batho-setup,batho-specs,batho-execute,batho-review,batho-calibrate) AND registers the Batho MCP server with every detected coding-agent client in a single invocation. Skill pack: fetched checksum-verified from batho-skills releases, installed to~/.agents/skills(vendor-neutral path covering Cursor, Copilot, Codex, Gemini CLI, OpenCode, Devin) plus native mirrors for detected agents. MCP registration merges the stdio server entry (batho mcp) into each detected client's config βclaude-desktop(claude_desktop_config.json),claude-code(~/.claude.jsonuser scope),cursor(~/.cursor/mcp.json),windsurf(legacy~/.codeium/windsurf/mcp_config.json+ Cortex~/.config/devin/mcp_config.json),vscode(user-profilemcp.json, top-levelserverskey),codex(~/.codex/config.toml[mcp_servers.batho]TOML),gemini(~/.gemini/settings.json),opencode(opencode.jsonmcpkey with argv-array command),copilot(~/.copilot/mcp-config.json). Merge-not-clobber (only thebathokey is touched), atomic tmp+rename writes, per-file error isolation, idempotent re-runs (installedβupdated); re-runningbatho installalso updates a drifted pack. Flags:--agent NAME(repeatable; skills-only agents likerooinstall skills with an MCP note),--all,--project,--version V,--copy,--force,--no-mcp. Global scope only β no project files written. Per-client config surfaces live inagent-paths.jsonschema v2 (mcp_agentssection) alongside the skill-path table. Auto-sync onbatho mcpstart unchanged (opt out viaskills.auto_install: false; pin viaBATHO_VERSION).- Watcher v2 β git-sentinel engine: the MCP watcher now triggers auto-patch on git-operation boundaries (index/HEAD/ref settle via a
.gitsentinel watcher) instead of raw file-event floods, with avcs_op_in_progresshold that defers patches while git mutations are in flight. Tunable viawatch:config βmode(auto/fs/off),max_staleness_ms,flush_threshold,git_settle_ms,vcs_op_hold_ms.watch.mode: offstill tracks state for staleness banners without auto-patching. indexer.strict_hashing(defaultfalse): when enabled,batho patchchange detection SHA-256-hashes every tracked file on every run; when disabled, the mtime/inode/size fast-path inIncrementalEngine.scan_changesis used (BATHO_STRICT_HASHING).indexer.file_changelog_max_runs(default100, β₯1): cap onfile_changelogrows retained per file across patch runs (BATHO_FILE_CHANGELOG_MAX_RUNS).
Changedβ
plugins.reextract_on_drift(defaulttrue):batho patchnow escalates to a full-repo re-extraction when the plugin fingerprint drifts from the previous run, instead of only warning β unchanged files no longer keep entities stamped by an outdated plugin set. Escalated runs logpatch_drift_escalation(tracked/scanned counts), resolvebsg.parallel.max_workersfor extraction, and record the current fingerprint so the next patch settles. Setreextract_on_drift: falseto restore warn-only behavior.- AST cache variant now includes the rules fingerprint: any change to plugin files under
rules.custom_rules_dir,disabled_rules,builtin_plugins, orplugins.overridesproduces a new cache variant β stale rule-enriched entities can no longer be served from cache. Expect a one-time fleet-wide cache invalidation on the first build after this lands (correct behavior, not a bug). - AST cache schema bumped to
v4: hollow-topology entries now carrysignature/start_line/end_lineso receiver-type resolution works on cached results andbatho patchproduces identical resolution to a full build. test_e2e_watcher_auto_patchand other watch flows use the repo-aware ignore spec (_repo_ignore_spec); watcher falls back to defaults +.gitignoreif config loading fails.- Breaking:
batho diffrenamed tobatho history(no alias kept): bare invocation now lists recent runs newest-first (--last N, default 10);--run,--entity,--file,--since, and--jsonkeep their previous semantics β--entity/--fileadditionally accept--last(default 10). The MCP toolbatho_diffis renamedbatho_history(same parameters; clients allowlisting tool names must update). file_changelogrows now storefile_path: history entries survive file deletion (batho history --fileworks on deleted files, and delete+recreate no longer splits history acrossfile_ids). The patch flow recordsremovednode rows before deleting tracking rows β removals for deleted files were previously never written to the changelog.- Plugin architecture migration: the BSG rule engine and built-in rule YAMLs moved into the
batho_pluginSDK package (batho_plugin.rule_engine,batho_plugin/core/), developed as thesdk/workspace member and shipped inside thebathowheel β no separate distribution to install;batho.modules.compressionre-exports the public API via a deprecated lazy shim. Extraction decisions (language detection, marker/property classification, stub pruning, language stamping) now dispatch through aPluginHoststage pipeline;--no-plugins(batho build --no-plugins) runs the compiled-in fallbacks withplugin_fingerprintabsent from run artifacts. - Breaking change (opt-in interceptors): the 9 security/quality interceptor plugins moved to the external pack and are now off by default β enable them via
plugins.external.enabled: true(optionally narrowed byplugins.external.select, which matches file stems or plugin_ids).rules.builtin_pluginsonly resolves core-pack stems; listing interceptor stems without enabling the external pack producesUnknown built-in rule pluginwarnings. - Behavior change (entry-point names): the rule pipeline no longer renames
ENTRY_POINTentities to__main__after rule application. Thenormalize_entry_pointaction still detectsif __name__ == "__main__":entry points and stampsbsg.normalized_name+invocation_snippetmetadata, but the post-rule entity rename was removed (spec risk register: deferred; the capability stays declared-unused until the SDK schema rework) so entity names remain stable across rule changes. Entry-point names produced by v1.4.3 builds will differ from v2.0.0 builds.
v1.4.3 β 2026-09-20β
Universal dependency introspection (19 managers) and the skip-when-env-missing policy; pytest-style progress bars for batho build and batho patch; fully pinned dependency set and fastmcp 3.4.7 for deterministic installs.
New Featuresβ
- Real introspection for every manager with an offline install store: 12 new introspectors β Ruby gems (
GEM_HOMEβgem env gemdir), PHP/Hack composer (vendor/+ PSR-4 namespace-qualified classes), NuGet (XML docT:members,.nuspecfallback), Dart pub (.dart_tool/package_config.jsonβ dart's own resolution β withPUB_CACHEfallback), Julia (depotexportlists), R/CRAN (renv library /R_LIBS_USER,NAMESPACEexport()directives), Haskell cabal (exposed-modules:,ghc-pkgfallback), Swift SPM (.build/checkouts,public/openonly), Zig (vendored.zigmod/deps+ global cache matched bybuild.zig.zon.name), Erlang rebar3 (-export([...]).lists), OCaml opam (.mliinterfaces), Lua luarocks (rock trees), Perl cpan (local::lib.pm). - Gradle store support in jar introspection:
introspect_jarnow searches~/.gradle/caches/modules-2/files-2.1in addition to~/.m2, with binary-jar entry-name parsing when no-sourcesjar exists β Kotlin/Scala/Java deps declared via Gradle are introspectable. - Skip-when-env-missing policy (default on,
dependency.introspection.skip_missing_env): when a dep's environment (venv,node_modules,vendor/, user package store) cannot be found, the dep is skipped β no introspection attempt, no fallback{name: [name]}stub symbols, no cache write.deps_skipped_no_env/deps_no_symbols/deps_no_ecosystemcounters in build stats (dependency_index_complete), one warning per manager with a fix hint.skip_missing_env: falserestores legacy best-effort behavior. full_scancontract formalized β the single explicit switch for declared-dep introspection:trueattempts every declared dependency (subject to the env-skip policy and no-ecosystem classification);falseattempts only popular-DB members. The per-dependency gate chain is pinned (β cache β β‘ popular β β’ managers β β£ route β β€ env β β₯ introspect) with a completeness invariant: every unique declared dep reaches exactly one terminal bucket (deps_unique == cached + gate_dropped + manager_disabled + no_ecosystem + skipped_no_env + introspected + no_symbols), asserted after every run (log-onlyintrospection_accounting_mismatchwarning). New stats:deps_unique,deps_gate_dropped,deps_manager_disabled;dependency_gate_dropslog line with a "set full_scan: true" hint when the popular gate drops deps.- Python never introspects the wrong interpreter:
introspect_pythonlost thesys.executablefallback β only the project venv's python binaries are used; a venv-less project is skipped (configurable via the policy above). - Per-manager introspection toggles (
dependency.introspection.managers, e.g.{gem: false}); unknown manager keys warn and are ignored. - Env-resolution matrix: declarative per-manager environment resolution (project-scoped walk-up markers vs user-level store env-var β home default β glob fallbacks), memoized per (manager, manifest dir), shared by the skip policy and the introspectors.
- No-ecosystem classification:
bash,verilog,c,cpp,objc,agdadeps are explicitly classified (deps_no_ecosystem, debug log) instead of falling through stub branches;hackdeps route through the composer introspector. A routing table maps every language β introspector (orNone).
Changedβ
{name: [name]}fallback stubs removed from_introspect_depandintrospect_jarβ stubs inflated I2 metrics with unresolvable package-name symbols.- Resolution cache version bumped (
v3:hash prefix, now including the declaring manifest-dir scope) so previously-cached fallback stubs are invalidated on first run. - Phase progress display:
batho buildandbatho patchnow render phase-level progress on stderr in pytest's[ NN%]style βextract [ 45%] 645/1432β with one completion line per phase and a one-line final summary (β built in 42.3s β 312 files Β· 1542 entities Β· 4823 relationships). The live bar appears only for phases longer than 2 seconds and is transient (erased on completion), keeping terminal logs clean. - Graceful non-TTY degradation: when stderr is not a terminal (pipes, CI), no animation is rendered β one completion line per phase instead, with a keep-alive line every 60 s for long phases so CI log viewers never look frozen.
NO_COLORdisables color but keeps the bar (per the NO_COLOR standard). --no-progressflag onbuildandpatch, plus theBATHO_NO_PROGRESS=1environment variable (strict parsing: only1/true/yesdisable β unlikeTQDM_DISABLE,"0"does not). NativeTQDM_DISABLE/TQDM_MININTERVAL/TQDM_MINITERSoverrides pass through for power users.progress:config section inbatho.yaml:enabled,style(progress|classic),mininterval_s,show_after_s,keepalive_s.- Parent-process-only progress hooks: the extraction pipeline exposes a
progress_callbackinvoked once per completed file result in the parent process; worker processes (spawn-contextmultiprocessing.Pool) never touch the bar. A failing progress callback can never break a build or patch. - Log interleaving safety: while a bar is active, structlog output (routed through stdlib logging) is emitted via tqdm's write mode, which clears and redraws the bar instead of corrupting it.
- Build/patch success summaries restyled to one line:
β built in 42.3s β 312 files Β· 1542 entities Β· 4823 relationships(wasBuilt /path: N entities, N relationships, N files in Nms). - New dependency:
tqdm>=4.66(zero runtime dependencies off Windows, ~80 KB wheel, ~60 ns/iteration documented overhead, wall-clock regression guard). A benchmark guard asserts progress overhead stays under 10% of build wall-clock (design budget: 1%); it runs only where the measurement is meaningful β skipped under coverage tracing and on CI, where the tracer's overhead dominates and the per-test timeout can fire mid-build.
Dependencies & Packagingβ
- All dependencies pinned to exact versions (
==): 18 runtime, 6 test, and 8 dev dependencies, plus thehatchlingbuild requirement. Freshuv tool install/pip installresolutions are now fully deterministic β upstream releases can no longer change Batho's behavior until a new Batho release deliberately bumps the pins. (Lockfiles do not ship inside wheels, so pins inpyproject.tomlare the only author-controlled constraint on whatuv tool installresolves.) fastmcp==3.4.7(was>=3.4.0, which resolved to the breaking fastmcp 4.0.x on fresh installs): fastmcp 4.0 removed thefastmcp.tools.toolmodule, crashingbatho mcpat import time. 3.4.7 is the maintained 3.x head and carries security backports β SSRF via NAT64/6to4/Teredo transition addresses, a DNS-rebinding Host/Origin guard, and JWT/OAuth fixes β that 3.4.2 predates.- fastmcp 4.x-ready imports:
batho.mcp.toolsandbatho.mcp.errorsnow importToolResultfrom the canonicalfastmcp.toolspackage instead of the removedfastmcp.tools.tooldeep path. The canonical path works on both fastmcp 3.4.x and 4.x, so the import layer of any future 4.x migration is already in place.
Fixedβ
- Config loader tolerates explicit
nullvalues inbatho.yaml:_merge_confignow treats an explicit YAML null as "not set" and keeps the schema default, instead of copying theNoneinto the config dict and failing pydantic validation. Symptom: abatho.yamlwritten by v1.4.3 (dependency.stdlib.languages: null, as produced bybatho.yaml.exampleand default config dumps) crashed every batho command on the v1.4.2 model withRuntimeError: Invalid Batho configuration in 'batho.yaml': dependency.stdlib.languages β Input should be a valid listbefore any work ran (reported in CI via the composite action). Blank hand-edited values (key:with no value) get the same graceful fallback. Workaround while pinned to v1.4.2: delete thelanguages: nullline or set an explicit list β or upgrade to v1.4.3. - Path-containment guard no longer rejects symlinked repo roots: the artifact/cache/bsg path sanitizer compared each resolved config path against the unresolved
root_dir, so a repository root reached through a symlink (macOS/tmpβ/private/tmp, CI workspace symlinks) raised a falsePathSecurityError: Unsafe config path ... escaping repository rootfor perfectly ordinary relative paths like.batho/artifact. The root is now resolved once and used for both path joining and containment checking; genuine escapes (symlinks pointing outside the repo) are still rejected.
v1.4.2 β 2026-09-08β
MCP relationship filtering (symbol roles, confidence, direction), entity categories and PROPERTY extraction, the file_connectivity tool, stub-based cross-file traversal, and unambiguous stub IDs.
New Featuresβ
symbol_rolesfilter in MCP tools:graph_query,trace_path, andsearch_entitiesnow accept asymbol_rolesparameter to filter relationships bySymbolRolebitmask (Definition, Import, WriteAccess, ReadAccess, Generated, Declaration, Dynamic, Heuristic). Role names are case-insensitive; OR semantics within the parameter, AND semantics across filters.confidence_thresholdfilter in MCP tools:graph_queryandtrace_pathnow accept aconfidence_thresholdparameter (0.0β1.0) to filter edges by resolution confidence. Exposes the existing 8-tier confidence scoring system directly to AI agents.relation_directionparameter in MCP tools:graph_queryandtrace_pathnow acceptrelation_direction(outgoing,incoming,both) to filter by edge direction.incomingenables "who calls X?" queries without requiring inverse relationship types (CALLED_BY,IMPORTED_BY, etc.), paving the way for their deprecation in Phase 3.- Ambiguous resolution detection: When the graph builder finds multiple equally-plausible target candidates, the edge is emitted with
confidence=0.5,metadata.ambiguous=True, andmetadata.ambiguous_candidates=[...]instead of being silently dropped. Ambiguous edges are preserved for manual review and are never pruned. A newambiguous: 0.50tier was added to_RESOLUTION_CONFIDENCE(now 8 tiers). ambiguous_edge_countingraph_overview: Thegraph_overviewtool now reports the count of ambiguous edges in its stats, computed via Arrow substring pre-filtering for performance.EntityCategoryenum (T01): New 5-value enum (CODE,EXTERNAL,INFRASTRUCTURE,MARKUP,STRUCTURAL) that groupsEntityTypevalues into coarse categories. EveryEntityTypenow has a.categoryproperty. Enables category-level filtering without listing 20+ individual types.- 4 new
EntityTypevalues (T02):CONSTRUCTOR(OO constructors β Python__init__, Java/C#constructor_declaration, TypeScriptconstructor),ENUM_MEMBER(Rustenum_variant, C#enum_member_declaration),PARAMETER(function/method parameters β opt-in),TYPE_PARAMETER(generic type parameters T, K, V β opt-in). All 4 are in theCODEcategory. PROPERTYextraction (T03): Python@propertyand@x.setterdecorated methods are now extracted asPROPERTY(notMETHOD). Setters getmetadata.access_type="write", getters get"read". TypeScriptget/setaccessors and C# auto-properties are also extracted asPROPERTY. Fixed pre-existing C# query compilation bugs (base_clause,accessibility_modifierinvalid node types).entity_categoriesfilter in MCP tools (T07):graph_queryandsearch_entitiesnow acceptentity_categories: list[str]to filter by category name (case-insensitive). Expands to memberEntityTypevalues and combines withentity_typesusing OR semantics. Example:graph_query(entity_categories=["code"])filters to all 18+ code symbol types in one parameter.entity_categoriesinbatho://schemaresource: The schema resource now includesentity_categorieswith their member entity types for MCP client discoverability.file_connectivityMCP tool (T21): File-level dependency connectivity in both directions. Cross-file references (stored as unresolved stubs) are resolved to their defining files and aggregated per file with relation-type counts and confidence. Supportsdirection(outgoing/incoming/both),include_external, andmin_confidenceparameters. Default-enabled.- READS/WRITES relationship types (T09):
ref.readandref.writecaptures now emitREADS/WRITESrelationship types instead of the legacyREFERENCEStype. LegacyREFERENCESedges are reclassified toREADS/WRITESby theirSymbolRoleon every construction path (model validator), so old artifacts load with correct types. - Deprecated inverse relationship types (T15):
CALLED_BY,IMPORTED_BY,REFERENCED_IN, andCONTAINED_WITHINare deprecated β use the forward type (CALLS,IMPORTS,READS,CONTAINS) withrelation_direction="incoming"instead. Legacy edges are reclassified (forward type + swapped endpoints,metadata.reversed=true) on model construction and on the MCP raw-row read path (graph_query,get_entity,get_file_graph,trace_path,file_connectivity), so fresh and legacy artifacts behave identically.relation_types=["CALLS"]now matches legacyCALLED_BYrows. - Stub-based cross-file traversal (T20):
graph_queryandtrace_pathresolveunresolved:stub targets to their defining files/entities, so cross-file references participate in direction filtering and BFS path tracing without a rebuild. - Indirect call detection (T10): Bare-identifier indirect calls (
map(func, xs)) emitCALLSedges withconfidence=0.7andmetadata.indirect=True, with soundness guards: parameter/local shadowing suppresses false edges, and same-named callables are disambiguated by caller scope (ambiguous names emit no edge). entity_typesfilter case-insensitivity:graph_queryandsearch_entitiesnormalizeentity_typesvalues to uppercase, matching the existingrelation_typesandentity_categoriesbehavior (entity_types=["function"]now works).batho://schemadeprecated types: The schema resource now listsdeprecated_entity_typesanddeprecated_relation_typesfor the T14/T15 deprecation contract.- Dot-normalized stub ref keys: Contextual stub IDs (
unresolved:<caller_scope>::<ref_key>) now dot-normalize the ref key (::β.), so the::scope separator is unambiguous for languages whose reference text contains::(Rust paths likestd::io::Write, Ruby constant paths likeFoo::Bar). Display names and metadata keep the caller-written spelling. - Rust std roots in the stdlib bucket:
core,alloc, andproc_macrojoinstdin the resolver's stdlib prefixes. The module-index longest-prefix match runs first, so an indexed local module with one of these names always wins.
Extractionβ
- Kotlin query rewrite: The Kotlin query was rewritten with positional captures (the grammar has no
namefields β field-name references silently disabled the whole query). Addsobject_declarationcoverage for methods and properties, enum-entry (ENUM_MEMBER) capture, and interface reclassification (interface Xnow yields anINTERFACEentity instead ofCLASS). - Contextual stubs are
EXTERNAL_SYMBOL(T13): Unresolved cross-file reference stubs are emitted asEXTERNAL_SYMBOLentities with a stableunresolved:entity-ID prefix (theUNRESOLVEDentity type is deprecated). LegacyUNRESOLVEDentities are remapped toEXTERNAL_SYMBOLon deserialization (T14, along withATTRIBUTE,GLOBAL_STATEMENT,IMPORT_BLOCK).
Storageβ
- New Arrow IPC columns:
rels_viewstable now includesroles(int32) andconfidence(float32) columns, both nullable for backward compatibility with older artifacts. The writer populates them withint(rel.roles)andfloat(rel.confidence)respectively (defaulting to 0 and 1.0 when absent).
Configurationβ
extraction.extract_parameters(default:false): Opt-in flag to extract function/method parameters asPARAMETERentities. Disabled by default to avoid entity-count inflation.extraction.extract_type_parameters(default:false): Opt-in flag to extract generic type parameters asTYPE_PARAMETERentities. Disabled by default.- Both flags are documented in
batho.yaml.exampleanddocs-site/docs/getting-started/configuration.md.
Performanceβ
- Arrow compute filters in
trace_path:symbol_rolesandconfidence_thresholdfilters are applied viapc.bit_wise_andandpc.greater_equalbefore materializing to Python, avoiding full-tableto_pylist()on large repos. - Substring pre-filter for ambiguous count:
graph_overviewusespc.match_substring(metadata_json, '"ambiguous"')to narrow candidates before JSON-parsing only the matched subset. - Lazy ambiguity detection: Ambiguity is detected via a cheap set-difference on pre-computed candidates β no re-resolution needed. Zero overhead in lazy mode (stubs resolved on-demand).
- EndpointResolver column projection: Index building projects only the needed Arrow columns (
entity_id/file_id/name;file_id/target_id/relation_type/confidencefor cross-file edges) and pre-filters CONTAINS rows via Arrow compute instead of full-tableto_pylist()per generation. - graph_overview stub count: The "External dependencies significant" pattern counts contextual stubs via an Arrow
starts_withfilter on theunresolved:entity-ID prefix (the legacyUNRESOLVEDtype key is always 0 in new artifacts).
Bug Fixesβ
- Parsing config propagation (
c46e8dc5):ASTExtractornow has aset_parsing_config()method, andregistry.set_parsing_config()updates already-cached extractor instances. The pipeline (codegraph.py) now wiresExtractionConfig.extract_parametersandextract_type_parametersinto the parsing config dict. Previously, these flags were never applied in production builds (only in directcreate_extractor()unit tests). - C# query compilation: Fixed invalid
base_clauseandaccessibility_modifiernode types inCSHARP_QUERYthat caused silent query compilation failures. - AST cache variant consistency (
dc2f0e61):index_filenow derives its AST cache variant from the same merged parsing config (bsg.parsing + extraction flags) as the parallel pipeline, so flags-ON entries can never be served to a flags-OFF build. - Arrow store stub exclusion (
83e6c290): Dangling-reference resolution no longer resolves names tounresolved:-prefixed stub entities. - Rust/Ruby scoped refs resolve correctly: Scoped ref text no longer collides with the stub-ID separator β stdlib refs such as
std::io::Writenow classify asexternal_stdlib(rootstd) instead of landing inunresolved_stubs, and scope-aware name fallbacks retain module context. Legacy artifacts keep their previous (last-segment) behavior until a rebuild. - Single stub-ID parse helper: All stub-ID
::parsing now flows throughstub_fqn()inentity_resolution.py;file_connectivity's stdlib extraction and the arrow-store blob patcher share the same semantics (the legacysplit(":")[1]probe compared the caller scope and could never match a scoped stub). file_connectivityviais direction-aware:depends_oncells name the referenced (remote) symbol;depended_on_bycells name the referencing (caller-side) symbol. The markdown renderer now actually renders(via ...)β it previously read a non-existent top-levelviakey and never showed one.
Documentationβ
- Updated
mcp/tools-reference.mdwith new parameters forgraph_query,trace_path,search_entities, and a new "Relationship Filtering" section documenting symbol roles, confidence tiers, and direction filtering. - Updated
mcp/index.mdTool Matrix with new filter parameters. - Updated
whitepaper/code-graph.mdconfidence scoring table with theambiguous: 0.50tier and ambiguous resolution behavior. - Added
file_connectivityto the MCP tool matrix and tools reference; tool counts updated to 20 total (16 default-enabled). mcp/tools-reference.mdfile_connectivityentry documents the direction-awareviasemantics and theexternal.stdlibroot extraction.whitepaper/code-graph.mddocuments the stub-ID format (unresolved:[<pkg> ]<caller_scope>::<dotted_target_fqn>) with the dot-normalization and legacy-artifact notes.
Testsβ
- 1314 tests (up from 1052). Added
test_symbol_roles_e2e.py(16 tests),test_confidence_threshold_e2e.py(16 tests),test_relation_direction_e2e.py(13 tests),test_t02_entity_types.py(12 tests),test_t03_property_extraction.py(15 tests),test_t07_entity_categories.py(19 tests),test_file_connectivity.py(18 tests),test_entity_resolution.py(27 tests),test_review_fixes.py(13 tests),test_review_round2_fixes.py(22 tests),test_review_round3_fixes.py(16 tests),test_review_round4_fixes.py(12 tests),test_stub_ref_key.py(10 tests),test_phase2_schema_upgrade.py(28 tests), andtest_language_capture_parity.py(20 tests); addedTestStubFqn/TestRustStdlibStubsintest_entity_resolution.pyandTestStubTargetMatchesintest_bsg_scratch_store.py; extendedtest_graph_query.py,test_graph_overview.py,test_phase4_pruning_confidence.py,test_phase5_performance.py, andtest_rust_go_contains.py.
v1.4.1 β 2026-08-26β
File watcher engine, registry v2/v3 schema, MCP tool gating, 9 new lifecycle tools, networkx migration, review hardening, thread safety, path sanitization, atomic writes, and performance optimizations.
New Featuresβ
- File watcher engine (
batho/mcp/watcher.py):BathoWatcherEnginemonitors watched repositories for filesystem events usingwatchdog, debounces rapid changes, and triggers automaticbatho patchruns. Configure per-repo viaadd_repo(watch=true, debounce_ms=2000). - Registry v2/v3 schema:
RepoEntrynow includesid(uuid4 hex),mode(local|github),branch,status(not_indexed|indexing|ready|stale|error),last_built_at, andcreated_atfields. v2 entries are auto-migrated on load: stable IDs generated, status derived from on-disk artifact, migration persisted. Addedget_by_id()andupdate_status()registry methods for dashboard keying and build lifecycle tracking. - MCP tool gating (allowlist/blocklist): Secure-by-default tool registration β 4 admin tools (
batho_build,batho_export,batho_load,batho_gc) are disabled by default. Enable viabatho.yaml(mcp.tools.disabled: []),mcp.tools.enabledallowlist, or--enable-toolCLI flag. See Tool Gating. - 9 new lifecycle MCP tools:
batho_status,batho_list_runs,batho_diff,batho_patch,batho_fix(default-enabled) +batho_build,batho_export,batho_load,batho_gc(opt-in). Total tool count: 19 (15 default + 4 admin). - networkx replaces leidenalg/igraph: Community detection migrated from
leidenalg/igraph(GPL/non-Apache licenses) tonetworkxgreedy modularity clustering for Apache-2.0 license compatibility.
Bug Fixesβ
- Watcher engine deadlock (
d484150):BathoWatcherEngine.stop()could deadlock when the observer thread was actively processing an event. The observer's dispatch lock andself._lockcould form a classic deadlock. Fix: pop the watch entry and cancel the debounce timer under the lock, but stop/join the observer outside the lock. - Thread safety in graph mutations:
InMemoryGraph._lockupgraded fromLocktoRLock;remove_entities_for_fileandadd_entities_for_filenow wrap mutations inwith graph._lock:for atomic multi-entity updates without deadlocking. - Path sanitization in MCP tools: Replaced naive
str.replace("\\", "/")with_canonicalize_untrusted_path()ingraph_overview,graph_query,get_file_graph, andbatho_difffor proper canonicalization per the path sanitization ADR. - Config validation fail-fast:
get_config_with_rootnow raisesRuntimeErroron invalid config instead of silently backing up and overwriting the user'sbatho.yaml. - Atomic resolution cache writes:
ResolutionCachemetadata writes now usetempfile.mkstemp+os.replaceto prevent cache corruption on interruption. - AST cache mtime invalidation:
AstCache.getnow accepts an optionalmtimeparameter to detect stale entries even when content hash matches. - Unicode identifier extraction:
extractor.pyandfallback_parser.pyregexes updated from[a-zA-Z_]to[^\W0-9]for PEP 3131 compliance, preserving non-ASCII identifiers. - Case-insensitive XML entity detection:
manifest_parser.pynow uppercases content before checking for<!ENTITY/<!DOCTYPE, matching XML's case-insensitive grammar. - Unified cache field types:
is_indexedchanged frominttobool;last_run_idrenamed tolast_run_uuidto match the actual schema. - Bundle reader zero-copy preservation: Removed redundant sort in
BathoBundleReader(writer already sorts byfile_id); index now handles non-contiguousfile_idranges with multi-slice support. - Blob repairer memory:
blob_repairer.pynow usespa.ipc.new_filewith a table directly instead ofto_pylist(), avoiding unnecessary row materialization. - Tool removal fix:
remove_reponow usesapp.local_provider.remove_tool()instead ofapp.remove_tool()for correct FastMCP cleanup.
Security Hardeningβ
- Tamper-evident audit log:
FixContextaudit entries now includeprevious_hashandhashfields forming a SHA-256 chain, enabling tamper detection. - Security audit flag gating: BSG plugin hit collection in
apply_bsg_rules_to_entitiesis now guarded behindsecurity_audit_enabled, avoiding unnecessary work when the flag is off.
Performanceβ
- Early stream cleanup:
store.cleanup_streams()moved before community detection inbuild.pyto free memory earlier in the pipeline. - Hot path optimizations (
19ac506):- FIX 3: Cache per-file variableβtype mappings in
resolve_contextual_stubsto avoid O(E) re-scans per stub. - FIX 9: Replace O(M) method scan per Rust impl block with
bisect_left+ forward scan (O(log M + k)). - FIX 10: Precompute per-file import lookup structures (
from_symbol_to_moduledict,non_from_moduleslist,imported_namesset) once instead of O(I) scan per reference node. - FIX 15: Pre-lower content patterns at
RuleMatchconstruction to avoid repeated regex compilation.
- FIX 3: Cache per-file variableβtype mappings in
Other Changesβ
schema_versioninConfignow usesLiteral["batho-config.v1"]for stricter validation.- Python version capped to
<3.14;watchdogminimum relaxed to6.0.0. - Added error
hintparameters to_err()calls inbatho_export,batho_diff,batho_gc, andbatho_fixMCP tools. - Documentation: added
graph,community_detection, andmemoryconfig sections; documentedwatch,debounce_ms,max_file_size_kbparams foradd_repo. - Added
CITATION.cffto the bump-version script's file list for future releases. - Fixed
CHANGELOG_PATHNameErroringenerate_changelog_entry.py. - 1052 tests (up from 864).
v1.4.0 β 2026-08-04β
Stdlib expansion, graph builder phases 4-5, BSG interceptors, and security/performance hardening.
New Featuresβ
- Stdlib expansion to 27 languages: Standard library symbol tables now cover 27 languages (up from 5), including C/C++, Java, Ruby, C#, PHP, Kotlin, Swift, Scala, Dart, Haskell, Lua, R, Perl, Julia, Zig, Bash, Objective-C, Erlang, OCaml, Hack, and Verilog.
- Multi-ecosystem dependency introspection: Live introspection now supports five package ecosystems β Python (venv), npm (
node_modules/), Cargo (~/.cargo/registry/), Go modules (~/go/pkg/mod/), and Maven (~/.m2/repository/) β with package-name validation on all ecosystems to prevent path traversal. - Graph builder Phase 4 β Confidence scoring: Every resolved stub is tagged with a
resolution_confidencescore (0.0β0.95) andresolution_strategylabel across 6 tiers, enabling downstream consumers to filter by confidence level. - Graph builder Phase 4 β Conservative pruning: Unresolved stubs targeting common stdlib method names on unknown receiver types are pruned instead of left as false gaps, reducing graph noise.
- Graph builder Phase 5 β Receiver-type inference: Method calls are resolved by inferring the receiver variable's declared type from scope, following the rust-analyzer two-phase resolution pattern.
- Graph builder Phase 5 β Lazy resolution: When
lazy=True, stubs remain pending and are resolved on-demand viaresolve_stub_on_demand(), avoiding unnecessary work for stubs that no query will ever reference. - 9 BSG interceptor plugins enhanced: API Contract Guardian, Auth Boundary Shield, Dependency Blast Radius, Hardcoded Secret Catcher, IaC Drift Sentinel, N+1 Query Catcher, Resource Leak Preventer, Schema Migration Enforcer, and Silent Failure Catcher updated with improved detection patterns.
Security Hardeningβ
- Custom rules path sanitization:
_resolve_custom_rules_pathnow routes throughbatho.utils.path_sanitizer.sanitize_path, rejecting traversal and unsafe absolute paths. - Log file path sanitization:
configure_loggingsanitizes the configured log file path before creating directories or opening a FileHandler. - Non-Python introspector validation: All language introspectors (npm, Cargo, Go, Maven) now validate package names with
_is_safe_dependency_nameand use safe-join path construction.
Bug Fixesβ
- External symbol double-write: Removed duplicate
EXTERNAL_SYMBOLentity insertion in the build pipeline that inflatedentity_countmetrics and produced duplicate Arrow rows. - Atomic scope manager cache writes: Scope manager cache IPC is now written to
.tmpfiles and atomicallyPath.replaced into place, preventing partial writes on interruption. - Agent views filtering in patch:
agent_viewstable is now filtered withpyarrow.computebeforeto_pylist(), materializing only needed rows and reducing RSS on large repos.
Other Changesβ
- Capped
structlogdependency to<26to prevent breaking changes. - Added stdlib resolution benchmark (
benchmarks/bench_stdlib_resolution.py). - Added 9 new test modules covering stdlib expansion, pipeline serialization, sentinel cache, graph phases 4-5, and incremental synthetic paths.
- 864 tests (up from 609).
v1.3.2 β 2026-07-27β
- H2: Hardened path sanitization with shared canonicalization helper (
_canonicalize_untrusted_path) to reject encoded, Unicode, and null-byte traversal vectors acrosssanitize_path,safe_join,sanitize_diff_path, andis_safe_filename. - H5: Added Unicode identifier support for Python and JavaScript entities in extraction and hierarchical descriptors; fallback parser regexes now match PEP 3131-style identifiers.
v1.3.1 β 2026-07-22β
Bug fixes and MCP UX improvements.
Bug Fixesβ
- CLI root resolution crash:
batho_cli.pyno longer crashes when--rootis omitted or passed as a string.args.rootis now wrapped inPath()and checked forNonebefore calling.resolve(). - MCP test isolation:
test_repos_resource_no_registrynow usesregistry_path=tmp_pathinstead of reading the real~/.batho/mcp-repos.json, preventing failures when a local registry exists.
MCP UX Improvementsβ
- Entity ID visibility:
search_entities,format_concise, andformat_detailedmarkdown output now include entity_ids in backticks, enabling agents to copy-paste them intoget_entityandtrace_path. - Name-based lookup fallback:
get_entityandtrace_pathnow accept display names as fallback when an exact entity_id is not found. If the name uniquely matches, it resolves automatically. If multiple matches exist, a disambiguation list with entity_ids is returned.
Testsβ
- 9 new tests in
tests/mcp/test_entity_lookup.pycovering entity_id visibility and name-based lookup. - Updated
tests/mcp/test_dual_output.pyto reflect that entity_ids are now intentionally included in markdown. - Total: 609 tests passing.
v1.3.0 β 2026-07-22β
Arrow graph backend, build metrics accuracy, memory optimization, and documentation cleanup.
New Featuresβ
- Arrow Graph Backend: Columnar memory-mapped graph storage (
ArrowGraph) as an alternative to the defaultInMemoryGraph, enabling streaming compaction for large codebases without holding the entire graph in RAM. - Graph Backend Auto-Selection: Heuristic-based backend resolution using file count and estimated entity count thresholds (
auto_threshold_files=500,auto_threshold_entities=30,000). Automatically selects Arrow for large repos. - Graph Backend Protocol: Formal
GraphBackendprotocol defining the contract between in-memory and Arrow backends. - Public API Exports:
ArrowGraphandcreate_graphnow exported frombathotop-level package.
Bug Fixesβ
symbol_index_sizereporting: AddedScopeManager.global_symbol_countproperty to accurately report total global symbols across all partitions instead of reporting 0.- Unresolved stub resolution counts:
resolve_contextual_stubsnow returns(resolved_count, unresolved_count)tuple, propagated tobuild_statsfor accurate metrics. - Self-loop cycle detection false positives:
find_cyclesnow skips self-loops only forIMPORTSrelationships (where they're noise), preservingINHERITSself-loop detection (which indicates real circular inheritance). - Negative RSS recovery logging:
gc.collect()that increases RSS now logs a warning instead of info, with a descriptive message about memory pressure.
Performanceβ
- Memory optimization in extraction pipeline:
agent_blobandstorage_blobare stripped fromraw_resultsafter being streamed viaresult_callback, preventing ~1.6 GB of redundant blob retention during graph materialization on large repos. - Worker log suppression:
load_effective_rulesacceptsquiet=Trueto suppress info-level logging in worker processes, eliminating log spam during parallel extraction. - RSS flush log spam reduction:
rss_flush_released_memorynow only logs when memory was actually recovered (> 0) or when RSS increased (< 0), silencing no-opgc.collect()calls that recovered 0 MB.
Configurationβ
- Updated default memory thresholds:
warning_threshold_mbraised to 800 MB,critical_threshold_mbto 1,500 MB,rss_flush_threshold_mbto 1,000 MB β better suited for large codebase indexing.
Documentationβ
- Stale SQLite references cleanup: Replaced all legacy "SQLite" references in docstrings and comments with accurate terminology ("AST cache (flat-file msgpack)", "Arrow Bundle") across 15 source and test files.
Testsβ
- 600 tests (up from 507) β new tests for Arrow graph backend, graph factory, backend config validation, and graph consistency.
v1.2.1 β 2026-07-20β
Bug fixes, concurrency safety, and documentation alignment.
Bug Fixesβ
- Critical:
patch.pyNameError on delete-only runs βindexervariable was only defined inside theif added_or_modified:block; delete-only patch runs crashed withNameError. Fixed by initializingindexer = Noneand guarding thegetattrcall. RepoRegistryrace condition βadd()andremove()performed loadβmutateβsave without locking. Concurrent MCP tool calls could lose entries. Fixed withthreading.Lockand atomic file writes.ResolutionCachenon-atomic writes βput_symbols()and_save_index()wrote directly to cache files without temp+rename. Crash during write could corrupt the cache. Fixed withtempfile.mkstemp+os.replacepattern.
Improvementsβ
graph_overviewtruncation indicator β Truncated output now appends a visible notice to the markdown, matchinggraph_queryandget_file_graphbehavior.get_file_graphcross-file ref performance β Replaced per-entitypc.equal()loop with singlepc.is_in()batch filter.graph_overviewfile entity counts β Fixed hardcodedentities: 0in file list; now computes actual entity counts per file from the agent table.- Dependency introspector input validation β Added package name regex validation before subprocess execution.
- Git subprocess hardening β Added
GIT_PAGER=catto environment to prevent pager invocation.
Documentationβ
- Updated all version references from
v1.2.0tov1.2.1across whitepaper, CI/CD, configuration, and test docs.
v1.2.0 β 2026-07-05β
MCP server, multi-repo registry, and community detection β Batho becomes an AI agent platform.
New Features & Enhancementsβ
- MCP Server (
batho mcp): FastMCP-based stdio server exposing 10 core tools for AI agents to query the code graph (expanded to 19 tools in v1.4.1 β see Tools Reference):graph_overviewβ high-level codebase summary with entity counts, relationships, and communitiesgraph_queryβ filtered graph query by file, entity type, relation type, or name patternget_entityβ detailed info for a single entity with relationships and optional source codetrace_pathβ shortest dependency path between two entities (BFS traversal)get_file_graphβ all entities and relationships within a single filesearch_entitiesβ substring/regex search across entity namesget_deltaβ incremental changes from the latest patchlist_repos/add_repo/remove_repoβ multi-repo registry management
- Multi-Repo Registry: JSON-based registry at
~/.batho/mcp-repos.jsonβ one MCP config entry serves all repos. Register repos at runtime viaadd_repotool. - Community Detection: Greedy modularity clustering via
networkxβ automatically groups related entities into communities for codebase overview. - Dual-Output Architecture: All MCP tools return both markdown
content(model-facing, ~34% fewer tokens) and JSONstructuredContent(machine-facing). - Token Budget Truncation: Configurable
max_tokensparameter on graph tools with automatic truncation and reporting. - MCP Prompts: Workflow-specific prompt templates for agent onboarding (
explore_codebase,understand_function,analyze_file,trace_dependency,review_changes,impact_analysis,architecture_overview). - MCP Resources: Static schema and dynamic repo-list resources accessible via URI references.
- Structured Error Handling: Typed errors (
CLIENT_ERROR,EXTERNAL_ERROR) with retry hints and actionable messages. - SKILL.md: AI agent setup skill file for automated global install, MCP configuration across Claude Desktop, Cursor, Windsurf, and VS Code.
- GitHub Actions Fleet Indexer: Automated code graph indexing workflow with incremental patching on every push/PR.
- New CLI Command:
batho mcpβ starts the MCP server (8th CLI command). - New Dependencies:
fastmcp>=3.4.0,networkx>=3.0,watchdog>=6.0.0
Testsβ
- 507 tests (up from 381) β 126 new MCP tests covering tools, prompts, resources, registry, community detection, token budget, and error handling.
v1.1.0 β 2026-06-10β
Refactored v1.1.0 release focusing on unified configuration, performance, and CLI simplicity.
New Features & Enhancementsβ
- Unified Configuration: All settings consolidated into a single
./batho.yaml(seebatho.yaml.examplefor the complete schema). - Arrow IPC Bundle Storage: Relational data and symbol indices are serialized in high-performance Arrow IPC table formats directly in the
.batho/artifact/directory. - Lossless Bidirectional Traversal: Graph-to-code reconstruction supported via
SYNTAX_GLUEentity preservation and cryptographic hash validation. - Simplified CLI Interface: Restructured the toolchain into exactly 7 command entrypoints:
buildβ baseline repository builds.patchβ native content-hash-based incremental indexing.exportβ JSON and pack ZIP exports.fixβ database diagnostic and auto-repair routines.diffβ node-level evolution history.gcβ garbage collection, Sweeping, and vacuums.loadβ unpack transport ZIPs.
Removalsβ
- Subsystem Removal: Removed the legacy Web Dashboard, REST API Bridge, MCP Hub Context Server, and client-side Git Hook automation to focus exclusively on high-performance developer command-line workflows.
v1.0.0 β 2026-05-17β
Initial pre-refactor production baseline.
Featuresβ
- Multi-language AST extraction (40+ languages via tree-sitter).
- In-memory hypergraph with cross-file symbol resolution.
- BSG compression with token-budgeted rendering.
- Time Machine snapshots with incremental patching.
- Pre-refactor subsystems (legacy dashboard, REST bridge, MCP server, git hooks).
- 381 automated tests.