| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Needle is a local-first task router and proof-gated semantic cache for coding agents. It moves bounded repository work away from an expensive frontier model, validates the resulting evidence, and reuses that evidence only while it remains fresh and sufficient.
Warning
Pre-alpha developer preview. Needle is an active source project for inspection, experimentation, and contribution. It is not a supported production tool, and its interfaces, storage, configuration, and behavior may change without compatibility guarantees.
Project status · Roadmap · Documentation · Contributing · Security policy · Benchmark evidence
Frontier coding models are capable, but repository discovery can consume a large portion of their context and cost. Needle treats that work as a bounded request that can be routed to a smaller supervised worker. When the same validated knowledge is useful again, a proof-gated cache can avoid the worker as well.
The product has two economic layers:
Needle is not a coding client, code graph, search engine, language server, or replacement for the main model. Those systems can provide discovery tools; Needle owns routing, validation, reuse, and bounded continuation.
flowchart LR
U["User task"] --> M["Frontier model"]
M --> N["Typed need"]
N --> R{"Proof-gated resolver"}
R -->|"Fresh sufficient proof"| F["Bounded FrontierView"]
R -->|"Missing obligations"| W["Supervised worker"]
W --> V["Trusted validation"]
V --> C["Certified artifact cache"]
C --> F
F --> M
M --> A["Final answer"]
The main model can declare a need through the development-only unversioned @@need lifecycle protocol or call the structured need_context MCP tool. Both transports compile to the same semantic domain model. Before returning cached context, Needle checks exact subject identity, semantic world, dependency freshness, contradictions, residual intent, and obligation coverage.
See Project status for current maturity, evidence levels, capabilities, and milestones.
Needle publishes reproducible reports for the observations used to evaluate routing and reuse. Each report records the task, source snapshot, models, pricing basis, observed result, and limitations.
| Evidence | Observed result | Boundary |
|---|---|---|
| Routing and cache calibration | One locate.implementation sample used one miss worker and a zero-worker CoverageHit; observed routing, cache, and end-to-end reductions were 74.41%, 57.24%, and 89.06% | Single pinned task; not statistical |
| Structured MCP cache hit | One authoritative three-artifact CompositeHit, zero worker, zero main discovery, final answer present | Functional live calibration; no counterfactual |
| Partial and cross-route reuse | One worker computed only FocusedTests; the following tests.relevant request reused it with zero worker | Functional live calibration; no powered savings claim |
| Claim reuse performance | Warm ClaimHit p95 remained below 5.36 ms on the recorded Windows host | Offline host-specific measurement |
Earlier routing and cache observations remain useful as calibration of an earlier product boundary. They do not establish claims about the current proof kernel. See Benchmarking for the comparison contract and the evidence index for accepted reports.
Read Security and approvals before changing a worker, command, or apply boundary.
This is a source-development workflow, not an installation guide. A clean clone must build the frontend before compiling the Rust binary because the binary embeds crates/needle-app/web/dist.
Requirements:
cd crates/needle-app/web
npm ci
npm run build
cd ../../..
cargo build --locked --workspace
cargo test --locked --workspace
The packages intentionally remain publish = false. Do not depend on the CLI, database schema, MCP schema, or configuration as a stable interface.
Continue with Developer setup for profile initialization and serving, and see Development and troubleshooting.
Needle is organized as a five-crate Rust workspace:
| Crate | Responsibility |
|---|---|
| needle-core | Semantic protocol, domain objects, contracts, and bounded plans |
| needle-runtime | Persistence, resolution, orchestration, sandboxing, and approvals |
| needle-platform-codex | Codex hooks, App Server client, worker transport, and compatibility |
| needle-bench | Evidence fixtures, accounting, gates, and performance measurements |
| needle-app | CLI, resident runtime, MCP server, web control plane, and experiments |
AI may assist analysis, code, tests, and documentation. A human contributor must read and understand the complete change, verify every claim, finalize the commit and pull-request text, and personally perform commit, push, and pull-request publication. See CONTRIBUTING.md for the complete policy.
Needle is available under the Apache License 2.0.
| Back | FazBrowse Home | New Git URL |