#compdef adrs

autoload -U is-at-least

_adrs() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_adrs_commands" \
"*::: :->adrs" \
&& ret=0
    case $state in
    (adrs)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-command-$line[1]:"
        case $line[1] in
            (init)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::directory -- Directory to store ADRs \[default\: doc/adr\]:_files' \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
'-s+[Supersede an existing ADR by number]:NUMBER:_default' \
'--supersedes=[Supersede an existing ADR by number]:NUMBER:_default' \
'-l+[Link to another ADR (format\: "TARGET\:KIND\:REVERSE_KIND")]:LINK:_default' \
'--link=[Link to another ADR (format\: "TARGET\:KIND\:REVERSE_KIND")]:LINK:_default' \
'-f+[Template format\: nygard, madr \[default\: nygard\]]:FORMAT:_default' \
'--format=[Template format\: nygard, madr \[default\: nygard\]]:FORMAT:_default' \
'-v+[Template variant\: full, minimal, bare, bare-minimal \[default\: full\]]:VARIANT:_default' \
'--variant=[Template variant\: full, minimal, bare, bare-minimal \[default\: full\]]:VARIANT:_default' \
'--template=[Path to a custom template file (overrides --format/--variant and config)]:PATH:_files' \
'--status=[Initial status \[default\: config default_status or Proposed\]]:STATUS:_default' \
'*-t+[Tags for categorization (comma-separated, requires --ng)]:TAGS:_default' \
'*--tags=[Tags for categorization (comma-separated, requires --ng)]:TAGS:_default' \
'*--deciders=[Decision makers (comma-separated, requires --ng)]:NAMES:_default' \
'*--consulted=[People consulted before the decision (comma-separated, requires --ng)]:NAMES:_default' \
'*--informed=[People informed after the decision (comma-separated, requires --ng)]:NAMES:_default' \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--no-edit[Create ADR without opening editor (for scripting/CI)]' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':title -- Title of the ADR:_default' \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help]' \
'--help[Print help]' \
':adr -- ADR number or title (supports fuzzy matching):_default' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'-s+[Filter by status (e.g., proposed, accepted, deprecated, superseded)]:STATUS:_default' \
'--status=[Filter by status (e.g., proposed, accepted, deprecated, superseded)]:STATUS:_default' \
'--since=[Filter by date (show ADRs from this date onwards, YYYY-MM-DD)]:DATE:_default' \
'--until=[Filter by date (show ADRs up to this date, YYYY-MM-DD)]:DATE:_default' \
'--decider=[Filter by decision maker (MADR format)]:NAME:_default' \
'-t+[Filter by tag]:TAG:_default' \
'--tag=[Filter by tag]:TAG:_default' \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'-l[Show detailed output (number, status, date, title)]' \
'--long[Show detailed output (number, status, date, title)]' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(search)
_arguments "${_arguments_options[@]}" : \
'-s+[Filter by status]:STATUS:_default' \
'--status=[Filter by status]:STATUS:_default' \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'-t[Search titles only]' \
'--title[Search titles only]' \
'-c[Case-sensitive search]' \
'--case-sensitive[Case-sensitive search]' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':query -- Search query:_default' \
&& ret=0
;;
(link)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':source -- Source ADR number:_default' \
':link -- Link description (e.g., "Amends", "Supersedes", "Relates to"):_default' \
':target -- Target ADR number:_default' \
'::reverse_link -- Reverse link description (auto-derived if omitted):_default' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
'--by=[For '\''superseded'\'' status\: the ADR number that supersedes this one]:NUMBER:_default' \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':adr -- ADR number:_default' \
':status -- New status (proposed, accepted, deprecated, superseded, rejected, or custom):_default' \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
'*--ignore=[Ignore a rule by ID or name (repeatable); merged with \[doctor\].ignore in adrs.toml]:RULE:_default' \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--warnings-as-errors[Exit with status 1 if there are warnings, not just errors]' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(generate)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help]' \
'--help[Print help]' \
":: :_adrs__generate_commands" \
"*::: :->generate" \
&& ret=0

    case $state in
    (generate)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-generate-command-$line[1]:"
        case $line[1] in
            (toc)
