{
  "workflow_id": "daily-git-changelog",
  "description": "Runs a local git command to fetch today's code diffs, has Ollama write a clean change summary, and saves a markdown changelog.",
  "tasks": [
    {
      "id": "fetch_git_diff",
      "trigger": "manual",
      "action_type": "run_script",
      "target": "git",
      "payload": {
        "args": [
          "diff",
          "HEAD~1",
          "HEAD"
        ]
      },
      "next": "ai_review_diff"
    },
    {
      "id": "ai_review_diff",
      "trigger": "after:fetch_git_diff",
      "action_type": "ai_call",
      "target": "local",
      "payload": {
        "model": "llama3.2:3b",
        "system": "You are a senior code reviewer. Read the git diff and write a clean, bulleted changelog in plain English explaining what changed and why.",
        "prompt": "Here is the raw git diff from the last commit:\n\n{{prev_output}}\n\nWrite a clean, human-readable changelog of what was modified, added, or deleted in this diff."
      },
      "next": "save_changelog"
    },
    {
      "id": "save_changelog",
      "trigger": "after:ai_review_diff",
      "action_type": "file_op",
      "target": "{{desktop_dir}}\\daily_git_changelog.md",
      "payload": {
        "operation": "write",
        "content": "# \ud83d\udcdd Daily Git Changelog\n*Generated by Vibe Engine Code Reviewer*\n\n{{prev_output}}\n\n---\n*Review date: {{current_time}}.*"
      },
      "next": "notify_done"
    },
    {
      "id": "notify_done",
      "trigger": "after:save_changelog",
      "action_type": "notify",
      "target": "stdout",
      "payload": {
        "message": "\u2713 Daily Git Changelog saved to Desktop: daily_git_changelog.md"
      }
    }
  ]
}
