@mandipadk7/kavi
v1.5.3
Published
Managed Codex + Claude collaboration TUI
Downloads
64
Readme
Kavi
Kavi is a local terminal control plane for managed Codex and Claude collaboration.
Current capabilities:
kavi versionandkavi --version: print the installed package version.kavi init: create repo-local.kaviconfig, prompt files, ignore rules, and bootstrap git if the folder is not already a repository.kavi init --home: also scaffold the user-local config file used for binary overrides.kavi init --no-commit: skip the bootstrap commit and letkavi openorkavi startcreate the first base commit later.kavi doctor: verify Node, Codex, Claude, git worktree support, and local readiness.kavi readiness: score the current repo for local-first autonomous mission readiness, with concrete remediation actions across environment, guidance, verification, evidence, memory, and autonomy.kavi update: check for and install a newer published Kavi package from npm.kavi start: start a managed session without attaching the TUI. Add--approve-allto run future Codex and Claude turns with full access and without Kavi approval prompts.kavi open: create a managed session with separate Codex and Claude worktrees and open the full-screen operator console, even from an empty folder or a repo with noHEADyet. Add--approve-allto start in full-access mode.kavi resume: reopen the operator console for the current repo session.kavi summary: show a cohesive session-level view of progress, current changes, recent activity, and landing readiness.kavi mission: inspect the latest or a specific mission, including status, acceptance, and recent checkpoints.kavi mission spec,kavi mission diff, andkavi mission simulate: inspect the compiled mission packet, compare spec revisions or draft prompt changes, and review the mission simulator before execution or replanning.kavi mission confidence,kavi mission attention,kavi mission digest, andkavi mission morning-brief: inspect whether autopilot is safe, what happened overnight, and what needs operator attention next.kavi mission shadow,kavi mission compare,kavi mission arena, andkavi mission select: explore alternative mission strategies, rank shadow branches by score/risk/cost/overlap, and promote the best strategy into the active path.kavi mission policy: inspect or update the active mission's autonomy and recovery controls, including autopilot, auto-verify, auto-land, retry budget, and repair-failure pause behavior.kavi mission recover: apply guided recovery actions such as retrying failed work, resuming autopilot, and re-verifying the mission after operator intervention.kavi missions: inspect the mission list for the current repo session.kavi blueprint,kavi blueprint diff, andkavi blueprint apply: compile a greenfield product blueprint, compare it against the current mission, and promote it into the live mission packet.kavi accept: inspect the acceptance pack for the latest or a specific mission.kavi verify: run the mission acceptance checks that Kavi can execute automatically and persist the result.kavi brain: inspect repo-local project memory captured from prior mission plans, completed tasks, and landed work.kavi brain pack,kavi brain review, andkavi brain distill: inspect phase-aware memory packs, queue stale or contradictory entries for review, and distill noisy Brain entries into stronger canonical knowledge.kavi result: show the current or latest landed outcome as one cohesive result surface, including per-agent output and merged landing details.kavi plan: inspect the current execution graph that Kavi materialized from a planning pass.kavi contracts: inspect typed Codex/Claude contract handoffs, andkavi contract-apply,kavi contract-resolve,kavi contract-dismissmanage them explicitly from the operator surface.kavi receipts,kavi playback,kavi judge,kavi audit,kavi objections, andkavi postmortem: inspect proof-of-work receipts, phase-filtered mission playback, and Quality Court output, including role-specific verifier/contract/integration/risk objections.kavi patterns,kavi patterns studio,kavi patterns benchmark,kavi patterns compose,kavi patterns templates, andkavi portfolio: inspect personal pattern history, benchmark reusable templates, compose portfolio-backed starters, and explore repo-cluster relationships, command habits, and starting-point recommendations across your local portfolio.kavi status: inspect session health, task counts, and configured routing ownership rules from any terminal.kavi activity: show the session as a linear activity stream instead of raw daemon events.kavi route: preview how Kavi would route a prompt before enqueuing it.kavi routes: inspect recent task routing decisions with strategy, confidence, and metadata.kavi paths: inspect resolved repo-local, user-local, worktree, and runtime paths.kavi task: enqueue a task forcodex,claude, orautorouting, with--planand--directto override Kavi's automatic planner decision.kavi retry: requeue a failed or blocked task after operator intervention, resetting its automatic retry budget for the next run.kavi recommend: inspect integration, handoff, and ownership-configuration recommendations derived from live claims, reviews, and routing state, with filters for kind, target agent, and active vs dismissed status.kavi recommend-apply: turn an actionable handoff or integration recommendation into a queued managed task.kavi recommend-dismissandkavi recommend-restore: manage the recommendation inbox without losing the underlying session context.kavi tasks: inspect the session task list with summaries and artifact availability.kavi task-output: inspect the normalized envelope and raw output for a completed task.kavi decisions: inspect the persisted routing, approval, task, and integration decisions.kavi claims: inspect active or historical path claims.kavi reviews: inspect persisted operator review threads and linked follow-up tasks, with filters for agent, assignee, disposition, and status.kavi approvals: inspect the approval inbox.kavi approveandkavi deny: resolve a pending approval request, optionally with--remember.kavi events: inspect recent daemon and task events.kavi stop: stop the background daemon for the current repo session.kavi land: snapshot dirty agent worktrees into commits, merge them in a transient integration worktree, run validation there, and then fast-forward the target branch.
Runtime model:
- Repo-local state lives under
.kavi/. - Machine-local state defaults to
~/.config/kaviand~/.local/state/kavi. - In restricted environments you can override those with
KAVI_HOME_CONFIG_DIRandKAVI_HOME_STATE_DIR. - User-local runtime overrides live in
~/.config/kavi/config.tomland can point Kavi at customnode,codex, andclaudebinaries. - The operator surface talks to the daemon over a local control socket under the machine-local state root.
- SQLite event mirroring is opt-in with
KAVI_ENABLE_SQLITE_HISTORY=1; the default event log is JSONL under.kavi/state/events.jsonl. - Landed result reports are persisted under
.kavi/state/reports/, so the latest merged outcome remains inspectable after the landing command exits. - Missions are first-class session objects. Broad prompts create a mission, Codex can materialize an execution graph for that mission, and acceptance plus project memory persist with the mission instead of being scattered across ad hoc tasks.
- Mission packets are revisioned. Kavi records spec revisions, can diff revision-to-revision intent changes, and can compare the current mission packet against a draft prompt before you mutate the live mission.
- Project memory is repo-local and local-only. Kavi automatically captures useful summaries from plans, completed tasks, and landing reports so later mission prompts can inherit architecture facts and proven commands without re-explaining them every time.
- The mission simulator now exposes attention budget, seriality, contract coverage, gate pressure, and escalation pressure before or during execution, so broad prompts can be challenged before they become messy graphs.
- Receipts are now first-class proof-of-work artifacts. Each major mission node can record changed files, commands, verification evidence, assumptions, risks, and follow-up debt, and
kavi receipts --timelineshows them as a mission narrative instead of a flat dump. - Pattern Studio combines ranked templates, composition, conflicts, benchmark evidence, related repo clusters, cluster insights, starting points, and anti-pattern signals so portfolio memory is inspectable before it influences a mission.
- The operator console now opens on an activity-first view so the session reads like a linear progress log, while still exposing dedicated results, task board, dual agent lanes, approvals, diff review, and persisted operator review threads when you need to drill in.
- Routing can now use explicit path ownership rules from
.kavi/config.tomlvia[routing].codex_pathsand[routing].claude_paths, so known parts of the tree can bypass looser keyword or AI routing. - Validation is optional by default for new repos. Set
validation_commandin.kavi/config.tomlonce the project has a real test or build command you want Kavi to enforce duringland. - Ownership routing now prefers the strongest matching rule, not just the side with the most raw glob hits, and route metadata records the winning rule when one exists.
- Diff-based path claims now release older overlapping same-agent claims automatically, so the active claim set stays closer to each managed worktree's current unlanded surface.
Notes:
kavi initandkavi opennow support the "empty folder to first managed session" path. If no git repo exists, Kavi initializes one; if git exists but noHEADexists yet, Kavi creates the bootstrap commit it needs for worktrees.- Codex runs through
codex app-serverin managed mode, so Codex-side approvals now land in the same Kavi inbox as Claude hook approvals. - Claude still runs through the installed
claudeCLI with Kavi-managed hooks and approval decisions. --approve-alland the operator console's!toggle switch Kavi into a full-access mode for future turns. In that mode, Claude runs with--dangerously-skip-permissions, Codex runs with its no-approval danger-full-access equivalent, and Kavi stops prompting for approvals on those future turns.kavi doctornow checks Claude auth readiness withclaude auth status, and startup blocks if Claude is installed but not authenticated.kavi readinessis intentionally different from a hosted “agent readiness dashboard”: it uses local Kavi evidence, receipts, drift, Brain, patterns, and mission policy to score whether this repo is actually ready for sustained autonomous work on this machine.kavi doctoralso validates ownership path rules for duplicates, repo escapes, and absolute-path mistakes before those rules affect routing.kavi doctornow also flags overlapping cross-agent ownership rules that do not produce a clear specificity winner.- The dashboard and operator commands now use the daemon's local RPC socket instead of editing session files directly, and the TUI stays updated from pushed daemon snapshots rather than polling.
- The socket is machine-local rather than repo-local to avoid Unix socket path-length issues in deep repos and temp directories.
- The console is keyboard-driven:
1-9switch views,j/kmove selection,[and]cycle task detail sections,,and.cycle changed files,{and}cycle patch hunks,A/C/Q/Madd review notes,o/Ocycle existing threads,Treply,Eedit,Rresolve or reopen,acycle thread assignee,wmark a thread as won't-fix,xmark it as accepted-risk,Fqueue a fix task,Hqueue a handoff task,tretries the selected failed or blocked task,y/nresolve approvals,!toggles full-access mode,Llands managed work directly from the TUI, andcopens the inline task composer with live route and planning diagnostics. Inside the composer, digits are treated as literal text,Tabcycles the route owner,Ctrl+Pcycles planning mode, and long multiline pastes open the expanded editor whereCtrl+Ssubmits. - Broad prompts no longer get split locally inside the composer. When planning mode is used, Codex materializes an execution graph after submit, the Results surface shows that graph, and the daemon schedules the resulting tasks with dependency-aware, cross-agent execution.
- The default operator mental model is now mission-first rather than task-first. The
Missiontab shows the current mission summary, acceptance status, execution graph, and recent checkpoints before you need to drill into raw per-task detail. - Mission recovery controls are first-class. Use
kavi mission policy latest --guided|--autonomous|--overnight|--inspect --autopilot on|off --auto-verify on|off --auto-land on|off --pause-on-repair-failure on|off --retry-budget Nto tune the current mission without editing files. - Tabs now surface attention markers when new results, approvals, or follow-up-worthy changes appear, so the next place to look is visible from the header instead of being implied.
- Review filters are available both in the CLI and the TUI:
kavi reviews --assignee operator --status open, and inside the console useu,v, anddto cycle assignee, status, and disposition filters for the active diff context. - The Mission and Results views now expose recovery controls directly in the console. Use
uto cycle autonomy,ato toggle autopilot,Vto toggle auto-verify,Jto toggle auto-land, andKto toggle pause-on-repair-failure for the active mission. - The Brain view now supports deeper curation:
ecycles graph mode,Pcycles path-focus lenses, ando/Otraverse evidence targets as well as related entries when Brain focus is active. - The playback surface is phase-aware. Use
kavi playback --phase spec|execution|repair|contracts|acceptance|landing|auditto inspect one slice of a mission timeline instead of the full mixed history. - The claims inspector now shows active overlap hotspots and ownership-rule conflicts so routing pressure points are visible directly in the operator surface.
- The claims and decision inspectors now also show recommendation-driven next actions, so hotspots, cross-agent review pressure, and ownership-config problems can be turned into follow-up tasks directly from the operator surface.
- Recommendations now have a persisted lifecycle of their own: they can be dismissed, restored, and tracked across follow-up tasks, and repeated applies are guarded when an open follow-up task already exists.
- Review threads now carry explicit assignees and richer dispositions, including
accepted riskandwon't fix, instead of relying only on free-form note text. - Successful follow-up tasks now auto-resolve linked open review threads, landed follow-up work marks those resolved threads as landed, and replying to a resolved thread reopens it.
kavi update --checkreports newer published builds without installing them, andkavi updatecan apply a chosenlatest,beta, or exact version after confirmation.- The operator console now includes a dedicated recommendations view. Use
4to switch there,Enterto apply a recommendation,Pto force an additional follow-up task when one is already open,zto dismiss, andZto restore. kavi landnow prints a clearer merged-result summary, including the pre-land change surface by agent, validation status, and how many review threads were landed as part of the merge.kavi landwill now refuse to land when the latest mission still has a failed acceptance pack or unresolved actionable follow-up recommendations. Usekavi verify latestand the Recommendations/Mission surfaces before landing.- After
kavi land, runkavi resultto inspect the persisted merged-result report and the latest per-agent outcome in one place.
Install commands:
# stable
npm install -g @mandipadk7/kavi
# beta channel
npm install -g @mandipadk7/kavi@beta
# one-off
npx @mandipadk7/kavi helpUser-local config example:
version = 1
[runtime]
node_bin = ""
codex_bin = "codex"
claude_bin = "claude"Planned release shape:
- npm global install:
npm install -g @mandipadk7/kavi - one-off use:
npx @mandipadk7/kavi - optional native installer script or package-managed distribution after the npm workflow is stable
