hiiro 0.1.366 → 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.
data/docs/h-task.md CHANGED
@@ -8,9 +8,9 @@ Task todos use the existing `todos` table shared with `h todo`. `t` writes to th
8
8
 
9
9
  ## t
10
10
 
11
- The command implementation lives in the repository's `bin/t`, not a `Hiiro::TaskCLI` library class. `~/bin/t` is a symlink to that executable, which loads the repository library. Installing the gem does not install this launcher. `bin/tt` delegates to its todo scope. `t` does not run `h task` or discover legacy `t-*` executables.
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.
12
12
 
13
- The grammar is `t TASK COMMAND...`. Bare `t` lists all tasks, including done and archived tasks. `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.
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.
14
14
 
15
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.
16
16
 
@@ -33,7 +33,7 @@ t TASK done
33
33
  t TASK archive
34
34
  ```
35
35
 
36
- Bare `t` lists tasks regardless of context or the saved task. There is no root `list`, `ls`, `new`, or `show` action. `next`, `waiting`, and `status` without a payload display the selected task's current value.
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.
37
37
 
38
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.
39
39
 
@@ -169,561 +169,24 @@ The launcher scopes live-pane lookup to the task workspace. Persisted session di
169
169
 
170
170
  ## h task
171
171
 
172
- The existing `h task` commands below retain their coding-worktree operations. Unlike `t NAME new`, `h task start` can create a worktree for a new task. For a task without a worktree, path resolution uses its task home. Starting an existing noncoding task switches to that home without creating a worktree.
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`.
173
173
 
174
- ## Synopsis
174
+ Worktree operations that used to live only under `h task` are now task commands:
175
175
 
176
- ```bash
177
- h task <subcommand> [args]
178
- ```
179
-
180
- ## Subcommands
181
-
182
- ### app
183
-
184
- Open a named app in a new Herdr tab within the current task workspace. With no argument, opens a fuzzyfind selector over configured apps.
185
-
186
- **Examples**
187
-
188
- ```bash
189
- h task app
190
- h task app api
191
- ```
192
-
193
- ---
194
-
195
- ### apps
196
-
197
- List all configured apps and their relative paths.
198
-
199
- **Examples**
200
-
201
- ```bash
202
- h task apps
203
- ```
204
-
205
- ---
206
-
207
- ### branch
208
-
209
- Print the git branch for a task. With no argument, opens a fuzzyfind selector. Outputs nothing if the tree is detached.
210
-
211
- **Options**
212
-
213
- | Flag | Short | Description | Default |
214
- |------|-------|-------------|---------|
215
- | `--task` | `-t` | Task name | current task |
216
- | `--find` | `-f` | Choose task interactively | false |
217
- | `--all` | `-a` | Print branch for every task; positional args become prefix filters (OR'd) | false |
218
-
219
- **Examples**
220
-
221
- ```bash
222
- h task branch
223
- h task branch my-feature
224
- h task branch -a # print branch for every task
225
- h task branch -a feat bug # tasks whose name starts with "feat" or "bug"
226
- ```
227
-
228
- ---
229
-
230
- ### branches
231
-
232
- List branches for the current task. Delegates to `h branch`.
233
-
234
- ---
235
-
236
- ### cbranch
237
-
238
- Print the git branch of the **current** task. Exits with an error if not in a task.
239
-
240
- **Examples**
241
-
242
- ```bash
243
- h task cbranch
244
- ```
245
-
246
- ---
247
-
248
- ### cd
249
-
250
- Send a `cd` command to the current Herdr pane, navigating to a task's worktree or app subdirectory.
251
-
252
- **Options**
253
-
254
- | Flag | Short | Description | Default |
255
- |------|-------|-------------|---------|
256
- | `--task` | `-t` | Task name | current task |
257
- | `--find` | `-f` | Choose task interactively | false |
258
-
259
- **Examples**
260
-
261
- ```bash
262
- h task cd
263
- h task cd my-feature
264
- h task cd my-feature api
265
- h task cd -t my-feature
266
- ```
267
-
268
- ---
269
-
270
- ### csession
271
-
272
- Print the Herdr workspace label stored for the **current** task.
273
-
274
- **Examples**
275
-
276
- ```bash
277
- h task csession
278
- ```
279
-
280
- ---
281
-
282
- ### ctree
283
-
284
- Print the worktree name of the **current** task.
285
-
286
- **Examples**
287
-
288
- ```bash
289
- h task ctree
290
- ```
291
-
292
- ---
293
-
294
- ### current
295
-
296
- Print the name of the current task based on the Herdr workspace or worktree match. Exits with an error if not in a task.
297
-
298
- **Examples**
299
-
300
- ```bash
301
- h task current
302
- ```
303
-
304
- ---
305
-
306
- ### edit
307
-
308
- Open the `tasks.rb` source file in your editor.
309
- ### file
310
-
311
- Manage tracked app files for the current task. Delegates to the app files system.
312
-
313
- **Examples**
314
-
315
- ```bash
316
- h task file ls
317
- h task file add myapp path/to/file.rb
318
- ```
319
-
320
- ---
321
-
322
- ### from
323
-
324
- 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.
325
-
326
- **Examples**
327
-
328
- ```bash
329
- h task from ~/ic_repos/other_repo_base_dir other-task
330
- h task path other-task
331
- h task switch other-task
332
- ```
333
-
334
- Stored task shape:
335
-
336
- ```js
337
- {
338
- name: "other-task",
339
- tree: "/Users/josh/ic_repos/other_repo_base_dir",
340
- session: "other-task"
341
- }
342
- ```
343
-
344
- ---
345
-
346
- ### ls / list
347
-
348
- List all tasks with their worktree, branch, and workspace label. It also shows available worktrees and extra Herdr workspaces.
349
-
350
- A `*` prefix marks the current task. An `@` prefix indicates the Herdr workspace is focused.
351
-
352
- **Options**
353
-
354
- | Flag | Short | Description | Default |
355
- |------|-------|-------------|---------|
356
- | `--tag` | `-t` | Filter by tag (OR logic; repeatable) | all |
357
-
358
- **Examples**
359
-
360
- ```bash
361
- h task ls
362
- h task ls -t urgent
363
- h task ls -t api -t frontend
364
- ```
365
-
366
- ---
367
-
368
- ### path
369
-
370
- Print the absolute path to a task's worktree or app subdirectory. With glob patterns, lists matching files.
371
-
372
- **Options**
373
-
374
- | Flag | Short | Description | Default |
375
- |------|-------|-------------|---------|
376
- | `--task` | `-t` | Task name | current task |
377
- | `--find` | `-f` | Choose task interactively | false |
378
- | `--all` | `-a` | Print path for every task; positional args become prefix filters (OR'd). App / glob args are ignored in this mode. | false |
379
-
380
- **Examples**
381
-
382
- ```bash
383
- h task path
384
- h task path my-feature
385
- h task path my-feature api
386
- h task path my-feature api "**/*.rb"
387
- h task path -a # print worktree path for every task
388
- h task path -a feat bug # tasks whose name starts with "feat" or "bug"
389
- ```
390
-
391
- ---
392
-
393
- ### prune
394
-
395
- 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.
396
-
397
- **Options**
398
-
399
- | Flag | Short | Description | Default |
400
- |------|-------|-------------|---------|
401
- | `--force` | `-f` | Detach missing worktrees | false |
402
-
403
- **Examples**
404
-
405
- ```bash
406
- h task prune # show what would be pruned
407
- h task prune -f # detach missing worktrees, retaining task records
408
- ```
409
-
410
- ---
411
-
412
- ### prs
413
-
414
- List PRs for the current task. Delegates to `h pr`.
415
-
416
- ---
417
-
418
- ### queue
419
-
420
- Run the Claude prompt queue scoped to the current task. All `h queue` subcommands are available. See [h-queue](h-queue.md).
421
-
422
- **Examples**
423
-
424
- ```bash
425
- h task queue ls
426
- h task queue add "Fix the login bug"
427
- h task queue hadd
428
- ```
429
-
430
- ---
431
-
432
- ### resume
433
-
434
- 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.
435
-
436
- **Examples**
437
-
438
- ```bash
439
- h task resume
440
- h task resume my-feature/main
441
- ```
442
-
443
- ---
444
-
445
- ### run
446
-
447
- Run linters, tests, or formatters against changed files for the current task. Delegates to the runner tool system.
448
-
449
- **Examples**
450
-
451
- ```bash
452
- h task run
453
- h task run lint
454
- h task run test ruby
455
- ```
456
-
457
- ---
458
-
459
- ### save
460
-
461
- Read and report the current task's Herdr tab state.
462
-
463
- **Examples**
464
-
465
- ```bash
466
- h task save
467
- ```
468
-
469
- ---
470
-
471
- ### service
472
-
473
- Manage dev services scoped to the current task. All `h service` subcommands are available. See [h-service](h-service.md).
474
-
475
- **Examples**
476
-
477
- ```bash
478
- h task service ls
479
- h task service start my-rails
480
- ```
481
-
482
- ---
483
-
484
- ### name
485
-
486
- 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).
487
-
488
- **Options**
489
-
490
- | Flag | Short | Description | Default |
491
- |------|-------|-------------|---------|
492
- | `--task` | `-t` | Task name | current task |
493
- | `--find` | `-f` | Choose task interactively | false |
494
- | `--all` | `-a` | Print every task's name; positional args become prefix filters (OR'd) | false |
495
-
496
- **Examples**
497
-
498
- ```bash
499
- h task name -a # list every task name
500
- h task name -a feat # only tasks starting with "feat"
501
- paste <(h task name -a) <(h task path -a) # name <-> path mapping
502
- ```
503
-
504
- ---
505
-
506
- ### session
507
-
508
- Print the stored Herdr workspace label for a task. The `session` command name remains for compatibility. With no argument, it opens a fuzzyfind selector.
509
-
510
- **Options**
511
-
512
- | Flag | Short | Description | Default |
513
- |------|-------|-------------|---------|
514
- | `--task` | `-t` | Task name | current task |
515
- | `--find` | `-f` | Choose task interactively | false |
516
- | `--all` | `-a` | Print workspace label for every task; positional args become prefix filters (OR'd) | false |
517
-
518
- **Examples**
519
-
520
- ```bash
521
- h task session
522
- h task session my-feature
523
- h task session -a
524
- ```
525
-
526
- ---
527
-
528
- ### sh
529
-
530
- Open a shell (or run a command) in the current task's worktree. With `--session`, create a new Herdr tab in the specified workspace.
531
-
532
- **Options**
533
-
534
- | Flag | Short | Description | Default |
535
- |------|-------|-------------|---------|
536
- | `--task` | `-t` | Task name | current task |
537
- | `--find` | `-f` | Choose task interactively | false |
538
- | `--session` | `-s` | Run in a new tab in this Herdr workspace | none |
539
-
540
- **Examples**
541
-
542
- ```bash
543
- h task sh
544
- h task sh -t my-feature
545
- h task sh my-feature bundle exec rails s
546
- h task sh -s my-session
547
- ```
548
-
549
- ---
550
-
551
- ### sparse
552
-
553
- Manage sparse checkout for the current task's worktree.
554
-
555
- **Options**
556
-
557
- | Flag | Short | Description |
558
- |------|-------|-------------|
559
- | `--list` | `-l` | List all configured sparse groups |
560
- | `--disable` | `-d` | Disable sparse checkout on current task |
561
-
562
- **Examples**
563
-
564
- ```bash
565
- h task sparse # show active sparse checkout
566
- h task sparse default # apply 'default' group
567
- h task sparse -l # list all groups
568
- h task sparse -d # disable sparse checkout
569
- ```
570
-
571
- ---
572
-
573
- ### start
574
-
575
- 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.
576
-
577
- **Options**
578
-
579
- | Flag | Short | Description | Default |
580
- |------|-------|-------------|---------|
581
- | `--sparse` | `-s` | Apply a sparse checkout group (repeatable) | none |
582
-
583
- **Examples**
584
-
585
- ```bash
586
- h task start my-feature
587
- h task start my-feature api # open in app subdirectory
588
- h task start my-feature -s default
589
- ```
590
-
591
- ---
592
-
593
- ### status / st
594
-
595
- Show detailed info about the current task: name, worktree, path, workspace, and parent (if subtask).
596
-
597
- **Examples**
598
-
599
- ```bash
600
- h task status
601
- h task st
602
- ```
603
-
604
- ---
605
-
606
- ### stop
607
-
608
- Detach a task's worktree association and those of its subtasks. The task records, metadata, workspace labels, and resources remain. The former worktree path becomes a directory reference, and the worktree is available for reuse through `resume`. With no arguments, opens a fuzzyfind selector.
609
-
610
- **Examples**
611
-
612
- ```bash
613
- h task stop my-feature
614
- h task stop
615
- ```
616
-
617
- ---
618
-
619
- ### switch
620
-
621
- Switch to an existing task's Herdr workspace. With no arguments, open a fuzzyfind selector over tasks and workspaces. If the name matches a Herdr workspace rather than a task, focus it directly.
622
-
623
- **Options**
624
-
625
- | Flag | Short | Description | Default |
626
- |------|-------|-------------|---------|
627
- | `--force` | `-f` | Accepted for compatibility; Herdr workspace focus does not require it | false |
628
-
629
- **Examples**
630
-
631
- ```bash
632
- h task switch
633
- h task switch my-feature
634
- h task switch my-feature api
635
- h task switch my-session -f
636
- ```
637
-
638
- ---
639
-
640
- ### tag
641
-
642
- Add tags to a task. With `--edit`, opens a YAML editor for bulk tagging.
643
-
644
- **Options**
645
-
646
- | Flag | Short | Description |
647
- |------|-------|-------------|
648
- | `--edit` | `-e` | Open YAML editor to bulk-tag tasks |
649
-
650
- **Examples**
651
-
652
- ```bash
653
- h task tag my-feature urgent
654
- h task tag my-feature api backend
655
- h task tag -e
656
- ```
657
-
658
- ---
659
-
660
- ### tags
661
-
662
- List all tagged tasks, grouped by tag.
663
-
664
- **Examples**
665
-
666
- ```bash
667
- h task tags
668
- ```
669
-
670
- ---
671
-
672
- ### todo
673
-
674
- Manage todo items scoped to the current task. See [h-todo](h-todo.md) for the full todo system.
675
-
676
- **Subcommands:** `ls`, `add`, `rm`, `start`, `done`, `skip`, `search`
677
-
678
- **Examples**
679
-
680
- ```bash
681
- h task todo
682
- h task todo add "Fix the login bug"
683
- h task todo add -t urgent "Refactor auth"
684
- h task todo done 0
685
- ```
686
-
687
- ---
688
-
689
- ### tree
690
-
691
- Print the worktree name for a task. With no argument, opens a fuzzyfind selector.
692
-
693
- **Options**
694
-
695
- | Flag | Short | Description | Default |
696
- |------|-------|-------------|---------|
697
- | `--task` | `-t` | Task name | current task |
698
- | `--find` | `-f` | Choose task interactively | false |
699
- | `--all` | `-a` | Print tree name for every task; positional args become prefix filters (OR'd) | false |
700
-
701
- **Examples**
702
-
703
- ```bash
704
- h task tree
705
- h task tree my-feature
706
- h task tree -a
707
- h task tree -a feat bug
708
- ```
709
-
710
- ---
711
-
712
- ### untag
713
-
714
- Remove tags from a task. With no tags, removes all tags.
715
-
716
- **Examples**
717
-
718
- ```bash
719
- h task untag my-feature urgent
720
- h task untag my-feature # remove all tags
721
- ```
722
-
723
- ---
724
-
725
- ### wtrees
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` |
726
189
 
