{
  "workflow_id": "github-trending-tracker",
  "description": "Fetches the top daily trending GitHub repositories for AI, parses them, and saves a markdown report to the desktop.",
  "tasks": [
    {
      "id": "fetch_trending",
      "trigger": "manual",
      "action_type": "http_request",
      "target": "https://api.github.com/search/repositories?q=topic:llm+OR+topic:ai&sort=stars&order=desc&per_page=10",
      "payload": {
        "method": "GET",
        "headers": {
          "User-Agent": "VibeEngine/1.0",
          "Accept": "application/vnd.github.v3+json"
        }
      },
      "next": "ai_summarize_trending"
    },
    {
      "id": "ai_summarize_trending",
      "trigger": "after:fetch_trending",
      "action_type": "ai_call",
      "target": "local",
      "payload": {
        "model": "llama3.2:3b",
        "system": "You are a software analyst. Summarize the repositories into a clean list showing Name, Link, Stars, and a 1-sentence description of what it does.",
        "prompt": "Here are raw GitHub search results:\n\n{{prev_output}}\n\nSelect the top 5 repositories. Format them as a clean markdown table showing Name (linked to URL), Star Count, and a 1-sentence description of what it does in plain English."
      },
      "next": "save_trending_report"
    },
    {
      "id": "save_trending_report",
      "trigger": "after:ai_summarize_trending",
      "action_type": "file_op",
      "target": "{{desktop_dir}}\\github_trending_brief.md",
      "payload": {
        "operation": "write",
        "content": "# \ud83c\udf1f GitHub Trending AI Repositories\n*Daily briefing on active developer trends*\n\n{{prev_output}}\n\n---\n*Generated automatically by Vibe Engine.*"
      },
      "next": "notify_done"
    },
    {
      "id": "notify_done",
      "trigger": "after:save_trending_report",
      "action_type": "notify",
      "target": "stdout",
      "payload": {
        "message": "\u2713 GitHub Trending Brief saved to Desktop: github_trending_brief.md"
      }
    }
  ]
}
