Execution control plane for AI agents — structure agents, save tokens.
Project description
vectl — execution control plane for AI agents
Structure agents. Enforce discipline.
uvx vectl --help
Markdown Can't Control Your Agent
A 200-step plan in TODO.md. You expect the agent to follow the order, check off completed items, and never skip ahead.
In practice? Agents treat TODO.md as a suggestion, not a rule. They skip steps, forget to mark things done, or get lost in a 1000-line plan and redo work that's already finished. The more you try to hint at structure with comments, bold text, and separators, the worse it gets — because Markdown is just natural language text, and agents have zero obligation to obey it.
The core problem: TODO.md is advice, not enforcement. You can't force an agent to claim a step before starting, or submit evidence before marking it complete.
This is a structural defect in Markdown, not a flaw in your agent:
- No enforcement: you can't prevent agents from skipping steps or require proof of completion
- No dependencies: "Deploy DB" before "Config App" — the agent can only guess the ordering, and nothing stops it from guessing wrong
- Multi-agent conflicts: multiple agents online with no coordination — they can't tell which steps are parallelizable, and simultaneous edits silently overwrite each other
- Completion by self-declaration: the agent says "Done" and that's it — you can't require it to prove tests actually passed
These problems are tolerable at 10-20 steps. At hundreds of steps with multiple agents, TODO.md falls apart completely.
TODO.md can't say no. vectl can.
Control Plane, Not a Framework
Agent frameworks manage how agents think. vectl manages what agents see, when they see it, and what they must prove.
| Capability | Problem Solved | Mechanism |
|---|---|---|
| DAG Enforcement | Agents skip dependencies, guess ordering | Blocked steps are invisible — agents literally cannot claim them |
| Evidence Required | Agent says "Fixed" and moves on | evidence_template forces fill-in-the-blank proof: command, output, PR link |
| Safe Parallelism | Multiple agents step on each other | claim locking + CAS atomic writes |
| Auto-Dispatch | Someone must watch and assign tasks | next computes all unblocked steps and sorts them; rejected steps float to top |
| Token Budget | Agent re-reads hundreds of completed lines | Hard limits across the board: next ≤3, context ≤120 chars, evidence ≤900 chars |
| Context Compaction | Long conversations cause agent amnesia | checkpoint generates a deterministic JSON snapshot — inject into new session for instant recovery |
| Handoff Notes | Agents lose state between hosts/sessions | clipboard-write/read/clear stores short notes in plan.yaml (with TTL) |
| Agent Affinity | Different agents are good at different tasks | Steps can suggest an agent; next sorts by affinity |
Quick Start
1. Initialize
uvx vectl init --project my-project
Creates plan.yaml and appends a vectl section to the agent instruction file (CLAUDE.md or AGENTS.md). If the file already exists, your existing content is preserved — vectl only adds its own section.
Commit
plan.yaml+AGENTS.md/CLAUDE.mdtogether. The plan is the state machine; the instructions file is the agent entry point.
2. Connect Your Agent
Recommended: connect via MCP for structured tool access.
⚡ MCP (recommended)
{
"mcpServers": {
"vectl": {
"command": "uvx",
"args": ["vectl", "mcp"]
}
}
}
vectl exposes 15 MCP tools. Agents call vectl_status, vectl_claim, vectl_complete, vectl_decide, etc. directly — structured data in, structured data out.
For OpenCode, add to your opencode.jsonc:
{
"mcp": {
"vectl": {
"type": "local",
"command": ["uvx", "vectl", "mcp"]
}
}
}
See OpenCode MCP docs for details.
⌨️ CLI (no MCP)
No setup needed — agents call uvx vectl ... directly. Works everywhere, but agents must parse text output instead of structured data.
uvx vectl initalready creates/updates the agent instructions file. To update later:uvx vectl agents-md(use--target claudeif needed).
Agent Instruction Files
vectl init and vectl agents-md manage the agent instruction file in your repo.
That file is the entry point for agents: it points to uvx vectl guide topics and sets the rules (one claimed step at a time, evidence required, don't guess specs).
uvx vectl agents-md # Update AGENTS.md / CLAUDE.md with vectl section
uvx vectl agents-md --target claude # Force CLAUDE.md
3. Write the Plan
Tell your agent what you need — it will generate and modify the plan through vectl's mutate tool. Do not hand-edit plan.yaml or let agents edit it directly — all modifications must go through vectl tools to ensure validation, lock recalculation, and concurrency safety.
4. Migrate (Optional)
If your project already tracks work in a markdown file, issue tracker, or spreadsheet, tell your agent:
Read the migration guide (via `uvx vectl guide --on migration` or `vectl_guide` MCP tool).
Migrate our existing plan to plan.yaml.
Prefer MCP tools (`vectl_mutate`, `vectl_guide`) over CLI if available.
5. Monitor Progress
As a user, your main job is to review progress and make decisions:
uvx vectl render # Markdown progress report
uvx vectl dashboard --open # Visual HTML dashboard (static, no server)
The dashboard includes progress overview, phase status, and DAG dependency graphs. Open in any browser — no server required. The DAG view loads Mermaid.js from a CDN (network required for that tab).
Everything else is in the guide:
- Architect protocol:
uvx vectl guide --on planning - Getting unstuck:
uvx vectl guide --on stuck - Review / validation:
uvx vectl guide --on review - Migration:
uvx vectl guide --on migration
Handoffs: Clipboard (Notes) vs Checkpoint (State)
If you're switching agent hosts (Claude Code ↔ OpenCode ↔ Claude Desktop) or handing work between agents, use both:
- Clipboard: short, human-readable notes that live in
plan.yaml(with TTL). - Checkpoint: compact, machine-readable state snapshot for context injection.
Clipboard (recommended for handoffs)
Use this when you want to pass actionable notes between agent hosts/sessions without creating extra files.
Example: Claude Code did a detailed code review, found a few small issues, and you want OpenCode to patch them. Drop the review notes into the clipboard — the other agent reads and applies.
uvx vectl clipboard-write \
--author "claude-code" \
--summary "Code review: small fixes" \
--content "
Target: src/foo.py
Issues:
- Rename X to Y (see comment in function bar)
- Add missing test for edge case Z
- Run: uv run pytest tests/test_foo.py
"
uvx vectl clipboard-read
uvx vectl clipboard-clear
MCP equivalent:
vectl_clipboard(action="write", author="claude-code", summary="Code review: small fixes", content="...")
vectl_clipboard(action="read")
vectl_clipboard(action="clear")
Checkpoint
uvx vectl checkpoint
Paste the JSON into the next session's system prompt.
Data Model (plan.yaml)
version: 1
project: my-project
phases:
- id: auth
name: Auth Module
context: |
All auth steps must follow OWASP guidelines.
Test with both valid and malformed JWTs.
depends_on: [core]
steps:
- id: auth.user-model
name: User Model
status: claimed
claimed_by: engineer-1
A YAML file. In your git repo.
No database. No SaaS. git blame it. Review it in PRs. git diff it.
Phase Context: Set context on a phase to give agents guidance that applies to all steps within it. When an agent runs vectl show <step> or vectl claim, phase context appears automatically in the output.
Full schema, ID rules, and ordering semantics: docs/DESIGN.md.
Lock Consistency
Lock status is automatically maintained — agents do not need to manage it. After any write operation (claim, complete, mutate, etc.), vectl recalculates lock status automatically. When a recalculation changes a phase's lock state, vectl emits an informational message:
[vectl] Lock status updated: phase-a (pending)
If you edit plan.yaml directly (outside of vectl commands), run uvx vectl recalc-lock to manually diagnose and repair any lock inconsistencies.
Claim Recovery (Ghost Claims & Split-Brain)
When claim state diverges from plan state, you may encounter errors like:
Step 'foo.bar' is already claimed on branch 'main'
But vectl show foo.bar shows it unclaimed — or shows a different owner. This is a ghost claim or split-brain state.
Symptom Recognition
| Symptom | Likely Cause |
|---|---|
Claim rejected, show says unclaimed |
Ghost claim in claims.json (stale or orphaned entry) |
Claim rejected, show shows different owner |
Split-brain: claims.json and plan.yaml disagree |
status shows claimed, but no agent is working |
Stale claim entry (agent crashed/left) |
Recovery Commands
# 1. Diagnose: preview what would change (safe, read-only)
uvx vectl repair claims --dry-run
# 2. Diagnose with JSON (machine-parseable output)
uvx vectl repair claims --dry-run --json
# 3. Repair all claims on current branch
uvx vectl repair claims
# 4. Repair only a specific step (scoped repair)
uvx vectl repair claims --step foo.bar
# 5. Verify: check status again
uvx vectl status
uvx vectl show <step-id>
Flags Explained
| Flag | Purpose |
|---|---|
--dry-run |
Preview changes without writing. Always run this first. |
--step <id> |
Repair only this step's claim. Preserves all other claims. |
--json |
Machine-readable output. Useful for scripting/CI. |
Policy
vectl repair claims follows plan precedence:
plan.yamlis the source of truth for claim-visible state- For current branch, claims.json is repaired to match plan step status/owner
- Out-of-scope entries (other branches, unrelated steps) are preserved
When Repo is Healthy (No-Op)
If the repo is consistent, --dry-run shows:
Policy: plan_precedence: ...
changed: false
actions: []
This means claims.json matches plan.yaml — no repair needed.
Anima-Style Example
# You try to claim but get rejected
$ uvx vectl claim auth.user-model
Error: Step 'auth.user-model' is already claimed on branch 'main'
# But status shows something different
$ uvx vectl show auth.user-model
status: pending
claimed_by: null
Recovery:
# Preview the fix
$ uvx vectl repair claims --dry-run --json
{
"changed": true,
"actions": [
{"action": "remove", "key": "main:auth.user-model", "reason": "ghost_claim_or_non_claimed_step"}
]
}
# Apply the fix
$ uvx vectl repair claims
[vectl] Repair claims (main)
removed: main:auth.user-model
# Now claim works
$ uvx vectl claim auth.user-model
Post-Repair Verification
After running repair, always verify:
uvx vectl status # Confirm expected claim state
uvx vectl show <step-id> # Check specific step
uvx vectl repair claims --dry-run # Should now show no changes
Technical Details
Architecture, CAS safety, and test coverage (Hypothesis state machine verification): docs/DESIGN.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vectl-0.6.9.tar.gz.
File metadata
- Download URL: vectl-0.6.9.tar.gz
- Upload date:
- Size: 839.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83db705677415d552f6d5484e0b386ccaebafc76c6ce05a150f93a1159d1b40f
|
|
| MD5 |
b1699b2a4e5366473e86a8e98620482c
|
|
| BLAKE2b-256 |
6bfa1e59da03726c90dd58960b2278a69147cd6aad47b551185d787d3e17295d
|
Provenance
The following attestation bundles were made for vectl-0.6.9.tar.gz:
Publisher:
publish.yml on Tefx/vectl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vectl-0.6.9.tar.gz -
Subject digest:
83db705677415d552f6d5484e0b386ccaebafc76c6ce05a150f93a1159d1b40f - Sigstore transparency entry: 1154976655
- Sigstore integration time:
-
Permalink:
Tefx/vectl@48bb20a9f9abe43e6f3ccc3a062599fcf1024f09 -
Branch / Tag:
refs/tags/v0.6.9 - Owner: https://github.com/Tefx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@48bb20a9f9abe43e6f3ccc3a062599fcf1024f09 -
Trigger Event:
release
-
Statement type:
File details
Details for the file vectl-0.6.9-py3-none-any.whl.
File metadata
- Download URL: vectl-0.6.9-py3-none-any.whl
- Upload date:
- Size: 135.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2007415dbc45c1b24af331475df4408f13aea5ac2cfcf12ffab0c8ff00bd3c9a
|
|
| MD5 |
8b02773fa771404f5a9cedf60f5b7ebe
|
|
| BLAKE2b-256 |
e7f034eff062b087e30d4ef925b8a520e98db2eeae93f1431dcff4a7867f480b
|
Provenance
The following attestation bundles were made for vectl-0.6.9-py3-none-any.whl:
Publisher:
publish.yml on Tefx/vectl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vectl-0.6.9-py3-none-any.whl -
Subject digest:
2007415dbc45c1b24af331475df4408f13aea5ac2cfcf12ffab0c8ff00bd3c9a - Sigstore transparency entry: 1154976659
- Sigstore integration time:
-
Permalink:
Tefx/vectl@48bb20a9f9abe43e6f3ccc3a062599fcf1024f09 -
Branch / Tag:
refs/tags/v0.6.9 - Owner: https://github.com/Tefx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@48bb20a9f9abe43e6f3ccc3a062599fcf1024f09 -
Trigger Event:
release
-
Statement type: