CLI · TUI · MCP server

thresh.

Point it at a Jira scope and it surfaces the pending, actionable issues, ranked by impact, as a markdown report on stdout. The deterministic core is stdlib-only; an optional LLM tie-break recovers the signal Jira's fields don't encode.

Download v0.1.0 ★ Star on GitHub ☕ Buy me a coffee
$ go install github.com/alejandroSuch/thresh@latest
thresh ABC-417 | glow -
$ thresh ABC  # a project key, an issue key, or --jql

# 1  ABC-417  Freeze the JSON output contract: schema snapshot + CI gate
       In Progress · 0d · blocks ABC-418, ABC-419
       why foundational: unblocks 2; live committed work
# 2  ABC-370  Backup reuse loses applied state on re-sync
       Backlog · 35d
       why broken-flow bug: rollback targets pre-sync, drops applied state
# 3  ABC-151  Separate evaluator agent with 3-tier confidence
       Selected for Development · 37d · blocks ABC-364
       why foundational: the unblocker for the validator-tier work
   …
# 24 ABC-66   Investigate JJ rebase   · zombie: Selected 133d (ranked down)

Three ways to run it

Same discovery and ranking engine, three front ends. Pick the one that fits where you are.

--stdout

CLI

Markdown report on stdout. Pipe it to glow, redirect to a file, or paste it into a standup.

thresh ABC-123
--tui

TUI

Navigable list (Bubble Tea). Open in browser, self-assign, transition, or comment, right from the keyboard.

thresh --tui ABC-123
--mcp

MCP server

Exposes discovery, per-issue actions and Blocks links as tools Claude Code can call. The calling model does the re-rank.

thresh --mcp

It drives your coding agent

Run thresh --mcp and Claude Code can triage the backlog itself, then act on it: assign, transition, comment, link blockers. The calling model does the re-rank in its own context.

Claude Code · thresh (mcp)
What should I pick up next in ABC?
→ mcp__thresh__discover_backlog  { "scope": "ABC" }   ← 101 issues · ranked
Top picks, by impact (not just age or status):
1.
ABC-417  Freeze the JSON output contract: schema snapshot + CI gate
In Progress · blocks ABC-418, ABC-419 → foundational, unblocks 2. Live committed work.
2.
ABC-370  Backup reuse loses applied state on re-sync
broken-flow bug: rollback targets the pre-sync state and silently drops the applied work. Worth pulling in.
3.
ABC-151  Separate evaluator agent with 3-tier confidence
Selected for Development · blocks ABC-364 → the unblocker for the validator-tier work.

How the ranking works

Deterministic by default (free, no model). Optional --llm tie-break re-ranks the top N by semantic impact, then falls back to the deterministic order on any error.

▸

Momentum, decayed

In Progress > Selected > Backlog, aged down over time. Subtasks inherit the parent's momentum.

▸

Foundational = structural

An issue ranks up only if it actually blocks others, not because the title sounds infra-y.

▸

Bugs by blast radius

data-loss > broken-flow > degraded > cosmetic, judged from the description, not the title.

▸

Zombie detection

An "In Progress" item untouched for 60+ days is abandoned, and ranked below real live work.

▸

Gated work, flagged

Anything with an open blockedBy is marked and pushed below comparable unblocked work.

▸

Two-pass LLM

Ranks on titles + links first, pulls only the ambiguous descriptions on demand, then re-ranks. Cheap path stays cheap.

Install

Prebuilt binaries for linux / macOS / windows × amd64 / arm64 ship with every v* tag via GoReleaser. Or build from source with Go 1.25+.

Get the binary

# with Go:
go install github.com/alejandroSuch/thresh@latest

# or download for your platform:
github.com/alejandroSuch/thresh/releases

Point it at Jira

# create a token at id.atlassian.com
export THRESH_JIRA_BASE_URL=https://your-org.atlassian.net
export THRESH_JIRA_EMAIL=you@example.com
export THRESH_JIRA_TOKEN=<api-token>

# or store it once:
thresh setup

Wire it into your agent

thresh speaks MCP over stdio, so any MCP client can drive it. Build the binary, run thresh setup once, then point your agent at it:

claude mcp add thresh -- /abs/path/to/thresh --mcp

# read-only, calling model re-ranks:
claude mcp add thresh -- /abs/path/to/thresh --mcp --no-llm \
  --tools discover_backlog,list_transitions
# ~/.codex/config.toml
[mcp_servers.thresh]
command = "/abs/path/to/thresh"
args = ["--mcp"]
// Cursor  ~/.cursor/mcp.json    Windsurf  ~/.codeium/windsurf/mcp_config.json
// Claude Desktop  claude_desktop_config.json    Cline  MCP settings
{
  "mcpServers": {
    "thresh": { "command": "/abs/path/to/thresh", "args": ["--mcp"] }
  }
}
// .vscode/mcp.json  (Copilot agent mode — note "servers" + "type")
{
  "servers": {
    "thresh": { "type": "stdio", "command": "/abs/path/to/thresh", "args": ["--mcp"] }
  }
}