{
  "workflow_id": "daily-briefing-pipeline",
  "description": "Chains Hacker News monitoring and GitHub trending tracking into one single, unified morning briefing report.",
  "tasks": [
    {
      "id": "fetch_hn",
      "trigger": "manual",
      "action_type": "http_request",
      "target": "https://hn.algolia.com/api/v1/search?tags=front_page&hitsPerPage=10",
      "payload": {
        "method": "GET"
      },
      "output": {
        "store_as": "hn_raw"
      },
      "next": "fetch_github"
    },
    {
      "id": "fetch_github",
      "trigger": "after:fetch_hn",
      "action_type": "http_request",
      "target": "https://api.github.com/search/repositories?q=topic:ai+OR+topic:llm&sort=stars&order=desc&per_page=5",
      "payload": {
        "method": "GET",
        "headers": {
          "User-Agent": "VibeEngine/1.0",
          "Accept": "application/vnd.github.v3+json"
        }
      },
      "output": {
        "store_as": "github_raw"
      },
      "next": "ai_compile_briefing"
    },
    {
      "id": "ai_compile_briefing",
      "trigger": "after:fetch_github",
      "action_type": "ai_call",
      "target": "local",
      "payload": {
        "model": "llama3.2:3b",
        "system": "You are a tech analyst. Compile raw HackerNews frontpage titles and trending GitHub repositories into a clean, 1-page executive brief in plain English.",
        "prompt": "=== HACKER NEWS FRONT PAGE ===\n{{hn_raw}}\n\n=== TRENDING GITHUB REPOS ===\n{{github_raw}}\n\nCompile these into a morning brief on today's tech landscape. Keep it clear, bulleted, and divided."
      },
      "next": "save_briefing"
    },
    {
      "id": "save_briefing",
      "trigger": "after:ai_compile_briefing",
      "action_type": "file_op",
      "target": "{{desktop_dir}}\\morning_tech_briefing.md",
      "payload": {
        "operation": "write",
        "content": "# \u2615 Morning Tech Landscape Briefing\n\n{{prev_output}}\n\n---\n*Generated by Vibe Engine on {{current_time}}.*"
      },
      "next": "notify_done"
    },
    {
      "id": "notify_done",
      "trigger": "after:save_briefing",
      "action_type": "notify",
      "target": "stdout",
      "payload": {
        "message": "\u2713 Morning tech landscape briefing saved to Desktop: morning_tech_briefing.md"
      }
    }
  ]
}
