AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. meridian-backend
  4. gh-10
  5. plan
  6. context.json
context.json(2.3 KB)ยท Apr 1, 2026
{
  "meta": {
    "agent": "planner",
    "task_id": "10",
    "title": "Update TASKS_DIRECTORY for viewer to centralized production path",
    "created_at": "2026-04-01T22:20:00Z"
  },
  "inputs": [
    {
      "name": "issue-10",
      "type": "context",
      "ref": "AgentSDE/meridian-backend#10",
      "notes": "Update TASKS_DIRECTORY env var for centralized artefact storage"
    },
    {
      "name": "agents-md",
      "type": "context",
      "ref": "AGENTS.md",
      "notes": "VPS runs via pm2 as viewerv2-backend on port 8998"
    },
    {
      "name": "configuration.ts",
      "type": "file",
      "ref": "src/config/configuration.ts",
      "notes": "Reads TASKS_DIRECTORY from process.env, defaults to ./tasks"
    },
    {
      "name": "env-example",
      "type": "file",
      "ref": ".env.example",
      "notes": "Documents TASKS_DIRECTORY=./tasks as default"
    }
  ],
  "outputs": [
    {
      "name": "plan",
      "type": "plan",
      "format": "md",
      "content": "plan.md"
    }
  ],
  "files": [
    {
      "path": "ecosystem.config.js",
      "action": "create",
      "reason": "pm2 ecosystem config with production TASKS_DIRECTORY"
    },
    {
      "path": ".env.example",
      "action": "modify",
      "reason": "Document production TASKS_DIRECTORY path"
    }
  ],
  "steps": [
    {
      "id": "S1",
      "summary": "Create ecosystem.config.js with pm2 production config including TASKS_DIRECTORY=/home/agent/AgentSDE/tasks/production",
      "acceptance": [
        "ecosystem.config.js exists at repo root",
        "App name is viewerv2-backend",
        "env_production.TASKS_DIRECTORY is /home/agent/AgentSDE/tasks/production",
        "Script points to dist/main"
      ],
      "depends_on": []
    },
    {
      "id": "S2",
      "summary": "Update .env.example to document production TASKS_DIRECTORY path",
      "acceptance": [
        ".env.example contains a comment with the production path /home/agent/AgentSDE/tasks/production",
        "Default value remains ./tasks for local development"
      ],
      "depends_on": []
    }
  ],
  "risks": [
    {
      "risk": "pm2 must be restarted with --env production flag after deploy",
      "mitigation": "Document in PR description; CI deploy step already restarts pm2"
    }
  ],
  "assumptions": [
    "VPS deployment uses pm2 (confirmed by AGENTS.md)",
    "No existing pm2 ecosystem config in the repo",
    "CI deploy step will pick up ecosystem.config.js automatically or will be updated separately"
  ],
  "open_questions": []
}
Plan