727
- List worktrees for the current task. Delegates to `h wtree`.
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`.
728
191
 
729
- ---
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.
data/docs/h.md CHANGED
@@ -29,8 +29,7 @@ These subcommands are defined directly in `exe/h` or loaded from `lib/`:
29
29
  | [`h run`](h-run.md) | Run dev tools (linters, formatters, tests) against changed files | `lib/hiiro/runner_tool.rb` |
30
30
  | [`h service`](h-service.md) | Dev service management with Herdr, env files, and service groups | `lib/hiiro/service_manager.rb` |
31
31
  | `h setup` | Install plugins and bin scripts to `~/bin` | `exe/h` |
32
- | [`h subtask`](h-subtask.md) | Subtask management scoped to the current parent task | `lib/hiiro/tasks.rb` |
33
- | [`h task`](h-task.md) | Task management — worktree + Herdr workspace pairs, including external worktrees | `lib/hiiro/tasks.rb` |
32
+ | [`h task`](h-task.md) | Symlink to `t`: task records, todos, worktrees, and Herdr workspaces | `lib/hiiro/task_cli.rb` |
34
33
  | `h version` | Print installed hiiro version (`-a` for all rbenv versions) | `exe/h` |
35
34
 
36
35
  ## External subcommands
data/docs/t.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # t command reference
2
2
 
3
- Reference for the repository's `bin/t` executable and `bin/tt` todo shortcut.
3
+ Reference for the `t` executable and `tt` todo shortcut.
4
4
 
5
- `t` manages task records, next actions, todos, waiting-on information, documents, resource references, and task-associated Herdr terminals. It does not create Git worktrees or configure sparse checkout. Those operations belong to the separate `h task` commands.
5
+ `t` manages task records, next actions, todos, waiting-on information, documents, resource references, git worktrees, and task-associated Herdr terminals. `h task` is a symlink to the same executable.
6
6
 
7
- `bin/t` contains the command declarations and `TaskCommands` helpers. `~/bin/t` and `~/bin/tt` are symlinks to the repository launchers. Both resolve their real paths and put the repository library first on Ruby's load path. Installing the Hiiro gem does not install these launchers.
7
+ `exe/t` and `exe/tt` are gem executables installed with Hiiro. Each is a `Hiiro.run` launcher that calls `Hiiro::TaskCli.setup` or `Hiiro::TaskCli.setup_todo`; the command declarations and `Hiiro::TaskCli::Commands` helpers live in `lib/hiiro/task_cli.rb`. `bin/t` and `bin/tt` are symlinks to the `exe/` files. Expected failures raise `Hiiro::Error` and print only `ERROR: message` on stderr with exit status 1.
8
8
 
9
9
  ## Syntax and task selection
10
10
 
@@ -18,7 +18,7 @@ tt TASK [COMMAND...]
18
18
 
19
19
  Uppercase words are values to supply. Square brackets indicate optional arguments, and `...` means multiple words or arguments.
20
20
 
21
- Bare `t` lists every task, including active, waiting, done, and archived records. It does not select from context. `t TASK` shows the selected task. Only exact root `t help` displays generic usage and native scoped help without task lookup. Other first words are task references, including `new`, `show`, `edit`, `pry`, and `he`. There are no root `add`, `rm`, `list`, `ls`, `new`, or `show` actions.
21
+ Bare `t`, `t ls`, and `t list` list every task, including active, waiting, done, and archived records, in aligned columns: name with the open todo count in parentheses (omitted when zero), status, then any `next:` and `waiting:` text. Open todos are those not done or skipped. The listing does not select from context. `t TASK` shows the selected task. Only exact root `t help` displays generic usage and native scoped help without task lookup. Other first words are task references, including `new`, `show`, `edit`, `pry`, and `he`. Only `help`, `ls`, and `list` are reserved root words; a task named `ls` or `list` must be reached by a unique prefix such as `t lis`. There are no root `add`, `rm`, `new`, or `show` actions.
22
22
 
23
23
  Named references prefer an exact task name, then a unique case-sensitive prefix. Ambiguous prefixes fail. Unknown names fail except for `t NAME new` and `t NAME todo add TEXT...`. Explicit `new` creates exactly `NAME`, without resolving it as a prefix of another task. Help never creates a task.
24
24
 
@@ -115,13 +115,21 @@ Options are scoped to commands, not universally available. `TASK` may be a name,
115
115
 
116
116
  | Command | Behavior |
117
117
  |---|---|
118
- | `t` | Lists all tasks alphabetically, regardless of status or context |
118
+ | `t`, `t ls`, or `t list` | Lists all tasks alphabetically with open todo counts, regardless of status or context |
119
119
  | `t TASK` or `t TASK show` | Shows status, home, next action, todos, waiting text, code directory, workspace label, resources, and home Markdown documents |
120
120
  | `t TASK current` | Prints the resolved name; named references also save the fallback without changing focus |
121
121
  | `t NAME new` | Creates an active task and notes home; an exact existing name preserves its record and ensures the home exists |
122
122
  | `t TASK next [TEXT...]` | Stores text, prints it with no text, or removes it with `--clear` |
123
123
  | `t TASK waiting [TEXT...]` | Stores blocking text and sets waiting status; prints with no text; clears with `--clear` |
124
124
  | `t TASK status [STATE]` | Prints status or sets `active`, `waiting`, `done`, or `archived` |
125
+ | `t TASK path` | Prints the start directory: primary directory, worktree, or task home |
126
+ | `t TASK branch` | Prints the worktree's git branch, or `(detached)` |
127
+ | `t TASK sh [CMD...]` | Changes to the start directory and execs a shell or the command |
128
+ | `t TASK cd` | Sends `cd` to the current Herdr pane (requires `HERDR_PANE_ID`) |
129
+ | `t TASK tree` | Prints the worktree name and path; fails when the task has none |
130
+ | `t NAME tree new [--app APP] [--sparse GROUP]` | Creates the task if needed, creates or reuses a worktree under `~/work/NAME/main` (or `~/work/parent/child` for a subtask), records it, and opens the workspace when Herdr is running |
131
+ | `t TASK tree rm` | Detaches the worktree from the task and its subtasks, keeping the directory and registering it as a directory resource |
132
+ | `t TASK tree resume [TREE]` | Attaches an unassigned worktree by name, or via fuzzyfind with no name |
125
133
  | `t TASK done` | Sets status to done |
126
134
  | `t TASK archive` | Sets status to archived |
127
135
 
@@ -415,9 +423,11 @@ Hiiro also initializes its database and records CLI invocations. Reading task da
415
423
 
416
424
  | Source | Responsibility |
417
425
  |---|---|
418
- | `bin/t` | Task-scoped commands, resources, documents, and Herdr actions; target of `~/bin/t` |
419
- | `bin/tt` | Delegates to the task todo scope |
426
+ | `exe/t`, `exe/tt` | Gem executables; `Hiiro.run` launchers over `Hiiro::TaskCli` (`bin/t`, `bin/tt` are symlinks) |
427
+ | `lib/hiiro/task_cli.rb` | `Hiiro::TaskCli.setup`/`setup_todo` and the `Commands` module: task-scoped commands, resources, documents, and Herdr actions |
428
+ | `lib/hiiro/current_task.rb` | Shared current-task resolution (Herdr workspace, working directory, saved pin) used by `TaskScope` and `Environment#task` |
420
429
  | `lib/hiiro/task_scope.rb` | Named/current/orphan reference resolution and cached task context |
