AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Narrowbit: a local, provider-independent coding-agent runtime that gives the model the smallest useful context. Early 0.1 preview.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
A local, context-managed coding agent for your Mac. It plans, reads, edits, runs commands and verifies, keeping a durable local log of everything it does, so a model only ever sees the small slice of context it needs for the next step.
Goal metric: correct coding work per unit of AI usage, not just fewer tokens.README 전문 보기 ↗Website: narrowbit.dev · early 0.1 preview
A local, context-managed coding agent for your Mac. It plans, reads, edits, runs commands and verifies, keeping a durable local log of everything it does, so a model only ever sees the small slice of context it needs for the next step.
Goal metric: correct coding work per unit of AI usage, not just fewer tokens.
@path/to/file in a task reads that file straight into context instead of costing a search turn; attach images or PDFs (Claude, Codex, vision-capable API models) for UI bugs or specs..narrowbit/rewind-trash/ rather than deleted, and files you have staged are left alone.Status: early (0.1). Expect rough edges. See "What is and isn't proven" below.
macOS. The installer checks what you have, asks before installing anything missing (Homebrew, Node), clones this repo to ~/Narrowbit, builds it, puts narrowbit on your PATH and builds the native app:
git clone https://github.com/sanjuraw/narrowbit.git ~/Narrowbit && ~/Narrowbit/scripts/install.sh
Run scripts/install.sh --check first to only see what's missing. The app is installed to /Applications/Narrowbit.app (or ~/Applications if your account cannot write to /Applications). If narrowbit ends up off your PATH (npm's global folder isn't always on it), the installer says so and prints the line to add. It can't sign in for you: to use Claude run claude auth login (or codex login, or add a free API key); the app's "get a model ready" card and narrowbit doctor show what's left.
Manual install: Node ≥ 22.13, then npm install && npm run build && npm link && scripts/build-mac-app.sh --install.
Then in any project folder: narrowbit init, and either narrowbit ui (browser/app) or narrowbit agent "fix the failing test in src/foo.ts".
Updating: the app checks GitHub on launch (and every few hours) and shows an Update available banner; Update now fast-forwards the checkout, reinstalls if dependencies changed, rebuilds (rolling back if the build fails) and restarts. It refuses to touch a copy with uncommitted edits or local-only commits, and only the account that owns the folder can update it. Manual equivalent: git pull --ff-only && npm install && npm run build, then reopen the app.
Built-in skills (in every project's Skills list; click one to drop it into the message box, or narrowbit agent --skill "bug fix" "<what's wrong>"): Bug fix (root cause, reproduce, smallest fix, verify), Code review (correctness, security, tests; changes nothing), Write tests, Refactor (pin behaviour first, small verified steps), Explain this code (read-only walkthrough), Plan a project (risks, phases, a cheap test each; for the planning chat), Research a repository (read it properly, say what was not read), Add a feature (copy the nearest pattern, with tests), Fix a failing CI run, Write a pull request, Update dependencies (one at a time, checks after each), Write documentation (run what you document), Careful changes (say your assumptions, smallest change, touch only what was asked, define the check first; after the habits described in Andrej Karpathy's notes on LLM coding mistakes) and Security review. Save a skill with the same name to override one; add your own with the + next to Skills.
narrowbit agent "<task>" [--provider claude|codex|openrouter|...] [--skill "<name>"] [--boss] [--max-steps N]
narrowbit models choose # pick provider + the three model slots (saved per repo)
narrowbit keys set <provider> # API key, stored in ~/.narrowbit/keys.json (0600)
narrowbit skills add "Bug Fix" "Reproduce with a failing test, fix the code not the test, verify."
narrowbit connectors add github --env GITHUB_TOKEN=... -- npx -y @modelcontextprotocol/server-github
narrowbit limits # Claude / Codex 5-hour and weekly usage
narrowbit agent edits your working tree directly and refuses to start on a dirty tree unless you pass --force. Review the diff before committing.
Every result below names its baseline and how much it rests on. Tasks are real fixes mined from a project's history: start at the commit before the fix with the fix's own tests added (so they fail), and succeed when those tests pass without the agent touching them. The full log, including what did not work, is in docs/history.md.
Hono (TypeScript), all 40 tasks, against native Claude Code, both on Claude Sonnet (history entries 61-63):
| Native Claude Code | Narrowbit | |
|---|---|---|
| Tasks solved | 40 / 40 | 40 / 40 |
| Cost for all 40 | $3.48 | $1.43 (−59%) |
| Uncached input per task (median) | — | −61% |
| Turns per task | 7.1 | 5.2 |
| Task time, median | 16 s | 19 s (slower) |
| Task time, slowest 10% | 28 s | 28 s |
Limits: one repository · one try per task · one model · native measured once on the same day, not repeated · public code the model may have seen · subscription cost is notional (nothing is billed per token) · measured before Claude's structured output became the default, which in a same-run A/B solved 40/40 instead of 39/40 for about 8% more cost.
click (Python), all 43 tasks, against native Claude Code, both on Claude Sonnet (history entries 67-68):
| Native Claude Code | Narrowbit | |
|---|---|---|
| Tasks solved | 43 / 43 | 43 / 43 |
| Cost for all 43 | $5.05 | $3.07 (−39%) |
| Uncached input per task (median) | — | −51% |
| Turns per task | 9.3 | 8.0 |
| Task time, median | 25 s | 36 s (slower) |
Limits: as above, plus Narrowbit's run happened about four hours after native's. Before Claude's replies went through structured output, Narrowbit solved 39 of 42 here; two of its three failures were replies stuck in a loop.
Other providers, same 40 Hono tasks: Codex (gpt-6-sol) 40/40; DeepSeek V4.1 Flash through its API 39/40, about $0.22 for all 40 at list prices. Antigravity and free API models worked but used 2-3× the tokens, and free models solved about 6-7 of 10.
What did not work:
Not proven: other languages and project sizes beyond these, the API adapters beyond DeepSeek, and parallel multi-agent work (untried).
Run the numbers yourself: see "Benchmarking" below.
narrowbit audit (no model, nothing leaves your machine) finds committed secrets, .env files git would commit, and secrets given browser-exposed prefixes; it also runs gitleaks over history if installed. The app runs the same scan when you click Commit and pauses if it finds credentials. The built-in Security review skill asks the agent for the judgement-based checks: access control, data handling, input handling, production hygiene.--allow-commands opts out), and its file access is confined to the project folder, symlinks included.~/.narrowbit/connectors.json (mode 0600) and never sent to the app page. Only add servers you trust.npm install and a build on whatever is on GitHub main. Keep the repo's owners on two-factor authentication.exec and Antigravity's agy don't fully disable their own tools by flag: Codex is sandboxed and its own tool features are switched off; Antigravity runs under a lean custom agent with one inert tool. Claude runs fully tool-free.SECURITY.md).Issues and PRs welcome. npm test and npm run test:ui must pass; none call a model. Read CLAUDE.md first (architecture, rules, current state), and docs/history.md for what was tried and failed, so you don't repeat it. A working rule of this project: every automatic feature needs a measured reason to exist.
init, index [--force], status | incremental index (mtime/size fast-path, then content hash) |
task "<text>" [--budget N] [--print] [--json] [--error-file f] | compile a context package |
inspect, context, expand, close [--success|--failure] | explain selection, show the package, get more context, record the outcome |
symbol, refs, outline, search, grep, tests | deterministic lookups (also exposed over MCP as nb_* tools) |
run -- <cmd> | run a command, get compressed output; raw log kept in .narrowbit/logs |
verify [--full] | type-check + lint + tests focused on changed files, failures only |
memory add <type> "<text>" … | decisions, constraints, conventions, facts, failed approaches, as Markdown in .narrowbit/memory |
train, eval | learn / measure file-ranking weights from git history (local, no model calls) |
benchmark init | run <file> | report | paired A/B benchmarks |
claude "<task>", install claude | the older Claude Code sidecar mode (MCP tools + hook) |
src/ranker.ts, src/package.ts)Used by narrowbit task/claude and by the agent's search; the agent runtime itself does not inject a predicted package (see docs/history.md for why).
The ranker scores files with rule-based signals. The weights are in WEIGHTS and meant to be tuned with eval and benchmark:
router/trie-router/)The package is then filled progressively up to the budget, 8k by default:
It also includes related tests with the focused-test command, the relevant git state and relevant memory. A confidence label (high, medium or low) tells the agent when to treat the selection as hints.
Text the agent stores or re-reads passes through a pattern-based secret redactor (best effort, see SECURITY.md). .env*, keys and credentials are never indexed.
Build a task set from a repository's own history (no model calls):
node scripts/build-tasks.mjs --repo ../hono --out bench-hono.json --max 40 --verify-each --setup "npm ci"
Python repositories work too (pytest, through the repo's .venv when it has one); --setup runs in each worktree, for example to create that .venv.
Each commit that changed source and its tests becomes a task: the agent starts at the parent commit with the commit's tests already applied (so they fail) and must make them pass without touching the tests. --verify-each proves every task is winnable by checking fail→pass with the real fix. Add --with-body to include the commit body in the prompt (usually explains the fix, so off by default).
narrowbit benchmark init # or hand-write benchmark.json
narrowbit benchmark run benchmark.json --dry-run
narrowbit benchmark run benchmark.json
narrowbit benchmark report
claude -p --output-format stream-json in a fresh git worktree at the same commit, with --strict-mcp-config so the user's other MCP servers don't skew either arm, and with arm order alternated between tasks.Add a "context hygiene" baseline arm via arms[].appendSystemPrompt to compare against a tuned native setup. Check that the native arm can actually run the tests: its commands are limited to claudeArgs' allow list, and a test command missing from it quietly turns the run into an unfair comparison.
Markdown notes with frontmatter, one per entry, in .narrowbit/memory/<type>s/ (decisions, constraints, failures, …). Open that folder as an Obsidian vault to browse and edit it; hand-written notes are picked up too. To also read notes you already keep elsewhere, add folders to memoryDirs in .narrowbit/config.json; these are read-only. Retrieval is deterministic keyword/file overlap, with no model calls. V0 JSON memory migrates automatically.
nb_grep (matches tagged with the enclosing function).git diff and grep condensers, plus a guard that never returns something larger than the raw output.src/ holds the modules; CLAUDE.md has the full, current module table. Highlights: runtime.ts (the agent loop), providers/ (model adapters), ui.ts + ui-page.ts (the app), skills.ts, connectors.ts + mcpClient.ts, and the index/ranker/query modules from the original context engine. mac/ is the SwiftPM native window. test/ has a fixture generator and the suite: npm test.
Requires Node ≥ 22.13 (for node:sqlite). Runtime dependency: typescript only.
narrowbit hooks set afterEdit "npx prettier --write \"$NARROWBIT_FILE\"" runs your own command after each edit the agent applies; afterTask runs when a task ends (with $NARROWBIT_OUTCOME). 30 second limit, a failing hook never stops the task, and the agent is told when a hook failed or rewrote the file it just edited. A hook that a repository ships in its own settings only runs once you have accepted it.narrowbit schedule add nightly --task "Run the tests and fix what failed" --every day --at 02:00. Every run is unattended and careful: a separate copy of the project (nothing in your folder changes until you press Apply), only the project's own checks and read-only commands, nothing in a project you haven't trusted. The app runs due schedules while it is open; narrowbit schedule install adds a macOS timer (launchd, every 10 minutes) so they also run when it is closed, narrowbit schedule uninstall removes it. Listed, with a "Run now" button, under Models & settings.gh CLI you are signed in with), open a pull request from the app (two clicks), see whether its checks are running, passed or failing, and turn failing checks into a task.localhost dev server only), with the usual dev-server ports offered as one-click choices. It is sandboxed, gets no referrer, and never shows this app's own address.--isolate, or the Isolate toggle): the agent works in a separate git worktree; you press Apply (or run narrowbit apply <task>) to bring the changes into your folder, or Discard.narrowbit rewind <task> [checkpoint], or a Rewind here button in the app): restores your folder to a checkpoint taken before the task or after any of its edits, deleting anything created since. Built on plain git plumbing; never touches your commit history.@ mentions: name a file in your task text and it's read straight into context, no exploration turn needed. The composer autocompletes as you type.--attach a.png,b.pdf — useful for pointing at a UI bug from a screenshot.narrowbit models set scout provider:model, or the app's Scout dropdown). Off by default — see "What is and isn't proven" for when it helped and when it didn't.SKILL.md, a folder or a repo (you read it before saving), or save a finished chat as a skill.context ~N button showing exactly what the model was sent for it.