AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-558
  5. plan
  6. context.json
context.json(5.0 KB)· Apr 23, 2026
{
  "meta": {
    "agent": "planner",
    "task_id": "558",
    "title": "BJ-18: E2E tier — 2d-jira",
    "created_at": "2026-04-23T17:14:57Z"
  },
  "inputs": [
    {
      "name": "issue-558",
      "type": "link",
      "ref": "https://github.com/AgentSDE/agent-core/issues/558",
      "notes": "BJ-18 spec"
    },
    {
      "name": "epic-539",
      "type": "link",
      "ref": "https://github.com/AgentSDE/agent-core/issues/539",
      "notes": "Parent EPIC — Atlassian integration"
    },
    {
      "name": "test-modules",
      "type": "file",
      "ref": "agent-core-e2e/TEST_MODULES.md",
      "notes": "Module-based test layout (supersedes tier layout in issue body)"
    },
    {
      "name": "webhook-client",
      "type": "file",
      "ref": "agent-core-e2e/test/helpers/webhook-client.ts",
      "notes": "Existing helper for posting webhooks"
    }
  ],
  "outputs": [
    {
      "name": "plan",
      "type": "spec",
      "format": "md",
      "content": "See plan.md"
    }
  ],
  "files": [
    {
      "path": "test/jira/jira.intake-comment-transition.e2e-spec.ts",
      "action": "create",
      "reason": "Scenario spec for Jira intake → comment → transition flow"
    },
    {
      "path": "test/jira/fixtures/issue-created.json",
      "action": "create",
      "reason": "jira:issue_created webhook payload fixture"
    },
    {
      "path": "test/jira/fixtures/issue-updated.json",
      "action": "create",
      "reason": "jira:issue_updated webhook payload fixture"
    },
    {
      "path": "package.json",
      "action": "modify",
      "reason": "Register test:module:jira and test:tier2d-jira alias"
    },
    {
      "path": "TEST_MODULES.md",
      "action": "modify",
      "reason": "Document jira module and code-path mapping"
    },
    {
      "path": "test/README.md",
      "action": "modify",
      "reason": "List JIRA-01 scenario in catalog"
    }
  ],
  "steps": [
    {
      "id": "S1",
      "summary": "Register jira module in package.json and TEST_MODULES.md (script + agent-core path mapping + legacy tier2d-jira alias)",
      "acceptance": [
        "package.json has test:module:jira script using MODULE=jira",
        "package.json has test:tier2d-jira alias for EPIC-naming compatibility",
        "TEST_MODULES.md lists jira row with test count and @integration tag",
        "TEST_MODULES.md mapping includes src/jira-adapter/** and src/atlassian/jira.service.ts"
      ],
      "depends_on": []
    },
    {
      "id": "S2",
      "summary": "Create Jira webhook fixtures under test/jira/fixtures/ matching JiraAdapter schema",
      "acceptance": [
        "issue-created.json represents a jira:issue_created event with issueKey, fields.summary, fields.description",
        "issue-updated.json represents a jira:issue_updated event referencing the same issueKey and simulating a user comment/transition change",
        "Fixtures validate against schema used by JiraAdapter in agent-core"
      ],
      "depends_on": [
        "S1"
      ]
    },
    {
      "id": "S3",
      "summary": "Implement scenario spec that posts webhooks, waits for agent run, and asserts mock-server recorded calls",
      "acceptance": [
        "Spec sends issue-created webhook to AGENT_CORE_URL/webhooks/jira (or adapter-defined route)",
        "Spec waits for task state to reach a completed or transitioned phase",
        "Spec sends issue-updated webhook and waits for resumption",
        "Spec asserts mock recorded postComment then transitionIssue in order",
        "Spec fails with a clear message naming the missing call if a call is absent",
        "Spec is skipped with a clear log if MOCK_JIRA_URL env is unset"
      ],
      "depends_on": [
        "S2"
      ]
    },
    {
      "id": "S4",
      "summary": "Run npm run test:module:jira against testing instance (port 8777) and confirm green; confirm no regression in intake/directive smoke tests",
      "acceptance": [
        "npm run test:module:jira exits 0 locally against port 8777",
        "npm run test:smoke exits 0 with no regressions"
      ],
      "depends_on": [
        "S3"
      ]
    }
  ],
  "risks": [
    {
      "risk": "Dependencies #550, #551, #555, #556 are OPEN — mock server and webhook client/fixtures not yet available",
      "mitigation": "Block implementation until dependencies land on rc/atlassian-integration; plan scenario API to match whatever BJ-15/BJ-16 expose"
    },
    {
      "risk": "Repo mismatch — issue filed in agent-core but code must land in agent-core-e2e; worktree points at agent-core",
      "mitigation": "Deliver phase must switch worktree to agent-core-e2e at rc/atlassian-integration; flag to human before deliver starts"
    },
    {
      "risk": "Issue references test/tiers/2d-jira/ path which does not match current module layout",
      "mitigation": "Plan uses actual module path test/jira/ and documents a test:tier2d-jira alias to preserve EPIC naming"
    }
  ],
  "assumptions": [
    "Module-based test layout (TEST_MODULES.md) supersedes the tier-based paths referenced in the issue body",
    "Mock server from #556 exposes an HTTP assertion API for inspecting recorded calls",
    "BJ-15 webhook client exposes a method to POST Jira webhooks analogous to the existing GitHub webhook helper"
  ],
  "open_questions": [
    "Does rc/atlassian-integration exist in agent-core-e2e at implementation time, or must it be created by an earlier wave PR?"
  ]
}
Plan