tkt
Track work as markdown files in git. Dependency-aware frontier, atomic push-to-claim, race detection — no server required.
What It Does
tkt manages .tickets/ files with YAML frontmatter inside any git repo. It computes what's ready to work on (the "frontier"), claims tickets atomically via git push, and detects when two people grab the same work.
.tickets/
├── 01-auth-system.md # status: done
├── 02-api-endpoints.md # status: open, blocked_by: [01]
└── 03-deploy-pipeline.md # status: open, blocked_by: [02]
| When I'm... | I want to... | So I can... |
|---|---|---|
| Starting a work session | see what's unblocked | pick the highest-priority available task |
| Claiming a ticket | know nobody else grabbed it | avoid duplicate work across sessions |
| Finishing a task | mark it done and unblock dependents | keep the pipeline moving |
| Working on a team repo | allocate IDs without collision | push tickets concurrently |
| Reviewing project health | check for cycles and dangling refs | catch structural issues early |
| Syncing a plan document | detect status drift | keep the plan accurate |
Quick Start
Prerequisites: git on PATH, inside a git repository.
# Install
|
# Create the tickets directory
&& &&
# Create your first ticket
# → ✓ created 01 auth-system (pushed)
# See what's ready to work on
# → Ready (1):
# → 01 Implement authentication
# Claim it (marks in_progress, pushes to remote)
# → ✓ claimed 01 auth-system (→ in_progress)
# Close it when done
# → ✓ closed 01 auth-system (Resolution written)
Install
# macOS / Linux
|
# Windows (PowerShell)
|
# From crates.io
# From source
Single binary, no runtime dependencies beyond git.
Usage
Frontier — what's ready
Shows open tickets whose dependencies are all done, filtered by CREW_ENV if set, sorted by priority then ID.
Create tickets
IDs are allocated atomically — tkt scans local and remote filenames, pushes immediately, and retries on collision.
Lifecycle
Note: claim is optional. close works directly on open tickets — useful for single-agent workflows where the push round-trip adds latency without value. Use claim in shared repos to signal WIP and detect races.
Edit and maintain
Common flags
| Flag | Used by | Effect |
|---|---|---|
--json |
ready | machine-readable output |
--strict |
validate, sync-plan | warnings become errors |
--brief |
validate, sync-plan | human output instead of JSON |
--blocked-by N,N |
new, batch, edit | set dependencies |
--priority high |
new, batch, edit | jump frontier order |
--env E |
new, batch, edit | corp / personal / either |
--note "..." |
close | resolution text |
--resolution "..." |
close | resolution text (alias for --note) |
--ac N,N |
close, edit | check acceptance criteria boxes |
--check-all |
close | check all AC boxes at once |
--force |
close | close even with all ACs unchecked |
--status S |
query, new, edit | filter or set status |
--priority P |
query, new, edit | filter or set priority |
--color |
all | always / never / auto |
Ticket Format
---
id: "01"
title: "Implement authentication"
status: open # backlog | open | in_progress | done
blocked_by: # ids that must be done first
priority: high # optional: jumps frontier order
env: corp # optional: corp | personal | either
spec: auth-spec # optional: links to a spec name
---
# Implement authentication
## What to build
...
## Acceptance criteria
- JWT tokens issued on login
- Refresh token rotation
Files are the database. Hand-edit any time — tkt reads what's there.
Design
- Push-to-claim — a pushed commit is a claim; race detection on push rejection
- Remote-aware — scans
origin/mainviagit ls-treebefore allocating IDs - Surgical edits — changes one field without disturbing the rest of the file
- Single binary — shells out to
gitfor full SSH/HTTPS auth compatibility - Worktree-aware — works from git worktrees (
.tickets/is part of the checked-out tree)
Expected latency
Read commands (ready, query, validate) complete in ~50-100ms. Mutation commands (new, claim, close, edit) take ~2s because they include a git fetch + push round-trip — this is the cost of atomic remote operations and push-to-claim semantics. For local-only workflows, set push.enabled = false in .tickets/config.toml to skip network I/O.
Spike branches
When closing a ticket from a spike/* branch, tkt auto-appends "Spike branch: spike/name" to the resolution. This documents which experimental branch validated the work.
Configuration
Project-level config lives in .tickets/config.toml (committed, shared by contributors):
[]
= true # set false for local-only repos (skips fetch/push)
[]
= false # require --note/--resolution on close
= false # require all AC boxes checked on close
[]
= false # treat warnings as errors by default
[]
= "" # pre-filter frontier (corp/personal)
[]
= "medium" # default priority for new tickets
User-level config at ~/.config/tkt/config.toml stores debug preferences. Manage both with tkt config --list (show all) or tkt config --set push.enabled=false.
Agent Integration
For AI coding agents (kiro-cli, codex, etc.), add this to your project's AGENTS.md:
tkt ready # what to work on next
tkt claim <id> # mark as in_progress (shared repos)
tkt close <id> --check-all --resolution "..." # mark done
tkt validate --brief # check for issues
tkt capabilities # machine-readable feature manifest
Single-agent workflow
tkt ready → close <id> --check-all --resolution "..."
Shared-repo workflow
tkt ready → claim <id> → [work] → close <id> --check-all --resolution "..."
If a claim push is rejected, someone else got there first — pick the next frontier ticket.
Note: claim is optional. close works directly on open tickets — useful for single-agent workflows where the push round-trip adds latency without value. Use claim in shared repos to signal WIP and detect races.
Set CREW_ENV=corp or CREW_ENV=personal to filter the frontier by ticket env field. tkt capabilities outputs a JSON manifest for agent tool discovery.
Development
Telemetry
tkt includes optional, local-only telemetry (disabled by default). No data leaves your machine. See TELEMETRY.md for full details on what's collected, where it's stored, and how to opt in/out.
Debug mode
For real-time diagnostics without persisting anything:
TKT_DEBUG=1 TKT_DEBUG=json
Contributing
Found a bug? File a bug report. Want a feature? Request it.
Inspired By
tk — proved markdown files + frontmatter is the right model for lightweight work tracking. tkt adds dependency-graph frontier computation, push-to-claim race detection, and surgical frontmatter edits.
License
MIT