Files
boocode/boocode_code_review.md

17 KiB

BooCode — External Code Review & Lift Inventory

Last updated: 2026-05-20

This document tracks every open source repo BooCode references or lifts code from. Pin this so we don't lose attribution and don't re-evaluate the same projects twice.

BooCode is personal/single-user — license compatibility is non-blocking, but the License column is recorded so we don't accidentally inherit an obligation if BooCode ever goes public.


Reference repos

Tier A — actively lifting from / running as sidecar

1. sst/opencode (NEW Tier A as of 2026-05-20)

  • URL: https://github.com/sst/opencode
  • License: MIT
  • Language: TypeScript (Effect-TS service-oriented)
  • What it is: The coding agent Sam uses via Termius/Paseo. Also the source of every algorithm BooCode is porting through v1.15.
  • Why it matters: opencode's packages/opencode/src/session/ is the canonical reference implementation for every part of the inference layer BooCode is rebuilding. We lift the algorithms, not the Effect-TS plumbing.
  • Algorithms lifted so far:
    • session/compaction.ts → v1.11.0 (shipped). usable, isOverflow, select, buildPrompt ported to plain TS. SUMMARY_TEMPLATE markdown skeleton verbatim.
    • session/overflow.ts → v1.11.0 (shipped). 20k COMPACTION_BUFFER constant.
  • Algorithms lifted (queued):
    • session/processor.ts DOOM_LOOP_THRESHOLD=3 → v1.11.6
    • session/llm.ts experimental_repairToolCall → v1.12 (hand-rolled), then v1.13 (via AI SDK)
    • tool/truncate.ts truncation + outputPath pattern → v1.12 (adapted: opaque id, not filesystem path)
    • session/prompt.ts runLoop() outer agent loop → v1.14
    • permission/evaluate.ts wildcard ruleset → v1.15
    • MCP client (transport, tools/list discovery, tools/call) → v1.15
  • What NOT to use: Effect-TS service plumbing. Snapshot/patch system (for tool-edit revert; BooCoder territory if needed). The experimental_native_runtime (AI SDK fallback path). opencode's prompts.
  • Source tag: dev branch on sst/opencode. Note: anomalyco/opencode is a rebranded mirror; use sst/opencode as canonical.

2. nmakod/codecontext

  • URL: https://github.com/nmakod/codecontext
  • License: MIT
  • Language: Go (single binary)
  • What it is: AI-oriented codebase context map generator. Tree-sitter parsing across TS/JS/Go/C++/Swift/Python/Java/Rust/Dart/JSON/YAML. Generates CLAUDE.md-style structured overview. Bundled MCP server with 8 tools.
  • MCP tools exposed: get_codebase_overview, get_file_analysis, get_symbol_info, search_symbols, get_dependencies, watch_changes, get_semantic_neighborhoods (git co-change patterns — no embeddings), get_framework_analysis.
  • Why it matters: Solves the "architect needs a map" problem without embeddings.
  • How we use it: Run as sidecar container in v1.12. Wire its MCP tools into BooCode's inference/tools.ts as static wrappers in v1.12, then re-wire via real MCP client when v1.15 ships.
  • What NOT to use: Nothing. Clean fit.

3. aimasteracc/tree-sitter-analyzer

  • URL: https://github.com/aimasteracc/tree-sitter-analyzer
  • License: MIT
  • Language: Python, MCP server + CLI
  • What it is: Local-first code context engine. Outline-first navigation, ripgrep-based impact trace, no embeddings. 17 languages. Claims 54-56% token reduction via TOON format.
  • MCP tools exposed: get_code_outline, trace_impact, plus structural search/extract tools.
  • Why it matters: Backup analyzer with a different response shape — outline-first scales better than codecontext's full dump on huge files. Impact trace is useful for "what calls this function" without a full graph build.
  • How we use it: Lift the AST query patterns (.scm files) and the outline-first response shape. Can also run as a second MCP sidecar alongside codecontext.
  • What NOT to use: Don't lift the TOON format if it conflicts with shadcn rendering — markdown stays.

