Decsr-Code

module
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: MIT

README

DECSR

Decsr Code — command: decsr

License Latest Release CI Go version Go Reference

Highlights · Quick start · Features · Keys · Backends · Configuration · Classic pipeline · Docs

What is decsr?

decsr is a terminal app that runs a team of coding agents on your repository. You describe a task, a lead agent splits it into a graph of sub-tasks, and you pick a role and model for each node. Nodes run in parallel, each in its own git worktree. A final Build & test check runs, then you review the diff and merge it or open a pull request.

Nothing runs until you say so. You can mix Claude, Codex, OpenCode, Copilot, dsh, API models and local models in one task.

Highlights

Parallel agents — every node works in its own git worktree and branch, so agents never overwrite each other. Any backend per role — CLI agents, API providers and local models, each with its own model and effort.
You stay in control — nothing runs until you press r. Autonomy levels 1-3 and a USD budget let you give more freedom step by step. Real code review — read diffs with syntax highlighting, put notes on lines and send them back to an agent.
Coordinator lead — the lead can review each finished batch and propose new, changed or cancelled nodes. Pull requests and CI — /pr opens the PR, /pr watch turns failing CI and review comments into fix nodes.
Automations — scheduled, unattended runs with a budget. Limits and inbox — a rate-limited node waits instead of failing, and the inbox lists everything that needs you.

Quick start

1. Install
curl -fsSL https://raw.githubusercontent.com/Decsr/Decsr-Code/main/scripts/install.sh | sh

The script installs the latest release to ~/.local/bin (no sudo) after checking its checksum. Set DECSR_VERSION=v0.7.1 to pin a release or DECSR_INSTALL_DIR to change the directory.

Other options:

  • Homebrew (once the tap is published): brew install decsr/tap/decsr
  • Prebuilt binaries for Linux, macOS and Windows (amd64/arm64) on the Releases page. Unpack and put decsr on your PATH. On Windows, verify commands run through sh when Git for Windows or MSYS2 provides one, otherwise through cmd.exe. tmux features are unavailable; WSL2 also works.
  • go install (Go 1.26+): go install github.com/Decsr/Decsr-Code/cmd/decsr@latest
  • From source: git clone https://github.com/Decsr/Decsr-Code.git && cd Decsr-Code && make build install

You need a git repository to work in and at least one backend (see Backends). bd (beads) is recommended for the classic pipeline only.

  1. Install with the one-line script above (options are folded in the box).
  2. Check your setup: decsr doctor checks git, config, runners and API keys, plus optional tools such as tmux and gh. It prints a fix hint for each problem.
  3. First run: if no runner is usable, decsr opens a short setup (pick a runner, connect a key, see the doctor result). Esc skips it. Open it again any time with decsr setup.
  4. Start: cd your-repo && decsr
  5. Describe a task in the prompt and press Enter. The lead splits it into nodes.
  6. Assign roles: A accepts the lead's suggestions, a picks a role for the selected node.
  7. Run: press r for one node or R for all assigned nodes. Press d on a node to see its diff.
  8. Finish: type /merge to bring the result into your branch, or /pr to open a pull request.
 Add JSON output to the vers…  │  Activity · g graph
 2/5 · 1 failed                │  You  17:00
 ✓ T1 Parse the --json flag    │    add a --json flag to the version command
    ⬡ claude:sonnet        2m  │  ╭────────────────────────────────────────╮
 ! T3 Tests for --json         │  │ ✓ T1 Parse the --json flag    17:01 ↗ │
    ⬡ claude:sonnet    failed  │  │ Worked for 1m 10s                      │
 ? T4 Document the flag        │  │ Edited cmd/version.go           +18 −2 │
    → docs                     │  ╰────────────────────────────────────────╯
 Sessions                      │
 ○ Refactor config loader  3/3 │  ╭────────────────────────────────────────╮
                               │  │ Type a task, / for commands            │
                               │  ╰────────────────────────────────────────╯

The sidebar (from 100 columns) lists nodes and saved sessions. The feed shows one card per node. The prompt is at the bottom. Press g to switch the feed to the node graph.

Features

Workspace and graph

The lead splits your task into nodes with titles, dependencies and a suggested role. Up to 3 nodes run at once (R runs each node as soon as its dependencies are done). A last Build & test node runs your language's build and test commands. In a git repository every node gets its own worktree. Set workspace.isolation: shared to work in your checkout instead. See Workspace.

Roles and backends

A role is a name, a description, a runner, a model and an effort. Six built-in roles exist (pm, coder, coder_fixer, qa, ux_reviewer, security) and you can add your own under agents:. Use mode: agent to let a CLI agent edit files with its own tools, or mode: text to let decsr write the files. read_only: true makes a role report only. See Roles and Agent mode.

Review and merge

d shows a node's diff and D the whole session. c adds a note to a line and S sends your notes to the agent as a new node. ! opens a shell in the node's worktree. /merge merges the session branch. /pr pushes it and opens a pull request with gh. /pr watch turns failing CI and review comments into fix nodes. See Diff and review notes and Pull requests.

Autonomy, coordinator and budgets

Level 1 (default) runs nothing by itself. Level 2 accepts roles, runs everything and adds fix nodes after a failed Build & test. Level 3 also opens and watches the pull request, and needs a budget. Automation never merges. Turn on the coordinator and the lead reviews each finished batch. Set a budget and decsr warns at 80% and stops starting nodes at the limit. See Autonomy levels, Coordinator mode and Cost and budget.

Reply to nodes and node reports

Type @T3 your message (or press m on a node) to start a new attempt of that node. Earlier attempts are kept. Every node ends with a report. A node that asks a question or is blocked shows ◇ waiting until you answer. See Reply to a node and Node reports.

Automations and notifications

.decsr/automations.yaml defines scheduled runs with a task or an issue query, autonomy 2 or 3 and a budget. decsr automation install writes the crontab lines. When something needs you, decsr can ring the bell, send a desktop notification or post to an ntfy, Slack or Discord webhook. A node that hits a provider limit waits until the reset and retries (autonomy 2 and 3). See Automations, Notifications and Usage limits.

Sessions, profiles and extensions

Each project keeps its sessions in .decsr/sessions/. decsr resume or /resume continues one, /clear starts a new one and /compact folds finished nodes into a summary. /profile saves your role settings for any project. Markdown files in .decsr/commands/ and .decsr/skills/ add your own commands and skills. Claude-format plugins add commands, skills and roles (/plugin). See Sessions, Profiles, Custom commands and skills and Plugins.

Issues and Spec Kit import

/issue <N|URL|bead-id> (or decsr issue <ref>) sends a GitHub issue or a bead to the lead as the task, and the pull request says Closes #N. /import speckit adds the open tasks of a Spec Kit tasks.md to the graph and ticks them off as nodes finish. See Start from an issue and Import from Spec Kit.

Look and feel

Messages in the feed are rendered as Markdown (switch off with ui.markdown: false). Diffs are syntax-highlighted. The theme follows your terminal, or set ui.theme: dark or light. The sidebar shows ● 3 need you, N opens the inbox and Ctrl+K opens a palette to search commands, nodes, sessions and projects. See Themes and Inbox.

Keys

With the prompt focused, every printable key is text. Tab moves focus between the prompt, sidebar and main pane. In the sidebar or main pane:

Key Action
a / A Pick a role for the node / accept all suggested roles
r / R Run the node / run all assigned nodes
s / S Stop the node / stop all
d / D Diff of the node / of the whole session
m Reply to the node
f Add a fix node after a failed Build & test
o or Enter Open the node's full output
Space Expand or collapse a card
! Shell in the node's worktree
g Switch between Activity and Graph
N Inbox: what needs you
Ctrl+K Go-to palette (works everywhere)
? Help (empty prompt)
q Quit

In the diff view: c adds a note, x deletes it, S sends the notes, n/p jump between hunks.

Command What it does
/merge Merge the session branch into your current branch
/pr, /pr watch, /pr stop Open a pull request, watch CI and review comments, stop watching
/issue, /import speckit Start from an issue / import Spec Kit tasks
/autonomy 1|2|3, /coordinator on|off, /budget Autonomy, coordinator and spending
/resume, /clear, /compact, /project, /profile Sessions, projects and profiles
/connect, /roles, /plugin, /status, /cost, /export Providers, roles, plugins, status and reports
/config Home launcher (settings and classic pipeline)

/help lists every command. Full key reference: Workspace keys and Commands.

Backends

