Skip to content

Commit 3ec29b7

Browse files
committed
docs: cap Python to 3.12–3.13 and update all user-facing documentation
- Set requires-python to '>=3.12,<3.14' so pip/uv reject 3.14 upfront - Add Python 3.13 classifier to pyproject.toml - Update README: tabbed install, all 6 supported agents with links, new CLI commands - Update CONTRIBUTING: expanded testing section, current project structure, prerequisites - Update docs/contributing: prerequisites, test commands, snapshot commands, code style - Update docs/index: all 6 agents in supported list and architecture diagram - Add docs/troubleshooting.md: Windows (C++ Redistributable, PowerShell, PAIR mode), macOS/Linux (tmux, permissions), General (agent detection, locks, merges, reset) - Remove all Python 3.14 workaround notes and --with-python flags from docs
1 parent e6d6de7 commit 3ec29b7

8 files changed

Lines changed: 261 additions & 38 deletions

File tree

CONTRIBUTING.md

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@ developers working on the codebase. User documentation lives in `docs/`.
55

66
## Prerequisites
77

8-
- Python 3.12+
8+
- Python 3.12 – 3.13
99
- `uv` for dependency management
1010
- A terminal that supports Textual (for running the TUI)
11-
- tmux (for PAIR mode testing)
11+
- tmux (for PAIR mode testing on macOS/Linux)
1212
- Git (for worktree functionality)
1313

1414
## Getting Started
1515

16-
Clone the repo and execute:
16+
Clone the repo and install dependencies:
17+
18+
```bash
19+
git clone https://github.com/aorumbayev/kagan.git
20+
cd kagan
21+
uv sync --dev
22+
```
23+
24+
Run the app:
1725

1826
```bash
1927
uv run kagan
@@ -46,7 +54,7 @@ uv run poe check # lint + typecheck + test
4654
## Testing
4755

4856
```bash
49-
# All tests
57+
# All tests (parallel by default)
5058
uv run pytest tests/ -v
5159

5260
# Single file
@@ -57,12 +65,22 @@ uv run pytest tests/features/test_agent_automation.py::TestIterationLoop -v
5765

5866
# Single test
5967
uv run pytest tests/features/test_agent_automation.py::TestIterationLoop::test_complete_signal_moves_to_review -v
68+
69+
# By marker
70+
uv run pytest -m unit -v # Unit tests
71+
uv run pytest -m integration -v # Integration tests
72+
uv run pytest -m e2e -v # End-to-end tests
73+
uv run pytest -m "not slow" -v # Exclude slow tests
74+
uv run pytest tests/ -n 0 -v # Sequential (for debugging)
6075
```
6176

6277
## UI Snapshots
6378

79+
Snapshot tests must run sequentially (no parallel):
80+
6481
```bash
65-
UPDATE_SNAPSHOTS=1 uv run pytest tests/test_snapshots.py --snapshot-update
82+
uv run poe test-snapshot # Run snapshot tests
83+
uv run poe test-snapshot-update # Update snapshots
6684
```
6785

6886
## Docs Preview
@@ -107,6 +125,9 @@ src/kagan/
107125
├── lock.py # Instance lock (single instance)
108126
├── git_utils.py # Git helper functions
109127
├── keybindings.py # Centralized keybinding registry (single file)
128+
├── builtin_agents.py # Built-in agent definitions (Claude, OpenCode, Codex, Gemini, Kimi, Copilot)
129+
├── preflight.py # Pre-flight checks and agent detection
130+
├── __main__.py # CLI entry point (Click-based)
110131
├── adapters/
111132
│ ├── db/ # SQLModel schema + repositories
112133
│ ├── git/ # Worktree/diff/merge adapters
@@ -139,16 +160,14 @@ src/kagan/
139160
│ ├── signals.py # Agent completion signals parser
140161
│ ├── prompt.py # Prompt building for AUTO mode
141162
│ ├── prompt_loader.py # Template loading for prompts
163+
│ ├── installer.py # Agent installation helpers
142164
│ └── config_resolver.py # Agent config resolution
143165
├── acp/ # Agent Control Protocol
144-
│ ├── agent.py # ACP Agent class (JSON-RPC over subprocess)
145-
│ ├── protocol.py # ACP protocol types
166+
│ ├── kagan_agent.py # ACP Agent class (JSON-RPC over subprocess)
146167
│ ├── messages.py # Textual messages for agent events
147168
│ ├── terminals.py # Terminal management for agents
148169
│ ├── terminal.py # Single terminal handling
149170
│ └── buffers.py # Response buffering
150-
├── data/
151-
│ └── builtin_agents.py # Built-in agent definitions (Claude, OpenCode)
152171
├── styles/
153172
│ └── kagan.tcss # ALL CSS here (no DEFAULT_CSS in Python!)
154173
└── ui/
@@ -161,10 +180,12 @@ src/kagan/
161180
│ │ ├── screen.py # KanbanScreen implementation
162181
│ │ ├── focus.py # Focus management helpers
163182
│ │ └── hints.py # Keybinding hints
164-
│ ├── planner/ # Planner screen (chat-first)
165-
│ ├── welcome.py # First-boot setup screen
166-
│ ├── task_editor.py # Task editor screen
167-
│ └── troubleshooting/ # Pre-flight check failures
183+
│ ├── planner/ # Planner screen (chat-first AI planner)
184+
│ ├── welcome.py # Project picker screen
185+
│ ├── onboarding.py # First-boot setup screen
186+
│ ├── task_editor.py # Task editor screen
187+
│ ├── repo_picker.py # Multi-repo selector
188+
│ └── troubleshooting/ # Pre-flight check failure screen
168189
├── widgets/
169190
│ ├── card.py # TaskCard widget
170191
│ ├── column.py # KanbanColumn widget
@@ -188,7 +209,10 @@ src/kagan/
188209
├── description_editor.py # Full-screen description editor
189210
├── help.py # Help modal
190211
├── tmux_gateway.py # Tmux gateway info modal
191-
├── duplicate_task.py # Duplicate task modal
212+
├── duplicate_task.py # Duplicate task modal
213+
├── global_agent_picker.py # Agent switcher modal
214+
├── agent_install.py # Agent installation modal
215+
├── agent_choice.py # Agent choice modal
192216
└── actions.py # Modal action enums
193217
```
194218

README.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,33 @@ Kagan is a terminal-based Kanban board that integrates AI agents to help you com
3434

3535
## Install
3636

37-
```bash
38-
# Standard install (requires Python 3.12+)
39-
pip install kagan
37+
=== "UV (Recommended)"
4038

41-
# Recommended: faster with uv
39+
```bash
4240
uv tool install kagan
41+
```
4342

44-
# Or all-in-one (includes uv + Python if needed)
43+
=== "Mac / Linux"
44+
45+
```bash
4546
curl -fsSL https://uvget.me/install.sh | bash -s -- kagan
4647
```
4748

49+
=== "Windows (PowerShell)"
50+
51+
```powershell
52+
iwr -useb uvget.me/install.ps1 -OutFile install.ps1; .\install.ps1 kagan
53+
```
54+
55+
=== "pip"
56+
57+
```bash
58+
pip install kagan
59+
```
60+
4861
### Requirements
4962

50-
- Python 3.12 or higher
63+
- Python 3.12 – 3.13
5164
- Git repository (for worktrees)
5265
- tmux (recommended on macOS/Linux for native PAIR terminal sessions)
5366
- VS Code or Cursor (supported PAIR launchers, especially on Windows)
@@ -59,16 +72,21 @@ curl -fsSL https://uvget.me/install.sh | bash -s -- kagan
5972
kagan # Launch TUI (default command)
6073
kagan tui # Launch TUI explicitly
6174
kagan mcp # Run as MCP server
62-
kagan tools # Stateless developer utilities
75+
kagan tools # Stateless developer utilities (prompt enhancement)
6376
kagan update # Check for and install updates
77+
kagan list # List all projects with task counts
78+
kagan reset # Reset data (interactive)
6479
kagan --help # Show all options
6580
```
6681

6782
## Supported AI CLIs
6883