4. spirituslab/codesight

  • URL: https://github.com/spirituslab/codesight
  • License: check repo — assumed MIT-ish
  • Language: TypeScript/Node
  • What it is: Static code structure visualization. Symbol extraction, import resolution, call graphs. Detects circular dependencies and dead code (with documented false-positive caveats for customElements.define(), framework entry points, dynamic imports).
  • Why it matters: Gives BooCode a repo_health tool — different from codecontext's "what is this" map. This is "what's wrong with this."
  • How we use it: v1.16. Port the analyzer core (analyze.mjs). Call-graph builder + circular-dep + dead-code detectors into BooCode's tools/repo_health.ts. Drop the VS Code extension shell entirely.
  • What NOT to use: The VS Code wrapper, the "idea layer" feature (requires Copilot or Claude Code wiring we don't want).

5. Aider-AI/aider

  • URL: https://github.com/Aider-AI/aider
  • License: Apache-2.0
  • Language: Python
  • What it is: Git-native AI pair programmer CLI. Pioneered the tree-sitter repo-map + personalized PageRank approach.
  • Why it matters: Authoritative source of per-language tags.scm query files. 60+ languages curated and battle-tested.
  • How we use it: Lift directly: aider/queries/tree-sitter-*.scm — drop into BooCode's analyzer for any language codecontext or codesight don't cover natively.
  • What NOT to use: Don't port repomap.py itself — codecontext supersedes it.

Tier B — patterns / partial lift

6. continuedev/continue

  • URL: https://github.com/continuedev/continue
  • License: Apache-2.0
  • Language: TypeScript
  • What it is: IDE assistant framework. Full RAG pipeline, AST chunking, multi-provider LLM abstraction.
  • Why it matters: One specific drop-in lift:
    1. core/indexing/ignore.tsDEFAULT_SECURITY_IGNORE_FILETYPES. Three-tier matcher (basenames, extensions, prefixes). Going into BooCode's pathGuard to block analyzing .env, .pem, id_rsa, etc.
  • How we use it: v1.11.7. Lift the ignore list, adapt to a path.basename + extension + prefix matcher.
  • What NOT to use: core/indexing/CodebaseIndexer.ts and LanceDbIndex.ts — embedding-based, the path we walked away from.

7. cline/cline

  • URL: https://github.com/cline/cline
  • License: Apache-2.0
  • Language: TypeScript (VS Code extension)
  • What it is: Autonomous coding agent. Pioneered plan/act mode and granular per-tool auto-approve.
  • Why it matters: Pattern source for v1.15 (absorbed into the broader permissions work). Plan/act invariant: in plan mode, write tools hidden from the model's tool registry; in act mode, available but each individual tool can be approval-gated.
  • How we use it: Lift the pattern, not the code. opencode's permission/evaluate.ts wildcard ruleset supersedes cline's mode-enum; cline contributes the conceptual framing (read-only invariant in BooCode v1.x).
  • What NOT to use: Cline's VS Code-specific UI plumbing. The shape is wrong for our stack.

8. plandex-ai/plandex

  • URL: https://github.com/plandex-ai/plandex
  • License: MIT
  • Language: Go
  • What it is: Terminal agent with a pending-changes sandbox. Edits never touch the filesystem until /apply. 2M token context.
  • Why it matters: Reference architecture for BooCoder (v2.0). The "edits queue in a virtual layer, applied atomically" model is the right safety story for write tools.
  • How we use it: Lift the data model: pending_changes table keyed by (project_id, session_id, file_path), with diff content and apply/reject state. Lift the diff / apply / rewind UX vocabulary.
  • What NOT to use: Plandex's 2M-context-window engineering. Our context is bounded by llama-swap.

9. OpenHands/OpenHands

  • URL: https://github.com/OpenHands/OpenHands
  • License: MIT
  • Language: Python
  • What it is: Autonomous coding agent platform. V1 architecture is built on an append-only typed event log + Docker sandbox runtime.
  • Why it matters: Two distinct patterns:
    1. Event-log architecture — superseded by v1.13's parts-table approach (which derives from opencode's part-message model). OpenHands event-log is conceptually similar but different shape.
    2. Sandbox runtime — per-session Docker container for write tools. Closes the /opt:ro mount risk.
  • How we use it: v2.1. Lift the runtime container pattern (HTTP API inside container, BooCoder calls in). Don't port the Python implementation directly.
  • What NOT to use: OpenHands' agent prompts, the full microagent system, the cloud deployment path. Event-log shape (use opencode-derived parts table instead).

Tier C — reference only / partial use / skip

