hiiro 0.1.367 → 0.1.368

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/why-t.md CHANGED
@@ -44,13 +44,13 @@ tt fix-checkout add Inspect --help output
44
44
  t fix-checkout todo
45
45
  ```
46
46
 
47
- Task display and todo listing show every todo with its ID, status, and text. To remove one, use its displayed ID, such as `t fix-checkout todo rm 42`. The ID must belong to that scope. Adding or removing todos does not change the task's next action or status, and `t` does not choose the next todo for you.
47
+ Task display and todo listing show every todo with its ID, status, and text. To remove one, use its displayed ID, such as `t todo rm fix-checkout 42`, or print just its text with `t todo show 42`. The ID must belong to that scope. Adding or removing todos does not change the task's next action or status, and `t` does not choose the next todo for you.
48
48
 
49
- Task references prefer an exact name, then a unique case-sensitive prefix. Ambiguous prefixes fail. If `todo add` finds no task, it creates one with the usual name and notes-home rules before adding the item. Other commands never create unknown tasks except explicit `t NAME new`, which creates that exact name rather than resolving a prefix.
49
+ Task references prefer an exact name, then a unique case-sensitive prefix. Ambiguous prefixes fail. A first word that names no task is treated as payload for the current task, so `t todo add fix build` never creates a task named `fix`. Only `t new NAME` creates tasks, and it creates that exact name rather than resolving a prefix.
50
50
 
51
- `tt TASK ...` delegates to `t TASK todo ...`. Bare `tt` lists current-task todos, and `tt help` shows todo help. Use `t - todo` or `tt -` to list orphan todos, with `add` and `rm` in that scope. `-` is not a task and works only for todos.
51
+ `tt ...` is `t todo ...`. Bare `tt` lists current-task todos, and `tt help` shows todo help. Use `t todo -` or `tt add - TEXT` for orphan todos. `-` is not a task and works only for todos.
52
52
 
53
- Every word after `add` is literal text, including flags and `--`, except that leading `add -h` or `add --help` shows help. Empty text fails before any task is created.
53
+ Every word after the task in `add` is literal text, including flags and `--`, except a leading `-h` or `--help`, which shows help. Empty text fails.
54
54
 
55
55
  Todos share the existing database table with `h todo`. `t` does not rewrite `todo.yml` or change `h task` behavior. Keep the longer investigation in a document.
56
56
 
@@ -205,26 +205,24 @@ The workspace identifies running terminals, not a separate persisted-session sto
205
205
 
206
206
  ## Context can save typing without making scripts guess
207
207
 
208
- The first argument is always the task reference. `t TASK` shows the task, and `t TASK COMMAND...` runs a command in that task's scope. Only exact root `t help` is special: it prints usage and native scoped help without task lookup. Names such as `new`, `show`, `edit`, and `he` remain task names at the root.
209
-
210
- Use `.` when the calling Herdr workspace, directory, or saved fallback identifies the task:
208
+ The command comes first, and the task is optional: `t show fix-checkout` names it, `t show` uses the current task. A first word that names a task, exactly or by unique prefix, is the task; anything else is payload for the current task, the same rule the old `h task` commands used. `-t TASK` forces a task, `-f` picks one with a fuzzy finder, and `.` stands for the current task when a payload could look like a name:
211
209
 
212
210
  ```bash
213
- t . current
214
- t .
215
- t . next
216
- t . next 'Check the new test against the original failing payload'
211
+ t current
212
+ t show
213
+ t next
214
+ t next . 'Check the new test against the original failing payload'
217
215
  ```
218
216
 
219
- A named reference bypasses context lookup. For `.`, the calling Herdr workspace wins over a conflicting current directory. The directory is next, followed by the saved task. Ambiguous matches and invalid, stale, or conflicting Herdr IDs are errors.
217
+ The calling Herdr workspace wins over a conflicting current directory. The directory is next, followed by the saved task. Ambiguous matches and invalid, stale, or conflicting Herdr IDs are errors.
220
218
 
221
219
  You can set that fallback without moving terminal focus:
222
220
 
223
221
  ```bash
