Skip to content

feat(triggers): unify PM trigger naming to pm:status-changed#605

Merged
zbigniewsobiecki merged 4 commits intodevfrom
feature/unify-pm-status-changed-trigger
Mar 2, 2026
Merged

feat(triggers): unify PM trigger naming to pm:status-changed#605
zbigniewsobiecki merged 4 commits intodevfrom
feature/unify-pm-status-changed-trigger

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Mar 2, 2026

Summary

Consolidates pm:card-moved (Trello) and pm:issue-transitioned (Jira) into a unified pm:status-changed trigger at the category level.

Card: https://trello.com/c/69a57053927fc3eebd84b5d5

  • TRIGGER_REGISTRY: Single pm:status-changed entry (no provider restriction)
  • Agent YAML definitions: One pm:status-changed trigger per agent (splitting, planning, implementation) replacing two provider-specific ones
  • New handlers: TrelloStatusChangedTrigger and JiraStatusChangedTrigger
  • Type relocation: TrelloWebhookPayload moved to src/triggers/trello/types.ts (re-exported for compat)
  • Config schema: New statusChanged key; legacy cardMovedTo*/issueTransitioned still parse correctly
  • resolveStatusChangedEnabled: Prefers statusChanged key, falls back to issueTransitioned for backward compat
  • Migration tool: Maps legacy event names to pm:status-changed
  • All tests: Updated + new status-changed.test.ts and jira-status-changed.test.ts

Test plan

  • All 3759 unit tests pass
  • Lint passes (biome check)
  • TypeScript type check passes
  • New trigger handler tests cover matches/handle logic and per-agent toggle behavior
  • Backward compat: legacy issueTransitioned config key respected via resolveStatusChangedEnabled fallback

🤖 Generated with Claude Code

Consolidates the provider-specific `pm:card-moved` (Trello) and
`pm:issue-transitioned` (Jira) events into a single `pm:status-changed`
trigger that works across all PM integrations at the category level.

Key changes:
- TRIGGER_REGISTRY: replace two PM entries with unified pm:status-changed
- Agent YAMLs: merge two triggers into single pm:status-changed per agent
- New handlers: TrelloStatusChangedTrigger, JiraStatusChangedTrigger
- New Trello types: moved TrelloWebhookPayload to src/triggers/trello/types.ts
- Config schema: add statusChanged key (replaces cardMovedTo*/issueTransitioned)
- Backward compat: legacy config keys still parsed and resolved
- Migration tool: maps old event names to pm:status-changed
- All tests updated/rewritten for new naming

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

nhopeatall commented Mar 2, 2026

✨ On it — checking the feature/unify-pm-status-changed-trigger branch


Progress: [░░░░░░░░░░] 3% (iteration 2/70)

🔍 Code Review Update (1 min)

I've started reviewing the pull request by fetching the diff. I'm now examining the changes to identify any potential issues and ensure the completeness of the proposed solution. My next step is to focus on key files not initially loaded to verify the changes.

Last updated: iteration 2 · review

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.

Summary

Well-structured unification of PM trigger naming. The implementation is correct and thorough across all 31 files. One documentation issue to address.

Should Fix

  • CLAUDE.md (lines 220, 242, 245, 283-284, 289, 292) — The CLAUDE.md documentation still references pm:card-moved and pm:issue-transitioned throughout the "Agent Trigger Configuration" section. Since CLAUDE.md serves as the primary developer guide (and is injected into agent context), these stale references will confuse both developers and agents. Should be updated to pm:status-changed to match the new naming.

Observations (non-blocking)

  • Trello per-list granularity: The old config allowed disabling triggers per-list (cardMovedToSplitting: false while keeping cardMovedToTodo: true). The new Trello statusChanged is a single boolean — all three lists are toggled together. The Jira side supports per-agent granularity via StatusChangedSchema. This seems intentional (the JIRA trigger fires for any status change, so per-agent makes sense there, while Trello triggers are already list-specific), but worth noting since it's a capability regression for Trello users who had per-list toggles.

  • Old files retained: src/triggers/trello/card-moved.ts and src/triggers/jira/issue-transitioned.ts still exist on disk but are no longer imported from any src/ code. The barrel exports have been updated to point to the new files. Consider removing them in a follow-up to avoid confusion, or add a deprecation comment at the top of each file.

  • Implementation quality: The factory pattern, backward compat via resolveStatusChangedEnabled fallback, re-exports for type compatibility, and test coverage (including per-agent toggle tests, case-insensitive matching, and edge cases) are all solid.

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.

