VectorCTC wordmark in a segmented LED display

[ PRE-WRITE GATE FOR AI CODING AGENTS ]

Air traffic control for AI coding agents.

Review tools read your code after the agent wrote it. VectorCTC checks every file the agent tries to write before it hits disk, and waves off hallucinated calls, copy-pasted utilities, dead code and scope creep with the exact fix.

npx code-traffic-control init --agent auto

Node.js 20+. Run it in a TypeScript or JavaScript repo. --agent auto detects installed agents; or name them, e.g. --agent cursor,claude.

[ 01 · THE PROBLEM ]

Hour two. Your agent forgets the codebase.

Early instructions fall out of context, and the code starts showing it. Prompt reminders don't hold, because the reminder is just more context to rot. Run two agents at once and they clobber each other's files.

  • PHANTOM

    Calls that don't exist

    user.getFullName() on a type that never had it.

  • DUPLICATE

    A third copy of a helper

    formatPrice(), again, next to formatCurrency().

  • DEAD CODE

    Debris from retry loops

    Unused imports and orphaned functions left behind.

  • LONG

    150-line functions

    One function doing five jobs, branch on branch.

  • INCURSION

    "While I was in there…"

    Edits to files nobody asked it to touch.

[ 02 · HOW IT WORKS ]

Plan the flight. Gate every landing.

  1. 01

    Pre-Flight

    Your agent turns the idea into a blueprint: components, tasks, dependencies and target files. VectorCTC validates the graph and rejects missing deps and cycles.

  2. 02

    Flight Plan

    Promote one task. Its files become the only runway the agent can write to. Anything else is a RUNWAY_INCURSION.

  3. 03

    Runway Gate

    Each proposed write is overlaid on an in-memory TypeScript project, type-checked and AST-checked, then rolled back. Clean writes land. Everything else gets a WAVE OFF with the fix.

agent ▸ write src/features/checkout/total.ts
[CTC RUNWAY GATE — WAVE OFF]
File: src/features/checkout/total.ts
Violation: DUPLICATE_LOGIC (line 12)
  formatPrice() matches formatCurrency()
  in src/utils/money.ts
Required Action:
  import { formatCurrency } from "../../utils/money"
agent ▸ rewrite using formatCurrency …
✓ CLEARED · ctc.cleared.v1 · written to disk
Illustrative session. The WAVE OFF header, rule code and fields match the real ctc.hold.v1 output; the file names are an example.

[ 03 · THE RUNWAY GATE ]

Six deterministic rules. Same verdict every time.

Built on the TypeScript compiler and AST analysis. No model in the loop, so the gate can't be talked out of a verdict and never changes its mind between runs.

  • PHANTOM_SYMBOL

    Phantom symbols

    Properties that don't exist, unresolved names and wrong argument counts, caught by the real type checker.

  • DUPLICATE_LOGIC

    Duplicate logic

    α-renamed AST shingles find the utility you already wrote, even with every variable renamed, and name what to import instead.

  • DEAD_CODE_REGRESSION

    Dead-code regression

    Blocks only the dead code this write introduces, compared with the version on disk. Your legacy mess is left alone.

  • FUNCTION_TOO_LONG · COMPLEXITY

    Long methods

    Over 40 lines or complexity above 10 gets sent back to be split. Thresholds are configurable.

  • NAMING_DRIFT

    Naming drift

    Your naming conventions, still enforced at hour three.

  • BOUNDARY_VIOLATION · BANNED_PACKAGE

    Boundaries

    UI doesn't import the database. Banned packages stay banned.

Radar

Notices when an agent is lost. A second identical read returns signatures only; a third locks writes and calls the landing.

Ground Crew handoff

Writes .ctc/state.json: objective, invariants, finished and pending files, open violations and a bootstrap prompt, so a fresh session picks up mid-task.

Verify before done

A task can't be marked DONE until every one of its target files passes the gate.

[ 04 · WORKS WITH YOUR AGENT ]

One command wires it in. We tell you exactly how hard it enforces.