224
- t fix-checkout current
222
+ t use fix-checkout
225
223
  ```
226
224
 
227
- `t . current` only prints the selected name. Reads and workspace opens through `.` leave the saved fallback unchanged. A deleted saved task causes an error if selection reaches it. Bare `t` always lists all tasks rather than selecting one.
225
+ `t current` only prints the selected name. Reads leave the saved fallback unchanged; `t switch NAME` saves it after a successful switch. A deleted saved task causes an error if selection reaches it. Bare `t` always lists all tasks rather than selecting one.
228
226
 
229
227
  ## An agent can leave you a useful place to resume
230
228
 
@@ -284,16 +282,16 @@ You do not need to use every command for this to pay off.
284
282
 
285
283
  | Moment | Useful command | What it gives you |
286
284
  |---|---|---|
287
- | You capture a new piece of work | `t TASK new` | An exact named record and notes home |
288
- | You capture another step | `tt TASK add 'Compare the retry settings'` | A todo without replacing the next action; creates a task if no name or prefix matches |
285
+ | You capture a new piece of work | `t new TASK` | An exact named record and notes home |
286
+ | You capture another step | `tt add 'Compare the retry settings'` | A todo on the current task without replacing the next action |
289
287
  | You decide what to work on | `t` | Every task and status, with next-action and blocker text |
290
- | You resume a task | `t TASK` | The context you recorded for it |
291
- | You want a fallback outside task directories and Herdr | `t TASK current` | Saved selection without moving terminal focus |
292
- | You need its terminals | `t TASK switch` | The associated workspace and a saved fallback after success |
293
- | You want a fresh AI session | `t TASK omp` | A new focused tab running the native tool |
294
- | You are about to switch away | `t TASK next 'The next concrete action'` | An instruction for your next session |
295
- | Someone else is blocking progress | `t TASK waiting 'Who or what I need'` | A waiting state and explanation |
296
- | The work is complete | `t TASK done` | A done status without deleting the supporting context |
288
+ | You resume a task | `t show TASK` | The context you recorded for it |
289
+ | You want a fallback outside task directories and Herdr | `t use TASK` | Saved selection without moving terminal focus |
290
+ | You need its terminals | `t switch TASK` | The associated workspace and a saved fallback after success |
291
+ | You want a fresh AI session | `t omp TASK` | A new focused tab running the native tool |
292
+ | You are about to switch away | `t next 'The next concrete action'` | An instruction for your next session |
293
+ | Someone else is blocking progress | `t waiting 'Who or what I need'` | A waiting state and explanation |
294
+ | The work is complete | `t done TASK` | A done status without deleting the supporting context |
297
295
 
298
296
  Start with task names and useful next actions. Add documents, links, and terminal organization when they make a particular task easier to resume.
299
297
 
@@ -0,0 +1,47 @@
1
+ # Hiiro task actions for Herdr. Install with `h herdr install`, which copies this
2
+ # directory to ~/.config/hiiro/herdr-plugin and links it. Every action opens the
3
+ # popup pane with HIIRO_HERDR_ACTION set; `h herdr popup` does the work there.
4
+ id = "hiiro"
5
+ name = "Hiiro tasks"
6
+ version = "0.1.0"
7
+ min_herdr_version = "0.7.4"
8
+ description = "Fuzzy task switcher, todo capture, and task shell/editor popups backed by the t CLI."
9
+ platforms = ["linux", "macos"]
10
+
11
+ [[actions]]
12
+ id = "switch"
13
+ title = "Switch to task…"
14
+ contexts = ["workspace"]
15
+ command = ["h", "herdr", "action", "switch"]
16
+
17
+ [[actions]]
18
+ id = "todo-add"
19
+ title = "Add todo to task…"
20
+ contexts = ["workspace"]
21
+ command = ["h", "herdr", "action", "todo-add"]
22
+
23
+ [[actions]]
24
+ id = "todos"
25
+ title = "Copy a todo from the current task…"
26
+ contexts = ["workspace"]
27
+ command = ["h", "herdr", "action", "todos"]
28
+
29
+ [[actions]]
30
+ id = "shell"
31
+ title = "Shell in the current task directory"
32
+ contexts = ["workspace"]
33
+ command = ["h", "herdr", "action", "shell"]
34
+
35
+ [[actions]]
36
+ id = "nvim"
37
+ title = "nvim in the current task notes"
38
+ contexts = ["workspace"]
39
+ command = ["h", "herdr", "action", "nvim"]
40
+
41
+ [[panes]]
42
+ id = "popup"
43
+ title = "hiiro"
44
+ placement = "popup"
45
+ width = "70%"
46
+ height = "70%"
47
+ command = ["h", "herdr", "popup"]
@@ -66,12 +66,12 @@ class Hiiro
66
66
  end
67
67
 
68
68
  def pinned_task
69
- raise Error, 'No current task; supply a task name or run t TASK current' unless @pin
69
+ raise Error, 'No current task; supply a task name or run t use NAME' unless @pin
70
70
 
71
71
  saved = PinRecord.find_key('t', 'current_task')
72
- raise Error, 'No current task; supply a task name or run t TASK current' unless saved
72
+ raise Error, 'No current task; supply a task name or run t use NAME' unless saved
73
73
 
74
- TaskRecord[saved.value] || raise(Error, 'Saved task no longer exists; run t TASK current')
74
+ TaskRecord[saved.value] || raise(Error, 'Saved task no longer exists; run t use NAME')
75
75
  end
76
76
 
77
77
  def workspace_label(task)