Summary

Well-structured unification of PM trigger naming. The implementation is correct and thorough across all 31 files. One documentation gap to address as a follow-up.

Should Fix (follow-up)

  • CLAUDE.md (lines 220, 242, 245, 283-284, 289, 292) — The CLAUDE.md documentation still references pm:card-moved and pm:issue-transitioned throughout the "Agent Trigger Configuration" section. Since CLAUDE.md serves as the primary developer guide (and is injected into agent context), these stale references will confuse both developers and agents. Should be updated to pm:status-changed to match the new naming.

Observations (non-blocking)

  • Trello per-list granularity: The old config allowed disabling triggers per-list (cardMovedToSplitting: false while keeping cardMovedToTodo: true). The new Trello statusChanged is a single boolean — all three lists are toggled together. The Jira side supports per-agent granularity via StatusChangedSchema. This seems intentional (Trello triggers are already list-specific by nature), but worth noting since it's a capability regression for Trello users who had per-list toggles.

  • Old files retained: src/triggers/trello/card-moved.ts and src/triggers/jira/issue-transitioned.ts still exist on disk but are no longer imported from any src/ code. Consider removing them in a follow-up to avoid confusion.

  • Implementation quality: Factory pattern, backward compat via resolveStatusChangedEnabled fallback, re-exports for type compatibility, and test coverage (per-agent toggle tests, case-insensitive matching, edge cases) are all solid.

@zbigniewsobiecki
Copy link
Copy Markdown
Member

@aaight address code review concerns

@aaight
Copy link
Copy Markdown
Collaborator Author

aaight commented Mar 2, 2026

Request Addressed

What was asked

@zbigniewsobiecki asked to address code review concerns from @nhopeatall's review.

Changes Made

  • Updated all stale pm:card-moved and pm:issue-transitioned references in CLAUDE.md to the unified pm:status-changed event name
  • Consolidated the PM Agent Trigger Modes table from two provider-specific rows into a single pm:status-changed row
  • Updated all CLI examples in the Agent Trigger Configuration section

Verification

  • Documentation-only change (CLAUDE.md) — no code or test impact
  • Confirmed no remaining stale references via grep

Replace stale pm:card-moved and pm:issue-transitioned references with
the unified pm:status-changed event name throughout the Agent Trigger
Configuration section.

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

aaight commented Mar 2, 2026

Addressed the CLAUDE.md documentation concern from @nhopeatall's review. Updated all stale pm:card-moved and pm:issue-transitioned references to pm:status-changed in the Agent Trigger Configuration section:

  • Trigger Format list (line 220): Consolidated to pm:status-changed, pm:label-added
  • CLI examples (lines 242, 245): Updated event names and comments
  • PM Agent Trigger Modes table (lines 283-284): Merged two provider-specific rows into single pm:status-changed | Trello, JIRA row
  • CLI examples (lines 288-292): Updated event names and comments

Commit: ae23250

@nhopeatall
Copy link
Copy Markdown
Collaborator

nhopeatall commented Mar 2, 2026

✅ Review complete for feature/unify-pm-status-changed-trigger


Verdict: COMMENT — one housekeeping item, otherwise solid work.

Summary: Well-structured unification of pm:card-moved and pm:issue-transitioned into pm:status-changed. Backward compatibility is handled carefully (config fallbacks, deprecated aliases, type re-exports, migration tool). CI green, test coverage comprehensive with 2 new test files.

Should Fix:

  • Old trigger files (card-moved.ts, issue-transitioned.ts) and their tests are dead code — still on disk but no longer imported. Delete them in this PR.

Design Note: Trello statusChanged is a single boolean replacing 3 per-list keys. Granularity is preserved via the agent_trigger_configs table (per-agent per-event), so migrated projects aren't affected.

Full review →

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.

Summary

Clean, well-structured unification of PM trigger naming. The consolidation of pm:card-moved and pm:issue-transitioned into a single pm:status-changed event is a good simplification. Backward compatibility is handled carefully with config key fallbacks, deprecated aliases, type re-exports, and a migration tool update. CI is green and test coverage is comprehensive. One housekeeping item to address.

