Skip to content

fix(jira): resolve missing stories status, storiesListId, and progress model context#546

Merged
zbigniewsobiecki merged 1 commit intodevfrom
fix/jira-splitting-stories-status
Feb 25, 2026
Merged

fix(jira): resolve missing stories status, storiesListId, and progress model context#546
zbigniewsobiecki merged 1 commit intodevfrom
fix/jira-splitting-stories-status

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

Fixes three bugs observed when running the splitting agent on JIRA projects:

  • Missing "stories" status in JIRA wizardJIRA_STATUS_SLOTS omitted stories, so users couldn't configure which JIRA status corresponds to the stories stage. Added it after splitting to match TRELLO_LIST_SLOTS.
  • storiesListId always undefined for JIRApromptContext.ts only read from getTrelloConfig(). For JIRA projects the splitting prompt rendered STORIES_LIST_ID: NOT_CONFIGURED, causing the agent to hallucinate a container ID and loop. Now falls back to the JIRA project key (e.g. BTS), which is what CreateWorkItem's containerId needs.
  • Progress model thinks "splitting" means splitting code files — The progress system prompt was agent-agnostic. Added Agent role: hints (extracted to shared AGENT_ROLE_HINTS in agentMessages.ts) so the progress model generates contextually correct messages.

Additionally:

  • New JIRA issues are now auto-transitioned to the stories status after creation (mirrors Trello's behavior of placing cards directly in the stories list)
  • AGENT_ROLE_HINTS extracted from ackMessageGenerator.ts to shared agentMessages.ts, used by both ack and progress models

Files changed

File Change
src/config/agentMessages.ts Add exported AGENT_ROLE_HINTS map
src/router/ackMessageGenerator.ts Import shared AGENT_ROLE_HINTS instead of local const
src/backends/progressModel.ts Add Agent role: line to progress prompt
src/agents/shared/promptContext.ts Fall back to JIRA project key for storiesListId
src/pm/jira/adapter.ts Auto-transition new issues to stories status
web/src/components/projects/pm-wizard.tsx Add stories to JIRA_STATUS_SLOTS

Test plan

  • Added test: JIRA storiesListId resolves to project key
  • Added test: progress model includes agent role hint in prompt
  • Added test: progress model uses fallback hint for unknown agent types
  • Added test: JIRA adapter transitions new issues to stories status
  • Added test: no transition when stories status not configured
  • Added test: graceful handling when stories transition fails
  • Updated ack generator mock to include AGENT_ROLE_HINTS
  • All 3232 tests pass, lint clean, typecheck clean

🤖 Generated with Claude Code

…s model context

The splitting agent on JIRA projects failed because:
1. The PM wizard's JIRA_STATUS_SLOTS omitted 'stories', so users couldn't
   configure the stories status mapping.
2. promptContext.ts only read storiesListId from Trello config, leaving it
   undefined for JIRA projects — the agent hallucinated a container ID.
3. The progress model had no agent-role context, generating misleading
   messages like "split main.py" instead of referencing work item breakdown.

Changes:
- Add 'stories' to JIRA_STATUS_SLOTS in pm-wizard
- Fall back to JIRA project key for storiesListId in promptContext
- Auto-transition new JIRA issues to stories status after creation
- Extract AGENT_ROLE_HINTS to shared agentMessages.ts, wire into both
  ackMessageGenerator and progressModel
- Add tests for all new behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit 1db99c3 into dev Feb 25, 2026
1 check passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/jira-splitting-stories-status branch February 25, 2026 10:17
@zbigniewsobiecki zbigniewsobiecki mentioned this pull request Feb 25, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant