Vanta / vanta-ts
AGENTS.md2 starsChanged 5 months agoMITView on GitHub
Cross-tool agent context. Pairs with CLAUDE.md (deeper detail). Read root ../AGENTS.md for the kernel + project overview first. Node 22, ESM, "type": "module". Run via tsx (no build step). Native fetch, process.loadEnvFile — no dotenv, no axios. Relative imports use .js extensions (tsx resolves to .ts). TUI uses React/Ink 7.
- Reads credentials
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- vanta-ts/CLAUDE.mdCLAUDE.md
- vanta-context-syncSkill
- customer-discoverySkill
- founder-bottleneckSkill
- gtm-builderSkill
- mvp-scopeSkill
- pmf-diagnosticSkill
- problem-hypothesisSkill
- vanta-context-syncSkill
The file
Files
AGENTS.md — vanta-ts (agent layer)
Cross-tool agent context. Pairs with CLAUDE.md (deeper detail). Read root ../AGENTS.md for the kernel + project overview first.
Runtime
Node 22, ESM, "type": "module". Run via tsx (no build step). Native fetch, process.loadEnvFile — no dotenv, no axios. Relative imports use .js extensions (tsx resolves to .ts). TUI uses React/Ink 7.
Test + typecheck
npx vitest run # last recorded full green: 11979 tests (from vanta-ts/)
npx vitest run <pattern> # single test file or describe block
npx tsc --noEmit # must be clean before any commitKey entry points
| Command | File |
vanta (TUI) | src/ui/launch.tsx → src/ui/app.tsx by default; VANTA_TUI=v2 → src/ui/v2/app-v2.tsx |
vanta (readline fallback) | src/interactive.ts |
vanta run "<instr>" | src/cli.ts → src/cli/lifecycle.ts → src/session.ts → src/agent.ts |
vanta gateway | src/gateway/run.ts |
vanta agents / attach / logs / respawn / stop / rm | src/cli/agents-cmd.ts over src/team/tasks.ts |
vanta fleet run/status/review/accept | src/cli/fleet-cmd.ts over src/fleet/, src/team/tasks.ts, src/worktree/manager.ts, src/subagent/spawn.ts |
vanta desktop | src/desktop/server.ts serving desktop-app/dist/ |
vanta eval mem public [dataset-dir] | src/cli/eval-cmd.ts -> src/mem-eval/public-run.ts |
vanta eval compress [--tasks N] | src/cli/eval-compress-cmd.ts -> src/eval/compress-run.ts (pass-rate CNG per compression dimension) |
vanta auto-research --objective --metric --bounds | src/cli/auto-research-cmd.ts -> src/auto-research/ |
vanta meta-tune instructions [--iters N] [--adopt] | src/cli/meta-tune-cmd.ts -> src/meta-tune/, ../PROGRAM.md |
vanta improve / vanta factory | src/factory/run.ts (autonomy ladder L1–L4) |
Critical files for new work
src/tools/all-tools.ts— register every new tool in theALL_TOOLSarray here AND intools/tools.test.tssorted list (index.tsis now justbuildRegistry)src/tools/types.ts—Tool,ToolContext,ToolResultshapessrc/safety-client.ts— kernel bridge (assess/approvals/goals)src/repl/catalog.ts— canonical list of 146 slash commands for/help, TUI palette, and validation;/skills auditexposes skill injection-scan findings without noisy default loadssrc/code-intel/— swappable code-intelligence port; default adapter shells out tocodegraph, and absent engines degrade toResulterrors instead of breaking turnssrc/repl/handlers.ts— slash command dispatcher and handler registrysrc/plugins/— plugin framework: manifest parsing, enabled-plugin loading,PluginContext, and runtime plugin slash-command registrysrc/effort.ts/src/providers/effort.ts— effort-level parsing plus OpenAI reasoning_effort / Anthropic extended-thinking param mappingsrc/repl/init-cmd.ts—/init: generate.claude/CLAUDE.mdfrom detected project contextsrc/repl/rewind-cmd.ts+src/sessions/file-checkpoint.ts—/rewind: in-memory per-edit file checkpoints, max 20 snapshotssrc/hooks/—.vanta/hooks.json30-event schema + runners forcommand/shell,http,mcp_tool,prompt, andagenthook types;paper-events.tskeeps arXiv 27-event parity checked.src/repl/hooks-cmd.ts—/hooks: list/add/remove.vanta/hooks.jsoncommand hooks; listing labels all hook types.src/schedule/durable-cron.ts+src/tools/cron.ts— durable.vanta/scheduled_tasks.jsoncron tasks plus legacy cron TSV compatibilitysrc/loop/wake.ts— compact wake context contract + durable.vanta/loops/wake-events.jsonlqueue for loop/cron/webhook wake reasons and deltas.src/tools/structured-output.ts+src/agent/structured-output.ts— syntheticStructuredOutputtool for SDKoutputSchemasrc/workflow/— FABRO-WORKFLOW-GRAPH core: declarative graph schema/diff/executor foragent/approval/interviewnodes andnext/branch/loop/paralleltransitions. Pure; production wiring lives insrc/tools/workflow.ts.src/subagent/— isolated worker conversations; parent outputs stay summary-only and full worker transcripts persist under.vanta/sidechains/.src/goals/— TS-side goal dependency graph store (.vanta/goal-deps.json) layered over kernel goals;/goalandvanta goalsrender derived blocked/wake state.src/compress/reactive.ts— reactive trimming for oversized tool results before the next model turnsrc/cli/agents-cmd.ts— background agent CLI management over~/.vanta/team-tasks.jsonlsrc/permissions/auto-mode.ts— auto permission classifier config and decision helpersrc/modes/permission-mode.ts—default|acceptEdits|automode parsing/env sync; acceptEdits bypasses the kernel only for six filesystem toolssrc/permissions/request.ts/grant.ts— typed approval dialog model plus allow/deny rule persistence helperssrc/fleet/— parallel worker fleet: worktree-isolated subagents, team-task status records, persisted review reports, explicit branch acceptsrc/auto-research/— metric-driven unattended improvement loop; candidate branches run in worktrees and merge only on numeric improvementsrc/meta-tune/— boundedPROGRAM.mdinstruction tuning: eval variants, record best, approval-gated adoptionsrc/setup/assistant.ts— live first-run setup probes for provider, Google OAuth, MCP, and messaging; returns redacted{ok, detail}values.src/operator-profile/profile.ts— durable declared/inferred operator preferences plus tighten-only approval preference decisionssrc/preferences/signals.ts—~/.vanta/preferences.jsonlchosen-vs-rejected operator preference signal storesrc/verify/completion-verifier.ts— opt-inVANTA_VERIFY=1post-turn completion claim verifier; timeout-bound, logs pass, appends fail evidence as a system messagesrc/verify/visual-closeout.ts— deterministic/verifyclose-out requirements from changed files; UI changes require screenshot evidence, runtime code requires command evidencesrc/verify/nl-assertions.ts— plain-English assertion judge for captured input/output pairs, exposed as thenl_assertionstoolsrc/agent/tool-scope.ts— per-turn task-relevant tool schema subset; full catalog reachable throughtool_searchsrc/memory/guardrails.ts— freshness/conflict/provenance labels for recalled memoriessrc/memory/extractor.ts— opt-inVANTA_EXTRACT_MEMORIES=1post-turn fact extractor; JSON array only, deduped against brain entries, persistssemanticfacts withauto-extractedprovenancesrc/mem-eval/— deterministic memory retrieval benchmarks: fixture runner plus public LongMemEval/LoCoMo loader, scorer, and report writersrc/ralph/state.ts—.vanta/ralph-loop.jsoncontinuity: ordered long-task features, paused startup block,/goal resume|dropsupportsrc/cli/lifecycle.ts— startup flags:--init,--init-only,--maintenancesrc/sessions/store.ts— session persistence plusforkSession()for--fork-sessionsrc/ui/app.tsx— Ink 7 TUI shell:<Static>transcript, composer, overlays, slash palette, approval UIsrc/ui/focus.ts— Tab/Shift+Tab focus traversal targets for composer, overlays, and approval actionssrc/ui/v2/— opt-in mission-control shell (VANTA_TUI=v2), wrapping the shared v1 engine in left/right operator railssrc/ui/reducer.ts— pure transcript/UI reducersrc/ui/use-agent.ts— agent I/O hook for the TUIsrc/desktop/+desktop-app/— localhost desktop API host + Vite/React renderersrc/interactive.ts— readline REPL (fallback to TUI)
Slash command / drop-file wiring
TUI (src/ui/app.tsx):
- Calls
maybeDroppedImage(line)before the slash check → dropped image paths work. /-prefixed input that isn't a known command → routed throughexecuteSlash.
Readline REPL (src/interactive.ts):
- Calls
runUserTurn(line)→maybeDroppedImageinsiderunUserTurn. - Slash handlers live in
repl/handlers.ts(HANDLERSregistry);repl-commands.tsre-exportsexecuteSlash/SLASH_COMMANDS. TUI slash parsing/palette behavior is covered inui/slash.test.tsand relatedui/use-*tests.
Current surface
src/tools/all-tools.tscurrently lists 137 built-in tools (141 registered with factorymount_mcp/tool_search/mcp_auth/run_pipeline); runtime MCP mounts can add more.src/repl/catalog.tscurrently exposes 146 slash commands./prompt list|show|use|resetapplies a bounded session role from project/home agent definitions; the base safety prompt and kernel contract remain intact.- Code intelligence defaults to the
codegraphadapter throughsrc/code-intel/index.ts;.codegraph/is ignored local state, refreshed withcodegraph index -f ., and should be verified withcodegraph status .before trusting impact/search output. /skillslists learned + MCP skills;/skills auditreports trusted-local skill injection-scan hits on demand whileVANTA_SKILL_STRICT=1still hard-skips flagged local skills.- Runtime plugins are opt-in via
settings.plugins.enabled; loaded plugin tools are not built-ins and still route through the normal kernel-gated tool path. - Effort levels are
low|medium|high|max: CLI--effort, session/effort <level>,settings.effortLevel, andVANTA_EFFORT_LEVEL; footer shows non-medium effort. self_repairincludessandbox_test {toolPath}for pre-attach limb-tool verification; it only acceptsvanta-ts/src/tools/*.tspaths and forcesVANTA_SANDBOX=1through the shared sandbox wrapper.shell_cmdcan opt into the same OS sandbox without sandboxing code runners by settingVANTA_SHELL_SANDBOX=1;VANTA_SANDBOX_NET=1permits network inside the sandbox.- Background agent management lives in
src/cli/agents-cmd.ts:vanta agents, top-levelattach/logs/respawn/stop/rm <id>, andvanta daemon status/stopread and manage~/.vanta/team-tasks.jsonl;disableAgentVieworVANTA_DISABLE_AGENT_VIEW=1gates the surface. - Parallel worker fleets live under
src/fleet/:vanta fleet run --task ...creates one.vanta/worktreescheckout per task, records team-task states, persists.vanta/fleets/<id>.json, andreview/acceptexpose diffs before merging. - Auto-research lives under
src/auto-research/:vanta auto-research --objective --metric --boundsmeasures a numeric baseline, iterates isolated candidate worktrees, journals each delta, and merges only candidates that beat the current best score. - Meta-tune lives under
src/meta-tune/:vanta meta-tune instructionsevaluates boundedPROGRAM.mdvariants with pass@1 plus CNG/token efficiency, records.vanta/meta-tune-instructions.json, and writesPROGRAM.mdonly after explicit approval. - Permission modes:
default,acceptEdits,auto.acceptEditsskips the kernel only forwrite_file,edit_file,read_file,mkdir,glob_files,grep_files;shell_cmdstays on the normal flow.autoruns the classifier after kernel + permission rules via--permission-mode auto,VANTA_AUTO_MODE=1, orsettings.autoMode.enabled. - Operator profile preferences live in
~/.vanta/operator-profile.jsonand are applied after kernel + rules + auto-mode. They can only preserve/escalate decisions; one-way doors always ask and kernel Block remains immovable. - Preference signals live in
~/.vanta/preferences.jsonl. Human approval/denial prompts append chosen-vs-rejected rows; kernel blocks and non-human auto/rule/profile decisions do not. - Approval prompts are per-tool: bash/file edit/file write/web/computer/sandbox/skill request models feed both Ink and desktop dialogs; Always/Never persist tool-scoped rules.
- Tool schemas are scoped per turn when the registry is large. The stable prompt lists tool names + summaries, and
tool_searchresults expand matching full schemas into the next provider call;VANTA_TOOL_SCOPE=0restores full exposure. compose_workflowaccepts legacy step sequences plus declarative workflow graphs; graph runs route every node through the kernel, use approval/interview human gates, diff canonical graph JSON, and execute agent nodes throughspawnSubagent..vanta/hooks.jsonsupports the 30-event hook vocabulary and hook typescommand/shell,http,mcp_tool,prompt, andagent. Prompt hooks need a provider at the call site; agent hooks use injectedAgentDepsand are wired around live tool/prompt/stop/session events.VANTA-HOOK-EVENTSis shipped: file watcher, cwd changes, MCP notification/elicitation, stop-failure, teammate-idle, lifecycle, permission, compaction, config, worktree, fleet, and subagent paths all have Vanta-owned firing points.paper-events.tsmaps the 27 hook events described in arXiv:2604.14228v1 §6 against Vanta's schema and reports zero missing paper events plus Vanta's three extras.- Goal dependencies live in
.vanta/goal-deps.json:/goal blocks <blocker> <dependent>and/goal blocked_by <dependent> <blocker>add edges;/goal status,/goals, andvanta goalsderiveblocked_by/blocksstate without changing kernel storage. - Scoped wakes inject compact
{wake_reason, goal_id, approval_id?, since, delta[]}context for cron, webhook, and loop runs. Cleared loop escalations enqueueapproval.resolvedwakes for the owning loop andgatewayTickdrains them before due cron work. - SDK runs with
outputSchemainject a syntheticStructuredOutputtool and return the validated tool-call arguments as the structured result. - Tool results larger than 40% of the provider context window are annotated and truncated before being appended back into the conversation.
- Provider context-window errors trigger one forced compaction retry in the agent loop; a second context error returns a clean stopped outcome.
- Recalled brain memories are guarded before use: stale/conflicting/weak-provenance entries are flagged as not-used hypotheses.
- Memory retrieval has a public benchmark runner:
vanta eval mem public [dataset-dir]loads LongMemEval/LoCoMo JSON, scores recall@k per category, embeds the fixture baseline, and writes.vanta/mem-eval-public-results.json. Downloaded datasets stay under ignored.vanta/paths. - Startup flags include
--init,--init-only,--maintenance, and resume--fork-session. - Ralph-loop continuity is project-scoped at
.vanta/ralph-loop.json: fresh launches surface it as PAUSED, and/goal resume|dropexplicitly activates or discards carried work. - TUI rendering is real Ink 7 under
src/ui/; v1 remains the default andVANTA_TUI=v2opts into the separate mission-control shell undersrc/ui/v2/. The oldsrc/tui/render layer is gone.src/tui/mission-control/cockpit-data.tsis the only remainingsrc/tuicode path and is data-only. - TUI focus traversal lives in
src/ui/focus.ts: Tab moves forward, Shift+Tab moves backward when multiple focus targets are visible; Shift+Tab still cycles mode when the composer is the only target. - Desktop root serving is Vite-first:
npm run desktop:buildwritesdesktop-app/dist/, andsrc/desktop/assets.tsserves it before falling back to the smallpage.tsbuild notice. - Reach layer lives under
src/reach/with tools for RSS, Reddit, cookies, and channel health. Deferred channels are tracked asREACH-*. vanta setupnow validates the provider before writing.env, offers Google OAuth, probes configured MCP servers by mounting/listing tools, and probes Telegram when configured; optional steps report exact fixes rather than fake enables.- Operator rocks now include world, money, radar, team, life-search, self-repair, verification locks, and browser action surfaces. Remaining horizon: browser OS-level control.
Adding a tool (checklist)
src/tools/<name>.ts— exportconst <name>Tool: Tool- Zod
safeParseon all args describeForSafetyreturns the risk-relevant string (path/command, not content)- Path args →
resolveInScope(arg, ctx.root)— return{ok:false}if outside - Add to the
ALL_TOOLSarray insrc/tools/all-tools.ts - Add tool name to sorted list in
src/tools/tools.test.ts - Co-located
src/tools/<name>.test.ts npx tsc --noEmitclean
Env vars (key ones)
VANTA_PROVIDER · VANTA_MODEL · VANTA_EFFORT_LEVEL · VANTA_KERNEL_URL · VANTA_HOME · VANTA_SELF_IMPROVE · VANTA_VERIFY (opt-in completion verifier) · VANTA_EXTRACT_MEMORIES (opt-in post-turn fact extraction) · VANTA_VISION_MODEL / VANTA_VISION_PROVIDER (auxiliary vision routing) · VANTA_FACTORY_BUDGET · VANTA_FACTORY_DISABLED (factory kill switch) · VANTA_TOOL_RETRIES · VANTA_STALL_THRESHOLD · VANTA_MODE_DETECT · VANTA_AUTOHANDOFF / VANTA_AUTOHANDOFF_THRESHOLD · VANTA_GOAL_ACTION · VANTA_RELAUNCH (set by run.sh; enables /restart) · VANTA_BROWSER_DISABLED · VANTA_DISABLE_AGENT_VIEW · VANTA_PERMISSION_MODE · VANTA_AUTO_MODE · VANTA_EMBED_MODEL · VANTA_RESUME_MAX_AGE_MIN · VANTA_LOOP_WAKE_CONTEXT (internal detached-loop wake payload) · VANTA_TUI (v2 opt-in mission-control shell)
Full env list: CLAUDE.md §Env.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

