tasks-toolkit 0.1.3__tar.gz → 0.1.4__tar.gz

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.
Files changed (81) hide show
  1. tasks_toolkit-0.1.4/PKG-INFO +261 -0
  2. tasks_toolkit-0.1.4/README.md +212 -0
  3. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/pyproject.toml +4 -2
  4. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/apply-plan.sh +1 -4
  5. tasks_toolkit-0.1.4/scripts/run-task.sh +12 -0
  6. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/run_summary.py +6 -5
  7. tasks_toolkit-0.1.4/scripts/sprint-auto.sh +4 -0
  8. tasks_toolkit-0.1.4/scripts/sprint_auto.py +167 -0
  9. tasks_toolkit-0.1.4/scripts/sprint_auto_execute.py +132 -0
  10. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/sprint_auto_preflight.py +3 -3
  11. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/sprint_auto_prepare.py +29 -16
  12. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/sprint_auto_resume.py +13 -11
  13. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/sprint_auto_state.py +38 -31
  14. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/sprint_plan.py +1 -1
  15. tasks_toolkit-0.1.4/scripts/task_runner.py +214 -0
  16. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/tasks.py +167 -666
  17. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/tasks_cli.py +2 -2
  18. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/tasks_commands.py +2 -2
  19. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/tasks_init.py +3 -3
  20. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/tasks_mcp.py +6 -6
  21. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/tasks_model.py +54 -6
  22. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/tasks_plan_import.py +2 -3
  23. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/tasks_render.py +9 -13
  24. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/tasks_storage.py +65 -65
  25. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/tasks_watch.py +2 -4
  26. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_python_fast.sh +0 -1
  27. tasks_toolkit-0.1.3/scripts/build.sh → tasks_toolkit-0.1.4/scripts/test_python_lint.sh +2 -3
  28. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_python_slow.sh +1 -1
  29. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_spec_lint.sh +17 -29
  30. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_sprint_auto.py +1 -4
  31. tasks_toolkit-0.1.4/scripts/test_sprint_auto_execute.py +34 -0
  32. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_sprint_auto_preflight.py +2 -2
  33. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_sprint_auto_prepare.py +5 -12
  34. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_sprint_auto_resume.py +4 -7
  35. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_sprint_auto_state.py +9 -23
  36. tasks_toolkit-0.1.4/scripts/test_sprint_lifecycle.py +116 -0
  37. tasks_toolkit-0.1.4/scripts/test_task_runner.py +167 -0
  38. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_tasks.py +13 -16
  39. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_tasks_mcp.py +4 -4
  40. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_tasks_plan_import.py +6 -8
  41. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_tasks_storage.py +4 -5
  42. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_tasks_watch.py +3 -7
  43. tasks_toolkit-0.1.4/tasks_toolkit.egg-info/PKG-INFO +261 -0
  44. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/tasks_toolkit.egg-info/SOURCES.txt +4 -19
  45. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/tasks_toolkit.egg-info/entry_points.txt +2 -0
  46. tasks_toolkit-0.1.3/PKG-INFO +0 -121
  47. tasks_toolkit-0.1.3/README.md +0 -72
  48. tasks_toolkit-0.1.3/scripts/agents_sync.py +0 -61
  49. tasks_toolkit-0.1.3/scripts/codex-task.sh +0 -198
  50. tasks_toolkit-0.1.3/scripts/install-hooks.sh +0 -9
  51. tasks_toolkit-0.1.3/scripts/junie-status.sh +0 -52
  52. tasks_toolkit-0.1.3/scripts/junie-task.sh +0 -183
  53. tasks_toolkit-0.1.3/scripts/kilo-task.sh +0 -226
  54. tasks_toolkit-0.1.3/scripts/needs-dotnet-checks.sh +0 -24
  55. tasks_toolkit-0.1.3/scripts/plan-sprint.sh +0 -92
  56. tasks_toolkit-0.1.3/scripts/run-task.sh +0 -79
  57. tasks_toolkit-0.1.3/scripts/run.sh +0 -7
  58. tasks_toolkit-0.1.3/scripts/sprint-auto.sh +0 -79
  59. tasks_toolkit-0.1.3/scripts/sprint_auto_execute.py +0 -160
  60. tasks_toolkit-0.1.3/scripts/test.sh +0 -43
  61. tasks_toolkit-0.1.3/scripts/test_agent_config.py +0 -97
  62. tasks_toolkit-0.1.3/scripts/test_plan_sprint.sh +0 -172
  63. tasks_toolkit-0.1.3/scripts/test_python_lint.sh +0 -22
  64. tasks_toolkit-0.1.3/scripts/test_runners.sh +0 -588
  65. tasks_toolkit-0.1.3/scripts/test_sprint_auto_execute.py +0 -112
  66. tasks_toolkit-0.1.3/scripts/test_worktree.sh +0 -2112
  67. tasks_toolkit-0.1.3/scripts/worktree.sh +0 -992
  68. tasks_toolkit-0.1.3/scripts/worktree_mr.py +0 -133
  69. tasks_toolkit-0.1.3/scripts/worktree_path.py +0 -70
  70. tasks_toolkit-0.1.3/scripts/worktree_sprint.py +0 -70
  71. tasks_toolkit-0.1.3/tasks_toolkit.egg-info/PKG-INFO +0 -121
  72. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/LICENSE +0 -0
  73. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/__init__.py +0 -0
  74. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/run_stats.py +0 -0
  75. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/spec-lint.sh +0 -0
  76. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/task-report.sh +0 -0
  77. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/scripts/test_run_stats.py +0 -0
  78. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/setup.cfg +0 -0
  79. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/tasks_toolkit.egg-info/dependency_links.txt +0 -0
  80. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/tasks_toolkit.egg-info/requires.txt +0 -0
  81. {tasks_toolkit-0.1.3 → tasks_toolkit-0.1.4}/tasks_toolkit.egg-info/top_level.txt +0 -0