430
+ | `lib/hiiro/tasks.rb` | `TaskManager#create_tree` worktree creation shared with `t TASK tree new` |
421
431
  | `lib/hiiro/task_sessions.rb` | Native AI launch/resume dispatch and running-pane focus |
422
432
  | `lib/hiiro/task_record.rb` | Shared records, states, home naming, and resource identity |
423
433
  | `lib/hiiro/todo.rb` | Shared `TodoItem` rows and full-task-name association |
data/docs/why-t.md CHANGED
@@ -73,7 +73,7 @@ That saves the explanation and changes the task's status to `waiting`. The next
73
73
  }
74
74
  ```
75
75
 
76
- Bare `t` lists every task and status, including done and archived work. Active and waiting rows show their next-action and blocker text, so you can review what needs attention without opening every terminal.
76
+ Bare `t` (or `t ls` / `t list`) lists every task and status, including done and archived work. Each name carries its open todo count, such as `prez (3)`, and active and waiting rows show their next-action and blocker text, so you can review what needs attention without opening every terminal.
77
77
 
78
78
  When the answer arrives:
79
79
 
@@ -303,4 +303,4 @@ Start with task names and useful next actions. Add documents, links, and termina
303
303
 
304
304
  ## Read next
305
305
 
306
- [The complete t command reference](t.md) covers every subcommand, option, alias, state transition, storage location, and Herdr/worktree side effect. The canonical implementation is the repository's `bin/t`, with `~/bin/t` as its symlink. Gem installation does not install the launcher.
306
+ [The complete t command reference](t.md) covers every subcommand, option, alias, state transition, storage location, and Herdr/worktree side effect. The implementation is `Hiiro::TaskCli` in `lib/hiiro/task_cli.rb`, launched by the `t` and `tt` gem executables in `exe/`.
data/exe/h CHANGED
@@ -97,6 +97,7 @@ Hiiro.run(*ARGV, cwd: Dir.pwd, tasks: true) do
97
97
  'github' => %w[pr],
98
98
  'claude' => %w[claude],
99
99
  'hiiro' => %w[bin plugin],
100
+ 'task' => %w[task],
100
101
  'other' => %w[app bg config link misc project todo],
101
102
  }
102
103