Skip to content

Commit 9461925

Browse files
aorumbayevclaude
andcommitted
chore: fix docs accuracy and remove dead event_bus param
Correct factual errors in internal and public docs before production release: default backend "claude" → "claude-code", _git.py → git.py, add missing server route files and core modules to architecture trees, replace nonexistent plugin endpoints with actual API, clarify persona pipeline is orchestrator-driven, fix KanbanChatScreen misnomer, remove placeholder PGP block, use "14+" instead of hardcoded agent count. Remove dead event_bus parameter from Events.__init__ left over from EventBus removal refactor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent da5072c commit 9461925

File tree

11 files changed

+55
-31
lines changed

11 files changed

+55
-31
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hide:
88

99
# Your agents work. You decide.
1010

11-
Fourteen AI agents. One board. Every task tracked from backlog to merge -- while you keep your hands on the wheel.
11+
14+ AI agents. One board. Every task tracked from backlog to merge -- while you keep your hands on the wheel.
1212

1313
Kagan is a keyboard-first Kanban TUI that orchestrates coding agents across the full task lifecycle. Plan. Run. Review. Merge. No context lost between steps, no state scattered across terminals.
1414

docs/internal/architecture/core.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ kagan/core/
5050
├── enums.py # TaskStatus, SessionStatus, Priority, SessionEventType
5151
├── errors.py # KaganError hierarchy
5252
53-
├── _git.py # git operations wrapper
53+
├── git.py # git operations wrapper (public module)
5454
├── _acp.py # ACP adapter: KaganACPClient + event mapping
5555
├── _agent.py # agent backend registry + launcher
5656
├── _asyncio_compat.py # asyncio compatibility shims
@@ -73,14 +73,26 @@ kagan/core/
7373
├── _tasks.py # task repository
7474
├── _transitions.py # task lifecycle state machine
7575
├── _utils.py # utility functions
76+
├── _watcher.py # DBWatcher: filesystem DB change watcher
7677
├── _worktrees.py # worktree management logic
7778
79+
├── _agent_monitor.py # post-agent evaluation and rebase helpers
80+
├── _checkpoints.py # task execution checkpoints (create, list, rewind, cleanup)
81+
├── _compaction.py # database compaction
82+
├── _event_rendering.py # event display rendering helpers
83+
├── _hooks.py # hook system (Hook, HookRunner, HookContext)
84+
├── _insights.py # project insight extraction with decay and relevance
85+
├── _prompt_export.py # prompt export functionality
86+
├── _security.py # security helpers
87+
├── _session_helpers.py # session utility functions
88+
├── _verification.py # step-level verification tracking for acceptance criteria
89+
7890
└── adapters/ # adapter sub-package
7991
├── __init__.py
8092
└── db/ # database adapters
8193
```
8294

83-
~31 files. Flat structure with private modules (underscore prefix) and adapters sub-package.
95+
~42 files. Flat structure with private modules (underscore prefix) and adapters sub-package.
8496

8597
## Frontend Construction
8698

@@ -301,7 +313,7 @@ DONE ───────► BACKLOG (via task.set_status)
301313

302314
Direct DONE from `task.set_status()` is blocked; only `review.merge()` can transition to DONE.
303315

304-
### `_git.py` — Git Operations
316+
### `git.py` — Git Operations
305317

306318
Created per-repo via `client._git_for_task()`. Operations: `worktree_add`, `worktree_remove`, `diff`, `merge`, `rebase`, etc.
307319

docs/internal/architecture/server.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ ______________________________________________________________________
3636
src/kagan/server/
3737
├── __init__.py # re-export create_api_server
3838
├── server.py # ApiServer factory, entry point
39-
├── _routes.py # Core REST API + SSE event stream (tasks, projects, settings)
39+
├── _routes.py # Route dispatcher: imports and registers task, project, system routes
40+
├── _task_routes.py # Task REST endpoints (CRUD, run, cancel, review)
41+
├── _project_routes.py # Project REST endpoints
42+
├── _system_routes.py # System endpoints (preflight, settings, presence)
4043
├── _chat_routes.py # Chat REST + SSE streaming routes (orchestrator sessions)
41-
├── _plugin_routes.py # Plugin-specific REST routes (sync, preflight)
44+
├── _plugin_routes.py # Plugin REST routes (list, preflight, detect-repo, import)
4245
├── _sse.py # SSE streaming helpers (event generator, keepalive)
4346
├── _access.py # Access control helpers (HTTP access tiers for REST routes)
4447
├── _helpers.py # Route helper functions (JSON response builders, error formatting)
@@ -64,8 +67,9 @@ ______________________________________________________________________
6467

6568
1. Calls `kagan.server.mcp.server.create_server(opts.mcp_opts)`.
6669
1. Registers a `/health` endpoint.
67-
1. Calls `register_routes(mcp)` to add the REST API and SSE event stream.
70+
1. Calls `register_routes(mcp)` — dispatches to `_task_routes`, `_project_routes`, `_system_routes`, and adds the SSE event stream.
6871
1. Calls `register_chat_routes(mcp)` to add chat REST + SSE streaming.
72+
1. Calls `register_plugin_routes(mcp)` to add plugin REST routes.
6973

7074
______________________________________________________________________
7175

docs/internal/architecture/tui.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ KaganApp (Textual App)
7575
│ ├── Session sidebar # Searchable orchestrator conversation list
7676
│ └── ChatPanel # Full-width main conversation surface
7777
78-
├── KanbanChatScreen # Dedicated kanban + chat (orchestrator / task chat modes)
78+
├── (kanban_chat helpers) # ACP payload extraction, stream chunk helpers (not a Screen)
7979
8080
├── TaskScreen # Primary task detail screen pushed from kanban after inspector-open
8181
@@ -274,7 +274,7 @@ src/kagan/tui/
274274
│ ├── welcome.py # WelcomeScreen
275275
│ ├── setup.py # OnboardingFlow (modal)
276276
│ ├── kanban.py # KanbanScreen
277-
│ ├── kanban_chat.py # KanbanChatScreen
277+
│ ├── kanban_chat.py # ACP payload + stream chunk helpers (not a Screen class)
278278
│ ├── workspace.py # WorkspaceScreen
279279
│ ├── task_screen.py # TaskScreen
280280
│ ├── session_dashboard.py # SessionDashboardScreen

docs/internal/features/core.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,12 @@ ______________________________________________________________________
119119

120120
- Four built-in personas: `analyst`, `planner`, `implementer`, `reviewer`
121121
- Each persona has a distinct prompt profile tuned to its role
122-
- Run a persona against a repo for structured analysis (`audit_repo`)
122+
- Activate a persona per session via `run_start(task_id, persona="implementer")`
123123
- Import persona presets from GitHub repos (subject to whitelist)
124124
- Export persona presets to GitHub repos
125125
- Manage an import whitelist of approved persona source repos
126-
- Multi-session task execution: run a task through a sequence of personas in order (analyst → planner → implementer → reviewer) without manual handoff between sessions
126+
- Audit persona repositories for preset structure and validity (`audit_repo`)
127+
- Multi-session sequencing is orchestrator-driven: the orchestrator agent plans and starts sequential persona sessions via MCP tools, not an automated Python-level pipeline
127128

128129
______________________________________________________________________
129130

docs/internal/features/server.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,22 +164,38 @@ ______________________________________________________________________
164164

165165
## Plugin Routes
166166

167-
Plugins can be synced and checked via REST without restarting the server.
167+
Plugins can be listed, checked, and imported via REST without restarting the server.
168168

169-
### Syncing plugins
169+
### List plugins
170170

171-
Triggers discovery and registration of all installed plugins:
171+
Returns all registered plugins:
172172

173173
```bash
174-
curl -X POST http://localhost:8765/api/plugins/sync
174+
curl http://localhost:8765/api/plugins
175175
```
176176

177-
### Preflight check
177+
### Preflight check (per plugin)
178178

179-
Returns readiness status for each registered plugin:
179+
Returns readiness status for a specific plugin:
180180

181181
```bash
182-
curl http://localhost:8765/api/plugins/preflight
182+
curl http://localhost:8765/api/plugins/{name}/preflight
183+
```
184+
185+
### Detect repo
186+
187+
Detect repo metadata for a specific plugin:
188+
189+
```bash
190+
curl http://localhost:8765/api/plugins/{name}/detect-repo
191+
```
192+
193+
### Import
194+
195+
Import a plugin by name:
196+
197+
```bash
198+
curl -X POST http://localhost:8765/api/plugins/{name}/import
183199
```
184200

185201
______________________________________________________________________

docs/reference/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Files: `config.toml`, `kagan.db`, core runtime (`endpoint.json`, `token`, etc.).
2323

2424
```toml
2525
[general]
26-
default_agent_backend = "claude"
26+
default_agent_backend = "claude-code"
2727
auto_skill_discovery = false
2828
review_strictness = "balanced"
2929
additional_instructions = "Use conventional commit format"
@@ -45,7 +45,7 @@ max_concurrent_agents = 3
4545
| `auto_skill_discovery` | boolean | `false` | Enable trusted local skill metadata discovery for orchestrator `/skills` |
4646
| `require_review_approval` | boolean | `false` | Require review approval before merge |
4747
| `serialize_merges` | boolean | `true` | Queue merge actions |
48-
| `default_agent_backend` | string | `"claude"` | Default worker agent |
48+
| `default_agent_backend` | string | `"claude-code"` | Default worker agent |
4949
| `additional_instructions` | string | `""` | Free-text rules appended to every agent prompt |
5050
| `review_strictness` | string | `"balanced"` | Review rigor. Allowed: `strict`, `balanced`, `relaxed` |
5151
| `planning_depth` | string | `"always"` | When to create task plans. Allowed: `always`, `multi_task`, `never` |

docs/security.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -452,13 +452,7 @@ If you discover a security vulnerability in Kagan, please report it responsibly:
452452

453453
**Email:** `security@kagan.sh`
454454

455-
**PGP Key:** (Placeholder — contact security@kagan.sh for the current PGP key)
456-
457-
```
458-
-----BEGIN PGP PUBLIC KEY BLOCK-----
459-
[Placeholder - PGP key will be provided upon request]
460-
-----END PGP PUBLIC KEY BLOCK-----
461-
```
455+
**PGP Key:** Contact security@kagan.sh to request the current PGP key for encrypted communication.
462456

463457
### Responsible Disclosure
464458

src/kagan/core/_events.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,9 @@ def __init__(
311311
self,
312312
engine: Engine,
313313
signals: dict[str, asyncio.Event],
314-
event_bus: Any = None,
315314
) -> None:
316315
self._engine = engine
317316
self._signals = signals
318-
self._event_bus = None
319317
self._live_queues: dict[str, list[_BoundedEventQueue[SessionEvent]]] = {}
320318
self._global_live_queues: list[_BoundedEventQueue[SessionEvent]] = []
321319
self._board_live_queues: list[_BoundedEventQueue[BoardEvent]] = []

src/kagan/core/_tasks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ def __init__(
493493
self.events = Events(
494494
engine,
495495
signals,
496-
event_bus=None,
497496
)
498497
self.sessions = Sessions(
499498
engine,

0 commit comments

Comments
 (0)