task-harbor 0.7.0__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.
- task_harbor-0.7.0/LICENSE +21 -0
- task_harbor-0.7.0/PKG-INFO +294 -0
- task_harbor-0.7.0/README.md +276 -0
- task_harbor-0.7.0/opus_manager/__init__.py +3 -0
- task_harbor-0.7.0/opus_manager/__main__.py +3 -0
- task_harbor-0.7.0/opus_manager/agent.py +17 -0
- task_harbor-0.7.0/opus_manager/backlog.py +128 -0
- task_harbor-0.7.0/opus_manager/claude.py +138 -0
- task_harbor-0.7.0/opus_manager/cli.py +305 -0
- task_harbor-0.7.0/opus_manager/codex.py +119 -0
- task_harbor-0.7.0/opus_manager/comparison.py +162 -0
- task_harbor-0.7.0/opus_manager/config.py +134 -0
- task_harbor-0.7.0/opus_manager/contracts.py +58 -0
- task_harbor-0.7.0/opus_manager/desktop_actions.py +22 -0
- task_harbor-0.7.0/opus_manager/evidence.py +50 -0
- task_harbor-0.7.0/opus_manager/gitops.py +218 -0
- task_harbor-0.7.0/opus_manager/help.py +59 -0
- task_harbor-0.7.0/opus_manager/models.py +110 -0
- task_harbor-0.7.0/opus_manager/offline.py +142 -0
- task_harbor-0.7.0/opus_manager/operator_commands.py +86 -0
- task_harbor-0.7.0/opus_manager/orchestrator.py +1267 -0
- task_harbor-0.7.0/opus_manager/preflight.py +92 -0
- task_harbor-0.7.0/opus_manager/prompts.py +259 -0
- task_harbor-0.7.0/opus_manager/providers.py +11 -0
- task_harbor-0.7.0/opus_manager/reporting.py +82 -0
- task_harbor-0.7.0/opus_manager/state.py +37 -0
- task_harbor-0.7.0/opus_manager/tui.py +388 -0
- task_harbor-0.7.0/opus_manager/usage.py +77 -0
- task_harbor-0.7.0/opus_manager/verification.py +39 -0
- task_harbor-0.7.0/pyproject.toml +35 -0
- task_harbor-0.7.0/setup.cfg +4 -0
- task_harbor-0.7.0/task_harbor/__init__.py +1 -0
- task_harbor-0.7.0/task_harbor/__main__.py +3 -0
- task_harbor-0.7.0/task_harbor.egg-info/PKG-INFO +294 -0
- task_harbor-0.7.0/task_harbor.egg-info/SOURCES.txt +49 -0
- task_harbor-0.7.0/task_harbor.egg-info/dependency_links.txt +1 -0
- task_harbor-0.7.0/task_harbor.egg-info/entry_points.txt +4 -0
- task_harbor-0.7.0/task_harbor.egg-info/requires.txt +7 -0
- task_harbor-0.7.0/task_harbor.egg-info/top_level.txt +2 -0
- task_harbor-0.7.0/tests/test_backlog.py +73 -0
- task_harbor-0.7.0/tests/test_claude.py +53 -0
- task_harbor-0.7.0/tests/test_cli_ui.py +56 -0
- task_harbor-0.7.0/tests/test_codex.py +173 -0
- task_harbor-0.7.0/tests/test_desktop_actions.py +23 -0
- task_harbor-0.7.0/tests/test_gitops.py +44 -0
- task_harbor-0.7.0/tests/test_hardening.py +260 -0
- task_harbor-0.7.0/tests/test_offline.py +101 -0
- task_harbor-0.7.0/tests/test_orchestrator_integration.py +188 -0
- task_harbor-0.7.0/tests/test_recovery.py +110 -0
- task_harbor-0.7.0/tests/test_trust_workflows.py +250 -0
- task_harbor-0.7.0/tests/test_tui.py +140 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rhit-nayeems
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: task-harbor
|
|
3
|
+
Version: 0.7.0
|
|
4
|
+
Summary: Claude and GPT backlog orchestrator for planning, implementation, QA, escalation, and periodic code review.
|
|
5
|
+
Author: rhit-nayeems
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/rhit-nayeems/task-harbor
|
|
8
|
+
Project-URL: Issues, https://github.com/rhit-nayeems/task-harbor/issues
|
|
9
|
+
Requires-Python: >=3.11
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: textual<2,>=1
|
|
13
|
+
Provides-Extra: dev
|
|
14
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
15
|
+
Provides-Extra: ui
|
|
16
|
+
Requires-Dist: textual<2,>=1; extra == "ui"
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# Task Harbor
|
|
20
|
+
|
|
21
|
+
Task Harbor is a command-line tool that runs coding tasks with Claude Code or
|
|
22
|
+
Codex. It reads a Markdown backlog, plans each task, makes changes in separate
|
|
23
|
+
Git worktrees, and checks the results before merging them into a local branch.
|
|
24
|
+
|
|
25
|
+
It does not push changes or merge them into your original branch. You review the
|
|
26
|
+
result on `manager/integration/<run-id>`.
|
|
27
|
+
|
|
28
|
+
## Check the work before accepting it
|
|
29
|
+
|
|
30
|
+
Configure tests once, then inspect the exact commands, checkpoint, and full diff
|
|
31
|
+
for each task. Task agreements capture scope and unanswered questions. A failed
|
|
32
|
+
check stops approval; a missing environment pauses work before more model calls.
|
|
33
|
+
|
|
34
|
+
- [Set up checks and task agreements](docs/VERIFICATION.md)
|
|
35
|
+
- [Compare Harbor with a direct agent](EVALUATION.md)
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
task-harbor preflight
|
|
39
|
+
task-harbor review --run-id RUN_ID --html review.html
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
In the dashboard, press **E** for task evidence or **P** for suggested checks.
|
|
43
|
+
|
|
44
|
+
## Install
|
|
45
|
+
|
|
46
|
+
You need Python 3.11+, Git, and either Claude Code or Codex installed and signed in.
|
|
47
|
+
The repository you want to work on must have at least one commit and a configured
|
|
48
|
+
Git author.
|
|
49
|
+
|
|
50
|
+
Install the Python package directly from this repository (no clone required):
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
python -m pip install "git+https://github.com/rhit-nayeems/task-harbor.git"
|
|
54
|
+
task-harbor --version
|
|
55
|
+
task-harbor guide
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The dashboard is included. This project is not published to PyPI yet; do not use
|
|
59
|
+
`pip install task-harbor` expecting this repository's package.
|
|
60
|
+
|
|
61
|
+
<details>
|
|
62
|
+
<summary>Isolated install, upgrades, and command-not-found fixes</summary>
|
|
63
|
+
|
|
64
|
+
With pipx installed, use an isolated application environment:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
pipx install "git+https://github.com/rhit-nayeems/task-harbor.git"
|
|
68
|
+
pipx ensurepath
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Restart your terminal after changing PATH. For a regular pip installation,
|
|
72
|
+
`python -m task_harbor` works with the same arguments if the executable is not
|
|
73
|
+
on PATH. Use the same Python interpreter you installed with.
|
|
74
|
+
|
|
75
|
+
Upgrade a pip installation:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
python -m pip install --upgrade "git+https://github.com/rhit-nayeems/task-harbor.git"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
For pipx, use `pipx upgrade task-harbor`. Uninstall with `python -m pip uninstall
|
|
82
|
+
task-harbor` or `pipx uninstall task-harbor`, respectively.
|
|
83
|
+
|
|
84
|
+
</details>
|
|
85
|
+
|
|
86
|
+
[First run](#start-a-run) · [Commands](#cli-commands) · [Configuration](docs/CONFIGURATION.md)
|
|
87
|
+
|
|
88
|
+
## Terminal dashboard
|
|
89
|
+
|
|
90
|
+

|
|
91
|
+
|
|
92
|
+
<details>
|
|
93
|
+
<summary>See first-run setup and built-in help</summary>
|
|
94
|
+
|
|
95
|
+

|
|
96
|
+

|
|
97
|
+

|
|
98
|
+
|
|
99
|
+
</details>
|
|
100
|
+
|
|
101
|
+
These are captures of the actual terminal interface. The task dashboard uses
|
|
102
|
+
sample run data. Open it inside your project:
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
task-harbor
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Running `task-harbor` (or `python -m task_harbor`) without a command opens the
|
|
109
|
+
dashboard for the current directory. `--help` lists the other commands.
|
|
110
|
+
|
|
111
|
+
The dashboard shows saved runs, task status, dependencies, recent events, agent
|
|
112
|
+
calls, and reported costs. Select a run with the picker and use the arrow keys
|
|
113
|
+
to inspect tasks. Tab changes panes, F1 opens help, `r` refreshes, and `q` exits. It also
|
|
114
|
+
refreshes automatically every two seconds.
|
|
115
|
+
|
|
116
|
+
A run is one execution of your backlog. The run picker appears only after a run
|
|
117
|
+
exists in the selected project.
|
|
118
|
+
|
|
119
|
+
Use **Set up** to create the configuration and sample backlog, edit those files,
|
|
120
|
+
then click **Validate**. **New run** and **Resume** show the provider, model, and
|
|
121
|
+
call limit before you confirm agent work. **Stop** requests a pause after current
|
|
122
|
+
calls finish. Closing the dashboard does not stop a launched run.
|
|
123
|
+
|
|
124
|
+
Viewing progress does not consume tokens. Starting or resuming work does.
|
|
125
|
+
Launch output is saved in `.manager/launch-logs/` (or your configured manager
|
|
126
|
+
directory). Launch errors appear above the task list. Unreported costs are unknown.
|
|
127
|
+
Use `tui --run-id <id>` to open a specific saved run. All commands below still work
|
|
128
|
+
without the dashboard.
|
|
129
|
+
|
|
130
|
+
## Start a run
|
|
131
|
+
|
|
132
|
+
Replace `path/to/your-app` with the repository you want Task Harbor to work on.
|
|
133
|
+
Use `--repo` before the command.
|
|
134
|
+
|
|
135
|
+
```sh
|
|
136
|
+
task-harbor --repo "path/to/your-app" init
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
This creates `.manager/config.json` and a sample `BACKLOG.md` in that repository.
|
|
140
|
+
An existing backlog is kept. Replace the sample task with your own work:
|
|
141
|
+
|
|
142
|
+
```markdown
|
|
143
|
+
## BUG-001 — Fix empty search results
|
|
144
|
+
- **Priority:** critical_bug
|
|
145
|
+
- **Status:** UNPLANNED
|
|
146
|
+
- **Dependencies:** —
|
|
147
|
+
- **Acceptance criteria:**
|
|
148
|
+
- An empty search shows a message instead of crashing
|
|
149
|
+
- Existing search tests pass
|
|
150
|
+
- **Next action:** Plan the task
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Use a different ID for each task. List dependency IDs separated by commas.
|
|
154
|
+
See [BACKLOG.example.md](BACKLOG.example.md) for a longer example.
|
|
155
|
+
|
|
156
|
+
### Choose Claude or GPT
|
|
157
|
+
|
|
158
|
+
Edit `.manager/config.json` before starting. Claude is the default:
|
|
159
|
+
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"provider": "claude",
|
|
163
|
+
"model": "opus",
|
|
164
|
+
"effort": "medium"
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
For GPT, sign in with `codex login` and change these fields:
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"provider": "codex",
|
|
173
|
+
"model": "gpt-6.1-sol",
|
|
174
|
+
"effort": "medium",
|
|
175
|
+
"max_run_cost_usd": null,
|
|
176
|
+
"max_call_cost_usd": null
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Use a model available to your account. Provider choice applies to the whole run;
|
|
181
|
+
you cannot switch providers when resuming it.
|
|
182
|
+
|
|
183
|
+
### Set checks and limits
|
|
184
|
+
|
|
185
|
+
Add your project's test or build commands to the configuration. For example:
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{
|
|
189
|
+
"verification_commands": ["python -m pytest"],
|
|
190
|
+
"max_agent_calls": 100,
|
|
191
|
+
"max_task_agent_calls": 20
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
These call limits are examples; the defaults are unlimited. Both providers support
|
|
196
|
+
call limits and timeouts. Only Claude supports estimated dollar caps. Codex
|
|
197
|
+
requires both dollar-budget settings to be `null`.
|
|
198
|
+
|
|
199
|
+
Now validate the backlog, check the selected agent, and start:
|
|
200
|
+
|
|
201
|
+
```sh
|
|
202
|
+
task-harbor --repo "path/to/your-app" validate
|
|
203
|
+
task-harbor --repo "path/to/your-app" doctor
|
|
204
|
+
task-harbor --repo "path/to/your-app" manage
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
`doctor` makes a model call. `manage` uses model calls throughout the run and
|
|
208
|
+
prints a run ID. Save that ID to check progress or resume later.
|
|
209
|
+
|
|
210
|
+
## CLI commands
|
|
211
|
+
|
|
212
|
+
Before spending model usage, run `task-harbor check`. It checks Git, the backlog,
|
|
213
|
+
configuration, agent executable availability, required environment, and whether
|
|
214
|
+
verification and call limits are configured. It reads local files without
|
|
215
|
+
creating configuration, running project commands, or testing provider
|
|
216
|
+
authentication. Errors return exit code 2; warnings explain missing safeguards.
|
|
217
|
+
Use `check --json` for structured results.
|
|
218
|
+
|
|
219
|
+
Find saved run IDs with `task-harbor runs`, or filter with
|
|
220
|
+
`task-harbor runs --status paused`. `runs --json` includes task counts, blocked
|
|
221
|
+
counts, stop reasons, and integration branches. Unreadable runs are reported
|
|
222
|
+
without hiding healthy ones. These are persisted snapshots: “unfinished” does
|
|
223
|
+
not mean a process is currently running.
|
|
224
|
+
|
|
225
|
+
All commands accept `--repo` before the command. Replace `RUN_ID` below with the
|
|
226
|
+
ID printed by `manage`.
|
|
227
|
+
|
|
228
|
+
| Command | What it does |
|
|
229
|
+
| --- | --- |
|
|
230
|
+
| `guide` | Setup, usage, and troubleshooting help |
|
|
231
|
+
| `tui` (or no command) | Open the dashboard |
|
|
232
|
+
| `--version` | Show installed version |
|
|
233
|
+
| `init` | Create the configuration and sample backlog |
|
|
234
|
+
| `validate` | Check backlog format and dependencies without calling a model |
|
|
235
|
+
| `check [--json]` | Audit local readiness without executing project commands or calling models |
|
|
236
|
+
| `runs [--status paused] [--json]` | Find saved runs; status filters also accept `unfinished` and `complete` |
|
|
237
|
+
| `doctor` | Validate the backlog and make a test call to the selected agent |
|
|
238
|
+
| `manage` | Start a new run |
|
|
239
|
+
| `status --run-id RUN_ID` | Show saved task status and usage |
|
|
240
|
+
| `report --run-id RUN_ID` | Print a JSON report |
|
|
241
|
+
| `report --run-id RUN_ID --html report.html` | Save an HTML report |
|
|
242
|
+
| `stop --run-id RUN_ID` | Request a pause after in-flight calls finish |
|
|
243
|
+
| `resume --run-id RUN_ID` | Continue a saved run |
|
|
244
|
+
| `retry --run-id RUN_ID --task BUG-001` | Allow a blocked task to try again; then use `resume` |
|
|
245
|
+
| `cleanup --run-id RUN_ID` | Remove run worktrees, keeping branches and logs |
|
|
246
|
+
|
|
247
|
+
Status, reports, stop, retry, and cleanup do not call a model. Reports are
|
|
248
|
+
snapshots; generate a new one to see updates. Retry and resume keep existing
|
|
249
|
+
usage counts.
|
|
250
|
+
|
|
251
|
+
## What happens during a run
|
|
252
|
+
|
|
253
|
+
Task Harbor plans up to four tasks at once, but implements them one at a time.
|
|
254
|
+
Each implementation gets a local checkpoint commit. Configured checks run first,
|
|
255
|
+
then a separate agent checks the acceptance criteria. Passing work is merged into
|
|
256
|
+
the integration branch, with code review every three passes by default.
|
|
257
|
+
|
|
258
|
+
A failed task gets two repair attempts in the same session. Further failures
|
|
259
|
+
trigger diagnosis and a fresh session, up to a configured limit.
|
|
260
|
+
|
|
261
|
+
Run state, plans, checks, and logs are saved under `.manager/runs/<run-id>/`.
|
|
262
|
+
Worktrees are stored beside your repository. Edit task requirements before
|
|
263
|
+
starting a new run; `resume` uses saved requirements, not later backlog edits.
|
|
264
|
+
|
|
265
|
+
Agents execute local commands. The permission settings and worktrees are not a
|
|
266
|
+
substitute for an isolated machine when working with untrusted code. After a hard
|
|
267
|
+
crash, stop any remaining agent processes before resuming.
|
|
268
|
+
|
|
269
|
+
## Development
|
|
270
|
+
|
|
271
|
+
```sh
|
|
272
|
+
python -m pip install -e ".[dev]"
|
|
273
|
+
python -m pytest
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Tests use simulated agent responses and real temporary Git repositories. CI runs
|
|
277
|
+
on Windows and Linux with Python 3.11 and 3.14. These tests do not establish live model quality or account compatibility; see
|
|
278
|
+
[EVALUATION.md](EVALUATION.md) for opt-in live evaluations.
|
|
279
|
+
|
|
280
|
+
- [Configuration and provider details](docs/CONFIGURATION.md)
|
|
281
|
+
- [Architecture](ARCHITECTURE.md)
|
|
282
|
+
- [Workflow](WORKFLOW.md)
|
|
283
|
+
- [Evaluation](EVALUATION.md)
|
|
284
|
+
- [Changelog](CHANGELOG.md)
|
|
285
|
+
- [Technical status report](TECHNICAL_STATUS.md)
|
|
286
|
+
|
|
287
|
+
## Website
|
|
288
|
+
|
|
289
|
+
The landing page lives in [website/](website/README.md). It uses static HTML, CSS,
|
|
290
|
+
and JavaScript, with an interactive example workflow and installation guide.
|
|
291
|
+
|
|
292
|
+
## License
|
|
293
|
+
|
|
294
|
+
Task Harbor is available under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# Task Harbor
|
|
2
|
+
|
|
3
|
+
Task Harbor is a command-line tool that runs coding tasks with Claude Code or
|
|
4
|
+
Codex. It reads a Markdown backlog, plans each task, makes changes in separate
|
|
5
|
+
Git worktrees, and checks the results before merging them into a local branch.
|
|
6
|
+
|
|
7
|
+
It does not push changes or merge them into your original branch. You review the
|
|
8
|
+
result on `manager/integration/<run-id>`.
|
|
9
|
+
|
|
10
|
+
## Check the work before accepting it
|
|
11
|
+
|
|
12
|
+
Configure tests once, then inspect the exact commands, checkpoint, and full diff
|
|
13
|
+
for each task. Task agreements capture scope and unanswered questions. A failed
|
|
14
|
+
check stops approval; a missing environment pauses work before more model calls.
|
|
15
|
+
|
|
16
|
+
- [Set up checks and task agreements](docs/VERIFICATION.md)
|
|
17
|
+
- [Compare Harbor with a direct agent](EVALUATION.md)
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
task-harbor preflight
|
|
21
|
+
task-harbor review --run-id RUN_ID --html review.html
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
In the dashboard, press **E** for task evidence or **P** for suggested checks.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
You need Python 3.11+, Git, and either Claude Code or Codex installed and signed in.
|
|
29
|
+
The repository you want to work on must have at least one commit and a configured
|
|
30
|
+
Git author.
|
|
31
|
+
|
|
32
|
+
Install the Python package directly from this repository (no clone required):
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
python -m pip install "git+https://github.com/rhit-nayeems/task-harbor.git"
|
|
36
|
+
task-harbor --version
|
|
37
|
+
task-harbor guide
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The dashboard is included. This project is not published to PyPI yet; do not use
|
|
41
|
+
`pip install task-harbor` expecting this repository's package.
|
|
42
|
+
|
|
43
|
+
<details>
|
|
44
|
+
<summary>Isolated install, upgrades, and command-not-found fixes</summary>
|
|
45
|
+
|
|
46
|
+
With pipx installed, use an isolated application environment:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
pipx install "git+https://github.com/rhit-nayeems/task-harbor.git"
|
|
50
|
+
pipx ensurepath
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Restart your terminal after changing PATH. For a regular pip installation,
|
|
54
|
+
`python -m task_harbor` works with the same arguments if the executable is not
|
|
55
|
+
on PATH. Use the same Python interpreter you installed with.
|
|
56
|
+
|
|
57
|
+
Upgrade a pip installation:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
python -m pip install --upgrade "git+https://github.com/rhit-nayeems/task-harbor.git"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
For pipx, use `pipx upgrade task-harbor`. Uninstall with `python -m pip uninstall
|
|
64
|
+
task-harbor` or `pipx uninstall task-harbor`, respectively.
|
|
65
|
+
|
|
66
|
+
</details>
|
|
67
|
+
|
|
68
|
+
[First run](#start-a-run) · [Commands](#cli-commands) · [Configuration](docs/CONFIGURATION.md)
|
|
69
|
+
|
|
70
|
+
## Terminal dashboard
|
|
71
|
+
|
|
72
|
+

|
|
73
|
+
|
|
74
|
+
<details>
|
|
75
|
+
<summary>See first-run setup and built-in help</summary>
|
|
76
|
+
|
|
77
|
+

|
|
78
|
+

|
|
79
|
+

|
|
80
|
+
|
|
81
|
+
</details>
|
|
82
|
+
|
|
83
|
+
These are captures of the actual terminal interface. The task dashboard uses
|
|
84
|
+
sample run data. Open it inside your project:
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
task-harbor
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Running `task-harbor` (or `python -m task_harbor`) without a command opens the
|
|
91
|
+
dashboard for the current directory. `--help` lists the other commands.
|
|
92
|
+
|
|
93
|
+
The dashboard shows saved runs, task status, dependencies, recent events, agent
|
|
94
|
+
calls, and reported costs. Select a run with the picker and use the arrow keys
|
|
95
|
+
to inspect tasks. Tab changes panes, F1 opens help, `r` refreshes, and `q` exits. It also
|
|
96
|
+
refreshes automatically every two seconds.
|
|
97
|
+
|
|
98
|
+
A run is one execution of your backlog. The run picker appears only after a run
|
|
99
|
+
exists in the selected project.
|
|
100
|
+
|
|
101
|
+
Use **Set up** to create the configuration and sample backlog, edit those files,
|
|
102
|
+
then click **Validate**. **New run** and **Resume** show the provider, model, and
|
|
103
|
+
call limit before you confirm agent work. **Stop** requests a pause after current
|
|
104
|
+
calls finish. Closing the dashboard does not stop a launched run.
|
|
105
|
+
|
|
106
|
+
Viewing progress does not consume tokens. Starting or resuming work does.
|
|
107
|
+
Launch output is saved in `.manager/launch-logs/` (or your configured manager
|
|
108
|
+
directory). Launch errors appear above the task list. Unreported costs are unknown.
|
|
109
|
+
Use `tui --run-id <id>` to open a specific saved run. All commands below still work
|
|
110
|
+
without the dashboard.
|
|
111
|
+
|
|
112
|
+
## Start a run
|
|
113
|
+
|
|
114
|
+
Replace `path/to/your-app` with the repository you want Task Harbor to work on.
|
|
115
|
+
Use `--repo` before the command.
|
|
116
|
+
|
|
117
|
+
```sh
|
|
118
|
+
task-harbor --repo "path/to/your-app" init
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
This creates `.manager/config.json` and a sample `BACKLOG.md` in that repository.
|
|
122
|
+
An existing backlog is kept. Replace the sample task with your own work:
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
## BUG-001 — Fix empty search results
|
|
126
|
+
- **Priority:** critical_bug
|
|
127
|
+
- **Status:** UNPLANNED
|
|
128
|
+
- **Dependencies:** —
|
|
129
|
+
- **Acceptance criteria:**
|
|
130
|
+
- An empty search shows a message instead of crashing
|
|
131
|
+
- Existing search tests pass
|
|
132
|
+
- **Next action:** Plan the task
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Use a different ID for each task. List dependency IDs separated by commas.
|
|
136
|
+
See [BACKLOG.example.md](BACKLOG.example.md) for a longer example.
|
|
137
|
+
|
|
138
|
+
### Choose Claude or GPT
|
|
139
|
+
|
|
140
|
+
Edit `.manager/config.json` before starting. Claude is the default:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"provider": "claude",
|
|
145
|
+
"model": "opus",
|
|
146
|
+
"effort": "medium"
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
For GPT, sign in with `codex login` and change these fields:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"provider": "codex",
|
|
155
|
+
"model": "gpt-6.1-sol",
|
|
156
|
+
"effort": "medium",
|
|
157
|
+
"max_run_cost_usd": null,
|
|
158
|
+
"max_call_cost_usd": null
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Use a model available to your account. Provider choice applies to the whole run;
|
|
163
|
+
you cannot switch providers when resuming it.
|
|
164
|
+
|
|
165
|
+
### Set checks and limits
|
|
166
|
+
|
|
167
|
+
Add your project's test or build commands to the configuration. For example:
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"verification_commands": ["python -m pytest"],
|
|
172
|
+
"max_agent_calls": 100,
|
|
173
|
+
"max_task_agent_calls": 20
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
These call limits are examples; the defaults are unlimited. Both providers support
|
|
178
|
+
call limits and timeouts. Only Claude supports estimated dollar caps. Codex
|
|
179
|
+
requires both dollar-budget settings to be `null`.
|
|
180
|
+
|
|
181
|
+
Now validate the backlog, check the selected agent, and start:
|
|
182
|
+
|
|
183
|
+
```sh
|
|
184
|
+
task-harbor --repo "path/to/your-app" validate
|
|
185
|
+
task-harbor --repo "path/to/your-app" doctor
|
|
186
|
+
task-harbor --repo "path/to/your-app" manage
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
`doctor` makes a model call. `manage` uses model calls throughout the run and
|
|
190
|
+
prints a run ID. Save that ID to check progress or resume later.
|
|
191
|
+
|
|
192
|
+
## CLI commands
|
|
193
|
+
|
|
194
|
+
Before spending model usage, run `task-harbor check`. It checks Git, the backlog,
|
|
195
|
+
configuration, agent executable availability, required environment, and whether
|
|
196
|
+
verification and call limits are configured. It reads local files without
|
|
197
|
+
creating configuration, running project commands, or testing provider
|
|
198
|
+
authentication. Errors return exit code 2; warnings explain missing safeguards.
|
|
199
|
+
Use `check --json` for structured results.
|
|
200
|
+
|
|
201
|
+
Find saved run IDs with `task-harbor runs`, or filter with
|
|
202
|
+
`task-harbor runs --status paused`. `runs --json` includes task counts, blocked
|
|
203
|
+
counts, stop reasons, and integration branches. Unreadable runs are reported
|
|
204
|
+
without hiding healthy ones. These are persisted snapshots: “unfinished” does
|
|
205
|
+
not mean a process is currently running.
|
|
206
|
+
|
|
207
|
+
All commands accept `--repo` before the command. Replace `RUN_ID` below with the
|
|
208
|
+
ID printed by `manage`.
|
|
209
|
+
|
|
210
|
+
| Command | What it does |
|
|
211
|
+
| --- | --- |
|
|
212
|
+
| `guide` | Setup, usage, and troubleshooting help |
|
|
213
|
+
| `tui` (or no command) | Open the dashboard |
|
|
214
|
+
| `--version` | Show installed version |
|
|
215
|
+
| `init` | Create the configuration and sample backlog |
|
|
216
|
+
| `validate` | Check backlog format and dependencies without calling a model |
|
|
217
|
+
| `check [--json]` | Audit local readiness without executing project commands or calling models |
|
|
218
|
+
| `runs [--status paused] [--json]` | Find saved runs; status filters also accept `unfinished` and `complete` |
|
|
219
|
+
| `doctor` | Validate the backlog and make a test call to the selected agent |
|
|
220
|
+
| `manage` | Start a new run |
|
|
221
|
+
| `status --run-id RUN_ID` | Show saved task status and usage |
|
|
222
|
+
| `report --run-id RUN_ID` | Print a JSON report |
|
|
223
|
+
| `report --run-id RUN_ID --html report.html` | Save an HTML report |
|
|
224
|
+
| `stop --run-id RUN_ID` | Request a pause after in-flight calls finish |
|
|
225
|
+
| `resume --run-id RUN_ID` | Continue a saved run |
|
|
226
|
+
| `retry --run-id RUN_ID --task BUG-001` | Allow a blocked task to try again; then use `resume` |
|
|
227
|
+
| `cleanup --run-id RUN_ID` | Remove run worktrees, keeping branches and logs |
|
|
228
|
+
|
|
229
|
+
Status, reports, stop, retry, and cleanup do not call a model. Reports are
|
|
230
|
+
snapshots; generate a new one to see updates. Retry and resume keep existing
|
|
231
|
+
usage counts.
|
|
232
|
+
|
|
233
|
+
## What happens during a run
|
|
234
|
+
|
|
235
|
+
Task Harbor plans up to four tasks at once, but implements them one at a time.
|
|
236
|
+
Each implementation gets a local checkpoint commit. Configured checks run first,
|
|
237
|
+
then a separate agent checks the acceptance criteria. Passing work is merged into
|
|
238
|
+
the integration branch, with code review every three passes by default.
|
|
239
|
+
|
|
240
|
+
A failed task gets two repair attempts in the same session. Further failures
|
|
241
|
+
trigger diagnosis and a fresh session, up to a configured limit.
|
|
242
|
+
|
|
243
|
+
Run state, plans, checks, and logs are saved under `.manager/runs/<run-id>/`.
|
|
244
|
+
Worktrees are stored beside your repository. Edit task requirements before
|
|
245
|
+
starting a new run; `resume` uses saved requirements, not later backlog edits.
|
|
246
|
+
|
|
247
|
+
Agents execute local commands. The permission settings and worktrees are not a
|
|
248
|
+
substitute for an isolated machine when working with untrusted code. After a hard
|
|
249
|
+
crash, stop any remaining agent processes before resuming.
|
|
250
|
+
|
|
251
|
+
## Development
|
|
252
|
+
|
|
253
|
+
```sh
|
|
254
|
+
python -m pip install -e ".[dev]"
|
|
255
|
+
python -m pytest
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Tests use simulated agent responses and real temporary Git repositories. CI runs
|
|
259
|
+
on Windows and Linux with Python 3.11 and 3.14. These tests do not establish live model quality or account compatibility; see
|
|
260
|
+
[EVALUATION.md](EVALUATION.md) for opt-in live evaluations.
|
|
261
|
+
|
|
262
|
+
- [Configuration and provider details](docs/CONFIGURATION.md)
|
|
263
|
+
- [Architecture](ARCHITECTURE.md)
|
|
264
|
+
- [Workflow](WORKFLOW.md)
|
|
265
|
+
- [Evaluation](EVALUATION.md)
|
|
266
|
+
- [Changelog](CHANGELOG.md)
|
|
267
|
+
- [Technical status report](TECHNICAL_STATUS.md)
|
|
268
|
+
|
|
269
|
+
## Website
|
|
270
|
+
|
|
271
|
+
The landing page lives in [website/](website/README.md). It uses static HTML, CSS,
|
|
272
|
+
and JavaScript, with an interactive example workflow and installation guide.
|
|
273
|
+
|
|
274
|
+
## License
|
|
275
|
+
|
|
276
|
+
Task Harbor is available under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Provider-neutral result and error types."""
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class AgentError(RuntimeError):
|
|
7
|
+
def __init__(self, message: str, raw: dict | None = None):
|
|
8
|
+
super().__init__(message)
|
|
9
|
+
self.raw = raw
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass
|
|
13
|
+
class AgentResult:
|
|
14
|
+
text: str
|
|
15
|
+
session_id: str | None
|
|
16
|
+
raw: dict[str, Any]
|
|
17
|
+
returncode: int
|