Should Fix

  • Dead code left behind: The old trigger handlers src/triggers/trello/card-moved.ts and src/triggers/jira/issue-transitioned.ts still exist on disk but are no longer imported by any production code (register files, barrel exports, etc. all reference the new status-changed.ts files). Their corresponding test files (tests/unit/triggers/card-moved.test.ts, tests/unit/triggers/jira-issue-transitioned.test.ts) are also orphaned. These should be deleted in this PR to avoid confusion — someone browsing the codebase would see both the old and new triggers side by side with no clear indication that the old ones are dead.

Minor (not in diff, FYI only)

  • src/triggers/jira/label-added.ts lines 6 and 9 still reference issue-transitioned and JiraIssueTransitionedTrigger in comments. Not blocking since the file isn't part of this PR, but worth a follow-up cleanup.

Design Note

The Trello statusChanged config key is a single boolean replacing three independent per-list keys (cardMovedToSplitting, cardMovedToPlanning, cardMovedToTodo). This is a granularity reduction in the legacy JSONB path — but the new agent_trigger_configs table provides per-agent per-event control, and the migration tool correctly maps the old per-list keys to per-agent rows in the new table. So the net effect is fine for migrated projects. Just noting this is an intentional design tradeoff.

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.

Summary

Clean, well-structured unification of PM trigger naming. The consolidation of pm:card-moved and pm:issue-transitioned into a single pm:status-changed event is a good simplification. Backward compatibility is handled carefully with config key fallbacks, deprecated aliases, type re-exports, and a migration tool update. CI is green and test coverage is comprehensive. One housekeeping item to address.

Should Fix

  • Dead code left behind: The old trigger handlers src/triggers/trello/card-moved.ts and src/triggers/jira/issue-transitioned.ts still exist on disk but are no longer imported by any production code (register files, barrel exports, etc. all reference the new status-changed.ts files). Their corresponding test files (tests/unit/triggers/card-moved.test.ts, tests/unit/triggers/jira-issue-transitioned.test.ts) are also orphaned. These should be deleted in this PR to avoid confusion — someone browsing the codebase would see both the old and new triggers side by side with no clear indication that the old ones are dead.

Minor (not in diff, FYI only)

  • src/triggers/jira/label-added.ts lines 6 and 9 still reference issue-transitioned and JiraIssueTransitionedTrigger in comments. Not blocking since the file isn't part of this PR, but worth a follow-up cleanup.

Design Note

The Trello statusChanged config key is a single boolean replacing three independent per-list keys (cardMovedToSplitting, cardMovedToPlanning, cardMovedToTodo). This is a granularity reduction in the legacy JSONB path — but the new agent_trigger_configs table provides per-agent per-event control, and the migration tool correctly maps the old per-list keys to per-agent rows in the new table. So the net effect is fine for migrated projects. Just noting this is an intentional design tradeoff.

@zbigniewsobiecki
Copy link
Copy Markdown
Member

@aaight Dead code left behind: The old trigger handlers src/triggers/trello/card-moved.ts and src/triggers/jira/issue-transitioned.ts still exist on disk but are no longer imported by any production code (register files, barrel exports, etc. all reference the new status-changed.ts files). Their corresponding test files (tests/unit/triggers/card-moved.test.ts, tests/unit/triggers/jira-issue-transitioned.test.ts) are also orphaned. These should be deleted in this PR to avoid confusion — someone browsing the codebase would see both the old and new triggers side by side with no clear indication that the old ones are dead.

@aaight
Copy link
Copy Markdown
Collaborator Author

aaight commented Mar 2, 2026

Request Addressed

What was asked

Delete dead code files left behind after the trigger unification refactor: old trigger handlers (card-moved.ts, issue-transitioned.ts) and their orphaned tests.

Changes Made

  • Deleted src/triggers/trello/card-moved.ts (old Trello trigger handler)
  • Deleted src/triggers/jira/issue-transitioned.ts (old Jira trigger handler)
  • Deleted tests/unit/triggers/card-moved.test.ts (orphaned test)
  • Deleted tests/unit/triggers/jira-issue-transitioned.test.ts (orphaned test)

Verification

  • Confirmed no imports reference these files anywhere in src/
  • All 452 trigger tests passing (29 test files)
  • TypeScript type check passing
  • Lint passing
  • Pre-commit hooks (typecheck + commitlint) passing

Delete old trigger handlers and their orphaned tests that were replaced
by the unified status-changed triggers but left on disk.

Removed files:
- src/triggers/trello/card-moved.ts
- src/triggers/jira/issue-transitioned.ts
- tests/unit/triggers/card-moved.test.ts
- tests/unit/triggers/jira-issue-transitioned.test.ts

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

aaight commented Mar 2, 2026

Done! Deleted all 4 dead code files in commit 8c868e3:

  • src/triggers/trello/card-moved.ts — old Trello trigger handler
  • src/triggers/jira/issue-transitioned.ts — old Jira trigger handler
  • tests/unit/triggers/card-moved.test.ts — orphaned Trello trigger test
  • tests/unit/triggers/jira-issue-transitioned.test.ts — orphaned Jira trigger test

Verified before pushing:

  • No imports reference these files anywhere in src/
  • All 452 trigger tests pass (29 test files)
  • TypeScript type check and lint pass
  • Pre-commit hooks (typecheck + commitlint) pass

@nhopeatall
Copy link
Copy Markdown
Collaborator

nhopeatall commented Mar 2, 2026

✅ Review complete for feature/unify-pm-status-changed-trigger


Verdict: REQUEST_CHANGES — two backward-compatibility issues with Trello config

Findings

  1. [SHOULD_FIX] Trello per-agent granularity loss — All three Trello status-changed triggers now share a single statusChanged boolean, losing the per-agent toggle granularity that cardMovedToSplitting/cardMovedToPlanning/cardMovedToTodo provided. Jira already supports per-agent objects; Trello should too.

  2. [SHOULD_FIX] Legacy Trello config keys silently become no-ops — The old keys still parse via Zod but the trigger handler only checks statusChanged. Existing configs like { cardMovedToTodo: false } will appear valid but won't actually disable the trigger. Need fallback logic (like Jira's resolveStatusChangedEnabled) or remove the dead keys.

  3. [QUESTION] agent_trigger_configs table migration — Existing rows with triggerEvent = 'pm:card-moved' or pm:issue-transitioned won't match the new pm:status-changed event name. The migration tool handles project_integrations.triggers JSONB but not existing agent_trigger_configs rows.

What's good

  • Clean unification of provider-specific PM triggers into pm:status-changed
  • Solid Jira backward compat with resolveStatusChangedEnabled fallback pattern
  • Comprehensive test updates including backward compat coverage
  • TRIGGER_REGISTRY simplification from 3 PM entries to 1

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.

Summary

Clean unification of PM triggers — good direction. Two concerns: (1) Trello loses per-agent granularity at the integration config level, and (2) legacy Trello config keys (cardMovedToTodo: false) silently become no-ops since the trigger handler now only checks statusChanged.

Architecture & Design

The consolidation of pm:card-moved and pm:issue-transitioned into pm:status-changed is a sound architectural improvement — it removes provider-specific leakage from the trigger event namespace and aligns with the existing pattern where pm:label-added and pm:comment-mention are already provider-agnostic. The TRIGGER_REGISTRY simplification from 3 PM entries to 1 unified entry is clean.

Code Issues

