@unbrained/pm-cli 2026.5.10 → 2026.5.11
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.
- package/.claude-plugin/marketplace.json +4 -4
- package/.pi/README.md +10 -1
- package/.pi/agents/pm-triage-agent.md +19 -0
- package/.pi/agents/pm-verification-agent.md +21 -0
- package/.pi/chains/pm-native-delivery.chain.md +11 -0
- package/.pi/extensions/pm-cli/index.js +276 -36
- package/.pi/skills/pm-native/SKILL.md +6 -2
- package/CHANGELOG.md +7 -0
- package/README.md +9 -1
- package/dist/cli/argv-utils.d.ts +5 -0
- package/dist/cli/argv-utils.js +34 -0
- package/dist/cli/argv-utils.js.map +1 -0
- package/dist/cli/bootstrap-args.d.ts +15 -0
- package/dist/cli/bootstrap-args.js +211 -0
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.js +109 -3
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/completion.js +7 -3
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/contracts.d.ts +19 -0
- package/dist/cli/commands/contracts.js +33 -1
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.js +112 -51
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/docs.js +9 -2
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +3 -1
- package/dist/cli/commands/extension.js +174 -2
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/files.js +9 -2
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.js +21 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/metadata-normalizers.d.ts +4 -0
- package/dist/cli/commands/metadata-normalizers.js +37 -0
- package/dist/cli/commands/metadata-normalizers.js.map +1 -0
- package/dist/cli/commands/reindex.js +173 -135
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.js +16 -6
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test.js +9 -2
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update.js +70 -39
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/error-guidance.d.ts +9 -1
- package/dist/cli/error-guidance.js +147 -6
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/help-json-payload.js +11 -1
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.js +69 -6
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-setup.js +14 -0
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/telemetry-flush.d.ts +2 -0
- package/dist/cli/telemetry-flush.js +4 -0
- package/dist/cli/telemetry-flush.js.map +1 -0
- package/dist/cli.js +1 -2
- package/dist/cli.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +72 -0
- package/dist/core/extensions/extension-types.js +24 -0
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -0
- package/dist/core/extensions/loader.js +766 -7
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/lock/lock.js +2 -0
- package/dist/core/lock/lock.js.map +1 -1
- package/dist/core/sentry/instrument.d.ts +15 -0
- package/dist/core/sentry/instrument.js +35 -3
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/shared/constants.js +20 -0
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +8 -0
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/levenshtein.d.ts +1 -0
- package/dist/core/shared/levenshtein.js +37 -0
- package/dist/core/shared/levenshtein.js.map +1 -0
- package/dist/core/store/paths.js +34 -1
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings.js +210 -1
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +1 -0
- package/dist/core/telemetry/runtime.js +102 -3
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.js +3 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/pi/native.js +57 -4
- package/dist/pi/native.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +21 -1
- package/dist/sdk/cli-contracts.js +250 -0
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +12 -1
- package/dist/sdk/index.js +8 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/types.d.ts +41 -0
- package/dist/types.js.map +1 -1
- package/docs/CLAUDE_CODE_PLUGIN.md +39 -0
- package/docs/EXTENSIONS.md +687 -0
- package/docs/MIGRATION_CLI_SIMPLIFICATION.md +64 -0
- package/docs/PI_PACKAGE.md +95 -10
- package/docs/SDK.md +441 -0
- package/docs/examples/ci/github-actions-pm-extension-gate.yml +53 -0
- package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +41 -0
- package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +45 -0
- package/docs/examples/policy-restricted-extension/README.md +74 -0
- package/docs/examples/policy-restricted-extension/index.js +21 -0
- package/docs/examples/policy-restricted-extension/manifest.json +21 -0
- package/docs/examples/policy-restricted-extension/package.json +8 -0
- package/docs/examples/sdk-app-embedding/README.md +39 -0
- package/docs/examples/sdk-app-embedding/package.json +9 -0
- package/docs/examples/sdk-app-embedding/run-embedded-pm.mjs +61 -0
- package/docs/examples/sdk-contract-consumer/README.md +57 -0
- package/docs/examples/sdk-contract-consumer/inspect-contracts.mjs +47 -0
- package/docs/examples/sdk-contract-consumer/package.json +10 -0
- package/docs/examples/starter-extension/README.md +57 -42
- package/docs/examples/starter-extension/manifest.json +15 -0
- package/marketplace.json +3 -3
- package/package.json +1 -1
- package/plugins/pm-cli-claude/.claude-plugin/plugin.json +2 -2
- package/plugins/pm-cli-claude/README.md +55 -14
- package/plugins/pm-cli-claude/agents/pm-delivery-chain.md +88 -0
- package/plugins/pm-cli-claude/agents/pm-triage-agent.md +83 -0
- package/plugins/pm-cli-claude/agents/pm-verification-agent.md +88 -0
- package/plugins/pm-cli-claude/hooks/session-start.mjs +87 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.js","sourceRoot":"/","sources":["cli/commands/completion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAUvD,MAAM,YAAY,GAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAChE,MAAM,kBAAkB,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC;AACzD,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAShG,MAAM,YAAY,GAAG,CAAC,GAAG,qBAAqB,CAAC,CAAC;AAChD,MAAM,UAAU,GAAG,sBAAsB,CAAC,0BAA0B,CAAC,CAAC;AACtE,MAAM,YAAY,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;AACnE,MAAM,YAAY,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;AACnE,MAAM,YAAY,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;AACnE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CAAC;IACjD,IAAI,MAAc,CAAC;IACnB,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;QAC1B,MAAM,GAAG,kBAAkB,CAAC,SAAS,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;SAAM,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;QAChC,MAAM,GAAG,iBAAiB,CAAC,SAAS,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;IACjE,CAAC;SAAM,CAAC;QACN,MAAM,GAAG,kBAAkB,CAAC,SAAS,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;IAClE,CAAC;IACD,OAAO;QACL,KAAK,EAAE,UAAU;QACjB,MAAM;QACN,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC;KACpC,CAAC;AACJ,CAAC","sourcesContent":["import { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport {\n ACTIVITY_FLAG_CONTRACTS,\n APPEND_FLAG_CONTRACTS,\n CALENDAR_FLAG_CONTRACTS,\n COMPLETION_FLAG_CONTRACTS,\n CONTRACTS_FLAG_CONTRACTS,\n CONTEXT_FLAG_CONTRACTS,\n CREATE_FLAG_CONTRACTS,\n DEPS_FLAG_CONTRACTS,\n GUIDE_FLAG_CONTRACTS,\n GLOBAL_FLAG_CONTRACTS,\n HEALTH_FLAG_CONTRACTS,\n INIT_FLAG_CONTRACTS,\n LIST_FILTER_FLAG_CONTRACTS,\n NORMALIZE_FLAG_CONTRACTS,\n PM_CORE_COMMAND_NAMES,\n SEARCH_FLAG_CONTRACTS,\n UPDATE_FLAG_CONTRACTS,\n UPDATE_MANY_FLAG_CONTRACTS,\n toCompletionFlagString,\n} from \"../../sdk/cli-contracts.js\";\nimport { BUILTIN_ITEM_TYPE_VALUES } from \"../../types/index.js\";\nimport { listGuideTopicIds } from \"../guide-topics.js\";\n\nexport type CompletionShell = \"bash\" | \"zsh\" | \"fish\";\n\nexport interface CompletionResult {\n shell: CompletionShell;\n script: string;\n setup_hint: string;\n}\n\nconst VALID_SHELLS: CompletionShell[] = [\"bash\", \"zsh\", \"fish\"];\nconst DEFAULT_ITEM_TYPES = [...BUILTIN_ITEM_TYPE_VALUES];\nconst DEFAULT_STATUS_VALUES = [\"draft\", \"open\", \"in_progress\", \"blocked\", \"closed\", \"canceled\"];\n\ntype CompletionFlagCommand = \"list\" | \"create\" | \"update\" | \"update-many\" | \"search\" | \"calendar\" | \"context\";\n\nexport interface CompletionRuntimeConfig {\n statuses?: string[];\n command_flags?: Partial<Record<CompletionFlagCommand, string[]>>;\n}\n\nconst ALL_COMMANDS = [...PM_CORE_COMMAND_NAMES];\nconst LIST_FLAGS = toCompletionFlagString(LIST_FILTER_FLAG_CONTRACTS);\nconst APPEND_FLAGS = toCompletionFlagString(APPEND_FLAG_CONTRACTS);\nconst CREATE_FLAGS = toCompletionFlagString(CREATE_FLAG_CONTRACTS);\nconst UPDATE_FLAGS = toCompletionFlagString(UPDATE_FLAG_CONTRACTS);\nconst UPDATE_MANY_FLAGS = toCompletionFlagString(UPDATE_MANY_FLAG_CONTRACTS);\nconst NORMALIZE_FLAGS = toCompletionFlagString(NORMALIZE_FLAG_CONTRACTS);\nconst ACTIVITY_FLAGS = toCompletionFlagString(ACTIVITY_FLAG_CONTRACTS);\nconst CALENDAR_FLAGS = toCompletionFlagString(CALENDAR_FLAG_CONTRACTS);\nconst CONTEXT_FLAGS = toCompletionFlagString(CONTEXT_FLAG_CONTRACTS);\nconst DEPS_FLAGS = toCompletionFlagString(DEPS_FLAG_CONTRACTS);\nconst GUIDE_FLAGS = toCompletionFlagString(GUIDE_FLAG_CONTRACTS);\nconst SEARCH_FLAGS = toCompletionFlagString(SEARCH_FLAG_CONTRACTS);\nconst HEALTH_FLAGS = toCompletionFlagString(HEALTH_FLAG_CONTRACTS);\nconst INIT_FLAGS = toCompletionFlagString(INIT_FLAG_CONTRACTS);\nconst CONTRACTS_FLAGS = toCompletionFlagString(CONTRACTS_FLAG_CONTRACTS);\nconst COMPLETION_FLAGS = toCompletionFlagString(COMPLETION_FLAG_CONTRACTS);\nconst COMPLETION_SHELL_CHOICES = `${COMPLETION_FLAGS} bash zsh fish`;\nconst GUIDE_TOPIC_CHOICES = joinCompletionValues(listGuideTopicIds());\n\nconst MUTATION_FLAGS = \"--author --message --force --json --quiet --path --no-extensions --no-pager --profile --help\";\nconst CLOSE_MUTATION_FLAGS = \"--author --message --validate-close --force --json --quiet --path --no-extensions --no-pager --profile --help\";\nconst RELEASE_MUTATION_FLAGS =\n \"--allow-audit-release --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help\";\n\nconst GLOBAL_FLAGS = GLOBAL_FLAG_CONTRACTS.flatMap((entry) => [entry.short, entry.flag])\n .filter((value): value is string => Boolean(value))\n .join(\" \");\n\nfunction joinCompletionValues(values: string[]): string {\n return [...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))]\n .sort((left, right) => left.localeCompare(right))\n .join(\" \");\n}\n\nfunction mergeFlagStrings(baseFlags: string, runtimeFlags: string[] | undefined): string {\n const merged = [...baseFlags.split(/\\s+/u).filter((value) => value.length > 0), ...(runtimeFlags ?? [])];\n return joinCompletionValues(merged);\n}\n\nexport function generateBashScript(\n itemTypes: string[] = DEFAULT_ITEM_TYPES,\n tags: string[] = [],\n eagerTagExpansion = false,\n runtime: CompletionRuntimeConfig = {},\n): string {\n const cmds = ALL_COMMANDS.join(\" \");\n const typeValues = itemTypes.join(\" \");\n const statusValues = joinCompletionValues(runtime.statuses ?? DEFAULT_STATUS_VALUES);\n const tagValues = joinCompletionValues(tags);\n const listFlags = mergeFlagStrings(LIST_FLAGS, runtime.command_flags?.list);\n const createFlags = mergeFlagStrings(CREATE_FLAGS, runtime.command_flags?.create);\n const updateFlags = mergeFlagStrings(UPDATE_FLAGS, runtime.command_flags?.update);\n const updateManyFlags = mergeFlagStrings(UPDATE_MANY_FLAGS, runtime.command_flags?.[\"update-many\"]);\n const normalizeFlags = NORMALIZE_FLAGS;\n const searchFlags = mergeFlagStrings(SEARCH_FLAGS, runtime.command_flags?.search);\n const calendarFlags = mergeFlagStrings(CALENDAR_FLAGS, runtime.command_flags?.calendar);\n const contextFlags = mergeFlagStrings(CONTEXT_FLAGS, runtime.command_flags?.context);\n const useEagerTagExpansion = eagerTagExpansion || tags.length > 0;\n // Note: \"${...}\" inside regular (non-template) strings are literal characters,\n // not JS interpolation. Only backtick template literals interpolate ${...}.\n const compgen = (flags: string): string => `$(compgen -W \"${flags}\" -- \"$cur\")`;\n return [\n \"# bash completion for pm\",\n '# Source this file or add \\'eval \"$(pm completion bash)\"\\' to ~/.bashrc',\n \"\",\n \"_pm_completion() {\",\n \" local cur prev words cword\",\n \" _init_completion 2>/dev/null || {\",\n ' cur=\"${COMP_WORDS[COMP_CWORD]}\"',\n ' prev=\"${COMP_WORDS[COMP_CWORD-1]}\"',\n \" cword=$COMP_CWORD\",\n \" }\",\n \"\",\n \" if [[ $cword -eq 1 ]]; then\",\n ` COMPREPLY=(${compgen(cmds)})`,\n \" return 0\",\n \" fi\",\n \"\",\n ' if [[ \"$prev\" == \"--type\" ]]; then',\n ` COMPREPLY=(${compgen(typeValues)})`,\n \" return 0\",\n \" fi\",\n \"\",\n ' if [[ \"$prev\" == \"--status\" ]]; then',\n ` COMPREPLY=(${compgen(statusValues)})`,\n \" return 0\",\n \" fi\",\n \"\",\n ...(useEagerTagExpansion\n ? [\n ' if [[ \"$prev\" == \"--tag\" ]]; then',\n ` COMPREPLY=(${compgen(tagValues)})`,\n \" return 0\",\n \" fi\",\n ]\n : [\n ' if [[ \"$prev\" == \"--tag\" ]]; then',\n ' local now ttl cache_ts tag_values',\n ' now=\"$(date +%s 2>/dev/null || echo 0)\"',\n ' ttl=\"${PM_COMPLETION_TAG_TTL:-120}\"',\n ' cache_ts=\"${PM_COMPLETION_TAG_CACHE_TS:-0}\"',\n ' tag_values=\"${PM_COMPLETION_TAG_CACHE:-}\"',\n ' if [[ -z \"$tag_values\" || \"$now\" -eq 0 || $((now - cache_ts)) -ge \"$ttl\" ]]; then',\n ' tag_values=\"$(pm completion-tags 2>/dev/null)\"',\n ' PM_COMPLETION_TAG_CACHE=\"$tag_values\"',\n ' PM_COMPLETION_TAG_CACHE_TS=\"$now\"',\n \" fi\",\n ' COMPREPLY=($(compgen -W \"$tag_values\" -- \"$cur\"))',\n \" return 0\",\n \" fi\",\n ]),\n \"\",\n ' local cmd=\"${COMP_WORDS[1]}\"',\n \"\",\n ' case \"$cmd\" in',\n \" list|list-all|list-draft|list-open|list-in-progress|list-blocked|list-closed|list-canceled)\",\n ` COMPREPLY=(${compgen(listFlags)})`,\n \" ;;\",\n \" aggregate)\",\n ` COMPREPLY=(${compgen(\"--group-by --count --include-unparented --status --type --tag --priority --deadline-before --deadline-after --assignee --assignee-filter --parent --sprint --release --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" dedupe-audit)\",\n ` COMPREPLY=(${compgen(\"--mode --limit --threshold --status --type --tag --priority --deadline-before --deadline-after --assignee --assignee-filter --parent --sprint --release --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" create)\",\n ` COMPREPLY=(${compgen(createFlags)})`,\n \" ;;\",\n \" update)\",\n ` COMPREPLY=(${compgen(updateFlags)})`,\n \" ;;\",\n \" update-many)\",\n ` COMPREPLY=(${compgen(updateManyFlags)})`,\n \" ;;\",\n \" normalize)\",\n ` COMPREPLY=(${compgen(normalizeFlags)})`,\n \" ;;\",\n \" calendar|cal)\",\n ` COMPREPLY=(${compgen(calendarFlags)})`,\n \" ;;\",\n \" context|ctx)\",\n ` COMPREPLY=(${compgen(contextFlags)})`,\n \" ;;\",\n \" guide)\",\n ` COMPREPLY=(${compgen(`${GUIDE_FLAGS} ${GUIDE_TOPIC_CHOICES}`)})`,\n \" ;;\",\n \" search)\",\n ` COMPREPLY=(${compgen(searchFlags)})`,\n \" ;;\",\n \" reindex)\",\n ` COMPREPLY=(${compgen(\"--mode --progress --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" init)\",\n ` COMPREPLY=(${compgen(`${INIT_FLAGS} --json --quiet --path --no-extensions --no-pager --profile --help`)})`,\n \" ;;\",\n \" config)\",\n ` COMPREPLY=(${compgen(\"--criterion --clear-criteria --format --policy --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" extension)\",\n ` COMPREPLY=(${compgen(\"init scaffold install uninstall explore manage doctor adopt adopt-all activate deactivate --init --scaffold --install --uninstall --explore --manage --doctor --adopt --adopt-all --activate --deactivate --project --local --global --gh --github --ref --detail --trace --runtime-probe --fix-managed-state --strict-exit --fail-on-warn --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" comments)\",\n ` COMPREPLY=(${compgen(\"--add --stdin --file --limit --author --message --allow-audit-comment --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" comments-audit)\",\n ` COMPREPLY=(${compgen(\"--status --type --tag --priority --parent --sprint --release --assignee --assignee-filter --limit-items --limit --full-history --latest --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" notes)\",\n ` COMPREPLY=(${compgen(\"--add --limit --author --message --allow-audit-note --allow-audit-comment --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" learnings)\",\n ` COMPREPLY=(${compgen(\"--add --limit --author --message --allow-audit-learning --allow-audit-comment --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" files)\",\n ` COMPREPLY=(${compgen(\"discover --add --add-glob --remove --migrate --list --apply --note --append-stable --validate-paths --audit --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" docs)\",\n ` COMPREPLY=(${compgen(\"--add --add-glob --remove --migrate --validate-paths --audit --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" append)\",\n ` COMPREPLY=(${compgen(APPEND_FLAGS)})`,\n \" ;;\",\n \" deps)\",\n ` COMPREPLY=(${compgen(DEPS_FLAGS)})`,\n \" ;;\",\n \" test)\",\n ` COMPREPLY=(${compgen(\"--add --remove --run --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" test-all)\",\n ` COMPREPLY=(${compgen(\"--status --limit --offset --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" test-runs)\",\n ` COMPREPLY=(${compgen(\"list status logs stop resume --status --limit --stream --tail --force --author --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" validate)\",\n ` COMPREPLY=(${compgen(\"--check-metadata --metadata-profile --check-resolution --check-lifecycle --check-stale-blockers --dependency-cycle-severity --check-files --scan-mode --include-pm-internals --verbose-file-lists --strict-exit --fail-on-warn --check-history-drift --check-command-references --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" health)\",\n ` COMPREPLY=(${compgen(HEALTH_FLAGS)})`,\n \" ;;\",\n \" history)\",\n ` COMPREPLY=(${compgen(\"--limit --diff --verify --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" activity)\",\n ` COMPREPLY=(${compgen(ACTIVITY_FLAGS)})`,\n \" ;;\",\n \" contracts)\",\n ` COMPREPLY=(${compgen(CONTRACTS_FLAGS)})`,\n \" ;;\",\n \" gc)\",\n ` COMPREPLY=(${compgen(\"--dry-run --scope --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" close|close-task)\",\n ` COMPREPLY=(${compgen(CLOSE_MUTATION_FLAGS)})`,\n \" ;;\",\n \" release)\",\n ` COMPREPLY=(${compgen(RELEASE_MUTATION_FLAGS)})`,\n \" ;;\",\n \" claim|delete|restore|start-task|pause-task)\",\n ` COMPREPLY=(${compgen(MUTATION_FLAGS)})`,\n \" ;;\",\n \" completion)\",\n ` COMPREPLY=(${compgen(COMPLETION_SHELL_CHOICES)})`,\n \" ;;\",\n \" templates)\",\n ` COMPREPLY=(${compgen(\"save list show\")})`,\n \" ;;\",\n \" *)\",\n ` COMPREPLY=(${compgen(GLOBAL_FLAGS)})`,\n \" ;;\",\n \" esac\",\n \" return 0\",\n \"}\",\n \"\",\n \"complete -F _pm_completion pm\",\n ].join(\"\\n\");\n}\n\nexport function generateZshScript(\n itemTypes: string[] = DEFAULT_ITEM_TYPES,\n tags: string[] = [],\n eagerTagExpansion = false,\n): string {\n const cmds = ALL_COMMANDS.map((c) => `'${c}'`).join(\" \");\n const typeChoices = itemTypes.join(\" \");\n const guideTopicChoices = GUIDE_TOPIC_CHOICES;\n const tagChoices = joinCompletionValues(tags);\n const useEagerTagExpansion = eagerTagExpansion || tags.length > 0;\n const zshTagChoices = useEagerTagExpansion ? tagChoices : '${(f)\"$(_pm_tag_choices)\"}';\n const dynamicTagResolver = useEagerTagExpansion\n ? \"\"\n : `\n_pm_tag_choices() {\n local now ttl cache_ts\n now=\\${EPOCHSECONDS:-0}\n ttl=\\${PM_COMPLETION_TAG_TTL:-120}\n cache_ts=\\${PM_COMPLETION_TAG_CACHE_TS:-0}\n if [[ -n \"\\${PM_COMPLETION_TAG_CACHE:-}\" && \"$now\" -ne 0 && $((now - cache_ts)) -lt \"$ttl\" ]]; then\n print -r -- \"$PM_COMPLETION_TAG_CACHE\"\n return\n fi\n PM_COMPLETION_TAG_CACHE=\"$(pm completion-tags 2>/dev/null)\"\n PM_COMPLETION_TAG_CACHE_TS=\"$now\"\n print -r -- \"$PM_COMPLETION_TAG_CACHE\"\n}\n`;\n return `#compdef pm\n# zsh completion for pm\n# Source this file or add 'eval \"$(pm completion zsh)\"' to ~/.zshrc\n\n_pm_commands() {\n local -a commands\n commands=(\n 'init:Initialize pm storage for the current workspace'\n 'config:Read or update pm settings'\n 'extension:Manage extension lifecycle operations'\n 'create:Create a new project management item'\n 'list:List active items with optional filters'\n 'list-all:List all items with optional filters'\n 'list-draft:List draft items with optional filters'\n 'list-open:List open items with optional filters'\n 'list-in-progress:List in-progress items with optional filters'\n 'list-blocked:List blocked items with optional filters'\n 'list-closed:List closed items with optional filters'\n 'list-canceled:List canceled items with optional filters'\n 'aggregate:Aggregate grouped item counts for governance queries'\n 'dedupe-audit:Audit potential duplicate items and emit merge suggestions'\n 'guide:Browse local progressive-disclosure guides'\n 'calendar:Show calendar views for deadlines and reminders'\n 'cal:Alias for calendar'\n 'context:Show a token-efficient project context snapshot'\n 'ctx:Alias for context'\n 'get:Show item details by ID'\n 'search:Search items with keyword, semantic, or hybrid modes'\n 'reindex:Rebuild search artifacts'\n 'history:Show item history entries'\n 'activity:Show recent activity across items'\n 'restore:Restore an item to an earlier state'\n 'update:Update item fields and metadata'\n 'update-many:Bulk-update matched items with dry-run and rollback checkpoints'\n 'normalize:Normalize lifecycle metadata with dry-run planning or apply mode'\n 'close:Close an item with a required reason'\n 'delete:Delete an item and record the change'\n 'append:Append text to an item body'\n 'comments:List or add comments for an item'\n 'comments-audit:Audit latest comments or full history across filtered items'\n 'notes:List or add notes for an item'\n 'learnings:List or add learnings for an item'\n 'files:Manage linked files'\n 'docs:Manage linked docs'\n 'deps:Show dependency relationships for an item'\n 'test:Manage linked tests and optionally run them'\n 'test-all:Run linked tests across matching items'\n 'test-runs:Manage background linked-test runs'\n 'stats:Show project tracker statistics'\n 'health:Show project tracker health checks'\n 'validate:Run standalone validation checks'\n 'gc:Clean optional cache artifacts'\n 'contracts:Show machine-readable command and schema contracts'\n 'claim:Claim an item for active work'\n 'release:Release the active claim for an item'\n 'start-task:Lifecycle alias to claim and set in_progress'\n 'pause-task:Lifecycle alias to reopen and release claim'\n 'close-task:Lifecycle alias to close and release claim'\n 'templates:Manage reusable create templates'\n 'completion:Generate shell completion'\n 'help:Display help for a command'\n )\n _describe 'command' commands\n}\n${dynamicTagResolver}\n\n_pm() {\n local context state line\n _arguments -C \\\\\n '--json[Output JSON instead of TOON]' \\\\\n '--quiet[Suppress stdout output]' \\\\\n '--path[Override PM path for this command]:path:_files -/' \\\\\n '--no-extensions[Disable extension loading]' \\\\\n '--no-pager[Disable pager integration for help and long output]' \\\\\n '--profile[Print deterministic timing diagnostics]' \\\\\n '(-V --version)--version[Output the version number]' \\\\\n '(-h --help)--help[Display help]' \\\\\n '1: :_pm_commands' \\\\\n '*:: :->args' && return 0\n\n case $state in\n args)\n case $line[1] in\n list|list-all|list-draft|list-open|list-in-progress|list-blocked|list-closed|list-canceled)\n _arguments \\\\\n '--type[Filter by item type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--deadline-before[Filter by deadline upper bound (ISO/date string or relative)]:date' \\\\\n '--deadline-after[Filter by deadline lower bound (ISO/date string or relative)]:date' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--limit[Limit returned item count]:number' \\\\\n '--offset[Skip the first n matching rows before limit]:number' \\\\\n '--include-body[Include item body in each returned list row]' \\\\\n '--compact[Render compact list projection fields]' \\\\\n '--fields[Render custom comma-separated list fields]:fields' \\\\\n '--sort[Sort field]:(priority deadline updated_at created_at title parent)' \\\\\n '--order[Sort order (requires --sort)]:(asc desc)' \\\\\n '--stream[Emit line-delimited JSON rows (requires --json)]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]' \\\\\n '--path[Override PM path]:path:_files -/'\n ;;\n aggregate)\n _arguments \\\\\n '--group-by[Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)]:fields' \\\\\n '--count[Return grouped counts]' \\\\\n '--include-unparented[Include unparented rows when grouping by parent]' \\\\\n '--status[Filter by status]:(draft open in_progress blocked closed canceled)' \\\\\n '--type[Filter by item type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--deadline-before[Filter by deadline upper bound (ISO/date string or relative)]:date' \\\\\n '--deadline-after[Filter by deadline lower bound (ISO/date string or relative)]:date' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--parent[Filter by parent item ID]:parent_id' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n dedupe-audit)\n _arguments \\\\\n '--mode[Dedupe mode]:(title_exact title_fuzzy parent_scope)' \\\\\n '--limit[Limit returned duplicate clusters]:number' \\\\\n '--threshold[Fuzzy mode token similarity threshold between 0 and 1]:number' \\\\\n '--status[Filter by status]:(draft open in_progress blocked closed canceled)' \\\\\n '--type[Filter by item type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--deadline-before[Filter by deadline upper bound (ISO/date string or relative)]:date' \\\\\n '--deadline-after[Filter by deadline lower bound (ISO/date string or relative)]:date' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--parent[Filter by parent item ID]:parent_id' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n create)\n _arguments \\\\\n '(-t --title)'{-t,--title}'[Item title]:title' \\\\\n '(-d --description)'{-d,--description}'[Item description]:description' \\\\\n '--type[Item type]:(${typeChoices})' \\\\\n '--create-mode[Create required-option policy mode]:(strict progressive)' \\\\\n '--schedule-preset[Scheduling preset for Reminder/Meeting/Event]:(lightweight)' \\\\\n '(-s --status)'{-s,--status}'[Item status]:(draft open in_progress blocked)' \\\\\n '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\\\\n '--tags[Comma-separated tags]:tags' \\\\\n '(-b --body)'{-b,--body}'[Item body]:body' \\\\\n '--deadline[Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)]:deadline' \\\\\n '--estimate[Estimated minutes]:minutes' \\\\\n '--acceptance-criteria[Acceptance criteria]:criteria' \\\\\n '--reminder[Reminder entry at=<iso|relative>,text=<text>]:reminder' \\\\\n '--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event' \\\\\n '--type-option[Type option key=value or key=<name>,value=<value>]:type_option' \\\\\n '--unset[Clear scalar metadata field by name]:field' \\\\\n '--replace-deps[Atomically replace dependencies with provided --dep values]' \\\\\n '--replace-tests[Atomically replace linked tests with provided --test values]' \\\\\n '--clear-deps[Clear dependency entries]' \\\\\n '--clear-comments[Clear comments]' \\\\\n '--clear-notes[Clear notes]' \\\\\n '--clear-learnings[Clear learnings]' \\\\\n '--clear-files[Clear linked files]' \\\\\n '--clear-tests[Clear linked tests]' \\\\\n '--clear-docs[Clear linked docs]' \\\\\n '--clear-reminders[Clear reminders]' \\\\\n '--clear-events[Clear events]' \\\\\n '--clear-type-options[Clear type options]' \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--assignee[Assignee]:assignee' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n update)\n _arguments \\\\\n '(-t --title)'{-t,--title}'[Item title]:title' \\\\\n '(-d --description)'{-d,--description}'[Item description]:description' \\\\\n '(-b --body)'{-b,--body}'[Item body]:body' \\\\\n '(-s --status)'{-s,--status}'[Item status]:(draft open in_progress blocked canceled)' \\\\\n '--close-reason[Set close reason]:close_reason' \\\\\n '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\\\\n '--type[Item type]:(${typeChoices})' \\\\\n '--tags[Comma-separated tags]:tags' \\\\\n '--comment[Comment seed author=<value>,created_at=<iso|now>,text=<value>]:comment' \\\\\n '--note[Note seed author=<value>,created_at=<iso|now>,text=<value>]:note' \\\\\n '--learning[Learning seed author=<value>,created_at=<iso|now>,text=<value>]:learning' \\\\\n '--file[Linked file path=<value>,scope=<project|global>,note=<text>]:file' \\\\\n '--test[Linked test command=<value>,path=<value>,scope=<project|global>]:test' \\\\\n '--doc[Linked doc path=<value>,scope=<project|global>,note=<text>]:doc' \\\\\n '--reminder[Reminder entry at=<iso|relative>,text=<text>]:reminder' \\\\\n '--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event' \\\\\n '--type-option[Type option key=value or key=<name>,value=<value>]:type_option' \\\\\n '--unset[Clear scalar metadata field by name]:field' \\\\\n '--clear-deps[Clear dependency entries]' \\\\\n '--clear-comments[Clear comments]' \\\\\n '--clear-notes[Clear notes]' \\\\\n '--clear-learnings[Clear learnings]' \\\\\n '--clear-files[Clear linked files]' \\\\\n '--clear-tests[Clear linked tests]' \\\\\n '--clear-docs[Clear linked docs]' \\\\\n '--clear-reminders[Clear reminders]' \\\\\n '--clear-events[Clear events]' \\\\\n '--clear-type-options[Clear type options]' \\\\\n '--allow-audit-update[Allow non-owner metadata-only audit updates without requiring --force]' \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n update-many)\n _arguments \\\\\n '--filter-status[Filter by status before applying updates]:(draft open in_progress blocked closed canceled)' \\\\\n '--filter-type[Filter by type before applying updates]:(${typeChoices})' \\\\\n '--filter-tag[Filter by tag before applying updates]:(${zshTagChoices})' \\\\\n '--filter-priority[Filter by priority before applying updates]:(0 1 2 3 4)' \\\\\n '--filter-deadline-before[Filter by deadline upper bound]:deadline' \\\\\n '--filter-deadline-after[Filter by deadline lower bound]:deadline' \\\\\n '--filter-assignee[Filter by assignee before applying updates]:assignee' \\\\\n '--filter-assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--filter-parent[Filter by parent item ID]:parent' \\\\\n '--filter-sprint[Filter by sprint]:sprint' \\\\\n '--filter-release[Filter by release]:release' \\\\\n '--limit[Limit matched item count]:number' \\\\\n '--offset[Skip first n matched rows]:number' \\\\\n '--dry-run[Preview updates without mutating]' \\\\\n '--rollback[Rollback checkpoint ID]:checkpoint_id' \\\\\n '--no-checkpoint[Disable checkpoint creation during apply mode]' \\\\\n '(-t --title)'{-t,--title}'[Item title]:title' \\\\\n '(-d --description)'{-d,--description}'[Item description]:description' \\\\\n '(-b --body)'{-b,--body}'[Item body]:body' \\\\\n '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\\\\n '--type[Item type]:(${typeChoices})' \\\\\n '--tags[Comma-separated tags]:tags' \\\\\n '--deadline[Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)]:deadline' \\\\\n '--estimate[Estimated minutes]:minutes' \\\\\n '--acceptance-criteria[Acceptance criteria]:criteria' \\\\\n '--definition-of-ready[Definition of ready]:definition_of_ready' \\\\\n '--order[Planning order/rank]:order' \\\\\n '--goal[Goal identifier]:goal' \\\\\n '--objective[Objective identifier]:objective' \\\\\n '--value[Business value summary]:value' \\\\\n '--impact[Business impact summary]:impact' \\\\\n '--outcome[Expected outcome summary]:outcome' \\\\\n '--why-now[Why-now rationale]:why_now' \\\\\n '--reviewer[Reviewer]:reviewer' \\\\\n '--risk[Risk level]:risk' \\\\\n '--confidence[Confidence level]:confidence' \\\\\n '--sprint[Sprint identifier]:sprint' \\\\\n '--release[Release identifier]:release' \\\\\n '--reporter[Issue reporter]:reporter' \\\\\n '--severity[Issue severity]:severity' \\\\\n '--environment[Issue environment context]:environment' \\\\\n '--repro-steps[Issue reproduction steps]:repro_steps' \\\\\n '--resolution[Issue resolution summary]:resolution' \\\\\n '--expected-result[Issue expected behavior]:expected_result' \\\\\n '--actual-result[Issue observed behavior]:actual_result' \\\\\n '--affected-version[Affected version identifier]:affected_version' \\\\\n '--fixed-version[Fixed version identifier]:fixed_version' \\\\\n '--component[Issue component ownership]:component' \\\\\n '--regression[Regression marker true|false|1|0]:regression' \\\\\n '--customer-impact[Customer impact summary]:customer_impact' \\\\\n '--dep[Dependency seed id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>]:dep' \\\\\n '--dep-remove[Dependency removal selector id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>]:dep_remove' \\\\\n '--replace-deps[Atomically replace dependencies with provided --dep values]' \\\\\n '--replace-tests[Atomically replace linked tests with provided --test values]' \\\\\n '--comment[Comment seed author=<value>,created_at=<iso|now>,text=<value>]:comment' \\\\\n '--note[Note seed author=<value>,created_at=<iso|now>,text=<value>]:note' \\\\\n '--learning[Learning seed author=<value>,created_at=<iso|now>,text=<value>]:learning' \\\\\n '--file[Linked file path=<value>,scope=<project|global>,note=<text>]:file' \\\\\n '--test[Linked test command=<value>,path=<value>,scope=<project|global>]:test' \\\\\n '--doc[Linked doc path=<value>,scope=<project|global>,note=<text>]:doc' \\\\\n '--reminder[Reminder entry at=<iso|relative>,text=<text>]:reminder' \\\\\n '--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event' \\\\\n '--type-option[Type option key=value or key=<name>,value=<value>]:type_option' \\\\\n '--unset[Clear scalar metadata field by name]:field' \\\\\n '--clear-deps[Clear dependency entries]' \\\\\n '--clear-comments[Clear comments]' \\\\\n '--clear-notes[Clear notes]' \\\\\n '--clear-learnings[Clear learnings]' \\\\\n '--clear-files[Clear linked files]' \\\\\n '--clear-tests[Clear linked tests]' \\\\\n '--clear-docs[Clear linked docs]' \\\\\n '--clear-reminders[Clear reminders]' \\\\\n '--clear-events[Clear events]' \\\\\n '--clear-type-options[Clear type options]' \\\\\n '--allow-audit-update[Allow non-owner metadata-only audit updates without requiring --force]' \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n normalize)\n _arguments \\\\\n '--filter-status[Filter by status before planning or apply]:(draft open in_progress blocked closed canceled)' \\\\\n '--filter-type[Filter by type before planning or apply]:(${typeChoices})' \\\\\n '--filter-tag[Filter by tag before planning or apply]:(${zshTagChoices})' \\\\\n '--filter-priority[Filter by priority before planning or apply]:(0 1 2 3 4)' \\\\\n '--filter-deadline-before[Filter by deadline upper bound]:deadline' \\\\\n '--filter-deadline-after[Filter by deadline lower bound]:deadline' \\\\\n '--filter-assignee[Filter by assignee before planning or apply]:assignee' \\\\\n '--filter-assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--filter-parent[Filter by parent item ID]:parent' \\\\\n '--filter-sprint[Filter by sprint]:sprint' \\\\\n '--filter-release[Filter by release]:release' \\\\\n '--limit[Limit matched item count]:number' \\\\\n '--offset[Skip first n matched rows]:number' \\\\\n '--dry-run[Preview normalize findings without mutating]' \\\\\n '--apply[Apply normalize changes]' \\\\\n '--allow-audit-update[Allow non-owner metadata-only audit updates without requiring --force]' \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n calendar|cal)\n _arguments \\\\\n '--view[Calendar view]:(agenda day week month)' \\\\\n '--date[Anchor date/time (ISO/date string or relative)]:date' \\\\\n '--from[Agenda lower bound (ISO/date string or relative)]:date' \\\\\n '--to[Agenda upper bound (ISO/date string or relative)]:date' \\\\\n '--past[Include past entries]' \\\\\n '--full-period[Include full anchored day/week/month period]' \\\\\n '--type[Filter by type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--status[Filter by status]:(draft open in_progress blocked closed canceled)' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--include[Include event sources]:(all deadlines reminders events)' \\\\\n '--recurrence-lookahead-days[Bound open-ended recurrence lookahead]:days' \\\\\n '--recurrence-lookback-days[Bound open-ended recurrence lookback]:days' \\\\\n '--occurrence-limit[Cap occurrences per recurring event]:number' \\\\\n '--limit[Limit returned events]:number' \\\\\n '--format[Output override]:(markdown toon json)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n context|ctx)\n _arguments \\\\\n '--date[Anchor date/time (ISO/date string or relative)]:date' \\\\\n '--from[Agenda lower bound (ISO/date string or relative)]:date' \\\\\n '--to[Agenda upper bound (ISO/date string or relative)]:date' \\\\\n '--past[Include past entries in bounded windows]' \\\\\n '--type[Filter by type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--limit[Limit focus and agenda rows per section]:number' \\\\\n '--format[Output override]:(markdown toon json)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n guide)\n _arguments \\\\\n '1:topic:(${guideTopicChoices})' \\\\\n '--list[Show guide topic index]' \\\\\n '--format[Output override]:(markdown toon json)' \\\\\n '--depth[Guide detail depth]:(brief standard deep)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n search)\n _arguments \\\\\n '--mode[Search mode]:(keyword semantic hybrid)' \\\\\n '--include-linked[Include linked content in scoring]' \\\\\n '--limit[Max results]:number' \\\\\n '--type[Filter by type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n reindex)\n _arguments \\\\\n '--mode[Reindex mode]:(keyword semantic hybrid)' \\\\\n '--progress[Emit progress updates to stderr]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n history)\n _arguments \\\\\n '--limit[Max entries]:number' \\\\\n '--diff[Include changed-field patch summary]' \\\\\n '--verify[Verify history hash chain and replay integrity]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n activity)\n _arguments \\\\\n '--id[Filter by item ID]:id' \\\\\n '--op[Filter by history operation]:op' \\\\\n '--author[Filter by history author]:author' \\\\\n '--from[Lower timestamp bound (ISO/date string or relative)]:date' \\\\\n '--to[Upper timestamp bound (ISO/date string or relative)]:date' \\\\\n '--limit[Max entries]:number' \\\\\n '--stream[Emit line-delimited JSON rows]:mode' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n contracts)\n _arguments \\\\\n '--action[Filter schema by tool action]:action' \\\\\n '--command[Scope output to one command (narrow-by-default)]:command' \\\\\n '--schema-only[Return schema-only payload]' \\\\\n '--flags-only[Return command flag contracts only]' \\\\\n '--availability-only[Return action availability only]' \\\\\n '--runtime-only[Include only actions invocable in the current runtime]' \\\\\n '--active-only[Alias for --runtime-only]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n gc)\n _arguments \\\\\n '--dry-run[Preview cleanup targets without deleting files]' \\\\\n '--scope[Limit cleanup to one or more scopes]:scope' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n comments)\n _arguments \\\\\n '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\\\\n '--stdin[Read comment text from stdin (supports multiline markdown)]' \\\\\n '--file[Read comment text from file (supports multiline markdown)]:path' \\\\\n '--limit[Return only latest n entries]:number' \\\\\n '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\\\\n '--message[History message]:message' \\\\\n '--allow-audit-comment[Allow non-owner append-only comment audits without requiring --force]' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n notes)\n _arguments \\\\\n '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\\\\n '--limit[Return only latest n entries]:number' \\\\\n '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\\\\n '--message[History message]:message' \\\\\n '--allow-audit-note[Allow non-owner append-only note audits without requiring --force]' \\\\\n '--allow-audit-comment[Backward-compatible alias for --allow-audit-note]' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n learnings)\n _arguments \\\\\n '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\\\\n '--limit[Return only latest n entries]:number' \\\\\n '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\\\\n '--message[History message]:message' \\\\\n '--allow-audit-learning[Allow non-owner append-only learning audits without requiring --force]' \\\\\n '--allow-audit-comment[Backward-compatible alias for --allow-audit-learning]' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n deps)\n _arguments \\\\\n '--format[Output format]:(tree graph)' \\\\\n '--max-depth[Maximum traversal depth (0 keeps root only)]:depth' \\\\\n '--collapse[Collapse mode]:(none repeated)' \\\\\n '--summary[Return counts only without tree/graph payload]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n test)\n _arguments \\\\\n '--add[Add linked test entry]:entry' \\\\\n '--remove[Remove linked test entry by command/path]:entry' \\\\\n '--run[Run linked tests]' \\\\\n '--background[Run linked tests in managed background mode]' \\\\\n '--timeout[Default timeout seconds]:seconds' \\\\\n '--progress[Emit linked-test progress to stderr]' \\\\\n '--env-set[Set linked-test runtime environment values]:entry' \\\\\n '--env-clear[Clear linked-test runtime environment values]:name' \\\\\n '--shared-host-safe[Apply shared-host-safe runtime defaults]' \\\\\n '--pm-context[PM linked-test context mode]:(schema tracker auto)' \\\\\n '--override-linked-pm-context[Force run-level --pm-context over per-linked-test pm_context_mode metadata]' \\\\\n '--fail-on-context-mismatch[Fail when context item counts mismatch]' \\\\\n '--fail-on-skipped[Treat skipped linked tests as dependency failures]' \\\\\n '--fail-on-empty-test-run[Treat empty linked-test selections as failures]' \\\\\n '--require-assertions-for-pm[Require assertions for linked PM command tests]' \\\\\n '--check-context[Preflight linked PM command context diagnostics before execution]' \\\\\n '--auto-pm-context[Auto-remediate tracker-read context mismatches using tracker context]' \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n test-all)\n _arguments \\\\\n '--status[Filter by status]:(open in_progress)' \\\\\n '--limit[Limit matching items before running linked tests]:number' \\\\\n '--offset[Skip matching items before running linked tests]:number' \\\\\n '--background[Run linked tests in managed background mode]' \\\\\n '--timeout[Default timeout seconds]:seconds' \\\\\n '--progress[Emit linked-test progress to stderr]' \\\\\n '--env-set[Set linked-test runtime environment values]:entry' \\\\\n '--env-clear[Clear linked-test runtime environment values]:name' \\\\\n '--shared-host-safe[Apply shared-host-safe runtime defaults]' \\\\\n '--pm-context[PM linked-test context mode]:(schema tracker auto)' \\\\\n '--override-linked-pm-context[Force run-level --pm-context over per-linked-test pm_context_mode metadata]' \\\\\n '--fail-on-context-mismatch[Fail when context item counts mismatch]' \\\\\n '--fail-on-skipped[Treat skipped linked tests as dependency failures]' \\\\\n '--fail-on-empty-test-run[Treat empty linked-test selections as failures]' \\\\\n '--require-assertions-for-pm[Require assertions for linked PM command tests]' \\\\\n '--check-context[Preflight linked PM command context diagnostics before execution]' \\\\\n '--auto-pm-context[Auto-remediate tracker-read context mismatches using tracker context]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n test-runs)\n _arguments \\\\\n '1:subcommand:(list status logs stop resume)' \\\\\n '--status[Filter by background run status]:status:(queued running passed failed stopped canceled)' \\\\\n '--limit[Limit returned runs]:number' \\\\\n '--stream[Background log stream]:stream:(stdout stderr both)' \\\\\n '--tail[Tail number of lines]:number' \\\\\n '--force[Force stop with SIGKILL]' \\\\\n '--author[Resume author]:author' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n init)\n _arguments \\\\\n '--preset[Governance preset for new setups]:preset:(minimal default strict)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n init)\n _arguments \\\\\n '--preset[Governance preset for new setups]:preset:(minimal default strict)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n config)\n _arguments \\\\\n '--criterion[Criteria value for definition-of-done metadata-required-fields or lifecycle pattern keys (repeatable for set)]:criterion' \\\\\n '--clear-criteria[Clear config criteria-list key values]' \\\\\n '--format[Item format for item-format key]:format:(toon)' \\\\\n '--policy[Policy value for supported policy keys]:policy' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n close)\n _arguments \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--validate-close[Validate closure metadata mode]:(off warn strict)' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n claim)\n _arguments \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n release)\n _arguments \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--allow-audit-release[Allow non-owner release handoffs without requiring --force]' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n start-task|pause-task)\n _arguments \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n close-task)\n _arguments \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--validate-close[Validate closure metadata mode]:(off warn strict)' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n validate)\n _arguments \\\\\n '--check-metadata[Run metadata completeness checks]' \\\\\n '--metadata-profile[Select metadata validation profile for --check-metadata]:(core strict custom)' \\\\\n '--check-resolution[Run closed-item resolution metadata checks]' \\\\\n '--check-lifecycle[Run active-item lifecycle governance drift checks]' \\\\\n '--check-stale-blockers[Include stale blocker-pattern diagnostics in lifecycle checks]' \\\\\n '--dependency-cycle-severity[Set dependency-cycle warning policy for lifecycle checks]:(off warn error)' \\\\\n '--check-files[Run linked-file and orphaned-file checks]' \\\\\n '--scan-mode[Select file candidate scan mode for --check-files]:(default tracked-all tracked-all-strict)' \\\\\n '--include-pm-internals[Include PM storage internals in tracked-all candidate scans]' \\\\\n '--verbose-file-lists[Include full file-path lists for validate --check-files details]' \\\\\n '--strict-exit[Return non-zero exit when validation warnings are present]' \\\\\n '--fail-on-warn[Alias for --strict-exit]' \\\\\n '--check-history-drift[Run item/history hash drift checks]' \\\\\n '--check-command-references[Run linked-command PM-ID reference checks]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n health)\n _arguments \\\\\n '--strict-directories[Treat optional item-type directories as required failures]' \\\\\n '--check-only[Run read-only health diagnostics without refreshing vectors]' \\\\\n '--no-refresh[Disable automatic vector refresh attempts during health checks]' \\\\\n '--refresh-vectors[Explicitly enable vector refresh attempts during health checks]' \\\\\n '--verbose-stale-items[Include full stale vectorization ID lists in health output]' \\\\\n '--strict-exit[Return non-zero exit when health warnings are present]' \\\\\n '--fail-on-warn[Alias for --strict-exit]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n comments-audit)\n _arguments \\\\\n '--status[Filter by item status]:status:(draft open in_progress blocked closed canceled)' \\\\\n '--type[Filter by item type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--parent[Filter by parent item ID]:parent_id' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--limit-items[Limit returned item count]:number' \\\\\n '--limit[Alias for --limit-items]:number' \\\\\n '--full-history[Export full comment history rows (cannot be combined with --latest)]' \\\\\n '--latest[Return latest n comments per item (0 for summary-only rows)]:number' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n extension)\n _arguments \\\\\n '1:extension_action:(init scaffold install uninstall explore manage doctor adopt adopt-all activate deactivate)' \\\\\n '--init[Generate a starter extension scaffold at target path]' \\\\\n '--scaffold[Alias for --init]' \\\\\n '--install[Install extension from local path or GitHub source]' \\\\\n '--uninstall[Uninstall extension by name]' \\\\\n '--explore[List discovered extensions for selected scope]' \\\\\n '--manage[List managed extensions with update metadata]' \\\\\n '--doctor[Run consolidated extension diagnostics (summary/deep)]' \\\\\n '--adopt[Adopt an unmanaged extension into managed metadata]' \\\\\n '--adopt-all[Adopt all unmanaged extensions into managed metadata]' \\\\\n '--activate[Activate extension in selected scope settings]' \\\\\n '--deactivate[Deactivate extension in selected scope settings]' \\\\\n '--project[Use project extension scope (default)]' \\\\\n '--local[Alias for --project]' \\\\\n '--global[Use global extension scope]' \\\\\n '--gh[Install from GitHub shorthand owner/repo/path]:github_spec' \\\\\n '--github[Alias for --gh]:github_spec' \\\\\n '--ref[Git ref/branch/tag for GitHub source]:git_ref' \\\\\n '--detail[Detail mode for extension diagnostics]:detail_mode:(summary deep)' \\\\\n '--trace[Include registration traces in doctor deep diagnostics]' \\\\\n '--runtime-probe[Opt-in runtime activation probe for manage output]' \\\\\n '--fix-managed-state[Adopt unmanaged extensions before diagnostics/update checks]' \\\\\n '--strict-exit[Return non-zero exit when doctor warnings are present]' \\\\\n '--fail-on-warn[Alias for --strict-exit (doctor)]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]' \\\\\n '*:target_or_name:_files -/'\n ;;\n completion)\n _arguments \\\\\n '--eager-tags[Embed current tracker tags directly in script output]' \\\\\n '1:shell:(bash zsh fish)'\n ;;\n templates)\n local -a templates_cmds\n templates_cmds=('save:Save or update a create template' 'list:List saved create templates' 'show:Show saved template details')\n _describe 'templates command' templates_cmds\n ;;\n esac\n ;;\n esac\n}\n\ncompdef _pm pm`;\n}\n\nexport function generateFishScript(\n itemTypes: string[] = DEFAULT_ITEM_TYPES,\n tags: string[] = [],\n eagerTagExpansion = false,\n): string {\n const listCmds = ALL_COMMANDS.filter((command) => command === \"list\" || command.startsWith(\"list-\")).join(\" \");\n const noSubcommandList = ALL_COMMANDS.join(\" \");\n const typeChoices = itemTypes.join(\" \");\n const guideTopicChoices = GUIDE_TOPIC_CHOICES;\n const tagChoices = joinCompletionValues(tags);\n const useEagerTagExpansion = eagerTagExpansion || tags.length > 0;\n const fishTagChoices = useEagerTagExpansion ? `'${tagChoices}'` : \"'(__pm_tag_choices)'\";\n const dynamicTagResolver = useEagerTagExpansion\n ? \"\"\n : `\nfunction __pm_tag_choices\n set -l now (date +%s ^/dev/null)\n if test -z \"$now\"\n set now 0\n end\n set -l ttl 120\n if set -q PM_COMPLETION_TAG_TTL\n set ttl $PM_COMPLETION_TAG_TTL\n end\n if set -q PM_COMPLETION_TAG_CACHE; and set -q PM_COMPLETION_TAG_CACHE_TS\n set -l age (math \"$now - $PM_COMPLETION_TAG_CACHE_TS\")\n if test $age -lt $ttl\n printf '%s\\n' $PM_COMPLETION_TAG_CACHE\n return\n end\n end\n set -l resolved (pm completion-tags ^/dev/null)\n set -gx PM_COMPLETION_TAG_CACHE $resolved\n set -gx PM_COMPLETION_TAG_CACHE_TS $now\n printf '%s\\n' $resolved\nend\n`;\n return `# Fish shell completion for pm\n# Save to ~/.config/fish/completions/pm.fish\n# or run: pm completion fish > ~/.config/fish/completions/pm.fish\n\n# Disable file completion by default\ncomplete -c pm -f\n\n# Global flags (available for all subcommands)\ncomplete -c pm -l json -d 'Output JSON instead of TOON'\ncomplete -c pm -l quiet -d 'Suppress stdout output'\ncomplete -c pm -l path -d 'Override PM path for this command' -r\ncomplete -c pm -l no-extensions -d 'Disable extension loading'\ncomplete -c pm -l profile -d 'Print deterministic timing diagnostics'\ncomplete -c pm -s V -l version -d 'Output the version number'\ncomplete -c pm -s h -l help -d 'Display help'\n\n# Helper: true when no subcommand has been given yet\nfunction __pm_no_subcommand\n not __fish_seen_subcommand_from ${noSubcommandList}\nend\n${dynamicTagResolver}\n\n# Subcommands\ncomplete -c pm -n __pm_no_subcommand -a init -d 'Initialize pm storage for the current workspace'\ncomplete -c pm -n __pm_no_subcommand -a config -d 'Read or update pm settings'\ncomplete -c pm -n __pm_no_subcommand -a extension -d 'Manage extension lifecycle operations'\ncomplete -c pm -n __pm_no_subcommand -a create -d 'Create a new project management item'\ncomplete -c pm -n __pm_no_subcommand -a list -d 'List active items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-all -d 'List all items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-draft -d 'List draft items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-open -d 'List open items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-in-progress -d 'List in-progress items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-blocked -d 'List blocked items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-closed -d 'List closed items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-canceled -d 'List canceled items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a aggregate -d 'Aggregate grouped item counts for governance queries'\ncomplete -c pm -n __pm_no_subcommand -a dedupe-audit -d 'Audit potential duplicate items and emit merge suggestions'\ncomplete -c pm -n __pm_no_subcommand -a guide -d 'Browse local progressive-disclosure guides'\ncomplete -c pm -n __pm_no_subcommand -a calendar -d 'Show deadline/reminder calendar views'\ncomplete -c pm -n __pm_no_subcommand -a cal -d 'Alias for calendar'\ncomplete -c pm -n __pm_no_subcommand -a context -d 'Show a token-efficient project context snapshot'\ncomplete -c pm -n __pm_no_subcommand -a ctx -d 'Alias for context'\ncomplete -c pm -n __pm_no_subcommand -a get -d 'Show item details by ID'\ncomplete -c pm -n __pm_no_subcommand -a search -d 'Search items with keyword, semantic, or hybrid modes'\ncomplete -c pm -n __pm_no_subcommand -a reindex -d 'Rebuild search artifacts'\ncomplete -c pm -n __pm_no_subcommand -a history -d 'Show item history entries'\ncomplete -c pm -n __pm_no_subcommand -a activity -d 'Show recent activity across items'\ncomplete -c pm -n __pm_no_subcommand -a restore -d 'Restore an item to an earlier state'\ncomplete -c pm -n __pm_no_subcommand -a update -d 'Update item fields and metadata'\ncomplete -c pm -n __pm_no_subcommand -a update-many -d 'Bulk-update matched items with dry-run and rollback checkpoints'\ncomplete -c pm -n __pm_no_subcommand -a normalize -d 'Normalize lifecycle metadata with dry-run planning or apply mode'\ncomplete -c pm -n __pm_no_subcommand -a close -d 'Close an item with a required reason'\ncomplete -c pm -n __pm_no_subcommand -a delete -d 'Delete an item and record the change'\ncomplete -c pm -n __pm_no_subcommand -a append -d 'Append text to an item body'\ncomplete -c pm -n __pm_no_subcommand -a comments -d 'List or add comments for an item'\ncomplete -c pm -n __pm_no_subcommand -a comments-audit -d 'Audit latest comments or full history across filtered items'\ncomplete -c pm -n __pm_no_subcommand -a notes -d 'List or add notes for an item'\ncomplete -c pm -n __pm_no_subcommand -a learnings -d 'List or add learnings for an item'\ncomplete -c pm -n __pm_no_subcommand -a files -d 'Manage linked files'\ncomplete -c pm -n __pm_no_subcommand -a docs -d 'Manage linked docs'\ncomplete -c pm -n __pm_no_subcommand -a deps -d 'Show dependency relationships for an item'\ncomplete -c pm -n __pm_no_subcommand -a test -d 'Manage linked tests and optionally run them'\ncomplete -c pm -n __pm_no_subcommand -a test-all -d 'Run linked tests across matching items'\ncomplete -c pm -n __pm_no_subcommand -a test-runs -d 'Manage background linked-test runs'\ncomplete -c pm -n __pm_no_subcommand -a stats -d 'Show project tracker statistics'\ncomplete -c pm -n __pm_no_subcommand -a health -d 'Show project tracker health checks'\ncomplete -c pm -n __pm_no_subcommand -a validate -d 'Run standalone validation checks'\ncomplete -c pm -n __pm_no_subcommand -a gc -d 'Clean optional cache artifacts'\ncomplete -c pm -n __pm_no_subcommand -a contracts -d 'Show machine-readable command and schema contracts'\ncomplete -c pm -n __pm_no_subcommand -a claim -d 'Claim an item for active work'\ncomplete -c pm -n __pm_no_subcommand -a release -d 'Release the active claim for an item'\ncomplete -c pm -n __pm_no_subcommand -a start-task -d 'Lifecycle alias to claim and set in-progress'\ncomplete -c pm -n __pm_no_subcommand -a pause-task -d 'Lifecycle alias to reopen and release claim'\ncomplete -c pm -n __pm_no_subcommand -a close-task -d 'Lifecycle alias to close and release claim'\ncomplete -c pm -n __pm_no_subcommand -a templates -d 'Manage reusable create templates'\ncomplete -c pm -n __pm_no_subcommand -a completion -d 'Generate shell completion'\n\n# list* flags\nfor list_cmd in ${listCmds}\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l type -d 'Filter by item type' -r -a '${typeChoices}'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l assignee -d 'Filter by assignee' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l sprint -d 'Filter by sprint' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l release -d 'Filter by release' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l limit -d 'Limit returned item count' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l offset -d 'Skip the first n matching rows before limit' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l include-body -d 'Include item body in each returned list row'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l compact -d 'Render compact list projection fields'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l fields -d 'Render custom comma-separated list fields' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l sort -d 'Sort field' -r -a 'priority deadline updated_at created_at title parent'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l order -d 'Sort order (requires --sort)' -r -a 'asc desc'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l stream -d 'Emit line-delimited JSON rows (requires --json)'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l deadline-before -d 'Filter by deadline upper bound (ISO/date string or relative)' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l deadline-after -d 'Filter by deadline lower bound (ISO/date string or relative)' -r\nend\n\n# aggregate flags\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l group-by -d 'Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l count -d 'Return grouped counts'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l include-unparented -d 'Include unparented rows when grouping by parent'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l status -d 'Filter by status' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l type -d 'Filter by item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l deadline-before -d 'Filter by deadline upper bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l deadline-after -d 'Filter by deadline lower bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l assignee -d 'Filter by assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l parent -d 'Filter by parent item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l sprint -d 'Filter by sprint' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l release -d 'Filter by release' -r\n\n# dedupe-audit flags\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l mode -d 'Dedupe mode' -r -a 'title_exact title_fuzzy parent_scope'\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l limit -d 'Limit returned duplicate clusters' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l threshold -d 'Fuzzy mode token similarity threshold between 0 and 1' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l status -d 'Filter by status' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l type -d 'Filter by item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l deadline-before -d 'Filter by deadline upper bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l deadline-after -d 'Filter by deadline lower bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l assignee -d 'Filter by assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l parent -d 'Filter by parent item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l sprint -d 'Filter by sprint' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l release -d 'Filter by release' -r\n\n# create flags\ncomplete -c pm -n '__fish_seen_subcommand_from create' -s t -l title -d 'Item title' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -s d -l description -d 'Item description' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l type -d 'Item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l create-mode -d 'Create required-option policy mode' -r -a 'strict progressive'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l schedule-preset -d 'Scheduling preset for Reminder/Meeting/Event' -r -a 'lightweight'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -s s -l status -d 'Item status' -r -a 'draft open in_progress blocked'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l tags -d 'Comma-separated tags' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -s b -l body -d 'Item body' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l deadline -d 'Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l estimate -d 'Estimated minutes' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l acceptance-criteria -d 'Acceptance criteria' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l reminder -d 'Reminder entry at=<iso|relative>,text=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l assignee -d 'Assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l unset -d 'Clear scalar metadata field by name' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-deps -d 'Clear dependency entries'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-comments -d 'Clear comments'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-notes -d 'Clear notes'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-learnings -d 'Clear learnings'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-files -d 'Clear linked files'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-tests -d 'Clear linked tests'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-docs -d 'Clear linked docs'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-reminders -d 'Clear reminders'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-events -d 'Clear events'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-type-options -d 'Clear type options'\n\n# update flags\ncomplete -c pm -n '__fish_seen_subcommand_from update' -s t -l title -d 'Item title' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -s d -l description -d 'Item description' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -s b -l body -d 'Item body' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -s s -l status -d 'Item status' -r -a 'draft open in_progress blocked canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l close-reason -d 'Set close reason' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l type -d 'Item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l comment -d 'Comment seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l note -d 'Note seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l learning -d 'Learning seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l file -d 'Linked file path=<value>,scope=<project|global>,note=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l test -d 'Linked test command=<value>,path=<value>,scope=<project|global>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l doc -d 'Linked doc path=<value>,scope=<project|global>,note=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l reminder -d 'Reminder entry at=<iso|relative>,text=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l unset -d 'Clear scalar metadata field by name' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l replace-deps -d 'Atomically replace dependencies with provided --dep values'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l replace-tests -d 'Atomically replace linked tests with provided --test values'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-deps -d 'Clear dependency entries'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-comments -d 'Clear comments'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-notes -d 'Clear notes'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-learnings -d 'Clear learnings'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-files -d 'Clear linked files'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-tests -d 'Clear linked tests'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-docs -d 'Clear linked docs'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-reminders -d 'Clear reminders'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-events -d 'Clear events'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-type-options -d 'Clear type options'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l allow-audit-update -d 'Allow non-owner metadata-only audit updates without requiring --force'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l force -d 'Force override'\n\n# update-many flags\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-status -d 'Filter by status before applying updates' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-type -d 'Filter by type before applying updates' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-tag -d 'Filter by tag before applying updates' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-priority -d 'Filter by priority before applying updates' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-deadline-before -d 'Filter by deadline upper bound' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-deadline-after -d 'Filter by deadline lower bound' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-assignee -d 'Filter by assignee before applying updates' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-parent -d 'Filter by parent item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-sprint -d 'Filter by sprint before applying updates' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-release -d 'Filter by release before applying updates' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l limit -d 'Limit matched item count' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l offset -d 'Skip first n matched rows' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l dry-run -d 'Preview updates without mutating'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l rollback -d 'Rollback checkpoint ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l no-checkpoint -d 'Disable checkpoint creation during apply mode'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -s t -l title -d 'Item title' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -s d -l description -d 'Item description' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -s b -l body -d 'Item body' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l type -d 'Item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l tags -d 'Comma-separated tags' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l deadline -d 'Deadline (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l estimate -d 'Estimated minutes' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l acceptance-criteria -d 'Acceptance criteria' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l definition-of-ready -d 'Definition of ready' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l order -d 'Planning order/rank' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l goal -d 'Goal identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l objective -d 'Objective identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l value -d 'Business value summary' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l impact -d 'Business impact summary' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l outcome -d 'Expected outcome summary' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l why-now -d 'Why-now rationale' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l reviewer -d 'Reviewer' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l risk -d 'Risk level' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l confidence -d 'Confidence level' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l sprint -d 'Sprint identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l release -d 'Release identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l reporter -d 'Issue reporter' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l severity -d 'Issue severity' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l environment -d 'Issue environment context' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l repro-steps -d 'Issue reproduction steps' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l resolution -d 'Issue resolution summary' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l expected-result -d 'Issue expected behavior' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l actual-result -d 'Issue observed behavior' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l affected-version -d 'Affected version identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l fixed-version -d 'Fixed version identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l component -d 'Issue component ownership' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l regression -d 'Regression marker true|false|1|0' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l customer-impact -d 'Customer impact summary' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l dep -d 'Dependency seed id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l dep-remove -d 'Dependency removal selector id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l replace-deps -d 'Atomically replace dependencies with provided --dep values'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l replace-tests -d 'Atomically replace linked tests with provided --test values'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l comment -d 'Comment seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l note -d 'Note seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l learning -d 'Learning seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l file -d 'Linked file path=<value>,scope=<project|global>,note=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l test -d 'Linked test command=<value>,path=<value>,scope=<project|global>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l doc -d 'Linked doc path=<value>,scope=<project|global>,note=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l reminder -d 'Reminder entry at=<iso|relative>,text=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l unset -d 'Clear scalar metadata field by name' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-deps -d 'Clear dependency entries'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-comments -d 'Clear comments'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-notes -d 'Clear notes'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-learnings -d 'Clear learnings'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-files -d 'Clear linked files'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-tests -d 'Clear linked tests'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-docs -d 'Clear linked docs'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-reminders -d 'Clear reminders'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-events -d 'Clear events'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-type-options -d 'Clear type options'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l allow-audit-update -d 'Allow non-owner metadata-only audit updates without requiring --force'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l force -d 'Force override'\n\n# normalize flags\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-status -d 'Filter by status before planning or apply' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-type -d 'Filter by type before planning or apply' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-tag -d 'Filter by tag before planning or apply' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-priority -d 'Filter by priority before planning or apply' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-deadline-before -d 'Filter by deadline upper bound' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-deadline-after -d 'Filter by deadline lower bound' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-assignee -d 'Filter by assignee before planning or apply' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-parent -d 'Filter by parent item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-sprint -d 'Filter by sprint before planning or apply' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-release -d 'Filter by release before planning or apply' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l limit -d 'Limit matched item count' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l offset -d 'Skip first n matched rows' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l dry-run -d 'Preview normalize findings without mutating'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l apply -d 'Apply normalize changes'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l allow-audit-update -d 'Allow non-owner metadata-only audit updates without requiring --force'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l force -d 'Force override'\n\n# search flags\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l mode -d 'Search mode' -r -a 'keyword semantic hybrid'\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l include-linked -d 'Include linked content in scoring'\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l limit -d 'Max results' -r\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l type -d 'Filter by type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\n\n# calendar flags\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l view -d 'Calendar view' -r -a 'agenda day week month'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l date -d 'Anchor date/time (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l from -d 'Agenda lower bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l to -d 'Agenda upper bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l past -d 'Include past entries'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l full-period -d 'Include full anchored day/week/month period'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l type -d 'Filter by type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l status -d 'Filter by status' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l assignee -d 'Filter by assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l sprint -d 'Filter by sprint' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l release -d 'Filter by release' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l include -d 'Include event sources' -r -a 'all deadlines reminders events'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l recurrence-lookahead-days -d 'Bound open-ended recurrence lookahead' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l recurrence-lookback-days -d 'Bound open-ended recurrence lookback' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l occurrence-limit -d 'Cap occurrences per recurring event' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l limit -d 'Limit returned events' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l format -d 'Output override' -r -a 'markdown toon json'\n\n# context flags\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l date -d 'Anchor date/time (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l from -d 'Agenda lower bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l to -d 'Agenda upper bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l past -d 'Include past entries in bounded windows'\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l type -d 'Filter by type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l assignee -d 'Filter by assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l sprint -d 'Filter by sprint' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l release -d 'Filter by release' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l limit -d 'Limit focus and agenda rows per section' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l format -d 'Output override' -r -a 'markdown toon json'\n\n# guide flags\ncomplete -c pm -n '__fish_seen_subcommand_from guide' -l list -d 'Show guide topic index'\ncomplete -c pm -n '__fish_seen_subcommand_from guide' -l format -d 'Output override' -r -a 'markdown toon json'\ncomplete -c pm -n '__fish_seen_subcommand_from guide' -l depth -d 'Guide detail depth' -r -a 'brief standard deep'\ncomplete -c pm -n '__fish_seen_subcommand_from guide' -a '${guideTopicChoices}' -d 'Guide topic'\n\n# reindex flags\ncomplete -c pm -n '__fish_seen_subcommand_from reindex' -l mode -d 'Reindex mode' -r -a 'keyword semantic hybrid'\ncomplete -c pm -n '__fish_seen_subcommand_from reindex' -l progress -d 'Emit progress updates to stderr'\n\n# history / activity flags\ncomplete -c pm -n '__fish_seen_subcommand_from history' -l limit -d 'Max history entries' -r\ncomplete -c pm -n '__fish_seen_subcommand_from history' -l diff -d 'Include changed-field patch summary'\ncomplete -c pm -n '__fish_seen_subcommand_from history' -l verify -d 'Verify history hash chain and replay integrity'\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l id -d 'Filter by item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l op -d 'Filter by history operation' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l author -d 'Filter by history author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l from -d 'Lower timestamp bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l to -d 'Upper timestamp bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l limit -d 'Max activity entries' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l stream -d 'Emit line-delimited JSON rows'\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l action -d 'Filter schema by tool action' -r\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l command -d 'Scope output to one command (narrow-by-default)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l schema-only -d 'Return schema-only payload'\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l flags-only -d 'Return command flag contracts only'\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l availability-only -d 'Return action availability only'\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l runtime-only -d 'Include only actions invocable in the current runtime'\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l active-only -d 'Alias for --runtime-only'\ncomplete -c pm -n '__fish_seen_subcommand_from deps' -l format -d 'Output format' -r -a 'tree graph'\ncomplete -c pm -n '__fish_seen_subcommand_from deps' -l max-depth -d 'Maximum traversal depth (0 keeps root only)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from deps' -l collapse -d 'Collapse mode' -r -a 'none repeated'\ncomplete -c pm -n '__fish_seen_subcommand_from deps' -l summary -d 'Return counts only without tree/graph payload'\n\n# comments / notes / learnings flags\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l add -d 'Add one entry (text=<value> or plain text)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments' -l stdin -d 'Read comment text from stdin (supports multiline markdown)'\ncomplete -c pm -n '__fish_seen_subcommand_from comments' -l file -d 'Read comment text from file (supports multiline markdown)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l limit -d 'Return only latest n entries' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l author -d 'Entry author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l allow-audit-comment -d 'Allow non-owner append-only comment audits (legacy alias for notes/learnings)'\ncomplete -c pm -n '__fish_seen_subcommand_from notes' -l allow-audit-note -d 'Allow non-owner append-only note audits without requiring --force'\ncomplete -c pm -n '__fish_seen_subcommand_from learnings' -l allow-audit-learning -d 'Allow non-owner append-only learning audits without requiring --force'\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l force -d 'Force override'\n\n# test flags\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l add -d 'Add linked test entry' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l remove -d 'Remove linked test entry' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l run -d 'Run linked tests'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l background -d 'Run linked tests in managed background mode'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l timeout -d 'Default timeout seconds' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l progress -d 'Emit linked-test progress to stderr'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l env-set -d 'Set linked-test runtime environment values' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l env-clear -d 'Clear linked-test runtime environment values' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l shared-host-safe -d 'Apply shared-host-safe runtime defaults'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l pm-context -d 'PM linked-test context mode' -r -a 'schema tracker auto'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l override-linked-pm-context -d 'Force run-level --pm-context over per-linked-test metadata'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l fail-on-context-mismatch -d 'Fail when context item counts mismatch'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l fail-on-skipped -d 'Treat skipped linked tests as dependency failures'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l fail-on-empty-test-run -d 'Treat empty linked-test selections as failures'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l require-assertions-for-pm -d 'Require assertions for linked PM command tests'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l check-context -d 'Preflight linked PM command context diagnostics before execution'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l auto-pm-context -d 'Auto-remediate tracker-read context mismatches using tracker context'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l force -d 'Force override'\n\n# test-all flags\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l status -d 'Filter by status' -r -a 'open in_progress'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l limit -d 'Limit matching items before running linked tests' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l offset -d 'Skip matching items before running linked tests' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l background -d 'Run linked tests in managed background mode'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l timeout -d 'Default timeout seconds' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l progress -d 'Emit linked-test progress to stderr'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l env-set -d 'Set linked-test runtime environment values' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l env-clear -d 'Clear linked-test runtime environment values' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l shared-host-safe -d 'Apply shared-host-safe runtime defaults'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l pm-context -d 'PM linked-test context mode' -r -a 'schema tracker auto'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l override-linked-pm-context -d 'Force run-level --pm-context over per-linked-test metadata'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l fail-on-context-mismatch -d 'Fail when context item counts mismatch'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l fail-on-skipped -d 'Treat skipped linked tests as dependency failures'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l fail-on-empty-test-run -d 'Treat empty linked-test selections as failures'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l require-assertions-for-pm -d 'Require assertions for linked PM command tests'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l check-context -d 'Preflight linked PM command context diagnostics before execution'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l auto-pm-context -d 'Auto-remediate tracker-read context mismatches using tracker context'\n\n# test-runs flags\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -a 'list status logs stop resume' -d 'test-runs subcommand'\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l status -d 'Filter background runs by status' -r -a 'queued running passed failed stopped canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l limit -d 'Limit returned runs' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l stream -d 'Background log stream selector' -r -a 'stdout stderr both'\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l tail -d 'Tail number of lines from logs' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l force -d 'Force-stop run with SIGKILL'\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l author -d 'Resume author' -r\n\n# gc flags\ncomplete -c pm -n '__fish_seen_subcommand_from gc' -l dry-run -d 'Preview cleanup targets without deleting files'\ncomplete -c pm -n '__fish_seen_subcommand_from gc' -l scope -d 'Limit cleanup to index/embeddings/runtime scopes' -r\n\n# append flags\ncomplete -c pm -n '__fish_seen_subcommand_from append' -s b -l body -d 'Item body' -r\ncomplete -c pm -n '__fish_seen_subcommand_from append' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from append' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from append' -l force -d 'Force override'\n\n# close flags\ncomplete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task' -l force -d 'Force override'\ncomplete -c pm -n '__fish_seen_subcommand_from close close-task' -l validate-close -d 'Validate closure metadata mode' -r -a 'off warn strict'\ncomplete -c pm -n '__fish_seen_subcommand_from release' -l allow-audit-release -d 'Allow non-owner release handoffs without requiring --force'\n\n# validate flags\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-metadata -d 'Run metadata completeness checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l metadata-profile -d 'Select metadata validation profile for --check-metadata' -r -a 'core strict custom'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-resolution -d 'Run closed-item resolution metadata checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-lifecycle -d 'Run active-item lifecycle governance drift checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-stale-blockers -d 'Include stale blocker-pattern diagnostics in lifecycle checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l dependency-cycle-severity -d 'Set dependency-cycle warning policy for lifecycle checks' -r -a 'off warn error'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-files -d 'Run linked-file and orphaned-file checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l scan-mode -d 'Select file candidate scan mode for --check-files' -r -a 'default tracked-all tracked-all-strict'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l include-pm-internals -d 'Include PM storage internals in tracked-all candidate scans'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l verbose-file-lists -d 'Include full file-path lists for validate --check-files details'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l strict-exit -d 'Return non-zero exit when validation warnings are present'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l fail-on-warn -d 'Alias for --strict-exit'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-history-drift -d 'Run item/history hash drift checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-command-references -d 'Run linked-command PM-ID reference checks'\ncomplete -c pm -n '__fish_seen_subcommand_from init' -l preset -d 'Governance preset for new setups' -r -a 'minimal default strict'\ncomplete -c pm -n '__fish_seen_subcommand_from config' -l criterion -d 'Criteria value for definition-of-done metadata-required-fields or lifecycle pattern keys (repeatable for set)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from config' -l clear-criteria -d 'Clear config criteria-list key values'\ncomplete -c pm -n '__fish_seen_subcommand_from config' -l format -d 'Item format for item-format key' -r -a 'toon'\ncomplete -c pm -n '__fish_seen_subcommand_from config' -l policy -d 'Policy value for supported policy keys' -r\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l strict-directories -d 'Treat optional item-type directories as required failures'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l check-only -d 'Run read-only health diagnostics without refreshing vectors'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l no-refresh -d 'Disable automatic vector refresh attempts during health checks'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l refresh-vectors -d 'Explicitly enable vector refresh attempts during health checks'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l verbose-stale-items -d 'Include full stale vectorization ID lists in health output'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l strict-exit -d 'Return non-zero exit when health warnings are present'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l fail-on-warn -d 'Alias for --strict-exit'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l status -d 'Filter by item status' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l type -d 'Filter by item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l parent -d 'Filter by parent item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l sprint -d 'Filter by sprint' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l release -d 'Filter by release' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l assignee -d 'Filter by assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l limit-items -d 'Limit returned item count' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l limit -d 'Alias for --limit-items' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l full-history -d 'Export full comment history rows (cannot be combined with --latest)'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l latest -d 'Return latest n comments per item (0 for summary-only rows)' -r\n\n# completion shell argument\ncomplete -c pm -n '__fish_seen_subcommand_from completion' -l eager-tags -d 'Embed current tracker tags directly in script output'\ncomplete -c pm -n '__fish_seen_subcommand_from completion' -a 'bash zsh fish' -d 'Shell type'\n\n# templates subcommands\ncomplete -c pm -n '__fish_seen_subcommand_from templates' -a 'save list show' -d 'Templates command'\n\n# extension lifecycle flags\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -a 'init scaffold install uninstall explore manage doctor adopt adopt-all activate deactivate' -d 'Extension action subcommand'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l init -d 'Generate starter extension scaffold'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l scaffold -d 'Alias for --init'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l install -d 'Install extension from local path or GitHub source'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l uninstall -d 'Uninstall extension by name'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l explore -d 'List discovered extensions for selected scope'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l manage -d 'List managed extensions with update metadata'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l doctor -d 'Run consolidated extension diagnostics'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l adopt -d 'Adopt an unmanaged extension into managed metadata'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l adopt-all -d 'Adopt all unmanaged extensions into managed metadata'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l activate -d 'Activate extension in selected scope settings'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l deactivate -d 'Deactivate extension in selected scope settings'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l project -d 'Use project extension scope'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l local -d 'Alias for --project'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l global -d 'Use global extension scope'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l gh -d 'GitHub shorthand owner/repo/path' -r\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l github -d 'Alias for --gh' -r\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l ref -d 'Git ref/branch/tag for GitHub source' -r\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l detail -d 'Detail mode for extension diagnostics' -r -a 'summary deep'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l trace -d 'Include registration traces in doctor deep diagnostics'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l runtime-probe -d 'Opt-in runtime activation probe for manage output'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l fix-managed-state -d 'Adopt unmanaged extensions before diagnostics/update checks'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l strict-exit -d 'Return non-zero exit when doctor warnings are present'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l fail-on-warn -d 'Alias for --strict-exit (doctor)'`;\n}\n\nconst SETUP_HINTS: Record<CompletionShell, string> = {\n bash: 'Add to ~/.bashrc or ~/.bash_profile: eval \"$(pm completion bash)\"',\n zsh: 'Add to ~/.zshrc: eval \"$(pm completion zsh)\"',\n fish: \"Run: pm completion fish > ~/.config/fish/completions/pm.fish\",\n};\n\nexport function runCompletion(\n shell: string,\n itemTypes: string[] = DEFAULT_ITEM_TYPES,\n tags: string[] = [],\n eagerTagExpansion = false,\n runtime: CompletionRuntimeConfig = {},\n): CompletionResult {\n const normalized = shell.trim().toLowerCase();\n if (!VALID_SHELLS.includes(normalized as CompletionShell)) {\n throw new PmCliError(\n `Unknown shell: \"${shell}\". Supported shells: ${VALID_SHELLS.join(\", \")}.`,\n EXIT_CODE.USAGE,\n );\n }\n const validShell = normalized as CompletionShell;\n let script: string;\n if (validShell === \"bash\") {\n script = generateBashScript(itemTypes, tags, eagerTagExpansion, runtime);\n } else if (validShell === \"zsh\") {\n script = generateZshScript(itemTypes, tags, eagerTagExpansion);\n } else {\n script = generateFishScript(itemTypes, tags, eagerTagExpansion);\n }\n return {\n shell: validShell,\n script,\n setup_hint: SETUP_HINTS[validShell],\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"completion.js","sourceRoot":"/","sources":["cli/commands/completion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAUvD,MAAM,YAAY,GAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAChE,MAAM,kBAAkB,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC;AACzD,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAShG,MAAM,YAAY,GAAG,CAAC,GAAG,qBAAqB,CAAC,CAAC;AAChD,MAAM,UAAU,GAAG,sBAAsB,CAAC,0BAA0B,CAAC,CAAC;AACtE,MAAM,YAAY,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;AACnE,MAAM,YAAY,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;AACnE,MAAM,YAAY,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;AACnE,M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AAC;IACjD,IAAI,MAAc,CAAC;IACnB,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;QAC1B,MAAM,GAAG,kBAAkB,CAAC,SAAS,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;SAAM,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;QAChC,MAAM,GAAG,iBAAiB,CAAC,SAAS,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;IACjE,CAAC;SAAM,CAAC;QACN,MAAM,GAAG,kBAAkB,CAAC,SAAS,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;IAClE,CAAC;IACD,OAAO;QACL,KAAK,EAAE,UAAU;QACjB,MAAM;QACN,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC;KACpC,CAAC;AACJ,CAAC","sourcesContent":["import { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport {\n ACTIVITY_FLAG_CONTRACTS,\n APPEND_FLAG_CONTRACTS,\n CALENDAR_FLAG_CONTRACTS,\n COMPLETION_FLAG_CONTRACTS,\n CONTRACTS_FLAG_CONTRACTS,\n CONTEXT_FLAG_CONTRACTS,\n CREATE_FLAG_CONTRACTS,\n DEPS_FLAG_CONTRACTS,\n GUIDE_FLAG_CONTRACTS,\n GLOBAL_FLAG_CONTRACTS,\n HEALTH_FLAG_CONTRACTS,\n INIT_FLAG_CONTRACTS,\n LIST_FILTER_FLAG_CONTRACTS,\n NORMALIZE_FLAG_CONTRACTS,\n PM_CORE_COMMAND_NAMES,\n SEARCH_FLAG_CONTRACTS,\n UPDATE_FLAG_CONTRACTS,\n UPDATE_MANY_FLAG_CONTRACTS,\n toCompletionFlagString,\n} from \"../../sdk/cli-contracts.js\";\nimport { BUILTIN_ITEM_TYPE_VALUES } from \"../../types/index.js\";\nimport { listGuideTopicIds } from \"../guide-topics.js\";\n\nexport type CompletionShell = \"bash\" | \"zsh\" | \"fish\";\n\nexport interface CompletionResult {\n shell: CompletionShell;\n script: string;\n setup_hint: string;\n}\n\nconst VALID_SHELLS: CompletionShell[] = [\"bash\", \"zsh\", \"fish\"];\nconst DEFAULT_ITEM_TYPES = [...BUILTIN_ITEM_TYPE_VALUES];\nconst DEFAULT_STATUS_VALUES = [\"draft\", \"open\", \"in_progress\", \"blocked\", \"closed\", \"canceled\"];\n\ntype CompletionFlagCommand = \"list\" | \"create\" | \"update\" | \"update-many\" | \"search\" | \"calendar\" | \"context\";\n\nexport interface CompletionRuntimeConfig {\n statuses?: string[];\n command_flags?: Partial<Record<CompletionFlagCommand, string[]>>;\n}\n\nconst ALL_COMMANDS = [...PM_CORE_COMMAND_NAMES];\nconst LIST_FLAGS = toCompletionFlagString(LIST_FILTER_FLAG_CONTRACTS);\nconst APPEND_FLAGS = toCompletionFlagString(APPEND_FLAG_CONTRACTS);\nconst CREATE_FLAGS = toCompletionFlagString(CREATE_FLAG_CONTRACTS);\nconst UPDATE_FLAGS = toCompletionFlagString(UPDATE_FLAG_CONTRACTS);\nconst UPDATE_MANY_FLAGS = toCompletionFlagString(UPDATE_MANY_FLAG_CONTRACTS);\nconst NORMALIZE_FLAGS = toCompletionFlagString(NORMALIZE_FLAG_CONTRACTS);\nconst ACTIVITY_FLAGS = toCompletionFlagString(ACTIVITY_FLAG_CONTRACTS);\nconst CALENDAR_FLAGS = toCompletionFlagString(CALENDAR_FLAG_CONTRACTS);\nconst CONTEXT_FLAGS = toCompletionFlagString(CONTEXT_FLAG_CONTRACTS);\nconst DEPS_FLAGS = toCompletionFlagString(DEPS_FLAG_CONTRACTS);\nconst GUIDE_FLAGS = toCompletionFlagString(GUIDE_FLAG_CONTRACTS);\nconst SEARCH_FLAGS = toCompletionFlagString(SEARCH_FLAG_CONTRACTS);\nconst HEALTH_FLAGS = toCompletionFlagString(HEALTH_FLAG_CONTRACTS);\nconst INIT_FLAGS = toCompletionFlagString(INIT_FLAG_CONTRACTS);\nconst CONTRACTS_FLAGS = toCompletionFlagString(CONTRACTS_FLAG_CONTRACTS);\nconst COMPLETION_FLAGS = toCompletionFlagString(COMPLETION_FLAG_CONTRACTS);\nconst COMPLETION_SHELL_CHOICES = `${COMPLETION_FLAGS} bash zsh fish`;\nconst GUIDE_TOPIC_CHOICES = joinCompletionValues(listGuideTopicIds());\n\nconst MUTATION_FLAGS = \"--author --message --force --json --quiet --path --no-extensions --no-pager --profile --help\";\nconst CLOSE_MUTATION_FLAGS = \"--author --message --validate-close --force --json --quiet --path --no-extensions --no-pager --profile --help\";\nconst RELEASE_MUTATION_FLAGS =\n \"--allow-audit-release --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help\";\n\nconst GLOBAL_FLAGS = GLOBAL_FLAG_CONTRACTS.flatMap((entry) => [entry.short, entry.flag])\n .filter((value): value is string => Boolean(value))\n .join(\" \");\n\nfunction joinCompletionValues(values: string[]): string {\n return [...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))]\n .sort((left, right) => left.localeCompare(right))\n .join(\" \");\n}\n\nfunction mergeFlagStrings(baseFlags: string, runtimeFlags: string[] | undefined): string {\n const merged = [...baseFlags.split(/\\s+/u).filter((value) => value.length > 0), ...(runtimeFlags ?? [])];\n return joinCompletionValues(merged);\n}\n\nexport function generateBashScript(\n itemTypes: string[] = DEFAULT_ITEM_TYPES,\n tags: string[] = [],\n eagerTagExpansion = false,\n runtime: CompletionRuntimeConfig = {},\n): string {\n const cmds = ALL_COMMANDS.join(\" \");\n const typeValues = itemTypes.join(\" \");\n const statusValues = joinCompletionValues(runtime.statuses ?? DEFAULT_STATUS_VALUES);\n const tagValues = joinCompletionValues(tags);\n const listFlags = mergeFlagStrings(LIST_FLAGS, runtime.command_flags?.list);\n const createFlags = mergeFlagStrings(CREATE_FLAGS, runtime.command_flags?.create);\n const updateFlags = mergeFlagStrings(UPDATE_FLAGS, runtime.command_flags?.update);\n const updateManyFlags = mergeFlagStrings(UPDATE_MANY_FLAGS, runtime.command_flags?.[\"update-many\"]);\n const normalizeFlags = NORMALIZE_FLAGS;\n const searchFlags = mergeFlagStrings(SEARCH_FLAGS, runtime.command_flags?.search);\n const calendarFlags = mergeFlagStrings(CALENDAR_FLAGS, runtime.command_flags?.calendar);\n const contextFlags = mergeFlagStrings(CONTEXT_FLAGS, runtime.command_flags?.context);\n const useEagerTagExpansion = eagerTagExpansion || tags.length > 0;\n // Note: \"${...}\" inside regular (non-template) strings are literal characters,\n // not JS interpolation. Only backtick template literals interpolate ${...}.\n const compgen = (flags: string): string => `$(compgen -W \"${flags}\" -- \"$cur\")`;\n return [\n \"# bash completion for pm\",\n '# Source this file or add \\'eval \"$(pm completion bash)\"\\' to ~/.bashrc',\n \"\",\n \"_pm_completion() {\",\n \" local cur prev words cword\",\n \" _init_completion 2>/dev/null || {\",\n ' cur=\"${COMP_WORDS[COMP_CWORD]}\"',\n ' prev=\"${COMP_WORDS[COMP_CWORD-1]}\"',\n \" cword=$COMP_CWORD\",\n \" }\",\n \"\",\n \" if [[ $cword -eq 1 ]]; then\",\n ` COMPREPLY=(${compgen(cmds)})`,\n \" return 0\",\n \" fi\",\n \"\",\n ' if [[ \"$prev\" == \"--type\" ]]; then',\n ` COMPREPLY=(${compgen(typeValues)})`,\n \" return 0\",\n \" fi\",\n \"\",\n ' if [[ \"$prev\" == \"--status\" ]]; then',\n ` COMPREPLY=(${compgen(statusValues)})`,\n \" return 0\",\n \" fi\",\n \"\",\n ...(useEagerTagExpansion\n ? [\n ' if [[ \"$prev\" == \"--tag\" ]]; then',\n ` COMPREPLY=(${compgen(tagValues)})`,\n \" return 0\",\n \" fi\",\n ]\n : [\n ' if [[ \"$prev\" == \"--tag\" ]]; then',\n ' local now ttl cache_ts tag_values',\n ' now=\"$(date +%s 2>/dev/null || echo 0)\"',\n ' ttl=\"${PM_COMPLETION_TAG_TTL:-120}\"',\n ' cache_ts=\"${PM_COMPLETION_TAG_CACHE_TS:-0}\"',\n ' tag_values=\"${PM_COMPLETION_TAG_CACHE:-}\"',\n ' if [[ -z \"$tag_values\" || \"$now\" -eq 0 || $((now - cache_ts)) -ge \"$ttl\" ]]; then',\n ' tag_values=\"$(pm completion-tags 2>/dev/null)\"',\n ' PM_COMPLETION_TAG_CACHE=\"$tag_values\"',\n ' PM_COMPLETION_TAG_CACHE_TS=\"$now\"',\n \" fi\",\n ' COMPREPLY=($(compgen -W \"$tag_values\" -- \"$cur\"))',\n \" return 0\",\n \" fi\",\n ]),\n \"\",\n ' local cmd=\"${COMP_WORDS[1]}\"',\n \"\",\n ' case \"$cmd\" in',\n \" list|list-all|list-draft|list-open|list-in-progress|list-blocked|list-closed|list-canceled)\",\n ` COMPREPLY=(${compgen(listFlags)})`,\n \" ;;\",\n \" aggregate)\",\n ` COMPREPLY=(${compgen(\"--group-by --count --include-unparented --status --type --tag --priority --deadline-before --deadline-after --assignee --assignee-filter --parent --sprint --release --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" dedupe-audit)\",\n ` COMPREPLY=(${compgen(\"--mode --limit --threshold --status --type --tag --priority --deadline-before --deadline-after --assignee --assignee-filter --parent --sprint --release --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" create)\",\n ` COMPREPLY=(${compgen(createFlags)})`,\n \" ;;\",\n \" update)\",\n ` COMPREPLY=(${compgen(updateFlags)})`,\n \" ;;\",\n \" update-many)\",\n ` COMPREPLY=(${compgen(updateManyFlags)})`,\n \" ;;\",\n \" normalize)\",\n ` COMPREPLY=(${compgen(normalizeFlags)})`,\n \" ;;\",\n \" calendar|cal)\",\n ` COMPREPLY=(${compgen(calendarFlags)})`,\n \" ;;\",\n \" context|ctx)\",\n ` COMPREPLY=(${compgen(contextFlags)})`,\n \" ;;\",\n \" guide)\",\n ` COMPREPLY=(${compgen(`${GUIDE_FLAGS} ${GUIDE_TOPIC_CHOICES}`)})`,\n \" ;;\",\n \" search)\",\n ` COMPREPLY=(${compgen(searchFlags)})`,\n \" ;;\",\n \" reindex)\",\n ` COMPREPLY=(${compgen(\"--mode --progress --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" init)\",\n ` COMPREPLY=(${compgen(`${INIT_FLAGS} --json --quiet --path --no-extensions --no-pager --profile --help`)})`,\n \" ;;\",\n \" config)\",\n ` COMPREPLY=(${compgen(\"--criterion --clear-criteria --format --policy --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" extension)\",\n ` COMPREPLY=(${compgen(\"init scaffold install uninstall explore manage reload doctor adopt adopt-all activate deactivate --init --scaffold --install --uninstall --explore --manage --reload --watch --doctor --adopt --adopt-all --activate --deactivate --project --local --global --gh --github --ref --detail --trace --runtime-probe --fix-managed-state --strict-exit --fail-on-warn --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" comments)\",\n ` COMPREPLY=(${compgen(\"--add --stdin --file --limit --author --message --allow-audit-comment --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" comments-audit)\",\n ` COMPREPLY=(${compgen(\"--status --type --tag --priority --parent --sprint --release --assignee --assignee-filter --limit-items --limit --full-history --latest --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" notes)\",\n ` COMPREPLY=(${compgen(\"--add --limit --author --message --allow-audit-note --allow-audit-comment --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" learnings)\",\n ` COMPREPLY=(${compgen(\"--add --limit --author --message --allow-audit-learning --allow-audit-comment --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" files)\",\n ` COMPREPLY=(${compgen(\"discover --add --add-glob --remove --migrate --list --apply --note --append-stable --validate-paths --audit --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" docs)\",\n ` COMPREPLY=(${compgen(\"--add --add-glob --remove --migrate --validate-paths --audit --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" append)\",\n ` COMPREPLY=(${compgen(APPEND_FLAGS)})`,\n \" ;;\",\n \" deps)\",\n ` COMPREPLY=(${compgen(DEPS_FLAGS)})`,\n \" ;;\",\n \" test)\",\n ` COMPREPLY=(${compgen(\"--add --remove --run --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" test-all)\",\n ` COMPREPLY=(${compgen(\"--status --limit --offset --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" test-runs)\",\n ` COMPREPLY=(${compgen(\"list status logs stop resume --status --limit --stream --tail --force --author --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" validate)\",\n ` COMPREPLY=(${compgen(\"--check-metadata --metadata-profile --check-resolution --check-lifecycle --check-stale-blockers --dependency-cycle-severity --check-files --scan-mode --include-pm-internals --verbose-file-lists --strict-exit --fail-on-warn --check-history-drift --check-command-references --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" health)\",\n ` COMPREPLY=(${compgen(HEALTH_FLAGS)})`,\n \" ;;\",\n \" history)\",\n ` COMPREPLY=(${compgen(\"--limit --diff --verify --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" activity)\",\n ` COMPREPLY=(${compgen(ACTIVITY_FLAGS)})`,\n \" ;;\",\n \" contracts)\",\n ` COMPREPLY=(${compgen(CONTRACTS_FLAGS)})`,\n \" ;;\",\n \" gc)\",\n ` COMPREPLY=(${compgen(\"--dry-run --scope --json --quiet --path --no-extensions --no-pager --profile --help\")})`,\n \" ;;\",\n \" close|close-task)\",\n ` COMPREPLY=(${compgen(CLOSE_MUTATION_FLAGS)})`,\n \" ;;\",\n \" release)\",\n ` COMPREPLY=(${compgen(RELEASE_MUTATION_FLAGS)})`,\n \" ;;\",\n \" claim|delete|restore|start-task|pause-task)\",\n ` COMPREPLY=(${compgen(MUTATION_FLAGS)})`,\n \" ;;\",\n \" completion)\",\n ` COMPREPLY=(${compgen(COMPLETION_SHELL_CHOICES)})`,\n \" ;;\",\n \" templates)\",\n ` COMPREPLY=(${compgen(\"save list show\")})`,\n \" ;;\",\n \" *)\",\n ` COMPREPLY=(${compgen(GLOBAL_FLAGS)})`,\n \" ;;\",\n \" esac\",\n \" return 0\",\n \"}\",\n \"\",\n \"complete -F _pm_completion pm\",\n ].join(\"\\n\");\n}\n\nexport function generateZshScript(\n itemTypes: string[] = DEFAULT_ITEM_TYPES,\n tags: string[] = [],\n eagerTagExpansion = false,\n): string {\n const cmds = ALL_COMMANDS.map((c) => `'${c}'`).join(\" \");\n const typeChoices = itemTypes.join(\" \");\n const guideTopicChoices = GUIDE_TOPIC_CHOICES;\n const tagChoices = joinCompletionValues(tags);\n const useEagerTagExpansion = eagerTagExpansion || tags.length > 0;\n const zshTagChoices = useEagerTagExpansion ? tagChoices : '${(f)\"$(_pm_tag_choices)\"}';\n const dynamicTagResolver = useEagerTagExpansion\n ? \"\"\n : `\n_pm_tag_choices() {\n local now ttl cache_ts\n now=\\${EPOCHSECONDS:-0}\n ttl=\\${PM_COMPLETION_TAG_TTL:-120}\n cache_ts=\\${PM_COMPLETION_TAG_CACHE_TS:-0}\n if [[ -n \"\\${PM_COMPLETION_TAG_CACHE:-}\" && \"$now\" -ne 0 && $((now - cache_ts)) -lt \"$ttl\" ]]; then\n print -r -- \"$PM_COMPLETION_TAG_CACHE\"\n return\n fi\n PM_COMPLETION_TAG_CACHE=\"$(pm completion-tags 2>/dev/null)\"\n PM_COMPLETION_TAG_CACHE_TS=\"$now\"\n print -r -- \"$PM_COMPLETION_TAG_CACHE\"\n}\n`;\n return `#compdef pm\n# zsh completion for pm\n# Source this file or add 'eval \"$(pm completion zsh)\"' to ~/.zshrc\n\n_pm_commands() {\n local -a commands\n commands=(\n 'init:Initialize pm storage for the current workspace'\n 'config:Read or update pm settings'\n 'extension:Manage extension lifecycle operations'\n 'create:Create a new project management item'\n 'list:List active items with optional filters'\n 'list-all:List all items with optional filters'\n 'list-draft:List draft items with optional filters'\n 'list-open:List open items with optional filters'\n 'list-in-progress:List in-progress items with optional filters'\n 'list-blocked:List blocked items with optional filters'\n 'list-closed:List closed items with optional filters'\n 'list-canceled:List canceled items with optional filters'\n 'aggregate:Aggregate grouped item counts for governance queries'\n 'dedupe-audit:Audit potential duplicate items and emit merge suggestions'\n 'guide:Browse local progressive-disclosure guides'\n 'calendar:Show calendar views for deadlines and reminders'\n 'cal:Alias for calendar'\n 'context:Show a token-efficient project context snapshot'\n 'ctx:Alias for context'\n 'get:Show item details by ID'\n 'search:Search items with keyword, semantic, or hybrid modes'\n 'reindex:Rebuild search artifacts'\n 'history:Show item history entries'\n 'activity:Show recent activity across items'\n 'restore:Restore an item to an earlier state'\n 'update:Update item fields and metadata'\n 'update-many:Bulk-update matched items with dry-run and rollback checkpoints'\n 'normalize:Normalize lifecycle metadata with dry-run planning or apply mode'\n 'close:Close an item with a required reason'\n 'delete:Delete an item and record the change'\n 'append:Append text to an item body'\n 'comments:List or add comments for an item'\n 'comments-audit:Audit latest comments or full history across filtered items'\n 'notes:List or add notes for an item'\n 'learnings:List or add learnings for an item'\n 'files:Manage linked files'\n 'docs:Manage linked docs'\n 'deps:Show dependency relationships for an item'\n 'test:Manage linked tests and optionally run them'\n 'test-all:Run linked tests across matching items'\n 'test-runs:Manage background linked-test runs'\n 'stats:Show project tracker statistics'\n 'health:Show project tracker health checks'\n 'validate:Run standalone validation checks'\n 'gc:Clean optional cache artifacts'\n 'contracts:Show machine-readable command and schema contracts'\n 'claim:Claim an item for active work'\n 'release:Release the active claim for an item'\n 'start-task:Lifecycle alias to claim and set in_progress'\n 'pause-task:Lifecycle alias to reopen and release claim'\n 'close-task:Lifecycle alias to close and release claim'\n 'templates:Manage reusable create templates'\n 'completion:Generate shell completion'\n 'help:Display help for a command'\n )\n _describe 'command' commands\n}\n${dynamicTagResolver}\n\n_pm() {\n local context state line\n _arguments -C \\\\\n '--json[Output JSON instead of TOON]' \\\\\n '--quiet[Suppress stdout output]' \\\\\n '--path[Override PM path for this command]:path:_files -/' \\\\\n '--no-extensions[Disable extension loading]' \\\\\n '--no-pager[Disable pager integration for help and long output]' \\\\\n '--profile[Print deterministic timing diagnostics]' \\\\\n '(-V --version)--version[Output the version number]' \\\\\n '(-h --help)--help[Display help]' \\\\\n '1: :_pm_commands' \\\\\n '*:: :->args' && return 0\n\n case $state in\n args)\n case $line[1] in\n list|list-all|list-draft|list-open|list-in-progress|list-blocked|list-closed|list-canceled)\n _arguments \\\\\n '--type[Filter by item type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--deadline-before[Filter by deadline upper bound (ISO/date string or relative)]:date' \\\\\n '--deadline-after[Filter by deadline lower bound (ISO/date string or relative)]:date' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--limit[Limit returned item count]:number' \\\\\n '--offset[Skip the first n matching rows before limit]:number' \\\\\n '--include-body[Include item body in each returned list row]' \\\\\n '--compact[Render compact list projection fields]' \\\\\n '--fields[Render custom comma-separated list fields]:fields' \\\\\n '--sort[Sort field]:(priority deadline updated_at created_at title parent)' \\\\\n '--order[Sort order (requires --sort)]:(asc desc)' \\\\\n '--stream[Emit line-delimited JSON rows (requires --json)]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]' \\\\\n '--path[Override PM path]:path:_files -/'\n ;;\n aggregate)\n _arguments \\\\\n '--group-by[Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)]:fields' \\\\\n '--count[Return grouped counts]' \\\\\n '--include-unparented[Include unparented rows when grouping by parent]' \\\\\n '--status[Filter by status]:(draft open in_progress blocked closed canceled)' \\\\\n '--type[Filter by item type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--deadline-before[Filter by deadline upper bound (ISO/date string or relative)]:date' \\\\\n '--deadline-after[Filter by deadline lower bound (ISO/date string or relative)]:date' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--parent[Filter by parent item ID]:parent_id' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n dedupe-audit)\n _arguments \\\\\n '--mode[Dedupe mode]:(title_exact title_fuzzy parent_scope)' \\\\\n '--limit[Limit returned duplicate clusters]:number' \\\\\n '--threshold[Fuzzy mode token similarity threshold between 0 and 1]:number' \\\\\n '--status[Filter by status]:(draft open in_progress blocked closed canceled)' \\\\\n '--type[Filter by item type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--deadline-before[Filter by deadline upper bound (ISO/date string or relative)]:date' \\\\\n '--deadline-after[Filter by deadline lower bound (ISO/date string or relative)]:date' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--parent[Filter by parent item ID]:parent_id' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n create)\n _arguments \\\\\n '(-t --title)'{-t,--title}'[Item title]:title' \\\\\n '(-d --description)'{-d,--description}'[Item description]:description' \\\\\n '--type[Item type]:(${typeChoices})' \\\\\n '--create-mode[Create required-option policy mode]:(strict progressive)' \\\\\n '--schedule-preset[Scheduling preset for Reminder/Meeting/Event]:(lightweight)' \\\\\n '(-s --status)'{-s,--status}'[Item status]:(draft open in_progress blocked)' \\\\\n '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\\\\n '--tags[Comma-separated tags]:tags' \\\\\n '(-b --body)'{-b,--body}'[Item body]:body' \\\\\n '--deadline[Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)]:deadline' \\\\\n '--estimate[Estimated minutes]:minutes' \\\\\n '--acceptance-criteria[Acceptance criteria]:criteria' \\\\\n '--reminder[Reminder entry at=<iso|relative>,text=<text>]:reminder' \\\\\n '--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event' \\\\\n '--type-option[Type option key=value or key=<name>,value=<value>]:type_option' \\\\\n '--unset[Clear scalar metadata field by name]:field' \\\\\n '--replace-deps[Atomically replace dependencies with provided --dep values]' \\\\\n '--replace-tests[Atomically replace linked tests with provided --test values]' \\\\\n '--clear-deps[Clear dependency entries]' \\\\\n '--clear-comments[Clear comments]' \\\\\n '--clear-notes[Clear notes]' \\\\\n '--clear-learnings[Clear learnings]' \\\\\n '--clear-files[Clear linked files]' \\\\\n '--clear-tests[Clear linked tests]' \\\\\n '--clear-docs[Clear linked docs]' \\\\\n '--clear-reminders[Clear reminders]' \\\\\n '--clear-events[Clear events]' \\\\\n '--clear-type-options[Clear type options]' \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--assignee[Assignee]:assignee' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n update)\n _arguments \\\\\n '(-t --title)'{-t,--title}'[Item title]:title' \\\\\n '(-d --description)'{-d,--description}'[Item description]:description' \\\\\n '(-b --body)'{-b,--body}'[Item body]:body' \\\\\n '(-s --status)'{-s,--status}'[Item status]:(draft open in_progress blocked canceled)' \\\\\n '--close-reason[Set close reason]:close_reason' \\\\\n '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\\\\n '--type[Item type]:(${typeChoices})' \\\\\n '--tags[Comma-separated tags]:tags' \\\\\n '--comment[Comment seed author=<value>,created_at=<iso|now>,text=<value>]:comment' \\\\\n '--note[Note seed author=<value>,created_at=<iso|now>,text=<value>]:note' \\\\\n '--learning[Learning seed author=<value>,created_at=<iso|now>,text=<value>]:learning' \\\\\n '--file[Linked file path=<value>,scope=<project|global>,note=<text>]:file' \\\\\n '--test[Linked test command=<value>,path=<value>,scope=<project|global>]:test' \\\\\n '--doc[Linked doc path=<value>,scope=<project|global>,note=<text>]:doc' \\\\\n '--reminder[Reminder entry at=<iso|relative>,text=<text>]:reminder' \\\\\n '--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event' \\\\\n '--type-option[Type option key=value or key=<name>,value=<value>]:type_option' \\\\\n '--unset[Clear scalar metadata field by name]:field' \\\\\n '--clear-deps[Clear dependency entries]' \\\\\n '--clear-comments[Clear comments]' \\\\\n '--clear-notes[Clear notes]' \\\\\n '--clear-learnings[Clear learnings]' \\\\\n '--clear-files[Clear linked files]' \\\\\n '--clear-tests[Clear linked tests]' \\\\\n '--clear-docs[Clear linked docs]' \\\\\n '--clear-reminders[Clear reminders]' \\\\\n '--clear-events[Clear events]' \\\\\n '--clear-type-options[Clear type options]' \\\\\n '--allow-audit-update[Allow non-owner metadata-only audit updates without requiring --force]' \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n update-many)\n _arguments \\\\\n '--filter-status[Filter by status before applying updates]:(draft open in_progress blocked closed canceled)' \\\\\n '--filter-type[Filter by type before applying updates]:(${typeChoices})' \\\\\n '--filter-tag[Filter by tag before applying updates]:(${zshTagChoices})' \\\\\n '--filter-priority[Filter by priority before applying updates]:(0 1 2 3 4)' \\\\\n '--filter-deadline-before[Filter by deadline upper bound]:deadline' \\\\\n '--filter-deadline-after[Filter by deadline lower bound]:deadline' \\\\\n '--filter-assignee[Filter by assignee before applying updates]:assignee' \\\\\n '--filter-assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--filter-parent[Filter by parent item ID]:parent' \\\\\n '--filter-sprint[Filter by sprint]:sprint' \\\\\n '--filter-release[Filter by release]:release' \\\\\n '--limit[Limit matched item count]:number' \\\\\n '--offset[Skip first n matched rows]:number' \\\\\n '--dry-run[Preview updates without mutating]' \\\\\n '--rollback[Rollback checkpoint ID]:checkpoint_id' \\\\\n '--no-checkpoint[Disable checkpoint creation during apply mode]' \\\\\n '(-t --title)'{-t,--title}'[Item title]:title' \\\\\n '(-d --description)'{-d,--description}'[Item description]:description' \\\\\n '(-b --body)'{-b,--body}'[Item body]:body' \\\\\n '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\\\\n '--type[Item type]:(${typeChoices})' \\\\\n '--tags[Comma-separated tags]:tags' \\\\\n '--deadline[Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)]:deadline' \\\\\n '--estimate[Estimated minutes]:minutes' \\\\\n '--acceptance-criteria[Acceptance criteria]:criteria' \\\\\n '--definition-of-ready[Definition of ready]:definition_of_ready' \\\\\n '--order[Planning order/rank]:order' \\\\\n '--goal[Goal identifier]:goal' \\\\\n '--objective[Objective identifier]:objective' \\\\\n '--value[Business value summary]:value' \\\\\n '--impact[Business impact summary]:impact' \\\\\n '--outcome[Expected outcome summary]:outcome' \\\\\n '--why-now[Why-now rationale]:why_now' \\\\\n '--reviewer[Reviewer]:reviewer' \\\\\n '--risk[Risk level]:risk' \\\\\n '--confidence[Confidence level]:confidence' \\\\\n '--sprint[Sprint identifier]:sprint' \\\\\n '--release[Release identifier]:release' \\\\\n '--reporter[Issue reporter]:reporter' \\\\\n '--severity[Issue severity]:severity' \\\\\n '--environment[Issue environment context]:environment' \\\\\n '--repro-steps[Issue reproduction steps]:repro_steps' \\\\\n '--resolution[Issue resolution summary]:resolution' \\\\\n '--expected-result[Issue expected behavior]:expected_result' \\\\\n '--actual-result[Issue observed behavior]:actual_result' \\\\\n '--affected-version[Affected version identifier]:affected_version' \\\\\n '--fixed-version[Fixed version identifier]:fixed_version' \\\\\n '--component[Issue component ownership]:component' \\\\\n '--regression[Regression marker true|false|1|0]:regression' \\\\\n '--customer-impact[Customer impact summary]:customer_impact' \\\\\n '--dep[Dependency seed id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>]:dep' \\\\\n '--dep-remove[Dependency removal selector id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>]:dep_remove' \\\\\n '--replace-deps[Atomically replace dependencies with provided --dep values]' \\\\\n '--replace-tests[Atomically replace linked tests with provided --test values]' \\\\\n '--comment[Comment seed author=<value>,created_at=<iso|now>,text=<value>]:comment' \\\\\n '--note[Note seed author=<value>,created_at=<iso|now>,text=<value>]:note' \\\\\n '--learning[Learning seed author=<value>,created_at=<iso|now>,text=<value>]:learning' \\\\\n '--file[Linked file path=<value>,scope=<project|global>,note=<text>]:file' \\\\\n '--test[Linked test command=<value>,path=<value>,scope=<project|global>]:test' \\\\\n '--doc[Linked doc path=<value>,scope=<project|global>,note=<text>]:doc' \\\\\n '--reminder[Reminder entry at=<iso|relative>,text=<text>]:reminder' \\\\\n '--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event' \\\\\n '--type-option[Type option key=value or key=<name>,value=<value>]:type_option' \\\\\n '--unset[Clear scalar metadata field by name]:field' \\\\\n '--clear-deps[Clear dependency entries]' \\\\\n '--clear-comments[Clear comments]' \\\\\n '--clear-notes[Clear notes]' \\\\\n '--clear-learnings[Clear learnings]' \\\\\n '--clear-files[Clear linked files]' \\\\\n '--clear-tests[Clear linked tests]' \\\\\n '--clear-docs[Clear linked docs]' \\\\\n '--clear-reminders[Clear reminders]' \\\\\n '--clear-events[Clear events]' \\\\\n '--clear-type-options[Clear type options]' \\\\\n '--allow-audit-update[Allow non-owner metadata-only audit updates without requiring --force]' \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n normalize)\n _arguments \\\\\n '--filter-status[Filter by status before planning or apply]:(draft open in_progress blocked closed canceled)' \\\\\n '--filter-type[Filter by type before planning or apply]:(${typeChoices})' \\\\\n '--filter-tag[Filter by tag before planning or apply]:(${zshTagChoices})' \\\\\n '--filter-priority[Filter by priority before planning or apply]:(0 1 2 3 4)' \\\\\n '--filter-deadline-before[Filter by deadline upper bound]:deadline' \\\\\n '--filter-deadline-after[Filter by deadline lower bound]:deadline' \\\\\n '--filter-assignee[Filter by assignee before planning or apply]:assignee' \\\\\n '--filter-assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--filter-parent[Filter by parent item ID]:parent' \\\\\n '--filter-sprint[Filter by sprint]:sprint' \\\\\n '--filter-release[Filter by release]:release' \\\\\n '--limit[Limit matched item count]:number' \\\\\n '--offset[Skip first n matched rows]:number' \\\\\n '--dry-run[Preview normalize findings without mutating]' \\\\\n '--apply[Apply normalize changes]' \\\\\n '--allow-audit-update[Allow non-owner metadata-only audit updates without requiring --force]' \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n calendar|cal)\n _arguments \\\\\n '--view[Calendar view]:(agenda day week month)' \\\\\n '--date[Anchor date/time (ISO/date string or relative)]:date' \\\\\n '--from[Agenda lower bound (ISO/date string or relative)]:date' \\\\\n '--to[Agenda upper bound (ISO/date string or relative)]:date' \\\\\n '--past[Include past entries]' \\\\\n '--full-period[Include full anchored day/week/month period]' \\\\\n '--type[Filter by type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--status[Filter by status]:(draft open in_progress blocked closed canceled)' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--include[Include event sources]:(all deadlines reminders events)' \\\\\n '--recurrence-lookahead-days[Bound open-ended recurrence lookahead]:days' \\\\\n '--recurrence-lookback-days[Bound open-ended recurrence lookback]:days' \\\\\n '--occurrence-limit[Cap occurrences per recurring event]:number' \\\\\n '--limit[Limit returned events]:number' \\\\\n '--format[Output override]:(markdown toon json)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n context|ctx)\n _arguments \\\\\n '--date[Anchor date/time (ISO/date string or relative)]:date' \\\\\n '--from[Agenda lower bound (ISO/date string or relative)]:date' \\\\\n '--to[Agenda upper bound (ISO/date string or relative)]:date' \\\\\n '--past[Include past entries in bounded windows]' \\\\\n '--type[Filter by type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--limit[Limit focus and agenda rows per section]:number' \\\\\n '--format[Output override]:(markdown toon json)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n guide)\n _arguments \\\\\n '1:topic:(${guideTopicChoices})' \\\\\n '--list[Show guide topic index]' \\\\\n '--format[Output override]:(markdown toon json)' \\\\\n '--depth[Guide detail depth]:(brief standard deep)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n search)\n _arguments \\\\\n '--mode[Search mode]:(keyword semantic hybrid)' \\\\\n '--include-linked[Include linked content in scoring]' \\\\\n '--limit[Max results]:number' \\\\\n '--type[Filter by type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n reindex)\n _arguments \\\\\n '--mode[Reindex mode]:(keyword semantic hybrid)' \\\\\n '--progress[Emit progress updates to stderr]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n history)\n _arguments \\\\\n '--limit[Max entries]:number' \\\\\n '--diff[Include changed-field patch summary]' \\\\\n '--verify[Verify history hash chain and replay integrity]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n activity)\n _arguments \\\\\n '--id[Filter by item ID]:id' \\\\\n '--op[Filter by history operation]:op' \\\\\n '--author[Filter by history author]:author' \\\\\n '--from[Lower timestamp bound (ISO/date string or relative)]:date' \\\\\n '--to[Upper timestamp bound (ISO/date string or relative)]:date' \\\\\n '--limit[Max entries]:number' \\\\\n '--stream[Emit line-delimited JSON rows]:mode' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n contracts)\n _arguments \\\\\n '--action[Filter schema by tool action]:action' \\\\\n '--command[Scope output to one command (narrow-by-default)]:command' \\\\\n '--schema-only[Return schema-only payload]' \\\\\n '--flags-only[Return command flag contracts only]' \\\\\n '--availability-only[Return action availability only]' \\\\\n '--runtime-only[Include only actions invocable in the current runtime]' \\\\\n '--active-only[Alias for --runtime-only]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n gc)\n _arguments \\\\\n '--dry-run[Preview cleanup targets without deleting files]' \\\\\n '--scope[Limit cleanup to one or more scopes]:scope' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n comments)\n _arguments \\\\\n '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\\\\n '--stdin[Read comment text from stdin (supports multiline markdown)]' \\\\\n '--file[Read comment text from file (supports multiline markdown)]:path' \\\\\n '--limit[Return only latest n entries]:number' \\\\\n '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\\\\n '--message[History message]:message' \\\\\n '--allow-audit-comment[Allow non-owner append-only comment audits without requiring --force]' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n notes)\n _arguments \\\\\n '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\\\\n '--limit[Return only latest n entries]:number' \\\\\n '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\\\\n '--message[History message]:message' \\\\\n '--allow-audit-note[Allow non-owner append-only note audits without requiring --force]' \\\\\n '--allow-audit-comment[Backward-compatible alias for --allow-audit-note]' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n learnings)\n _arguments \\\\\n '--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\\\\n '--limit[Return only latest n entries]:number' \\\\\n '--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\\\\n '--message[History message]:message' \\\\\n '--allow-audit-learning[Allow non-owner append-only learning audits without requiring --force]' \\\\\n '--allow-audit-comment[Backward-compatible alias for --allow-audit-learning]' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n deps)\n _arguments \\\\\n '--format[Output format]:(tree graph)' \\\\\n '--max-depth[Maximum traversal depth (0 keeps root only)]:depth' \\\\\n '--collapse[Collapse mode]:(none repeated)' \\\\\n '--summary[Return counts only without tree/graph payload]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n test)\n _arguments \\\\\n '--add[Add linked test entry]:entry' \\\\\n '--remove[Remove linked test entry by command/path]:entry' \\\\\n '--run[Run linked tests]' \\\\\n '--background[Run linked tests in managed background mode]' \\\\\n '--timeout[Default timeout seconds]:seconds' \\\\\n '--progress[Emit linked-test progress to stderr]' \\\\\n '--env-set[Set linked-test runtime environment values]:entry' \\\\\n '--env-clear[Clear linked-test runtime environment values]:name' \\\\\n '--shared-host-safe[Apply shared-host-safe runtime defaults]' \\\\\n '--pm-context[PM linked-test context mode]:(schema tracker auto)' \\\\\n '--override-linked-pm-context[Force run-level --pm-context over per-linked-test pm_context_mode metadata]' \\\\\n '--fail-on-context-mismatch[Fail when context item counts mismatch]' \\\\\n '--fail-on-skipped[Treat skipped linked tests as dependency failures]' \\\\\n '--fail-on-empty-test-run[Treat empty linked-test selections as failures]' \\\\\n '--require-assertions-for-pm[Require assertions for linked PM command tests]' \\\\\n '--check-context[Preflight linked PM command context diagnostics before execution]' \\\\\n '--auto-pm-context[Auto-remediate tracker-read context mismatches using tracker context]' \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n test-all)\n _arguments \\\\\n '--status[Filter by status]:(open in_progress)' \\\\\n '--limit[Limit matching items before running linked tests]:number' \\\\\n '--offset[Skip matching items before running linked tests]:number' \\\\\n '--background[Run linked tests in managed background mode]' \\\\\n '--timeout[Default timeout seconds]:seconds' \\\\\n '--progress[Emit linked-test progress to stderr]' \\\\\n '--env-set[Set linked-test runtime environment values]:entry' \\\\\n '--env-clear[Clear linked-test runtime environment values]:name' \\\\\n '--shared-host-safe[Apply shared-host-safe runtime defaults]' \\\\\n '--pm-context[PM linked-test context mode]:(schema tracker auto)' \\\\\n '--override-linked-pm-context[Force run-level --pm-context over per-linked-test pm_context_mode metadata]' \\\\\n '--fail-on-context-mismatch[Fail when context item counts mismatch]' \\\\\n '--fail-on-skipped[Treat skipped linked tests as dependency failures]' \\\\\n '--fail-on-empty-test-run[Treat empty linked-test selections as failures]' \\\\\n '--require-assertions-for-pm[Require assertions for linked PM command tests]' \\\\\n '--check-context[Preflight linked PM command context diagnostics before execution]' \\\\\n '--auto-pm-context[Auto-remediate tracker-read context mismatches using tracker context]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n test-runs)\n _arguments \\\\\n '1:subcommand:(list status logs stop resume)' \\\\\n '--status[Filter by background run status]:status:(queued running passed failed stopped canceled)' \\\\\n '--limit[Limit returned runs]:number' \\\\\n '--stream[Background log stream]:stream:(stdout stderr both)' \\\\\n '--tail[Tail number of lines]:number' \\\\\n '--force[Force stop with SIGKILL]' \\\\\n '--author[Resume author]:author' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n init)\n _arguments \\\\\n '--preset[Governance preset for new setups]:preset:(minimal default strict)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n init)\n _arguments \\\\\n '--preset[Governance preset for new setups]:preset:(minimal default strict)' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n config)\n _arguments \\\\\n '--criterion[Criteria value for definition-of-done metadata-required-fields or lifecycle pattern keys (repeatable for set)]:criterion' \\\\\n '--clear-criteria[Clear config criteria-list key values]' \\\\\n '--format[Item format for item-format key]:format:(toon)' \\\\\n '--policy[Policy value for supported policy keys]:policy' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n close)\n _arguments \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--validate-close[Validate closure metadata mode]:(off warn strict)' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n claim)\n _arguments \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n release)\n _arguments \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--allow-audit-release[Allow non-owner release handoffs without requiring --force]' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n start-task|pause-task)\n _arguments \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n close-task)\n _arguments \\\\\n '--author[Mutation author]:author' \\\\\n '--message[History message]:message' \\\\\n '--validate-close[Validate closure metadata mode]:(off warn strict)' \\\\\n '--force[Force override]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n validate)\n _arguments \\\\\n '--check-metadata[Run metadata completeness checks]' \\\\\n '--metadata-profile[Select metadata validation profile for --check-metadata]:(core strict custom)' \\\\\n '--check-resolution[Run closed-item resolution metadata checks]' \\\\\n '--check-lifecycle[Run active-item lifecycle governance drift checks]' \\\\\n '--check-stale-blockers[Include stale blocker-pattern diagnostics in lifecycle checks]' \\\\\n '--dependency-cycle-severity[Set dependency-cycle warning policy for lifecycle checks]:(off warn error)' \\\\\n '--check-files[Run linked-file and orphaned-file checks]' \\\\\n '--scan-mode[Select file candidate scan mode for --check-files]:(default tracked-all tracked-all-strict)' \\\\\n '--include-pm-internals[Include PM storage internals in tracked-all candidate scans]' \\\\\n '--verbose-file-lists[Include full file-path lists for validate --check-files details]' \\\\\n '--strict-exit[Return non-zero exit when validation warnings are present]' \\\\\n '--fail-on-warn[Alias for --strict-exit]' \\\\\n '--check-history-drift[Run item/history hash drift checks]' \\\\\n '--check-command-references[Run linked-command PM-ID reference checks]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n health)\n _arguments \\\\\n '--strict-directories[Treat optional item-type directories as required failures]' \\\\\n '--check-only[Run read-only health diagnostics without refreshing vectors]' \\\\\n '--no-refresh[Disable automatic vector refresh attempts during health checks]' \\\\\n '--refresh-vectors[Explicitly enable vector refresh attempts during health checks]' \\\\\n '--verbose-stale-items[Include full stale vectorization ID lists in health output]' \\\\\n '--strict-exit[Return non-zero exit when health warnings are present]' \\\\\n '--fail-on-warn[Alias for --strict-exit]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n comments-audit)\n _arguments \\\\\n '--status[Filter by item status]:status:(draft open in_progress blocked closed canceled)' \\\\\n '--type[Filter by item type]:(${typeChoices})' \\\\\n '--tag[Filter by tag]:(${zshTagChoices})' \\\\\n '--priority[Filter by priority]:(0 1 2 3 4)' \\\\\n '--parent[Filter by parent item ID]:parent_id' \\\\\n '--sprint[Filter by sprint]:sprint' \\\\\n '--release[Filter by release]:release' \\\\\n '--assignee[Filter by assignee]:assignee' \\\\\n '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\\\\n '--limit-items[Limit returned item count]:number' \\\\\n '--limit[Alias for --limit-items]:number' \\\\\n '--full-history[Export full comment history rows (cannot be combined with --latest)]' \\\\\n '--latest[Return latest n comments per item (0 for summary-only rows)]:number' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]'\n ;;\n extension)\n _arguments \\\\\n '1:extension_action:(init scaffold install uninstall explore manage reload doctor adopt adopt-all activate deactivate)' \\\\\n '--init[Generate a starter extension scaffold at target path]' \\\\\n '--scaffold[Alias for --init]' \\\\\n '--install[Install extension from local path or GitHub source]' \\\\\n '--uninstall[Uninstall extension by name]' \\\\\n '--explore[List discovered extensions for selected scope]' \\\\\n '--manage[List managed extensions with update metadata]' \\\\\n '--reload[Reload extensions with cache-busted module imports]' \\\\\n '--watch[Enable watch mode with --reload]' \\\\\n '--doctor[Run consolidated extension diagnostics (summary/deep)]' \\\\\n '--adopt[Adopt an unmanaged extension into managed metadata]' \\\\\n '--adopt-all[Adopt all unmanaged extensions into managed metadata]' \\\\\n '--activate[Activate extension in selected scope settings]' \\\\\n '--deactivate[Deactivate extension in selected scope settings]' \\\\\n '--project[Use project extension scope (default)]' \\\\\n '--local[Alias for --project]' \\\\\n '--global[Use global extension scope]' \\\\\n '--gh[Install from GitHub shorthand owner/repo/path]:github_spec' \\\\\n '--github[Alias for --gh]:github_spec' \\\\\n '--ref[Git ref/branch/tag for GitHub source]:git_ref' \\\\\n '--detail[Detail mode for extension diagnostics]:detail_mode:(summary deep)' \\\\\n '--trace[Include registration traces in doctor deep diagnostics]' \\\\\n '--runtime-probe[Opt-in runtime activation probe for manage output]' \\\\\n '--fix-managed-state[Adopt unmanaged extensions before diagnostics/update checks]' \\\\\n '--strict-exit[Return non-zero exit when doctor warnings are present]' \\\\\n '--fail-on-warn[Alias for --strict-exit (doctor)]' \\\\\n '--json[Output JSON]' \\\\\n '--quiet[Suppress stdout]' \\\\\n '*:target_or_name:_files -/'\n ;;\n completion)\n _arguments \\\\\n '--eager-tags[Embed current tracker tags directly in script output]' \\\\\n '1:shell:(bash zsh fish)'\n ;;\n templates)\n local -a templates_cmds\n templates_cmds=('save:Save or update a create template' 'list:List saved create templates' 'show:Show saved template details')\n _describe 'templates command' templates_cmds\n ;;\n esac\n ;;\n esac\n}\n\ncompdef _pm pm`;\n}\n\nexport function generateFishScript(\n itemTypes: string[] = DEFAULT_ITEM_TYPES,\n tags: string[] = [],\n eagerTagExpansion = false,\n): string {\n const listCmds = ALL_COMMANDS.filter((command) => command === \"list\" || command.startsWith(\"list-\")).join(\" \");\n const noSubcommandList = ALL_COMMANDS.join(\" \");\n const typeChoices = itemTypes.join(\" \");\n const guideTopicChoices = GUIDE_TOPIC_CHOICES;\n const tagChoices = joinCompletionValues(tags);\n const useEagerTagExpansion = eagerTagExpansion || tags.length > 0;\n const fishTagChoices = useEagerTagExpansion ? `'${tagChoices}'` : \"'(__pm_tag_choices)'\";\n const dynamicTagResolver = useEagerTagExpansion\n ? \"\"\n : `\nfunction __pm_tag_choices\n set -l now (date +%s ^/dev/null)\n if test -z \"$now\"\n set now 0\n end\n set -l ttl 120\n if set -q PM_COMPLETION_TAG_TTL\n set ttl $PM_COMPLETION_TAG_TTL\n end\n if set -q PM_COMPLETION_TAG_CACHE; and set -q PM_COMPLETION_TAG_CACHE_TS\n set -l age (math \"$now - $PM_COMPLETION_TAG_CACHE_TS\")\n if test $age -lt $ttl\n printf '%s\\n' $PM_COMPLETION_TAG_CACHE\n return\n end\n end\n set -l resolved (pm completion-tags ^/dev/null)\n set -gx PM_COMPLETION_TAG_CACHE $resolved\n set -gx PM_COMPLETION_TAG_CACHE_TS $now\n printf '%s\\n' $resolved\nend\n`;\n return `# Fish shell completion for pm\n# Save to ~/.config/fish/completions/pm.fish\n# or run: pm completion fish > ~/.config/fish/completions/pm.fish\n\n# Disable file completion by default\ncomplete -c pm -f\n\n# Global flags (available for all subcommands)\ncomplete -c pm -l json -d 'Output JSON instead of TOON'\ncomplete -c pm -l quiet -d 'Suppress stdout output'\ncomplete -c pm -l path -d 'Override PM path for this command' -r\ncomplete -c pm -l no-extensions -d 'Disable extension loading'\ncomplete -c pm -l profile -d 'Print deterministic timing diagnostics'\ncomplete -c pm -s V -l version -d 'Output the version number'\ncomplete -c pm -s h -l help -d 'Display help'\n\n# Helper: true when no subcommand has been given yet\nfunction __pm_no_subcommand\n not __fish_seen_subcommand_from ${noSubcommandList}\nend\n${dynamicTagResolver}\n\n# Subcommands\ncomplete -c pm -n __pm_no_subcommand -a init -d 'Initialize pm storage for the current workspace'\ncomplete -c pm -n __pm_no_subcommand -a config -d 'Read or update pm settings'\ncomplete -c pm -n __pm_no_subcommand -a extension -d 'Manage extension lifecycle operations'\ncomplete -c pm -n __pm_no_subcommand -a create -d 'Create a new project management item'\ncomplete -c pm -n __pm_no_subcommand -a list -d 'List active items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-all -d 'List all items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-draft -d 'List draft items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-open -d 'List open items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-in-progress -d 'List in-progress items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-blocked -d 'List blocked items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-closed -d 'List closed items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a list-canceled -d 'List canceled items with optional filters'\ncomplete -c pm -n __pm_no_subcommand -a aggregate -d 'Aggregate grouped item counts for governance queries'\ncomplete -c pm -n __pm_no_subcommand -a dedupe-audit -d 'Audit potential duplicate items and emit merge suggestions'\ncomplete -c pm -n __pm_no_subcommand -a guide -d 'Browse local progressive-disclosure guides'\ncomplete -c pm -n __pm_no_subcommand -a calendar -d 'Show deadline/reminder calendar views'\ncomplete -c pm -n __pm_no_subcommand -a cal -d 'Alias for calendar'\ncomplete -c pm -n __pm_no_subcommand -a context -d 'Show a token-efficient project context snapshot'\ncomplete -c pm -n __pm_no_subcommand -a ctx -d 'Alias for context'\ncomplete -c pm -n __pm_no_subcommand -a get -d 'Show item details by ID'\ncomplete -c pm -n __pm_no_subcommand -a search -d 'Search items with keyword, semantic, or hybrid modes'\ncomplete -c pm -n __pm_no_subcommand -a reindex -d 'Rebuild search artifacts'\ncomplete -c pm -n __pm_no_subcommand -a history -d 'Show item history entries'\ncomplete -c pm -n __pm_no_subcommand -a activity -d 'Show recent activity across items'\ncomplete -c pm -n __pm_no_subcommand -a restore -d 'Restore an item to an earlier state'\ncomplete -c pm -n __pm_no_subcommand -a update -d 'Update item fields and metadata'\ncomplete -c pm -n __pm_no_subcommand -a update-many -d 'Bulk-update matched items with dry-run and rollback checkpoints'\ncomplete -c pm -n __pm_no_subcommand -a normalize -d 'Normalize lifecycle metadata with dry-run planning or apply mode'\ncomplete -c pm -n __pm_no_subcommand -a close -d 'Close an item with a required reason'\ncomplete -c pm -n __pm_no_subcommand -a delete -d 'Delete an item and record the change'\ncomplete -c pm -n __pm_no_subcommand -a append -d 'Append text to an item body'\ncomplete -c pm -n __pm_no_subcommand -a comments -d 'List or add comments for an item'\ncomplete -c pm -n __pm_no_subcommand -a comments-audit -d 'Audit latest comments or full history across filtered items'\ncomplete -c pm -n __pm_no_subcommand -a notes -d 'List or add notes for an item'\ncomplete -c pm -n __pm_no_subcommand -a learnings -d 'List or add learnings for an item'\ncomplete -c pm -n __pm_no_subcommand -a files -d 'Manage linked files'\ncomplete -c pm -n __pm_no_subcommand -a docs -d 'Manage linked docs'\ncomplete -c pm -n __pm_no_subcommand -a deps -d 'Show dependency relationships for an item'\ncomplete -c pm -n __pm_no_subcommand -a test -d 'Manage linked tests and optionally run them'\ncomplete -c pm -n __pm_no_subcommand -a test-all -d 'Run linked tests across matching items'\ncomplete -c pm -n __pm_no_subcommand -a test-runs -d 'Manage background linked-test runs'\ncomplete -c pm -n __pm_no_subcommand -a stats -d 'Show project tracker statistics'\ncomplete -c pm -n __pm_no_subcommand -a health -d 'Show project tracker health checks'\ncomplete -c pm -n __pm_no_subcommand -a validate -d 'Run standalone validation checks'\ncomplete -c pm -n __pm_no_subcommand -a gc -d 'Clean optional cache artifacts'\ncomplete -c pm -n __pm_no_subcommand -a contracts -d 'Show machine-readable command and schema contracts'\ncomplete -c pm -n __pm_no_subcommand -a claim -d 'Claim an item for active work'\ncomplete -c pm -n __pm_no_subcommand -a release -d 'Release the active claim for an item'\ncomplete -c pm -n __pm_no_subcommand -a start-task -d 'Lifecycle alias to claim and set in-progress'\ncomplete -c pm -n __pm_no_subcommand -a pause-task -d 'Lifecycle alias to reopen and release claim'\ncomplete -c pm -n __pm_no_subcommand -a close-task -d 'Lifecycle alias to close and release claim'\ncomplete -c pm -n __pm_no_subcommand -a templates -d 'Manage reusable create templates'\ncomplete -c pm -n __pm_no_subcommand -a completion -d 'Generate shell completion'\n\n# list* flags\nfor list_cmd in ${listCmds}\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l type -d 'Filter by item type' -r -a '${typeChoices}'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l assignee -d 'Filter by assignee' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l sprint -d 'Filter by sprint' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l release -d 'Filter by release' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l limit -d 'Limit returned item count' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l offset -d 'Skip the first n matching rows before limit' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l include-body -d 'Include item body in each returned list row'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l compact -d 'Render compact list projection fields'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l fields -d 'Render custom comma-separated list fields' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l sort -d 'Sort field' -r -a 'priority deadline updated_at created_at title parent'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l order -d 'Sort order (requires --sort)' -r -a 'asc desc'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l stream -d 'Emit line-delimited JSON rows (requires --json)'\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l deadline-before -d 'Filter by deadline upper bound (ISO/date string or relative)' -r\n complete -c pm -n \"__fish_seen_subcommand_from $list_cmd\" -l deadline-after -d 'Filter by deadline lower bound (ISO/date string or relative)' -r\nend\n\n# aggregate flags\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l group-by -d 'Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l count -d 'Return grouped counts'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l include-unparented -d 'Include unparented rows when grouping by parent'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l status -d 'Filter by status' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l type -d 'Filter by item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l deadline-before -d 'Filter by deadline upper bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l deadline-after -d 'Filter by deadline lower bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l assignee -d 'Filter by assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l parent -d 'Filter by parent item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l sprint -d 'Filter by sprint' -r\ncomplete -c pm -n '__fish_seen_subcommand_from aggregate' -l release -d 'Filter by release' -r\n\n# dedupe-audit flags\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l mode -d 'Dedupe mode' -r -a 'title_exact title_fuzzy parent_scope'\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l limit -d 'Limit returned duplicate clusters' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l threshold -d 'Fuzzy mode token similarity threshold between 0 and 1' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l status -d 'Filter by status' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l type -d 'Filter by item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l deadline-before -d 'Filter by deadline upper bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l deadline-after -d 'Filter by deadline lower bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l assignee -d 'Filter by assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l parent -d 'Filter by parent item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l sprint -d 'Filter by sprint' -r\ncomplete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l release -d 'Filter by release' -r\n\n# create flags\ncomplete -c pm -n '__fish_seen_subcommand_from create' -s t -l title -d 'Item title' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -s d -l description -d 'Item description' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l type -d 'Item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l create-mode -d 'Create required-option policy mode' -r -a 'strict progressive'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l schedule-preset -d 'Scheduling preset for Reminder/Meeting/Event' -r -a 'lightweight'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -s s -l status -d 'Item status' -r -a 'draft open in_progress blocked'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l tags -d 'Comma-separated tags' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -s b -l body -d 'Item body' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l deadline -d 'Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l estimate -d 'Estimated minutes' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l acceptance-criteria -d 'Acceptance criteria' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l reminder -d 'Reminder entry at=<iso|relative>,text=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l assignee -d 'Assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l unset -d 'Clear scalar metadata field by name' -r\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-deps -d 'Clear dependency entries'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-comments -d 'Clear comments'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-notes -d 'Clear notes'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-learnings -d 'Clear learnings'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-files -d 'Clear linked files'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-tests -d 'Clear linked tests'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-docs -d 'Clear linked docs'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-reminders -d 'Clear reminders'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-events -d 'Clear events'\ncomplete -c pm -n '__fish_seen_subcommand_from create' -l clear-type-options -d 'Clear type options'\n\n# update flags\ncomplete -c pm -n '__fish_seen_subcommand_from update' -s t -l title -d 'Item title' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -s d -l description -d 'Item description' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -s b -l body -d 'Item body' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -s s -l status -d 'Item status' -r -a 'draft open in_progress blocked canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l close-reason -d 'Set close reason' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l type -d 'Item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l comment -d 'Comment seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l note -d 'Note seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l learning -d 'Learning seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l file -d 'Linked file path=<value>,scope=<project|global>,note=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l test -d 'Linked test command=<value>,path=<value>,scope=<project|global>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l doc -d 'Linked doc path=<value>,scope=<project|global>,note=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l reminder -d 'Reminder entry at=<iso|relative>,text=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l unset -d 'Clear scalar metadata field by name' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l replace-deps -d 'Atomically replace dependencies with provided --dep values'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l replace-tests -d 'Atomically replace linked tests with provided --test values'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-deps -d 'Clear dependency entries'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-comments -d 'Clear comments'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-notes -d 'Clear notes'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-learnings -d 'Clear learnings'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-files -d 'Clear linked files'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-tests -d 'Clear linked tests'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-docs -d 'Clear linked docs'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-reminders -d 'Clear reminders'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-events -d 'Clear events'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l clear-type-options -d 'Clear type options'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l allow-audit-update -d 'Allow non-owner metadata-only audit updates without requiring --force'\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update' -l force -d 'Force override'\n\n# update-many flags\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-status -d 'Filter by status before applying updates' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-type -d 'Filter by type before applying updates' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-tag -d 'Filter by tag before applying updates' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-priority -d 'Filter by priority before applying updates' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-deadline-before -d 'Filter by deadline upper bound' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-deadline-after -d 'Filter by deadline lower bound' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-assignee -d 'Filter by assignee before applying updates' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-parent -d 'Filter by parent item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-sprint -d 'Filter by sprint before applying updates' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-release -d 'Filter by release before applying updates' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l limit -d 'Limit matched item count' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l offset -d 'Skip first n matched rows' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l dry-run -d 'Preview updates without mutating'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l rollback -d 'Rollback checkpoint ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l no-checkpoint -d 'Disable checkpoint creation during apply mode'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -s t -l title -d 'Item title' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -s d -l description -d 'Item description' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -s b -l body -d 'Item body' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l type -d 'Item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l tags -d 'Comma-separated tags' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l deadline -d 'Deadline (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l estimate -d 'Estimated minutes' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l acceptance-criteria -d 'Acceptance criteria' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l definition-of-ready -d 'Definition of ready' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l order -d 'Planning order/rank' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l goal -d 'Goal identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l objective -d 'Objective identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l value -d 'Business value summary' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l impact -d 'Business impact summary' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l outcome -d 'Expected outcome summary' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l why-now -d 'Why-now rationale' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l reviewer -d 'Reviewer' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l risk -d 'Risk level' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l confidence -d 'Confidence level' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l sprint -d 'Sprint identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l release -d 'Release identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l reporter -d 'Issue reporter' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l severity -d 'Issue severity' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l environment -d 'Issue environment context' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l repro-steps -d 'Issue reproduction steps' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l resolution -d 'Issue resolution summary' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l expected-result -d 'Issue expected behavior' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l actual-result -d 'Issue observed behavior' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l affected-version -d 'Affected version identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l fixed-version -d 'Fixed version identifier' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l component -d 'Issue component ownership' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l regression -d 'Regression marker true|false|1|0' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l customer-impact -d 'Customer impact summary' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l dep -d 'Dependency seed id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l dep-remove -d 'Dependency removal selector id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l replace-deps -d 'Atomically replace dependencies with provided --dep values'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l replace-tests -d 'Atomically replace linked tests with provided --test values'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l comment -d 'Comment seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l note -d 'Note seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l learning -d 'Learning seed author=<value>,created_at=<iso|now>,text=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l file -d 'Linked file path=<value>,scope=<project|global>,note=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l test -d 'Linked test command=<value>,path=<value>,scope=<project|global>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l doc -d 'Linked doc path=<value>,scope=<project|global>,note=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l reminder -d 'Reminder entry at=<iso|relative>,text=<text>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l unset -d 'Clear scalar metadata field by name' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-deps -d 'Clear dependency entries'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-comments -d 'Clear comments'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-notes -d 'Clear notes'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-learnings -d 'Clear learnings'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-files -d 'Clear linked files'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-tests -d 'Clear linked tests'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-docs -d 'Clear linked docs'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-reminders -d 'Clear reminders'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-events -d 'Clear events'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l clear-type-options -d 'Clear type options'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l allow-audit-update -d 'Allow non-owner metadata-only audit updates without requiring --force'\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from update-many' -l force -d 'Force override'\n\n# normalize flags\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-status -d 'Filter by status before planning or apply' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-type -d 'Filter by type before planning or apply' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-tag -d 'Filter by tag before planning or apply' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-priority -d 'Filter by priority before planning or apply' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-deadline-before -d 'Filter by deadline upper bound' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-deadline-after -d 'Filter by deadline lower bound' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-assignee -d 'Filter by assignee before planning or apply' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-parent -d 'Filter by parent item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-sprint -d 'Filter by sprint before planning or apply' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-release -d 'Filter by release before planning or apply' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l limit -d 'Limit matched item count' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l offset -d 'Skip first n matched rows' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l dry-run -d 'Preview normalize findings without mutating'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l apply -d 'Apply normalize changes'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l allow-audit-update -d 'Allow non-owner metadata-only audit updates without requiring --force'\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from normalize' -l force -d 'Force override'\n\n# search flags\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l mode -d 'Search mode' -r -a 'keyword semantic hybrid'\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l include-linked -d 'Include linked content in scoring'\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l limit -d 'Max results' -r\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l type -d 'Filter by type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from search' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\n\n# calendar flags\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l view -d 'Calendar view' -r -a 'agenda day week month'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l date -d 'Anchor date/time (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l from -d 'Agenda lower bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l to -d 'Agenda upper bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l past -d 'Include past entries'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l full-period -d 'Include full anchored day/week/month period'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l type -d 'Filter by type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l status -d 'Filter by status' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l assignee -d 'Filter by assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l sprint -d 'Filter by sprint' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l release -d 'Filter by release' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l include -d 'Include event sources' -r -a 'all deadlines reminders events'\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l recurrence-lookahead-days -d 'Bound open-ended recurrence lookahead' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l recurrence-lookback-days -d 'Bound open-ended recurrence lookback' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l occurrence-limit -d 'Cap occurrences per recurring event' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l limit -d 'Limit returned events' -r\ncomplete -c pm -n '__fish_seen_subcommand_from calendar cal' -l format -d 'Output override' -r -a 'markdown toon json'\n\n# context flags\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l date -d 'Anchor date/time (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l from -d 'Agenda lower bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l to -d 'Agenda upper bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l past -d 'Include past entries in bounded windows'\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l type -d 'Filter by type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l assignee -d 'Filter by assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l sprint -d 'Filter by sprint' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l release -d 'Filter by release' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l limit -d 'Limit focus and agenda rows per section' -r\ncomplete -c pm -n '__fish_seen_subcommand_from context ctx' -l format -d 'Output override' -r -a 'markdown toon json'\n\n# guide flags\ncomplete -c pm -n '__fish_seen_subcommand_from guide' -l list -d 'Show guide topic index'\ncomplete -c pm -n '__fish_seen_subcommand_from guide' -l format -d 'Output override' -r -a 'markdown toon json'\ncomplete -c pm -n '__fish_seen_subcommand_from guide' -l depth -d 'Guide detail depth' -r -a 'brief standard deep'\ncomplete -c pm -n '__fish_seen_subcommand_from guide' -a '${guideTopicChoices}' -d 'Guide topic'\n\n# reindex flags\ncomplete -c pm -n '__fish_seen_subcommand_from reindex' -l mode -d 'Reindex mode' -r -a 'keyword semantic hybrid'\ncomplete -c pm -n '__fish_seen_subcommand_from reindex' -l progress -d 'Emit progress updates to stderr'\n\n# history / activity flags\ncomplete -c pm -n '__fish_seen_subcommand_from history' -l limit -d 'Max history entries' -r\ncomplete -c pm -n '__fish_seen_subcommand_from history' -l diff -d 'Include changed-field patch summary'\ncomplete -c pm -n '__fish_seen_subcommand_from history' -l verify -d 'Verify history hash chain and replay integrity'\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l id -d 'Filter by item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l op -d 'Filter by history operation' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l author -d 'Filter by history author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l from -d 'Lower timestamp bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l to -d 'Upper timestamp bound (ISO/date string or relative)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l limit -d 'Max activity entries' -r\ncomplete -c pm -n '__fish_seen_subcommand_from activity' -l stream -d 'Emit line-delimited JSON rows'\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l action -d 'Filter schema by tool action' -r\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l command -d 'Scope output to one command (narrow-by-default)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l schema-only -d 'Return schema-only payload'\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l flags-only -d 'Return command flag contracts only'\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l availability-only -d 'Return action availability only'\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l runtime-only -d 'Include only actions invocable in the current runtime'\ncomplete -c pm -n '__fish_seen_subcommand_from contracts' -l active-only -d 'Alias for --runtime-only'\ncomplete -c pm -n '__fish_seen_subcommand_from deps' -l format -d 'Output format' -r -a 'tree graph'\ncomplete -c pm -n '__fish_seen_subcommand_from deps' -l max-depth -d 'Maximum traversal depth (0 keeps root only)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from deps' -l collapse -d 'Collapse mode' -r -a 'none repeated'\ncomplete -c pm -n '__fish_seen_subcommand_from deps' -l summary -d 'Return counts only without tree/graph payload'\n\n# comments / notes / learnings flags\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l add -d 'Add one entry (text=<value> or plain text)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments' -l stdin -d 'Read comment text from stdin (supports multiline markdown)'\ncomplete -c pm -n '__fish_seen_subcommand_from comments' -l file -d 'Read comment text from file (supports multiline markdown)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l limit -d 'Return only latest n entries' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l author -d 'Entry author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l allow-audit-comment -d 'Allow non-owner append-only comment audits (legacy alias for notes/learnings)'\ncomplete -c pm -n '__fish_seen_subcommand_from notes' -l allow-audit-note -d 'Allow non-owner append-only note audits without requiring --force'\ncomplete -c pm -n '__fish_seen_subcommand_from learnings' -l allow-audit-learning -d 'Allow non-owner append-only learning audits without requiring --force'\ncomplete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l force -d 'Force override'\n\n# test flags\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l add -d 'Add linked test entry' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l remove -d 'Remove linked test entry' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l run -d 'Run linked tests'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l background -d 'Run linked tests in managed background mode'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l timeout -d 'Default timeout seconds' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l progress -d 'Emit linked-test progress to stderr'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l env-set -d 'Set linked-test runtime environment values' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l env-clear -d 'Clear linked-test runtime environment values' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l shared-host-safe -d 'Apply shared-host-safe runtime defaults'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l pm-context -d 'PM linked-test context mode' -r -a 'schema tracker auto'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l override-linked-pm-context -d 'Force run-level --pm-context over per-linked-test metadata'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l fail-on-context-mismatch -d 'Fail when context item counts mismatch'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l fail-on-skipped -d 'Treat skipped linked tests as dependency failures'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l fail-on-empty-test-run -d 'Treat empty linked-test selections as failures'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l require-assertions-for-pm -d 'Require assertions for linked PM command tests'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l check-context -d 'Preflight linked PM command context diagnostics before execution'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l auto-pm-context -d 'Auto-remediate tracker-read context mismatches using tracker context'\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test' -l force -d 'Force override'\n\n# test-all flags\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l status -d 'Filter by status' -r -a 'open in_progress'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l limit -d 'Limit matching items before running linked tests' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l offset -d 'Skip matching items before running linked tests' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l background -d 'Run linked tests in managed background mode'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l timeout -d 'Default timeout seconds' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l progress -d 'Emit linked-test progress to stderr'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l env-set -d 'Set linked-test runtime environment values' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l env-clear -d 'Clear linked-test runtime environment values' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l shared-host-safe -d 'Apply shared-host-safe runtime defaults'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l pm-context -d 'PM linked-test context mode' -r -a 'schema tracker auto'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l override-linked-pm-context -d 'Force run-level --pm-context over per-linked-test metadata'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l fail-on-context-mismatch -d 'Fail when context item counts mismatch'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l fail-on-skipped -d 'Treat skipped linked tests as dependency failures'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l fail-on-empty-test-run -d 'Treat empty linked-test selections as failures'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l require-assertions-for-pm -d 'Require assertions for linked PM command tests'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l check-context -d 'Preflight linked PM command context diagnostics before execution'\ncomplete -c pm -n '__fish_seen_subcommand_from test-all' -l auto-pm-context -d 'Auto-remediate tracker-read context mismatches using tracker context'\n\n# test-runs flags\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -a 'list status logs stop resume' -d 'test-runs subcommand'\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l status -d 'Filter background runs by status' -r -a 'queued running passed failed stopped canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l limit -d 'Limit returned runs' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l stream -d 'Background log stream selector' -r -a 'stdout stderr both'\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l tail -d 'Tail number of lines from logs' -r\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l force -d 'Force-stop run with SIGKILL'\ncomplete -c pm -n '__fish_seen_subcommand_from test-runs' -l author -d 'Resume author' -r\n\n# gc flags\ncomplete -c pm -n '__fish_seen_subcommand_from gc' -l dry-run -d 'Preview cleanup targets without deleting files'\ncomplete -c pm -n '__fish_seen_subcommand_from gc' -l scope -d 'Limit cleanup to index/embeddings/runtime scopes' -r\n\n# append flags\ncomplete -c pm -n '__fish_seen_subcommand_from append' -s b -l body -d 'Item body' -r\ncomplete -c pm -n '__fish_seen_subcommand_from append' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from append' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from append' -l force -d 'Force override'\n\n# close flags\ncomplete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task' -l author -d 'Mutation author' -r\ncomplete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task' -l message -d 'History message' -r\ncomplete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task' -l force -d 'Force override'\ncomplete -c pm -n '__fish_seen_subcommand_from close close-task' -l validate-close -d 'Validate closure metadata mode' -r -a 'off warn strict'\ncomplete -c pm -n '__fish_seen_subcommand_from release' -l allow-audit-release -d 'Allow non-owner release handoffs without requiring --force'\n\n# validate flags\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-metadata -d 'Run metadata completeness checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l metadata-profile -d 'Select metadata validation profile for --check-metadata' -r -a 'core strict custom'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-resolution -d 'Run closed-item resolution metadata checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-lifecycle -d 'Run active-item lifecycle governance drift checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-stale-blockers -d 'Include stale blocker-pattern diagnostics in lifecycle checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l dependency-cycle-severity -d 'Set dependency-cycle warning policy for lifecycle checks' -r -a 'off warn error'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-files -d 'Run linked-file and orphaned-file checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l scan-mode -d 'Select file candidate scan mode for --check-files' -r -a 'default tracked-all tracked-all-strict'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l include-pm-internals -d 'Include PM storage internals in tracked-all candidate scans'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l verbose-file-lists -d 'Include full file-path lists for validate --check-files details'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l strict-exit -d 'Return non-zero exit when validation warnings are present'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l fail-on-warn -d 'Alias for --strict-exit'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-history-drift -d 'Run item/history hash drift checks'\ncomplete -c pm -n '__fish_seen_subcommand_from validate' -l check-command-references -d 'Run linked-command PM-ID reference checks'\ncomplete -c pm -n '__fish_seen_subcommand_from init' -l preset -d 'Governance preset for new setups' -r -a 'minimal default strict'\ncomplete -c pm -n '__fish_seen_subcommand_from config' -l criterion -d 'Criteria value for definition-of-done metadata-required-fields or lifecycle pattern keys (repeatable for set)' -r\ncomplete -c pm -n '__fish_seen_subcommand_from config' -l clear-criteria -d 'Clear config criteria-list key values'\ncomplete -c pm -n '__fish_seen_subcommand_from config' -l format -d 'Item format for item-format key' -r -a 'toon'\ncomplete -c pm -n '__fish_seen_subcommand_from config' -l policy -d 'Policy value for supported policy keys' -r\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l strict-directories -d 'Treat optional item-type directories as required failures'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l check-only -d 'Run read-only health diagnostics without refreshing vectors'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l no-refresh -d 'Disable automatic vector refresh attempts during health checks'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l refresh-vectors -d 'Explicitly enable vector refresh attempts during health checks'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l verbose-stale-items -d 'Include full stale vectorization ID lists in health output'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l strict-exit -d 'Return non-zero exit when health warnings are present'\ncomplete -c pm -n '__fish_seen_subcommand_from health' -l fail-on-warn -d 'Alias for --strict-exit'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l status -d 'Filter by item status' -r -a 'draft open in_progress blocked closed canceled'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l type -d 'Filter by item type' -r -a '${typeChoices}'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l parent -d 'Filter by parent item ID' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l sprint -d 'Filter by sprint' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l release -d 'Filter by release' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l assignee -d 'Filter by assignee' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l limit-items -d 'Limit returned item count' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l limit -d 'Alias for --limit-items' -r\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l full-history -d 'Export full comment history rows (cannot be combined with --latest)'\ncomplete -c pm -n '__fish_seen_subcommand_from comments-audit' -l latest -d 'Return latest n comments per item (0 for summary-only rows)' -r\n\n# completion shell argument\ncomplete -c pm -n '__fish_seen_subcommand_from completion' -l eager-tags -d 'Embed current tracker tags directly in script output'\ncomplete -c pm -n '__fish_seen_subcommand_from completion' -a 'bash zsh fish' -d 'Shell type'\n\n# templates subcommands\ncomplete -c pm -n '__fish_seen_subcommand_from templates' -a 'save list show' -d 'Templates command'\n\n# extension lifecycle flags\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -a 'init scaffold install uninstall explore manage reload doctor adopt adopt-all activate deactivate' -d 'Extension action subcommand'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l init -d 'Generate starter extension scaffold'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l scaffold -d 'Alias for --init'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l install -d 'Install extension from local path or GitHub source'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l uninstall -d 'Uninstall extension by name'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l explore -d 'List discovered extensions for selected scope'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l manage -d 'List managed extensions with update metadata'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l reload -d 'Reload extensions with cache-busted module imports'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l watch -d 'Enable watch mode with --reload'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l doctor -d 'Run consolidated extension diagnostics'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l adopt -d 'Adopt an unmanaged extension into managed metadata'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l adopt-all -d 'Adopt all unmanaged extensions into managed metadata'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l activate -d 'Activate extension in selected scope settings'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l deactivate -d 'Deactivate extension in selected scope settings'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l project -d 'Use project extension scope'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l local -d 'Alias for --project'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l global -d 'Use global extension scope'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l gh -d 'GitHub shorthand owner/repo/path' -r\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l github -d 'Alias for --gh' -r\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l ref -d 'Git ref/branch/tag for GitHub source' -r\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l detail -d 'Detail mode for extension diagnostics' -r -a 'summary deep'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l trace -d 'Include registration traces in doctor deep diagnostics'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l runtime-probe -d 'Opt-in runtime activation probe for manage output'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l fix-managed-state -d 'Adopt unmanaged extensions before diagnostics/update checks'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l strict-exit -d 'Return non-zero exit when doctor warnings are present'\ncomplete -c pm -n '__fish_seen_subcommand_from extension' -l fail-on-warn -d 'Alias for --strict-exit (doctor)'`;\n}\n\nconst SETUP_HINTS: Record<CompletionShell, string> = {\n bash: 'Add to ~/.bashrc or ~/.bash_profile: eval \"$(pm completion bash)\"',\n zsh: 'Add to ~/.zshrc: eval \"$(pm completion zsh)\"',\n fish: \"Run: pm completion fish > ~/.config/fish/completions/pm.fish\",\n};\n\nexport function runCompletion(\n shell: string,\n itemTypes: string[] = DEFAULT_ITEM_TYPES,\n tags: string[] = [],\n eagerTagExpansion = false,\n runtime: CompletionRuntimeConfig = {},\n): CompletionResult {\n const normalized = shell.trim().toLowerCase();\n if (!VALID_SHELLS.includes(normalized as CompletionShell)) {\n throw new PmCliError(\n `Unknown shell: \"${shell}\". Supported shells: ${VALID_SHELLS.join(\", \")}.`,\n EXIT_CODE.USAGE,\n );\n }\n const validShell = normalized as CompletionShell;\n let script: string;\n if (validShell === \"bash\") {\n script = generateBashScript(itemTypes, tags, eagerTagExpansion, runtime);\n } else if (validShell === \"zsh\") {\n script = generateZshScript(itemTypes, tags, eagerTagExpansion);\n } else {\n script = generateFishScript(itemTypes, tags, eagerTagExpansion);\n }\n return {\n shell: validShell,\n script,\n setup_hint: SETUP_HINTS[validShell],\n };\n}\n"]}
|