{
  "name": "Financial Counselling: Action Plan Generator",
  "version": "1.0.0",
  "description": "Generate prioritized, empathetic action plans with counsellor briefing and client materials - takes research inputs and creates deliverables",
  "category": "solutions",
  "tags": ["financial-counselling", "action-plan", "counsellor-support", "client-materials"],
  "input_schema": {
    "type": "object",
    "properties": {
      "client_summary": {
        "type": "object",
        "description": "Structured intake data about the client"
      },
      "risk_assessment": {
        "type": "object",
        "description": "Risk score and priority areas"
      },
      "research": {
        "type": "object",
        "description": "Verified research from fc-verified-research pipeline",
        "properties": {
          "hardship_programs": { "type": "object" },
          "local_services": { "type": "object" },
          "legal_protections": { "type": "object" },
          "creditor_policies": { "type": "object" }
        }
      }
    },
    "required": ["client_summary", "research"]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "action_plan": { "type": "object" },
      "counsellor_briefing": { "type": "object" },
      "client_materials": { "type": "object" }
    }
  },
  "stages": [
    {
      "id": "synthesize-plan",
      "name": "Synthesize Action Plan",
      "component_type": "synthesizer",
      "config": {
        "provider": "anthropic",
        "model": "claude-sonnet-4-20250514",
        "temperature": 0.3,
        "system_prompt": "Create an action plan for financial counsellors.\n\nPrioritization:\n1. IMMEDIATE: Safety/crisis prevention\n2. URGENT: Income protection, essential services\n3. IMPORTANT: Housing, utility arrangements\n4. STANDARD: Non-essential debts\n\nTone:\n- Hope-focused, not problem-focused\n- Acknowledge strengths and small wins\n- Partnership, not prescription\n- Plain language\n\nEvery action needs:\n- Clear next step\n- Owner (counsellor|client|both)\n- Timeline\n- Citation if external service\n\nReturn JSON:\n{\n  \"action_plan\": {\n    \"immediate_actions\": [{\"action\": \"\", \"owner\": \"\", \"timeline\": \"\", \"resources\": \"\", \"citation_url\": \"\"}],\n    \"urgent_actions\": [...],\n    \"important_actions\": [...],\n    \"standard_actions\": [...]\n  },\n  \"quick_wins\": [\"Achievable steps for momentum\"],\n  \"referrals\": [{\"service\": \"\", \"reason\": \"\", \"contact\": \"\", \"citation_url\": \"\"}],\n  \"follow_up\": {\"next_contact\": \"\", \"frequency\": \"\"}\n}",
        "inputs": [
          { "key": "client", "value": "{{input.client_summary}}" },
          { "key": "risk", "value": "{{input.risk_assessment}}" },
          { "key": "research", "value": "{{input.research}}" }
        ],
        "prompt": "Create a prioritized action plan:\n\nClient:\n{{client}}\n\nRisk:\n{{risk}}\n\nResearch:\n{{research}}\n\nBuild on client strengths. Include citations for all referrals."
      },
      "depends_on": [],
      "position": { "x": 100, "y": 100 }
    },
    {
      "id": "generate-briefing",
      "name": "Generate Counsellor Briefing",
      "component_type": "generator",
      "config": {
        "provider": "anthropic",
        "model": "claude-sonnet-4-20250514",
        "temperature": 0.3,
        "system_prompt": "Prepare a counsellor briefing for client meeting.\n\nReturn JSON:\n{\n  \"client_summary\": {\n    \"overview\": \"2-3 sentence empathetic summary\",\n    \"strengths\": [],\n    \"sensitive_areas\": []\n  },\n  \"research_highlights\": {\n    \"key_programs\": [{\"name\": \"\", \"relevance\": \"\", \"citation\": \"\"}],\n    \"key_services\": [{\"name\": \"\", \"relevance\": \"\", \"contact\": \"\"}],\n    \"key_rights\": [{\"right\": \"\", \"how_to_use\": \"\"}]\n  },\n  \"conversation_guide\": {\n    \"opening\": \"\",\n    \"key_points\": [],\n    \"questions_to_explore\": [],\n    \"things_to_avoid\": []\n  },\n  \"plan_summary\": \"\",\n  \"all_citations\": []\n}",
        "prompt": "Create counsellor briefing:\n\nClient: {{input.client_summary}}\nRisk: {{input.risk_assessment}}\nAction Plan: {{upstream.synthesize-plan.result}}\nResearch: {{input.research}}"
      },
      "depends_on": ["synthesize-plan"],
      "position": { "x": 100, "y": 300 }
    },
    {
      "id": "generate-client-materials",
      "name": "Generate Client Materials",
      "component_type": "generator",
      "config": {
        "provider": "anthropic",
        "model": "claude-sonnet-4-20250514",
        "temperature": 0.4,
        "system_prompt": "Create client-friendly materials (8th grade reading level).\n\nReturn JSON:\n{\n  \"action_summary\": {\n    \"title\": \"Your Next Steps\",\n    \"intro\": \"Encouraging message\",\n    \"actions\": [\n      {\n        \"what\": \"Clear action\",\n        \"why\": \"Why it matters\",\n        \"how\": \"Step-by-step\",\n        \"contact\": \"If applicable\"\n      }\n    ]\n  },\n  \"helpful_contacts\": [\n    {\"name\": \"\", \"helps_with\": \"\", \"contact\": \"\", \"hours\": \"\"}\n  ],\n  \"your_rights\": [\n    {\"right\": \"Plain language\", \"how_to_use\": \"\"}\n  ],\n  \"encouragement\": \"Closing message of hope\",\n  \"next_appointment\": \"[Counsellor to fill in]\"\n}",
        "prompt": "Create client materials:\n\nAction Plan: {{upstream.synthesize-plan.result}}\nClient Situation: {{input.client_summary}}\n\nKeep it simple, encouraging, and focused on most important actions."
      },
      "depends_on": ["synthesize-plan"],
      "position": { "x": 400, "y": 300 }
    },
    {
      "id": "compile-output",
      "name": "Compile Final Output",
      "component_type": "json_transform",
      "config": {
        "data": {
          "action_plan": "{{upstream.synthesize-plan.result}}",
          "counsellor_briefing": "{{upstream.generate-briefing.result}}",
          "client_materials": "{{upstream.generate-client-materials.result}}"
        },
        "jmespath_expression": "@"
      },
      "depends_on": ["generate-briefing", "generate-client-materials"],
      "position": { "x": 250, "y": 500 }
    }
  ],
  "output_stage_id": "compile-output"
}