69-
- Claude Code
70-
- OpenCode
71-
- *More coming soon*
84+
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (Anthropic)
85+
- [OpenCode](https://opencode.ai/docs) (SST)
86+
- [Codex](https://github.com/openai/codex) (OpenAI)
87+
- [Gemini CLI](https://github.com/google-gemini/gemini-cli) (Google)
88+
- [Kimi CLI](https://github.com/MoonshotAI/kimi-cli) (Moonshot AI)
89+
- [GitHub Copilot](https://github.com/github/copilot-cli) (GitHub)
7290

7391
## Documentation
7492

docs/contributing.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ We welcome contributions to Kagan! This page provides quick links to get started
1111
| Pull Requests | [GitHub PRs](https://github.com/aorumbayev/kagan/pulls) |
1212
| Discussions | [GitHub Discussions](https://github.com/aorumbayev/kagan/discussions) |
1313

14+
## Prerequisites
15+
16+
- Python 3.12 – 3.13
17+
- `uv` for dependency management
18+
- Git (for worktree functionality)
19+
- tmux (for PAIR mode testing on macOS/Linux)
20+
1421
## Development Setup
1522

1623
```bash
@@ -37,21 +44,23 @@ uv run poe check
3744
## Code Style
3845

3946
- Python 3.12+ with type annotations
40-
- Ruff for linting and formatting
47+
- Ruff for linting and formatting (line length 100)
4148
- CSS in `.tcss` files only (no `DEFAULT_CSS`)
4249
- All keybindings defined in `keybindings.py`
50+
- Use `from __future__ import annotations` in every file
4351

4452
## Testing
4553

4654
```bash
47-
uv run pytest tests/ -v # All tests (parallel by default)
48-
uv run pytest tests/e2e/test_critical_flows.py # Single test file
49-
uv run pytest tests/e2e/test_critical_flows.py::TestAutoTaskLifecycle::test_auto_full_lifecycle # Single test function
50-
uv run pytest -m unit # Unit tests only
51-
uv run pytest -m integration # Integration tests
52-
uv run pytest -m e2e # End-to-end tests
53-
uv run pytest -m "not slow" # Exclude slow tests
54-
uv run pytest tests/ -n 0 # Sequential (for debugging)
55+
uv run pytest tests/ -v # All tests (parallel by default)
56+
uv run pytest tests/features/ -v # Feature tests
57+
uv run pytest -m unit -v # Unit tests only
58+
uv run pytest -m integration -v # Integration tests
59+
uv run pytest -m e2e -v # End-to-end tests
60+
uv run pytest -m "not slow" -v # Exclude slow tests
61+
uv run pytest tests/ -n 0 -v # Sequential (for debugging)
62+
uv run poe test-snapshot # Snapshot tests (sequential only)
63+
uv run poe test-snapshot-update # Update snapshots
5564
```
5665

5766
## Docs Preview

docs/index.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ flowchart TB
201201
subgraph Agents["AI Agents"]
202202
Claude["Claude Code"]
203203
OpenCode["OpenCode"]
204+
Codex["Codex"]
205+
Gemini["Gemini CLI"]
206+
Kimi["Kimi CLI"]
207+
Copilot["GitHub Copilot"]
204208
end
205209
206210
Agents --> Code
@@ -255,7 +259,9 @@ AUTO tasks have automatic state transitions driven by the agent. PAIR tasks are
255259

256260
## Supported AI CLIs
257261

258-
- **Claude Code** (Anthropic)
259-
- **OpenCode** (open source)
260-
261-
Coming soon: Gemini, Codex, and more.
262+
- **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** (Anthropic)
263+
- **[OpenCode](https://opencode.ai/docs)** (SST)
264+
- **[Codex](https://github.com/openai/codex)** (OpenAI)
265+
- **[Gemini CLI](https://github.com/google-gemini/gemini-cli)** (Google)
266+
- **[Kimi CLI](https://github.com/MoonshotAI/kimi-cli)** (Moonshot AI)
267+
- **[GitHub Copilot](https://github.com/github/copilot-cli)** (GitHub)

docs/troubleshooting.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Troubleshooting
2+
3+
Common issues and solutions when running Kagan.
4+
5+
## Windows
6+
7+
### Microsoft Visual C++ Redistributable
8+
9+
Some Python packages used by Kagan include native extensions that require the
10+
Microsoft Visual C++ Redistributable. If you see build errors mentioning missing
11+
`vcruntime` or `cl.exe`, install the redistributable:
12+
13+
**Download:** [Microsoft Visual C++ Redistributable](https://go.microsoft.com/fwlink/?LinkID=135170)
14+
15+
After installing, restart your terminal and retry the Kagan installation.
16+
17+
### Windows Installation (PowerShell)
18+
19+
The recommended way to install Kagan on Windows is with the all-in-one installer that
20+
bundles `uv` and a compatible Python version:
21+
22+
```powershell
23+
iwr -useb uvget.me/install.ps1 -OutFile install.ps1; .\install.ps1 kagan
24+
```
25+
26+
Alternatively, if you already have `uv` and Python 3.12+ installed:
27+
28+
```powershell
29+
uv tool install kagan
30+
```
31+
32+
### PAIR Mode on Windows
33+
34+
Windows does not support tmux natively. Kagan defaults to VS Code as the PAIR terminal
35+
backend on Windows. You can also use Cursor:
36+
37+
```toml
38+
[general]
39+
default_pair_terminal_backend = "vscode" # or "cursor"
40+
```
41+
42+
Make sure `code` (VS Code) or `cursor` is available in your PATH.
43+
44+
## macOS / Linux
45+
46+
### tmux Not Found
47+
48+
PAIR mode defaults to tmux on macOS and Linux. Install it:
49+
50+
```bash
51+
# macOS
52+
brew install tmux
53+
54+
# Debian / Ubuntu
55+
sudo apt install tmux
56+
57+
# Fedora / RHEL
58+
sudo dnf install tmux
59+
```
60+
61+
Alternatively, switch to VS Code or Cursor as the PAIR backend:
62+
63+
```toml
64+
[general]
65+
default_pair_terminal_backend = "vscode"
66+
```
67+
68+
### Permission Denied on Install Script
69+
70+
If the `curl` install script fails with a permission error:
71+
72+
```bash
73+
curl -fsSL https://uvget.me/install.sh | bash -s -- kagan
74+
```
75+
76+
Try running with explicit permission:
77+
78+
```bash
79+
curl -fsSL https://uvget.me/install.sh -o install.sh && chmod +x install.sh && ./install.sh kagan
80+
```
81+
82+
## General
83+
84+
### Agent Not Detected
85+
86+
Kagan auto-detects installed AI CLI agents on startup. If your agent is not detected:
87+
88+
1. Make sure the agent's CLI binary is in your `PATH`
89+
2. Run `which claude`, `which opencode`, `which gemini`, etc. to verify
90+
3. Restart your terminal after installing an agent
91+
4. Check the Debug Log (++f12++) for detection details
92+
93+
### Instance Lock Error
94+
95+
Kagan enforces one instance per repository. If you see "instance locked":
96+
97+
1. Close any other running Kagan instances for the same repo
98+
2. If the lock is stale (e.g. after a crash), use `kagan reset` to clean up
99+
3. Or delete the lock file manually from the XDG data directory
100+
101+
### Merge Conflicts
102+
103+
If a merge fails in REVIEW:
104+
105+
1. Kagan shows merge readiness (Ready / At Risk / Blocked) before you merge
106+
2. Use the resolve action in Task Details to open a terminal in the merge worktree
107+
3. Fix conflicts manually, then retry the merge
108+
4. Consider enabling `serialize_merges = true` in config to reduce conflicts when running
109+
multiple parallel agents
110+
111+
### Small Terminal Window
112+
113+
Kagan requires a minimum terminal size of 80 columns by 20 rows. If the UI looks broken,
114+
resize your terminal window or reduce the font size.
115+
116+
### Database Reset
117+
118+
If you need a fresh start:
119+
120+
```bash
121+
# Interactive reset (choose what to reset)
122+
kagan reset
123+
124+
# Nuclear reset (removes all data)
125+
kagan reset --force
126+
```
127+
128+
Data is stored in XDG-compliant locations:
129+
130+
- Database: `~/.local/share/kagan/kagan.db`
131+
- Config: `~/.config/kagan/config.toml`
132+
- Worktrees: system temp directory (e.g., `/var/tmp/kagan/worktrees/`)

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,5 @@ nav:
103103
- Multi-Repo Guide: multi-repo-guide.md
104104
- Keyboard Shortcuts: keybindings.md
105105
- Configuration: config.md
106+
- Troubleshooting: troubleshooting.md
106107
- Contributing: contributing.md

0 commit comments

Comments
 (0)