Should Fix

  • Trello per-agent granularity loss (src/triggers/trello/status-changed.ts): Previously, the three Trello card-moved triggers used distinct config keys (cardMovedToSplitting, cardMovedToPlanning, cardMovedToTodo), allowing operators to disable e.g. only the splitting trigger via the integration config. Now all three share triggerConfigKey: 'statusChanged', so statusChanged: false kills all three at once. The agent_trigger_configs table still allows per-agent toggles, but the integration-level config loses granularity. Jira's statusChanged supports per-agent objects ({ splitting: true, planning: false }), but Trello's statusChanged is a bare z.boolean(). Consider either: (a) making Trello's statusChanged also accept a per-agent object (matching Jira's StatusChangedSchema), or (b) documenting this as an intentional simplification.

  • Legacy Trello config keys are silently dead (src/config/triggerConfig.ts): The cardMovedToSplitting, cardMovedToPlanning, cardMovedToTodo keys still exist in the Zod schema (they parse without error), but the trigger handler now exclusively checks statusChanged. This means an existing config like { cardMovedToTodo: false } will parse fine, appear to be valid, but will not actually disable the trigger. This is a subtle backward compatibility break. Options: (a) wire the legacy keys into resolveTrelloTriggerEnabled as fallbacks (similar to how Jira's resolveStatusChangedEnabled falls back to issueTransitioned), or (b) remove the legacy keys from the schema entirely so invalid configs fail loudly at parse time.

Questions

  • agent_trigger_configs table migration: The migration tool (tools/migrate-triggers.ts) correctly maps legacy project_integrations.triggers JSONB keys to pm:status-changed. However, if any existing agent_trigger_configs rows already have triggerEvent = 'pm:card-moved' or triggerEvent = 'pm:issue-transitioned' (e.g., set via the dashboard/CLI before this PR), those rows will no longer match the new trigger event name. The config-resolver.ts matches on exact triggerEvent string. Is there a plan to update those existing rows, or is it expected that the migration tool handles this (it currently only inserts new rows, skipping existing ones)?

Comment thread src/triggers/trello/status-changed.ts Outdated
listKey: 'splitting',
agentType: 'splitting',
triggerConfigKey: 'cardMovedToSplitting',
triggerConfigKey: 'statusChanged',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[SHOULD_FIX] All three Trello triggers now share triggerConfigKey: 'statusChanged', which means statusChanged: false disables all three at once. Previously, each had its own key (cardMovedToSplitting, cardMovedToPlanning, cardMovedToTodo) giving per-agent control at the integration config level.

Jira's statusChanged already supports per-agent objects via StatusChangedSchema. Consider using the same schema for Trello:

statusChanged: StatusChangedSchema, // instead of z.boolean().default(true)

Then the factory could use a per-agent triggerConfigKey like splitting / planning / todo and resolve via resolvePerAgentToggle.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed! Changed Trello's statusChanged to use StatusChangedSchema (same as Jira), enabling per-agent granularity. Now supports both boolean and per-agent object forms like { splitting: true, planning: false, implementation: true }.

Comment thread src/config/triggerConfig.ts Outdated
*/
export const TrelloTriggerConfigSchema = z.object({
/** Unified status-changed toggle (replaces legacy cardMovedTo* keys). */
statusChanged: z.boolean().default(true),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[SHOULD_FIX] This is a bare z.boolean(), but the trigger handler now exclusively checks this key, making the legacy cardMovedToSplitting/cardMovedToPlanning/cardMovedToTodo keys below dead config — they parse without error but have no effect.

Two options:

  1. Add fallback logic in resolveTrelloTriggerEnabled (analogous to how resolveStatusChangedEnabled falls back from statusChanged to issueTransitioned for Jira)
  2. Remove the legacy keys from the schema so stale configs fail loudly at parse time

Option 1 is safer for backward compatibility.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed! Added resolveTrelloStatusChangedEnabled() with fallback pattern matching Jira's resolveStatusChangedEnabled(). Now falls back to cardMovedToSplitting/cardMovedToPlanning/cardMovedToTodo when statusChanged is not set, so legacy keys work properly instead of being silently ignored.

* Supports both the new nested object format and the legacy boolean format.
* Returns `true` when no config is present (backward compatible).
*/
export function resolveStatusChangedEnabled(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[NIT] Good fallback pattern — statusChanged takes precedence, issueTransitioned as fallback. Note that the Trello side lacks an equivalent fallback for its legacy keys (cardMovedToSplitting, etc.) — see comment on the Trello schema above.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the observation! I've now implemented the same fallback pattern for Trello. The resolveTrelloStatusChangedEnabled() function now mirrors the Jira pattern, checking statusChanged first and falling back to the legacy per-agent keys (cardMovedToSplitting/Planning/Todo).

@aaight
Copy link
Copy Markdown
Collaborator Author

aaight commented Mar 2, 2026

Review Feedback Addressed

Changes Made

Issue 1: Trello lost per-agent granularity

  • Changed TrelloTriggerConfigSchema.statusChanged from z.boolean() to StatusChangedSchema
  • Now supports both boolean and per-agent object forms like Jira:
    • Boolean: statusChanged: false (disables all agents)
    • Per-agent: statusChanged: { splitting: true, planning: false, implementation: true }
  • Added statusChanged to TRELLO_NESTED_KEYS array for proper resolution

Issue 2: Legacy Trello config keys were silently dead

  • Added resolveTrelloStatusChangedEnabled() function with fallback pattern matching Jira's resolveStatusChangedEnabled()
  • Falls back to legacy keys when statusChanged is not set:
    • splittingcardMovedToSplitting
    • planningcardMovedToPlanning
    • implementationcardMovedToTodo
  • Updated trigger handlers to use resolveTrelloStatusChangedEnabled() instead of resolveTrelloTriggerEnabled()
  • Legacy keys now work properly instead of being ignored

Testing

  • Added comprehensive tests for new per-agent functionality and legacy fallback behavior
  • All 3742 tests passing (including 13 new tests for resolveTrelloStatusChangedEnabled)
  • TypeScript type check passing
  • Lint passing

Verification

  • ✅ All tests passing
  • ✅ Lint and type checks passing
  • ✅ Changes pushed to remote

…lo status-changed

Address review feedback on PR #605:

Issue 1: Trello triggers now support per-agent granularity
- Changed TrelloTriggerConfigSchema.statusChanged from z.boolean() to StatusChangedSchema
- This allows statusChanged to accept both boolean and per-agent objects like Jira
- Config examples: statusChanged: false (all agents) or
  { splitting: true, planning: false, implementation: true }

Issue 2: Legacy Trello config keys now work via fallback
- Added resolveTrelloStatusChangedEnabled() function with fallback pattern like
  Jira's resolveStatusChangedEnabled()
- Falls back to cardMovedToSplitting/cardMovedToPlanning/cardMovedToTodo when
  statusChanged not set
- Trigger handlers now use resolveTrelloStatusChangedEnabled() instead of
  resolveTrelloTriggerEnabled()
- Legacy keys are no longer silently dead - they work when statusChanged is absent

Added comprehensive tests for new per-agent and fallback behavior.

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

nhopeatall commented Mar 2, 2026

✨ On it — checking the feature/unify-pm-status-changed-trigger branch


Progress: [█░░░░░░░░░] 7% (iteration 5/70)

🔍 Code Review Update (1 min)

I've completed the initial context gathering, reviewing the provided PR details, diff, CI checks, and relevant file contents. My current focus is on strategically analyzing the PR, which appears to unify two existing functionalities. I'm now systematically analyzing the changes to ensure quality and correctness.

Last updated: iteration 5 · review

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.

Summary

Clean, well-executed unification of provider-specific PM trigger names into a single pm:status-changed event. LGTM.

Details

The change correctly abstracts away the provider distinction at the trigger event level — Trello's pm:card-moved and Jira's pm:issue-transitioned are unified under pm:status-changed. This is the right call: the trigger registry shouldn't leak provider semantics into agent definitions.

Key things verified:

  • No stale references: The only remaining mention of old event names (pm:card-moved, pm:issue-transitioned) is in a documentation comment in schema.ts that explains the replacement — correct.
  • Backward compatibility: Legacy config keys (cardMovedToSplitting, cardMovedToPlanning, cardMovedToTodo for Trello; issueTransitioned for Jira) are properly handled via fallback logic in resolveTrelloStatusChangedEnabled() and resolveStatusChangedEnabled(). Deprecated aliases are kept for the schema and resolver functions.
  • TRIGGER_REGISTRY: Consolidated from two provider-restricted entries to one provider-agnostic entry — correct since the provider distinction is now handled at the handler level, not the event level.
  • Type relocation: TrelloWebhookPayload moved to src/triggers/trello/types.ts with re-exports from the original location — no breakage for existing consumers.
  • Agent YAML definitions: All three agents (splitting, planning, implementation) correctly reference the single pm:status-changed event with targetStatus parameter (renamed from targetList).
  • Migration tool: Properly maps both legacy event names to the new unified name.
  • All CI checks pass.

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 unification of provider-specific PM triggers into pm:status-changed. Backward compatibility properly maintained via legacy key fallbacks. All CI checks pass.

@zbigniewsobiecki zbigniewsobiecki merged commit eb3a924 into dev Mar 2, 2026
6 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