feat(clitree): new package - command-tree-to-JSON walker; export passthrough Usage prefix #95
Labels
No labels
burndown-2026-06
sunday-sprint
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/cli-guard#95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source:
cmd/coily/tree_json.go-treeNode, the tree walker,parseTreeJSONRequest, and a duplicated constpassthroughUsagePrefix = "Pass-through to ".What it does: walks a urfave/cli v3 command tree into a serializable
treeNode(skips hidden andhelp), tags passthrough leaves with their underlying binary by sniffing the Usage prefix, supports subtree pathing, and emits indented JSON. Includes a leading-only--tree --json [path]argv guard that refuses to hijack a passthrough's verbatim argv.Companion fix (do this as part of the issue):
tree_json.gore-declarespassthroughUsagePrefixand keeps it in sync withpassthrough.Command's stamp via a guard test (TestPassthroughUsagePrefixMatchesCLIGuard). Export that constant frompassthroughand consume it here - kills the cross-repo drift seam outright.Consumer seams to parameterize: the synthetic root name (
"coily") ->rootName string; accept a single[]*cli.Command(or a root*cli.Command) instead of coily'sbuiltIns/execsplit. The unusedrepoExecResultarg drops out.Suggested home (pre-refactor): new
clitreepackage, paired withpassthrough.Done when:
godoc-current.txtregenerated (scripts/check-godoc-current.sh --update)make testgreen both sidesclosesthis issueRelated: unblocks the capability-index renderer in cli-guard#100 (it walks the same
treeNode).Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag:
burndown-2026-06.