input-kanban 0.0.17 → 0.0.18

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/README.en.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [中文](README.md) | English
4
4
 
5
- Input Kanban is a local Codex orchestration dashboard. The recommended path is to install it from npm, run `input-kanban` inside the target workspace, and use the browser UI to manage planning, worker execution, and final judging. If the workspace is a Git repository, the UI marks it as such.
5
+ You can think of Input Kanban as a local Codex execution board: you create a task, and it helps you plan, dispatch, run, and judge it. This README focuses on **how to use it**.
6
6
 
7
- ## Recommended Usage
7
+ ## Fast Start
8
8
 
9
9
  ### 1. Install
10
10
 
@@ -12,142 +12,169 @@ Input Kanban is a local Codex orchestration dashboard. The recommended path is t
12
12
  npm install -g input-kanban
13
13
  ```
14
14
 
15
- Verify the installation:
15
+ Verify it works:
16
16
 
17
17
  ```bash
18
18
  input-kanban --help
19
19
  ```
20
20
 
21
- ### 2. Start in the Target Workspace
21
+ ### 2. Start inside your target workspace
22
22
 
23
- Enter the workspace you want Codex to modify or inspect:
23
+ Run it in the directory you want Codex to modify or inspect:
24
24
 
25
25
  ```bash
26
26
  cd /path/to/your/workspace
27
27
  input-kanban
28
28
  ```
29
29
 
30
- By default, this starts a local server at:
30
+ By default, it starts a local web server at:
31
31
 
32
32
  ```text
33
33
  http://127.0.0.1:8787
34
34
  ```
35
35
 
36
- Open that URL in your browser to use the dashboard.
36
+ Open that URL in your browser to create runs, watch progress, and read results.
37
37
 
38
- ### 3. Start with an Explicit Workspace
38
+ ### 3. Start without `cd`
39
39
 
40
- If you do not want to `cd` into the target workspace first, pass it explicitly:
40
+ If you do not want to change directories first, pass the workspace explicitly:
41
41
 
42
42
  ```bash
43
43
  input-kanban --workspace /path/to/your/workspace
44
44
  ```
45
45
 
46
- `--repo` remains available as a compatibility alias.
46
+ `--repo` is still supported as a compatibility alias.
47
47
 
48
- ## CLI Auto Execution
48
+ ## The 6 Most Common Ways to Use It
49
49
 
50
- To submit a task from the terminal and let it advance automatically, use `submit`. Task content supports two input modes:
50
+ ### 1) Create and run a task in the Web UI
51
+
52
+ 1. Click `New Run`
53
+ 2. Enter the workspace, worker sandbox, and task description
54
+ 3. Click `Create Run`
55
+ 4. The dashboard automatically starts planning
56
+ 5. After planning, it dispatches workers
57
+ 6. After all batches finish, it starts the final judge
58
+
59
+ ### 2) Submit a task from the terminal
51
60
 
52
61
  ```bash
53
- input-kanban submit --task-file task.md --label "Fix login issue"
54
- input-kanban submit --task "Fix the login issue and add regression tests" --label "Fix login issue"
62
+ input-kanban submit --task "Fix the login issue and add regression tests" --label "fix-login"
55
63
  ```
56
64
 
57
- `submit` creates a run, starts planning, dispatches all batches, and starts the final judge after all workers finish by default. The default workspace is the current directory. If `--label` is omitted, the run label is generated from the task text. It uses the same runs directory, so CLI-created runs are visible in the Web dashboard on port 8787 as long as the dashboard uses the same `--runs-dir`.
58
-
59
- If your Agent can only call the CLI, run `input-kanban guide` or `input-kanban --help` to get a friendlier execution template and control loop.
65
+ To load task text from a file:
60
66
 
61
- `input-kanban serve` starts a lightweight background scheduler that keeps refreshing and advancing unfinished runs: it dispatches batches when a plan is ready, starts the next serial batch after the previous one completes, and starts the final judge after all batches complete. CLI `submit --auto` / `input-kanban auto <runId>` and the Web server share the same orchestrator auto-advance path, so progress no longer depends on whether a browser page is open or refreshed.
67
+ ```bash
68
+ input-kanban submit --task-file task.md
69
+ ```
62
70
 
63
- To return immediately and let a background supervisor continue the auto loop, pass `-d` / `--detach`:
71
+ ### 3) Pause after planning for approval
64
72
 
65
73
  ```bash
66
- input-kanban submit --task-file task.md -d
74
+ input-kanban submit --task-file task.md --plan-approval
67
75
  ```
68
76
 
69
- To create the run and start planning without dispatching or judging, pass `--no-auto`.
77
+ This pauses after planning and waits for you to confirm the plan in the Web UI before dispatching workers.
70
78
 
71
- Common examples:
79
+ ### 4) Create and plan only
72
80
 
73
81
  ```bash
74
- input-kanban submit --task "Fix login issue"
75
- input-kanban submit --task-file task.md --max-parallel 2 --worker-sandbox workspace-write
76
- input-kanban submit --runs-dir ~/.input-kanban/runs --runner tmux -d
82
+ input-kanban submit --task-file task.md --no-auto
77
83
  ```
78
84
 
79
- Check and stop:
85
+ ### 5) Check progress, result, retry, or stop
80
86
 
81
87
  ```bash
82
- input-kanban runs
83
- input-kanban --json runs --active
84
- input-kanban status
85
- input-kanban status --watch
88
+ input-kanban status <runId>
86
89
  input-kanban status <runId> --watch
87
- input-kanban --json status <runId>
88
- input-kanban result
90
+ input-kanban result <runId>
89
91
  input-kanban result <runId> --copy
90
- input-kanban --json result <runId>
91
92
  input-kanban retry <runId> [taskId]
92
- input-kanban --json retry <runId> [taskId]
93
93
  input-kanban stop <runId>
94
94
  ```
95
95
 
96
- Use `runs` to discover visible run batches first; `runs --active` shows only runs that have not reached a terminal state or still have running tasks, which lets an agent find `runId` values before calling `status <runId>`. To focus on one workspace, use `input-kanban runs --workspace /path/to/workspace`; the Web sidebar has the same workspace filter. Without a `runId`, `status` and `result` use the latest run by default. `result --copy` copies the final judge result. `retry` preserves the failed attempt and retries failed/unknown tasks. `--json` is handy for agents/scripts that need structured output. Stopping requires an explicit `runId` to avoid stopping the wrong run.
96
+ ### 6) If you are an Agent and can only call the CLI
97
97
 
98
- ## Common Startup Options
98
+ Run:
99
99
 
100
100
  ```bash
101
- input-kanban --port 8787
102
- input-kanban --host 127.0.0.1
103
- input-kanban --runs-dir ~/.input-kanban/runs
104
- input-kanban --codex-bin codex
105
- input-kanban --runner headless
106
- input-kanban --open
101
+ input-kanban guide
107
102
  ```
108
103
 
109
- Defaults:
104
+ Or:
110
105
 
111
- - workspace: the current directory where `input-kanban` is launched; creating a run only requires an existing directory, and Git is shown as an optional capability when detected
112
- - host: `127.0.0.1`
113
- - port: `8787`
114
- - runs directory: `~/.input-kanban/runs`
115
- - Codex command: `codex`
116
- - runner: `headless`
106
+ ```bash
107
+ input-kanban --help
108
+ ```
109
+
110
+ `guide` prints an agent-friendly control loop and ready-to-copy templates.
117
111
 
118
- `--runner` currently supports `headless` and `tmux`. The default behavior remains `headless`; `tmux` creates one `input-kanban-<runId>` session per run and one window for the planner, each batch, and the final judge. A batch window contains an overview pane plus the worker panes for that batch.
112
+ To install the bundled `input-kanban-prepare` skill for Codex:
113
+
114
+ ```bash
115
+ input-kanban install-skill codex
116
+ ```
119
117
 
120
- tmux mode still leaves batch barriers, `maxParallel`, final judge sequencing, and `judge_input.json` generation in Node.js. Each role output directory gets `run.sh` and `tmux.json`; status continues to be driven by `events.jsonl`, `stderr.log`, `last_message.md`, `exit_code`, and existing artifact files. After a tmux role command finishes, it writes `exit_code` first and then keeps the window open for inspection; the user closes the window manually from tmux.
118
+ To specify the Codex skills root explicitly:
121
119
 
122
- If you are using `--runner tmux`, stopping and restarting `input-kanban serve` does not interrupt Codex sessions that are already running; the tmux session keeps going, and the scheduler resumes orchestration after the server comes back. With the `headless` runner, do not assume that restarting the service is safe for in-flight child processes.
120
+ ```bash
121
+ input-kanban install-skill codex --target-dir ~/.codex/skills
122
+ ```
123
123
 
124
- tmux mode is optional and intended for live terminal viewing of each Codex role. `codex exec` is currently non-interactive and does not normally show manual approval prompts; if you select `danger-full-access` when creating a run, you explicitly relax the worker sandbox and should only do so in a controlled test workspace.
124
+ ## Hand Off from an External Agent Conversation
125
125
 
126
- After run-level tmux metadata is available, the dashboard shows `Copy tmux attach command`. The file viewer no longer repeats tmux terminal details; use the run detail header to copy the attach command and inspect the tmux session.
126
+ If the task was first discussed in Claude, Cursor, Codex, or another external Agent conversation, prepare a structured `task.md` before handing it to Input Kanban:
127
127
 
128
- ## Using the Dashboard
128
+ ```bash
129
+ input-kanban submit --task-file task.md --plan-approval
130
+ ```
129
131
 
130
- 1. Click `New Run`.
131
- 2. Enter a label, workspace, worker sandbox, and task description.
132
- 3. Click `Create Run`.
133
- 4. The dashboard automatically starts `Plan` so the Codex planner can generate batches and workers.
134
- 5. After planning completes, Web auto mode dispatches workers by batch barrier and concurrency limits by default.
135
- 6. After all batches complete, Web auto mode starts the final judge by default.
136
- 7. Inspect execution logs, final messages, error logs, and artifacts.
137
- 8. Stop or archive a run when needed, or manually click buttons to retry/advance, or manually mark a confirmed failed/unknown worker as completed.
132
+ A good `task.md` should include at least:
138
133
 
139
- ## What It Is For
134
+ - `Goal`: what should be completed
135
+ - `Acceptance Criteria`: how completion will be checked
136
+ - `Expected Artifacts`: expected outputs and verification methods
137
+ - `Context References`: relevant files, specs, or prior notes
138
+ - `Risks`: assumptions, risks, and unknowns
140
139
 
141
- - Split a larger Codex programming task into multiple workers.
142
- - Control execution order with batch barriers.
143
- - Observe each worker's local status, logs, and final response.
144
- - In tmux runner mode, inspect an overview pane and worker panes inside each batch window.
145
- - Run a final judge after all workers complete.
146
- - Keep local run records for debugging and recovery.
140
+ See `skills/input-kanban-prepare/SKILL.md` or `docs/input-kanban-prepare.md` for a reusable preparation flow. This gives the planner a stronger execution contract instead of asking it to infer everything from a vague request.
141
+
142
+ ## Quick Command Cheat Sheet
143
+
144
+ ```bash
145
+ input-kanban submit --task "..."
146
+ input-kanban submit --task-file task.md
147
+ input-kanban submit --task-file task.md --plan-approval
148
+ input-kanban submit --task-file task.md -d
149
+ input-kanban install-skill codex
150
+ input-kanban --json runs --active
151
+ input-kanban --json status <runId>
152
+ input-kanban --json result <runId>
153
+ input-kanban --json retry <runId> [taskId]
154
+ input-kanban --json stop <runId>
155
+ ```
156
+
157
+ Use `--json` when another tool or script needs structured output.
158
+
159
+ ## tmux Mode (Optional)
160
+
161
+ The default runner is `headless`. If you want live terminal visibility for each role, switch to `tmux`:
162
+
163
+ ```bash
164
+ input-kanban submit --task-file task.md --runner tmux
165
+ ```
166
+
167
+ Use tmux mode when you want to:
168
+
169
+ - watch planner / worker / judge output live
170
+ - see the overview pane and worker panes in each batch window
171
+ - inspect the run process locally
172
+
173
+ If you do not need terminal visibility, keep using the default `headless` runner.
147
174
 
148
175
  ## Runtime Data Location
149
176
 
150
- Runtime data is stored in the configured runs directory. The CLI default is:
177
+ Runtime data is stored in the default runs directory:
151
178
 
152
179
  ```text
153
180
  ~/.input-kanban/runs
@@ -169,16 +196,24 @@ runs/<runId>/
169
196
 
170
197
  These files are local run records and do not need to be committed to your application workspace.
171
198
 
199
+ ## What You Usually Do with It
200
+
201
+ - Split a larger Codex task into multiple execution steps
202
+ - Watch planning, execution, and results in the Web UI
203
+ - Automate submit / status / retry / result / stop flows from the terminal
204
+ - Add a human approval gate with `--plan-approval` when needed
205
+ - Use tmux only when you want live terminal inspection
206
+
172
207
  ## Requirements
173
208
 
174
- - Node.js 20 or newer.
175
- - Codex CLI installed and configured.
176
- - `tmux` installed when using `--runner tmux`.
177
- - The `codex` command works in your terminal, or `--codex-bin` points to the Codex executable.
209
+ - Node.js 20 or newer
210
+ - Codex CLI installed and available
211
+ - `tmux` installed if you want `--runner tmux`
212
+ - The `codex` command works in your terminal, or `--codex-bin` points to the executable
178
213
 
179
214
  ## Maintainer Development
180
215
 
181
- If you want to develop Input Kanban itself instead of using it as an end user:
216
+ If you want to develop Input Kanban itself:
182
217
 
183
218
  ```bash
184
219
  git clone https://github.com/zhang3xing1/Input-Kanban.git
@@ -204,3 +239,7 @@ npm run check
204
239
 
205
240
  - [Project guide](PROJECT_GUIDE.md)
206
241
  - [Environment variables](ENVIRONMENT.md)
242
+ - [Agent CLI README](docs/input-kanban-cli-README.md)
243
+ - [Agent CLI Skill draft](docs/input-kanban-cli-skill.md)
244
+ - [Structured handoff guide](docs/input-kanban-prepare.md)
245
+ - [input-kanban-prepare Skill](skills/input-kanban-prepare/SKILL.md)
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  中文 | [English](README.en.md)
4
4
 
5
- Input Kanban 是一个本地 Codex 编排看板。推荐通过 npm 安装,然后在目标工作区里运行 `input-kanban`,用浏览器管理任务拆分、并发执行和最终验收;如果工作区恰好是 Git 仓库,界面会额外标识出来。
5
+ 你可以把 Input Kanban 当成一个本地 Codex 执行看板:先把任务放进来,再让它自动拆分、派发、执行和验收。下面重点讲**怎么用**,不是讲内部实现。
6
6
 
7
- ## 推荐使用方式
7
+ ## 最快开始
8
8
 
9
9
  ### 1. 安装
10
10
 
@@ -12,15 +12,15 @@ Input Kanban 是一个本地 Codex 编排看板。推荐通过 npm 安装,然
12
12
  npm install -g input-kanban
13
13
  ```
