AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-501
  5. plan
  6. context.json
context.json(4.0 KB)· Apr 14, 2026
{
  "meta": {
    "agent": "planner",
    "task_id": "501",
    "title": "Remove execute phase and align CC APIs with current pipeline",
    "created_at": "2026-04-14T12:00:00Z"
  },
  "inputs": [
    {
      "name": "GitHub Issue #501",
      "type": "context",
      "ref": "https://github.com/AgentSDE/agent-core/issues/501",
      "notes": "Remove execute phase, reorder deliver before review in DTOs"
    },
    {
      "name": "AGENTS.md",
      "type": "context",
      "ref": "AGENTS.md",
      "notes": "Pipeline phase documentation and conventions"
    }
  ],
  "outputs": [
    {
      "name": "plan.md",
      "type": "plan",
      "format": "md",
      "content": "Implementation plan for removing execute phase"
    }
  ],
  "files": [
    {
      "path": "src/database/entities/task.entity.ts",
      "action": "modify",
      "reason": "Remove phaseExecute column"
    },
    {
      "path": "src/task-state/task-state.service.ts",
      "action": "modify",
      "reason": "Remove phaseExecute from createTask defaults"
    },
    {
      "path": "src/control-api/dto/phase-override.dto.ts",
      "action": "modify",
      "reason": "Remove execute from PHASES, reorder"
    },
    {
      "path": "src/control-api/dto/status-override.dto.ts",
      "action": "modify",
      "reason": "Remove execute from PHASES, reorder"
    },
    {
      "path": "src/database/database.module.spec.ts",
      "action": "modify",
      "reason": "Remove phaseExecute assertion"
    },
    {
      "path": "src/task-state/task-state.service.spec.ts",
      "action": "modify",
      "reason": "Remove phaseExecute assertion"
    },
    {
      "path": "src/phase-router/phase-router.service.spec.ts",
      "action": "modify",
      "reason": "Replace execute references in fixtures"
    },
    {
      "path": "src/directive/directive.service.spec.ts",
      "action": "modify",
      "reason": "Replace execute references in fixtures"
    },
    {
      "path": "src/hooks/phase-hooks.service.spec.ts",
      "action": "modify",
      "reason": "Replace execute references in test cases"
    },
    {
      "path": "src/hooks/compound.service.spec.ts",
      "action": "modify",
      "reason": "Replace execute event types in test data"
    },
    {
      "path": "src/watchdog/watchdog.service.spec.ts",
      "action": "modify",
      "reason": "Replace execute references in fixtures"
    },
    {
      "path": "src/invoke/claude-invocation.service.spec.ts",
      "action": "modify",
      "reason": "Replace execute in test case"
    },
    {
      "path": "src/metrics/metrics.service.spec.ts",
      "action": "modify",
      "reason": "Replace execute in test case"
    }
  ],
  "steps": [
    {
      "id": "S1",
      "summary": "Remove phaseExecute from production code (entity, DTOs, task-state service)",
      "acceptance": [
        "phaseExecute column removed from TaskEntity",
        "phaseExecute removed from createTask() defaults",
        "execute removed from PHASES in phase-override.dto.ts and status-override.dto.ts",
        "DTO PHASES arrays ordered as [refine, plan, deliver, review, compound]"
      ],
      "depends_on": []
    },
    {
      "id": "S2",
      "summary": "Update all test files to replace execute phase references with valid phases",
      "acceptance": [
        "No test file references execute as a pipeline phase",
        "All phaseExecute property references removed from test fixtures",
        "Event types like execute_completed replaced with deliver_completed",
        "npm run test passes with zero failures"
      ],
      "depends_on": [
        "S1"
      ]
    },
    {
      "id": "S3",
      "summary": "Run lint and full test suite to verify clean codebase",
      "acceptance": [
        "npm run lint passes with zero warnings",
        "npm run test passes with zero failures",
        "grep confirms no remaining execute phase references in src/"
      ],
      "depends_on": [
        "S2"
      ]
    }
  ],
  "risks": [
    {
      "risk": "Existing DB rows retain phase_execute column data",
      "mitigation": "SQLite ignores unmapped columns; no destructive migration needed"
    },
    {
      "risk": "External API consumers depend on phaseExecute field",
      "mitigation": "Intended breaking change per issue requirements"
    }
  ],
  "assumptions": [
    "PHASE_ORDER and phaseColumn/phaseKey maps already exclude execute — confirmed by codebase audit",
    "TypeORM synchronize or schema drift handles the orphaned DB column safely"
  ],
  "open_questions": []
}
Plan