@unbrained/pm-cli 2026.9.19 → 2026.9.21

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 (149) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +954 -924
  3. package/dist/cli/main.d.ts +10 -76
  4. package/dist/cli/main.js +1 -2
  5. package/dist/cli/register-operations.js +1 -1
  6. package/dist/cli/runtime/activation.d.ts +51 -0
  7. package/dist/cli/runtime/activation.js +2 -0
  8. package/dist/cli/runtime/invocation-options.d.ts +41 -0
  9. package/dist/cli/runtime/invocation-options.js +2 -0
  10. package/dist/cli/runtime/selection.d.ts +29 -0
  11. package/dist/cli/runtime/selection.js +2 -0
  12. package/dist/cli/runtime/telemetry-outcome.d.ts +20 -0
  13. package/dist/cli/runtime/telemetry-outcome.js +2 -0
  14. package/dist/cli-bundle/bundle-manifest.json +150 -150
  15. package/dist/cli-bundle/chunks/{chunk-QA4GUEKJ.js → chunk-2QLXN6HZ.js} +46 -46
  16. package/dist/cli-bundle/chunks/chunk-2UNYUB4A.js +2 -0
  17. package/dist/cli-bundle/chunks/chunk-4SI67A2F.js +8 -0
  18. package/dist/cli-bundle/chunks/chunk-7YUYLYJQ.js +6 -0
  19. package/dist/cli-bundle/chunks/{chunk-7CN53F4S.js → chunk-FBWAECBI.js} +3 -3
  20. package/dist/cli-bundle/chunks/chunk-GRHSNUQO.js +20 -0
  21. package/dist/cli-bundle/chunks/chunk-HAFSMFJK.js +3 -0
  22. package/dist/cli-bundle/chunks/chunk-JBJUOOJI.js +238 -0
  23. package/dist/cli-bundle/chunks/chunk-K7RWRJLT.js +29 -0
  24. package/dist/cli-bundle/chunks/chunk-NHRB3L5T.js +2 -0
  25. package/dist/cli-bundle/chunks/{chunk-CCLWCESZ.js → chunk-QZTS23BV.js} +2 -2
  26. package/dist/cli-bundle/chunks/{chunk-K4VAU4HU.js → chunk-SDLBF4PY.js} +1252 -1252
  27. package/dist/cli-bundle/chunks/{register-list-query-RMZNHSII.js → register-list-query-5V43MYPN.js} +6 -6
  28. package/dist/cli-bundle/chunks/{register-mutation-HJGSGX3H.js → register-mutation-DXES37MA.js} +4 -4
  29. package/dist/cli-bundle/chunks/register-operations-LJU5H2CU.js +2 -0
  30. package/dist/cli-bundle/chunks/register-setup-HJUNGYBB.js +2 -0
  31. package/dist/cli-bundle/focused-chunks/chunk-3XPBKIV6.js +12 -0
  32. package/dist/cli-bundle/focused-chunks/{chunk-7Y7PAC56.js → chunk-5BLRMUMK.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/{chunk-5SZ4JSPZ.js → chunk-6MNKQKT6.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-IKPR4VVN.js → chunk-DPBTIFW7.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-J3GN4SQT.js → chunk-DRNXMOSV.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-P4BA7OX7.js → chunk-FXAZPSU6.js} +7 -7
  37. package/dist/cli-bundle/focused-chunks/{chunk-ARK4FIO4.js → chunk-HYPK5OPA.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-I4WDON3K.js → chunk-IA5CCSBB.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/{chunk-CJ4QA4RW.js → chunk-ISEOBALS.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-ZI2YBJFH.js → chunk-K5ZCBC6Y.js} +3 -3
  41. package/dist/cli-bundle/focused-chunks/{chunk-V3YMNAO7.js → chunk-L6L4XCLY.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/{chunk-TDHVROGL.js → chunk-N6KI3LWF.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/chunk-PC6ZZVNP.js +20 -0
  44. package/dist/cli-bundle/focused-chunks/chunk-RQL5WLNZ.js +30 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-ZDBKYZFE.js → chunk-U2SB2BMM.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-YDFEWXXZ.js → chunk-UIS5FVHH.js} +53 -53
  47. package/dist/cli-bundle/main.js +26 -27
  48. package/dist/cli-bundle/sdk-authoring.js +1 -1
  49. package/dist/cli-bundle/sdk-contracts.js +1 -1
  50. package/dist/cli-bundle/sdk-core.js +39 -39
  51. package/dist/cli-bundle/sdk-governance.js +1 -1
  52. package/dist/cli-bundle/sdk-graph.js +1 -1
  53. package/dist/cli-bundle/sdk-merge.js +42 -42
  54. package/dist/cli-bundle/sdk-query.js +1 -1
  55. package/dist/cli-bundle/sdk-runtime.js +1 -1
  56. package/dist/cli-bundle/sdk-testing.js +1 -1
  57. package/dist/cli-bundle/sdk.js +8 -8
  58. package/dist/core/diagnostics/remediation.js +1 -1
  59. package/dist/core/extensions/extension-types.d.ts +2 -2
  60. package/dist/core/extensions/loader.d.ts +9 -15
  61. package/dist/core/extensions/loader.js +1 -1
  62. package/dist/core/extensions/manifest-parser.d.ts +5 -0
  63. package/dist/core/extensions/manifest-parser.js +2 -0
  64. package/dist/core/extensions/registration-contracts.d.ts +34 -0
  65. package/dist/core/extensions/registration-contracts.js +2 -0
  66. package/dist/core/governance/issue-codes.d.ts +10 -1
  67. package/dist/core/governance/issue-codes.js +1 -1
  68. package/dist/core/validate/fix-planning.d.ts +3 -3
  69. package/dist/core/validate/fix-planning.js +1 -1
  70. package/dist/sdk/agent/refusal-reachability.d.ts +1 -1
  71. package/dist/sdk/completion/bash.d.ts +3 -0
  72. package/dist/sdk/completion/bash.js +2 -0
  73. package/dist/sdk/completion/fish.d.ts +3 -0
  74. package/dist/sdk/completion/fish.js +1054 -0
  75. package/dist/sdk/completion/shared.d.ts +103 -0
  76. package/dist/sdk/completion/shared.js +2 -0
  77. package/dist/sdk/completion/zsh.d.ts +3 -0
  78. package/dist/sdk/completion/zsh.js +1109 -0
  79. package/dist/sdk/completion.d.ts +5 -30
  80. package/dist/sdk/completion.js +1 -2160
  81. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  82. package/dist/sdk/governance/closure-timestamps.d.ts +32 -0
  83. package/dist/sdk/governance/closure-timestamps.js +2 -0
  84. package/dist/sdk/governance/validate-normalization.d.ts +2 -0
  85. package/dist/sdk/governance/validate-normalization.js +1 -1
  86. package/dist/sdk/governance/validate.js +1 -1
  87. package/dist/sdk/governance.d.ts +1 -0
  88. package/dist/sdk/governance.js +1 -1
  89. package/dist/sdk/public-surface.json +1 -1
  90. package/dist/sdk/query/search/corpus.d.ts +27 -0
  91. package/dist/sdk/query/search/corpus.js +2 -0
  92. package/dist/sdk/query/search/filters.d.ts +27 -0
  93. package/dist/sdk/query/search/filters.js +2 -0
  94. package/dist/sdk/query/search/input.d.ts +28 -0
  95. package/dist/sdk/query/search/input.js +2 -0
  96. package/dist/sdk/query/search/lexical.d.ts +34 -0
  97. package/dist/sdk/query/search/lexical.js +2 -0
  98. package/dist/sdk/query/search/response.d.ts +34 -0
  99. package/dist/sdk/query/search/response.js +2 -0
  100. package/dist/sdk/query/search/semantic.d.ts +229 -0
  101. package/dist/sdk/query/search/semantic.js +3 -0
  102. package/dist/sdk/query/search/types.d.ts +123 -0
  103. package/dist/sdk/query/search/types.js +2 -0
  104. package/dist/sdk/query/search.d.ts +13 -364
  105. package/dist/sdk/query/search.js +1 -2
  106. package/dist/sdk/runtime/actions.d.ts +4 -0
  107. package/dist/sdk/runtime/actions.js +2 -0
  108. package/dist/sdk/runtime/context.d.ts +38 -0
  109. package/dist/sdk/runtime/context.js +2 -0
  110. package/dist/sdk/runtime/schema.d.ts +4 -0
  111. package/dist/sdk/runtime/schema.js +2 -0
  112. package/dist/sdk/runtime.d.ts +90 -95
  113. package/dist/sdk/runtime.js +1 -1
  114. package/docs/ARCHITECTURE.md +68 -0
  115. package/docs/HISTORY_GOVERNANCE_REPAIR.md +66 -0
  116. package/docs/README.md +2 -0
  117. package/docs/VALIDATION_PORTABILITY.md +82 -0
  118. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +4 -3
  119. package/marketplace.json +2 -2
  120. package/package.json +6 -6
  121. package/packages/pm-beads/package.json +1 -1
  122. package/packages/pm-calendar/package.json +1 -1
  123. package/packages/pm-command-kit/package.json +1 -1
  124. package/packages/pm-digital-twin/package.json +1 -1
  125. package/packages/pm-governance-audit/package.json +1 -1
  126. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +23 -17
  127. package/packages/pm-guide-shell/package.json +1 -1
  128. package/packages/pm-kanban/package.json +1 -1
  129. package/packages/pm-lifecycle-hooks/package.json +1 -1
  130. package/packages/pm-linked-test-adapters/package.json +1 -1
  131. package/packages/pm-search-advanced/package.json +1 -1
  132. package/packages/pm-templates/package.json +1 -1
  133. package/packages/pm-todos/package.json +1 -1
  134. package/packages/pm-vcs/package.json +1 -1
  135. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  136. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  137. package/dist/cli-bundle/chunks/chunk-AACGU5IA.js +0 -3
  138. package/dist/cli-bundle/chunks/chunk-J7NP7QLW.js +0 -6
  139. package/dist/cli-bundle/chunks/chunk-KHN4NMKT.js +0 -238
  140. package/dist/cli-bundle/chunks/chunk-KYG2QKNY.js +0 -29
  141. package/dist/cli-bundle/chunks/chunk-OQS2Y6VN.js +0 -2
  142. package/dist/cli-bundle/chunks/chunk-QTHR3LXF.js +0 -20
  143. package/dist/cli-bundle/chunks/chunk-RVMDPIGD.js +0 -2
  144. package/dist/cli-bundle/chunks/chunk-WASMH647.js +0 -8
  145. package/dist/cli-bundle/chunks/register-operations-LBEMFUMM.js +0 -2
  146. package/dist/cli-bundle/chunks/register-setup-MU557JAA.js +0 -2
  147. package/dist/cli-bundle/focused-chunks/chunk-I32L3FWW.js +0 -12
  148. package/dist/cli-bundle/focused-chunks/chunk-OOZHQFBF.js +0 -20
  149. package/dist/cli-bundle/focused-chunks/chunk-QL4MO5M2.js +0 -30
@@ -0,0 +1,1109 @@
1
+ !(function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8e48bd9b-07b3-5772-984e-10f27864c736")}catch(e2){}})();import{PM_NAMESPACED_COMMAND_ALIASES}from"../cli-contracts.js";import{SCAFFOLD_CAPABILITIES}from"../extension/scaffold.js";import{ATTEST_INVOCATIONS,COMMAND_COMPLETION_DESCRIPTIONS,EXTENSION_LIFECYCLE_ACTIONS,GLOBAL_COMPLETION_INLINE_PATTERNS,GLOBAL_COMPLETION_SWITCH_PATTERNS,GLOBAL_COMPLETION_VALUE_PATTERNS,GUIDE_TOPIC_CHOICES,HIDDEN_COMMAND_ALIASES,NAMESPACE_NOUNS,PACKAGE_LIFECYCLE_ACTIONS,RESTORE_INVOCATIONS,SCHEMA_SUBCOMMAND_CHOICES,completionNamespaceLeaves,completionStatusValues,completionTypeValues,joinCompletionValues,normalizeRuntimeCompletionFlags,shellDoubleQuote}from"./shared.js";function escapeZshStaticChoices(value){return value.replace(/([^a-zA-Z0-9_./\s-])/gu,"\\$1").replaceAll("'","'\\''")}function renderZshRuntimeFieldFlagSpecs(runtimeFlags){const normalized=normalizeRuntimeCompletionFlags(runtimeFlags);if(normalized.length===0){return""}return`${normalized.map(flag=>` '${escapeZshStaticChoices(flag)}[Runtime schema field flag]:value' \\`).join("\n")}
2
+ `}function renderZshArgumentSpecs(specs,options={}){const trailingContinuation=options.trailingContinuation??true;const lastSpecIndex=specs.length-1;return specs.map((spec,index)=>` ${spec}${trailingContinuation||index!==lastSpecIndex?" \\":""}`).join("\n")}function renderZshCommandDescriptions(){return[...COMMAND_COMPLETION_DESCRIPTIONS,["ops","Workspace maintenance and diagnostics"]].filter(([command])=>!HIDDEN_COMMAND_ALIASES.has(command)).map(([command,description])=>` '${command}:${description}'`).join("\n")}function renderZshPresenceFilterSpecs(options){const missingSpecs=["reviewer-missing[Select only items missing reviewer]","risk-missing[Select only items missing risk]","confidence-missing[Select only items missing confidence]","sprint-missing[Select only items missing sprint]","release-missing[Select only items missing release]"];const contentMissingAliasSpecs=options.includeContentMissingAliases===true?["files-missing[Alias for --no-files]","docs-missing[Alias for --no-docs]"]:[];const pairedSpecs=[["has-notes[Select only items that have notes]","no-notes[Select only items with no notes]"],["has-learnings[Select only items that have learnings]","no-learnings[Select only items with no learnings]"],["has-files[Select only items that have linked files]","no-files[Select only items with no linked files]"],["has-docs[Select only items that have linked docs]","no-docs[Select only items with no linked docs]"],["has-tests[Select only items that have linked tests]","no-tests[Select only items with no linked tests]"],["has-comments[Select only items that have comments]","no-comments[Select only items with no comments]"],["has-deps[Select only items that have dependencies]","no-deps[Select only items with no dependencies]"],["has-body[Select only items with non-empty body]","empty-body[Select only items with empty body]"],["has-linked-command[Select only items that have a linked command]","no-linked-command[Select only items with no linked command]"]];return renderZshArgumentSpecs([...[...missingSpecs,...contentMissingAliasSpecs].map(spec=>`'--${options.missingPrefix}${spec}'`),...pairedSpecs.flatMap(([positive,negative])=>[`'--${options.pairedPrefix}${positive}'`,`'--${options.pairedPrefix}${negative}'`])])}const ZSH_MUTATION_COLLECTION_ARGUMENT_SPECS=["'--comment[Comment seed author=<value>,created_at=<iso|now>,text=<value>]:comment'","'--note[Note seed author=<value>,created_at=<iso|now>,text=<value>]:note'","'--learning[Learning seed author=<value>,created_at=<iso|now>,text=<value>]:learning'","'--file[Linked file path=<value>,scope=<project|global>,note=<text>]:file'","'--test[Linked test command=<value>,path=<value>,scope=<project|global>]:test'","'--doc[Linked doc path=<value>,scope=<project|global>,note=<text>]:doc'","'--reminder[Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>]:reminder'","'--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event'","'--type-option[Type option key=value or key=<name>,value=<value>]:type_option'","'--unset[Clear scalar metadata field by name]:field'","'--replace-files[Atomically replace linked files with provided --file values]'","'--replace-docs[Atomically replace linked docs with provided --doc values]'","'--clear-deps[Clear dependency entries]'","'--clear-comments[Clear comments]'","'--clear-notes[Clear notes]'","'--clear-learnings[Clear learnings]'","'--clear-files[Clear linked files]'","'--clear-tests[Clear linked tests]'","'--clear-docs[Clear linked docs]'","'--clear-reminders[Clear reminders]'","'--clear-events[Clear events]'","'--clear-type-options[Clear type options]'"];function renderZshScheduleItemSpecs(kind){const leadingSpecs=kind==="reminder"?["'--at[Reminder time (default +1d)]:at'","'--text[Reminder text (defaults to title)]:text'"]:["'--start[Start time (ISO, now, or relative)]:start'","'--duration[Duration from start (default 1h)]:duration'","'--end[End time (overrides --duration)]:end'","'--location[Location]:location'","'--timezone[IANA timezone]:timezone'","'--all-day[Mark as an all-day event]'"];return renderZshArgumentSpecs([...leadingSpecs,"'--parent[Parent item id]:parent'","'--allow-missing-parent[Permit a parent id that does not exist yet]'","'--tags[Comma-separated tags]:tags'","'(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)'","'(-b --body)'{-b,--body}'[Item body]:body'","'(-d --description)'{-d,--description}'[Short description]:description'","'--author[Mutation author]:author'","'--message[History message]:message'","'--json[Output JSON]'","'--quiet[Suppress stdout]'"],{trailingContinuation:false})}function renderZshBulkSelectionFilterSpecs(action,statusChoices,typeChoices,tagChoices){return renderZshArgumentSpecs([`'--filter-status[Filter by status before ${action}]:(${statusChoices})'`,`'--filter-type[Filter by type before ${action}]:(${typeChoices})'`,`'--filter-tag[Filter by tag before ${action}]:(${tagChoices})'`,`'--filter-priority[Filter by priority before ${action}]:(0 1 2 3 4)'`,"'--filter-deadline-before[Filter by deadline upper bound]:deadline'","'--filter-deadline-after[Filter by deadline lower bound]:deadline'","'--filter-updated-after[Filter by updated_at lower bound (ISO/relative)]:timestamp'","'--filter-updated-before[Filter by updated_at upper bound (ISO/relative)]:timestamp'","'--filter-created-after[Filter by created_at lower bound (ISO/relative)]:timestamp'","'--filter-created-before[Filter by created_at upper bound (ISO/relative)]:timestamp'",`'--filter-assignee[Filter by assignee before ${action}]:assignee'`,"'--filter-assignee-filter[Filter assignee presence]:(assigned unassigned)'","'--filter-parent[Filter by parent item ID]:parent'","'--filter-sprint[Filter by sprint]:sprint'","'--filter-release[Filter by release]:release'"])}function renderZshDynamicChoiceResolver(kind,command,fallback){const envKind=kind.toUpperCase();const cacheVar=`PM_COMPLETION_${envKind}_CACHE`;const cacheTsVar=`PM_COMPLETION_${envKind}_CACHE_TS`;const ttlVar=`PM_COMPLETION_${envKind}_TTL`;const escapedFallback=shellDoubleQuote(fallback);return`
3
+ _pm_${kind}_choices() {
4
+ local now ttl cache_ts resolved
5
+ now=\${EPOCHSECONDS:-0}
6
+ ttl=\${${ttlVar}:-120}
7
+ cache_ts=\${${cacheTsVar}:-0}
8
+ if [[ -n "\${${cacheVar}:-}" && "$now" -ne 0 && $((now - cache_ts)) -lt "$ttl" ]]; then
9
+ print -r -- "$${cacheVar}"
10
+ return
11
+ fi
12
+ resolved="$(pm ${command} 2>/dev/null)"
13
+ if [[ -z "$resolved" ]]; then
14
+ resolved="${escapedFallback}"
15
+ fi
16
+ ${cacheVar}="$resolved"
17
+ ${cacheTsVar}="$now"
18
+ print -r -- "$${cacheVar}"
19
+ }
20
+ `}function generateZshScript(itemTypes=[],tags=[],eagerTagExpansion=false,runtime={}){const namespaceLeaves=completionNamespaceLeaves(runtime);const useDynamicTypeExpansion=itemTypes.length===0;const typeFallbackChoices=completionTypeValues(itemTypes,runtime);const statusFallbackChoices=completionStatusValues(runtime);const typeChoices=useDynamicTypeExpansion?'${(f)"$(_pm_type_choices)"}':escapeZshStaticChoices(typeFallbackChoices);const statusChoices='${(f)"$(_pm_status_choices)"}';const guideTopicChoices=GUIDE_TOPIC_CHOICES;const tagChoices=joinCompletionValues(tags);const useEagerTagExpansion=eagerTagExpansion||tags.length>0;const zshTagChoices=useEagerTagExpansion?escapeZshStaticChoices(tagChoices):'${(f)"$(_pm_tag_choices)"}';const zshListRuntimeFieldFlags=renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.list);const zshCreateRuntimeFieldFlags=renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.create);const zshSearchRuntimeFieldFlags=renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.search);const zshCalendarRuntimeFieldFlags=renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.calendar);const zshContextRuntimeFieldFlags=renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.context);const zshPresenceFilterFlags=renderZshPresenceFilterSpecs({missingPrefix:"filter-",pairedPrefix:"",includeContentMissingAliases:true});const zshBulkPresenceFilterFlags=renderZshPresenceFilterSpecs({missingPrefix:"filter-",pairedPrefix:"filter-"});const zshMutationCollectionFlags=renderZshArgumentSpecs(ZSH_MUTATION_COLLECTION_ARGUMENT_SPECS);const dynamicTagResolver=useEagerTagExpansion?"":`
21
+ _pm_tag_choices() {
22
+ local now ttl cache_ts
23
+ now=\${EPOCHSECONDS:-0}
24
+ ttl=\${PM_COMPLETION_TAG_TTL:-120}
25
+ cache_ts=\${PM_COMPLETION_TAG_CACHE_TS:-0}
26
+ if [[ -n "\${PM_COMPLETION_TAG_CACHE:-}" && "$now" -ne 0 && $((now - cache_ts)) -lt "$ttl" ]]; then
27
+ print -r -- "$PM_COMPLETION_TAG_CACHE"
28
+ return
29
+ fi
30
+ PM_COMPLETION_TAG_CACHE="$(pm completion-tags 2>/dev/null)"
31
+ PM_COMPLETION_TAG_CACHE_TS="$now"
32
+ print -r -- "$PM_COMPLETION_TAG_CACHE"
33
+ }
34
+ `;return`#compdef pm
35
+ # zsh completion for pm
36
+ # Source this file or add 'eval "$(pm completion zsh)"' to ~/.zshrc
37
+
38
+ _pm_commands() {
39
+ local -a commands
40
+ commands=(
41
+ ${renderZshCommandDescriptions()}
42
+ )
43
+ _describe 'command' commands
44
+ }
45
+ ${dynamicTagResolver}
46
+ ${useDynamicTypeExpansion?renderZshDynamicChoiceResolver("type","completion-types",typeFallbackChoices):""}
47
+ ${renderZshDynamicChoiceResolver("status","completion-statuses",statusFallbackChoices)}
48
+
49
+ _pm() {
50
+ local context state line
51
+ local -a words=("$words[@]")
52
+ local CURRENT=$CURRENT
53
+ local word_index=2 namespace_noun="" operation_path="" operation_index=0 word
54
+ while (( word_index < CURRENT )); do
55
+ word="$words[word_index]"
56
+ case "\${word//_/-}" in
57
+ ${GLOBAL_COMPLETION_VALUE_PATTERNS}) (( word_index += 2 )); continue ;;
58
+ ${GLOBAL_COMPLETION_INLINE_PATTERNS}|${GLOBAL_COMPLETION_SWITCH_PATTERNS}) (( word_index++ )); continue ;;
59
+ --) break ;;
60
+ esac
61
+ if [[ -z "$namespace_noun" ]]; then
62
+ [[ "$word" == "ctx" ]] && word="context"
63
+ case "$word" in ${NAMESPACE_NOUNS.join("|")}) ;; *) break ;; esac
64
+ namespace_noun="$word"
65
+ else
66
+ case "$namespace_noun $word" in
67
+ ${PM_NAMESPACED_COMMAND_ALIASES.map(entry=>` "${entry.canonical}") namespace_noun="${entry.canonical}"; operation_path="$namespace_noun"; operation_index=$word_index ;;`).join("\n")}
68
+ *) break ;;
69
+ esac
70
+ fi
71
+ (( word_index++ ))
72
+ done
73
+ if [[ -n "$namespace_noun" ]] && (( word_index == CURRENT )) && [[ "$words[CURRENT]" != -* ]]; then
74
+ local -a history_commands
75
+ case "$namespace_noun" in
76
+ ${Object.entries(namespaceLeaves).map(([noun,leaves])=>` "${noun}") history_commands=(${leaves}) ;;`).join("\n")}
77
+ esac
78
+ if (( \${#history_commands} > 0 )); then
79
+ _describe 'command operation' history_commands
80
+ return
81
+ fi
82
+ fi
83
+ if (( operation_index > 0 )); then
84
+ case "$operation_path" in
85
+ ${PM_NAMESPACED_COMMAND_ALIASES.map(entry=>` "${entry.canonical}") words=("$words[1]" "${entry.alias}" "\${words[@]:$operation_index}"); (( CURRENT -= operation_index - 2 )) ;;`).join("\n")}
86
+ esac
87
+ fi
88
+ _arguments -C \\
89
+ '--json[Output JSON instead of TOON]' \\
90
+ '--all[Reveal every public command and compatibility alias]' \\
91
+ '--quiet[Suppress stdout output]' \\
92
+ '--output-include[Retain comma-separated read fields or sections]:selectors' \\
93
+ '--output-limit[Set the universal read row ceiling]:limit' \\
94
+ '--output-budget[Set the universal estimated-token ceiling]:tokens' \\
95
+ '--output-format[Select the universal read encoding]:(toon json)' \\
96
+ '--output-session[Carry cross-call read budget and served-item state]:state' \\
97
+ '--output-row-contract[Include row schema metadata in read output]' \\
98
+ '--no-changed-fields[Omit changed_fields array from mutation output]' \\
99
+ '--pm-path[Explicit tracker storage path for this command]:path:_files -/' \\
100
+ '--path[Compatibility alias for --pm-path]:path:_files -/' \\
101
+ '--no-extensions[Disable extension loading]' \\
102
+ '--no-pager[Disable pager integration for help and long output]' \\
103
+ '--profile[Print deterministic timing diagnostics]' \\
104
+ '(-V --version)--version[Output the version number]' \\
105
+ '(-h --help)--help[Display help]' \\
106
+ '1: :_pm_commands' \\
107
+ '*:: :->args' && return 0
108
+
109
+ case $state in
110
+ args)
111
+ case $line[1] in
112
+ list)
113
+ _arguments \\
114
+ '*--status[Filter by status; repeatable, comma-separated, or all]:(${statusChoices})' \\
115
+ '--all[Include every lifecycle status]' \\
116
+ '--type[Filter by item type]:(${typeChoices})' \\
117
+ '--tag[Filter by tag]:(${zshTagChoices})' \\
118
+ '--tags[Alias for --tag]:(${zshTagChoices})' \\
119
+ '--priority[Filter by priority]:(0 1 2 3 4)' \\
120
+ '--deadline-before[Filter by deadline upper bound (ISO/date string or relative)]:date' \\
121
+ '--deadline-after[Filter by deadline lower bound (ISO/date string or relative)]:date' \\
122
+ '--today[Filter to items updated since local midnight today]' \\
123
+ '--recent[Filter to items updated in the last 7 days]' \\
124
+ '--updated-after[Filter by updated_at lower bound (ISO/relative)]:timestamp' \\
125
+ '--updated-before[Filter by updated_at upper bound (ISO/relative)]:timestamp' \\
126
+ '--created-after[Filter by created_at lower bound (ISO/relative)]:timestamp' \\
127
+ '--created-before[Filter by created_at upper bound (ISO/relative)]:timestamp' \\
128
+ '--assignee[Filter by assignee]:assignee' \\
129
+ '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\
130
+ '--sprint[Filter by sprint]:sprint' \\
131
+ '--release[Filter by release]:release' \\
132
+ ${zshPresenceFilterFlags}
133
+ '--limit[Limit returned item count]:number' \\
134
+ '--offset[Skip the first n matching rows before limit]:number' \\
135
+ '--no-truncate[Return every matched row, overriding --limit]' \\
136
+ '--include-body[Include item body in each returned list row]' \\
137
+ '--compact[Render compact list projection fields]' \\
138
+ '--fields[Render custom comma-separated list fields]:fields' \\
139
+ '--tree[Render hierarchical subtree output rooted at --parent or top-level parents]' \\
140
+ '--tree-depth[Cap recursion depth for --tree (0 = root only)]:number' \\
141
+ '--sort[Sort field]:(priority deadline updated_at created_at title parent)' \\
142
+ '--order[Sort order (requires --sort)]:(asc desc)' \\
143
+ '--stream[Emit line-delimited JSON rows (requires --json)]' \\
144
+ ${zshListRuntimeFieldFlags} '--json[Output JSON]' \\
145
+ '--quiet[Suppress stdout]' \\
146
+ '--pm-path[Explicit tracker storage path]:path:_files -/' \\
147
+ '--path[Compatibility alias for --pm-path]:path:_files -/'
148
+ ;;
149
+ aggregate)
150
+ _arguments \\
151
+ '--group-by[Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)]:fields' \\
152
+ '--count[Return grouped counts]' \\
153
+ '--completion[Add open/in_progress/closed/other counts and completion percentage]' \\
154
+ '--sum[Numeric field to sum per group]:field' \\
155
+ '--avg[Numeric field to average per group]:field' \\
156
+ '--include-unparented[Include unparented rows when grouping by parent]' \\
157
+ '--status[Filter by status]:(${statusChoices})' \\
158
+ '--type[Filter by item type]:(${typeChoices})' \\
159
+ '--tag[Filter by tag]:(${zshTagChoices})' \\
160
+ '--priority[Filter by priority]:(0 1 2 3 4)' \\
161
+ '--deadline-before[Filter by deadline upper bound (ISO/date string or relative)]:date' \\
162
+ '--deadline-after[Filter by deadline lower bound (ISO/date string or relative)]:date' \\
163
+ '--assignee[Filter by assignee]:assignee' \\
164
+ '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\
165
+ '--parent[Filter by parent item ID]:parent_id' \\
166
+ '--sprint[Filter by sprint]:sprint' \\
167
+ '--release[Filter by release]:release' \\
168
+ '--json[Output JSON]' \\
169
+ '--quiet[Suppress stdout]'
170
+ ;;
171
+ duplicates)
172
+ _arguments \\
173
+ '*--status[Include lifecycle status (repeatable)]:(${statusChoices})' \\
174
+ '--since[Only inspect items created at or after this ISO timestamp]:timestamp' \\
175
+ '--threshold[Minimum similarity score from zero through one]:number' \\
176
+ '--limit[Maximum duplicate clusters]:number'
177
+ ;;
178
+ create)
179
+ _arguments \\
180
+ '(-t --title)'{-t,--title}'[Item title]:title' \\
181
+ '(-d --description)'{-d,--description}'[Item description]:description' \\
182
+ '--type[Item type]:(${typeChoices})' \\
183
+ '--create-mode[Create required-option policy mode]:(strict progressive)' \\
184
+ '--schedule-preset[Scheduling preset for Reminder/Meeting/Event]:(lightweight)' \\
185
+ '(-s --status)'{-s,--status}'[Item status]:(${statusChoices})' \\
186
+ '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\
187
+ '--tags[Comma-separated tags]:tags' \\
188
+ '--add-tags[Add tags additively without replacing existing]:tags' \\
189
+ '(-b --body)'{-b,--body}'[Item body]:body' \\
190
+ '--body-file[Load the item body from a file]:body_file:_files' \\
191
+ '--deadline[Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)]:deadline' \\
192
+ '--estimate[Estimated minutes]:minutes' \\
193
+ '--acceptance-criteria[Acceptance criteria]:criteria' \\
194
+ '--reminder[Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>]:reminder' \\
195
+ '--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event' \\
196
+ '--type-option[Type option key=value or key=<name>,value=<value>]:type_option' \\
197
+ '--unset[Clear scalar metadata field by name]:field' \\
198
+ '--replace-deps[Atomically replace dependencies with provided --dep values]' \\
199
+ '--replace-tests[Atomically replace linked tests with provided --test values]' \\
200
+ '--clear-deps[Clear dependency entries]' \\
201
+ '--clear-comments[Clear comments]' \\
202
+ '--clear-notes[Clear notes]' \\
203
+ '--clear-learnings[Clear learnings]' \\
204
+ '--clear-files[Clear linked files]' \\
205
+ '--clear-tests[Clear linked tests]' \\
206
+ '--clear-docs[Clear linked docs]' \\
207
+ '--clear-reminders[Clear reminders]' \\
208
+ '--clear-events[Clear events]' \\
209
+ '--clear-type-options[Clear type options]' \\
210
+ '--author[Mutation author]:author' \\
211
+ '--message[History message]:message' \\
212
+ '--assignee[Assignee]:assignee' \\
213
+ ${zshCreateRuntimeFieldFlags} '--json[Output JSON]' \\
214
+ '--quiet[Suppress stdout]'
215
+ ;;
216
+ copy)
217
+ _arguments \\
218
+ '--title[Override copied title]:title' \\
219
+ '--author[Mutation author]:author' \\
220
+ '--message[History message]:message' \\
221
+ '--force[Force ownership override]' \\
222
+ '--json[Output JSON]' \\
223
+ '--quiet[Suppress stdout]'
224
+ ;;
225
+ focus)
226
+ _arguments \\
227
+ '--clear[Clear the focused item]' \\
228
+ '--json[Output JSON]' \\
229
+ '--quiet[Suppress stdout]'
230
+ ;;
231
+ meet|event)
232
+ _arguments \\
233
+ ${renderZshScheduleItemSpecs("event")}
234
+ ;;
235
+ remind)
236
+ _arguments \\
237
+ ${renderZshScheduleItemSpecs("reminder")}
238
+ ;;
239
+ update)
240
+ _arguments \\
241
+ '(-t --title)'{-t,--title}'[Item title]:title' \\
242
+ '(-d --description)'{-d,--description}'[Item description]:description' \\
243
+ '(-b --body)'{-b,--body}'[Item body]:body' \\
244
+ '--body-file[Load the item body from a file]:body_file:_files' \\
245
+ '(-s --status)'{-s,--status}'[Item status]:(${statusChoices})' \\
246
+ '--close-reason[Set close reason]:close_reason' \\
247
+ '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\
248
+ '--type[Item type]:(${typeChoices})' \\
249
+ '--tags[Comma-separated tags]:tags' \\
250
+ '--add-tags[Add tags additively without replacing existing]:tags' \\
251
+ '--remove-tags[Remove tags from the existing list]:tags' \\
252
+ '--add-ac[Add one acceptance criterion without replacing existing]:criteria' \\
253
+ '--remove-ac[Remove one acceptance criterion by exact text]:criteria' \\
254
+ '--expected[Short alias for --expected-result]:expected_result' \\
255
+ '--actual[Short alias for --actual-result]:actual_result' \\
256
+ ${zshMutationCollectionFlags}
257
+ '--author[Mutation author]:author' \\
258
+ '--message[History message]:message' \\
259
+ '--force[Force override]' \\
260
+ '--json[Output JSON]' \\
261
+ '--quiet[Suppress stdout]'
262
+ ;;
263
+ update-many)
264
+ _arguments \\
265
+ ${renderZshBulkSelectionFilterSpecs("applying updates",statusChoices,typeChoices,zshTagChoices)}
266
+ '--filter-ac-missing[Select only items missing acceptance_criteria]' \\
267
+ '--filter-estimates-missing[Select only items missing estimated_minutes]' \\
268
+ '--filter-resolution-missing[Select only terminal items missing resolution]' \\
269
+ '--filter-metadata-missing[Select only items missing any tracked metadata]' \\
270
+ ${zshBulkPresenceFilterFlags}
271
+ '--ids[Explicit comma-separated ID allowlist]:ids' \\
272
+ '--limit[Limit matched item count]:number' \\
273
+ '--offset[Skip first n matched rows]:number' \\
274
+ '--dry-run[Preview updates without mutating]' \\
275
+ '--rollback[Rollback checkpoint ID]:checkpoint_id' \\
276
+ '--no-checkpoint[Disable checkpoint creation during apply mode]' \\
277
+ '(-t --title)'{-t,--title}'[Item title]:title' \\
278
+ '(-d --description)'{-d,--description}'[Item description]:description' \\
279
+ '(-b --body)'{-b,--body}'[Item body]:body' \\
280
+ '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\
281
+ '--type[Item type]:(${typeChoices})' \\
282
+ '--tags[Comma-separated tags]:tags' \\
283
+ '--add-tags[Add tags additively without replacing existing]:tags' \\
284
+ '--remove-tags[Remove tags from the existing list]:tags' \\
285
+ '--deadline[Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)]:deadline' \\
286
+ '--estimate[Estimated minutes]:minutes' \\
287
+ '--acceptance-criteria[Acceptance criteria]:criteria' \\
288
+ '--add-ac[Add one acceptance criterion without replacing existing]:criteria' \\
289
+ '--remove-ac[Remove one acceptance criterion by exact text]:criteria' \\
290
+ '--definition-of-ready[Definition of ready]:definition_of_ready' \\
291
+ '--order[Planning order/rank]:order' \\
292
+ '--goal[Goal identifier]:goal' \\
293
+ '--objective[Objective identifier]:objective' \\
294
+ '--value[Business value summary]:value' \\
295
+ '--impact[Business impact summary]:impact' \\
296
+ '--outcome[Expected outcome summary]:outcome' \\
297
+ '--why-now[Why-now rationale]:why_now' \\
298
+ '--reviewer[Reviewer]:reviewer' \\
299
+ '--risk[Risk level]:risk' \\
300
+ '--confidence[Confidence level]:confidence' \\
301
+ '--sprint[Sprint identifier]:sprint' \\
302
+ '--release[Release identifier]:release' \\
303
+ '--reporter[Issue reporter]:reporter' \\
304
+ '--severity[Issue severity]:severity' \\
305
+ '--environment[Issue environment context]:environment' \\
306
+ '--repro-steps[Issue reproduction steps]:repro_steps' \\
307
+ '--resolution[Issue resolution summary]:resolution' \\
308
+ '--expected-result[Issue expected behavior]:expected_result' \\
309
+ '--actual-result[Issue observed behavior]:actual_result' \\
310
+ '--expected[Short alias for --expected-result]:expected_result' \\
311
+ '--actual[Short alias for --actual-result]:actual_result' \\
312
+ '--affected-version[Affected version identifier]:affected_version' \\
313
+ '--fixed-version[Fixed version identifier]:fixed_version' \\
314
+ '--component[Issue component ownership]:component' \\
315
+ '--regression[Regression marker true|false|1|0]:regression' \\
316
+ '--customer-impact[Customer impact summary]:customer_impact' \\
317
+ '--dep[Dependency seed id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>]:dep' \\
318
+ '--dep-remove[Dependency removal selector id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>]:dep_remove' \\
319
+ '--replace-deps[Atomically replace dependencies with provided --dep values]' \\
320
+ '--replace-tests[Atomically replace linked tests with provided --test values]' \\
321
+ ${zshMutationCollectionFlags}
322
+ '--author[Mutation author]:author' \\
323
+ '--message[History message]:message' \\
324
+ '--force[Force override]' \\
325
+ '--json[Output JSON]' \\
326
+ '--quiet[Suppress stdout]'
327
+ ;;
328
+ close-many)
329
+ _arguments \\
330
+ ${renderZshBulkSelectionFilterSpecs("closing",statusChoices,typeChoices,zshTagChoices)}
331
+ ${zshBulkPresenceFilterFlags}
332
+ '--ids[Explicit comma-separated ID allowlist]:ids' \\
333
+ '--limit[Limit matched item count]:number' \\
334
+ '--offset[Skip first n matched rows]:number' \\
335
+ '--reason[Optional shared close reason applied to every matched item]:reason' \\
336
+ '--resolution[Shared closure resolution]:resolution' \\
337
+ '--expected-result[Shared expected-result note]:expected_result' \\
338
+ '--actual-result[Shared actual-result note]:actual_result' \\
339
+ '--expected[Short alias for --expected-result]:expected_result' \\
340
+ '--actual[Short alias for --actual-result]:actual_result' \\
341
+ '--validate-close[Validate closure metadata per item]:(off warn strict)' \\
342
+ '--author[Mutation author]:author' \\
343
+ '--message[History message]:message' \\
344
+ '--force[Re-close terminal matches and override ownership]' \\
345
+ '--dry-run[Preview matched items without mutating]' \\
346
+ '--rollback[Rollback checkpoint ID]:checkpoint_id' \\
347
+ '--no-checkpoint[Disable checkpoint creation during apply mode]' \\
348
+ '--json[Output JSON]' \\
349
+ '--quiet[Suppress stdout]'
350
+ ;;
351
+ calendar|cal)
352
+ _arguments \\
353
+ '--view[Calendar view]:(agenda day week month)' \\
354
+ '--date[Anchor date/time (ISO/date string or relative)]:date' \\
355
+ '--from[Agenda lower bound (ISO/date string or relative)]:date' \\
356
+ '--to[Agenda upper bound (ISO/date string or relative)]:date' \\
357
+ '--past[Include past entries]' \\
358
+ '--full-period[Include full anchored day/week/month period]' \\
359
+ '--type[Filter by type]:(${typeChoices})' \\
360
+ '--tag[Filter by tag]:(${zshTagChoices})' \\
361
+ '--priority[Filter by priority]:(0 1 2 3 4)' \\
362
+ '--status[Filter by status]:(${statusChoices})' \\
363
+ '--assignee[Filter by assignee]:assignee' \\
364
+ '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\
365
+ '--sprint[Filter by sprint]:sprint' \\
366
+ '--release[Filter by release]:release' \\
367
+ ${zshCalendarRuntimeFieldFlags} '--include[Include event sources]:(all deadlines reminders events scheduled)' \\
368
+ '--recurrence-lookahead-days[Bound open-ended recurrence lookahead]:days' \\
369
+ '--recurrence-lookback-days[Bound open-ended recurrence lookback]:days' \\
370
+ '--occurrence-limit[Cap occurrences per recurring event]:number' \\
371
+ '--limit[Limit returned events]:number' \\
372
+ '--format[Output override]:(markdown toon json)' \\
373
+ '--json[Output JSON]' \\
374
+ '--quiet[Suppress stdout]'
375
+ ;;
376
+ context|ctx)
377
+ _arguments \\
378
+ '--date[Anchor date/time (ISO/date string or relative)]:date' \\
379
+ '--from[Agenda lower bound (ISO/date string or relative)]:date' \\
380
+ '--to[Agenda upper bound (ISO/date string or relative)]:date' \\
381
+ '--past[Include past entries in bounded windows]' \\
382
+ '--type[Filter by type]:(${typeChoices})' \\
383
+ '--tag[Filter by tag]:(${zshTagChoices})' \\
384
+ '--priority[Filter by priority]:(0 1 2 3 4)' \\
385
+ '--assignee[Filter by assignee]:assignee' \\
386
+ '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\
387
+ '--sprint[Filter by sprint]:sprint' \\
388
+ '--release[Filter by release]:release' \\
389
+ '--parent[Scope snapshot to one item subtree]:id' \\
390
+ '--limit[Limit focus and agenda rows per section]:number' \\
391
+ '--depth[Context depth]:(brief standard deep full)' \\
392
+ '--format[Output override]:(markdown toon json)' \\
393
+ ${zshContextRuntimeFieldFlags} '--json[Output JSON]' \\
394
+ '--quiet[Suppress stdout]'
395
+ ;;
396
+ next)
397
+ _arguments \\
398
+ '--type[Filter candidates by type]:(${typeChoices})' \\
399
+ '--tag[Filter candidates by tag]:(${zshTagChoices})' \\
400
+ '--priority[Filter candidates by priority]:(0 1 2 3 4)' \\
401
+ '--assignee[Filter candidates by assignee]:assignee' \\
402
+ '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\
403
+ '--sprint[Filter candidates by sprint]:sprint' \\
404
+ '--release[Filter candidates by release]:release' \\
405
+ '--parent[Scope to one item subtree]:id' \\
406
+ '--limit[Limit ready rows]:number' \\
407
+ '--blocked-limit[Limit blocked rows]:number' \\
408
+ '--ready-only[Omit the blocked companion list]' \\
409
+ '--format[Output override]:(markdown toon json)' \\
410
+ '--json[Output JSON]' \\
411
+ '--quiet[Suppress stdout]'
412
+ ;;
413
+ guide)
414
+ _arguments \\
415
+ '1:topic:(${guideTopicChoices})' \\
416
+ '--list[Show guide topic index]' \\
417
+ '--format[Output override]:(markdown toon json)' \\
418
+ '--depth[Guide detail depth]:(brief standard deep)' \\
419
+ '--json[Output JSON]' \\
420
+ '--quiet[Suppress stdout]'
421
+ ;;
422
+ search)
423
+ _arguments \\
424
+ '--mode[Search mode]:(keyword semantic hybrid)' \\
425
+ '--match-mode[Token match mode]:(and or exact)' \\
426
+ '--min-score[Per-query minimum score threshold]:number' \\
427
+ '--count[Return only the match count]' \\
428
+ '--include-linked[Include linked content in scoring]' \\
429
+ '--highlight[Emit per-field matched-text snippets on each hit]' \\
430
+ '--limit[Max results]:number' \\
431
+ '--status[Filter by status (open/closed/canceled, csv)]:(${statusChoices})' \\
432
+ '--type[Filter by type]:(${typeChoices})' \\
433
+ '--tag[Filter by tag]:(${zshTagChoices})' \\
434
+ '--tags[Alias for --tag]:(${zshTagChoices})' \\
435
+ '--priority[Filter by priority]:(0 1 2 3 4)' \\
436
+ '--updated-after[Filter by updated_at lower bound]:value' \\
437
+ '--updated-before[Filter by updated_at upper bound]:value' \\
438
+ '--created-after[Filter by created_at lower bound]:value' \\
439
+ '--created-before[Filter by created_at upper bound]:value' \\
440
+ '--assignee[Filter by assignee]:value' \\
441
+ '--sprint[Filter by sprint]:value' \\
442
+ '--release[Filter by release]:value' \\
443
+ '--parent[Filter by parent item ID]:value' \\
444
+ ${zshPresenceFilterFlags}
445
+ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
446
+ '--quiet[Suppress stdout]'
447
+ ;;
448
+ reindex)
449
+ _arguments \\
450
+ '--mode[Reindex mode]:(keyword semantic hybrid)' \\
451
+ '--progress[Emit progress updates to stderr]' \\
452
+ '--json[Output JSON]' \\
453
+ '--quiet[Suppress stdout]'
454
+ ;;
455
+ history)
456
+ _arguments \\
457
+ '--limit[Max entries]:number' \\
458
+ '--compact[Condensed history projection]' \\
459
+ '--full[Show full history entries]' \\
460
+ '--provenance[Patch-free identity and agent provenance projection]' \\
461
+ '--provenance-summary[Include bounded provenance completeness counts]' \\
462
+ '*--harness[Filter by recorded or vocabulary-resolved harness]:harness' \\
463
+ '*--agent-instance[Filter by privacy-safe agent instance]:instance' \\
464
+ '*--provenance-filter[Filter by exact declared provenance value]:dimension=value' \\
465
+ '--diff[Include per-entry field-level before/after value diffs]' \\
466
+ '--field[With --diff, show only entries that changed this field]:field' \\
467
+ '--verify[Verify history hash chain and replay integrity]' \\
468
+ '--json[Output JSON]' \\
469
+ '--quiet[Suppress stdout]'
470
+ ;;
471
+ events)
472
+ _arguments \\
473
+ '--since[Resume after a cursor or from an ISO timestamp]:cursor_or_timestamp' \\
474
+ '*--type[Filter by mutation operation]:operation' \\
475
+ '*--author[Filter by mutation author]:author' \\
476
+ '*--item[Filter by item or workspace stream]:item' \\
477
+ '--limit[Maximum events, up to 1000]:number' \\
478
+ '--full[Include complete authoritative history entries]' \\
479
+ '--provenance[Include patch-free identity and agent provenance]' \\
480
+ '--provenance-summary[Include bounded provenance completeness counts]' \\
481
+ '*--harness[Filter by recorded or vocabulary-resolved harness]:harness' \\
482
+ '*--agent-instance[Filter by privacy-safe agent instance]:instance' \\
483
+ '*--provenance-filter[Filter by exact declared provenance value]:dimension=value' \\
484
+ '--follow[Continue emitting committed events]' \\
485
+ '--interval-ms[Empty-read delay while following]:milliseconds' \\
486
+ '--json[Output JSON]' \\
487
+ '--quiet[Suppress stdout]'
488
+ ;;
489
+ history-attest)
490
+ _arguments \\
491
+ ${renderZshArgumentSpecs(ATTEST_INVOCATIONS.map(flag=>`'${flag.flag}[${flag.description}]${flag.takes_value?":value":""}'`),{trailingContinuation:false})}
492
+ ;;
493
+ history-compact)
494
+ _arguments \\
495
+ '--id[Item ID (alternative to positional ID)]:id' \\
496
+ '--before[Compact entries strictly before this version number or ISO timestamp]:before' \\
497
+ '--ids[Bulk: compact an explicit comma-separated list of item ids]:ids' \\
498
+ '--all-over[Bulk: compact every stream with more than N entries]:all-over' \\
499
+ '--closed[Bulk: compact only closed (terminal) items streams]' \\
500
+ '--all-streams[Bulk: compact every history stream regardless of lifecycle state]' \\
501
+ '--min-entries[Bulk: skip streams with at most N entries]:min-entries' \\
502
+ '--dry-run[Preview compaction impact without writing the history file]' \\
503
+ '--author[Mutation author]:author' \\
504
+ '--message[Audit history message]:message' \\
505
+ '--force[Force ownership/lock override]' \\
506
+ '--json[Output JSON]' \\
507
+ '--quiet[Suppress stdout]'
508
+ ;;
509
+ history-author-acknowledge)
510
+ _arguments \\
511
+ '*--event[Actionable unknown-author event]:item_and_line' \\
512
+ '--all-actionable[Select every currently actionable event]' \\
513
+ '--dry-run[Preview a deterministic source-bound plan]' \\
514
+ '--plan-fingerprint[Apply the exact dry-run plan]:sha256' \\
515
+ '--limit[Maximum coordinate rows returned in the plan]:number' \\
516
+ '--attributed-author[Principal attributed by maintainer review]:author' \\
517
+ '--reviewer[Reviewer recording the disposition]:reviewer' \\
518
+ '--reason[Evidence-backed review rationale]:reason' \\
519
+ '--json[Output JSON]' \\
520
+ '--quiet[Suppress stdout]'
521
+ ;;
522
+ get)
523
+ _arguments \\
524
+ '--depth[Detail depth]:(brief standard deep full)' \\
525
+ '--full[Explicit full item read]' \\
526
+ '--fields[Render custom comma-separated item fields]:fields' \\
527
+ '--tree[Include descendant subtree in result payload]' \\
528
+ '--tree-depth[Cap subtree depth for --tree (0 = root only)]:number' \\
529
+ '--json[Output JSON]' \\
530
+ '--quiet[Suppress stdout]'
531
+ ;;
532
+ history-redact)
533
+ _arguments \\
534
+ '--id[Item ID (alternative to positional ID)]:id' \\
535
+ '--literal[Literal string matcher to redact from history/item payloads]:literal' \\
536
+ '--regex[Regex matcher to redact (/pattern/flags or raw pattern)]:regex' \\
537
+ '--replacement[Replacement text (defaults to [redacted])]:replacement' \\
538
+ '--dry-run[Preview redaction impact without writing files]' \\
539
+ '--author[Mutation author]:author' \\
540
+ '--message[Audit history message]:message' \\
541
+ '--force[Force ownership/lock override]' \\
542
+ '--json[Output JSON]' \\
543
+ '--quiet[Suppress stdout]'
544
+ ;;
545
+ history-repair)
546
+ _arguments \\
547
+ '--id[Item ID (alternative to positional ID)]:id' \\
548
+ '--salvage-tail[Recover an invalid suffix after a verified prefix]' \\
549
+ '--normalize-provenance[Remove invalid provenance with aggregate evidence]' \\
550
+ '--all[Repair every drifted stream in one audited pass]' \\
551
+ '--dry-run[Preview the re-anchor impact without writing the history file]' \\
552
+ '--author[Mutation author]:author' \\
553
+ '--message[Audit history message]:message' \\
554
+ '--force[Force ownership/lock override]' \\
555
+ '--json[Output JSON]' \\
556
+ '--quiet[Suppress stdout]'
557
+ ;;
558
+ schema)
559
+ if [[ "\${words[CURRENT-1]}" == policy-mode ]]; then
560
+ compadd advise refuse
561
+ return
562
+ fi
563
+ _arguments \\
564
+ '1:subcommand:(${SCHEMA_SUBCOMMAND_CHOICES})' \\
565
+ '--definition[Policy definition or proposed fields JSON]:json' \\
566
+ '--policy[Approval policy id]:id' \\
567
+ '--message[History rationale]:text' \\
568
+ '--dry-run[Preview schema changes]' \\
569
+ '--description[Human description for the custom item type, status, or field]:text' \\
570
+ '--default-status[Default status hint for the custom item type]:status' \\
571
+ '--folder[Storage folder for items of this custom type]:dir' \\
572
+ '--alias[Alias for the custom type, status, or field flag (repeatable)]:name' \\
573
+ '--role[Lifecycle role for a custom status (repeatable)]:role' \\
574
+ '--order[Display/sort order for a custom status]:n' \\
575
+ '--type[Value type for a custom field]:type:(string number boolean string_array array object)' \\
576
+ '--commands[Commands a custom field is wired onto (repeatable)]:commands' \\
577
+ '--cli-flag[Override the auto-derived CLI flag for a custom field]:flag' \\
578
+ '--required[Mark a custom field as always required]' \\
579
+ '--required-on-create[Mark a custom field as required at create time]' \\
580
+ '--no-allow-unset[Disallow clearing a custom field via --unset]' \\
581
+ '--required-types[Restrict a custom field requirement to specific item types (repeatable)]:types' \\
582
+ '--infer[Infer item types from title-prefix conventions (add-type)]' \\
583
+ '--min-count[Minimum items sharing a prefix for --infer]:n' \\
584
+ '--apply[Register inferred types (with --infer)]' \\
585
+ '--author[Mutation author]:author' \\
586
+ '--force[Force ownership/lock override]' \\
587
+ '--json[Output JSON]' \\
588
+ '--quiet[Suppress stdout]'
589
+ ;;
590
+ profile)
591
+ _arguments \\
592
+ '1:subcommand:(list show apply lint)' \\
593
+ '2:name:(agile ops research)' \\
594
+ '--dry-run[Preview the apply diff without writing any files]' \\
595
+ '--author[Mutation author]:author' \\
596
+ '--force[Force ownership/lock override]' \\
597
+ '--json[Output JSON]' \\
598
+ '--quiet[Suppress stdout]'
599
+ ;;
600
+ plan)
601
+ _arguments \\
602
+ '1:subcommand:(create show add-step update-step complete-step block-step reorder-step remove-step link unlink decision discovery validation resume approve materialize)' \\
603
+ '--title[Plan title]:title' \\
604
+ '--scope[Plan scope statement]:scope' \\
605
+ '--harness[Plan harness provenance]:harness:(codex claude-code cursor generic)' \\
606
+ '--mode[Plan mode]:mode:(draft research review approved executing paused completed superseded)' \\
607
+ '--resume-context[Resume context summary]:text' \\
608
+ '--step-title[Step title]:title' \\
609
+ '*--step[Step title (repeatable on create)]:title' \\
610
+ '--step-status[Step status]:status:(pending in_progress completed blocked skipped superseded)' \\
611
+ '--step-evidence[Step evidence]:text' \\
612
+ '--depends-on[Pm item id step depends on]:id' \\
613
+ '--link[Pm item id to link]:id' \\
614
+ '--link-kind[Link kind]:kind:(related blocks blocked_by depends_on discovered_from implements verifies supersedes)' \\
615
+ '--depth[Show depth]:depth:(brief standard deep)' \\
616
+ '--steps[Step ids/orders for materialize]:steps' \\
617
+ '--materialize-type[Item type for materialized steps]:type' \\
618
+ '--allow-multiple-active[Allow multiple in_progress steps]' \\
619
+ '--promote-to-item-dep[Also add link as top-level item dependency]' \\
620
+ '--author[Mutation author]:author' \\
621
+ '--message[Mutation message]:message' \\
622
+ '--force[Force ownership override]' \\
623
+ '--json[Output JSON]' \\
624
+ '--quiet[Suppress stdout]'
625
+ ;;
626
+ activity)
627
+ _arguments \\
628
+ '--id[Filter by item ID]:id' \\
629
+ '--op[Filter by history operation]:op' \\
630
+ '--author[Filter by history author]:author' \\
631
+ '--from[Lower timestamp bound (ISO/date string or relative)]:date' \\
632
+ '--to[Upper timestamp bound (ISO/date string or relative)]:date' \\
633
+ '--limit[Max entries]:number' \\
634
+ '--unbounded[Return every matching activity entry]' \\
635
+ '--compact[Condensed activity projection]' \\
636
+ '--raw[Emit raw compact per-event activity output]' \\
637
+ '--full[Show full activity entries]' \\
638
+ '--provenance[Patch-free identity and agent provenance projection]' \\
639
+ '--provenance-summary[Include bounded provenance completeness counts]' \\
640
+ '*--harness[Filter by recorded or vocabulary-resolved harness]:harness' \\
641
+ '*--agent-instance[Filter by privacy-safe agent instance]:instance' \\
642
+ '*--provenance-filter[Filter by exact declared provenance value]:dimension=value' \\
643
+ '--stream[Emit line-delimited JSON rows (requires --json)]::mode:(rows ndjson jsonl)' \\
644
+ '--json[Output JSON]' \\
645
+ '--quiet[Suppress stdout]'
646
+ ;;
647
+ contracts)
648
+ _arguments \\
649
+ '--action[Filter schema by tool action]:action' \\
650
+ '--command[Scope output to one command (narrow-by-default)]:command' \\
651
+ '--summary[Return compact command intent summary]' \\
652
+ '--schema-only[Return schema-only payload]' \\
653
+ '--flags-only[Return command flag contracts only]' \\
654
+ '--availability-only[Return action availability only]' \\
655
+ '--runtime-only[Include only actions invocable in the current runtime]' \\
656
+ '--active-only[Alias for --runtime-only]' \\
657
+ '--full[Include complete command and schema contract details]' \\
658
+ '--json[Output JSON]' \\
659
+ '--quiet[Suppress stdout]'
660
+ ;;
661
+ gc)
662
+ _arguments \\
663
+ '--dry-run[Preview cleanup targets without deleting files]' \\
664
+ '--scope[Limit cleanup to one or more scopes: index, embeddings, runtime, locks, checkpoints, transactions]:scope' \\
665
+ '--json[Output JSON]' \\
666
+ '--quiet[Suppress stdout]'
667
+ ;;
668
+ stats)
669
+ _arguments \\
670
+ '--include-empty[Include registered zero-count type and status buckets]' \\
671
+ '--storage[Include aggregate history-stream storage metrics]' \\
672
+ '--metadata-coverage[Include metadata coverage percentages overall and by type]' \\
673
+ '--field-utilization[Include content-field utilization rates across all items]' \\
674
+ '--by-assignee[Lifecycle-bucketed breakdown grouped by assignee]' \\
675
+ '--by-tag[Lifecycle-bucketed breakdown grouped by tag]' \\
676
+ '--by-priority[Lifecycle-bucketed breakdown grouped by priority]' \\
677
+ '--tag-prefix[With --by-tag: only count tags with this prefix]:prefix' \\
678
+ '--json[Output JSON]' \\
679
+ '--quiet[Suppress stdout]'
680
+ ;;
681
+ comments)
682
+ _arguments \\
683
+ '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
684
+ '--text[Alias for --add]:text' \\
685
+ '--stdin[Read comment text from stdin (supports multiline markdown)]' \\
686
+ '--file[Read comment text from file (supports multiline markdown)]:path' \\
687
+ '--edit[Replace the comment at 1-based index (text from positional/--add/--stdin/--file)]:index' \\
688
+ '--delete[Delete the comment at 1-based index]:index' \\
689
+ '--limit[Return only latest n entries]:number' \\
690
+ '--full-history[Return complete post-mutation history]' \\
691
+ '--if-absent[Append only when the resolved author and text are absent]' \\
692
+ '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\
693
+ '--message[History message]:message' \\
694
+ '--force[Force override]' \\
695
+ '--json[Output JSON]' \\
696
+ '--quiet[Suppress stdout]'
697
+ ;;
698
+ notes)
699
+ _arguments \\
700
+ '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
701
+ '--text[Alias for --add]:text' \\
702
+ '--add-json[Append one validated JSON context event]:json' \\
703
+ '--stdin[Read entry text from stdin]' \\
704
+ '--file[Read entry text from file]:path' \\
705
+ '--edit[Replace the entry at a 1-based index]:index' \\
706
+ '--delete[Delete the entry at a 1-based index]:index' \\
707
+ '--limit[Return only latest n entries]:number' \\
708
+ '--since[Return structured events at or after an ISO timestamp]:timestamp' \\
709
+ '--event-type[Return structured events with this top-level type]:event_type' \\
710
+ '--include-meta[Include result counts and truncation metadata]' \\
711
+ '--full-history[Return complete post-mutation history]' \\
712
+ '--if-absent[Append only when the resolved author and text are absent]' \\
713
+ '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\
714
+ '--message[History message]:message' \\
715
+ '--force[Force override]' \\
716
+ '--json[Output JSON]' \\
717
+ '--quiet[Suppress stdout]'
718
+ ;;
719
+ learnings)
720
+ _arguments \\
721
+ '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
722
+ '--text[Alias for --add]:text' \\
723
+ '--stdin[Read entry text from stdin]' \\
724
+ '--file[Read entry text from file]:path' \\
725
+ '--edit[Replace the entry at a 1-based index]:index' \\
726
+ '--delete[Delete the entry at a 1-based index]:index' \\
727
+ '--limit[Return only latest n entries]:number' \\
728
+ '--full-history[Return complete post-mutation history]' \\
729
+ '--if-absent[Append only when the resolved author and text are absent]' \\
730
+ '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\
731
+ '--message[History message]:message' \\
732
+ '--force[Force override]' \\
733
+ '--json[Output JSON]' \\
734
+ '--quiet[Suppress stdout]'
735
+ ;;
736
+ files)
737
+ _arguments \\
738
+ '1:subcommand:(discover lookup)' \\
739
+ '--add[Add a linked file]:file' \\
740
+ '--add-glob[Add linked files matching a glob]:glob' \\
741
+ '--remove[Remove a linked file]:file' \\
742
+ '--migrate[Migrate linked-file metadata]' \\
743
+ '--list[List linked files]' \\
744
+ '--apply[Apply discovered linked files]' \\
745
+ '--note[Linked-file note]:note' \\
746
+ '--append-stable[Preserve stable append ordering]' \\
747
+ '--validate-paths[Validate linked-file paths]' \\
748
+ '--scope[Filter lookup by evidence scope]:(project global)' \\
749
+ '--limit[Maximum lookup matches]:number' \\
750
+ '--offset[Skip the first lookup matches]:number' \\
751
+ '--no-truncate[Return every lookup match]' \\
752
+ '--strict-read[Require authoritative source reads]' \\
753
+ '--explain[Include ranked source-to-work rationale]' \\
754
+ '--lines[Attribute an inclusive source line range]:start_end' \\
755
+ '--decision-depth[Maximum governing-decision relationship depth]:number' \\
756
+ '--author[Mutation author]:author' \\
757
+ '--message[History message]:message' \\
758
+ '--force[Force override]' \\
759
+ '--json[Output JSON]' \\
760
+ '--quiet[Suppress stdout]'
761
+ ;;
762
+ deps)
763
+ _arguments \\
764
+ '--format[Output format]:(tree graph context)' \\
765
+ '--max-depth[Maximum traversal depth (0 keeps root only)]:depth' \\
766
+ '--collapse[Collapse mode]:(none repeated)' \\
767
+ '--summary[Return counts only without tree/graph payload]' \\
768
+ '--node-limit[Maximum nodes in context output]:number' \\
769
+ '--edge-limit[Maximum edges in context output]:number' \\
770
+ '--token-budget[Maximum estimated tokens in context output]:number' \\
771
+ '--cursor[Continue an equivalent context query]:cursor' \\
772
+ '--direction[Context traversal direction]:(outgoing incoming both)' \\
773
+ '--kind[Restrict context traversal to relationship kinds]:kind' \\
774
+ '--json[Output JSON]' \\
775
+ '--quiet[Suppress stdout]'
776
+ ;;
777
+ graph)
778
+ _arguments \\
779
+ '1:subcommand:(ancestors descendants predecessors successors paths impact analyze audit communities redundancy dominators slack centrality articulation plan index)' \\
780
+ '--kind[Restrict traversal to registered relationship kinds]:kind' \\
781
+ '--max-depth[Maximum traversal depth]:depth' \\
782
+ '--limit[Maximum returned rows per bounded collection]:number' \\
783
+ '--after[Resume a traversal after this node id]:id' \\
784
+ '--direction[Edge orientation for paths/impact]:(outgoing incoming both)' \\
785
+ '--max-paths[Maximum enumerated paths]:number' \\
786
+ '--sample[Maximum evidence sample entries per audit finding]:number' \\
787
+ '--exempt-isolate[Item ids treated as explicitly valid isolates]:id' \\
788
+ '--exempt-isolate-type[Item types whose active isolates are policy-valid]:type' \\
789
+ '--save-baseline[Persist the audit census as the comparison baseline]' \\
790
+ '--rebuild[Rebuild and warm the durable graph index]' \\
791
+ '--clear[Delete the durable graph index]' \\
792
+ '--summary[Return counts-first envelopes without row collections]' \\
793
+ '--json[Output JSON]' \\
794
+ '--quiet[Suppress stdout]'
795
+ ;;
796
+ test)
797
+ _arguments \\
798
+ '--add[Add linked test entry]:entry' \\
799
+ '--add-json[Add linked test entry from JSON object/array]:json' \\
800
+ '--remove[Remove linked test entry by command/path]:entry' \\
801
+ '--remove-index[Remove linked test entry by 1-based index]:index' \\
802
+ '--list[List linked tests without mutating]' \\
803
+ '--run[Run linked tests]' \\
804
+ '--match[Run linked tests whose command/path contains substring]:substring' \\
805
+ '--only-index[Run one linked test by 1-based index]:number' \\
806
+ '--only-last[Run the most recently added linked test]' \\
807
+ '--background[Run linked tests in managed background mode]' \\
808
+ '--timeout[Default timeout seconds]:seconds' \\
809
+ '--progress[Emit linked-test progress to stderr]' \\
810
+ '--env-set[Set linked-test runtime environment values]:entry' \\
811
+ '--env-clear[Clear linked-test runtime environment values]:name' \\
812
+ '--shared-host-safe[Apply shared-host-safe runtime defaults]' \\
813
+ '--pm-context[PM linked-test context mode]:(schema tracker auto)' \\
814
+ '--override-linked-pm-context[Force run-level --pm-context over per-linked-test pm_context_mode metadata]' \\
815
+ '--fail-on-context-mismatch[Fail when context item counts mismatch]' \\
816
+ '--fail-on-skipped[Treat skipped linked tests as dependency failures]' \\
817
+ '--fail-on-empty-test-run[Treat empty linked-test selections as failures]' \\
818
+ '--require-assertions-for-pm[Require assertions for linked PM command tests]' \\
819
+ '--check-context[Preflight linked PM command context diagnostics before execution]' \\
820
+ '--auto-pm-context[Auto-remediate tracker-read context mismatches using tracker context]' \\
821
+ '--author[Mutation author]:author' \\
822
+ '--message[History message]:message' \\
823
+ '--force[Force override]' \\
824
+ '--json[Output JSON]' \\
825
+ '--quiet[Suppress stdout]'
826
+ ;;
827
+ test-all)
828
+ _arguments \\
829
+ '--status[Filter by status]:(open in_progress)' \\
830
+ '--limit[Limit matching items before running linked tests]:number' \\
831
+ '--offset[Skip matching items before running linked tests]:number' \\
832
+ '--background[Run linked tests in managed background mode]' \\
833
+ '--timeout[Default timeout seconds]:seconds' \\
834
+ '--progress[Emit linked-test progress to stderr]' \\
835
+ '--env-set[Set linked-test runtime environment values]:entry' \\
836
+ '--env-clear[Clear linked-test runtime environment values]:name' \\
837
+ '--shared-host-safe[Apply shared-host-safe runtime defaults]' \\
838
+ '--pm-context[PM linked-test context mode]:(schema tracker auto)' \\
839
+ '--override-linked-pm-context[Force run-level --pm-context over per-linked-test pm_context_mode metadata]' \\
840
+ '--fail-on-context-mismatch[Fail when context item counts mismatch]' \\
841
+ '--fail-on-skipped[Treat skipped linked tests as dependency failures]' \\
842
+ '--fail-on-empty-test-run[Treat empty linked-test selections as failures]' \\
843
+ '--require-assertions-for-pm[Require assertions for linked PM command tests]' \\
844
+ '--check-context[Preflight linked PM command context diagnostics before execution]' \\
845
+ '--auto-pm-context[Auto-remediate tracker-read context mismatches using tracker context]' \\
846
+ '--json[Output JSON]' \\
847
+ '--quiet[Suppress stdout]'
848
+ ;;
849
+ test-runs)
850
+ _arguments \\
851
+ '1:subcommand:(list status logs stop resume)' \\
852
+ '--status[Filter by background run status]:status:(queued running passed failed stopped canceled)' \\
853
+ '--limit[Limit returned runs]:number' \\
854
+ '--stream[Background log stream]:stream:(stdout stderr both)' \\
855
+ '--tail[Tail number of lines]:number' \\
856
+ '--force[Force stop with SIGKILL]' \\
857
+ '--author[Resume author]:author' \\
858
+ '--json[Output JSON]' \\
859
+ '--quiet[Suppress stdout]'
860
+ ;;
861
+ init)
862
+ _arguments \\
863
+ '(1)--id-prefix[Set the item ID prefix]:prefix' \\
864
+ '(1)--prefix[Alias for --id-prefix]:prefix' \\
865
+ '1:optional id prefix or tracker path' \\
866
+ '--preset[Governance preset for new setups]:preset:(minimal default strict)' \\
867
+ '--defaults[Use non-interactive setup defaults]' \\
868
+ '-y[Alias for --defaults]' \\
869
+ '--yes[Alias for --defaults]' \\
870
+ '--author[Set the default mutation author for this project]:author' \\
871
+ '--agent-guidance[Agent guidance mode]:mode:(ask add skip status)' \\
872
+ '--type-preset[Register domain item types]:type-preset:(agile ops research)' \\
873
+ '--with-packages[Install bundled first-party packages during initialization]' \\
874
+ '--verbose[Include the full resolved settings tree in init output]' \\
875
+ '--json[Output JSON]' \\
876
+ '--quiet[Suppress stdout]'
877
+ ;;
878
+ config)
879
+ _arguments \\
880
+ '--criterion[Criteria value for definition-of-done metadata-required-fields or lifecycle pattern keys (repeatable for set)]:criterion' \\
881
+ '--clear-criteria[Clear config criteria-list key values]' \\
882
+ '--format[Item format for item-format key]:format:(toon)' \\
883
+ '--policy[Policy value for supported policy keys]:policy' \\
884
+ '--json[Output JSON]' \\
885
+ '--quiet[Suppress stdout]'
886
+ ;;
887
+ close)
888
+ _arguments \\
889
+ '--release-assignment[Close and release assignment]' \\
890
+ '--reason[Closure reason]:reason' \\
891
+ '--close-reason[Alias for --reason]:close_reason' \\
892
+ '--author[Mutation author]:author' \\
893
+ '--message[History message]:message' \\
894
+ '--validate-close[Validate closure metadata mode]:(off warn strict)' \\
895
+ '--resolution[Closure resolution summary]:resolution' \\
896
+ '--expected-result[Expected behavior note]:expected_result' \\
897
+ '--actual-result[Observed behavior note]:actual_result' \\
898
+ '--expected[Short alias for --expected-result]:expected_result' \\
899
+ '--actual[Short alias for --actual-result]:actual_result' \\
900
+ '--force[Force override]' \\
901
+ '--json[Output JSON]' \\
902
+ '--quiet[Suppress stdout]'
903
+ ;;
904
+ claim)
905
+ _arguments \\
906
+ '--start[Claim and start work]' \\
907
+ '--author[Mutation author]:author' \\
908
+ '--message[History message]:message' \\
909
+ '--force[Force override]' \\
910
+ '--if-available[Skip work held by another author]' \\
911
+ '--next[Atomically claim the next actionable item]' \\
912
+ '--type[Filter --next candidates by type]:(${typeChoices})' \\
913
+ '--tag[Filter --next candidates by tag]:(${zshTagChoices})' \\
914
+ '--priority[Filter --next candidates by priority]:(0 1 2 3 4)' \\
915
+ '--assignee-filter[Filter --next candidates by ownership]:assignee_filter:(assigned unassigned)' \\
916
+ '--parent[Scope --next candidates to a subtree]:parent' \\
917
+ '--sprint[Filter --next candidates by sprint]:sprint' \\
918
+ '--release[Filter --next candidates by release]:release' \\
919
+ '--max-attempts[Bound the --next candidate walk]:max_attempts' \\
920
+ '--include-decisions[Allow human-gated Decision candidates]' \\
921
+ '--token-budget[Bound ranked candidate tokens]:token_budget' \\
922
+ '--explain-ranking[Include ranking provenance]' \\
923
+ '--json[Output JSON]' \\
924
+ '--quiet[Suppress stdout]'
925
+ ;;
926
+ release)
927
+ _arguments \\
928
+ '--pause[Return to open and release ownership]' \\
929
+ '--author[Mutation author]:author' \\
930
+ '--message[History message]:message' \\
931
+ '--force[Force override]' \\
932
+ '--json[Output JSON]' \\
933
+ '--quiet[Suppress stdout]'
934
+ ;;
935
+ delete)
936
+ _arguments \\
937
+ '--dry-run[Preview the item file that would be deleted without mutating]' \\
938
+ '--author[Mutation author]:author' \\
939
+ '--message[History message]:message' \\
940
+ '--force[Force override]' \\
941
+ '--json[Output JSON]' \\
942
+ '--quiet[Suppress stdout]'
943
+ ;;
944
+ restore)
945
+ _arguments \\
946
+ ${renderZshArgumentSpecs(RESTORE_INVOCATIONS.map(flag=>`'${flag.flag}[${flag.description}]${flag.takes_value?":value":""}'`),{trailingContinuation:false})}
947
+ ;;
948
+ start-task|pause-task)
949
+ _arguments \\
950
+ '--author[Mutation author]:author' \\
951
+ '--message[History message]:message' \\
952
+ '--force[Force override]' \\
953
+ '--json[Output JSON]' \\
954
+ '--quiet[Suppress stdout]'
955
+ ;;
956
+ close-task)
957
+ _arguments \\
958
+ '--author[Mutation author]:author' \\
959
+ '--message[History message]:message' \\
960
+ '--validate-close[Validate closure metadata mode]:(off warn strict)' \\
961
+ '--force[Force override]' \\
962
+ '--json[Output JSON]' \\
963
+ '--quiet[Suppress stdout]'
964
+ ;;
965
+ validate)
966
+ _arguments \\
967
+ '--check-completeness[Check declarative required fields]' \\
968
+ '--check-metadata[Run metadata completeness checks]' \\
969
+ '--metadata-profile[Select metadata validation profile for --check-metadata]:(core strict custom)' \\
970
+ '--check-resolution[Run closed-item resolution metadata checks]' \\
971
+ '--check-lifecycle[Run active-item lifecycle governance drift checks]' \\
972
+ '--check-stale-blockers[Include stale blocker-pattern diagnostics in lifecycle checks]' \\
973
+ '--dependency-cycle-severity[Set dependency-cycle warning policy for lifecycle checks]:(off warn error)' \\
974
+ '--parent-cycle-severity[Set parent-hierarchy cycle warning policy for lifecycle checks]:(off warn error)' \\
975
+ '--check-files[Run linked-file and orphaned-file checks]' \\
976
+ '--scan-mode[Select file candidate scan mode for --check-files]:(default tracked-all tracked-all-strict)' \\
977
+ '--include-pm-internals[Include PM storage internals in tracked-all candidate scans]' \\
978
+ '--verbose-file-lists[Include full file-path lists for validate --check-files details]' \\
979
+ '--verbose-diagnostics[Include full validate diagnostic ID lists instead of compact summaries]' \\
980
+ '--all-affected-ids[Emit complete missing_* affected-ID lists with no truncation (implied by --json)]' \\
981
+ '--strict-exit[Return non-zero exit when validation warnings are present]' \\
982
+ '--fail-on-warn[Alias for --strict-exit]' \\
983
+ '--fix-hints[Add a machine-executable fix_hints[] of pm commands to each failing check]' \\
984
+ '--auto-fix[Apply the safe, deterministic subset of fix-hint remediations automatically]' \\
985
+ '--dry-run[Preview planned --auto-fix/--prune-missing fixes without applying them]' \\
986
+ '--fix-scope[Grant --auto-fix scopes (estimates/timestamps/lifecycle require opt-in)]:(metadata resolution estimates timestamps lifecycle)' \\
987
+ '--prune-missing[Remove stale linked-file/doc links classified as deleted]' \\
988
+ '--check-history-drift[Run item/history hash drift checks]' \\
989
+ '--check-command-references[Run linked-command PM-ID reference checks]' \\
990
+ '--json[Output JSON]' \\
991
+ '--quiet[Suppress stdout]'
992
+ ;;
993
+ health)
994
+ _arguments \\
995
+ '--strict-directories[Treat optional item-type directories as required failures]' \\
996
+ '--check-only[Run read-only health diagnostics without refreshing vectors]' \\
997
+ '--no-refresh[Disable automatic vector refresh attempts during health checks]' \\
998
+ '--refresh-vectors[Explicitly enable vector refresh attempts during health checks]' \\
999
+ '--verbose-stale-items[Include full stale vectorization ID lists in health output]' \\
1000
+ '--verbose-author-events[Include complete actionable unknown-author coordinates]' \\
1001
+ '--brief[Emit compact health details for low-token agent checks]' \\
1002
+ '--summary[Emit one-line-style health status with check names and warning count]' \\
1003
+ '--strict-exit[Return non-zero exit when health warnings are present]' \\
1004
+ '--fail-on-warn[Alias for --strict-exit]' \\
1005
+ '--json[Output JSON]' \\
1006
+ '--quiet[Suppress stdout]'
1007
+ ;;
1008
+ extension)
1009
+ _arguments \\
1010
+ '1:extension_action:(${EXTENSION_LIFECYCLE_ACTIONS})' \\
1011
+ '--init[Generate a starter extension scaffold at target path]' \\
1012
+ '--scaffold[Alias for --init]' \\
1013
+ '--capability[Capability the init scaffold targets]:capability:(${SCAFFOLD_CAPABILITIES.join(" ")})' \\
1014
+ '--install[Install extension from local path or GitHub source]' \\
1015
+ '--uninstall[Uninstall extension by name]' \\
1016
+ '--explore[List discovered extensions for selected scope]' \\
1017
+ '--manage[List managed extensions with update metadata]' \\
1018
+ '--describe[Map every surface a loaded extension registers]' \\
1019
+ '--markdown[Render describe output as a Markdown reference document]' \\
1020
+ '--output[Write describe Markdown to a file]:path:_files' \\
1021
+ '--reload[Reload extensions with cache-busted module imports]' \\
1022
+ '--watch[Enable watch mode with --reload]' \\
1023
+ '--doctor[Run consolidated extension diagnostics (summary/deep)]' \\
1024
+ '--catalog[List bundled first-party package catalog entries]' \\
1025
+ '--adopt[Adopt an unmanaged extension into managed metadata]' \\
1026
+ '--adopt-all[Adopt all unmanaged extensions into managed metadata]' \\
1027
+ '--activate[Activate extension in selected scope settings]' \\
1028
+ '--deactivate[Deactivate extension in selected scope settings]' \\
1029
+ '--project[Use project extension scope (default)]' \\
1030
+ '--local[Alias for --project]' \\
1031
+ '--global[Use global extension scope]' \\
1032
+ '--gh[Install from GitHub shorthand owner/repo/path]:github_spec' \\
1033
+ '--github[Alias for --gh]:github_spec' \\
1034
+ '--ref[Git ref/branch/tag for GitHub source]:git_ref' \\
1035
+ '--detail[Detail mode for extension diagnostics]:detail_mode:(summary deep)' \\
1036
+ '--trace[Include registration traces in doctor deep diagnostics]' \\
1037
+ '--runtime-probe[Opt-in runtime activation probe for manage output]' \\
1038
+ '--fix-managed-state[Adopt unmanaged extensions before diagnostics/update checks]' \\
1039
+ '--isolated[Run doctor against project-scope extensions only]' \\
1040
+ '--ignore-global[Alias for --isolated]' \\
1041
+ '--strict-exit[Return non-zero exit when doctor warnings are present]' \\
1042
+ '--fail-on-warn[Alias for --strict-exit (doctor)]' \\
1043
+ '--json[Output JSON]' \\
1044
+ '--quiet[Suppress stdout]' \\
1045
+ '*:target_or_name:_files -/'
1046
+ ;;
1047
+ package|packages)
1048
+ _arguments \\
1049
+ '1:package_action:(${PACKAGE_LIFECYCLE_ACTIONS})' \\
1050
+ '--init[Generate a starter package scaffold at target path]' \\
1051
+ '--scaffold[Alias for --init]' \\
1052
+ '--capability[Capability the init scaffold targets]:capability:(${SCAFFOLD_CAPABILITIES.join(" ")})' \\
1053
+ '--declarative[Generate a composeExtension blueprint starter]' \\
1054
+ '--install[Install package from local path, GitHub source, npm source, or bundled alias]' \\
1055
+ '--uninstall[Uninstall package by name]' \\
1056
+ '--explore[List discovered packages for selected scope]' \\
1057
+ '--manage[List managed packages with update metadata]' \\
1058
+ '--describe[Map every surface a loaded package registers]' \\
1059
+ '--markdown[Render describe output as a Markdown reference document]' \\
1060
+ '--output[Write describe Markdown to a file]:path:_files' \\
1061
+ '--reload[Reload packages with cache-busted module imports]' \\
1062
+ '--watch[Enable watch mode with --reload]' \\
1063
+ '--doctor[Run consolidated package diagnostics (summary/deep)]' \\
1064
+ '--catalog[List bundled first-party package catalog entries]' \\
1065
+ '--adopt[Adopt an unmanaged package into managed metadata]' \\
1066
+ '--adopt-all[Adopt all unmanaged packages into managed metadata]' \\
1067
+ '--activate[Activate package in selected scope settings]' \\
1068
+ '--deactivate[Deactivate package in selected scope settings]' \\
1069
+ '--project[Use project package scope (default)]' \\
1070
+ '--local[Alias for --project]' \\
1071
+ '--global[Use global package scope]' \\
1072
+ '--gh[Install from GitHub shorthand owner/repo/path]:github_spec' \\
1073
+ '--github[Alias for --gh]:github_spec' \\
1074
+ '--ref[Git ref/branch/tag for GitHub source]:git_ref' \\
1075
+ '--detail[Detail mode for package diagnostics]:detail_mode:(summary deep)' \\
1076
+ '--trace[Include registration traces in doctor deep diagnostics]' \\
1077
+ '--runtime-probe[Opt-in runtime activation probe for manage output]' \\
1078
+ '--fix-managed-state[Adopt unmanaged packages before diagnostics/update checks]' \\
1079
+ '--isolated[Run doctor against project-scope packages only]' \\
1080
+ '--ignore-global[Alias for --isolated]' \\
1081
+ '--strict-exit[Return non-zero exit when doctor warnings are present]' \\
1082
+ '--fail-on-warn[Alias for --strict-exit (doctor)]' \\
1083
+ '--dry-run[Plan upgrades without mutating]' \\
1084
+ '--cli-only[Upgrade only the pm CLI/SDK npm package]' \\
1085
+ '--packages-only[Upgrade only managed pm packages]' \\
1086
+ '--repair[Force npm global reinstall for the CLI/SDK]' \\
1087
+ '--tag[npm version or dist-tag for upgrades]:tag' \\
1088
+ '--package-name[Override the CLI package name]:package_name' \\
1089
+ '--json[Output JSON]' \\
1090
+ '--quiet[Suppress stdout]' \\
1091
+ '*:target_or_name:_files -/'
1092
+ ;;
1093
+ completion)
1094
+ _arguments \\
1095
+ '--eager-tags[Embed current tracker tags directly in script output]' \\
1096
+ '1:shell:(bash zsh fish)'
1097
+ ;;
1098
+ templates)
1099
+ local -a templates_cmds
1100
+ templates_cmds=('save:Save or update a create template' 'list:List saved create templates' 'show:Show saved template details')
1101
+ _describe 'templates command' templates_cmds
1102
+ ;;
1103
+ esac
1104
+ ;;
1105
+ esac
1106
+ }
1107
+
1108
+ compdef _pm pm`}export{generateZshScript};
1109
+ //# sourceMappingURL=zsh.js.map