@@ -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
1927uv 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)
5058uv 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
5967uv 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
0 commit comments