feat: agent-native bridge — drive CrickNote from Claude Code / Codex via CLI#3
Merged
Conversation
…e chat runtime) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ep-list, semantic rank in phase 1, reindex rewrite, reservation lifecycle) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…mpt ordering - Use resolveVaultPath for symlink-safe path resolution in worker, vault, context-assembler, and related tools (stat before read; reject symlinks) - Register ingestion 'error' listener before start() to avoid unhandled events - Reorder system-prompt layers so Zotero workflow takes priority over the vault-native reading workflow when Zotero is enabled - Add path-hardening and context-assembler tests; cricknote-workflows integration test Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…free module Moves the regex helper out of worker.ts (which transitively loads chokidar and the embedding model) into a standalone ignore.ts with no heavy deps, so it can be imported by the CLI dispatcher and future indexer without side-effects. worker.ts re-exports the name for full back-compat. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…walker Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…versal catch Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pull the nine tool-factory calls out of the AgentRuntime constructor into a standalone buildToolRegistry() factory so the forthcoming CLI dispatcher can obtain an identical tool surface without constructing an LLM provider or requiring an API key. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… as-never cast Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ervation path Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t reservation rollback Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…light runTool() wraps buildToolRegistry, handles unknown-tool/bad-JSON errors, dispatches single pending_edit and pending_edits batch shapes through applyPendingEdit, and enforces vault-boundary preflight before any write. listToolCatalog() exposes the full tool surface for CLI enumeration. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…reflight Guard args parsing against null/array/scalar JSON values; add three regression tests. Add vault_write apply integration test confirming the in-vault preflight happy-path; document in a comment that the out-of-vault branch is defense-in-depth (all existing tools pre-resolve paths via resolveVaultPath before emitting pending_edit, so the branch is unreachable through any current real tool). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…search cycle Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces the old clear-and-restart stub with reindexVault(), which walks the vault, calls indexFileSync for BM25+metadata on every .md file, and removes stale DB rows via deleteStaleNotes — no embeddings, no service. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Removes the embedText/semanticRank/assembleContext block from vault_search. Structured filters + BM25 fully cover lab use cases without model-load latency. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…stale description Remove unused vaultPath from createSearchTools signature and all call sites (build-registry.ts, 3 unit tests, 2 e2e tests). Drop context:'' from the serial fast-path return to match the main path shape. Update vault_search description to reflect BM25-only matching (semantic ranking was removed in task 9). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ormalized deadlines Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, cover NL deadline Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds installAgentAssets() which copies skills/ into .claude/skills/ and .agents/skills/, and writes CLAUDE.md/AGENTS.md to the vault root on every setup run; idempotent re-runs refresh stale copies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an agent-native bridge so Claude Code / Codex can drive CrickNote's existing 35 lab tools directly from the shell, with the Obsidian vault as the source of truth. No MCP server, no chat runtime — a thin CLI over the existing
ToolRegistry.New CLI surface
cricknote tool <name> '<json>'— execute any registered tool; write-tools'pending_editresults are applied through a shared path.--no-applyfor dry-run,--sessionfor audit attribution.cricknote tools— full tool catalog (name, description, JSON params).cricknote reindex— rewritten as a standalone, embedding-free full index (BM25 + metadata).Core mechanism —
applyPendingEditreusesSafeWriterfor atomic write + audit log, then layers reservation finalize, folder changelog, and incremental BM25 indexing. Symlink-safe vault-boundary check viaresolveVaultPath.buildToolRegistryis now shared by the Obsidian runtime and the CLI (single tool surface).Supporting changes
vault_searchno longer loads the embedding model at query time (structured filters + BM25 only) — fast in a one-shot CLI process.task_list/task_completescan a configurable 90-day window (was 14);task_adddeadlines normalized to ISO viachrono-node.node-cron.Agent assets (Phase 2)
CLAUDE.md+AGENTS.md(conventions, tool-first write rule, serial scheme).cricknote setupcopies these into the vault's.claude/skills/and.agents/skills/(merge-safe — preserves a user's own skills).Design & plan
docs/superpowers/specs/2026-06-10-agent-native-bridge-design.mddocs/superpowers/plans/2026-06-10-agent-native-bridge.mdBuilt subagent-driven, one task per commit, each with spec + code-quality review. Phase 3 (pruning the retired runtime/embedder/websocket) is intentionally deferred until the bridge has proven itself in real use.
Test Plan
npx tsc --noEmitcleancreate_project→register_project_counters→create_experiment→vault_append→vault_search(tests/integration/cli-bridge.test.ts)cricknote tools,cricknote tool vault_search,cricknote tool task_add --no-apply(writes nothing)🤖 Generated with Claude Code