hiiro 0.1.365 → 0.1.367
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +53 -343
- data/CLAUDE.md +1 -0
- data/README.md +114 -17
- data/bin/h-bin +20 -0
- data/bin/h-task +1 -0
- data/bin/t +1 -0
- data/bin/tt +1 -0
- data/docs/h-bin.md +49 -2
- data/docs/h-subtask.md +5 -44
- data/docs/h-task.md +123 -596
- data/docs/h.md +1 -2
- data/docs/t.md +437 -0
- data/docs/why-t.md +306 -0
- data/exe/h +1 -0
- data/exe/t +7 -0
- data/exe/tt +7 -0
- data/lib/hiiro/current_task.rb +92 -0
- data/lib/hiiro/error.rb +5 -0
- data/lib/hiiro/git/worktrees.rb +1 -1
- data/lib/hiiro/git.rb +8 -2
- data/lib/hiiro/task_cli.rb +671 -0
- data/lib/hiiro/task_scope.rb +51 -0
- data/lib/hiiro/task_sessions.rb +51 -0
- data/lib/hiiro/tasks.rb +40 -27
- data/lib/hiiro/version.rb +1 -1
- data/lib/hiiro.rb +23 -20
- metadata +16 -2
data/docs/h-task.md
CHANGED
|
@@ -4,662 +4,189 @@
|
|
|
4
4
|
|
|
5
5
|
Task records and resource references live in `~/.config/hiiro/hiiro.db`, in the existing `tasks` table and the `task_resources` table. `h task` uses the same records. Its YAML file is a backup, not a separate task store.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
The command implementation lives in `~/bin/t`, not a `Hiiro::TaskCLI` library class. Commands use `add_cmd` with per-command argument and option declarations. Running `t` or `t doc` displays Hiiro's generated subcommand table, including declaration locations. Leaf help, such as `t directory add --help`, displays only that command's options without executing it. There is no separate task help template. `t` does not run `h task` or discover legacy `t-*` executables.
|
|
10
|
-
|
|
11
|
-
Every task command accepts `-t TASK` or `--task TASK` before or after the command. Explicit task names are exact and take precedence over the current directory or workspace. Conflicting explicit names are errors.
|
|
12
|
-
|
|
13
|
-
Without a selector, `t` considers the current directory inside a task home, an attached directory, or a legacy worktree. In a Herdr terminal, it also queries the current workspace. If the contexts identify different tasks, the command fails without changing task data. A shared directory therefore requires an explicit selector. Outside Herdr, an unrelated focused workspace does not affect task selection.
|
|
14
|
-
|
|
15
|
-
### Task records
|
|
16
|
-
|
|
17
|
-
```text
|
|
18
|
-
t list [--all]
|
|
19
|
-
t show [TASK]
|
|
20
|
-
t current
|
|
21
|
-
t new TASK
|
|
22
|
-
t next [TEXT...] [--clear]
|
|
23
|
-
t status [active|waiting|done|archived]
|
|
24
|
-
t waiting [TEXT...] [--clear]
|
|
25
|
-
t done
|
|
26
|
-
t archive
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
`list` shows active and waiting tasks. `--all` includes completed and archived tasks. `next`, `waiting`, and `status` without arguments display the current value.
|
|
30
|
-
|
|
31
|
-
`new TASK` creates a record and `~/notes/work/TASK`. It never creates a Git worktree, moves code, or launches Herdr. Repeating `new` keeps the existing record and ensures its home exists. Names contain 1-120 ASCII letters, digits, dots, underscores, or hyphens and start with a letter or digit. Existing names that contain other characters remain usable, with those characters percent-encoded in the computed home directory name.
|
|
32
|
-
|
|
33
|
-
Setting waiting text changes status to `waiting`. Clearing that text changes a waiting task back to `active`. `done` and `archive` change status and record timestamps. They never remove a task home, a file, a directory, a link, or a workspace. `status active` reopens a task.
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
t new audit-invoices
|
|
37
|
-
t next -t audit-invoices 'Compare the September export'
|
|
38
|
-
t waiting -t audit-invoices 'Finance approval'
|
|
39
|
-
t waiting -t audit-invoices --clear
|
|
40
|
-
t done -t audit-invoices
|
|
41
|
-
t show audit-invoices
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Directory, link, PR, and file references
|
|
7
|
+
Task todos use the existing `todos` table shared with `h todo`. `t` writes to the database directly and does not rewrite the task YAML backup or `todo.yml`.
|
|
45
8
|
|
|
46
|
-
|
|
47
|
-
t directory add PATH [--primary] [--label LABEL]
|
|
48
|
-
t directory list
|
|
49
|
-
t directory open [ID|PATH|LABEL]
|
|
50
|
-
t link add URL [--kind general|issue|thread] [--label LABEL]
|
|
51
|
-
t link list [--kind general|issue|thread]
|
|
52
|
-
t link open [ID|URL|LABEL]
|
|
53
|
-
t pr add URL [--label LABEL]
|
|
54
|
-
t pr list
|
|
55
|
-
t pr open [ID|URL|LABEL]
|
|
56
|
-
t file add PATH [--label LABEL]
|
|
57
|
-
t file list
|
|
58
|
-
t file open [ID|PATH|LABEL]
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Directory and file attachments must already exist. `add` stores their canonical paths without moving or copying anything. Repeating an identical attachment does not create another reference. `--primary` marks an attached directory as the default code directory for new workspace tabs and panes.
|
|
62
|
-
|
|
63
|
-
Links must be absolute HTTP or HTTPS URLs. `link list` includes PR references unless a kind filter is present. PRs use the same resource storage as other links and do not require a Git repository or provider API.
|
|
64
|
-
|
|
65
|
-
`file list` also discovers files in the task home, including documents, without registration. Home files can be opened by a relative path or an unambiguous basename. An omitted open selector works only when exactly one resource matches. Otherwise, the command requires an ID, path, URL, or unique label.
|
|
9
|
+
## t
|
|
66
10
|
|
|
67
|
-
`
|
|
11
|
+
The command implementation is `Hiiro::TaskCli` in `lib/hiiro/task_cli.rb`; `exe/t` and `exe/tt` are gem executables that call `Hiiro::TaskCli.setup` and `Hiiro::TaskCli.setup_todo` from `Hiiro.run`. Installing the gem installs both. `tt` runs the todo scope in-process. `t` does not run `h task` or discover legacy `t-*` executables.
|
|
68
12
|
|
|
69
|
-
|
|
13
|
+
The grammar is `t TASK COMMAND...`. Bare `t`, `t ls`, or `t list` lists all tasks, including done and archived tasks, with open todo counts. `t TASK` shows the task. Only exact root `t help` displays generic usage and native scoped help without looking up a task. First words such as `new`, `show`, `edit`, `pry`, and `he` are task references, not root commands or help abbreviations.
|
|
70
14
|
|
|
71
|
-
|
|
72
|
-
t doc new NAME [TITLE...]
|
|
73
|
-
t doc list
|
|
74
|
-
t doc open [NAME]
|
|
75
|
-
```
|
|
15
|
+
Named references match an exact name first, then a unique case-sensitive prefix. Ambiguous prefixes are errors. Unknown names fail except with `t NAME new` or `t NAME todo add TEXT...`. Explicit `new` creates exactly `NAME` without prefix resolution. `t TASK help` shows task commands, and `t TASK todo help` shows todo commands. Native command abbreviations apply inside these scopes.
|
|
76
16
|
|
|
77
|
-
|
|
17
|
+
Use `.` to select the current task, including when supplying a payload: `t . next 'Compare the export'`. Selection checks the calling Herdr workspace, then the current directory inside a task home, code directory, or registered directory, then the saved task. Workspace context wins over a conflicting directory. Ambiguous matches and invalid, stale, or conflicting Herdr IDs are errors. Outside Herdr, an unrelated focused workspace does not affect selection. An explicit name bypasses context lookup.
|
|
78
18
|
|
|
79
|
-
|
|
19
|
+
`t TASK current` prints the resolved name and saves a named selection without changing terminal focus. `t . current` only prints it. The fallback is a `PinRecord` with `command='t'`, `key='current_task'`, and the task ID as a JSON integer in `value_json`. A missing saved task is an error when selection reaches that fallback. Reads and workspace opens through `.` do not replace it.
|
|
80
20
|
|
|
81
|
-
###
|
|
21
|
+
### Task records
|
|
82
22
|
|
|
83
23
|
```text
|
|
84
|
-
t
|
|
85
|
-
t
|
|
86
|
-
t
|
|
87
|
-
t
|
|
88
|
-
t
|
|
89
|
-
t
|
|
90
|
-
t
|
|
91
|
-
t
|
|
92
|
-
t
|
|
93
|
-
t
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
These commands require a running Herdr server. `workspace open` focuses the workspace with the task's label or creates one. A new workspace starts in the explicit directory, the primary code directory, the legacy worktree, or the task home, in that order. `--directory` changes that operation's start directory without changing stored attachments.
|
|
97
|
-
|
|
98
|
-
`workspace show` queries the current tabs and panes. Tab and pane selectors must belong to the selected task's workspace. Duplicate labels require a live ID. No pane or tab ID is stored as durable task identity. Task workspace labels follow Herdr's dot-to-underscore normalization. Colliding task or workspace labels are errors rather than fuzzy matches.
|
|
99
|
-
|
|
100
|
-
Use `--` before literal command arguments that begin with a dash:
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
t pane run -t audit-invoices PANE_ID -- printf '%s\n' --example
|
|
24
|
+
t
|
|
25
|
+
t TASK
|
|
26
|
+
t TASK show
|
|
27
|
+
t TASK current
|
|
28
|
+
t NAME new
|
|
29
|
+
t TASK next [TEXT...] [--clear]
|
|
30
|
+
t TASK status [active|waiting|done|archived]
|
|
31
|
+
t TASK waiting [TEXT...] [--clear]
|
|
32
|
+
t TASK done
|
|
33
|
+
t TASK archive
|
|
104
34
|
```
|
|
105
35
|
|
|
106
|
-
|
|
36
|
+
Bare `t`, `t ls`, and `t list` list tasks regardless of context or the saved task, showing each name with its open todo count, e.g. `prez (3)`. There is no root `new` or `show` action. `next`, `waiting`, and `status` without a payload display the selected task's current value.
|
|
107
37
|
|
|
108
|
-
|
|
38
|
+
`t NAME new` creates a record and `~/notes/work/NAME`. It never creates a Git worktree, moves code, or launches Herdr. Repeating `new` keeps the exact existing record and ensures its home exists. Names contain 1-120 ASCII letters, digits, dots, underscores, or hyphens and start with a letter or digit. Existing names that contain other characters remain usable, with those characters percent-encoded in the computed home directory name.
|
|
109
39
|
|
|
110
|
-
|
|
40
|
+
Setting waiting text changes status to `waiting`. Clearing that text changes a waiting task back to `active`. `done` and `archive` change status and record timestamps. They never remove todos, a task home, a file, a directory, a link, or a workspace. `t TASK status active` reopens a task.
|
|
111
41
|
|
|
112
42
|
```bash
|
|
113
|
-
|
|
43
|
+
t audit-invoices new
|
|
44
|
+
t audit-invoices next 'Compare the September export'
|
|
45
|
+
t audit-invoices waiting 'Finance approval'
|
|
46
|
+
t audit-invoices waiting --clear
|
|
47
|
+
t audit-invoices done
|
|
48
|
+
t audit-invoices
|
|
114
49
|
```
|
|
115
50
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
### app
|
|
119
|
-
|
|
120
|
-
Open a named app in a new Herdr tab within the current task workspace. With no argument, opens a fuzzyfind selector over configured apps.
|
|
121
|
-
|
|
122
|
-
**Examples**
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
h task app
|
|
126
|
-
h task app api
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
### apps
|
|
132
|
-
|
|
133
|
-
List all configured apps and their relative paths.
|
|
134
|
-
|
|
135
|
-
**Examples**
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
h task apps
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
### branch
|
|
144
|
-
|
|
145
|
-
Print the git branch for a task. With no argument, opens a fuzzyfind selector. Outputs nothing if the tree is detached.
|
|
146
|
-
|
|
147
|
-
**Options**
|
|
148
|
-
|
|
149
|
-
| Flag | Short | Description | Default |
|
|
150
|
-
|------|-------|-------------|---------|
|
|
151
|
-
| `--task` | `-t` | Task name | current task |
|
|
152
|
-
| `--find` | `-f` | Choose task interactively | false |
|
|
153
|
-
| `--all` | `-a` | Print branch for every task; positional args become prefix filters (OR'd) | false |
|
|
154
|
-
|
|
155
|
-
**Examples**
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
h task branch
|
|
159
|
-
h task branch my-feature
|
|
160
|
-
h task branch -a # print branch for every task
|
|
161
|
-
h task branch -a feat bug # tasks whose name starts with "feat" or "bug"
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
### branches
|
|
167
|
-
|
|
168
|
-
List branches for the current task. Delegates to `h branch`.
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
### cbranch
|
|
173
|
-
|
|
174
|
-
Print the git branch of the **current** task. Exits with an error if not in a task.
|
|
175
|
-
|
|
176
|
-
**Examples**
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
h task cbranch
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
### cd
|
|
185
|
-
|
|
186
|
-
Send a `cd` command to the current Herdr pane, navigating to a task's worktree or app subdirectory.
|
|
187
|
-
|
|
188
|
-
**Options**
|
|
189
|
-
|
|
190
|
-
| Flag | Short | Description | Default |
|
|
191
|
-
|------|-------|-------------|---------|
|
|
192
|
-
| `--task` | `-t` | Task name | current task |
|
|
193
|
-
| `--find` | `-f` | Choose task interactively | false |
|
|
194
|
-
|
|
195
|
-
**Examples**
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
h task cd
|
|
199
|
-
h task cd my-feature
|
|
200
|
-
h task cd my-feature api
|
|
201
|
-
h task cd -t my-feature
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
### csession
|
|
207
|
-
|
|
208
|
-
Print the Herdr workspace label stored for the **current** task.
|
|
209
|
-
|
|
210
|
-
**Examples**
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
h task csession
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
### ctree
|
|
219
|
-
|
|
220
|
-
Print the worktree name of the **current** task.
|
|
221
|
-
|
|
222
|
-
**Examples**
|
|
223
|
-
|
|
224
|
-
```bash
|
|
225
|
-
h task ctree
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
230
|
-
### current
|
|
231
|
-
|
|
232
|
-
Print the name of the current task based on the Herdr workspace or worktree match. Exits with an error if not in a task.
|
|
233
|
-
|
|
234
|
-
**Examples**
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
h task current
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
### edit
|
|
243
|
-
|
|
244
|
-
Open the `tasks.rb` source file in your editor.
|
|
245
|
-
### file
|
|
246
|
-
|
|
247
|
-
Manage tracked app files for the current task. Delegates to the app files system.
|
|
248
|
-
|
|
249
|
-
**Examples**
|
|
250
|
-
|
|
251
|
-
```bash
|
|
252
|
-
h task file ls
|
|
253
|
-
h task file add myapp path/to/file.rb
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
### from
|
|
259
|
-
|
|
260
|
-
Register an existing git worktree as a Hiiro task and switch to it. The path is normalized to the worktree root with `git rev-parse --show-toplevel`, then stored as the task's tree path.
|
|
261
|
-
|
|
262
|
-
**Examples**
|
|
263
|
-
|
|
264
|
-
```bash
|
|
265
|
-
h task from ~/ic_repos/other_repo_base_dir other-task
|
|
266
|
-
h task path other-task
|
|
267
|
-
h task switch other-task
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
Stored task shape:
|
|
271
|
-
|
|
272
|
-
```js
|
|
273
|
-
{
|
|
274
|
-
name: "other-task",
|
|
275
|
-
tree: "/Users/josh/ic_repos/other_repo_base_dir",
|
|
276
|
-
session: "other-task"
|
|
277
|
-
}
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
---
|
|
281
|
-
|
|
282
|
-
### ls / list
|
|
283
|
-
|
|
284
|
-
List all tasks with their worktree, branch, and workspace label. It also shows available worktrees and extra Herdr workspaces.
|
|
285
|
-
|
|
286
|
-
A `*` prefix marks the current task. An `@` prefix indicates the Herdr workspace is focused.
|
|
287
|
-
|
|
288
|
-
**Options**
|
|
289
|
-
|
|
290
|
-
| Flag | Short | Description | Default |
|
|
291
|
-
|------|-------|-------------|---------|
|
|
292
|
-
| `--tag` | `-t` | Filter by tag (OR logic; repeatable) | all |
|
|
293
|
-
|
|
294
|
-
**Examples**
|
|
295
|
-
|
|
296
|
-
```bash
|
|
297
|
-
h task ls
|
|
298
|
-
h task ls -t urgent
|
|
299
|
-
h task ls -t api -t frontend
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
---
|
|
303
|
-
|
|
304
|
-
### path
|
|
305
|
-
|
|
306
|
-
Print the absolute path to a task's worktree or app subdirectory. With glob patterns, lists matching files.
|
|
51
|
+
### Task todos
|
|
307
52
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
```bash
|
|
319
|
-
h task path
|
|
320
|
-
h task path my-feature
|
|
321
|
-
h task path my-feature api
|
|
322
|
-
h task path my-feature api "**/*.rb"
|
|
323
|
-
h task path -a # print worktree path for every task
|
|
324
|
-
h task path -a feat bug # tasks whose name starts with "feat" or "bug"
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
---
|
|
328
|
-
|
|
329
|
-
### prune
|
|
330
|
-
|
|
331
|
-
Detach worktree associations whose directories are missing. The task record, metadata, and resource references remain. Tasks without worktrees are not pruned. Defaults to a dry-run.
|
|
332
|
-
|
|
333
|
-
**Options**
|
|
334
|
-
|
|
335
|
-
| Flag | Short | Description | Default |
|
|
336
|
-
|------|-------|-------------|---------|
|
|
337
|
-
| `--force` | `-f` | Detach missing worktrees | false |
|
|
338
|
-
|
|
339
|
-
**Examples**
|
|
340
|
-
|
|
341
|
-
```bash
|
|
342
|
-
h task prune # show what would be pruned
|
|
343
|
-
h task prune -f # detach missing worktrees, retaining task records
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
---
|
|
347
|
-
|
|
348
|
-
### prs
|
|
349
|
-
|
|
350
|
-
List PRs for the current task. Delegates to `h pr`.
|
|
351
|
-
|
|
352
|
-
---
|
|
353
|
-
|
|
354
|
-
### queue
|
|
355
|
-
|
|
356
|
-
Run the Claude prompt queue scoped to the current task. All `h queue` subcommands are available. See [h-queue](h-queue.md).
|
|
357
|
-
|
|
358
|
-
**Examples**
|
|
359
|
-
|
|
360
|
-
```bash
|
|
361
|
-
h task queue ls
|
|
362
|
-
h task queue add "Fix the login bug"
|
|
363
|
-
h task queue hadd
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
---
|
|
367
|
-
|
|
368
|
-
### resume
|
|
369
|
-
|
|
370
|
-
Associate an available worktree with a new task or an existing task whose worktree was detached, then switch to it. Existing task metadata is preserved. With no argument, opens a fuzzyfind selector over available worktrees.
|
|
371
|
-
|
|
372
|
-
**Examples**
|
|
373
|
-
|
|
374
|
-
```bash
|
|
375
|
-
h task resume
|
|
376
|
-
h task resume my-feature/main
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
---
|
|
380
|
-
|
|
381
|
-
### run
|
|
382
|
-
|
|
383
|
-
Run linters, tests, or formatters against changed files for the current task. Delegates to the runner tool system.
|
|
384
|
-
|
|
385
|
-
**Examples**
|
|
386
|
-
|
|
387
|
-
```bash
|
|
388
|
-
h task run
|
|
389
|
-
h task run lint
|
|
390
|
-
h task run test ruby
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
---
|
|
394
|
-
|
|
395
|
-
### save
|
|
396
|
-
|
|
397
|
-
Read and report the current task's Herdr tab state.
|
|
398
|
-
|
|
399
|
-
**Examples**
|
|
400
|
-
|
|
401
|
-
```bash
|
|
402
|
-
h task save
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
---
|
|
406
|
-
|
|
407
|
-
### service
|
|
408
|
-
|
|
409
|
-
Manage dev services scoped to the current task. All `h service` subcommands are available. See [h-service](h-service.md).
|
|
410
|
-
|
|
411
|
-
**Examples**
|
|
412
|
-
|
|
413
|
-
```bash
|
|
414
|
-
h task service ls
|
|
415
|
-
h task service start my-rails
|
|
416
|
-
```
|
|
417
|
-
|
|
418
|
-
---
|
|
419
|
-
|
|
420
|
-
### name
|
|
421
|
-
|
|
422
|
-
Print the full task name. With no argument, opens a fuzzyfind selector. Useful for scripting alongside `tree -a`, `branch -a`, and `path -a` (results are sorted by name across all four, so they line up).
|
|
423
|
-
|
|
424
|
-
**Options**
|
|
425
|
-
|
|
426
|
-
| Flag | Short | Description | Default |
|
|
427
|
-
|------|-------|-------------|---------|
|
|
428
|
-
| `--task` | `-t` | Task name | current task |
|
|
429
|
-
| `--find` | `-f` | Choose task interactively | false |
|
|
430
|
-
| `--all` | `-a` | Print every task's name; positional args become prefix filters (OR'd) | false |
|
|
431
|
-
|
|
432
|
-
**Examples**
|
|
433
|
-
|
|
434
|
-
```bash
|
|
435
|
-
h task name -a # list every task name
|
|
436
|
-
h task name -a feat # only tasks starting with "feat"
|
|
437
|
-
paste <(h task name -a) <(h task path -a) # name <-> path mapping
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
---
|
|
441
|
-
|
|
442
|
-
### session
|
|
443
|
-
|
|
444
|
-
Print the stored Herdr workspace label for a task. The `session` command name remains for compatibility. With no argument, it opens a fuzzyfind selector.
|
|
445
|
-
|
|
446
|
-
**Options**
|
|
447
|
-
|
|
448
|
-
| Flag | Short | Description | Default |
|
|
449
|
-
|------|-------|-------------|---------|
|
|
450
|
-
| `--task` | `-t` | Task name | current task |
|
|
451
|
-
| `--find` | `-f` | Choose task interactively | false |
|
|
452
|
-
| `--all` | `-a` | Print workspace label for every task; positional args become prefix filters (OR'd) | false |
|
|
453
|
-
|
|
454
|
-
**Examples**
|
|
455
|
-
|
|
456
|
-
```bash
|
|
457
|
-
h task session
|
|
458
|
-
h task session my-feature
|
|
459
|
-
h task session -a
|
|
460
|
-
```
|
|
461
|
-
|
|
462
|
-
---
|
|
463
|
-
|
|
464
|
-
### sh
|
|
465
|
-
|
|
466
|
-
Open a shell (or run a command) in the current task's worktree. With `--session`, create a new Herdr tab in the specified workspace.
|
|
467
|
-
|
|
468
|
-
**Options**
|
|
469
|
-
|
|
470
|
-
| Flag | Short | Description | Default |
|
|
471
|
-
|------|-------|-------------|---------|
|
|
472
|
-
| `--task` | `-t` | Task name | current task |
|
|
473
|
-
| `--find` | `-f` | Choose task interactively | false |
|
|
474
|
-
| `--session` | `-s` | Run in a new tab in this Herdr workspace | none |
|
|
475
|
-
|
|
476
|
-
**Examples**
|
|
477
|
-
|
|
478
|
-
```bash
|
|
479
|
-
h task sh
|
|
480
|
-
h task sh -t my-feature
|
|
481
|
-
h task sh my-feature bundle exec rails s
|
|
482
|
-
h task sh -s my-session
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
---
|
|
486
|
-
|
|
487
|
-
### sparse
|
|
488
|
-
|
|
489
|
-
Manage sparse checkout for the current task's worktree.
|
|
490
|
-
|
|
491
|
-
**Options**
|
|
492
|
-
|
|
493
|
-
| Flag | Short | Description |
|
|
494
|
-
|------|-------|-------------|
|
|
495
|
-
| `--list` | `-l` | List all configured sparse groups |
|
|
496
|
-
| `--disable` | `-d` | Disable sparse checkout on current task |
|
|
497
|
-
|
|
498
|
-
**Examples**
|
|
499
|
-
|
|
500
|
-
```bash
|
|
501
|
-
h task sparse # show active sparse checkout
|
|
502
|
-
h task sparse default # apply 'default' group
|
|
503
|
-
h task sparse -l # list all groups
|
|
504
|
-
h task sparse -d # disable sparse checkout
|
|
505
|
-
```
|
|
506
|
-
|
|
507
|
-
---
|
|
508
|
-
|
|
509
|
-
### start
|
|
510
|
-
|
|
511
|
-
Create a new task (worktree + Herdr workspace) and switch to it. If the task already exists, switch to it instead. Reuse an available unassigned worktree when possible; otherwise create a new one.
|
|
512
|
-
|
|
513
|
-
**Options**
|
|
514
|
-
|
|
515
|
-
| Flag | Short | Description | Default |
|
|
516
|
-
|------|-------|-------------|---------|
|
|
517
|
-
| `--sparse` | `-s` | Apply a sparse checkout group (repeatable) | none |
|
|
518
|
-
|
|
519
|
-
**Examples**
|
|
520
|
-
|
|
521
|
-
```bash
|
|
522
|
-
h task start my-feature
|
|
523
|
-
h task start my-feature api # open in app subdirectory
|
|
524
|
-
h task start my-feature -s default
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
---
|
|
528
|
-
|
|
529
|
-
### status / st
|
|
530
|
-
|
|
531
|
-
Show detailed info about the current task: name, worktree, path, workspace, and parent (if subtask).
|
|
532
|
-
|
|
533
|
-
**Examples**
|
|
534
|
-
|
|
535
|
-
```bash
|
|
536
|
-
h task status
|
|
537
|
-
h task st
|
|
53
|
+
```text
|
|
54
|
+
t TASK todo
|
|
55
|
+
t TASK todo list
|
|
56
|
+
t TASK todo ls
|
|
57
|
+
t TASK todo add TEXT...
|
|
58
|
+
t TASK todo rm ID
|
|
59
|
+
tt TASK [COMMAND...]
|
|
60
|
+
tt
|
|
61
|
+
tt help
|
|
538
62
|
```
|
|
539
63
|
|
|
540
|
-
|
|
64
|
+
`tt TASK ...` delegates to `t TASK todo ...`. Bare `tt` means `t . todo`, and `tt help` shows todo help without task lookup. The default todo action is listing. `t - todo` and `tt -` select orphan todos, with `add` and `rm` available in that scope. `-` is invalid outside todo commands and never creates a task.
|
|
541
65
|
|
|
542
|
-
|
|
66
|
+
If a named `todo add` finds no match, it creates the task using `new` validation and home rules, then adds one todo with status `not_started`. Task and todo database writes use one immediate SQLite transaction. Other todo actions never create tasks.
|
|
543
67
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
**Examples**
|
|
68
|
+
Every token after `add` is literal text, including flags and `--`, except that leading `add -h` or `add --help` displays native option help. The tokens are joined with spaces. Missing, empty, or whitespace-only text fails before task creation.
|
|
547
69
|
|
|
548
70
|
```bash
|
|
549
|
-
|
|
550
|
-
|
|
71
|
+
t audit-invoices todo add Compare the September export
|
|
72
|
+
tt audit-invoices add Inspect --help output
|
|
73
|
+
t audit-invoices todo
|
|
74
|
+
t audit-invoices todo rm 42
|
|
75
|
+
tt - add Buy printer paper
|
|
551
76
|
```
|
|
552
77
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
### switch
|
|
78
|
+
Use an ID printed by `show` or todo listing in place of `42`. `rm` accepts exactly one decimal database ID belonging to the selected scope, not a list position or suffix. Missing, invalid, or extra arguments fail.
|
|
556
79
|
|
|
557
|
-
|
|
80
|
+
Task display and todo listing print each matching item's ID, status, and text in ID order. Matching uses the full task name exactly, including legacy rows with both `task_name` and `subtask_name`. A parent task does not include its subtasks' todos. New task todos store the full task name in `task_name` and leave `subtask_name` unset. Orphan rows leave both unset.
|
|
558
81
|
|
|
559
|
-
|
|
82
|
+
Each task still has one independent `next_action`. Adding or removing todos does not change that field, task status, or saved selection. `t` has no todo-completion command or automatic next-action promotion. The separate `h task` and `h todo` commands keep their existing behavior.
|
|
560
83
|
|
|
561
|
-
|
|
562
|
-
|------|-------|-------------|---------|
|
|
563
|
-
| `--force` | `-f` | Accepted for compatibility; Herdr workspace focus does not require it | false |
|
|
564
|
-
|
|
565
|
-
**Examples**
|
|
566
|
-
|
|
567
|
-
```bash
|
|
568
|
-
h task switch
|
|
569
|
-
h task switch my-feature
|
|
570
|
-
h task switch my-feature api
|
|
571
|
-
h task switch my-session -f
|
|
572
|
-
```
|
|
573
|
-
|
|
574
|
-
---
|
|
84
|
+
### Directory, link, PR, and file references
|
|
575
85
|
|
|
576
|
-
|
|
86
|
+
```text
|
|
87
|
+
t TASK directory add PATH [--primary] [--label LABEL]
|
|
88
|
+
t TASK directory list
|
|
89
|
+
t TASK directory open [ID|PATH|LABEL]
|
|
90
|
+
t TASK link add URL [--kind general|issue|thread] [--label LABEL]
|
|
91
|
+
t TASK link list [--kind general|issue|thread]
|
|
92
|
+
t TASK link open [ID|URL|LABEL]
|
|
93
|
+
t TASK pr add URL [--label LABEL]
|
|
94
|
+
t TASK pr list
|
|
95
|
+
t TASK pr open [ID|URL|LABEL]
|
|
96
|
+
t TASK file add PATH [--label LABEL]
|
|
97
|
+
t TASK file list
|
|
98
|
+
t TASK file open [ID|PATH|LABEL]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Directory and file attachments must already exist. `add` stores their canonical paths without moving or copying anything. Repeating an identical attachment does not create another reference. `--primary` marks an attached directory as the default code directory for new workspace tabs and panes. An existing directory can be a Git worktree. Registering it does not create a worktree or alter sparse checkout.
|
|
577
102
|
|
|
578
|
-
|
|
103
|
+
Links must be absolute HTTP or HTTPS URLs. `link list` includes PR references unless a kind filter is present. PRs use the same resource storage as other links and do not require a Git repository or provider API.
|
|
579
104
|
|
|
580
|
-
|
|
105
|
+
`file list` also discovers files in the task home, including documents, without registration. Home files can be opened by a relative path or an unambiguous basename. An omitted open selector works only when exactly one resource matches. Otherwise, the command requires an ID, path, URL, or unique label.
|
|
581
106
|
|
|
582
|
-
|
|
583
|
-
|------|-------|-------------|
|
|
584
|
-
| `--edit` | `-e` | Open YAML editor to bulk-tag tasks |
|
|
107
|
+
`open` uses the operating system's default application. Attachments remain references even after task completion. List commands also accept `ls`. Leaf help, such as `t audit-invoices directory add --help`, lists options without running the action.
|
|
585
108
|
|
|
586
|
-
|
|
109
|
+
### Documents
|
|
587
110
|
|
|
588
|
-
```
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
111
|
+
```text
|
|
112
|
+
t TASK doc new NAME [TITLE...]
|
|
113
|
+
t TASK doc list
|
|
114
|
+
t TASK doc open [NAME]
|
|
592
115
|
```
|
|
593
116
|
|
|
594
|
-
|
|
117
|
+
`doc new` creates a Markdown file in the task home with an initial heading. It never overwrites an existing file. Documents have a stable task-ID prefix, such as `task-42-investigation.md`, to avoid collisions in `mdoc`'s shared HTML output directory. `t TASK doc open investigation` accepts the short name and invokes `mdoc`. Existing Markdown files in the task home also appear without registration.
|
|
595
118
|
|
|
596
|
-
|
|
119
|
+
Task creation, metadata, references, and document creation/listing work without Git or Herdr when a named task is supplied. Document reading requires `mdoc` on `PATH` and its existing configuration.
|
|
597
120
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
**Examples**
|
|
121
|
+
### Herdr workspaces, tabs, and panes
|
|
601
122
|
|
|
602
|
-
```
|
|
603
|
-
|
|
123
|
+
```text
|
|
124
|
+
t TASK workspace [--directory PATH]
|
|
125
|
+
t TASK switch [--directory PATH]
|
|
126
|
+
t TASK workspace --show
|
|
127
|
+
t TASK switch --show
|
|
128
|
+
t TASK tab list
|
|
129
|
+
t TASK tab new [LABEL] [--directory PATH] [--command COMMAND]
|
|
130
|
+
t TASK tab open ID|LABEL
|
|
131
|
+
t TASK pane list
|
|
132
|
+
t TASK pane open ID|LABEL
|
|
133
|
+
t TASK pane read ID|LABEL
|
|
134
|
+
t TASK pane run ID|LABEL -- COMMAND...
|
|
135
|
+
t TASK pane split ID|LABEL [--direction right|down] [--directory PATH] [--command COMMAND]
|
|
604
136
|
```
|
|
605
137
|
|
|
606
|
-
|
|
138
|
+
These commands require a running Herdr server. `t TASK workspace` and its `switch` alias focus the workspace with the task's label or create one. They save a named task only after a successful switch. `t . workspace` leaves the saved fallback unchanged. A new workspace starts in the explicit directory, the primary code directory, the legacy worktree, or the task home, in that order. `--directory` changes that operation's start directory without changing stored attachments.
|
|
607
139
|
|
|
608
|
-
|
|
140
|
+
`--show` queries the current tabs and panes without saving, focusing, or creating a workspace. `workspace` and `switch` are direct commands, not groups. Native Hiiro abbreviation matching accepts `t TASK wor`.
|
|
609
141
|
|
|
610
|
-
|
|
142
|
+
Tab and pane selectors must belong to the selected task's workspace. Duplicate labels require a live ID. No pane or tab ID is stored as durable task identity. Task workspace labels follow Herdr's dot-to-underscore normalization. Colliding task or workspace labels are errors rather than fuzzy matches.
|
|
611
143
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
**Examples**
|
|
144
|
+
Use `--` before literal command arguments that begin with a dash:
|
|
615
145
|
|
|
616
146
|
```bash
|
|
617
|
-
|
|
618
|
-
h task todo add "Fix the login bug"
|
|
619
|
-
h task todo add -t urgent "Refactor auth"
|
|
620
|
-
h task todo done 0
|
|
147
|
+
t audit-invoices pane run PANE_ID -- printf '%s\n' --example
|
|
621
148
|
```
|
|
622
149
|
|
|
623
|
-
|
|
150
|
+
### Native AI sessions
|
|
624
151
|
|
|
625
|
-
|
|
152
|
+
`t TASK omp`, `t TASK codex` or `cdx`, and `t TASK claude` or `cld` create new focused tabs in the task workspace. They launch the native `omp`, `codex`, and `claude` executables, respectively. The workspace is created if needed. Fresh sessions are the default.
|
|
626
153
|
|
|
627
|
-
|
|
154
|
+
Only the first tool argument can select resume mode. A nonempty prefix of `resume`, such as `r`, `res`, or `resume`, consumes that token. OMP and Claude receive `--resume`; Codex receives its `resume` subcommand.
|
|
628
155
|
|
|
629
|
-
|
|
156
|
+
With no remaining arguments, resume focuses the unique genuinely running tool in that workspace, using Herdr's agent metadata rather than the tab label. Multiple running matches are an error that reports their IDs. If none is running, a new tab launches the native resume picker.
|
|
630
157
|
|
|
631
|
-
|
|
632
|
-
|------|-------|-------------|---------|
|
|
633
|
-
| `--task` | `-t` | Task name | current task |
|
|
634
|
-
| `--find` | `-f` | Choose task interactively | false |
|
|
635
|
-
| `--all` | `-a` | Print tree name for every task; positional args become prefix filters (OR'd) | false |
|
|
636
|
-
|
|
637
|
-
**Examples**
|
|
158
|
+
With any remaining arguments, resume always opens a new tab and forwards those arguments unchanged. Session IDs and options belong to the native CLI. Other arguments, including `--help` and `--`, also pass through unchanged. `t` does not inject model, permission, continue, or fresh-session flags.
|
|
638
159
|
|
|
639
160
|
```bash
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
161
|
+
t audit-invoices omp
|
|
162
|
+
t audit-invoices cdx r
|
|
163
|
+
t audit-invoices cld resume SESSION_ID
|
|
164
|
+
t audit-invoices codex resume --help
|
|
165
|
+
t audit-invoices claude --help
|
|
644
166
|
```
|
|
645
167
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
### untag
|
|
168
|
+
The launcher scopes live-pane lookup to the task workspace. Persisted session discovery remains native CLI behavior and is not necessarily task-isolated when tasks share a directory. `t` performs no auth or API requests and makes no automatic Git changes.
|
|
649
169
|
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
**Examples**
|
|
170
|
+
## h task
|
|
653
171
|
|
|
654
|
-
|
|
655
|
-
h task untag my-feature urgent
|
|
656
|
-
h task untag my-feature # remove all tags
|
|
657
|
-
```
|
|
172
|
+
`h task` is the same program as `t`: `bin/h-task` is a symlink to `exe/t`, so `h task ARGS...` behaves exactly like `t ARGS...` with the task-first grammar above. `h subtask` is gone; a subtask is a task named `parent/child`, and `t parent/child tree new` creates its worktree under `~/work/parent/child`.
|
|
658
173
|
|
|
659
|
-
|
|
174
|
+
Worktree operations that used to live only under `h task` are now task commands:
|
|
660
175
|
|
|
661
|
-
|
|
176
|
+
| Old | Now |
|
|
177
|
+
|---|---|
|
|
178
|
+
| `h task start NAME [APP] [-s GROUP]` | `t NAME tree new [--app APP] [--sparse GROUP]` (creates the task record if needed, then the worktree, then the Herdr workspace) |
|
|
179
|
+
| `h task switch NAME [APP]` | `t NAME switch [--directory DIR]` |
|
|
180
|
+
| `h task stop NAME` | `t NAME tree rm` (detaches the worktree, keeps the directory, registers it as a directory resource) |
|
|
181
|
+
| `h task resume [TREE]` | `t NAME tree resume [TREE]` |
|
|
182
|
+
| `h task path`, `h task branch`, `h task tree` | `t TASK path`, `t TASK branch`, `t TASK tree` |
|
|
183
|
+
| `h task sh [CMD...]` | `t TASK sh [CMD...]` |
|
|
184
|
+
| `h task cd` | `t TASK cd` |
|
|
185
|
+
| `h task todo ...` | `t TASK todo ...` or `tt TASK ...` |
|
|
186
|
+
| `h task ls` | `t ls` |
|
|
187
|
+
| `h task current` | `t . current` |
|
|
188
|
+
| `h task queue`, `service`, `run`, `file` | `h queue`, `h service`, `h run`, `h file` |
|
|
662
189
|
|
|
663
|
-
|
|
190
|
+
`h task tag`, `untag`, `tags`, `sparse`, `from`, `prune`, `apps`, `save`, `status`, and `prs` were not carried over. Tag branches with `h branch tag`, inspect worktrees with `h wtree`, and register an existing directory with `t TASK directory add PATH --primary`.
|
|
664
191
|
|
|
665
|
-
|
|
192
|
+
`Hiiro::TaskManager` still holds the worktree creation code that `t TASK tree new` and the shared `Hiiro::CurrentTask` resolver use; `h service`, `h run`, and `h file` keep using it for the current task through `Environment#task`, which now also recognizes a task by its home, primary directory, or registered directories.
|