_arguments "${_arguments_options[@]}" : \
'-i+[Prepend content from file]:FILE:_files' \
'--intro=[Prepend content from file]:FILE:_files' \
'-O+[Append content from file]:FILE:_files' \
'--outro=[Append content from file]:FILE:_files' \
'-p+[Prefix for ADR links]:PREFIX:_default' \
'--prefix=[Prefix for ADR links]:PREFIX:_default' \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'-o[Use ordered list (1. 2. 3.)]' \
'--ordered[Use ordered list (1. 2. 3.)]' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(graph)
_arguments "${_arguments_options[@]}" : \
'-p+[Prefix for node URLs]:PREFIX:_default' \
'--prefix=[Prefix for node URLs]:PREFIX:_default' \
'-e+[File extension for links \[default\: md\]]:EXTENSION:_default' \
'--extension=[File extension for links \[default\: md\]]:EXTENSION:_default' \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(book)
_arguments "${_arguments_options[@]}" : \
'-o+[Output directory \[default\: book\]]:OUTPUT:_files' \
'--output=[Output directory \[default\: book\]]:OUTPUT:_files' \
'-t+[Book title]:TITLE:_default' \
'--title=[Book title]:TITLE:_default' \
'-d+[Book description]:DESCRIPTION:_default' \
'--description=[Book description]:DESCRIPTION:_default' \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_adrs__generate__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-generate-help-command-$line[1]:"
        case $line[1] in
            (toc)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(graph)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(book)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(export)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help]' \
'--help[Print help]' \
":: :_adrs__export_commands" \
"*::: :->export" \
&& ret=0

    case $state in
    (export)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-export-command-$line[1]:"
        case $line[1] in
            (json)
_arguments "${_arguments_options[@]}" : \
'-d+[Export from a directory (no repository required)]:PATH:_files' \
'--dir=[Export from a directory (no repository required)]:PATH:_files' \
'--base-url=[Base URL for source_uri (e.g., https\://github.com/org/repo/blob/main/doc/adr)]:URL:_default' \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'-p[Pretty-print the JSON output]' \
'--pretty[Pretty-print the JSON output]' \
'--metadata-only[Export metadata only (excludes content, includes source_uri)]' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::adr -- Export a single ADR by number:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_adrs__export__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-export-help-command-$line[1]:"
        case $line[1] in
            (json)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(import)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help]' \
'--help[Print help]' \
":: :_adrs__import_commands" \
"*::: :->import" \
&& ret=0

    case $state in
    (import)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-import-command-$line[1]:"
        case $line[1] in
            (json)
_arguments "${_arguments_options[@]}" : \
'-d+[Import to a directory (no repository required)]:PATH:_files' \
'--dir=[Import to a directory (no repository required)]:PATH:_files' \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'-o[Overwrite existing files]' \
'--overwrite[Overwrite existing files]' \
'-r[Renumber ADRs starting from next available number (append to existing ADRs)]' \
'--renumber[Renumber ADRs starting from next available number (append to existing ADRs)]' \
'--dry-run[Preview import without writing files]' \
'--ng[Use next-gen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':file -- JSON-ADR file to import (use "-" for stdin):_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_adrs__import__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-import-help-command-$line[1]:"
        case $line[1] in
            (json)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(template)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help]' \
'--help[Print help]' \
":: :_adrs__template_commands" \
"*::: :->template" \
&& ret=0

    case $state in
    (template)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-template-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