Runner Kind Agent mode Notes
claude CLI yes Claude CLI. Worker runs are lean: they skip your global MCP servers and plugins. Set mcp: true on a role to keep them.
codex CLI yes Codex CLI.
opencode CLI yes OpenCode. The default runner.
copilot CLI no GitHub Copilot CLI.
dsh CLI yes DeepSeek Harness CLI (headless profile). Needs dsh on PATH and DEEPSEEK_API_KEY or a key saved with decsr connect deepseek.
deepseek API no Preset. Key: DEEPSEEK_API_KEY.
openai API no Preset. Needs model. Key: OPENAI_API_KEY.
openrouter API no Preset. Key: OPENROUTER_API_KEY.
groq API no Preset. Key: GROQ_API_KEY.
openai + base_url API no Any OpenAI-compatible endpoint (Together, a gateway).
ollama Local no http://127.0.0.1:11434
lmstudio Local no http://127.0.0.1:1234
mlx Local no oMLX on Apple Silicon, http://127.0.0.1:8000

API and local runners answer in text mode (plain chat, no tools). Agent mode needs claude, opencode, codex or dsh.

Connect an API provider once and decsr keeps the key (also /connect in the Workspace):

decsr connect deepseek              # asks for the key (hidden), tests it, saves it
echo "$KEY" | decsr connect groq    # or pipe the key
decsr connect --list                # saved providers with masked keys
decsr disconnect deepseek           # delete a saved key

Keys are saved in ~/.decsr/credentials.json (mode 0600) and never written to a yaml config. The environment variable wins over a saved key. See Connect a provider.

Each role can use a different runner, model, effort and mode:

agents:
  coder:
    runner: claude
    model: sonnet
    effort: high
    mode: agent
    mcp: true            # keep my own MCP servers for this role (claude only)
  qa:
    runner: deepseek
    model: deepseek-v4-flash
  docs:
    runner: openai       # custom OpenAI-compatible endpoint
    base_url: https://openrouter.ai/api/v1
    api_key_env: OPENROUTER_API_KEY
    model: deepseek/deepseek-chat

Effort levels depend on the model (for example low, medium, high, xhigh, max). effort: default leaves the choice to the provider.

Configuration

Three layers, later ones win:

  1. Built-in defaults (the project language is detected from marker files).
  2. Global user config: ~/.decsr/config.yaml.
  3. Project config: .decsr/project.yaml.
workspace:
  autonomy: 1          # 1 manual | 2 assisted | 3 unattended
  budget_usd: 5        # stop starting nodes at this spend (needs pricing:)
  coordinator: false   # lead reviews each finished batch
  isolation: ""        # "worktree", "shared" or empty for auto
ui:
  theme: auto          # auto | dark | light
  markdown: true       # false turns Markdown rendering off
  tmux: false          # true makes plain `decsr` run in tmux
notifications:
  webhook: https://ntfy.sh/<your-topic>
  webhook_format: ntfy # ntfy | slack | discord

Run decsr --tmux to keep decsr alive when the terminal closes. decsr ls lists running sessions and decsr attach comes back. Details: Detached runs.

Classic pipeline

The original pipeline is still available from the Home launcher (/config in the Workspace, then Classic pipeline). It runs Context → Spec → Plan → Tests → Implement → Build/Fix → Review → Done with human approval gates before any code is written. You can also start it from the command line:

decsr task --description "Add JWT auth to the login endpoint"                 # TUI
decsr task --description "Add JWT auth to the login endpoint" --ui plain      # headless, for CI
decsr task --from-file task.md
decsr task --description "..." --branch feat/my-feature
decsr run --requirements requirements.md                                      # legacy greenfield

Approval gates and agents

The pipeline pauses for your approval before any code is written:

  • Repository context pack — the PM writes a compact briefing (.decsr/context_pack.md) with a section you can edit. See doc/context-pack.md.
  • Task spec — title, scope and description negotiated with the PM.
  • Execution plan — the decomposition into sub-tasks (task_plan.md), pre-reviewed by Security and QA.

Agents: PM (spec, plan, arbitration), Coder (code, builds, tests), QA (tests first, code review), UX Reviewer (UX/UI review) and Security (audit).