ctc init --agent auto writes the right config for each agent it finds.

  • Claude CodeHOOK
  • CursorHOOK
  • Gemini CLIMCP
  • Codex CLIMCP
  • WindsurfMCP
  • OpenCodeMCP
  • AntigravityMCP
  • Roo CodeMCP
  • ZedMCP
  • ContinueMCP
  • WarpMCP
  • ClineMCP*
  • AiderGIT
  • Anything elseREST / CLI

*Cline's MCP config is global, so CTC writes a snippet for you to merge. Product names are trademarks of their owners; no affiliation implied.

Four layers of enforcement

  1. Agent hooks intercept native writes in Claude Code and Cursor.
  2. MCP tools ctc_write_file / ctc_patch_file gate writes in every MCP client.
  3. Git hooks ctc install-git-hooks gate pre-commit and pre-push, no matter who wrote the code.
  4. Watch ctc watch --revert restores snapshots when a change fails.
ctc serve

MCP over stdio, or --http on 127.0.0.1:4317.

/openapi.json

REST: /v1/check, /v1/write, /v1/patch, /v1/read.

ctc check · apply

Dry-run or gate a write from any script, JSON out.

ctc export-tools

Tool schemas for OpenAI, Anthropic and Gemini function calling.

[ 05 · PREVENTION VS. REVIEW ]

Stop bad writes, not just bad PRs.

AI PR reviewers like Greptile are good at what they do: reading a finished pull request and flagging bugs, style and security issues across many languages. VectorCTC works one step earlier, inside the agent loop. They solve different problems, and plenty of teams will want both.

VectorCTC compared with AI pull-request review tools
VectorCTCAI PR review bots
When it runsBefore each file write, in the agent loopAfter a PR is opened
How it decidesTypeScript compiler + fixed AST rules, deterministicLLM agents with codebase context
Who gets the feedbackThe agent, on its next turn, with the exact fixHumans and agents, as PR comments
Where it runsYour machine. No cloud, no code leavesUsually cloud; some offer self-hosting
LanguagesTypeScript / JavaScript for AST rulesMany languages
Best atHallucinated APIs, duplicates, dead code, scope creepLogic bugs, security, team conventions in review
CostFree, open source (MIT)Varies; typically per seat or per review

[ 06 · OPEN SOURCE ]

The gate is free and open source.

Core $0

MIT licensed · runs locally

  • Runway Gate with all six rules
  • Pre-Flight blueprints and Flight Plans
  • Radar and Ground Crew handoff
  • Every integration: MCP, hooks, CLI, REST, git hooks
Install

Team Planned

Not available yet · no pricing announced

  • Shared rule sets across repos and teammates
  • Dashboard of what agents got waved off on
  • Team memory via Unimatrix

[ 07 · FAQ ]

Questions from the tower

Is there an LLM inside VectorCTC?

No. Every verdict comes from the TypeScript compiler and fixed AST rules, so the same write gets the same answer every time.

Does my code leave my machine?

No. VectorCTC runs locally. The optional HTTP server binds to 127.0.0.1. Optional Unimatrix memory is opt-in, and writes still go through if it's down.

Which languages does it support?

The AST rules are TypeScript and JavaScript only today. Scope control (Flight Plans) and the git hooks work on any file.

Can an agent just ignore it?

Where native writes can be intercepted (Claude Code and Cursor hooks), no. In other MCP clients, writes made through CTC's tools are enforced and native edits are advisory, so git hooks and ctc watch --revert act as the backstop. The agents table above says which is which.

Will it block my existing legacy code?

No. Rules like dead-code regression compare the proposed write with what's already on disk and only block what the agent introduces.

Does it replace code review?

No. It keeps the junk out before the PR exists, so human or AI reviewers spend their time on what matters.

What about false positives?

Every WAVE OFF names the rule, the line and the fix, so it's easy to judge. Thresholds, naming patterns and boundaries are configurable, and ctc check dry-runs a write without counting it.

[ TOWER → ALL AGENTS ]

Cleared for takeoff.

Give your agent a runway, not a blank check.

npx code-traffic-control init --agent auto