'-v+[Template variant\: full, minimal, bare, bare-minimal]:VARIANT:_default' \
'--variant=[Template variant\: full, minimal, bare, bare-minimal]:VARIANT:_default' \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help]' \
'--help[Print help]' \
':format -- Template format\: nygard, madr:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_adrs__template__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-template-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(completions)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':shell -- Shell to generate completions for:((bash\:"Bourne Again Shell"
zsh\:"Z Shell"
fish\:"Fish Shell"
powershell\:"PowerShell"
elvish\:"Elvish Shell"))' \
&& ret=0
;;
(mcp)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_adrs__mcp_commands" \
"*::: :->mcp" \
&& ret=0

    case $state in
    (mcp)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-mcp-command-$line[1]:"
        case $line[1] in
            (serve)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_adrs__mcp__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-mcp-help-command-$line[1]:"
        case $line[1] in
            (serve)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(cheatsheet)
_arguments "${_arguments_options[@]}" : \
'-C+[Run from a different directory]:DIR:_files' \
'--cwd=[Run from a different directory]:DIR:_files' \
'--ng[Enable NextGen mode with YAML frontmatter]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_adrs__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-help-command-$line[1]:"
        case $line[1] in
            (init)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(search)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(link)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(generate)
_arguments "${_arguments_options[@]}" : \
":: :_adrs__help__generate_commands" \
"*::: :->generate" \
&& ret=0

    case $state in
    (generate)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-help-generate-command-$line[1]:"
        case $line[1] in
            (toc)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(graph)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(book)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(export)
_arguments "${_arguments_options[@]}" : \
":: :_adrs__help__export_commands" \
"*::: :->export" \
&& ret=0

    case $state in
    (export)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-help-export-command-$line[1]:"
        case $line[1] in
            (json)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(import)
_arguments "${_arguments_options[@]}" : \
":: :_adrs__help__import_commands" \
"*::: :->import" \
&& ret=0

    case $state in
    (import)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-help-import-command-$line[1]:"
        case $line[1] in
            (json)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(template)
_arguments "${_arguments_options[@]}" : \
":: :_adrs__help__template_commands" \
"*::: :->template" \
&& ret=0

    case $state in
    (template)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-help-template-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(completions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(mcp)
_arguments "${_arguments_options[@]}" : \
":: :_adrs__help__mcp_commands" \
"*::: :->mcp" \
&& ret=0

    case $state in
    (mcp)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:adrs-help-mcp-command-$line[1]:"
        case $line[1] in
            (serve)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(cheatsheet)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_adrs_commands] )) ||
