feat(triggers): unified trigger configuration system with auto-deploy migration#597
Merged
zbigniewsobiecki merged 1 commit intodevfrom Mar 1, 2026
Merged
Conversation
… migration
Introduces a definition-driven trigger configuration system that replaces
the legacy per-integration trigger config approach with a unified model.
Unified Trigger CLI Commands:
- Add `cascade projects trigger-set` - replaces pm-trigger-set and review-trigger-set
- Add `cascade projects trigger-list` - list configured triggers for a project
- Add `cascade projects trigger-discover` - discover triggers from agent definitions
- Remove deprecated `pm-trigger-set` and `review-trigger-set` commands
Definition-Based Trigger System:
- Add `triggers` array to agent YAML definitions
- Add `SupportedTrigger` schema with event, label, parameters, providers
- Add `TriggerParameter` schema (string, email, boolean, select types)
- Use category-prefixed format: `{category}:{event-name}`
Trigger Config Resolution:
- Rewrite `config-resolver.ts` to merge definition defaults with DB overrides
- Add `isTriggerEnabled()`, `getTriggerParameters()`, `resolveTriggerConfigs()`
- Resolution order: DB config > definition default
Dashboard Integration:
- Add `getProjectTriggersView` tRPC endpoint for composite trigger data
- Add `DefinitionTriggerToggles` component for triggers with parameters
- Add `TriggerParameterInput` component for parameter editing
- Simplify `trigger-agent-mapping.ts` to re-export from shared types
Auto-Deploy Migration:
- Add `tools/migrate-triggers.ts` for migrating legacy triggers
- Add `tool:migrate-triggers` npm script
- Add trigger migration step to deploy.yml and deploy-dev.yml workflows
- Migration runs after drizzle schema migrations, is idempotent
Tests & Documentation:
- Add tests for shared trigger types (`triggerTypes.test.ts`)
- Expand tests for trigger utility functions (`triggerAgentMapping.test.ts`)
- Update CLAUDE.md with new CLI commands and trigger format docs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Key Changes
Unified Trigger CLI Commands
cascade projects trigger-set- unified command replacing pm-trigger-set and review-trigger-setcascade projects trigger-list- list configured triggers for a projectcascade projects trigger-discover- discover available triggers from agent definitionspm-trigger-setandreview-trigger-setcommandsDefinition-Based Trigger System
triggersarray to agent YAML definitions (implementation.yaml, review.yaml, respond-to-ci.yaml){category}:{event-name}(e.g., pm:card-moved, scm:check-suite-success)Trigger Config Resolution
config-resolver.tsto merge definition defaults with DB overridesAuto-Deploy Migration
tools/migrate-triggers.tsscript for migrating legacy triggersTest plan
npm test- all 3680 tests passnpm run lintandnpm run typecheck- passagent_trigger_configstable is populated correctly🤖 Generated with Claude Code