10. cortexkit/aft (actual repo path: ualtinok/aft)

  • URL: https://github.com/ualtinok/aft
  • License: check repo
  • Language: Rust binary + TypeScript plugin
  • What it is: Tree-sitter analysis tools delivered as a Rust binary, communicating with an OpenCode plugin via JSON-over-stdio. Warm-process pattern: one binary per project keeps parse trees in memory.
  • Why it matters: The BridgePool transport model. If our codecontext tool calls get hot (agent loops calling it dozens of times per session), the warm-process pattern is faster than fork-per-call.
  • How we use it: Defer. Profile first. Codecontext sidecar might be fast enough on its own. Revisit if tool-call latency becomes the bottleneck.
  • What NOT to use: The opencode-plugin wrapper. Wrong integration surface.

11. codeprysm/codeprysm

  • URL: https://github.com/codeprysm/codeprysm
  • License: check repo
  • Language: Rust
  • What it is: Graph-based code intelligence: tree-sitter parsing → node/edge graph in Qdrant, embeddings layered on top, MCP server exposes semantic search.
  • Why it matters: Clean node/edge taxonomy: nodes = Container/Callable/Data; edges = CONTAINS/USES/DEFINES.
  • How we use it: Lift the taxonomy only if we end up building our own graph instead of relying on codecontext. The embedding half is the trap we walked away from.
  • What NOT to use: The Qdrant + embedding pipeline. Same anti-pattern as continue's indexer.

12. DeepSourceCorp/globstar

  • URL: https://github.com/DeepSourceCorp/globstar
  • License: MIT
  • Language: Go
  • What it is: Static analysis toolkit for writing code checkers using tree-sitter S-expression queries. YAML interface for simple checkers, Go interface for complex multi-file checkers.
  • Why it matters: Not for the architect tool. Future use only. If BooCoder ever grows a "verify before commit" lane, globstar checkers could be the verification engine: drop YAML checkers into .globstar/, run as a pre-apply gate.
  • How we use it: Park. Not in any current version.
  • What NOT to use: Don't try to use it as a codebase analyzer — it's a linter framework, wrong tool for the architect role.

13. getpaseo/paseo

  • URL: https://github.com/getpaseo/paseo
  • License: AGPL-3.0
  • What it is: WebSocket daemon ↔ client protocol for agent coordination. Already running in your stack (paseo dispatches Claude Code/opencode).
  • Why it matters: Patterns for agent lifecycle, --worktree flag pattern, ECDH/NaCl security model.
  • How we use it: Reference for BooCoder isolation (v2.0/v2.1). Note AGPL — fine for personal, blocks public distribution.
  • What NOT to use: Don't vendor the source. Treat as a peer service.

14. earendil-works/pi

  • URL: https://github.com/earendil-works/pi
  • License: MIT
  • What it is: @mariozechner/pi-agent-core (tool loop + state machine) and @mariozechner/pi-ai (provider abstraction).
  • Why it matters: If we ever want non-llama-swap inference (Anthropic, OpenAI, Mistral direct), pi-ai is the cleanest TypeScript provider abstraction available.
  • How we use it: Defer. v2.x optional batch only.

15. microsoft/agent-framework

  • URL: https://github.com/microsoft/agent-framework
  • License: MIT
  • What it is: Workflow graphs for multi-agent coordination.
  • Why it matters: Conceptual reference for far-future multi-agent orchestration.
  • How we use it: Read the ADRs in docs/decisions/. Don't port code — implementation is Azure/Python/.NET-heavy.

16. microsoft/autogen

  • URL: https://github.com/microsoft/autogen
  • License: MIT
  • What it is: Earlier Microsoft multi-agent framework.
  • Why it matters: Effectively sunsetting in favor of agent-framework.
  • How we use it: Skip. Don't invest in evaluating further.

17. open-webui/open-webui

  • URL: https://github.com/open-webui/open-webui
  • License: BSD-3
  • What it is: Self-hosted LLM frontend.
  • Why it matters: Python/Svelte, wrong stack. RAG pipeline only worth a read if BooLab needs improvement — unrelated to BooCode.
  • How we use it: Skip for BooCode.

Lift catalog — what lands where

Source repo Specific artifact License BooCode destination Version
sst/opencode session/compaction.ts + session/overflow.ts algorithms MIT services/compaction.ts v1.11.0
sst/opencode session/processor.ts DOOM_LOOP_THRESHOLD pattern MIT services/inference.ts doom-loop guard v1.11.6
continuedev/continue core/indexing/ignore.ts DEFAULT_SECURITY_IGNORE_FILETYPES Apache-2.0 Extend path_guard.ts exclusion list v1.11.7
nmakod/codecontext Whole binary (sidecar) MIT New codecontext container, 8 MCP tools wired via static wrappers v1.12
sst/opencode session/llm.ts experimental_repairToolCall pattern MIT services/inference.ts synthetic invalid-tool result v1.12
sst/opencode tool/truncate.ts truncation + outputPath pattern (adapted: opaque id) MIT services/truncate.ts + view_truncated_output tool v1.12
Aider-AI/aider aider/queries/tree-sitter-*.scm (60+ files) Apache-2.0 Fallback grammars for languages not covered by sidecars v1.12 (fallback)
sst/opencode session/llm.ts AI SDK adoption + alpha tool ordering MIT services/inference.ts rewrite v1.13
sst/opencode Parts-message taxonomy (text, tool_call, tool_result, reasoning, step_start) MIT new message_parts table v1.13
sst/opencode session/prompt.ts runLoop() outer agent loop MIT services/inference.ts step-based loop v1.14
sst/opencode agent.steps per-agent step cap MIT AGENTS.md + agents.ts v1.14
sst/opencode permission/evaluate.ts wildcard ruleset MIT new permissions table + matcher v1.15
sst/opencode mcp/index.ts MCP client (SSE transport + tools/list + tools/call) MIT new services/mcp/ module; codecontext re-wired through it v1.15
cline/cline Plan/Act invariant (read-only mode pattern) Apache-2.0 absorbed into v1.15 permissions work v1.15
spirituslab/codesight analyze.mjs — call graph, circular-dep, dead-code MIT-ish apps/server/src/tools/repo_health.ts v1.16
plandex-ai/plandex pending_changes data model, diff/apply/rewind UX MIT New pending_changes table, BooCoder write-tool gating v2.0
OpenHands/OpenHands Sandbox runtime pattern MIT New boocoder container, per-session Docker v2.1
cortexkit/aft (ualtinok/aft) BridgePool warm-process JSON-stdio pattern check Optimization if profile shows fork overhead Deferred
codeprysm/codeprysm Node/edge taxonomy (Container/Callable/Data, CONTAINS/USES/DEFINES) check Reference only if we ever build our own graph None
DeepSourceCorp/globstar Whole toolkit MIT Future verify-before-commit gate for BooCoder Parked
earendil-works/pi pi-ai provider abstraction MIT Multi-provider LLM if pursued v2.x optional
microsoft/agent-framework Workflow graph concepts MIT Conceptual only v3.x

Decisions log

  • Embeddings dropped from BooCode (May 2026). Replaced RAG with file-view tools + sidecar analyzers.
  • opencode promoted to Tier A (2026-05-20). The compaction port (v1.11.0) made it clear opencode is not just "the agent Sam uses" — it's the canonical reference implementation for everything BooCode is rebuilding through v1.15. Five algorithms identified for lift (compaction, doom-loop, repairToolCall, runLoop, permission evaluate) plus truncate.ts and MCP client.
  • Source is sst/opencode dev branch. anomalyco/opencode is a rebranded mirror; do not source from there.
  • Original Batch 11 (aider PageRank port) replaced by codecontext sidecar approach.
  • Original Batch 12 (codebase indexer w/ Harrier) removed. No embedding infrastructure.
  • Original Batch 13 (OpenHands event log) replaced by v1.13 parts table (opencode pattern). Same outcome, different shape.
  • Original Batch 12 (cline plan/act mode) absorbed into v1.15 (opencode permission ruleset). Same outcome, wildcard rules instead of mode enum.
  • Aider's repomap.py port dropped. Codecontext supersedes it. Aider contribution narrows to the .scm query files only.
  • Globstar role re-scoped. Not an architect tool — parked for future verify-before-commit gate.
  • codeprysm role re-scoped. Taxonomy reference only. Embedding half rejected.
  • AI SDK adoption deferred to v1.13. Hand-roll opencode's repairToolCall pattern in v1.12 first.
  • tool_choice='required' confirmed supported by llama-swap (qwen3.6-35b-a3b-mxfp4, 2026-05-20). Repair tool call is viable.
  • anomalyco/sst is a mirror, not a fork. Same applies to anomalyco/opencode. Use canonical sst/sst and sst/opencode sources.