A markdown file-based CLI for software development with multi-agent council design, markdown tickets, and background worker loops.
Project description
Kingdom
Kingdom (kd) is a markdown file-based CLI for software development: design with a multi-agent council, track work as markdown tickets, and run background RALPH loops with worker peasants.
The kingdom metaphor is intentional: you are the King, debate your design documents with a council of frontier coding agent CLIs you already use (Claude Code and Codex), break the design into modular markdown tickets, and then peasants execute those tickets in parallel worktrees.
Gastown minus the polecats.
Why
- Multi-agent council — get perspectives from multiple frontier coding models, not just one opinion. Different models catch different things.
- Ticket-based execution — breaking work into scoped tickets fights context rot, lets you use cheaper models for already-designed work, or run tickets in parallel.
- Multi-agent reviews — reviews across models consistently catch bugs that single-agent reviews miss.
- Plain markdown files — tickets, designs, and council threads are all markdown. Your coding agents are already good at finding, reading, and updating markdown.
- CLI + TUI — the TUI is for humans; agent CLIs use
kddirectly to ask the council or other agents for opinions. - Worklog audit trail — peasant worklogs capture decisions, bugs encountered, and test results in the ticket markdown, committed to git. You can always see why something was done, not just the diff.
Install
uv tool install kingdom-cli
Workflow Scales
kd scales down gracefully. You pick the parts of the workflow that fit the size of the work.
Full workflow (new features)
Design with the council, break into tickets, dispatch peasants, review, and merge.
kd start # initialize branch session
kd council chat --new # discuss design with the council TUI
kd design approve # lock in the design
# create tickets from the design (via the kingdom skill or manually)
kd peasant start <id> # dispatch parallel workers
kd peasant review <id> # review completed work
kd peasant accept <id> # accept and close, or reject with feedback
kd done # archive and clean up
Medium workflow (refactors, smaller features)
Pull tickets into a branch, work them directly or with peasants. No design phase needed.
kd start
kd tk pull <id> <id> # pull backlog tickets onto this branch
kd tk start <id> # work tickets one at a time
kd tk close <id>
kd done
Lightweight workflow (bug fixes)
Work a single ticket, close it, make a PR. Or batch several bug-fix tickets on one branch.
kd start
kd tk create "fix: login redirect loop"
kd tk start <id>
# ... fix the bug ...
kd tk close <id>
kd done
Design docs, council sessions, and peasant workers are all optional. A branch with one ticket and no design doc is a perfectly valid kd workflow.
Getting Started
kd start # start a session on the current branch
Configure council agent CLIs in .kd/config.json (check effective config with kd config show).
Chat Modes
The council chat TUI (kd council chat) supports four modes, configured via council.chat.mode:
| Mode | First turn | Auto-turns | Default |
|---|---|---|---|
natural |
parallel broadcast | shuffled round-robin | yes |
round_robin |
sequential fixed-order | sequential fixed-order | |
manual |
only @mentioned | only @mentioned | |
broadcast |
parallel to all | parallel to all |
LLM-to-LLM @mentions in responses automatically bump the mentioned member to the front of the auto-turn queue.
How It Works
All state lives in .kd/ as plain Markdown and JSON files, tracked in git alongside your code:
.kd/
├── branches/ # Active branch work
│ └── feature-oauth-refresh/
│ ├── design.md # Design document
│ ├── breakdown.md # Ticket breakdown
│ ├── tickets/ # Branch-specific tickets
│ │ ├── a1b2.md
│ │ └── c3d4.md
│ └── threads/ # Council discussion threads
├── backlog/ # Unassigned tickets
│ └── tickets/
├── archive/ # Completed branches
└── worktrees/ # Git worktrees (gitignored)
No database. No server. Just files on disk.
Commands
| Group | Description |
|---|---|
kd start / kd done / kd status |
Branch lifecycle — initialize, finish, and inspect sessions |
kd design |
Manage design documents (show, approve) |
kd council |
Multi-model council — ask, chat, review, show, list, watch, reset, retry |
kd ticket (alias kd tk) |
Ticket management — create, list, show, start, close, deps, and more |
kd peasant |
Worker agents — start, stop, review, accept, reject, msg, read, watch |
kd config |
View and manage configuration |
kd doctor |
Check config and agent CLIs |
Run kd <command> --help for full flags and options.
Development
uv sync
source .venv/bin/activate
pytest tests/
License
Apache-2.0 — see LICENSE for details.
Project details
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 kingdom_cli-0.3.1.tar.gz.
File metadata
- Download URL: kingdom_cli-0.3.1.tar.gz
- Upload date:
- Size: 265.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f48353b5ce57954f0c35bc0d0af80bc6c52ebeef1b2c6a6954a875c7c8fce76d
|
|
| MD5 |
2d20baf64c9d8b3e3d4dbd04ebeaca5d
|
|
| BLAKE2b-256 |
ca990ccb7d5e9f8f66a103602069c01ccf89d89e463868dea5aa947b09f323e2
|
Provenance
The following attestation bundles were made for kingdom_cli-0.3.1.tar.gz:
Publisher:
release.yml on jbohnslav/kingdom
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kingdom_cli-0.3.1.tar.gz -
Subject digest:
f48353b5ce57954f0c35bc0d0af80bc6c52ebeef1b2c6a6954a875c7c8fce76d - Sigstore transparency entry: 1019184707
- Sigstore integration time:
-
Permalink:
jbohnslav/kingdom@3741a263215422f86d60713dc03e3577d66829f0 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/jbohnslav
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3741a263215422f86d60713dc03e3577d66829f0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kingdom_cli-0.3.1-py3-none-any.whl.
File metadata
- Download URL: kingdom_cli-0.3.1-py3-none-any.whl
- Upload date:
- Size: 142.7 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 |
69ed847a55c37eea7d256f26c782d9d742d0a6daa4ae04996b396802707061e3
|
|
| MD5 |
cef86c9e188b91eb338ba9722dd77b6d
|
|
| BLAKE2b-256 |
28ac3ef8c2977e08d1a2efc3f550c569254f0ac3fdb0c17fd64b3d5539a45bc7
|
Provenance
The following attestation bundles were made for kingdom_cli-0.3.1-py3-none-any.whl:
Publisher:
release.yml on jbohnslav/kingdom
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kingdom_cli-0.3.1-py3-none-any.whl -
Subject digest:
69ed847a55c37eea7d256f26c782d9d742d0a6daa4ae04996b396802707061e3 - Sigstore transparency entry: 1019184715
- Sigstore integration time:
-
Permalink:
jbohnslav/kingdom@3741a263215422f86d60713dc03e3577d66829f0 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/jbohnslav
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3741a263215422f86d60713dc03e3577d66829f0 -
Trigger Event:
push
-
Statement type: