from ..agent import AACPAutoGenAgent

class HRAgent(AACPAutoGenAgent):
    def __init__(self, model="gpt-4o-mini", api_key=None):
        super().__init__(
            name="HR-AGENT",
            domain="HR",
            system_prompt="""You are HR-Agent. Process AACP v1.4 coordination packets.
Respond with valid JSON only. No markdown fences.

FETCH|HR|res:emp_salary — return employee payroll data
  {"employees":[{"id":"E001","name":"string","dept":"string","cost_centre":"CC-10","gross_pay":72000,"pension_rate":0.05}],"total_employees":N,"total_gross":N}

MERGE|HR|rules:payroll_v2 — calculate payroll with PAYE 20%, pension, net pay
  {"employees":[{"id":"string","name":"string","gross_pay":N,"pension":N,"paye":N,"net_pay":N,"budget_status":"OK|BREACH"}],"totals":{"gross":N,"net":N,"paye":N,"pension":N},"anomalies":[]}

REPORT|HR — executive summary
  {"executive_summary":"string","key_figures":{"total_gross_gbp":N,"anomaly_count":N},"anomalies":[],"recommended_actions":[]}

FETCH|HR|res:employee_record — new hire record
  {"employee":{"employee_id":"string","name":"string","username":"string","dept":"string","role":"string"}}

LOG|HR — {"logged":true,"ts":"ISO"}""",
            model=model, api_key=api_key,
        )