How the pipeline works
  1. Collect context — scans the project and recalls relevant fragments from project memory.
  2. Compact context (human gate) — the PM writes the context pack; you edit and approve it.
  3. Negotiate (human gate) — the PM turns your request into a task spec; you approve or revise it in chat.
  4. Decompose (human gate) — the PM splits the spec into ordered sub-tasks, pre-reviewed by Security and QA, rendered to task_plan.md. Sub-tasks are tracked as beads, so the run is resumable.
  5. Implement and review loop (autonomous, capped):
    • A. Tests first: QA writes tests for all sub-tasks.
    • B. Implement: the Coder implements each sub-task.
    • C. Build, test, fix: one project-wide loop.
    • D. Quality review: QA, UX Reviewer and Security review. The PM arbitrates; must-fix issues become new beads and the loop restarts.
  6. Finalize — writes a summary and nice_to_have.md, updates memory and closes the beads.

An interrupted run can be resumed without re-negotiating.

Project memory

Project facts live as Markdown in .decsr/memory/: MEMORY.md (pinned facts added to every prompt), daily logs and per-task summaries. They are indexed locally for search. See doc/memory.md.

decsr memory show
decsr memory search "JWT auth"
decsr memory add "Use sqlc for typed queries"

Docs

Development

make build      # build bin/decsr
make test       # run the test suite
make lint       # vet and lint

make demo records a terminal demo with vhs from doc/demo.tape.

MIT © DECSR
✦ built in the terminal ✦

Directories

Path Synopsis
cmd
decsr command
internal
automation
Package automation holds the pieces of unattended, scheduled Workspace runs: the .decsr/automations.yaml config, a small cron parser, the run lock, the run log and the crontab lines.
Package automation holds the pieces of unattended, scheduled Workspace runs: the .decsr/automations.yaml config, a small cron parser, the run lock, the run log and the crontab lines.
beads
Package beads is a thin wrapper around the `bd` CLI from github.com/gastownhall/beads.
Package beads is a thin wrapper around the `bd` CLI from github.com/gastownhall/beads.
bus
chunker
Package chunker splits source files into syntactic units (functions, types, etc.) so they can be selected whole when a file does not fit within a token budget.
Package chunker splits source files into syntactic units (functions, types, etc.) so they can be selected whole when a file does not fit within a token budget.
contextpack
Package contextpack defines the user-editable markers and helpers for the repository context pack.
Package contextpack defines the user-editable markers and helpers for the repository context pack.
credentials
Package credentials stores API keys for hosted providers in ~/.decsr/credentials.json (directory 0700, file 0600).
Package credentials stores API keys for hosted providers in ~/.decsr/credentials.json (directory 0700, file 0600).
doctor
Package doctor checks that the machine and the effective configuration are ready to run decsr.
Package doctor checks that the machine and the effective configuration are ready to run decsr.
embedder
Package embedder produces dense vector embeddings for text snippets.
Package embedder produces dense vector embeddings for text snippets.
index
Package index stores embeddings for source-code chunks and answers nearest-neighbor queries via cosine similarity.
Package index stores embeddings for source-code chunks and answers nearest-neighbor queries via cosine similarity.
lang
Package lang detects a project's language from marker files and maps a language to its dependency, build and test commands.
Package lang detects a project's language from marker files and maps a language to its dependency, build and test commands.
memory
Package memory implements OpenClaw-style persistent project memory.
Package memory implements OpenClaw-style persistent project memory.
notify
Package notify sends best-effort desktop/terminal notifications to external tools.
Package notify sends best-effort desktop/terminal notifications to external tools.
plugins
Package plugins loads Claude-format plugins (commands, skills and agents) from <project>/.decsr/plugins and ~/.decsr/plugins.
Package plugins loads Claude-format plugins (commands, skills and agents) from <project>/.decsr/plugins and ~/.decsr/plugins.
pricing
Package pricing turns token counts into USD from the prices the user configured.
Package pricing turns token counts into USD from the prices the user configured.
tui
ui
Package ui holds the shared look of every DECSR screen: theme tokens, the theme switch and small pure components that render width-aware strings.
Package ui holds the shared look of every DECSR screen: theme tokens, the theme switch and small pure components that render width-aware strings.
workspace
Package workspace holds the node-workspace graph model, its storage, roles, the task-split prompt/parser and the scheduler.
Package workspace holds the node-workspace graph model, its storage, roles, the task-split prompt/parser and the scheduler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL