{
  "project_context": {
    "name": "desk-moloni",
    "description": "Integração DeskCRM ↔ Moloni",
    "phase": "Phase 2 - Web Interface Development",
    "stack": "PHP 8.0+ | MySQL/MariaDB | DeskCRM API v3 | Moloni API",
    "architecture": "Component-based with API connectors, data mappers, sync engines",
    "repository": "https://git.descomplicar.pt/desk-moloni",
    "branch": "001-desk-moloni-integration"
  },
  "compatibility_status": {
    "status": "CRITICAL_ISSUES_FOUND",
    "php_version": "8.0 (EOL - CRITICAL)",
    "database": "MySQL/MariaDB (COMPATIBLE)",
    "testing": "PHPUnit 9.3+ (CONSTRAINED)",
    "oauth": "2.0 RFC 9700 (COMPLIANT)",
    "validation_date": "2025-09-12",
    "action_required": true
  },
  "critical_issues": [
    {
      "id": "COMPAT-001",
      "severity": "CRITICAL",
      "issue": "PHP 8.0 End-of-Life",
      "impact": "Security vulnerability exposure",
      "action": "Upgrade to PHP 8.4",
      "assigned_agent": "system-development-agent"
    },
    {
      "id": "COMPAT-002", 
      "severity": "MEDIUM",
      "issue": "PHPUnit version constraints",
      "impact": "Limited testing capabilities", 
      "action": "Upgrade with PHP version",
      "assigned_agent": "system-development-agent"
    }
  ],
  "completed_tasks": [],
  "failed_tasks": [],
  "current_agents": [],
  "task_queue": [
    {
      "id": "T-COMPAT-001",
      "name": "PHP Version Upgrade Strategy", 
      "agent": "system-development-agent",
      "priority": "CRITICAL",
      "status": "pending",
      "dependencies": []
    },
    {
      "id": "T-COMPAT-002",
      "name": "Database Optimization Review",
      "agent": "database-design-specialist", 
      "priority": "MEDIUM",
      "status": "pending",
      "dependencies": []
    }
  ],
  "shared_files": {
    "specs": ".specify/specs.md",
    "plan": ".specify/plan.md", 
    "tasks": ".specify/tasks.md",
    "constitution": ".specify/memory/constitution.md",
    "compatibility_research": ".orchestrator/research/",
    "agent_mapping": ".orchestrator/agent_mapping.md"
  },
  "environment_vars": {
    "DESKCRM_API_URL": "https://desk.descomplicar.pt/api/",
    "MOLONI_API_URL": "https://api.moloni.pt/v1/",
    "SYNC_BATCH_SIZE": "100",
    "SYNC_RATE_LIMIT": "50"
  },
  "checkpoints": {
    "context_loaded": "2025-09-12T21:33:00Z",
    "compatibility_research": "2025-09-12T21:35:00Z", 
    "validation_completed": "2025-09-12T21:36:00Z",
    "agent_mapping_created": "2025-09-12T21:37:00Z",
    "shared_state_created": "2025-09-12T21:38:00Z"
  },
  "orchestration_status": "PAUSED_CRITICAL_ISSUES",
  "next_action": "Resolve compatibility issues before proceeding",
  "last_checkpoint": "2025-09-12T21:38:00Z"
}