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 +115 -76
- package/README.md +112 -83
- package/RELEASE_NOTES.md +17 -0
- package/bin/input-kanban.js +110 -1
- package/docs/input-kanban-cli-README.md +41 -0
- package/docs/input-kanban-cli-skill.md +241 -0
- package/docs/input-kanban-prepare.md +93 -0
- package/package.json +3 -1
- package/skills/input-kanban-prepare/SKILL.md +97 -0
- package/src/orchestrator.js +4 -0
package/README.en.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[中文](README.md) | English
|
|
4
4
|
|
|
5
|
-
Input Kanban
|
|
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
|
-
##
|
|
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
|
|
15
|
+
Verify it works:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
input-kanban --help
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
### 2. Start
|
|
21
|
+
### 2. Start inside your target workspace
|
|
22
22
|
|
|
23
|
-
|
|
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,
|
|
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
|
|
36
|
+
Open that URL in your browser to create runs, watch progress, and read results.
|
|
37
37
|
|
|
38
|
-
### 3. Start
|
|
38
|
+
### 3. Start without `cd`
|
|
39
39
|
|
|
40
|
-
If you do not want to
|
|
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`
|
|
46
|
+
`--repo` is still supported as a compatibility alias.
|
|
47
47
|
|
|
48
|
-
##
|
|
48
|
+
## The 6 Most Common Ways to Use It
|
|
49
49
|
|
|
50
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
67
|
+
```bash
|
|
68
|
+
input-kanban submit --task-file task.md
|
|
69
|
+
```
|
|
62
70
|
|
|
63
|
-
|
|
71
|
+
### 3) Pause after planning for approval
|
|
64
72
|
|
|
65
73
|
```bash
|
|
66
|
-
input-kanban submit --task-file task.md -
|
|
74
|
+
input-kanban submit --task-file task.md --plan-approval
|
|
67
75
|
```
|
|
68
76
|
|
|
69
|
-
|
|
77
|
+
This pauses after planning and waits for you to confirm the plan in the Web UI before dispatching workers.
|
|
70
78
|
|
|
71
|
-
|
|
79
|
+
### 4) Create and plan only
|
|
72
80
|
|
|
73
81
|
```bash
|
|
74
|
-
input-kanban submit --task
|
|
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
|
|
85
|
+
### 5) Check progress, result, retry, or stop
|
|
80
86
|
|
|
81
87
|
```bash
|
|
82
|
-
input-kanban
|
|
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
|
|
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
|
-
|
|
96
|
+
### 6) If you are an Agent and can only call the CLI
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
Run:
|
|
99
99
|
|
|
100
100
|
```bash
|
|
101
|
-
input-kanban
|
|
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
|
-
|
|
104
|
+
Or:
|
|
110
105
|
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
-
|
|
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
|
-
|
|
112
|
+
To install the bundled `input-kanban-prepare` skill for Codex:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
input-kanban install-skill codex
|
|
116
|
+
```
|
|
119
117
|
|
|
120
|
-
|
|
118
|
+
To specify the Codex skills root explicitly:
|
|
121
119
|
|
|
122
|
-
|
|
120
|
+
```bash
|
|
121
|
+
input-kanban install-skill codex --target-dir ~/.codex/skills
|
|
122
|
+
```
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
## Hand Off from an External Agent Conversation
|
|
125
125
|
|
|
126
|
-
|
|
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
|
-
|
|
128
|
+
```bash
|
|
129
|
+
input-kanban submit --task-file task.md --plan-approval
|
|
130
|
+
```
|
|
129
131
|
|
|
130
|
-
|
|
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
|
-
|
|
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
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
-
|
|
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
|
|
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
|
|
176
|
-
- `tmux` installed
|
|
177
|
-
- The `codex` command works in your terminal, or `--codex-bin` points to the
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
50
|
+
1. 点击 `新建任务批次`
|
|
51
|
+
2. 填好工作区、Worker 沙箱和任务说明
|
|
52
|
+
3. 点击 `创建批次`
|
|
53
|
+
4. 看板会自动发起 `拆分任务`
|
|
54
|
+
5. 拆分完成后自动派发 worker
|
|
55
|
+
6. 所有批次完成后自动发起最终验收
|
|
49
56
|
|
|
50
|
-
|
|
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
|
-
|
|
63
|
+
如果你想从文件读任务:
|
|
58
64
|
|
|
59
|
-
|
|
65
|
+
```bash
|
|
66
|
+
input-kanban submit --task-file task.md
|
|
67
|
+
```
|
|
60
68
|
|
|
61
|
-
|
|
69
|
+
### 3) 先看计划,再决定是否执行
|
|
62
70
|
|
|
63
71
|
```bash
|
|
64
72
|
input-kanban submit --task-file task.md --plan-approval
|
|
65
73
|
```
|
|
66
74
|
|
|
67
|
-
|
|
75
|
+
这会在规划完成后停在“已拆分,待确认”,等你在 Web 上点 `开始执行` 再继续。
|
|
76
|
+
|
|
77
|
+
### 4) 只想创建并规划,不马上派发
|
|
68
78
|
|
|
69
|
-
|
|
79
|
+
```bash
|
|
80
|
+
input-kanban submit --task-file task.md --no-auto
|
|
81
|
+
```
|
|
70
82
|
|
|
71
|
-
|
|
83
|
+
### 5) 查看进度 / 结果 / 重试 / 停止
|
|
72
84
|
|
|
73
85
|
```bash
|
|
74
|
-
input-kanban
|
|
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
|
-
|
|
94
|
+
### 6) 如果你是 Agent,只会调用 CLI
|
|
78
95
|
|
|
79
|
-
|
|
96
|
+
直接运行:
|
|
80
97
|
|
|
81
98
|
```bash
|
|
82
|
-
input-kanban
|
|
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
|
|
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
|
-
`
|
|
108
|
+
`guide` 会输出一个更适合 Agent 的操作循环和可直接复制的示例模板。
|
|
105
109
|
|
|
106
|
-
|
|
110
|
+
如果你想把内置的 `input-kanban-prepare` skill 安装到 Codex:
|
|
107
111
|
|
|
108
112
|
```bash
|
|
109
|
-
input-kanban
|
|
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
|
-
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
|
|
126
|
+
```bash
|
|
127
|
+
input-kanban submit --task-file task.md --plan-approval
|
|
128
|
+
```
|
|
127
129
|
|
|
128
|
-
|
|
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
|
-
|
|
155
|
+
如果你需要让脚本或其它工具接管,`--json` 会给出结构化输出。
|
|
131
156
|
|
|
132
|
-
tmux
|
|
157
|
+
## tmux 模式(可选)
|
|
133
158
|
|
|
134
|
-
|
|
159
|
+
默认 runner 是 `headless`。如果你想在终端里实时看每个角色怎么跑,可以切到 `tmux`:
|
|
135
160
|
|
|
136
|
-
|
|
161
|
+
```bash
|
|
162
|
+
input-kanban submit --task-file task.md --runner tmux
|
|
163
|
+
```
|
|
137
164
|
|
|
138
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
- `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
|
package/bin/input-kanban.js
CHANGED
|
@@ -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.
|
|
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
|
+
```
|
package/src/orchestrator.js
CHANGED
|
@@ -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}
|