_adrs_commands() {
    local commands; commands=(
'init:Initialize a new ADR repository' \
'new:Create a new ADR' \
'edit:Edit an existing ADR' \
'list:List all ADRs' \
'search:Search ADRs for matching content' \
'link:Link two ADRs together' \
'status:Change an ADR'\''s status' \
'config:Show configuration' \
'doctor:Check repository health' \
'generate:Generate documentation' \
'export:Export ADRs to different formats' \
'import:Import ADRs from different formats' \
'template:Manage ADR templates' \
'completions:Generate shell completions' \
'mcp:Start MCP server for AI agent integration (included by default)' \
'cheatsheet:Show quick reference for common workflows' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs commands' commands "$@"
}
(( $+functions[_adrs__cheatsheet_commands] )) ||
_adrs__cheatsheet_commands() {
    local commands; commands=()
    _describe -t commands 'adrs cheatsheet commands' commands "$@"
}
(( $+functions[_adrs__completions_commands] )) ||
_adrs__completions_commands() {
    local commands; commands=()
    _describe -t commands 'adrs completions commands' commands "$@"
}
(( $+functions[_adrs__config_commands] )) ||
_adrs__config_commands() {
    local commands; commands=()
    _describe -t commands 'adrs config commands' commands "$@"
}
(( $+functions[_adrs__doctor_commands] )) ||
_adrs__doctor_commands() {
    local commands; commands=()
    _describe -t commands 'adrs doctor commands' commands "$@"
}
(( $+functions[_adrs__edit_commands] )) ||
_adrs__edit_commands() {
    local commands; commands=()
    _describe -t commands 'adrs edit commands' commands "$@"
}
(( $+functions[_adrs__export_commands] )) ||
_adrs__export_commands() {
    local commands; commands=(
'json:Export ADRs to JSON-ADR format' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs export commands' commands "$@"
}
(( $+functions[_adrs__export__help_commands] )) ||
_adrs__export__help_commands() {
    local commands; commands=(
'json:Export ADRs to JSON-ADR format' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs export help commands' commands "$@"
}
(( $+functions[_adrs__export__help__help_commands] )) ||
_adrs__export__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'adrs export help help commands' commands "$@"
}
(( $+functions[_adrs__export__help__json_commands] )) ||
_adrs__export__help__json_commands() {
    local commands; commands=()
    _describe -t commands 'adrs export help json commands' commands "$@"
}
(( $+functions[_adrs__export__json_commands] )) ||
_adrs__export__json_commands() {
    local commands; commands=()
    _describe -t commands 'adrs export json commands' commands "$@"
}
(( $+functions[_adrs__generate_commands] )) ||
_adrs__generate_commands() {
    local commands; commands=(
'toc:Generate a table of contents' \
'graph:Generate a Graphviz graph' \
'book:Generate an mdbook' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs generate commands' commands "$@"
}
(( $+functions[_adrs__generate__book_commands] )) ||
_adrs__generate__book_commands() {
    local commands; commands=()
    _describe -t commands 'adrs generate book commands' commands "$@"
}
(( $+functions[_adrs__generate__graph_commands] )) ||
_adrs__generate__graph_commands() {
    local commands; commands=()
    _describe -t commands 'adrs generate graph commands' commands "$@"
}
(( $+functions[_adrs__generate__help_commands] )) ||
_adrs__generate__help_commands() {
    local commands; commands=(
'toc:Generate a table of contents' \
'graph:Generate a Graphviz graph' \
'book:Generate an mdbook' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs generate help commands' commands "$@"
}
(( $+functions[_adrs__generate__help__book_commands] )) ||
_adrs__generate__help__book_commands() {
    local commands; commands=()
    _describe -t commands 'adrs generate help book commands' commands "$@"
}
(( $+functions[_adrs__generate__help__graph_commands] )) ||
_adrs__generate__help__graph_commands() {
    local commands; commands=()
    _describe -t commands 'adrs generate help graph commands' commands "$@"
}
(( $+functions[_adrs__generate__help__help_commands] )) ||
_adrs__generate__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'adrs generate help help commands' commands "$@"
}
(( $+functions[_adrs__generate__help__toc_commands] )) ||
_adrs__generate__help__toc_commands() {
    local commands; commands=()
    _describe -t commands 'adrs generate help toc commands' commands "$@"
}
(( $+functions[_adrs__generate__toc_commands] )) ||
_adrs__generate__toc_commands() {
    local commands; commands=()
    _describe -t commands 'adrs generate toc commands' commands "$@"
}
(( $+functions[_adrs__help_commands] )) ||
_adrs__help_commands() {
    local commands; commands=(
'init:Initialize a new ADR repository' \
'new:Create a new ADR' \
'edit:Edit an existing ADR' \
'list:List all ADRs' \
'search:Search ADRs for matching content' \
'link:Link two ADRs together' \
'status:Change an ADR'\''s status' \
'config:Show configuration' \
'doctor:Check repository health' \
'generate:Generate documentation' \
'export:Export ADRs to different formats' \
'import:Import ADRs from different formats' \
'template:Manage ADR templates' \
'completions:Generate shell completions' \
'mcp:Start MCP server for AI agent integration (included by default)' \
'cheatsheet:Show quick reference for common workflows' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs help commands' commands "$@"
}
(( $+functions[_adrs__help__cheatsheet_commands] )) ||
_adrs__help__cheatsheet_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help cheatsheet commands' commands "$@"
}
(( $+functions[_adrs__help__completions_commands] )) ||
_adrs__help__completions_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help completions commands' commands "$@"
}
(( $+functions[_adrs__help__config_commands] )) ||
_adrs__help__config_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help config commands' commands "$@"
}
(( $+functions[_adrs__help__doctor_commands] )) ||
_adrs__help__doctor_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help doctor commands' commands "$@"
}
(( $+functions[_adrs__help__edit_commands] )) ||
_adrs__help__edit_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help edit commands' commands "$@"
}
(( $+functions[_adrs__help__export_commands] )) ||
_adrs__help__export_commands() {
    local commands; commands=(
'json:Export ADRs to JSON-ADR format' \
    )
    _describe -t commands 'adrs help export commands' commands "$@"
}
(( $+functions[_adrs__help__export__json_commands] )) ||
_adrs__help__export__json_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help export json commands' commands "$@"
}
(( $+functions[_adrs__help__generate_commands] )) ||
_adrs__help__generate_commands() {
    local commands; commands=(
'toc:Generate a table of contents' \
'graph:Generate a Graphviz graph' \
'book:Generate an mdbook' \
    )
    _describe -t commands 'adrs help generate commands' commands "$@"
}
(( $+functions[_adrs__help__generate__book_commands] )) ||
_adrs__help__generate__book_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help generate book commands' commands "$@"
}
(( $+functions[_adrs__help__generate__graph_commands] )) ||
_adrs__help__generate__graph_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help generate graph commands' commands "$@"
}
(( $+functions[_adrs__help__generate__toc_commands] )) ||
_adrs__help__generate__toc_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help generate toc commands' commands "$@"
}
(( $+functions[_adrs__help__help_commands] )) ||
_adrs__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help help commands' commands "$@"
}
(( $+functions[_adrs__help__import_commands] )) ||
_adrs__help__import_commands() {
    local commands; commands=(
'json:Import ADRs from JSON-ADR format' \
    )
    _describe -t commands 'adrs help import commands' commands "$@"
}
(( $+functions[_adrs__help__import__json_commands] )) ||
_adrs__help__import__json_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help import json commands' commands "$@"
}
(( $+functions[_adrs__help__init_commands] )) ||
_adrs__help__init_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help init commands' commands "$@"
}
(( $+functions[_adrs__help__link_commands] )) ||
_adrs__help__link_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help link commands' commands "$@"
}
(( $+functions[_adrs__help__list_commands] )) ||
_adrs__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help list commands' commands "$@"
}
(( $+functions[_adrs__help__mcp_commands] )) ||
_adrs__help__mcp_commands() {
    local commands; commands=(
'serve:Start the MCP server' \
    )
    _describe -t commands 'adrs help mcp commands' commands "$@"
}
(( $+functions[_adrs__help__mcp__serve_commands] )) ||
_adrs__help__mcp__serve_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help mcp serve commands' commands "$@"
}
(( $+functions[_adrs__help__new_commands] )) ||
_adrs__help__new_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help new commands' commands "$@"
}
(( $+functions[_adrs__help__search_commands] )) ||
_adrs__help__search_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help search commands' commands "$@"
}
(( $+functions[_adrs__help__status_commands] )) ||
_adrs__help__status_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help status commands' commands "$@"
}
(( $+functions[_adrs__help__template_commands] )) ||
_adrs__help__template_commands() {
    local commands; commands=(
'list:List available templates' \
'show:Show a template'\''s content' \
    )
    _describe -t commands 'adrs help template commands' commands "$@"
}
(( $+functions[_adrs__help__template__list_commands] )) ||
_adrs__help__template__list_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help template list commands' commands "$@"
}
(( $+functions[_adrs__help__template__show_commands] )) ||
_adrs__help__template__show_commands() {
    local commands; commands=()
    _describe -t commands 'adrs help template show commands' commands "$@"
}
(( $+functions[_adrs__import_commands] )) ||
_adrs__import_commands() {
    local commands; commands=(
'json:Import ADRs from JSON-ADR format' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs import commands' commands "$@"
}
(( $+functions[_adrs__import__help_commands] )) ||
_adrs__import__help_commands() {
    local commands; commands=(
'json:Import ADRs from JSON-ADR format' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs import help commands' commands "$@"
}
(( $+functions[_adrs__import__help__help_commands] )) ||
_adrs__import__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'adrs import help help commands' commands "$@"
}
(( $+functions[_adrs__import__help__json_commands] )) ||
_adrs__import__help__json_commands() {
    local commands; commands=()
    _describe -t commands 'adrs import help json commands' commands "$@"
}
(( $+functions[_adrs__import__json_commands] )) ||
_adrs__import__json_commands() {
    local commands; commands=()
    _describe -t commands 'adrs import json commands' commands "$@"
}
(( $+functions[_adrs__init_commands] )) ||
_adrs__init_commands() {
    local commands; commands=()
    _describe -t commands 'adrs init commands' commands "$@"
}
(( $+functions[_adrs__link_commands] )) ||
_adrs__link_commands() {
    local commands; commands=()
    _describe -t commands 'adrs link commands' commands "$@"
}
(( $+functions[_adrs__list_commands] )) ||
_adrs__list_commands() {
    local commands; commands=()
    _describe -t commands 'adrs list commands' commands "$@"
}
(( $+functions[_adrs__mcp_commands] )) ||
_adrs__mcp_commands() {
    local commands; commands=(
'serve:Start the MCP server' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs mcp commands' commands "$@"
}
(( $+functions[_adrs__mcp__help_commands] )) ||
_adrs__mcp__help_commands() {
    local commands; commands=(
'serve:Start the MCP server' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs mcp help commands' commands "$@"
}
(( $+functions[_adrs__mcp__help__help_commands] )) ||
_adrs__mcp__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'adrs mcp help help commands' commands "$@"
}
(( $+functions[_adrs__mcp__help__serve_commands] )) ||
_adrs__mcp__help__serve_commands() {
    local commands; commands=()
    _describe -t commands 'adrs mcp help serve commands' commands "$@"
}
(( $+functions[_adrs__mcp__serve_commands] )) ||
_adrs__mcp__serve_commands() {
    local commands; commands=()
    _describe -t commands 'adrs mcp serve commands' commands "$@"
}
(( $+functions[_adrs__new_commands] )) ||
_adrs__new_commands() {
    local commands; commands=()
    _describe -t commands 'adrs new commands' commands "$@"
}
(( $+functions[_adrs__search_commands] )) ||
_adrs__search_commands() {
    local commands; commands=()
    _describe -t commands 'adrs search commands' commands "$@"
}
(( $+functions[_adrs__status_commands] )) ||
_adrs__status_commands() {
    local commands; commands=()
    _describe -t commands 'adrs status commands' commands "$@"
}
(( $+functions[_adrs__template_commands] )) ||
_adrs__template_commands() {
    local commands; commands=(
'list:List available templates' \
'show:Show a template'\''s content' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs template commands' commands "$@"
}
(( $+functions[_adrs__template__help_commands] )) ||
_adrs__template__help_commands() {
    local commands; commands=(
'list:List available templates' \
'show:Show a template'\''s content' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'adrs template help commands' commands "$@"
}
(( $+functions[_adrs__template__help__help_commands] )) ||
_adrs__template__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'adrs template help help commands' commands "$@"
}
(( $+functions[_adrs__template__help__list_commands] )) ||
_adrs__template__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'adrs template help list commands' commands "$@"
}
(( $+functions[_adrs__template__help__show_commands] )) ||
_adrs__template__help__show_commands() {
    local commands; commands=()
    _describe -t commands 'adrs template help show commands' commands "$@"
}
(( $+functions[_adrs__template__list_commands] )) ||
_adrs__template__list_commands() {
    local commands; commands=()
    _describe -t commands 'adrs template list commands' commands "$@"
}
(( $+functions[_adrs__template__show_commands] )) ||
_adrs__template__show_commands() {
    local commands; commands=()
    _describe -t commands 'adrs template show commands' commands "$@"
}

if [ "$funcstack[1]" = "_adrs" ]; then
    _adrs "$@"
else
    compdef _adrs adrs
fi
