kanbango 3.6.2 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -8,17 +8,24 @@ Source of truth: `agent-playbook.js` (also MCP tool descriptions + `kanban_read`
8
8
 
9
9
  - hierarchy: epic (context) → task (work+plan) → subtasks (steps)
10
10
  - list: `col` filter, `view=summary`; keep `task_id`s; no full-board re-list after every write
11
- - list_epics default = live only (hides done + archived); `include_archived` / `status` to widen
12
- - list tasks default hides tasks under done/archived epics; show/show_epic by id always works
13
- - show: `view=execution` while coding; `full` only if needed
14
- - show task returns `epic_goals` (parent compass; `""` if none) check drift vs goal
11
+ - context: omit `operation` = context (wake compass: unblocked active, failed/blocked gate, manual testing/review, else next unblocked planned, else idle); optional `epic`
12
+ - after context: one `show` `view=planning` or `view=execution`; do not re-list
13
+ - `PARSE_ERROR`: corrupt JSON on list/context is an error with file path — never a partial board
14
+ - `depends_on` must be done before active/gates (`TASK_BLOCKED`); cycle `CIRCULAR_DEPENDENCY`; `files[]` = touched paths
15
+ - list_epics default = live only (hides done + archived); `include_archived` / `include_done` / `status` to widen
16
+ - list default hides column=done and tasks under done/archived epics; `include_done`/`include_archived` or `col=done` to widen; show/show_epic by id always works
17
+ - show: `view=planning` for SPEC; `view=execution` while coding; `full` only if needed
18
+ - planning/full task views may return `epic_goals` as the parent compass; empty fields are omitted — check drift vs goal
15
19
  - log architecture decisions: `update` `adr={decision,why}` append; `show_epic` full rolls up `adrs`
16
20
  - epic_create with description/goals; create tasks with `epic=E001` (prefer id)
17
21
  - create once with `description`, `specs`, `in_scope`, `out_of_scope`, `acceptance_criteria`
18
- - move/update/delete: `return=none`; subtasks = full array replace (no toggle)
22
+ - move/update/delete/plan_*: `return=none`; subtasks = full array replace (no toggle)
19
23
  - cleanup: `delete` (task), `epic_delete` (cascade), `epic_archive` / `epic_unarchive`
20
- - non-trivial work: `plan_create``plan_advance``plan_evidence` (real tests, truncated logs) → `plan_done`
24
+ - `steps` on create/plan_create → subtasks (no forced TDD); runner optional; optional plan_*: plan_create → plan_advance → plan_evidence (diff|summary|test_command) → plan_done
25
+ - enter testing|review (and done when gates on) only with `evidence[]` having `diff|summary|test_command`; fail/blocked cannot skip forward — `EVIDENCE_REQUIRED`
26
+ - errors: `next_tool_call` only when repair is unique (`TASK_NOT_FOUND`, `INVALID_TRANSITION`); omit otherwise
21
27
  - gui: `status` before `start`; `stop` only owned; `external_running` = do not kill
28
+ - core board has no QA/review dependency; testing/review columns and agent spawns are opt-in
22
29
 
23
30
  ## Build & Development Commands
24
31
 
@@ -37,19 +44,17 @@ npm run mcp
37
44
  # or
38
45
  node mcp-server.js
39
46
 
40
- # Run tests (lists tasks in JSON format)
47
+ # Full suite (tests/run.js)
41
48
  npm test
42
- # or
43
- node bin/kanban.js list --json
44
49
 
45
50
  # Initialize backlog structure
46
51
  node bin/kanban.js init
47
52
  ```
48
53
 
49
54
  ### Testing
50
- The project uses a simple test command that verifies the CLI works:
51
55
  ```bash
52
56
  npm test
57
+ # single file: node tests/kanban.test.js
53
58
  ```
54
59
 
55
60
  **Single test verification:**
@@ -78,15 +83,17 @@ npm install -g .
78
83
  ### File Structure
79
84
  ```
80
85
  kanbango/
81
- ├── bin/ # CLI executables
82
- ├── kanban.js # Main CLI with web server
83
- │ └── kanban-cmd.js # Alternative CLI (symlink to kanban.js)
84
- ├── kanban.js # Core business logic module
85
- ├── mcp-server.js # MCP server implementation
86
- ├── index.js # Main entry point (module exports)
86
+ ├── bin/kanban.js # CLI + web GUI (bin names: kanban, kanban-cmd)
87
+ ├── kanban.js # Core board logic
88
+ ├── mcp-server.js # MCP server
89
+ ├── workflow.js # Gates + agent spawn
90
+ ├── plan.js # Optional plan_* workflow
91
+ ├── agent-playbook.js # Agent token rules (MCP help)
92
+ ├── index.js # Package exports
87
93
  ├── index.html # Web GUI
88
- ├── backlog/ # Task storage (gitignored)
89
- └── examples/ # Usage examples
94
+ ├── agents/ # qa-tester, temida, qa-e2e-tester
95
+ ├── tests/ # *.test.js + run.js
96
+ └── backlog/ # Task storage (gitignored)
90
97
  ```
91
98
 
92
99
  ### Imports
package/API.md CHANGED
@@ -1,185 +1,73 @@
1
1
  # Kanban API for AI Agents
2
2
 
3
- Documentation for interacting with local Kanban system (kanban.py).
4
-
5
- ## Available Functions
6
-
7
- ```json
8
- {
9
- "type": "function",
10
- "name": "kanban_list",
11
- "description": "Get list of all tasks from kanban. Optionally filter by column or epic group.",
12
- "parameters": {
13
- "type": "object",
14
- "properties": {
15
- "col": {
16
- "type": "string",
17
- "enum": ["active", "planned", "icebox", "done"],
18
- "description": "Optionally filter by column"
19
- },
20
- "epic": {
21
- "type": "string",
22
- "description": "Optionally filter by epic group"
23
- },
24
- "as_json": {
25
- "type": "boolean",
26
- "default": true,
27
- "description": "Return result as JSON"
28
- }
29
- },
30
- "additionalProperties": false
31
- }
32
- }
33
- ```
3
+ Canonical agent rules: `agent-playbook.js` (`kanban_read` `operation=help`).
4
+ This file is the human map of MCP tools, views, and CLI. Storage is JSON under `backlog/`.
34
5
 
35
- ```json
36
- {
37
- "type": "function",
38
- "name": "kanban_show",
39
- "description": "Get detailed information about a specific task, including subtask list.",
40
- "parameters": {
41
- "type": "object",
42
- "properties": {
43
- "task_id": {
44
- "type": "string",
45
- "description": "Numeric task ID (e.g. '014')"
46
- }
47
- },
48
- "required": ["task_id"],
49
- "additionalProperties": false
50
- }
51
- }
52
- ```
6
+ ## MCP tools
53
7
 
54
- ```json
55
- {
56
- "type": "function",
57
- "name": "kanban_add",
58
- "description": "Create new task in kanban in specified column and optional epic group.",
59
- "parameters": {
60
- "type": "object",
61
- "properties": {
62
- "title": {
63
- "type": "string",
64
- "description": "Title of new task"
65
- },
66
- "col": {
67
- "type": "string",
68
- "enum": ["active", "planned", "icebox", "done"],
69
- "default": "planned",
70
- "description": "Column to place task in"
71
- },
72
- "epic": {
73
- "type": "string",
74
- "default": "—",
75
- "description": "Epic group (optional)"
76
- }
77
- },
78
- "required": ["title"],
79
- "additionalProperties": false
80
- }
81
- }
82
- ```
8
+ Three tools. `tools/list` descriptions are short; full playbook is `help`.
83
9
 
84
- ```json
85
- {
86
- "type": "function",
87
- "name": "kanban_move",
88
- "description": "Move existing task to different column.",
89
- "parameters": {
90
- "type": "object",
91
- "properties": {
92
- "task_id": {
93
- "type": "string",
94
- "description": "Task ID to move"
95
- },
96
- "column": {
97
- "type": "string",
98
- "enum": ["active", "planned", "icebox", "done"],
99
- "description": "New column"
100
- }
101
- },
102
- "required": ["task_id", "column"],
103
- "additionalProperties": false
104
- }
105
- }
106
- ```
10
+ ### `kanban_read`
107
11
 
108
- ```json
109
- {
110
- "type": "function",
111
- "name": "kanban_update",
112
- "description": "Update task fields, including the full subtasks list.",
113
- "parameters": {
114
- "type": "object",
115
- "properties": {
116
- "task_id": {
117
- "type": "string",
118
- "description": "Parent task ID"
119
- },
120
- "subtasks": {
121
- "type": "array",
122
- "items": {
123
- "type": "object",
124
- "properties": {
125
- "id": { "type": "string" },
126
- "text": { "type": "string" },
127
- "done": { "type": "boolean" },
128
- "description": { "type": "string" }
129
- }
130
- }
131
- }
132
- },
133
- "required": ["task_id", "subtasks"],
134
- "additionalProperties": false
135
- }
136
- }
137
- ```
12
+ | operation | Role |
13
+ |-----------|------|
14
+ | *(omit)* / `context` | Wake compass: unblocked active, failed/blocked gate, manual testing/review, else next unblocked planned, else idle. Then one `show` (planning/execution). Corrupt JSON → `PARSE_ERROR` |
15
+ | `list` | Tasks. Default `view=summary`. Hides `column=done` and tasks under done/archived epics |
16
+ | `show` | One task (`task_id` required). `view=planning` for SPEC, `execution` while coding, `full` only if needed |
17
+ | `list_epics` | Live epics only (hides done + archived) |
18
+ | `show_epic` | One epic (`epic_id`) |
19
+ | `help` | Playbook from `agent-playbook.js` (no board I/O) |
138
20
 
139
- ## Usage Examples
21
+ Widen lists with `include_done`, `include_archived`, `col=done`, or `status`. `show` / `show_epic` by id always work.
140
22
 
141
- ```bash
142
- # List all tasks (JSON)
143
- python kanban.py list --json
23
+ ### `kanban_manage`
144
24
 
145
- # List only active tasks
146
- python kanban.py list --col active --json
25
+ | action | Role |
26
+ |--------|------|
27
+ | `create` | Task. Hard-required: `title`. Returns `{ok, id, missing?}` not a full echo |
28
+ | `move` | `task_id` + `column` |
29
+ | `update` | Field patch. `subtasks` = full array replace. `adr={decision,why}` appends |
30
+ | `delete` | Task |
31
+ | `epic_create` / `epic_update` / `epic_archive` / `epic_unarchive` / `epic_delete` | Epic containers (`epic_delete` cascades children) |
32
+ | `plan_create` / `plan_advance` / `plan_evidence` / `plan_done` / `plan_status` | Optional accepted-plan workflow |
147
33
 
148
- # Show task details
149
- python kanban.py show 014
34
+ Writes default `return=none` (including `plan_*`). Use `summary` or `full` only when you need the shaped task or plan echo back.
150
35
 
151
- # Add new task
152
- python kanban.py add "New function" --col planned --epic "Faza 6"
36
+ ### `kanban_gui`
153
37
 
154
- # Move task to different column
155
- python kanban.py move 014 active
38
+ `status` before `start`. `stop` kills only the GUI this MCP spawned. `external_running` = do not kill.
156
39
 
157
- # Update subtasks
158
- python kanban.py update 014 '{"subtasks":[{"done":true,"text":"Research"},{"done":false,"text":"Implementation"}]}'
159
- ```
40
+ ## Views (sparse)
41
+
42
+ Empty strings and empty arrays are omitted.
43
+
44
+ - **summary** — id, title, column, epic, progress, blocked
45
+ - **planning** — SPEC fields (`description`, `specs`, in/out scope, AC, `depends_on`, `epic_goals` parent compass)
46
+ - **execution** — subtasks, workflow, files (no SPEC re-echo)
47
+ - **full** — everything stored
160
48
 
161
- ## Kanban Columns
162
-
163
- - `active` - in progress (max 1-2 tasks)
164
- - `planned` - planned for implementation
165
- - `icebox` - frozen / nice-to-have
166
- - `done` - completed
167
-
168
- ## Data Models
169
-
170
- ### Task
171
- ```json
172
- {
173
- "id": "string",
174
- "title": "string",
175
- "column": "active|planned|icebox|done",
176
- "epic_group": "string",
177
- "created": "string",
178
- "subtasks": [
179
- {
180
- "done": "boolean",
181
- "text": "string"
182
- }
183
- ]
184
- }
49
+ `epic_goals` is the parent epic compass in planning/full views. Empty fields are omitted.
50
+
51
+ ## Columns
52
+
53
+ `icebox` `planned` → `active` → `testing` → `review` → `done` (gates optional via `backlog/kanbango.json`).
54
+ `active`→`done` is illegal while testing/review columns are on. Entering a gate (and `done` when gates are on) needs `evidence[]` with `diff` or `summary` or `test_command`.
55
+
56
+ ## Concurrency
57
+
58
+ Writes from MCP, CLI, and GUI on **one local board** are serialized with `backlog/.board.lock`. A busy lock returns structured `BOARD_LOCKED` (`retryable=true`). This is not distributed storage: two checkouts or a shared network disk are not coordinated.
59
+
60
+ ## CLI
61
+
62
+ ```bash
63
+ kanban list --json
64
+ kanban list --col done --json # include done column
65
+ kanban show 014
66
+ kanban add "Title" --col planned --epic E001
67
+ kanban move 014 testing
68
+ kanban update 014 '{"subtasks":[{"done":true,"text":"Research"}]}'
69
+ kanban epic list --json
70
+ kanban epic show E001
185
71
  ```
72
+
73
+ Node binary: `bin/kanban.js` (`kanban` and `kanban-cmd` both map here).
package/CHANGELOG.md CHANGED
@@ -7,14 +7,90 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Added
11
+ - Cross-process board lock (`backlog/.board.lock`) so concurrent MCP/CLI/GUI writers on one local board cannot lose creates, moves, evidence, or plan steps. Busy lock returns retryable `BOARD_LOCKED`. `plan_evidence` appends; `plan_advance` marks one subtask done on the locked snapshot.
12
+ - Agent wake (`context`): skip blocked active work; surface failed/blocked gates and manual testing/review; `PARSE_ERROR` on corrupt JSON instead of a partial board. `next_action` requires proof evidence (`diff|summary|test_command`) before suggesting a gate move.
13
+ - Agent cost: `plan_*` honors `return=none` (no subtasks/evidence echo). MCP `show` reuses one board scan. Repeatable probe: `node benchmarks/agent-workflow.js`.
14
+
15
+ ## [5.1.0] - 2026-09-20
16
+
17
+ ### Added
18
+ - OpenCode TUI plugin (`plugins/tui-kanban.tsx`): palette `/kanban` (category Kanban) and shortcut `Ctrl+Alt+K` open the board browser modal and paste a start prompt.
19
+ - `kanban init --opencode` and `mcp-init --opencode` install `tui-kanban.tsx` + `tui-kanban-controller.js` into `.opencode/plugins/` with the same tracked-file / `--force` contract as OpenCode agents.
20
+ - Shared tracked-file copier in `bin/kanban.js` (agents + plugins hash manifests).
21
+
22
+ ## [5.0.0] - 2026-09-20
23
+
24
+ Kanbango core is now independent of QA, review agents, OpenCode, and external runners.
25
+
26
+ ### Changed
27
+ - Gate columns (`testing` and `review`) are disabled by default.
28
+ - Workflow agents are disabled by default.
29
+ - The default board contains only `icebox`, `planned`, `active`, and `done`.
30
+ - QA/review gates remain available as explicit project configuration.
31
+
32
+ ## [4.0.0] - 2026-09-19
33
+
34
+ MCP defaults and payload shape changed. Agents that assumed pretty JSON, full-card create echo, `return=summary`, `list` including `done`, `show_epic=full`, or omitted `operation` = `list` must pass those flags explicitly.
35
+
36
+ ### Added
37
+ - MCP errors: `next_tool_call` only when the next call is unique (`TASK_NOT_FOUND`, `INVALID_TRANSITION`); omit for `TASK_BLOCKED`, `CIRCULAR_DEPENDENCY`, `MISSING_REQUIRED_FIELD`, `EVIDENCE_REQUIRED`.
38
+ - Evidence gate: moves into enabled `testing`/`review` (and `done` when those gates exist) require `evidence[]` with `diff`|`summary`|`test_command`; `workflow.status` fail/blocked cannot skip forward. Error `EVIDENCE_REQUIRED` with hint + details.
39
+ - GUI NOW panel: `GET /api/context` (`next_action`); cards/paper show `blocked by` unmet dependency ids. `/api/board` includes computed `blocked`/`unmet_dependencies`.
40
+
41
+ ### Changed
42
+ - MCP payloads: compact JSON (no pretty-print); omit null/`""`/`[]` from shaped task/epic/context (keep `blocked`/`progress`); summary includes `id`, drops `created`/`epic_group`; `return` defaults to `none`; `show_epic` defaults to `summary`.
43
+ - `view=execution` is runtime only (id/progress/subtasks/workflow/files/blocked); SPEC stays on `view=planning`.
44
+ - `create` / `epic_create` default `{ok, id, missing?}` instead of full-card echo; `return=summary|full` still available.
45
+ - MCP `tools/list`: short tool descriptions; property essays stripped; playbook via `operation=help`. ~2667 → ~1040 tok (chars/4).
46
+ - Default `list` hides `column=done` (including orphans); `include_done` or `col=done` to widen; GUI `live_only=false` unchanged.
47
+ - MCP `kanban_read`: omit `operation` defaults to `context` (was `list`). Explicit `operation=list` unchanged.
48
+ - MCP `tools/list` schemas encode action-specific required fields (`show`→`task_id`, `create`→`title`, `move`→`task_id`+`column`) plus examples.
49
+ - `plan_create` / `detectTestRunner`: missing test runner returns `null` (no `NO_TEST_RUNNER` hard fail)
50
+ - Plan subtasks = only provided `steps` (no forced Write tests / red / green)
51
+ - MCP `create` accepts `steps[]` as subtask shortcut when `subtasks` omitted
52
+ - `plan_evidence`: require at least one of `diff` | `summary` | `test_command`; test logs/exit_code optional
53
+
54
+ ## [3.8.0] - 2026-09-16
55
+
56
+ ### Added
57
+ - Agent-first context snapshot with dependency-aware task selection.
58
+ - `depends_on` DAG validation, cycle detection, blocked/downstream visibility, and `files` scope tracking.
59
+ - Context next actions and `unblocked_tasks` after completing a dependency.
60
+ - Planned follow-up tasks for strict evidence gates, actionable MCP errors, and an agent cockpit GUI (shipped in 4.0.0).
61
+
62
+ ## [3.7.0] - 2026-08-26
63
+
64
+ ### Added
65
+ - Interactive config TUI (`config-wizard.js`): checkbox gates/agents on `kanban init` / `kanban mcp-init` when `backlog/kanbango.json` is missing (TTY only; defaults all on)
66
+ - `kanban config` re-opens the wizard (TTY required); malformed existing JSON → `CONFIG_INVALID`, file not replaced
67
+ - Non-TTY init/mcp-init print a one-line hint to run `kanban config` (no hang, no invented file)
68
+ - Tests: `tests/config-wizard.test.js` (fake TTY streams, cancel/raw-mode cleanup, CLI non-TTY)
69
+
10
70
  ## [3.6.2] - 2026-08-25
11
71
 
72
+ ### Added
73
+ - Project board config in `backlog/kanbango.json`:
74
+ - `columns.testing|review`: `{ enabled, label }` (defaults: both enabled, labels Testing/Review)
75
+ - `workflow.testing_agent|review_agent`: string (legacy) or `{ enabled, name }`
76
+ - Disabled gate column: hidden from GUI/MCP/CLI, transitions rebuild, existing cards auto-migrate to `planned` (idempotent, no config trail)
77
+ - Agent `enabled: false` with column on = manual gate (no spawn, card stays)
78
+ - GUI `GET /api/config` + dynamic board columns/labels from config
79
+ - MCP column enums reflect active columns after config load
80
+ - `plan_done` lands in first enabled gate or `done`
81
+ - Tests: `tests/board-config.test.js`
82
+
12
83
  ### Changed
13
84
  - `move` / `updateTask` column changes validate workflow transitions
14
85
  - Illegal move returns `INVALID_TRANSITION` with `allowed_columns` in details and hint
15
86
  - Allowed: icebox→planned; planned→active|icebox|testing; active→planned|testing|icebox; testing→active|review; review→active|done; done→active
16
87
  - `active→done` is illegal (cannot skip testing/review)
17
88
  - MCP `column` description and playbook document the map; GUI arrows only show legal neighbors
89
+ - CLI `list` / `show` / `epic list` load board config (migrate disabled-gate cards)
90
+ - MCP `tools/list` fails on `CONFIG_INVALID` instead of advertising default columns
91
+
92
+ ### Note
93
+ - `.ait-quality.yml` kept as optional local scan policy only (CLI `console.log` = UX). No ait-quality dependency or runtime invoke.
18
94
 
19
95
  ## [3.6.1] - 2026-08-25
20
96