* Render a leaf command's full path (group + leaf), e.g. `test run` / * `auth whoami`, by walking parents up to (but not including) the root program.
(cmd: Command)
| 103 | * `auth whoami`, by walking parents up to (but not including) the root program. |
| 104 | */ |
| 105 | function commandPathOf(cmd: Command): string { |
| 106 | const names: string[] = []; |
| 107 | let cur: Command | null = cmd; |
| 108 | while (cur && cur.parent) { |
| 109 | names.unshift(cur.name()); |
| 110 | cur = cur.parent; |
| 111 | } |
| 112 | return names.join(' '); |
| 113 | } |
| 114 | |
| 115 | // Best-effort onboarding nudge (see lib/skill-nudge.ts): when a configured |
| 116 | // caller drives a verify-loop command in a project with no installed skill, |