vibe-action 0.1.1

Command router — execute shell commands and LLM prompts via simple YAML actions.
name: commit
about: AI-generated commit message
args:
  - name: path
    short: 'p'
    input: string
    help: 'Path to git repository (default: current directory)'
    default: .
actions:
  # Get list of changed files
  - tag: tag_changed_files
    run: cmd
    expect: list
    check: .+
    action: cd {path|resolve} && git diff HEAD -U0 --name-only --relative
  # Diff each changed file
  - tag: tag_file_diff
    run: cmd
    expect: list
    action: |
      cd {path}
      if [ -f "{tag_changed_files}" ]; then
        git diff HEAD -- "{tag_changed_files}"
      fi
  # LLM summarizes each diff in one sentence
  - tag: tag_file_summary
    run: small
    expect: list
    action: |
      [Task]
        1. Read the git diff below.
        2. Find the file path in the header (lines starting with --- and +++).
        3. Count the number of changed blocks (@@ sections).
        4. Write a single phrase describing the most important changes.
        5. Reply in format: <path> (<N> changes): <phrase>
        6. Ignore trivial changes like imports or formatting.

      [Example]
      src/main.rs (3 changes): fix CLI argument parsing

      [Diff]
      {tag_file_diff}
  # LLM combines all summaries into one commit message
  - tag: tag_commit_message
    run: medium
    expect: string
    action: |
      [Task]
      Summarize all summaries below into ONE short conventional commit message (max 10 words).
      Allowed types: feat, fix, docs, refactor, test, chore.
      Format strictly: <type>: <commit> (NO parentheses or scopes).

      [Summaries]
      {tag_file_summary|uniq|join}
  # Execute git commit (asks for confirmation)
  - tag: tag_commit
    run: cmd
    expect: string
    confirm: true
    action: cd {path} && git add . && git commit -m '{tag_commit_message|lower}'