fix(cli): align workflow list with thread start via parent traversal
CI / check (pull_request) Successful in 3m12s

discoverProjectWorkflows() now searches .workflow/ in ancestor directories,
matching findWorkflowInParents() behavior used by `uwf thread start`. Also
documents project-local .workflow/ auto-discovery in usage, cli, and
workflow-authoring references.

Fixes #162
This commit is contained in:
2026-06-07 15:08:36 +00:00
parent 2f7609683a
commit 7db43005de
7 changed files with 369 additions and 23 deletions
@@ -0,0 +1,19 @@
---
"@united-workforce/cli": patch
"@united-workforce/util": patch
---
fix(cli): align `uwf workflow list` with `uwf thread start` parent traversal; document `.workflow/` auto-discovery (#162)
`discoverProjectWorkflows()` now walks from `cwd` up through parent directories
looking for the nearest `.workflow/` (or legacy `.workflows/`), mirroring
`findWorkflowInParents()` used by `uwf thread start`. Previously, `uwf workflow
list` only inspected the exact `cwd` and returned `[]` when run from any
subdirectory, even though `uwf thread start <name>` succeeded from the same
location. The two commands now agree on what is discoverable.
The `@united-workforce/util` reference strings (`generateUsageReference`,
`generateCliReference`, `generateWorkflowAuthoringReference`) are updated to
document project-local `.workflow/` auto-discovery and recommend it as the
primary placement strategy — `uwf workflow add` registration is only needed for
global, cwd-independent workflows.