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.
Files changed (2) hide show
  1. package/README.md +82 -54
  2. 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
- ```md
369
+ ````md
370
370
  ### HZL task ledger (external task tracking)
371
371
 
372
- HZL is an external task database. Use it whenever external tracking would help clarity, handoff, or auditability.
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
- **Prefer using HZL when:**
377
- - Work may outlive this session or is likely to be paused/resumed
378
- - You want a durable record of decisions, progress, or ownership
379
- - You expect handoff or review by another agent/person
380
- - The user asks to track work in HZL
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
- **You can skip HZL when:**
384
- - The work is small, clearly scoped, and will be completed immediately
385
- - The user asks for a quick one-off answer or tiny change
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 feel tempted to make a multi-step plan or there is any chance you will not finish in this session, use HZL.
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** = stable container (one per repo). Check `hzl project list` before creating.
393
- - **Task** = top-level work item (often a feature). Use `--depends-on` to sequence separate tasks.
394
- - **Subtask** = breakdown of a task into parts (`--parent <id>`). Max 1 level of nesting.
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
- **⚠️ Anti-pattern: project sprawl**
391
+ **Anti-pattern: project sprawl**
397
392
  ```bash
398
- hzl project create "query-perf" # Feature project
393
+ hzl project create "query-perf" # Wrong: feature is not a project
399
394
  ```
400
- Features are parent tasks, not projects:
395
+ Features are parent tasks:
401
396
  ```bash
402
- hzl task add "Query perf fixes" -P myrepo # Parent task
403
- hzl task add "Fix N+1" --parent <parent-id> # Subtask
404
- ```
405
-
406
- **Workflow:**
407
- 1. `hzl project list` — **Always check first. Reuse existing repo project.**
408
- 2. Only create a project for a NEW repo (not a feature).
409
- 3. For multi-step work: create parent task, then subtasks with `--parent`.
410
- 4. Claim before work, checkpoint progress, complete when done.
411
- 5. Use `--json` for scripted output.
412
-
413
- **Task lifecycle:**
414
- - New tasks start in `backlog` (not claimable)
415
- - To work: `set-status <id> ready` → `claim <id>` → work → `complete <id>`
416
- - Or create ready: `hzl task add "..." -P project -s ready`
417
-
418
- **Quick commands:**
419
- | Action | Command |
420
- |--------|---------|
421
- | Create (ready to work) | `hzl task add "title" -P project -s ready` |
422
- | Create and claim | `hzl task add "title" -P project -s in_progress --assignee <name>` |
423
- | Create (planning) | `hzl task add "title" -P project` |
424
- | Claim (start work) | `hzl task claim <id>` (or `start`) |
425
- | Complete | `hzl task complete <id>` |
426
-
427
- **⚠️ DESTRUCTIVE - Never run without explicit user request:**
428
- - `hzl task prune` — **PERMANENTLY DELETES** old done/archived tasks. No undo.
429
- - **AI agents: NEVER run prune unless the user explicitly asks to delete old tasks**
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
- ```txt
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
- ```txt
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.21.0",
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.21.0",
64
- "hzl-web": "1.21.0"
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",