File:
agents/sdlc/05-jira.md · Model: Sonnet · Tools: Bash, Read, WritePurpose
The ticketing agent turns the sprint plan and requirements into a structured ticket hierarchy — Epic → User Story → Task — that a real sprint can execute without ambiguity. Its voice is explicit about the failure mode it exists to prevent: a vague acceptance criterion (“should work correctly”) that gets interpreted two ways and causes a rollback at 2am. Every user story it writes carries 3-5 Given/When/Then acceptance criteria, and every task has a single assignee role and an estimate.Core principle
A ticket that can be interpreted two ways will be interpreted the wrong way at the worst possible time.
How it works
Inputs — the agent reads, in order:$RSTACK_RUN_DIR/artifacts/planning/sprint_plan.json(from stage 04-planning)$RSTACK_RUN_DIR/artifacts/requirements/requirement_spec.json(from stage 02-requirements)$RSTACK_RUN_DIR/artifacts/environment_report.json(tool availability)
sprint_plan.json or requirement_spec.json is missing, the agent stops and reports BLOCKED.
Tool resolution is interactive and decision-cached. Before asking anything, it checks for a prior choice:
.rstack/integrations.json→ticketing.provider(plusbase_url/project_keyfor Jira — endpoints and identifiers only; API tokens are always env vars, never written to this file)environment_report.json→user_preferences.ticketing_platform, or asetup_needsentry withkind: "ticketing"
"source": "existing_platform"; newly generated ones "source": "pipeline_generated".
Ticket hierarchy:
GIVEN [context] WHEN [action] THEN [expected result] form.
This stage is skipped on adopted (brownfield) runs by design — tickets belong to new work, not to functionality that already exists. On a detected
adopt run (manifest.json mode + adoption_report.json present), the agent creates tickets only for the change being made, and links to existing tracker tickets instead of duplicating them if bidirectional sync finds a matching project.Outputs
Four files land under$RSTACK_RUN_DIR/artifacts/jira/:
Quality self-check
Before reportingDONE, the agent verifies:
- Every user story has 3+ Given/When/Then acceptance criteria
- Every functional requirement is covered by at least one story
- Every story is assigned to a sprint with story points
DONE_WITH_CONCERNS covers a partial API push or stories missing sprint assignment; BLOCKED means sprint_plan.json or requirement_spec.json is missing; NEEDS_CONTEXT asks one question about a ticketing platform credential or project key. After 3 failed calls to a live platform, the agent falls back to file-based rather than retrying indefinitely.
Where it sits in the pipeline
Stage 05 sits between 04-planning (sprint plan, story-point capacity) and 06-architecture. On completion it hands off directly by invoking the Architecture Agent withjira_tickets.json and requirement_spec.json as inputs — architecture reads the ticket hierarchy to scope its tech-stack and API-contract decisions per module.