14
14
 
15
- 验证安装:
15
+ 确认可用:
16
16
 
17
17
  ```bash
18
18
  input-kanban --help
19
19
  ```
20
20
 
21
- ### 2. 在目标工作区启动
21
+ ### 2. 进入目标工作区
22
22
 
23
- 进入你希望 Codex 修改或检查的工作区:
23
+ 在你要让 Codex 修改或检查的目录里启动:
24
24
 
25
25
  ```bash
26
26
  cd /path/to/your/workspace
@@ -33,135 +33,152 @@ input-kanban
33
33
  http://127.0.0.1:8787
34
34
  ```
35
35
 
36
- 打开浏览器访问这个地址即可使用看板。
36
+ 打开浏览器后,你就可以直接创建任务批次、看执行状态、看结果。
37
37
 
38
- ### 3. 指定目标工作区启动
39
-
40
- 如果不想先 `cd` 到目标工作区,也可以显式指定:
38
+ ### 3. 不想先 `cd`?直接指定工作区
41
39
 
42
40
  ```bash
43
41
  input-kanban --workspace /path/to/your/workspace
44
42
  ```
45
43
 
46
- `--repo` 仍可作为兼容别名使用。
44
+ `--repo` 也可以继续用,作为兼容别名。
45
+
46
+ ## 最常见的 6 个用法
47
+
48
+ ### 1) 在网页里新建并自动执行
47
49
 
48
- ## CLI 自动执行
50
+ 1. 点击 `新建任务批次`
51
+ 2. 填好工作区、Worker 沙箱和任务说明
52
+ 3. 点击 `创建批次`
53
+ 4. 看板会自动发起 `拆分任务`
54
+ 5. 拆分完成后自动派发 worker
55
+ 6. 所有批次完成后自动发起最终验收
49
56
 
50
- 如果希望从终端直接提交任务并自动推进,可以使用 `submit`。任务内容支持两种输入方式:
57
+ ### 2) 从终端直接提交一个任务
51
58
 
52
59
  ```bash
53
- input-kanban submit --task-file task.md --label "修复登录问题"
54
60
  input-kanban submit --task "修复登录问题,并补充回归测试" --label "修复登录问题"
55
61
  ```
56
62
 
57
- `submit` 默认会创建任务批次、发起拆分、自动派发所有批次,并在全部完成后自动发起最终验收。默认 workspace 是当前目录;如果不传 `--label`,任务批次名称会从任务内容自动生成。它使用同一个 runs 目录,所以只要 8787 Web 看板也使用相同的 `--runs-dir`,CLI 创建的任务会在 Web 界面里可见。
63
+ 如果你想从文件读任务:
58
64
 
59
- 如果你的 Agent 只能调用 CLI,可以直接运行 `input-kanban guide` 或 `input-kanban --help`,拿到一版更友好的执行模板和控制循环。
65
+ ```bash
66
+ input-kanban submit --task-file task.md
67
+ ```
60
68
 
61
- 如果希望 Planner 拆分完成后先看一眼计划,再放行执行,可以加计划确认 Gate:
69
+ ### 3) 先看计划,再决定是否执行
62
70
 
63
71
  ```bash
64
72
  input-kanban submit --task-file task.md --plan-approval
65
73
  ```
66
74
 
67
- 开启后,auto 会推进到 Planner 完成并停在“已拆分,待确认”;用户在 Web 上点一次“开始执行”即确认计划,随后 worker 批次和 final judge 继续自动推进。
75
+ 这会在规划完成后停在“已拆分,待确认”,等你在 Web 上点 `开始执行` 再继续。
76
+
77
+ ### 4) 只想创建并规划,不马上派发
68
78
 
69
- `input-kanban serve` 会启动一个轻量后台 scheduler,持续刷新并推进未完成的 run:plan ready 后派发 batch、串行 batch 完成后启动下一批、全部 batch 完成后启动 final judge。CLI `submit --auto` / `input-kanban auto <runId>` 与 Web server 共用同一套 orchestrator 自动推进逻辑,因此任务推进不再依赖浏览器页面是否打开或刷新。若 run 配置了计划确认 Gate,auto/scheduler 会停在该 Gate,不会越过未确认的计划。
79
+ ```bash
80
+ input-kanban submit --task-file task.md --no-auto
81
+ ```
70
82
 
71
- 如果希望提交后立即返回,让任务在后台自动执行,可以加 `-d` / `--detach`:
83
+ ### 5) 查看进度 / 结果 / 重试 / 停止
72
84
 
73
85
  ```bash
74
- input-kanban submit --task-file task.md -d
86
+ input-kanban status <runId>
87
+ input-kanban status <runId> --watch
88
+ input-kanban result <runId>
89
+ input-kanban result <runId> --copy
90
+ input-kanban retry <runId> [taskId]
91
+ input-kanban stop <runId>
75
92
  ```
76
93
 
77
- 如果只想创建并拆分,不自动派发和验收,可以加 `--no-auto`。
94
+ ### 6) 如果你是 Agent,只会调用 CLI
78
95
 
79
- 常用参数:
96
+ 直接运行:
80
97
 
81
98
  ```bash
82
- input-kanban submit --task "修复登录问题"
83
- input-kanban submit --task-file task.md --max-parallel 2 --worker-sandbox workspace-write
84
- input-kanban submit --runs-dir ~/.input-kanban/runs --runner tmux -d
99
+ input-kanban guide
85
100
  ```
86
101
 
87
- 查看和停止:
102
+ 或者:
88
103
 
89
104
  ```bash
90
- input-kanban runs
91
- input-kanban --json runs --active
92
- input-kanban status
93
- input-kanban status --watch
94
- input-kanban status <runId> --watch
95
- input-kanban --json status <runId>
96
- input-kanban result
97
- input-kanban result <runId> --copy
98
- input-kanban --json result <runId>
99
- input-kanban retry <runId> [taskId]
100
- input-kanban --json retry <runId> [taskId]
101
- input-kanban stop <runId>
105
+ input-kanban --help
102
106
  ```
103
107
 
104
- `runs` 用来先列出可见任务批次,`runs --active` 只列出未进入终态或仍有子任务运行的批次,便于 agent 先发现 `runId`,再用 `status <runId>` 查详情。要只看某个工作区,可用 `input-kanban runs --workspace /path/to/workspace`;Web 左栏也提供了工作区筛选。不传 `runId` 时,`status` 和 `result` 默认查看最近一次任务批次。`result --copy` 会复制最终验收结果;`retry` 会保留失败现场并重试失败/未知任务;`--json` 适合给 agent/脚本做结构化读取;停止任务请显式传入 `runId`,避免误停。
108
+ `guide` 会输出一个更适合 Agent 的操作循环和可直接复制的示例模板。
105
109
 
106
- ## 常用启动参数
110
+ 如果你想把内置的 `input-kanban-prepare` skill 安装到 Codex:
107
111
 
108
112
  ```bash
109
- input-kanban --port 8787
110
- input-kanban --host 127.0.0.1
111
- input-kanban --runs-dir ~/.input-kanban/runs
112
- input-kanban --codex-bin codex
113
- input-kanban --runner headless
114
- input-kanban --open
113
+ input-kanban install-skill codex
115
114
  ```
116
115
 
117
- 默认值:
116
+ 如需指定 Codex skills 根目录:
118
117
 
119
- - 工作区:启动 `input-kanban` 时的当前目录;创建批次时只要求它是一个存在的目录,若检测到 Git 会额外显示 Git 标识
120
- - host:`127.0.0.1`
121
- - port:`8787`
122
- - runs 目录:`~/.input-kanban/runs`
123
- - Codex 命令:`codex`
124
- - runner:`headless`
118
+ ```bash
119
+ input-kanban install-skill codex --target-dir ~/.codex/skills
120
+ ```
121
+
122
+ ## 从外部 Agent 对话交给看板执行
123
+
124
+ 如果任务先在 Claude、Cursor、Codex 或其它外部 Agent 对话里讨论,建议先整理成结构化 `task.md`,再交给 Input Kanban:
125
125
 
126
- `--runner` 当前支持 `headless` 和 `tmux`。默认行为保持 `headless`;`tmux` 会为每个 run 创建一个 `input-kanban-<runId>` session,并为 planner、每个 batch、final judge 创建独立 window。batch window 内包含 overview pane 和对应 worker panes。
126
+ ```bash
127
+ input-kanban submit --task-file task.md --plan-approval
128
+ ```
127
129
 
128
- tmux 模式仍由 Node.js 负责 batch barrier、`maxParallel`、final judge 顺序和 `judge_input.json` 生成。每个角色输出目录会写入 `run.sh` 和 `tmux.json`,状态继续由 `events.jsonl`、`stderr.log`、`last_message.md`、`exit_code` 和既有 artifact 文件驱动。tmux 角色命令完成后会先写入 `exit_code`,再保留 window,方便查看现场;需要关闭时由用户在 tmux 里手动退出。
130
+ 推荐 `task.md` 至少包含:
131
+
132
+ - `Goal`:这次要完成什么
133
+ - `Acceptance Criteria`:怎么判断完成
134
+ - `Expected Artifacts`:期望产物和验证方式
135
+ - `Context References`:相关文件、spec、历史记录
136
+ - `Risks`:风险、假设和不确定点
137
+
138
+ 可以参考 `skills/input-kanban-prepare/SKILL.md` 或 `docs/input-kanban-prepare.md`。这样 planner 会拿到更稳定的执行契约,而不是从一段模糊需求里从零猜。
139
+
140
+ ## 常用命令速查
141
+
142
+ ```bash
143
+ input-kanban submit --task "..."
144
+ input-kanban submit --task-file task.md
145
+ input-kanban submit --task-file task.md --plan-approval
146
+ input-kanban submit --task-file task.md -d
147
+ input-kanban install-skill codex
148
+ input-kanban --json runs --active
149
+ input-kanban --json status <runId>
150
+ input-kanban --json result <runId>
151
+ input-kanban --json retry <runId> [taskId]
152
+ input-kanban --json stop <runId>
153
+ ```
129
154
 
130
- 如果当前使用的是 `--runner tmux`,中断并重新启动 `input-kanban serve` 不会中断正在执行中的 Codex 会话;tmux session 会继续运行,服务重启后 scheduler 会重新接管后续推进。若使用 `headless` runner,则不应假设服务重启对正在运行的子进程是安全的。
155
+ 如果你需要让脚本或其它工具接管,`--json` 会给出结构化输出。
131
156
 
132
- tmux 模式是可选能力,主要用于在终端里实时查看每个 Codex 角色的执行过程。`codex exec` 当前属于非交互模式,默认不会弹出人工 approval;如果创建任务时选择 `danger-full-access`,表示显式放开 worker sandbox 限制,应只在受控测试工作区中使用。
157
+ ## tmux 模式(可选)
133
158
 
134
- 看板会在 run 生成 tmux 元数据后显示 `复制tmux attach指令`。文件查看区域不再重复展示 tmux 终端信息;如需查看现场,请从批次详情顶部复制 attach 指令进入 tmux session。
159
+ 默认 runner `headless`。如果你想在终端里实时看每个角色怎么跑,可以切到 `tmux`:
135
160
 
136
- ## 在看板里如何使用
161
+ ```bash
162
+ input-kanban submit --task-file task.md --runner tmux
163
+ ```
137
164
 
138
- 1. 点击 `新建任务批次`。
139
- 2. 输入批次名称、工作区、Worker 沙箱和任务说明。
140
- 3. 点击 `创建批次`。
141
- 4. 看板会自动发起 `拆分任务`,让 Codex planner 生成 batches 和 workers。
142
- 5. 拆分完成后,Web 默认自动派发执行,按 batch barrier 和并发限制运行 workers。
143
- 6. 所有 batch 完成后,Web 默认自动发起 `汇总验收`。
144
- 7. 查看执行日志、最终回复、错误日志和产物。
145
- 8. 必要时可以停止或归档 run,也可以手动点击按钮重试、推进,或手动标记已确认完成的失败/未知 worker。
165
+ tmux 模式适合:
146
166
 
147
- ## 它适合做什么
167
+ - 想看 planner / worker / judge 的实时终端输出
168
+ - 想在 batch window 里同时看 overview pane 和 worker panes
169
+ - 想在本地排查执行过程
148
170
 
149
- - 把一个较大的 Codex 编程任务拆成多个 worker。
150
- - 按批次阻塞关系控制执行顺序。
151
- - 在本地观察每个 worker 的状态、日志和最终回复。
152
- - 使用 tmux runner 时,在每个 batch window 中查看 overview pane 和 worker panes。
153
- - 在所有 worker 完成后,让 final judge 汇总验收。
154
- - 保留本地运行记录,便于排查和恢复。
171
+ 如果你不需要终端可视化,就继续用默认的 `headless`。
155
172
 
156
- ## 运行数据保存位置
173
+ ## 数据会存到哪里
157
174
 
158
- 运行数据会保存到 runs 目录。CLI 默认位置是:
175
+ 默认运行数据目录是:
159
176
 
160
177
  ```text
161
178
  ~/.input-kanban/runs
162
179
  ```
163
180
 
164
- 每个 run 大致结构如下:
181
+ 每个 run 大致会长这样:
165
182
 
166
183
  ```text
167
184
  runs/<runId>/
@@ -175,18 +192,26 @@ runs/<runId>/
175
192
  └── verdict.json
176
193
  ```
177
194
 
178
- 这些文件是本地运行记录,不需要提交到你的业务工作区。
195
+ 这些都是本地运行记录,不需要提交到你的业务仓库。
196
+
197
+ ## 你通常会怎么用它
198
+
199
+ - 把一个较大的 Codex 编程任务拆成多个执行步骤
200
+ - 在 Web 里看计划、执行、结果
201
+ - 在终端里自动提交、查看、重试、停止
202
+ - 在需要时用 `plan-approval` 增加一个人工确认关口
203
+ - 在需要终端细节时用 `tmux` 看实时过程
179
204
 
180
205
  ## 使用前提
181
206
 
182
- - 已安装 Node.js 20 或更高版本。
183
- - 已安装并配置可用的 Codex CLI
184
- - 如需使用 `--runner tmux`,本机需要安装可用的 `tmux`。
185
- - `codex` 命令能在终端中正常运行,或通过 `--codex-bin` 指定 Codex 可执行文件路径。
207
+ - Node.js 20 或更高版本
208
+ - 已安装并可用的 Codex CLI
209
+ - 如果要用 `--runner tmux`,本机需要安装 `tmux`
210
+ - `codex` 命令在终端可用,或通过 `--codex-bin` 指定可执行文件
186
211
 
187
212
  ## 维护者开发
188
213
 
189
- 如果你要开发 Input Kanban 本身,而不是作为用户使用:
214
+ 如果你要开发 Input Kanban 本身:
190
215
 
191
216
  ```bash
192
217
  git clone https://github.com/zhang3xing1/Input-Kanban.git
@@ -212,3 +237,7 @@ npm run check
212
237
 
213
238
  - [项目实现说明](PROJECT_GUIDE.md)
214
239
  - [环境变量](ENVIRONMENT.md)
240
+ - [Agent CLI 说明](docs/input-kanban-cli-README.md)
241
+ - [Agent CLI Skill 草稿](docs/input-kanban-cli-skill.md)
242
+ - [结构化手交说明](docs/input-kanban-prepare.md)
243
+ - [input-kanban-prepare Skill](skills/input-kanban-prepare/SKILL.md)
package/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Release Notes
2
2
 
3
+ ## v0.0.18
4
+
5
+ ### Highlights
6
+
7
+ - Rework the main README files to focus on how to use Input Kanban instead of only describing what it is.
8
+ - Add `skills/input-kanban-prepare/SKILL.md` and `docs/input-kanban-prepare.md` for structured task handoff from external Agent conversations.
9
+ - Add `input-kanban install-skill codex` to install the bundled `input-kanban-prepare` skill into a Codex skills directory.
10
+ - Extend `input-kanban guide` and `input-kanban --help` with a handoff-aware preparation flow and execution template.
11
+ - Teach the planner prompt to treat structured handoff sections such as Goal, Acceptance Criteria, and Expected Artifacts as the execution contract.
12
+
13
+ ### Verification
14
+
15
+ - `node --test test/cli-submit.test.js` passed locally.
16
+ - `git diff --check` passed locally.
17
+ - `node --check bin/input-kanban.js && node --check src/orchestrator.js` passed locally.
18
+ - Windows-native validation passed on `zhangxing_win` with `npm run check` in the Windows release-candidate working tree.
19
+
3
20
  ## v0.0.17
4
21
 
5
22
  ### Highlights
@@ -7,7 +7,7 @@ import { fileURLToPath } from 'node:url';
7
7
  const PACKAGE_VERSION = JSON.parse(await fsp.readFile(new URL('../package.json', import.meta.url), 'utf8')).version;
8
8
  const VALID_RUNNERS = ['headless', 'tmux'];
9
9
  const VALID_SANDBOXES = ['read-only', 'workspace-write', 'danger-full-access'];
10
- const COMMANDS = new Set(['serve', 'submit', 'runs', 'status', 'result', 'retry', 'stop', 'auto', 'guide']);
10
+ const COMMANDS = new Set(['serve', 'submit', 'runs', 'status', 'result', 'retry', 'stop', 'auto', 'guide', 'install-skill']);
11
11
  const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
12
12
  const STATUS_TEXT = {
13
13
  created: '已创建', planning: '拆分中', plan_failed: '拆分失败', plan_empty: '拆分为空', planned: '已拆分',
@@ -178,6 +178,22 @@ function parseGuideArgs(argv) {
178
178
  return args;
179
179
  }
180
180
 
181
+ function parseInstallSkillArgs(argv) {
182
+ const args = { provider: undefined, targetDir: undefined, force: false, dryRun: false, json: false, help: false };
183
+ for (let i = 0; i < argv.length; i++) {
184
+ const arg = argv[i];
185
+ const next = () => argv[++i];
186
+ if (arg === '--help' || arg === '-h') args.help = true;
187
+ else if (arg === '--json' || arg === '-j') args.json = true;
188
+ else if (arg === '--target-dir') args.targetDir = next();
189
+ else if (arg === '--force') args.force = true;
190
+ else if (arg === '--dry-run') args.dryRun = true;
191
+ else if (!arg.startsWith('-') && !args.provider) args.provider = arg;
192
+ else throw new Error(`unknown install-skill argument: ${arg}`);
193
+ }
194
+ return args;
195
+ }
196
+
181
197
  function parseSubmitArgs(argv) {
182
198
  const args = {
183
199
  host: '127.0.0.1', port: 8787, workspace: undefined, repo: undefined, runsDir: undefined, codexBin: undefined,
@@ -246,6 +262,7 @@ Usage:
246
262
  input-kanban serve [options]
247
263
  input-kanban submit [options]
248
264
  input-kanban guide [options]
265
+ input-kanban install-skill codex [options]
249
266
  input-kanban --version
250
267
  input-kanban runs [options]
251
268
  input-kanban status [runId] [options]
@@ -255,6 +272,8 @@ Usage:
255
272
 
256
273
  Agent guide:
257
274
  input-kanban guide Print a friendly agent-oriented control loop and templates
275
+ input-kanban install-skill codex
276
+ Install bundled input-kanban-prepare skill for Codex
258
277
 
259
278
  Serve options:
260
279
  --host <host> Host to bind, default 127.0.0.1
@@ -298,6 +317,12 @@ Stop options:
298
317
  --reason <text> Stop reason stored in run state
299
318
  -j, --json Emit JSON output instead of human text
300
319
 
320
+ Install skill options:
321
+ --target-dir <path> Codex skills root, default $CODEX_SKILLS_DIR or ~/.codex/skills
322
+ --dry-run Print the planned install target without copying files
323
+ --force Replace an existing installed skill directory
324
+ -j, --json Emit JSON output instead of human text
325
+
301
326
  Submit options:
302
327
  --workspace <path> Target workspace, default current directory
303
328
  -r, --repo <path> Alias for --workspace
@@ -442,11 +467,29 @@ Options:
442
467
  `);
443
468
  }
444
469
 
470
+ function printInstallSkillHelp() {
471
+ console.log(`input-kanban install-skill
472
+
473
+ Usage:
474
+ input-kanban install-skill codex
475
+ input-kanban install-skill codex --target-dir ~/.codex/skills
476
+ input-kanban install-skill codex --dry-run
477
+ input-kanban --json install-skill codex
478
+
479
+ Options:
480
+ --target-dir <path> Codex skills root, default $CODEX_SKILLS_DIR or ~/.codex/skills
481
+ --dry-run Print the planned install target without copying files
482
+ --force Replace an existing installed skill directory
483
+ -j, --json Emit JSON output instead of human text
484
+ `);
485
+ }
486
+
445
487
  function printAgentGuide(json = false) {
446
488
  const quickStart = [
447
489
  'Use `input-kanban` as the execution tool.',
448
490
  'Treat `submit` as a new task identity.',
449
491
  'Treat `retry` as a new attempt for the same task.',
492
+ 'If the task came from an external chat, prepare a structured `task.md` first.',
450
493
  'Use `status` before any state-dependent action.',
451
494
  'Use `result` for the final outcome.',
452
495
  'Use `stop` only with a known `runId`.'
@@ -470,6 +513,8 @@ function printAgentGuide(json = false) {
470
513
  title: 'Input Kanban Agent Guide',
471
514
  quickStart,
472
515
  templates,
516
+ handoffSections: ['Goal', 'Acceptance Criteria', 'Expected Artifacts', 'Context References', 'Risks'],
517
+ skillInstall: 'input-kanban install-skill codex',
473
518
  rules: [
474
519
  'submit = new task identity',
475
520
  'retry = same task definition, new attempt',
@@ -492,6 +537,16 @@ Core commands:
492
537
  result Read the final outcome
493
538
  stop Halt a known run
494
539
 
540
+ Preparation before submit:
541
+ - Goal
542
+ - Acceptance Criteria
543
+ - Expected Artifacts
544
+ - Context References
545
+ - Risks
546
+
547
+ Install bundled prepare skill:
548
+ input-kanban install-skill codex
549
+
495
550
  Example templates:
496
551
  ${templates.map((item, index) => ` ${String(index + 1).padStart(2, '0')}. ${item}`).join('\n')}
497
552
 
@@ -752,6 +807,55 @@ async function copyToClipboard(text) {
752
807
  throw new Error(`无法复制到剪贴板:${lastError?.message || '未找到可用剪贴板命令'}`);
753
808
  }
754
809
 
810
+ function homeDir() {
811
+ if (process.env.HOME) return process.env.HOME;
812
+ if (process.env.USERPROFILE) return process.env.USERPROFILE;
813
+ if (process.env.HOMEDRIVE && process.env.HOMEPATH) return `${process.env.HOMEDRIVE}${process.env.HOMEPATH}`;
814
+ return '';
815
+ }
816
+
817
+ function defaultCodexSkillsDir() {
818
+ if (process.env.CODEX_SKILLS_DIR) return path.resolve(process.env.CODEX_SKILLS_DIR);
819
+ const home = homeDir();
820
+ if (!home) throw new Error('cannot determine home directory; pass --target-dir');
821
+ return path.join(home, '.codex', 'skills');
822
+ }
823
+
824
+ async function pathExists(filePath) {
825
+ try { await fsp.access(filePath); return true; }
826
+ catch { return false; }
827
+ }
828
+
829
+ async function installSkill(args) {
830
+ const provider = String(args.provider || '').toLowerCase();
831
+ if (!provider) throw new Error('install-skill requires a provider, currently: codex');
832
+ if (provider !== 'codex') throw new Error(`unsupported skill provider: ${args.provider}; expected codex`);
833
+ const sourceDir = fileURLToPath(new URL('../skills/input-kanban-prepare', import.meta.url));
834
+ const skillsRoot = args.targetDir ? path.resolve(args.targetDir) : defaultCodexSkillsDir();
835
+ const targetDir = path.join(skillsRoot, 'input-kanban-prepare');
836
+ const exists = await pathExists(targetDir);
837
+ const payload = { ok: true, command: 'install-skill', provider, skill: 'input-kanban-prepare', sourceDir, skillsRoot, targetDir, dryRun: !!args.dryRun, installed: false, replaced: false };
838
+ if (args.dryRun) {
839
+ if (args.json) { printJson(payload); return; }
840
+ console.log(`Skill: input-kanban-prepare`);
841
+ console.log(`Provider: codex`);
842
+ console.log(`Source: ${sourceDir}`);
843
+ console.log(`Target: ${targetDir}`);
844
+ console.log('Dry run: no files copied');
845
+ return;
846
+ }
847
+ if (exists && !args.force) throw new Error(`skill already exists: ${targetDir}; pass --force to replace it`);
848
+ await fsp.mkdir(skillsRoot, { recursive: true });
849
+ if (exists && args.force) await fsp.rm(targetDir, { recursive: true, force: true });
850
+ await fsp.cp(sourceDir, targetDir, { recursive: true });
851
+ payload.installed = true;
852
+ payload.replaced = exists && !!args.force;
853
+ if (args.json) { printJson(payload); return; }
854
+ console.log(`已安装 Codex skill: input-kanban-prepare`);
855
+ console.log(`位置: ${targetDir}`);
856
+ console.log('在 Codex 对话中可尝试使用:use input-kanban-prepare skill');
857
+ }
858
+
755
859
  async function result(args) {
756
860
  applyRuntimeEnv(args);
757
861
  const runId = args.runId || await latestRunId();
@@ -856,6 +960,11 @@ try {
856
960
  args.json = args.json || globals.json;
857
961
  if (args.help) { printAgentGuide(args.json); process.exit(0); }
858
962
  printAgentGuide(args.json);
963
+ } else if (command === 'install-skill') {
964
+ const args = parseInstallSkillArgs(rest);
965
+ args.json = args.json || globals.json;
966
+ if (args.help) { printInstallSkillHelp(); process.exit(0); }
967
+ await installSkill(args);
859
968
  } else if (command === 'runs') {
860
969
  const args = parseRunsArgs(rest);
861
970
  args.json = args.json || globals.json;
@@ -0,0 +1,41 @@
1
+ # Input Kanban CLI Usage
2
+
3
+ This page is only the entry point.
4
+
5
+ Before using `input-kanban` from another project, read:
6
+
7
+ - `docs/input-kanban-cli-skill.md`
8
+ - `docs/input-kanban-prepare.md` when the task comes from an external Agent conversation
9
+
10
+ ## What this is for
11
+
12
+ - Controlled execution through the `input-kanban` CLI
13
+ - Structured handoff from external Agent conversations
14
+ - Status checks, retry handling, result retrieval, and stop control
15
+ - Agent usage in a project that needs stable task execution
16
+
17
+ ## What this is not for
18
+
19
+ - Task decomposition
20
+ - Final acceptance decisions
21
+ - Replacing external gate checks
22
+
23
+ ## Install the bundled prepare skill
24
+
25
+ ```bash
26
+ input-kanban install-skill codex
27
+ ```
28
+
29
+ Use `--target-dir` if your Codex skills root is not `~/.codex/skills`:
30
+
31
+ ```bash
32
+ input-kanban install-skill codex --target-dir /path/to/codex/skills
33
+ ```
34
+
35
+ ## Quick rule
36
+
37
+ - Use `submit` for a new task identity
38
+ - Use `retry` for the same task definition with a new attempt
39
+ - Use `status` before state-dependent actions
40
+ - Use `result` for final confirmation
41
+ - Use `stop` only with an explicit `runId`
@@ -0,0 +1,241 @@
1
+ # Input Kanban CLI Skill Draft
2
+
3
+ ## Purpose
4
+
5
+ Use the `input-kanban` CLI as the execution tool for tasks that have already been decomposed and accepted externally. This skill is for controlled execution, status checks, retry handling, and result retrieval. It is not responsible for task decomposition or final acceptance decisions.
6
+
7
+ ## Core Principles
8
+
9
+ - Treat `input-kanban` as the execution surface, not the source of truth for decomposition or acceptance.
10
+ - Prefer updating or retrying an existing run instead of creating a new run when the task definition is the same.
11
+ - Keep task identity stable and use attempts to represent re-execution.
12
+ - Use `status`, `result`, and `stop` for observation and control.
13
+ - Do not rely on the model alone to declare completion.
14
+
15
+ ## Before `submit`: Prepare the Handoff
16
+
17
+ If the task came from an external Agent conversation, prepare a structured `task.md` first. Prefer these sections:
18
+
19
+ - `Goal`
20
+ - `Acceptance Criteria`
21
+ - `Expected Artifacts`
22
+ - `Context References`
23
+ - `Risks`
24
+
25
+ Use `skills/input-kanban-prepare/SKILL.md` when an Agent needs a stricter preparation workflow.
26
+
27
+ ## When to Use `submit`
28
+
29
+ Use `submit` only when a new task identity is needed.
30
+
31
+ Examples:
32
+
33
+ - The task goal changed.
34
+ - The workspace or scope changed materially.
35
+ - You intentionally want to start a new run with a clean history.
36
+
37
+ Recommended forms:
38
+
39
+ ```bash
40
+ input-kanban submit --task "..."
41
+ input-kanban submit --task-file task.md
42
+ input-kanban submit --task-file task.md --plan-approval
43
+ ```
44
+
45
+ ## When to Use `retry`
46
+
47
+ Use `retry` when the task is the same, but the previous execution did not pass a gate or failed to complete correctly.
48
+
49
+ Examples:
50
+
51
+ - Planner output was invalid.
52
+ - A worker failed or was marked unknown.
53
+ - The final judge needs another attempt after a blocking issue is resolved.
54
+
55
+ Recommended forms:
56
+
57
+ ```bash
58
+ input-kanban retry <runId>
59
+ input-kanban retry <runId> <taskId>
60
+ ```
61
+
62
+ Retry should be treated as a new execution attempt for the same task definition, not as an overwrite of the prior attempt.
63
+
64
+ ## When to Use `status`
65
+
66
+ Use `status` whenever you need to know the current state before acting.
67
+
68
+ Recommended forms:
69
+
70
+ ```bash
71
+ input-kanban status <runId>
72
+ input-kanban status <runId> --watch
73
+ input-kanban --json status <runId>
74
+ ```
75
+
76
+ Use `--json` when another tool or agent needs structured output.
77
+
78
+ ## When to Use `result`
79
+
80
+ Use `result` only after the run reaches a terminal state or when a final outcome is needed for review.
81
+
82
+ Recommended forms:
83
+
84
+ ```bash
85
+ input-kanban result <runId>
86
+ input-kanban --json result <runId>
87
+ input-kanban result <runId> --copy
88
+ ```
89
+
90
+ Prefer the persisted judge result over the model's own summary.
91
+
92
+ ## When to Use `stop`
93
+
94
+ Use `stop` when execution should halt immediately.
95
+
96
+ Recommended form:
97
+
98
+ ```bash
99
+ input-kanban stop <runId>
100
+ ```
101
+
102
+ Only stop an explicitly named run. Never stop by guesswork.
103
+
104
+ ## Suggested Control Loop
105
+
106
+ 1. Discover active work:
107
+
108
+ ```bash
109
+ input-kanban --json runs --active
110
+ ```
111
+
112
+ 2. Inspect a run:
113
+
114
+ ```bash
115
+ input-kanban --json status <runId>
116
+ ```
117
+
118
+ 3. If blocked or failed, decide whether to retry or stop.
119
+ 4. If retry is appropriate, call `retry` on the same run.
120
+ 5. If the task is complete, fetch the final result:
121
+
122
+ ```bash
123
+ input-kanban --json result <runId>
124
+ ```
125
+
126
+ ## Decision Rules
127
+
128
+ - Use `submit` only for a new task identity.
129
+ - Use `retry` for the same task definition with a new execution attempt.
130
+ - Use `status` before any action that depends on current state.
131
+ - Use `result` for final confirmation.
132
+ - Use `stop` only with a known `runId`.
133
+
134
+ ## Safety Rules
135
+
136
+ - Do not create a new run just to recover from a failed attempt if the task definition has not changed.
137
+ - Do not treat a failed execution as a successful result.
138
+ - Do not let the model self-approve completion without external evidence.
139
+ - Prefer preserving history and attempt lineage.
140
+
141
+ ## Practical Guidance
142
+
143
+ - If the task is still the same, keep the task identity stable and create a new attempt.
144
+ - If the task meaning changed, start a new run.
145
+ - If the run is blocked, surface the warning and wait for external intervention or a retry decision.
146
+ - If the run is already terminal, do not mutate it in place.
147
+
148
+ ## Example Patterns
149
+
150
+ ### New task
151
+
152
+ ```bash
153
+ input-kanban submit --task "Refactor the task scheduler to support gates" --label "Scheduler gate refactor"
154
+ ```
155
+
156
+ ### Retry the same task
157
+
158
+ ```bash
159
+ input-kanban retry run_1234567890
160
+ ```
161
+
162
+ ### Check progress
163
+
164
+ ```bash
165
+ input-kanban status run_1234567890 --watch
166
+ ```
167
+
168
+ ### Get final outcome
169
+
170
+ ```bash
171
+ input-kanban result run_1234567890 --copy
172
+ ```
173
+
174
+ ## Example Templates
175
+
176
+ ### 1. Submit a new task from inline text
177
+
178
+ ```bash
179
+ input-kanban submit --task "Implement the new gate workflow" --label "gate-workflow"
180
+ ```
181
+
182
+ ### 2. Submit a task from a file
183
+
184
+ ```bash
185
+ input-kanban submit --task-file task.md
186
+ ```
187
+
188
+ ### 3. Submit with plan approval enabled
189
+
190
+ ```bash
191
+ input-kanban submit --task-file task.md --plan-approval
192
+ ```
193
+
194
+ ### 4. Submit detached for background execution
195
+
196
+ ```bash
197
+ input-kanban submit --task-file task.md --detach
198
+ ```
199
+
200
+ ### 5. Check a run once
201
+
202
+ ```bash
203
+ input-kanban status run_1234567890
204
+ ```
205
+
206
+ ### 6. Watch a run until it changes
207
+
208
+ ```bash
209
+ input-kanban status run_1234567890 --watch
210
+ ```
211
+
212
+ ### 7. Inspect the final result
213
+
214
+ ```bash
215
+ input-kanban result run_1234567890
216
+ ```
217
+
218
+ ### 8. Copy the final result for handoff
219
+
220
+ ```bash
221
+ input-kanban result run_1234567890 --copy
222
+ ```
223
+
224
+ ### 9. Retry the whole run
225
+
226
+ ```bash
227
+ input-kanban retry run_1234567890
228
+ ```
229
+
230
+ ### 10. Stop a known run immediately
231
+
232
+ ```bash
233
+ input-kanban stop run_1234567890
234
+ ```
235
+
236
+ ## Notes for Agent Behavior
237
+
238
+ - Prefer stable task identity over repeated recreation.
239
+ - Prefer attempt lineage over overwriting history.
240
+ - Treat gates as external decisions, not as assumptions.
241
+ - When in doubt, ask for clarification before creating a new run.
@@ -0,0 +1,93 @@
1
+ # Preparing Tasks for Input Kanban
2
+
3
+ Use this guide when a task starts in an external Agent conversation and should be handed off to `input-kanban` for execution.
4
+
5
+ The goal is not to make Input Kanban do all planning from a vague prompt. The goal is to give it a clear execution contract so the planner, workers, and final judge have better inputs.
6
+
7
+ ## Recommended Flow
8
+
9
+ 1. Use the external Agent conversation to clarify the goal, scope, risks, and acceptance criteria.
10
+ 2. Convert the discussion into a structured `task.md`.
11
+ 3. Submit the task with plan approval:
12
+
13
+ ```bash
14
+ input-kanban submit --task-file task.md --plan-approval
15
+ ```
16
+
17
+ 4. Review the generated plan before dispatching workers.
18
+ 5. Use `status`, `result`, `retry`, and `stop` to control execution.
19
+
20
+ ## Minimal `task.md` Structure
21
+
22
+ ```markdown
23
+ # Task
24
+
25
+ ## Goal
26
+
27
+ Describe the desired outcome in one or two concrete paragraphs.
28
+
29
+ ## Non-Goals
30
+
31
+ - List what should not be changed.
32
+
33
+ ## Acceptance Criteria
34
+
35
+ - [ ] Criterion that can be tested, inspected, or verified.
36
+ - [ ] Another criterion.
37
+
38
+ ## Expected Artifacts
39
+
40
+ - Path: `relative/or/absolute/path`
41
+ Verify: command, inspection step, or expected content.
42
+
43
+ ## Context References
44
+
45
+ - `path/to/spec.md`
46
+ - `path/to/relevant/file.ts`
47
+
48
+ ## Execution Hints
49
+
50
+ ### Suggested Batches
51
+
52
+ - Batch: first safe step
53
+ Reason: why this is an execution barrier
54
+ Max parallel: 1
55
+ Tasks:
56
+ - concrete worker instruction
57
+
58
+ ## Risks and Assumptions
59
+
60
+ - Known risk, assumption, or unresolved detail.
61
+ ```
62
+
63
+ ## Good Handoff Checklist
64
+
65
+ - The goal is specific.
66
+ - The scope is bounded.
67
+ - Acceptance criteria are checkable.
68
+ - Expected artifacts include verification methods.
69
+ - Context references point to real material.
70
+ - Batch hints explain dependencies or safety reasons.
71
+ - Risks and assumptions are visible.
72
+
73
+ ## Skill Template
74
+
75
+ A reusable skill draft is available at:
76
+
77
+ ```text
78
+ skills/input-kanban-prepare/SKILL.md
79
+ ```
80
+
81
+ After installing the npm package, you can install the bundled skill for Codex:
82
+
83
+ ```bash
84
+ input-kanban install-skill codex
85
+ ```
86
+
87
+ Use `--target-dir` if your Codex skills root is custom:
88
+
89
+ ```bash
90
+ input-kanban install-skill codex --target-dir /path/to/codex/skills
91
+ ```
92
+
93
+ Use it in external Agent tools when you want the Agent to prepare a better `task.md` before invoking Input Kanban.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "input-kanban",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "input-kanban": "bin/input-kanban.js"
@@ -15,6 +15,8 @@
15
15
  "bin",
16
16
  "src",
17
17
  "public",
18
+ "docs",
19
+ "skills",
18
20
  "README.md",
19
21
  "README.en.md",
20
22
  "RELEASE_NOTES.md",
@@ -0,0 +1,97 @@
1
+ # input-kanban-prepare
2
+
3
+ Use this skill when a task discussed in an external Agent conversation needs to be handed off to `input-kanban` for execution.
4
+
5
+ This skill prepares an execution-ready `task.md`. It does not execute the task and does not decide final acceptance.
6
+
7
+ ## Non-Negotiable Rules
8
+
9
+ - Evidence first: inspect relevant code, specs, history, docs, or user-provided context before writing the handoff.
10
+ - Do not invent requirements, files, or acceptance criteria.
11
+ - Every acceptance criterion must be verifiable by a human, command, artifact, or clear inspection step.
12
+ - Every expected artifact must include how to verify it.
13
+ - If the task is ambiguous, ask clarifying questions before preparing the handoff.
14
+ - Do not output an `input-kanban submit` command until the handoff passes the quality gate.
15
+
16
+ ## Workflow
17
+
18
+ 1. Restate the goal in one or two sentences.
19
+ 2. Identify non-goals and scope boundaries.
20
+ 3. Collect evidence and context references.
21
+ 4. Write acceptance criteria as checkable bullets.
22
+ 5. Identify expected artifacts and verification methods.
23
+ 6. Suggest batches only when order or safety matters.
24
+ 7. List risks, assumptions, and open questions.
25
+ 8. Run the quality gate.
26
+ 9. Output the final `task.md` and a recommended submit command.
27
+
28
+ ## Required `task.md` Shape
29
+
30
+ ```markdown
31
+ # Task
32
+
33
+ ## Goal
34
+
35
+ ...
36
+
37
+ ## Non-Goals
38
+
39
+ - ...
40
+
41
+ ## Acceptance Criteria
42
+
43
+ - [ ] ...
44
+ - [ ] ...
45
+
46
+ ## Expected Artifacts
47
+
48
+ - Path: `...`
49
+ Verify: ...
50
+
51
+ ## Context References
52
+
53
+ - `...`
54
+
55
+ ## Execution Hints
56
+
57
+ ### Suggested Batches
58
+
59
+ - Batch: ...
60
+ Reason: ...
61
+ Max parallel: ...
62
+ Tasks:
63
+ - ...
64
+
65
+ ## Risks and Assumptions
66
+
67
+ - ...
68
+ ```
69
+
70
+ ## Quality Gate
71
+
72
+ Before producing the submit command, confirm:
73
+
74
+ - The goal is concrete.
75
+ - The scope is bounded.
76
+ - Acceptance criteria are testable or inspectable.
77
+ - Expected artifacts have verification methods.
78
+ - Batch hints explain why ordering or parallelism matters.
79
+ - Context references point to real files, notes, specs, or user-provided material.
80
+ - Risks and unknowns are explicit.
81
+
82
+ If any item fails, do not submit. Ask for clarification or improve the handoff.
83
+
84
+ ## Recommended Submit Command
85
+
86
+ Prefer plan approval for external handoffs:
87
+
88
+ ```bash
89
+ input-kanban submit --task-file task.md --plan-approval
90
+ ```
91
+
92
+ Use `--json` when another tool needs structured output:
93
+
94
+ ```bash
95
+ input-kanban --json status <runId>
96
+ input-kanban --json result <runId>
97
+ ```
@@ -381,6 +381,10 @@ Rules:
381
381
  - Include exact output/artifact expectations in each worker prompt.
382
382
  - Default worker sandbox for this run is ${state.workerSandbox || 'workspace-write'}; use that sandbox unless a task has a specific safety reason to be stricter.
383
383
  - If the input already contains task sections, preserve their ids when practical.
384
+ - If the input contains structured handoff sections such as Goal, Acceptance Criteria, Expected Artifacts, Context References, Execution Hints, Risks, or Suggested Batches, treat them as the execution contract.
385
+ - Do not change the user's goal or acceptance criteria. Convert the contract into safe batches, concrete worker prompts, and expectedArtifacts.
386
+ - Use provided expected artifacts and verification notes to make each worker task and the final judge easier to verify.
387
+ - If a handoff is incomplete, make conservative assumptions explicit inside worker prompts instead of silently inventing scope.
384
388
 
385
389
  User task:
386
390
  ${taskText}