hzl-cli 1.21.0 → 1.22.1
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.
- package/README.md +82 -54
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -366,68 +366,96 @@ If your coding agent supports an instruction file (for example `CLAUDE.md`, `AGE
|
|
|
366
366
|
|
|
367
367
|
<!-- START [code:md] docs/snippets/agent-policy.md -->
|
|
368
368
|
<!-- ⚠️ DO NOT EDIT - Auto-generated from docs/snippets/agent-policy.md -->
|
|
369
|
-
|
|
369
|
+
````md
|
|
370
370
|
### HZL task ledger (external task tracking)
|
|
371
371
|
|
|
372
|
-
HZL is an external task database. Use it
|
|
373
|
-
Multi-session or multi-agent work are common reasons to use HZL, not requirements.
|
|
374
|
-
Use HZL for single-session, single-agent work when the task is non-trivial.
|
|
372
|
+
HZL is an external task database. Use it when external tracking helps clarity, handoff, or auditability.
|
|
375
373
|
|
|
376
|
-
**
|
|
377
|
-
- Work
|
|
378
|
-
- You want
|
|
379
|
-
-
|
|
380
|
-
-
|
|
381
|
-
- The task is non-trivial (multiple steps, ~30+ minutes, or risky changes)
|
|
374
|
+
**Use HZL when:**
|
|
375
|
+
- Work has multiple steps or may not finish this session
|
|
376
|
+
- You want durable record of progress or ownership
|
|
377
|
+
- Handoff or review expected
|
|
378
|
+
- Task is non-trivial (~30+ min or risky changes)
|
|
382
379
|
|
|
383
|
-
**
|
|
384
|
-
-
|
|
385
|
-
-
|
|
380
|
+
**Skip HZL when:**
|
|
381
|
+
- Small, clearly scoped work completed immediately
|
|
382
|
+
- Quick one-off answer or tiny change
|
|
386
383
|
|
|
387
|
-
**Rule of thumb:** If you
|
|
388
|
-
|
|
389
|
-
Example: "Investigate failing tests and fix root cause" -> use HZL because it likely involves multiple subtasks, even if you expect to finish within a session.
|
|
384
|
+
**Rule of thumb:** If you're tempted to make a multi-step plan, use HZL.
|
|
390
385
|
|
|
391
386
|
**Structure:**
|
|
392
|
-
- **Project** =
|
|
393
|
-
- **Task** =
|
|
394
|
-
- **Subtask** = breakdown
|
|
387
|
+
- **Project** = repo name. One per repo. Always `hzl project list` first.
|
|
388
|
+
- **Task** = feature or work item.
|
|
389
|
+
- **Subtask** = breakdown (`--parent <id>`). Max 1 level.
|
|
395
390
|
|
|
396
|
-
|
|
391
|
+
**Anti-pattern: project sprawl**
|
|
397
392
|
```bash
|
|
398
|
-
hzl project create "query-perf" #
|
|
393
|
+
hzl project create "query-perf" # Wrong: feature is not a project
|
|
399
394
|
```
|
|
400
|
-
Features are parent tasks
|
|
395
|
+
Features are parent tasks:
|
|
401
396
|
```bash
|
|
402
|
-
hzl task add "Query perf
|
|
403
|
-
hzl task add "Fix N+1" --parent <parent-id>
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
397
|
+
hzl task add "Query perf" -P myrepo # Parent task
|
|
398
|
+
hzl task add "Fix N+1" --parent <parent-id> # Subtask
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
**Setup:**
|
|
404
|
+
```bash
|
|
405
|
+
hzl project list # Always check first
|
|
406
|
+
hzl project create <repo-name> # Only if needed
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
**Adding work:**
|
|
410
|
+
```bash
|
|
411
|
+
hzl task add "Feature X" -P myrepo -s ready # Ready to claim
|
|
412
|
+
hzl task add "Subtask A" --parent <id> # Subtask
|
|
413
|
+
hzl task add "Subtask B" --parent <id> --depends-on <subtask-a-id> # With dependency
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
**Working on a task:**
|
|
417
|
+
```bash
|
|
418
|
+
hzl task next -P myrepo # Next available task
|
|
419
|
+
hzl task next --parent <id> # Next subtask of parent
|
|
420
|
+
hzl task next -P myrepo --claim # Find and claim in one step
|
|
421
|
+
hzl task claim <id> # Claim specific task
|
|
422
|
+
hzl task checkpoint <id> "milestone X" # Notable progress or before pausing
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
**Changing status:**
|
|
426
|
+
```bash
|
|
427
|
+
hzl task set-status <id> ready # Make claimable (from backlog)
|
|
428
|
+
hzl task set-status <id> backlog # Move back to planning
|
|
429
|
+
```
|
|
430
|
+
Statuses: `backlog` → `ready` → `in_progress` → `done` (or `blocked`)
|
|
431
|
+
|
|
432
|
+
**When blocked:**
|
|
433
|
+
```bash
|
|
434
|
+
hzl task block <id> --comment "Waiting for API keys from DevOps"
|
|
435
|
+
hzl task unblock <id> # When resolved
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**Finishing work:**
|
|
439
|
+
```bash
|
|
440
|
+
hzl task comment <id> "Implemented X, tested Y" # Optional: final notes
|
|
441
|
+
hzl task complete <id>
|
|
442
|
+
|
|
443
|
+
# After completing a subtask, check parent:
|
|
444
|
+
hzl task show <parent-id> --json # Any subtasks left?
|
|
445
|
+
hzl task complete <parent-id> # If all done, complete parent
|
|
430
446
|
```
|
|
447
|
+
|
|
448
|
+
**Troubleshooting:**
|
|
449
|
+
| Error | Fix |
|
|
450
|
+
|-------|-----|
|
|
451
|
+
| "not claimable (status: backlog)" | `hzl task set-status <id> ready` |
|
|
452
|
+
| "Cannot complete: status is X" | Claim first: `hzl task claim <id>` |
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
**DESTRUCTIVE - Never run without explicit user request:**
|
|
457
|
+
- `hzl task prune` — **PERMANENTLY DELETES** old done/archived tasks. No undo.
|
|
458
|
+
````
|
|
431
459
|
<!-- END [code:md] docs/snippets/agent-policy.md -->
|
|
432
460
|
|
|
433
461
|
That snippet is intentionally concise. The goal is clear triggers and structure, not ceremony.
|
|
@@ -487,9 +515,9 @@ Copy/paste this into an OpenClaw chat (single prompt):
|
|
|
487
515
|
|
|
488
516
|
<!-- START [code:txt] docs/snippets/openclaw-setup-prompt.md -->
|
|
489
517
|
<!-- ⚠️ DO NOT EDIT - Auto-generated from docs/snippets/openclaw-setup-prompt.md -->
|
|
490
|
-
|
|
518
|
+
````txt
|
|
491
519
|
Install HZL from https://github.com/tmchow/hzl and run hzl init. Install the HZL skill from https://www.clawhub.ai/tmchow/hzl. Then append the HZL policy from https://raw.githubusercontent.com/tmchow/hzl/main/docs/openclaw/tools-prompt.md to my TOOLS.md.
|
|
492
|
-
|
|
520
|
+
````
|
|
493
521
|
<!-- END [code:txt] docs/snippets/openclaw-setup-prompt.md -->
|
|
494
522
|
|
|
495
523
|
### Manual setup
|
|
@@ -519,7 +547,7 @@ To keep both the HZL CLI and your OpenClaw skill up to date, copy/paste this pro
|
|
|
519
547
|
|
|
520
548
|
<!-- START [code:txt] docs/snippets/upgrade-hzl-prompt.md -->
|
|
521
549
|
<!-- ⚠️ DO NOT EDIT - Auto-generated from docs/snippets/upgrade-hzl-prompt.md -->
|
|
522
|
-
|
|
550
|
+
````txt
|
|
523
551
|
Create a script at scripts/upgrade-hzl.sh (in your workspace) that upgrades both the hzl-cli npm package and the hzl skill from ClawHub. The script should:
|
|
524
552
|
|
|
525
553
|
1. Run `npm install -g hzl-cli@latest`
|
|
@@ -527,7 +555,7 @@ Create a script at scripts/upgrade-hzl.sh (in your workspace) that upgrades both
|
|
|
527
555
|
3. Print the installed version after each step
|
|
528
556
|
|
|
529
557
|
Make it executable. In the future when I say "upgrade hzl", run this script.
|
|
530
|
-
|
|
558
|
+
````
|
|
531
559
|
<!-- END [code:txt] docs/snippets/upgrade-hzl-prompt.md -->
|
|
532
560
|
|
|
533
561
|
After running this once, just say "upgrade hzl" to OpenClaw to run the script. Consider adding a cron job to have OpenClaw run the upgrade automatically on a schedule.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hzl-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"description": "CLI for HZL - External task ledger for coding agents and OpenClaw.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"libsql": "^0.5.0",
|
|
61
61
|
"commander": "^14.0.0",
|
|
62
62
|
"zod": "^3.23.8",
|
|
63
|
-
"hzl-core": "1.
|
|
64
|
-
"hzl-web": "1.
|
|
63
|
+
"hzl-core": "1.22.1",
|
|
64
|
+
"hzl-web": "1.22.1"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/better-sqlite3": "^7.6.13",
|