@@ -0,0 +1,261 @@
1
+ Metadata-Version: 2.4
2
+ Name: tasks-toolkit
3
+ Version: 0.1.4
4
+ Summary: Task tracker toolkit: CLI + MCP server for sprint/task/subtask management, delegation helpers.
5
+ Author: prachwal
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 prachwal
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/prachwal/tasks-toolkit
29
+ Project-URL: Repository, https://github.com/prachwal/tasks-toolkit
30
+ Project-URL: Issues, https://github.com/prachwal/tasks-toolkit/issues
31
+ Keywords: mcp,task-tracker,cli,sprints
32
+ Classifier: Development Status :: 3 - Alpha
33
+ Classifier: Environment :: Console
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.10
38
+ Classifier: Programming Language :: Python :: 3.11
39
+ Classifier: Programming Language :: Python :: 3.12
40
+ Requires-Python: >=3.10
41
+ Description-Content-Type: text/markdown
42
+ License-File: LICENSE
43
+ Provides-Extra: dev
44
+ Requires-Dist: ruff>=0.5; extra == "dev"
45
+ Requires-Dist: mypy>=1.10; extra == "dev"
46
+ Requires-Dist: pytest>=8; extra == "dev"
47
+ Requires-Dist: pytest-xdist>=3; extra == "dev"
48
+ Dynamic: license-file
49
+
50
+ # tasks-toolkit
51
+
52
+ A small, self-contained task tracker (sprints → tasks → subtasks) with a CLI and an MCP server.
53
+
54
+ ## Contents
55
+
56
+ - `scripts/` — all tracker code (see table below).
57
+ - `pyproject.toml` — ruff/mypy/pytest configuration.
58
+
59
+ ## Installation
60
+
61
+ ### From PyPI (recommended)
62
+
63
+ ```bash
64
+ pipx install tasks-toolkit
65
+ # or: uv tool install tasks-toolkit
66
+ tasks-init
67
+ tasks overview
68
+ ```
69
+
70
+ ### From source
71
+
72
+ ```bash
73
+ git clone https://github.com/prachwal/tasks-toolkit.git
74
+ cd tasks-toolkit
75
+ python -m pip install -e .
76
+ tasks-init
77
+ tasks overview
78
+ ```
79
+
80
+ ### Docker
81
+
82
+ ```bash
83
+ docker build -t tasks-toolkit .
84
+ docker run --rm -i -v tasks-data:/data tasks-toolkit
85
+ ```
86
+
87
+ ## Quick start (from source)
88
+
89
+ ```bash
90
+ python3 scripts/tasks_init.py # create tasks/tasks.db
91
+ python3 scripts/tasks.py overview # show sprints
92
+ python3 scripts/tasks.py next # next ready task
93
+ ```
94
+
95
+ Data belongs to the current Git project (the main checkout when invoked from a worktree).
96
+ Outside Git, it belongs to the current directory. Installed commands never use their
97
+ installation directory for data. Override the location with `TASKS_ROOT`:
98
+
99
+ ```bash
100
+ export TASKS_ROOT=/path/to/data
101
+ python3 scripts/tasks.py overview
102
+ ```
103
+
104
+ ## MCP (OpenCode)
105
+
106
+ ```jsonc
107
+ "tasks": {
108
+ "type": "local",
109
+ "command": ["python3", "{env:HOME}/src/tasks-toolkit/scripts/tasks_mcp.py"],
110
+ "cwd": "{env:HOME}/src/tasks-toolkit",
111
+ "environment": { "TASKS_ROOT": "{env:HOME}/src/tasks-toolkit" }
112
+ }
113
+ ```
114
+
115
+ ## Verified task and sprint execution
116
+
117
+ Copy `.tasks-toolkit.example.json` to `.tasks-toolkit.json`, choose the checks for
118
+ **your project**, and commit the configuration. Commands are argument arrays;
119
+ no shell interpolation is performed. Every configured check must pass. Keep
120
+ `tmp/` and generated `tasks/` files in `.gitignore`, as in this repository.
121
+
122
+ The default coder uses [Codex non-interactive mode](https://developers.openai.com/codex/noninteractive):
123
+ `codex exec --sandbox workspace-write -`. Install and authenticate its CLI separately.
124
+ To use Junie or Kilo, set `runners.junie` or `runners.kilo` to the argument array for
125
+ your local adapter. Adapters receive the spec on stdin, edit files in their current
126
+ working directory, leave changes uncommitted, and return nonzero on failure.
127
+ The same `runners.codex` setting can select a custom Codex adapter.
128
+
129
+ Installed commands are `tasks-run` and `tasks-sprint`; from source, the corresponding
130
+ wrappers are `scripts/run-task.sh` and `scripts/sprint-auto.sh`.
131
+
132
+ Run one task in a clean working tree, with an explicit allowed scope:
133
+
134
+ ```bash
135
+ tasks-run result \
136
+ --file tmp/tasks/result.md --scope src/ --runner codex
137
+ ```
138
+
139
+ Alternatively, `--task-id 1.1` reads scope links from the tracker. The runner checks
140
+ all actual tracked changes, deletions and untracked files, runs the configured
141
+ checks and commits only verified changes. Input flags such as `checks_green`
142
+ and `tracker_done` are never evidence. Failures preserve the working tree and
143
+ write a report to `tmp/runs/<name>.result.json`. Exit codes: 0 verified, 1 rejected,
144
+ 3 runner/configuration failure. Optional fallback runs only after a runner failure
145
+ that left the working tree clean.
146
+
147
+ For a complete sprint, supply a plan containing `sprint` (`slug`, `title`, `goal`)
148
+ and `tasks` (`key`, `title`, `scope`, `spec_name`, `spec`, `depends_on`). Specs must
149
+ pass `scripts/spec-lint.sh`; dependencies reference earlier task keys. An answers
150
+ file binds the reviewed goal, allowed paths and execution policy:
151
+
152
+ ```json
153
+ {
154
+ "goal_reviewed": true,
155
+ "allowed_scopes": ["src/"],
156
+ "policy": {
157
+ "runner": "codex", "serial": true, "fallback": "none", "retries": 0,
158
+ "push": false, "accept_flags": false, "reset": false, "clean": false
159
+ }
160
+ }
161
+ ```
162
+
163
+ Start from a clean `main` branch:
164
+
165
+ ```bash
166
+ tasks-sprint --yolo-force \
167
+ --goal "Implement the feature" --run-name feature \
168
+ --answers tmp/plans/feature.answers.json --plan tmp/plans/feature.json
169
+ ```
170
+
171
+ The lifecycle imports the plan, creates a sprint branch and worktree, executes
172
+ tasks serially, checks the diff against task and approved scopes, and records
173
+ verified commits in the tracker. Final checks precede a fast-forward into the
174
+ unchanged approved `main`; no push is performed. Worktrees and checkpoints remain
175
+ available for inspection.
176
+
177
+ Use the same command with `--resume` to continue a clean checkpoint. Goal, answers,
178
+ plan, configuration and Git refs must still match. A dirty or unexpectedly advanced
179
+ worktree requires inspection; it is never reset, cleaned or blindly rerun.
180
+
181
+ ## Development checks
182
+
183
+ ```bash
184
+ python3 -m pip install -e '.[dev]'
185
+ bash scripts/test_python_lint.sh
186
+ python3 -m pytest -q
187
+ bash scripts/test_spec_lint.sh
188
+ ```
189
+
190
+ CI requires lint, type checking, all Python tests, shell tests and distribution
191
+ builds to pass. VS Code tracker commands are provided in `.vscode/tasks.json`.
192
+
193
+ ## Scripts
194
+
195
+ ### Core tracker
196
+
197
+ | File | Purpose |
198
+ |---|---|
199
+ | `tasks.py` | Task tracker CLI: sprints → tasks → subtasks, SQLite-backed (`tasks/tasks.db`). |
200
+ | `tasks_init.py` | Create an empty task database from scratch. |
201
+ | `tasks_mcp.py` | MCP server (stdio) exposing tracker operations as tools. |
202
+ | `tasks_cli.py` | CLI parser and entry point for the tracker. |
203
+ | `tasks_commands.py` | Command handlers for the tracker. |
204
+ | `tasks_model.py` | Core data model (nodes, statuses, walk/find/effective). |
205
+ | `tasks_storage.py` | SQLite storage layer. |
206
+ | `tasks_render.py` | Markdown rendering of the task view. |
207
+ | `tasks_watch.py` | Background watcher keeping the view and snapshot in sync with the DB. |
208
+ | `tasks_plan_import.py` | Atomic plan import for the sprint planner. |
209
+
210
+ ### Sprint automation
211
+
212
+ | File | Purpose |
213
+ |---|---|
214
+ | `sprint_plan.py` | Sprint plan tooling for the planner agent. |
215
+ | `sprint-auto.sh` / `sprint_auto.py` | Verified sprint execution and fast-forward integration (`--yolo-force`, `--resume`). |
216
+ | `sprint_auto_state.py` | Durable state, checkpoint and process-supervision primitives. |
217
+ | `sprint_auto_preflight.py` | Read-only approval preflight for the automated lifecycle. |
218
+ | `sprint_auto_prepare.py` | Prepare approved plans and branches. |
219
+ | `sprint_auto_execute.py` | Execute and accept guarded tasks. |
220
+ | `sprint_auto_resume.py` | Resume and finish owned sprints. |
221
+ | `apply-plan.sh` | Import a validated sprint plan (`tmp/plans/<name>.json`) into the tracker. |
222
+ | `run-task.sh` / `task_runner.py` | Run configured coders and verify actual changes before committing. |
223
+ | `task-report.sh` | Report delegation progress to the tracker. |
224
+ | `run_summary.py` | Write a run summary JSON for finished runs. |
225
+ | `run_stats.py` | Delivery-speed statistics for delegation runners. |
226
+
227
+ ### Spec / quality
228
+
229
+ | File | Purpose |
230
+ |---|---|
231
+ | `spec-lint.sh` | Quality gate for delegated task specs. |
232
+
233
+ ### Tests
234
+
235
+ | File | Purpose |
236
+ |---|---|
237
+ | `test_tasks.py` | Tests for `tasks.py`. |
238
+ | `test_tasks_mcp.py` | Tests for `tasks_mcp.py`. |
239
+ | `test_tasks_storage.py` | Tests for `tasks_storage.py`. |
240
+ | `test_tasks_plan_import.py` | Tests for `tasks_plan_import.py`. |
241
+ | `test_tasks_watch.py` | Tests for `tasks_watch.py`. |
242
+ | `test_run_stats.py` | Tests for `run_stats.py`. |
243
+ | `test_sprint_auto.py` | Tests for `sprint-auto.sh`. |
244
+ | `test_sprint_auto_state.py` | Tests for `sprint_auto_state.py`. |
245
+ | `test_sprint_auto_preflight.py` | Tests for `sprint_auto_preflight.py`. |
246
+ | `test_sprint_auto_prepare.py` | Tests for `sprint_auto_prepare.py`. |
247
+ | `test_sprint_auto_execute.py` | Tests for `sprint_auto_execute.py`. |
248
+ | `test_sprint_auto_resume.py` | Tests for `sprint_auto_resume.py`. |
249
+ | `test_spec_lint.sh` | Tests for `spec-lint.sh`. |
250
+
251
+ ### Test runners
252
+
253
+ | File | Purpose |
254
+ |---|---|
255
+ | `test_python_fast.sh` | Fast Python tests (in-process). |
256
+ | `test_python_slow.sh` | Slow/subprocess-heavy Python tests. |
257
+ | `test_python_lint.sh` | Ruff + mypy. |
258
+
259
+ ## License
260
+
261
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,212 @@
1
+ # tasks-toolkit
2
+
3
+ A small, self-contained task tracker (sprints → tasks → subtasks) with a CLI and an MCP server.
4
+
5
+ ## Contents
6
+
7
+ - `scripts/` — all tracker code (see table below).
8
+ - `pyproject.toml` — ruff/mypy/pytest configuration.
9
+
10
+ ## Installation
11
+
12
+ ### From PyPI (recommended)
13
+
14
+ ```bash
15
+ pipx install tasks-toolkit
16
+ # or: uv tool install tasks-toolkit
17
+ tasks-init
18
+ tasks overview
19
+ ```
20
+
21
+ ### From source
22
+
23
+ ```bash
24
+ git clone https://github.com/prachwal/tasks-toolkit.git
25
+ cd tasks-toolkit
26
+ python -m pip install -e .
27
+ tasks-init
28
+ tasks overview
29
+ ```
30
+
31
+ ### Docker
32
+
33
+ ```bash
34
+ docker build -t tasks-toolkit .
35
+ docker run --rm -i -v tasks-data:/data tasks-toolkit
36
+ ```
37
+
38
+ ## Quick start (from source)
39
+
40
+ ```bash
41
+ python3 scripts/tasks_init.py # create tasks/tasks.db
42
+ python3 scripts/tasks.py overview # show sprints
43
+ python3 scripts/tasks.py next # next ready task
44
+ ```
45
+
46
+ Data belongs to the current Git project (the main checkout when invoked from a worktree).
47
+ Outside Git, it belongs to the current directory. Installed commands never use their
48
+ installation directory for data. Override the location with `TASKS_ROOT`:
49
+
50
+ ```bash
51
+ export TASKS_ROOT=/path/to/data
52
+ python3 scripts/tasks.py overview
53
+ ```
54
+
55
+ ## MCP (OpenCode)
56
+
57
+ ```jsonc
58
+ "tasks": {
59
+ "type": "local",
60
+ "command": ["python3", "{env:HOME}/src/tasks-toolkit/scripts/tasks_mcp.py"],
61
+ "cwd": "{env:HOME}/src/tasks-toolkit",
62
+ "environment": { "TASKS_ROOT": "{env:HOME}/src/tasks-toolkit" }
63
+ }
64
+ ```
65
+
66
+ ## Verified task and sprint execution
67
+
68
+ Copy `.tasks-toolkit.example.json` to `.tasks-toolkit.json`, choose the checks for
69
+ **your project**, and commit the configuration. Commands are argument arrays;
70
+ no shell interpolation is performed. Every configured check must pass. Keep
71
+ `tmp/` and generated `tasks/` files in `.gitignore`, as in this repository.
72
+
73
+ The default coder uses [Codex non-interactive mode](https://developers.openai.com/codex/noninteractive):
74
+ `codex exec --sandbox workspace-write -`. Install and authenticate its CLI separately.
75
+ To use Junie or Kilo, set `runners.junie` or `runners.kilo` to the argument array for
76
+ your local adapter. Adapters receive the spec on stdin, edit files in their current
77
+ working directory, leave changes uncommitted, and return nonzero on failure.
78
+ The same `runners.codex` setting can select a custom Codex adapter.
79
+
80
+ Installed commands are `tasks-run` and `tasks-sprint`; from source, the corresponding
81
+ wrappers are `scripts/run-task.sh` and `scripts/sprint-auto.sh`.
82
+
83
+ Run one task in a clean working tree, with an explicit allowed scope:
84
+
85
+ ```bash
86
+ tasks-run result \
87
+ --file tmp/tasks/result.md --scope src/ --runner codex
88
+ ```
89
+
90
+ Alternatively, `--task-id 1.1` reads scope links from the tracker. The runner checks
91
+ all actual tracked changes, deletions and untracked files, runs the configured
92
+ checks and commits only verified changes. Input flags such as `checks_green`
93
+ and `tracker_done` are never evidence. Failures preserve the working tree and
94
+ write a report to `tmp/runs/<name>.result.json`. Exit codes: 0 verified, 1 rejected,
95
+ 3 runner/configuration failure. Optional fallback runs only after a runner failure
96
+ that left the working tree clean.
97
+
98
+ For a complete sprint, supply a plan containing `sprint` (`slug`, `title`, `goal`)
99
+ and `tasks` (`key`, `title`, `scope`, `spec_name`, `spec`, `depends_on`). Specs must
100
+ pass `scripts/spec-lint.sh`; dependencies reference earlier task keys. An answers
101
+ file binds the reviewed goal, allowed paths and execution policy:
102
+
103
+ ```json
104
+ {
105
+ "goal_reviewed": true,
106
+ "allowed_scopes": ["src/"],
107
+ "policy": {
108
+ "runner": "codex", "serial": true, "fallback": "none", "retries": 0,
109
+ "push": false, "accept_flags": false, "reset": false, "clean": false
110
+ }
111
+ }
112
+ ```
113
+
114
+ Start from a clean `main` branch:
115
+
116
+ ```bash
117
+ tasks-sprint --yolo-force \
118
+ --goal "Implement the feature" --run-name feature \
119
+ --answers tmp/plans/feature.answers.json --plan tmp/plans/feature.json
120
+ ```
121
+
122
+ The lifecycle imports the plan, creates a sprint branch and worktree, executes
123
+ tasks serially, checks the diff against task and approved scopes, and records
124
+ verified commits in the tracker. Final checks precede a fast-forward into the
125
+ unchanged approved `main`; no push is performed. Worktrees and checkpoints remain
126
+ available for inspection.
127
+
128
+ Use the same command with `--resume` to continue a clean checkpoint. Goal, answers,
129
+ plan, configuration and Git refs must still match. A dirty or unexpectedly advanced
130
+ worktree requires inspection; it is never reset, cleaned or blindly rerun.
131
+
132
+ ## Development checks
133
+
134
+ ```bash
135
+ python3 -m pip install -e '.[dev]'
136
+ bash scripts/test_python_lint.sh
137
+ python3 -m pytest -q
138
+ bash scripts/test_spec_lint.sh
139
+ ```
140
+
141
+ CI requires lint, type checking, all Python tests, shell tests and distribution
142
+ builds to pass. VS Code tracker commands are provided in `.vscode/tasks.json`.
143
+
144
+ ## Scripts
145
+
146
+ ### Core tracker
147
+
148
+ | File | Purpose |
149
+ |---|---|
150
+ | `tasks.py` | Task tracker CLI: sprints → tasks → subtasks, SQLite-backed (`tasks/tasks.db`). |
151
+ | `tasks_init.py` | Create an empty task database from scratch. |
152
+ | `tasks_mcp.py` | MCP server (stdio) exposing tracker operations as tools. |
153
+ | `tasks_cli.py` | CLI parser and entry point for the tracker. |
154
+ | `tasks_commands.py` | Command handlers for the tracker. |
155
+ | `tasks_model.py` | Core data model (nodes, statuses, walk/find/effective). |
156
+ | `tasks_storage.py` | SQLite storage layer. |
157
+ | `tasks_render.py` | Markdown rendering of the task view. |
158
+ | `tasks_watch.py` | Background watcher keeping the view and snapshot in sync with the DB. |
159
+ | `tasks_plan_import.py` | Atomic plan import for the sprint planner. |
160
+
161
+ ### Sprint automation
162
+
163
+ | File | Purpose |
164
+ |---|---|
165
+ | `sprint_plan.py` | Sprint plan tooling for the planner agent. |
166
+ | `sprint-auto.sh` / `sprint_auto.py` | Verified sprint execution and fast-forward integration (`--yolo-force`, `--resume`). |
167
+ | `sprint_auto_state.py` | Durable state, checkpoint and process-supervision primitives. |
168
+ | `sprint_auto_preflight.py` | Read-only approval preflight for the automated lifecycle. |
169
+ | `sprint_auto_prepare.py` | Prepare approved plans and branches. |
170
+ | `sprint_auto_execute.py` | Execute and accept guarded tasks. |
171
+ | `sprint_auto_resume.py` | Resume and finish owned sprints. |
172
+ | `apply-plan.sh` | Import a validated sprint plan (`tmp/plans/<name>.json`) into the tracker. |
173
+ | `run-task.sh` / `task_runner.py` | Run configured coders and verify actual changes before committing. |
174
+ | `task-report.sh` | Report delegation progress to the tracker. |
175
+ | `run_summary.py` | Write a run summary JSON for finished runs. |
176
+ | `run_stats.py` | Delivery-speed statistics for delegation runners. |
177
+
178
+ ### Spec / quality
179
+
180
+ | File | Purpose |
181
+ |---|---|
182
+ | `spec-lint.sh` | Quality gate for delegated task specs. |
183
+
184
+ ### Tests
185
+
186
+ | File | Purpose |
187
+ |---|---|
188
+ | `test_tasks.py` | Tests for `tasks.py`. |
189
+ | `test_tasks_mcp.py` | Tests for `tasks_mcp.py`. |
190
+ | `test_tasks_storage.py` | Tests for `tasks_storage.py`. |
191
+ | `test_tasks_plan_import.py` | Tests for `tasks_plan_import.py`. |
192
+ | `test_tasks_watch.py` | Tests for `tasks_watch.py`. |
193
+ | `test_run_stats.py` | Tests for `run_stats.py`. |
194
+ | `test_sprint_auto.py` | Tests for `sprint-auto.sh`. |
195
+ | `test_sprint_auto_state.py` | Tests for `sprint_auto_state.py`. |
196
+ | `test_sprint_auto_preflight.py` | Tests for `sprint_auto_preflight.py`. |
197
+ | `test_sprint_auto_prepare.py` | Tests for `sprint_auto_prepare.py`. |
198
+ | `test_sprint_auto_execute.py` | Tests for `sprint_auto_execute.py`. |
199
+ | `test_sprint_auto_resume.py` | Tests for `sprint_auto_resume.py`. |
200
+ | `test_spec_lint.sh` | Tests for `spec-lint.sh`. |
201
+
202
+ ### Test runners
203
+
204
+ | File | Purpose |
205
+ |---|---|
206
+ | `test_python_fast.sh` | Fast Python tests (in-process). |
207
+ | `test_python_slow.sh` | Slow/subprocess-heavy Python tests. |
208
+ | `test_python_lint.sh` | Ruff + mypy. |
209
+
210
+ ## License
211
+
212
+ MIT — see [LICENSE](LICENSE).
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tasks-toolkit"
7
- version = "0.1.3"
7
+ version = "0.1.4"
8
8
  description = "Task tracker toolkit: CLI + MCP server for sprint/task/subtask management, delegation helpers."
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -34,6 +34,8 @@ Issues = "https://github.com/prachwal/tasks-toolkit/issues"
34
34
  tasks = "scripts.tasks:main"
35
35
  tasks-init = "scripts.tasks_init:main"
36
36
  tasks-mcp = "scripts.tasks_mcp:main"
37
+ tasks-run = "scripts.task_runner:main"
38
+ tasks-sprint = "scripts.sprint_auto:main"
37
39
 
38
40
  [tool.setuptools]
39
41
  packages = ["scripts"]
@@ -66,4 +68,4 @@ markers = [
66
68
  "slow: marks tests as slow (subprocess-heavy)",
67
69
  "integration: marks tests as integration tests",
68
70
  ]
69
- addopts = "-n auto --ignore=scripts/test_agent_config.py --ignore=scripts/test_tasks_watch.py"
71
+ addopts = "-n 2"
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # scripts/apply-plan.sh <name> [--yes] [--start]
6
6
  #
7
- # --start also creates the sprint branch (scripts/worktree.sh sprint start <n> <slug>).
7
+ # --start is accepted for compatibility but no longer creates a sprint branch (worktree.sh removed).
8
8
  # Exit: 0 applied | 1 usage/missing plan | 2 not confirmed | 4 plan invalid | 5 already applied
9
9
  set -euo pipefail
10
10
 
@@ -46,6 +46,3 @@ sprint_id="$(printf '%s\n' "$mapping" | head -1 | sed 's/.*-> \([0-9]*\)\..*/\1/
46
46
  slug="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["sprint"]["slug"])' "$plan")"
47
47
  printf 'sprint %s on %s\n' "$sprint_id" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" >"$marker"
48
48
  echo "applied: sprint $sprint_id ($slug)"
49
- if [ "$start" -eq 1 ]; then
50
- bash scripts/worktree.sh sprint start "$sprint_id" "$slug"
51
- fi
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env bash
2
+ # Execute a configured runner and verify actual changes; see .tasks-toolkit.json.
3
+ set -euo pipefail
4
+ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
+ # Retain the early spec gate before any runner/configuration processing.
6
+ args=("$@")
7
+ for ((i=0; i<${#args[@]}; i++)); do
8
+ if [ "${args[$i]}" = "--file" ]; then
9
+ bash "$script_dir/spec-lint.sh" "${args[$((i+1))]:?--file requires a path}"
10
+ fi
11
+ done
12
+ exec python3 "$script_dir/task_runner.py" "$@"
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env python3
2
2
  """Writes the machine-readable run summary for the delegation runners.
3
3
 
4
- Called by scripts/junie-task.sh, scripts/kilo-task.sh and scripts/codex-task.sh when a run finishes. Writes one
4
+ Called by the runner scripts when a run finishes. Writes one
5
5
  JSON object to <outfile> describing the run (identity, timing, exits and verdict), so
6
- scripts/junie-status.sh and other tools can report on finished runs without parsing logs.
6
+ Finished runs can be inspected via their summary.json files.
7
7
  Standard library only. The runners pass the values as key=value arguments, so bash never
8
8
  quotes them itself and odd values (spaces, special characters) cannot break the output.
9
9
 
@@ -25,6 +25,7 @@ from __future__ import annotations
25
25
 
26
26
  import json
27
27
  import sys
28
+ from typing import Any
28
29
 
29
30
  STR_FIELDS = ("name", "runner", "model", "agent", "task_id", "patch", "verdict")
30
31
  INT_FIELDS = ("started", "finished", "agent_exit", "verify_exit", "files_changed")
@@ -38,7 +39,7 @@ def main(argv: list[str]) -> int:
38
39
  return 2
39
40
  outfile = argv[1]
40
41
 
41
- data: dict[str, object] = {}
42
+ data: dict[str, Any] = {}
42
43
  for pair in argv[2:]:
43
44
  key, sep, value = pair.partition("=")
44
45
  if not sep:
@@ -75,11 +76,11 @@ def main(argv: list[str]) -> int:
75
76
  print("error: field 'agent' is only allowed for runner=kilo", file=sys.stderr)
76
77
  return 2
77
78
 
78
- duration = int(data["finished"]) - int(data["started"]) # type: ignore[arg-type]
79
+ duration = int(data["finished"]) - int(data["started"])
79
80
  if duration < 0:
80
81
  print("error: finished is before started", file=sys.stderr)
81
82
  return 2
82
- if int(data["files_changed"]) < 0: # type: ignore[arg-type]
83
+ if int(data["files_changed"]) < 0:
83
84
  print("error: files_changed must be >= 0", file=sys.stderr)
84
85
  return 2
85
86
  data["duration_s"] = duration
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4
+ exec python3 "$script_dir/sprint_auto.py" "$@"