Skip to content

feat(triggers): add per-agent JIRA issue-transitioned toggles and pm-trigger-set CLI#497

Merged
zbigniewsobiecki merged 2 commits intodevfrom
feature/pm-trigger-per-agent-jira
Feb 23, 2026
Merged

feat(triggers): add per-agent JIRA issue-transitioned toggles and pm-trigger-set CLI#497
zbigniewsobiecki merged 2 commits intodevfrom
feature/pm-trigger-per-agent-jira

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Feb 23, 2026

Summary

  • Extend JIRA trigger config schemaissueTransitioned now supports both legacy boolean and a per-agent object ({ briefing, planning, implementation }) following the same union pattern as readyToProcessLabel
  • Add resolveIssueTransitionedEnabled helper — resolves per-agent toggle with backward-compatible boolean fallback
  • Update JIRA issue-transitioned trigger — checks per-agent toggle after resolving agentType in handle(); matches() continues using the "any agent enabled" check via resolveJiraTriggerEnabled
  • Move JIRA toggle to per-agent dashboard sections — removed from SHARED_PM_TRIGGERS; added issueTransitioned.briefing/planning/implementation to each agent in AGENT_TRIGGER_MAP (dot-notation already supported by existing TriggerToggles component)
  • New CLI commandcascade projects pm-trigger-set for managing Trello card-moved and JIRA issue-transitioned toggles per agent, following the review-trigger-set pattern
  • CLAUDE.md — documented per-agent PM trigger modes and pm-trigger-set CLI command
  • Tests — added schema, resolver, and trigger handler per-agent toggle tests (77 tests passing in the two affected test files)

Test plan

  • Run npm test -- tests/unit/config/triggerConfig.test.ts tests/unit/triggers/jira-issue-transitioned.test.ts — all 77 tests pass
  • Run npm run typecheck — zero errors
  • Run npm run lint — zero errors
  • Manual: Dashboard → Agent Configs: JIRA projects show per-agent "Issue Transitioned" toggles under briefing/planning/implementation; "Issue Transitioned" no longer appears in the Shared PM section
  • Manual: cascade projects pm-trigger-set <project-id> --no-issue-transitioned-implementation disables the implementation agent's JIRA trigger without affecting briefing/planning
  • Manual: cascade projects pm-trigger-set <project-id> --no-card-moved-to-briefing disables Trello card-moved for briefing

Card

https://trello.com/c/NLf1EhY5/85-briefing-planning-and-implementation-should-have-optional-toggles-exposed-in-dashboard-and-cli-for-triggering-on-moving-the-work

🤖 Generated with Claude Code

Cascade Bot and others added 2 commits February 23, 2026 10:50
…ial mocks

getIntegrationCredentialOrNull checks process.env before the DB mock.
If GITHUB_TOKEN_IMPLEMENTER is set in the environment, it bypasses the
mock and causes the credential resolver tests to fail. Use vi.stubEnv
to set the vars to empty string (falsy) so the mock controls the result.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nhopeatall
Copy link
Copy Markdown
Collaborator

🔍 Reviewing PR...

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — Clean implementation that correctly mirrors the existing readyToProcessLabel union pattern for issueTransitioned. Schema default change (from z.boolean().default(true) to .optional()) is safe because both resolveJiraTriggerEnabled and resolveIssueTransitionedEnabled return true for undefined, preserving backward compatibility. The matches()/handle() split (any-agent check vs per-agent check) is consistent with the label-added trigger. CLI follows the review-trigger-set pattern. Dashboard mapping uses the existing dot-notation support. The projects.test.ts env-stubbing additions are a sensible drive-by fix.

@zbigniewsobiecki zbigniewsobiecki merged commit 36a69a6 into dev Feb 23, 2026
5 checks passed
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.

3 participants