[
  {
    "id": "cmd_001",
    "name": "System Health Check",
    "trigger_keywords": [
      "ssd",
      "health",
      "space",
      "status"
    ],
    "action": "execute_bash",
    "command": "df -h /mnt/ext_ssd && uptime",
    "description": "Checks physical SSD space and system uptime."
  },
  {
    "id": "cmd_002",
    "name": "Engineer Sub-Agent",
    "trigger_keywords": [
      "create",
      "build",
      "engineer",
      "new workflow"
    ],
    "action": "n8n_api_post",
    "endpoint": "/api/v1/workflows",
    "description": "Creates a new automated sub-flow in n8n. Requires a JSON workflow schema."
  },
  {
    "id": "cmd_003",
    "name": "Manage Memory",
    "trigger_keywords": [
      "remember",
      "forget",
      "update memory"
    ],
    "action": "filesystem_write",
    "target_file": "/home/node/.n8n-files/memory_bank.json",
    "description": "Appends new information to the long-term memory bank on the SSD."
  },
  {
    "id": "cmd_004",
    "name": "App Status Check",
    "trigger_keywords": [
      "app",
      "website",
      "running",
      "sportmanager"
    ],
    "action": "execute_bash",
    "command": "wget -qS --spider http://mysportmanager.ofsoftware.ie 2>&1 | grep HTTP | head -n 1",
    "description": "Checks if the My Sport Manager application is online."
  },
  {
    "id": "cmd_005",
    "name": "Project Backup",
    "trigger_keywords": [
      "backup",
      "project",
      "archive"
    ],
    "action": "execute_bash",
    "command": "./backup Project.sh",
    "description": "Executes the project backup script."
  },
  {
    "id": "cmd_006",
    "name": "Agent Manager",
    "trigger_keywords": [
      "agent",
      "manage agent",
      "agent task"
    ],
    "action": "execute_bash",
    "command": "./agent_manager.sh \"[ your Task ]\"",
    "description": "Manages agent tasks, requiring a task argument."
  },
  {
    "id": "cmd_007",
    "name": "Push to Production",
    "trigger_keywords": [
      "push",
      "deploy",
      "production",
      "prod"
    ],
    "action": "execute_bash",
    "command": "./push-to-prod.sh",
    "description": "Deploys the current project to the production server."
  },
  {
    "id": "cmd_008",
    "name": "Database Backup",
    "trigger_keywords": [
      "db backup",
      "database backup",
      "backup db"
    ],
    "action": "execute_bash",
    "command": "./db-backup.sh",
    "description": "Executes the database backup script."
  },
  {
    "id": "cmd_009",
    "name": "Run MSM Test Bot",
    "trigger_keywords": [
      "test bot",
      "playwright",
      "msm bot",
      "activate bot"
    ],
    "action": "execute_bash",
    "command": "source ~/Playwright_env/bin/activate && python ~/msm_test_bot.py",
    "description": "Activates the Playwright environment and runs the My Sport Manager testing bot."
  },
  {
    "id": "cmd_010",
    "name": "Create TiDB Dev DB",
    "trigger_keywords": [
      "create dev db",
      "copy prod db",
      "tidb dev",
      "new dev database"
    ],
    "action": "execute_bash",
    "command": "wget -qO- --post-data='' http://host.docker.internal:5678/webhook/tidb-dev-db-copy || curl -X POST http://host.docker.internal:5678/webhook/tidb-dev-db-copy",
    "description": "Triggers the n8n workflow to copy the production TiDB database to a new development database."
  },
  {
    "id": "cmd_011",
    "name": "Update n8n Workflow",
    "trigger_keywords": [
      "edit",
      "update workflow",
      "fix workflow"
    ],
    "action": "n8n_api_put",
    "endpoint": "/api/v1/workflows/{id}",
    "description": "Updates an existing n8n workflow by ID. Requires workflow ID and JSON schema."
  },
  {
    "id": "cmd_011",
    "name": "Update n8n Workflow",
    "trigger_keywords": [
      "edit",
      "update workflow",
      "fix workflow"
    ],
    "action": "n8n_api_put",
    "endpoint": "/api/v1/workflows/{id}",
    "description": "Updates an existing n8n workflow by ID. Requires workflow ID and JSON schema."
  },
  {
    "id": "cmd_011",
    "name": "Update n8n Workflow",
    "trigger_keywords": [
      "edit",
      "update workflow",
      "fix workflow"
    ],
    "action": "n8n_api_put",
    "endpoint": "/api/v1/workflows/{id}",
    "description": "Updates an existing n8n workflow by ID. Requires workflow ID and JSON schema."
  }
]
