{
"meta": {
"agent": "planner",
"task_id": "244",
"title": "E2E coverage for pre-PR quality gate and skip-quality-gate directive",
"created_at": "2026-04-02T12:00:00Z"
},
"inputs": [
{
"name": "issue-244",
"type": "context",
"ref": "https://github.com/AgentSDE/agent-core/issues/244",
"notes": "E2E test coverage for quality gate from #231"
},
{
"name": "phase-router",
"type": "file",
"ref": "src/phase-router/phase-router.service.ts",
"notes": "GATE_MAP, isGated(), executePhase(), buildEnv() — core gate logic"
},
{
"name": "directive-service",
"type": "file",
"ref": "src/directive/directive.service.ts",
"notes": "skip-quality-gate directive handling at line 42-50"
},
{
"name": "task-entity",
"type": "file",
"ref": "src/database/entities/task.entity.ts",
"notes": "qualityGateOverride column"
},
{
"name": "existing-e2e-patterns",
"type": "file",
"ref": "test/task-state.e2e-spec.ts",
"notes": "Reference for in-memory SQLite E2E test setup"
}
],
"outputs": [
{
"name": "plan",
"type": "plan",
"format": "md",
"content": "See plan.md"
}
],
"files": [
{
"path": "test/quality-gate.e2e-spec.ts",
"action": "create",
"reason": "E2E test suite for quality gate blocking, bypass, pass-through, and edge cases"
}
],
"steps": [
{
"id": "S1",
"summary": "Create quality-gate.e2e-spec.ts with test module setup and all scenarios",
"acceptance": [
"Test module creates in-memory SQLite DB with TaskEntity and mocks all PhaseRouterService dependencies",
"Scenario: gate blocks deliver phase for auto/careful directives — task.status=gated, invoke not called",
"Scenario: skip-quality-gate sets override, approve clears gate, invoke called with QUALITY_GATE_OVERRIDE=1, override consumed",
"Scenario: quick directive passes through deliver without gating",
"Scenario: malformed skip-quality-gate (wrong casing, missing value) does not set override",
"All test descriptions reference #231 for traceability",
"npm run test passes, npm run lint passes"
],
"depends_on": []
}
],
"risks": [
{
"risk": "PhaseRouterService has many dependencies requiring careful mock setup",
"mitigation": "Follow established patterns from existing integration tests"
}
],
"assumptions": [
"E2E tests run within agent-core repo (test/ directory), not the separate agent-core-e2e repo",
"ClaudeInvocationService is mocked since we cannot spawn real Claude in tests"
],
"open_questions": []
}