feat(cli): install Trigger.dev agent skills into your coding agent#3868
feat(cli): install Trigger.dev agent skills into your coding agent#3868ericallam wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: e48038c The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis PR replaces the remote-based 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/cli-v3/src/rules/manifest.test.ts (1)
46-47: 💤 Low valueCleanup leaves orphan parent directories.
makeSkillsDirreturnsskillsDir(e.g.,/tmp/bundled-skills-xxx/skills), but the temp root is the parent directory. Pushing onlyskillsDirtodirsleaves the parent/tmp/bundled-skills-xxx/behind after cleanup.♻️ Proposed fix to clean up the root directory
async function makeSkillsDir(opts: { withSkill: boolean }): Promise<string> { const root = await mkdtemp(join(tmpdir(), "bundled-skills-")); const skillsDir = join(root, "skills"); await mkdir(skillsDir, { recursive: true }); if (opts.withSkill) { const skillDir = join(skillsDir, "authoring-chat-agent"); await mkdir(skillDir, { recursive: true }); await writeFile( join(skillDir, "SKILL.md"), [ "---", "name: authoring-chat-agent", "description: >", " Author a durable AI chat agent with chat.agent. Load when building a chat", " backend or its frontend transport.", "type: core", 'library_version: "{{TRIGGER_SDK_VERSION}}"', "---", "", "# Authoring", "", "Generated for `@trigger.dev/sdk` {{TRIGGER_SDK_VERSION}}.", "", ].join("\n") ); } - return skillsDir; + return { skillsDir, root }; } describe("BundledSkillsLoader", () => { const dirs: string[] = []; afterAll(async () => { await Promise.all(dirs.map((d) => rm(d, { recursive: true, force: true }))); }); it("synthesizes a manifest at the given version and stamps it into contents", async () => { - const skillsDir = await makeSkillsDir({ withSkill: true }); - dirs.push(skillsDir); + const { skillsDir, root } = await makeSkillsDir({ withSkill: true }); + dirs.push(root); - const loader = new BundledSkillsLoader(skillsDir, "9.9.9-test.1"); + const loader = new BundledSkillsLoader(skillsDir, "9.9.9-test.1"); // ... rest unchanged });
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: c4c85793-24ff-4a7b-a0e1-e30dfb9bcfec
📒 Files selected for processing (14)
.changeset/trigger-skills-installer.mdpackages/cli-v3/package.jsonpackages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/authoring-tasks/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/install-rules.tspackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/rules/manifest.tspackages/cli-v3/src/rules/types.ts
💤 Files with no reviewable changes (1)
- packages/cli-v3/src/commands/install-rules.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (32)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 10)
- GitHub Check: internal / 🧪 Unit Tests: Internal (12, 12)
- GitHub Check: packages / 🧪 Unit Tests: Packages (2, 3)
- GitHub Check: internal / 🧪 Unit Tests: Internal (6, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (4, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (7, 12)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 10)
- GitHub Check: internal / 🧪 Unit Tests: Internal (10, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (5, 12)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: internal / 🧪 Unit Tests: Internal (2, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (8, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (9, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (1, 12)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 10)
- GitHub Check: internal / 🧪 Unit Tests: Internal (3, 12)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: internal / 🧪 Unit Tests: Internal (11, 12)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 10)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: packages / 🧪 Unit Tests: Packages (3, 3)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp
- GitHub Check: packages / 🧪 Unit Tests: Packages (1, 3)
- GitHub Check: typecheck / typecheck
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects insteadImport from
@trigger.dev/sdkwhen writing Trigger.dev tasks. Never use@trigger.dev/sdk/v3or deprecatedclient.defineJob
Files:
packages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use function declarations instead of default exports
**/*.{ts,tsx,js,jsx}: Prefer static imports over dynamic imports. Only use dynamicimport()when circular dependencies cannot be resolved, code splitting is needed for performance, or the module must be loaded conditionally at runtime
Import subpaths only frompackages/core(@trigger.dev/core), never import from the root
Files:
packages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)
**/*.ts: When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs
Do not use high-cardinality attributes in OTEL metrics such as UUIDs/IDs (envId, userId, runId, projectId, organizationId), unbounded integers (itemCount, batchSize, retryCount), timestamps (createdAt, startTime), or free-form strings (errorMessage, taskName, queueName)
When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries
Files:
packages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
**/*.{js,ts,tsx,jsx,css,json,md}
📄 CodeRabbit inference engine (AGENTS.md)
Use Prettier for code formatting and run
pnpm run formatbefore committing
Files:
packages/cli-v3/src/rules/types.tspackages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/src/cli/index.tspackages/cli-v3/package.jsonpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/skills/authoring-tasks/SKILL.mdpackages/cli-v3/src/commands/dev.tspackages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
packages/cli-v3/src/commands/**/*
📄 CodeRabbit inference engine (packages/cli-v3/CLAUDE.md)
CLI command definitions should be located in
src/commands/
Files:
packages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use vitest for all tests in the Trigger.dev repository
Files:
packages/cli-v3/src/rules/manifest.test.ts
**/*.test.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.test.{ts,tsx}: Never mock anything in tests - use testcontainers instead
Test files should be placed next to source files (e.g.,MyService.ts->MyService.test.ts)
Files:
packages/cli-v3/src/rules/manifest.test.ts
**/*.test.{js,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.test.{js,ts,tsx}: Test files should live beside the files under test and use descriptivedescribeanditblocks
Use vitest for unit testing
Tests should avoid mocks or stubs and use helpers from@internal/testcontainerswhen Redis or Postgres are needed
Files:
packages/cli-v3/src/rules/manifest.test.ts
packages/cli-v3/src/commands/dev.ts
📄 CodeRabbit inference engine (packages/cli-v3/CLAUDE.md)
Implement
dev.tscommand insrc/commands/for local development mode
Files:
packages/cli-v3/src/commands/dev.ts
🧠 Learnings (64)
📓 Common learnings
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/.claude/skills/trigger-dev-tasks/**/* : Update `.claude/skills/trigger-dev-tasks/` in parallel with `rules/` when SDK features change
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Keep SDK documentation in `rules/` and `.claude/skills/trigger-dev-tasks/` synchronized when features are added or changed
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3833
File: .changeset/ai-sdk-7-support.md:5-5
Timestamp: 2026-06-04T15:28:19.931Z
Learning: In triggerdotdev/trigger.dev, the `ai-sdk/otel` auto-registration caveats (skip-if-already-registered behaviour and the `TRIGGER_AI_SDK_OTEL_AUTOREGISTER=0` opt-out) are intentionally omitted from changeset copy to keep it concise. Full documentation lives in the AI Chat compatibility reference (docs PR `#3835`). Do not flag the changeset text as incomplete on this topic in future reviews.
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-02T21:20:43.541Z
Learning: Do not update `rules/` directory or `.claude/skills/trigger-dev-tasks/` unless explicitly asked - these are maintained in separate dedicated passes
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/trigger-sdk/CLAUDE.md:0-0
Timestamp: 2026-06-02T21:20:48.921Z
Learning: Do NOT update `rules/` or `.claude/skills/trigger-dev-tasks/` directories unless explicitly asked, as these are maintained in separate dedicated passes
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/rules/**/* : Update `rules/` directory with versioned SDK documentation when SDK features change
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/.claude/skills/trigger-dev-tasks/**/* : Update `.claude/skills/trigger-dev-tasks/` in parallel with `rules/` when SDK features change
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/skills/authoring-tasks/SKILL.mdpackages/cli-v3/src/commands/dev.tspackages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Keep SDK documentation in `rules/` and `.claude/skills/trigger-dev-tasks/` synchronized when features are added or changed
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/skills/authoring-tasks/SKILL.mdpackages/cli-v3/src/commands/dev.tspackages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-06-04T15:28:19.931Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3833
File: .changeset/ai-sdk-7-support.md:5-5
Timestamp: 2026-06-04T15:28:19.931Z
Learning: In triggerdotdev/trigger.dev, the `ai-sdk/otel` auto-registration caveats (skip-if-already-registered behaviour and the `TRIGGER_AI_SDK_OTEL_AUTOREGISTER=0` opt-out) are intentionally omitted from changeset copy to keep it concise. Full documentation lives in the AI Chat compatibility reference (docs PR `#3835`). Do not flag the changeset text as incomplete on this topic in future reviews.
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/skills/authoring-tasks/SKILL.mdpackages/cli-v3/skills/authoring-chat-agent/SKILL.md
📚 Learning: 2026-06-02T21:20:43.541Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-02T21:20:43.541Z
Learning: Do not update `rules/` directory or `.claude/skills/trigger-dev-tasks/` unless explicitly asked - these are maintained in separate dedicated passes
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-06-02T21:20:48.921Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/trigger-sdk/CLAUDE.md:0-0
Timestamp: 2026-06-02T21:20:48.921Z
Learning: Do NOT update `rules/` or `.claude/skills/trigger-dev-tasks/` directories unless explicitly asked, as these are maintained in separate dedicated passes
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/skills/authoring-tasks/SKILL.mdpackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-05-12T14:13:17.114Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3561
File: .claude/scripts/check-review-md.sh:76-79
Timestamp: 2026-05-12T14:13:17.114Z
Learning: In the triggerdotdev/trigger.dev repository, `.claude/REVIEW.md` drift/audit checking is handled by an LLM-based workflow using `anthropics/claude-code-action` (mirroring `.github/workflows/claude-md-audit.yml`), not a static bash script. The LLM audit catches semantic drift, stale references, contradictions, and missing/obsolete rules — not just deleted paths. The bash script `.claude/scripts/check-review-md.sh` was dropped in favor of this approach.
Applied to files:
.changeset/trigger-skills-installer.md
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/rules/**/* : Update `rules/` directory with versioned SDK documentation when SDK features change
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-06-02T21:20:48.921Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/trigger-sdk/CLAUDE.md:0-0
Timestamp: 2026-06-02T21:20:48.921Z
Learning: Applies to packages/trigger-sdk/**/*.{js,ts,jsx,tsx} : Always import from `trigger.dev/sdk`. Never use `trigger.dev/sdk/v3` (deprecated path alias)
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `task()` from `trigger.dev/sdk` for basic task definitions with `id` and `run` properties
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/package.jsonpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/skills/authoring-tasks/SKILL.mdpackages/cli-v3/src/commands/dev.tspackages/cli-v3/skills/authoring-chat-agent/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Run `npx trigger.devlatest dev` to start the Trigger.dev development server
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/src/commands/dev.ts
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Run `npx trigger.devlatest init` to initialize a new Trigger.dev project
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/src/commands/dev.ts
📚 Learning: 2026-06-02T21:20:43.541Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-02T21:20:43.541Z
Learning: Applies to **/*.{ts,tsx} : Import from `trigger.dev/sdk` when writing Trigger.dev tasks. Never use `trigger.dev/sdk/v3` or deprecated `client.defineJob`
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/package.jsonpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/skills/authoring-tasks/SKILL.mdpackages/cli-v3/src/commands/dev.tspackages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schemaTask()` from `trigger.dev/sdk` with a Zod schema for payload validation
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/skills/authoring-tasks/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Import from `trigger.dev/sdk` (NEVER from `trigger.dev/sdk/v3`)
Applied to files:
.changeset/trigger-skills-installer.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to **/*.{ts,tsx} : Avoid using enums; prefer string unions or const objects instead
Applied to files:
packages/cli-v3/src/rules/types.ts
📚 Learning: 2026-03-26T10:00:07.558Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 3254
File: packages/cli-v3/src/apiClient.ts:61-86
Timestamp: 2026-03-26T10:00:07.558Z
Learning: In triggerdotdev/trigger.dev, the `api.v1.platform-notifications` loader filters `PlatformNotification` records by `surface: "CLI"` before returning them. As a result, `card` and `changelog` notification types (which are `WEBAPP`-only) never reach the CLI endpoint, and the `CliPlatformNotificationResponseSchema` in `packages/cli-v3/src/apiClient.ts` does not need to include those types in its `data.type` enum. Do not flag missing `card`/`changelog` enum values in this schema as a bug.
Applied to files:
packages/cli-v3/src/rules/types.ts
📚 Learning: 2026-05-12T21:04:02.113Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3542
File: packages/core/src/v3/schemas/runEngine.ts:18-19
Timestamp: 2026-05-12T21:04:02.113Z
Learning: In `packages/core/src/v3/schemas/runEngine.ts` (triggerdotdev/trigger.dev), all exported Zod enum schemas (e.g., `TriggerSource`, `TriggerAction`, `TaskKind`) intentionally use `.or(anyString)` — where `anyString = z.custom<string & {}>((v) => typeof v === "string")` is defined locally — as a forward-compatibility pattern to allow older clients to deserialize unknown future enum values without throwing. Do NOT flag this pattern as a type-safety or validation issue; it is a deliberate, project-wide convention in this file.
Applied to files:
packages/cli-v3/src/rules/types.ts
📚 Learning: 2026-05-08T21:00:25.678Z
Learnt from: samejr
Repo: triggerdotdev/trigger.dev PR: 3538
File: apps/webapp/app/components/primitives/Resizable.tsx:60-78
Timestamp: 2026-05-08T21:00:25.678Z
Learning: In the triggerdotdev/trigger.dev codebase, Zod is a project standard at API/storage boundaries, not for inline render-time guards. Small manual type-narrowing checks (e.g., the ~12-line `isValidSnapshot` in `apps/webapp/app/components/primitives/Resizable.tsx`) are preferred over importing Zod into UI primitives for render-time validation, to avoid schema-parse overhead on every render and unnecessary abstraction. Per CLAUDE.md: "Three similar lines is better than a premature abstraction."
Applied to files:
packages/cli-v3/src/rules/types.ts
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to {packages/core,apps/webapp}/**/*.{ts,tsx} : Use zod for validation in packages/core and apps/webapp
Applied to files:
packages/cli-v3/src/rules/types.tspackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-03-22T13:26:12.060Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3244
File: apps/webapp/app/components/code/TextEditor.tsx:81-86
Timestamp: 2026-03-22T13:26:12.060Z
Learning: In the triggerdotdev/trigger.dev codebase, do not flag `navigator.clipboard.writeText(...)` calls for `missing-await`/`unhandled-promise` issues. These clipboard writes are intentionally invoked without `await` and without `catch` handlers across the project; keep that behavior consistent when reviewing TypeScript/TSX files (e.g., usages like in `apps/webapp/app/components/code/TextEditor.tsx`).
Applied to files:
packages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-03-22T19:24:14.403Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3187
File: apps/webapp/app/v3/services/alerts/deliverErrorGroupAlert.server.ts:200-204
Timestamp: 2026-03-22T19:24:14.403Z
Learning: In the triggerdotdev/trigger.dev codebase, webhook URLs are not expected to contain embedded credentials/secrets (e.g., fields like `ProjectAlertWebhookProperties` should only hold credential-free webhook endpoints). During code review, if you see logging or inclusion of raw webhook URLs in error messages, do not automatically treat it as a credential-leak/secrets-in-logs issue by default—first verify the URL does not contain embedded credentials (for example, no username/password in the URL, no obvious secret/token query params or fragments). If the URL is credential-free per this project’s conventions, allow the logging.
Applied to files:
packages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-05-18T08:21:27.694Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3632
File: apps/webapp/sentry.server.ts:4-21
Timestamp: 2026-05-18T08:21:27.694Z
Learning: When handling Prisma error P1001 ("Can't reach database server") in TypeScript, don’t assume a single error shape. Prisma can surface P1001 via two different error classes/fields: `PrismaClientKnownRequestError` exposes it as `err.code === "P1001"` (common during mid-query connection drops), while `PrismaClientInitializationError` exposes it as `err.errorCode === "P1001"` (common on client startup failure). Therefore, predicates should use `err.code === "P1001" || err.errorCode === "P1001"`. Do not flag `err.code === "P1001"` as “unreachable/never matches,” as it is expected in production.
Applied to files:
packages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-05-18T08:21:27.694Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3632
File: apps/webapp/sentry.server.ts:4-21
Timestamp: 2026-05-18T08:21:27.694Z
Learning: When handling Prisma errors for P1001 ("Can't reach database server"), do not assume it only appears under a single property name. Prisma may surface P1001 via either `PrismaClientKnownRequestError` (`err.code === "P1001"`, e.g., mid-query connection drops) or `PrismaClientInitializationError` (`err.errorCode === "P1001"`, e.g., client startup connection failure). To reliably detect the condition, check `err.code === "P1001" || err.errorCode === "P1001"`, and avoid review rules that would incorrectly flag `err.code === "P1001"` as unreachable/never-matching.
Applied to files:
packages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-06-04T18:16:35.386Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3836
File: apps/supervisor/src/backpressure/backpressureMonitor.ts:3-5
Timestamp: 2026-06-04T18:16:35.386Z
Learning: When reviewing TypeScript in this repo, apply the rule “prefer type aliases over interfaces” only to data/object shapes and union/intersection type modeling. If an interface is being used as a behavioral contract for collaborators to implement (e.g., method-shape interfaces that define required behavior, such as `BackpressureLogger` / `BackpressureSignalSource` in `apps/supervisor/src/backpressure/backpressureMonitor.ts`), keep it as an `interface` and do not flag it as a type-alias-vs-interface violation.
Applied to files:
packages/cli-v3/src/rules/types.tspackages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-05-12T21:04:01.335Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3542
File: apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.sessions._index/route.tsx:78-78
Timestamp: 2026-05-12T21:04:01.335Z
Learning: In the triggerdotdev/trigger.dev codebase, the Sessions feature (routes under `sessions._index` and `sessions.$sessionParam`) intentionally uses `docsPath("/ai-chat/overview")` for its docs link. Sessions documentation lives under the AI chat overview as part of the chat.agent feature surface. Do not flag this as a mismatched link text/path.
Applied to files:
packages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/skills/authoring-chat-agent/SKILL.md
📚 Learning: 2026-05-19T21:04:52.902Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3671
File: packages/trigger-sdk/src/v3/ai.ts:724-769
Timestamp: 2026-05-19T21:04:52.902Z
Learning: Repo: triggerdotdev/trigger.dev — In packages/trigger-sdk/src/v3/ai.ts, recovery now preserves per-message clientData: replaySessionInTail returns { message, metadata, seqNum } for each session.in record, and the recovery boot queue maps metadata by message.id to reconstruct recovered turns. For messages without a matching record (e.g., hook-synthesized), it intentionally falls back to the current boot payload’s metadata. Do not flag “lost metadata on recovered turns” in future reviews when this path is in use.
Applied to files:
packages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/skills/authoring-chat-agent/SKILL.md
📚 Learning: 2026-06-01T15:50:21.405Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3790
File: packages/trigger-sdk/src/v3/ai.ts:0-0
Timestamp: 2026-06-01T15:50:21.405Z
Learning: In `packages/trigger-sdk/src/v3/ai.ts` in the Trigger.dev `chat.agent` tool-resolution flow, function-form `tools` should be resolved at boot using the run/continuation payload's parsed `clientData` before converting restored `accumulatedUIMessages` with `toModelMessages`, so tool `toModelOutput` is re-applied to prior persisted tool results on resumed chats. This boot-time resolution is intentionally fail-open because it only re-renders saved history; per-turn `resolveTurnTools()` remains fail-closed because reusing stale tools could leak capabilities.
Applied to files:
packages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/authoring-chat-agent/SKILL.md
📚 Learning: 2026-05-14T16:39:02.759Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3546
File: packages/cli-v3/src/mcp/tools/agentChat.ts:29-29
Timestamp: 2026-05-14T16:39:02.759Z
Learning: In `packages/cli-v3/src/mcp/tools/agentChat.ts`, the `activeSessions` Map intentionally has no TTL, LRU eviction, or size limit. The MCP server is dev-only (`start_agent_chat` enforces `input.environment === "dev"`) and runs as a short-lived subprocess of the MCP host (Claude Code / Cursor / etc.). The process is restarted whenever the IDE restarts, so sessions never accumulate across host lifetimes. Do not flag the lack of automatic cleanup as a memory-leak risk in this file.
Applied to files:
packages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/authoring-chat-agent/SKILL.md
📚 Learning: 2026-06-04T15:28:23.067Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3834
File: apps/webapp/app/components/runs/v3/agent/AgentView.tsx:300-340
Timestamp: 2026-06-04T15:28:23.067Z
Learning: In `apps/webapp/app/components/runs/v3/agent/AgentView.tsx` (triggerdotdev/trigger.dev), `applyToolResolution()` inside `useAgentSessionMessages` treats `output-denied` as a terminal tool state alongside `output-available` and `output-error`. A buffered `.in` resolution replay must never overwrite a part that has already reached any of these three terminal states. This mirrors the same contract enforced by `mergeIncomingIntoHydrated` in `packages/trigger-sdk/src/v3/ai.ts`.
Applied to files:
packages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/authoring-chat-agent/SKILL.md
📚 Learning: 2026-03-06T14:44:55.489Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3173
File: packages/trigger-sdk/src/v3/chat.test.ts:103-104
Timestamp: 2026-03-06T14:44:55.489Z
Learning: In `packages/trigger-sdk/src/v3/chat.test.ts`, mocking `global.fetch` with `vi.fn()` is acceptable and intentional. `TriggerChatTransport` is a browser-facing SSE/HTTP client, and using testcontainers for these tests is not required. This file is an explicit exception to the repo's general no-mocks policy.
Applied to files:
packages/cli-v3/skills/chat-agent-advanced/SKILL.md
📚 Learning: 2026-05-23T09:12:50.004Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3719
File: packages/trigger-sdk/src/v3/ai.ts:2154-2215
Timestamp: 2026-05-23T09:12:50.004Z
Learning: In triggerdotdev/trigger.dev, packages/trigger-sdk/src/v3/ai.ts mergeIncomingIntoHydrated must treat "output-denied" as a terminal tool state (alongside "output-available" and "output-error") and include a same-state early-return to deduplicate replay/retry wire arrivals, ensuring stale "approval-responded" parts never regress a hydrated denial.
Applied to files:
packages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/authoring-chat-agent/SKILL.md
📚 Learning: 2026-05-18T14:40:18.886Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3658
File: packages/core/src/v3/realtimeStreams/manager.test.ts:1-147
Timestamp: 2026-05-18T14:40:18.886Z
Learning: In the triggerdotdev/trigger.dev codebase, the guideline "Never mock anything — use testcontainers instead" (from `CLAUDE.md` / `AGENTS.md`) applies exclusively to integration tests that interact with real external services (Redis, Postgres, etc.). It does NOT apply to unit tests for pure in-memory logic. Tests that stub `ApiClient` with `vi.fn()` to count calls — such as `packages/core/src/v3/realtimeStreams/manager.test.ts` and `packages/trigger-sdk/src/v3/sessions.test.ts` — are correct and intentional; these tests exercise in-memory cache semantics where testcontainers would have nothing to host. Do not flag `vi.fn()`-based `ApiClient` stubs in such unit tests as policy violations.
Applied to files:
packages/cli-v3/skills/chat-agent-advanced/SKILL.md
📚 Learning: 2026-05-23T15:25:28.060Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3719
File: packages/trigger-sdk/src/v3/ai.ts:6233-6256
Timestamp: 2026-05-23T15:25:28.060Z
Learning: Repo: triggerdotdev/trigger.dev
File: packages/trigger-sdk/src/v3/ai.ts (hydrateMessages path, ~Lines 6160–6170)
Learning: When `hydrateMessages` is used, dedupe for `onTurnComplete.newUIMessages`/`newMessages` must compare the incoming message id against the pre-hydration chain (the `accumulatedUIMessages` captured BEFORE `hydrateMessages` runs), not the post-hydration `hydrated` array. The canonical hydrate pattern persists and returns the fresh user message, so checking against `hydrated` would incorrectly drop that user turn from `newUIMessages`. Implement by snapshotting a `previouslyKnownMessageIds` Set from the pre-hydration chain and using it for the `matchedExisting` test.
Applied to files:
packages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/authoring-chat-agent/SKILL.md
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/init.ts : Implement `init.ts` command in `src/commands/` for project initialization
Applied to files:
packages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/build/**/* : Build system in `src/build/` should use configuration from `trigger.config.ts` in user projects to determine bundling, build extensions, and output structure
Applied to files:
packages/cli-v3/src/cli/index.tspackages/cli-v3/package.jsonpackages/cli-v3/src/rules/manifest.ts
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/deploy.ts : Implement `deploy.ts` command in `src/commands/` for production deployment
Applied to files:
packages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/promote.ts : Implement `promote.ts` command in `src/commands/` for deployment promotion
Applied to files:
packages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/dev.ts : Implement `dev.ts` command in `src/commands/` for local development mode
Applied to files:
packages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/build/**/* : Bundle worker code using the build system in `src/build/` based on configuration from `trigger.config.ts`
Applied to files:
packages/cli-v3/package.jsonpackages/cli-v3/src/rules/manifest.test.ts
📚 Learning: 2026-05-20T17:21:32.617Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 0
File: :0-0
Timestamp: 2026-05-20T17:21:32.617Z
Learning: In the `apps/webapp` package of the triggerdotdev/trigger.dev repository, tests must live under `apps/webapp/test/` (flat, named `*.test.ts`) because `apps/webapp/vitest.config.ts` sets `include: ["test/**/*.test.ts"]`. Colocating test files next to source files (e.g., `*.test.ts` beside `*.ts` in `app/`) would cause them to be silently excluded from the test run. Do not suggest test colocation for files in `apps/webapp`.
Applied to files:
packages/cli-v3/package.json
📚 Learning: 2026-05-07T12:24:11.575Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3531
File: apps/webapp/test/sentryTraceContext.server.test.ts:1-7
Timestamp: 2026-05-07T12:24:11.575Z
Learning: In the triggerdotdev/trigger.dev `apps/webapp` package, the vitest configuration (`apps/webapp/vitest.config.ts`) sets `include: ["test/**/*.test.ts"]`. All webapp tests must live under the top-level `apps/webapp/test/` directory (46+ files follow this pattern). Co-located test files placed next to source files under `apps/webapp/app/` will NOT be discovered by vitest and will silently not run. Do not flag webapp tests for being in `test/` instead of co-located with their source.
Applied to files:
packages/cli-v3/package.jsonpackages/cli-v3/src/rules/manifest.test.ts
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to trigger.config.ts : Specify task directories in the `dirs` option (e.g., `['./trigger']`)
Applied to files:
packages/cli-v3/package.json
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Export every task, including subtasks
Applied to files:
packages/cli-v3/package.json
📚 Learning: 2026-02-25T17:28:20.456Z
Learnt from: isshaddad
Repo: triggerdotdev/trigger.dev PR: 3130
File: docs/v3-openapi.yaml:3134-3135
Timestamp: 2026-02-25T17:28:20.456Z
Learning: In the Trigger.dev codebase, the `publicAccessToken` returned by the SDK's `wait.createToken()` method is not part of the HTTP response body from `POST /api/v1/waitpoints/tokens`. The server returns only `{ id, isCached, url }`. The SDK's `prepareData` hook generates the JWT client-side from the `x-trigger-jwt-claims` response header after the HTTP call completes. The OpenAPI spec correctly documents only the HTTP response body, not SDK transformations.
<!-- [/add_learning]
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-02T12:43:37.906Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/core/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:37.906Z
Learning: Exercise caution with changes to trigger.dev/core as they affect both the customer-facing SDK and server-side webapp - breaking changes can impact deployed user tasks and the platform simultaneously
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/skills/authoring-tasks/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Use `trigger.dev/react-hooks` for React components that need to display real-time task status and results
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Use Trigger.dev Realtime API (`runs.subscribeToRun()`, `runs.subscribeToRunsWithTag()`, `runs.subscribeToBatch()`) for real-time updates instead of polling
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `metadata.stream()` to stream data in realtime from inside tasks
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`) to manage task execution stages
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/skills/authoring-tasks/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `metadata.current()`, `metadata.get()`, `metadata.set()`, `metadata.del()`, and other metadata methods to attach and manage up to 256KB of structured data to runs
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/mcp/**/* : Provide an MCP server implementation in `src/mcp/` for AI-assisted task development
Applied to files:
packages/cli-v3/src/commands/mcp.ts
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to **/*.{test,spec}.{ts,tsx} : Use vitest for all tests in the Trigger.dev repository
Applied to files:
packages/cli-v3/src/rules/manifest.test.ts
📚 Learning: 2026-05-18T17:41:22.524Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 0
File: :0-0
Timestamp: 2026-05-18T17:41:22.524Z
Learning: In the `apps/webapp` package of the triggerdotdev/trigger.dev repository, test files must be placed under `apps/webapp/test/` (not co-located next to source files in `apps/webapp/app/`). The webapp's `vitest.config.ts` sets `include: ["test/**/*.test.ts"]`, which is rooted at `apps/webapp/test/`. Co-located tests (e.g., `app/components/code/tsql/tsqlLinter.test.ts`, `app/routes/projects.v3.$projectRef.test.ts`) are silently excluded from `pnpm test`. The root `CLAUDE.md` "next to source" guideline is general and should not override this webapp-specific convention.
Applied to files:
packages/cli-v3/src/rules/manifest.test.ts
📚 Learning: 2026-06-02T21:20:56.997Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-06-02T21:20:56.997Z
Learning: Applies to **/*.test.{js,ts,tsx} : Use vitest for unit testing
Applied to files:
packages/cli-v3/src/rules/manifest.test.ts
📚 Learning: 2026-05-28T20:02:14.739Z
Learnt from: myftija
Repo: triggerdotdev/trigger.dev PR: 3772
File: apps/webapp/test/findOrCreateBackgroundWorker.test.ts:1-1
Timestamp: 2026-05-28T20:02:14.739Z
Learning: In the `triggerdotdev/trigger.dev` monorepo, the `apps/webapp` sub-project uses a centralized `apps/webapp/test/` directory for all its Vitest tests (unit, integration, and e2e), rather than colocating test files next to source files. Do not flag test files placed in `apps/webapp/test/` as violating a "colocate tests with source" rule — this is the established convention for the webapp package.
Applied to files:
packages/cli-v3/src/rules/manifest.test.ts
📚 Learning: 2026-05-18T14:40:02.173Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3658
File: packages/core/src/v3/realtimeStreams/manager.test.ts:1-147
Timestamp: 2026-05-18T14:40:02.173Z
Learning: In this repo’s trigger.dev codebase, the “never mock — use testcontainers” guideline should only be applied to integration tests that talk to real external services (e.g., Redis, Postgres, S2). For unit tests that validate in-memory logic (e.g., deduplication/cache behavior in StandardRealtimeStreamsManager and similar module-boundary call counting), it is allowed to use Vitest mocks like `vi.fn()` and to stub/mock `ApiClient` objects to count calls or simulate in-process collaborators. Do not flag `vi.fn()`-based mocks as policy violations in these unit-test scenarios; reserve the rule for true external-service integration tests.
Applied to files:
packages/cli-v3/src/rules/manifest.test.ts
📚 Learning: 2026-05-18T14:40:02.173Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3658
File: packages/core/src/v3/realtimeStreams/manager.test.ts:1-147
Timestamp: 2026-05-18T14:40:02.173Z
Learning: In the triggerdotdev/trigger.dev repo, the policy “Never mock anything — use testcontainers instead” should only be enforced for integration tests that interact with real external services (e.g., Redis, Postgres) via actual infrastructure. For unit tests that exercise pure in-memory logic (e.g., cache semantics) it is OK to stub collaborators such as `ApiClient` using Vitest (`vi.fn()`) to assert call counts or control behavior. Do not flag `vi.fn()`-based `ApiClient` stubs in unit tests as violations of the testcontainers policy.
Applied to files:
packages/cli-v3/src/rules/manifest.test.ts
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schedules.task()` for scheduled (cron) tasks with either declarative cron patterns or imperative schedule creation
Applied to files:
packages/cli-v3/skills/authoring-tasks/SKILL.md
📚 Learning: 2026-03-31T21:37:31.732Z
Learnt from: isshaddad
Repo: triggerdotdev/trigger.dev PR: 3283
File: docs/migration-n8n.mdx:19-21
Timestamp: 2026-03-31T21:37:31.732Z
Learning: In the trigger.dev SDK (`packages/trigger-sdk/src/v3`), `tasks.triggerAndWait()` and `tasks.batchTriggerAndWait()` are real, valid exported APIs defined in `shared.ts` and re-exported via the `tasks` object in `tasks.ts`. They accept a task ID string as their first argument (not a task instance). These are distinct from the instance methods `yourTask.triggerAndWait()` and `yourTask.batchTriggerAndWait()`. Do not flag `tasks.triggerAndWait()` or `tasks.batchTriggerAndWait()` as non-existent APIs.
Applied to files:
packages/cli-v3/skills/authoring-tasks/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `task.trigger()` to trigger a single run of a task from inside another task
Applied to files:
packages/cli-v3/skills/authoring-tasks/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `task.batchTrigger()` to trigger multiple runs of a task from inside another task
Applied to files:
packages/cli-v3/skills/authoring-tasks/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `task.triggerAndWait()` to trigger a task and wait for its result from inside another task
Applied to files:
packages/cli-v3/skills/authoring-tasks/SKILL.md
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/dev/**/* : Dev mode code should be located in `src/dev/` and runs tasks locally in the user's Node.js process without containers
Applied to files:
packages/cli-v3/src/commands/dev.ts
🪛 ast-grep (0.43.0)
packages/cli-v3/src/commands/skills.ts
[warning] 433-433: Regular expression constructed from variable input detected. This can lead to Regular Expression Denial of Service (ReDoS) attacks if the variable contains malicious patterns. Use libraries like 'recheck' to validate regex safety or use static patterns.
Context: new RegExp(${POINTER_START}.*?${POINTER_END}, "s")
Note: [CWE-1333] Inefficient Regular Expression Complexity
(regexp-from-variable)
🪛 LanguageTool
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
[grammar] ~72-~72: Use a hyphen to join words.
Context: ...iggerPublicToken`). Both default to a 15 minute expiry. ## Core patterns ### 1....
(QB_NEW_EN_HYPHEN)
[grammar] ~272-~272: Ensure spelling is correct
Context: ...at you need. Only subscribeToRun auto-completes. 5. Forgetting "use client". Realtime/tr...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.22.1)
packages/cli-v3/skills/chat-agent-advanced/SKILL.md
[warning] 351-351: Blank line inside blockquote
(MD028, no-blanks-blockquote)
packages/cli-v3/skills/authoring-chat-agent/SKILL.md
[warning] 220-220: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (13)
packages/cli-v3/src/rules/types.ts (1)
1-4: LGTM!packages/cli-v3/src/rules/manifest.ts (1)
1-246: LGTM!packages/cli-v3/src/commands/skills.ts (2)
433-434: LGTM!The static analysis warning about ReDoS is a false positive.
POINTER_STARTandPOINTER_ENDare compile-time constants (lines 354-355), not user-controlled input, so the regex pattern is fixed and safe.
1-27: LGTM!Also applies to: 28-109, 131-153, 160-223, 225-261, 263-352, 353-441, 443-511
packages/cli-v3/src/cli/index.ts (1)
20-20: LGTM!Also applies to: 44-44
packages/cli-v3/src/commands/dev.ts (1)
29-29: LGTM!Also applies to: 88-88, 147-147
packages/cli-v3/src/commands/mcp.ts (1)
17-17: LGTM!Also applies to: 19-24, 69-69
packages/cli-v3/skills/authoring-chat-agent/SKILL.md (1)
1-26: LGTM!packages/cli-v3/skills/authoring-tasks/SKILL.md (1)
1-256: LGTM!packages/cli-v3/skills/chat-agent-advanced/SKILL.md (1)
1-368: LGTM!packages/cli-v3/skills/realtime-and-frontend/SKILL.md (1)
1-305: LGTM!packages/cli-v3/package.json (1)
27-32: LGTM!.changeset/trigger-skills-installer.md (1)
1-12: LGTM!
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/plugins
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
Adds a trigger skills command (the old install-rules becomes an alias) that copies SKILL.md files bundled with the CLI into each tool's native skills directory, version-matched to the CLI. trigger dev offers to install them on first run.
5853055 to
e48038c
Compare
There was a problem hiding this comment.
🚩 The old rules/ manifest at repo root is now orphaned
The rules/manifest.json and its versioned subdirectories (rules/4.0.0/, rules/4.1.0/, rules/4.3.0/) at the repo root were previously fetched by the GithubRulesManifestLoader (now deleted). With the new BundledSkillsLoader reading exclusively from the CLI's own skills/ directory, these repo-root files are no longer consumed by any code path. They remain in the repo as dead artifacts. The CLAUDE.md rule "Do NOT update rules/ ... unless explicitly asked" means they won't be accidentally touched, but they could be cleaned up in a follow-up.
Was this helpful? React with 👍 or 👎 to provide feedback.
| if (results.length > 0) { | ||
| log.step("Installed the following skills:"); | ||
|
|
||
| for (const r of results) { | ||
| for (const installation of r.installations) { | ||
| log.info(chalk.greenBright(installation.location)); | ||
| } | ||
| if (r.pointer) { | ||
| log.info(`${chalk.greenBright(r.pointer)} ${chalk.dim("(always-on pointer)")}`); | ||
| } | ||
| } | ||
|
|
||
| log.info( | ||
| `${cliLink("Learn how to use Trigger.dev skills", "https://trigger.dev/docs/agents/rules/overview")}` | ||
| ); | ||
| } |
There was a problem hiding this comment.
🟡 Misleading "Installed the following skills:" printed when no skills are actually installed
installSkillsForTarget always returns a result object (with empty installations: [] and pointer: undefined) for targets that lack a skills directory (windsurf, gemini-cli, cline, amp, kilo, ruler). These result objects get pushed into results at line 241. The check at line 245 (if (results.length > 0)) passes because the array contains entries, so the "Installed the following skills:" header and learn-more link are printed even though zero files were actually written. This is triggered by running e.g. trigger skills --target windsurf --yes.
| if (results.length > 0) { | |
| log.step("Installed the following skills:"); | |
| for (const r of results) { | |
| for (const installation of r.installations) { | |
| log.info(chalk.greenBright(installation.location)); | |
| } | |
| if (r.pointer) { | |
| log.info(`${chalk.greenBright(r.pointer)} ${chalk.dim("(always-on pointer)")}`); | |
| } | |
| } | |
| log.info( | |
| `${cliLink("Learn how to use Trigger.dev skills", "https://trigger.dev/docs/agents/rules/overview")}` | |
| ); | |
| } | |
| const hasInstallations = results.some((r) => r.installations.length > 0 || r.pointer); | |
| if (hasInstallations) { | |
| log.step("Installed the following skills:"); | |
| for (const r of results) { | |
| for (const installation of r.installations) { | |
| log.info(chalk.greenBright(installation.location)); | |
| } | |
| if (r.pointer) { | |
| log.info(`${chalk.greenBright(r.pointer)} ${chalk.dim("(always-on pointer)")}`); | |
| } | |
| } | |
| log.info( | |
| `${cliLink("Learn how to use Trigger.dev skills", "https://trigger.dev/docs/agents/rules/overview")}` | |
| ); | |
| } |
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 39429f62-79ff-4658-8131-16e2fcd55e38
📒 Files selected for processing (14)
.changeset/trigger-skills-installer.mdpackages/cli-v3/package.jsonpackages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/authoring-tasks/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/src/cli/index.tspackages/cli-v3/src/commands/dev.tspackages/cli-v3/src/commands/install-rules.tspackages/cli-v3/src/commands/mcp.tspackages/cli-v3/src/commands/skills.tspackages/cli-v3/src/rules/manifest.test.tspackages/cli-v3/src/rules/manifest.tspackages/cli-v3/src/rules/types.ts
💤 Files with no reviewable changes (1)
- packages/cli-v3/src/commands/install-rules.ts
✅ Files skipped from review due to trivial changes (2)
- packages/cli-v3/package.json
- packages/cli-v3/skills/authoring-tasks/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (7)
- packages/cli-v3/src/rules/types.ts
- .changeset/trigger-skills-installer.md
- packages/cli-v3/src/commands/dev.ts
- packages/cli-v3/src/cli/index.ts
- packages/cli-v3/src/rules/manifest.ts
- packages/cli-v3/src/rules/manifest.test.ts
- packages/cli-v3/src/commands/mcp.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (34)
- GitHub Check: internal / 🧪 Unit Tests: Internal (2, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (1, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (10, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (9, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (4, 12)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 10)
- GitHub Check: internal / 🧪 Unit Tests: Internal (12, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (8, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (7, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (11, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (5, 12)
- GitHub Check: internal / 🧪 Unit Tests: Internal (3, 12)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 10)
- GitHub Check: internal / 🧪 Unit Tests: Internal (6, 12)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 10)
- GitHub Check: packages / 🧪 Unit Tests: Packages (2, 3)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 10)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 10)
- GitHub Check: packages / 🧪 Unit Tests: Packages (1, 3)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: typecheck / typecheck
- GitHub Check: packages / 🧪 Unit Tests: Packages (3, 3)
- GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp
- GitHub Check: audit
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Build and publish previews
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{js,ts,tsx,jsx,css,json,md}
📄 CodeRabbit inference engine (AGENTS.md)
Use Prettier for code formatting and run
pnpm run formatbefore committing
Files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/src/commands/skills.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects insteadImport from
@trigger.dev/sdkwhen writing Trigger.dev tasks. Never use@trigger.dev/sdk/v3or deprecatedclient.defineJob
Files:
packages/cli-v3/src/commands/skills.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use function declarations instead of default exports
**/*.{ts,tsx,js,jsx}: Prefer static imports over dynamic imports. Only use dynamicimport()when circular dependencies cannot be resolved, code splitting is needed for performance, or the module must be loaded conditionally at runtime
Import subpaths only frompackages/core(@trigger.dev/core), never import from the root
Files:
packages/cli-v3/src/commands/skills.ts
**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)
**/*.ts: When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs
Do not use high-cardinality attributes in OTEL metrics such as UUIDs/IDs (envId, userId, runId, projectId, organizationId), unbounded integers (itemCount, batchSize, retryCount), timestamps (createdAt, startTime), or free-form strings (errorMessage, taskName, queueName)
When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries
Files:
packages/cli-v3/src/commands/skills.ts
packages/cli-v3/src/commands/**/*
📄 CodeRabbit inference engine (packages/cli-v3/CLAUDE.md)
CLI command definitions should be located in
src/commands/
Files:
packages/cli-v3/src/commands/skills.ts
🧠 Learnings (35)
📓 Common learnings
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/.claude/skills/trigger-dev-tasks/**/* : Update `.claude/skills/trigger-dev-tasks/` in parallel with `rules/` when SDK features change
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Keep SDK documentation in `rules/` and `.claude/skills/trigger-dev-tasks/` synchronized when features are added or changed
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3833
File: .changeset/ai-sdk-7-support.md:5-5
Timestamp: 2026-06-04T15:28:19.931Z
Learning: In triggerdotdev/trigger.dev, the `ai-sdk/otel` auto-registration caveats (skip-if-already-registered behaviour and the `TRIGGER_AI_SDK_OTEL_AUTOREGISTER=0` opt-out) are intentionally omitted from changeset copy to keep it concise. Full documentation lives in the AI Chat compatibility reference (docs PR `#3835`). Do not flag the changeset text as incomplete on this topic in future reviews.
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-02T21:20:43.541Z
Learning: Do not update `rules/` directory or `.claude/skills/trigger-dev-tasks/` unless explicitly asked - these are maintained in separate dedicated passes
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/trigger-sdk/CLAUDE.md:0-0
Timestamp: 2026-06-02T21:20:48.921Z
Learning: Do NOT update `rules/` or `.claude/skills/trigger-dev-tasks/` directories unless explicitly asked, as these are maintained in separate dedicated passes
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/rules/**/* : Update `rules/` directory with versioned SDK documentation when SDK features change
📚 Learning: 2026-06-04T15:28:19.931Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3833
File: .changeset/ai-sdk-7-support.md:5-5
Timestamp: 2026-06-04T15:28:19.931Z
Learning: In triggerdotdev/trigger.dev, the `ai-sdk/otel` auto-registration caveats (skip-if-already-registered behaviour and the `TRIGGER_AI_SDK_OTEL_AUTOREGISTER=0` opt-out) are intentionally omitted from changeset copy to keep it concise. Full documentation lives in the AI Chat compatibility reference (docs PR `#3835`). Do not flag the changeset text as incomplete on this topic in future reviews.
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-05-12T21:04:01.335Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3542
File: apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.sessions._index/route.tsx:78-78
Timestamp: 2026-05-12T21:04:01.335Z
Learning: In the triggerdotdev/trigger.dev codebase, the Sessions feature (routes under `sessions._index` and `sessions.$sessionParam`) intentionally uses `docsPath("/ai-chat/overview")` for its docs link. Sessions documentation lives under the AI chat overview as part of the chat.agent feature surface. Do not flag this as a mismatched link text/path.
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Keep SDK documentation in `rules/` and `.claude/skills/trigger-dev-tasks/` synchronized when features are added or changed
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-06-01T15:50:21.405Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3790
File: packages/trigger-sdk/src/v3/ai.ts:0-0
Timestamp: 2026-06-01T15:50:21.405Z
Learning: In `packages/trigger-sdk/src/v3/ai.ts` in the Trigger.dev `chat.agent` tool-resolution flow, function-form `tools` should be resolved at boot using the run/continuation payload's parsed `clientData` before converting restored `accumulatedUIMessages` with `toModelMessages`, so tool `toModelOutput` is re-applied to prior persisted tool results on resumed chats. This boot-time resolution is intentionally fail-open because it only re-renders saved history; per-turn `resolveTurnTools()` remains fail-closed because reusing stale tools could leak capabilities.
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.md
📚 Learning: 2026-05-19T21:04:52.902Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3671
File: packages/trigger-sdk/src/v3/ai.ts:724-769
Timestamp: 2026-05-19T21:04:52.902Z
Learning: Repo: triggerdotdev/trigger.dev — In packages/trigger-sdk/src/v3/ai.ts, recovery now preserves per-message clientData: replaySessionInTail returns { message, metadata, seqNum } for each session.in record, and the recovery boot queue maps metadata by message.id to reconstruct recovered turns. For messages without a matching record (e.g., hook-synthesized), it intentionally falls back to the current boot payload’s metadata. Do not flag “lost metadata on recovered turns” in future reviews when this path is in use.
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/.claude/skills/trigger-dev-tasks/**/* : Update `.claude/skills/trigger-dev-tasks/` in parallel with `rules/` when SDK features change
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-05-14T16:39:02.759Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3546
File: packages/cli-v3/src/mcp/tools/agentChat.ts:29-29
Timestamp: 2026-05-14T16:39:02.759Z
Learning: In `packages/cli-v3/src/mcp/tools/agentChat.ts`, the `activeSessions` Map intentionally has no TTL, LRU eviction, or size limit. The MCP server is dev-only (`start_agent_chat` enforces `input.environment === "dev"`) and runs as a short-lived subprocess of the MCP host (Claude Code / Cursor / etc.). The process is restarted whenever the IDE restarts, so sessions never accumulate across host lifetimes. Do not flag the lack of automatic cleanup as a memory-leak risk in this file.
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.md
📚 Learning: 2026-06-04T15:28:23.067Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3834
File: apps/webapp/app/components/runs/v3/agent/AgentView.tsx:300-340
Timestamp: 2026-06-04T15:28:23.067Z
Learning: In `apps/webapp/app/components/runs/v3/agent/AgentView.tsx` (triggerdotdev/trigger.dev), `applyToolResolution()` inside `useAgentSessionMessages` treats `output-denied` as a terminal tool state alongside `output-available` and `output-error`. A buffered `.in` resolution replay must never overwrite a part that has already reached any of these three terminal states. This mirrors the same contract enforced by `mergeIncomingIntoHydrated` in `packages/trigger-sdk/src/v3/ai.ts`.
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.md
📚 Learning: 2026-05-23T15:25:28.060Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3719
File: packages/trigger-sdk/src/v3/ai.ts:6233-6256
Timestamp: 2026-05-23T15:25:28.060Z
Learning: Repo: triggerdotdev/trigger.dev
File: packages/trigger-sdk/src/v3/ai.ts (hydrateMessages path, ~Lines 6160–6170)
Learning: When `hydrateMessages` is used, dedupe for `onTurnComplete.newUIMessages`/`newMessages` must compare the incoming message id against the pre-hydration chain (the `accumulatedUIMessages` captured BEFORE `hydrateMessages` runs), not the post-hydration `hydrated` array. The canonical hydrate pattern persists and returns the fresh user message, so checking against `hydrated` would incorrectly drop that user turn from `newUIMessages`. Implement by snapshotting a `previouslyKnownMessageIds` Set from the pre-hydration chain and using it for the `matchedExisting` test.
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `task()` from `trigger.dev/sdk` for basic task definitions with `id` and `run` properties
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-05-23T09:12:50.004Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3719
File: packages/trigger-sdk/src/v3/ai.ts:2154-2215
Timestamp: 2026-05-23T09:12:50.004Z
Learning: In triggerdotdev/trigger.dev, packages/trigger-sdk/src/v3/ai.ts mergeIncomingIntoHydrated must treat "output-denied" as a terminal tool state (alongside "output-available" and "output-error") and include a same-state early-return to deduplicate replay/retry wire arrivals, ensuring stale "approval-responded" parts never regress a hydrated denial.
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/chat-agent-advanced/SKILL.md
📚 Learning: 2026-06-02T21:20:43.541Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-02T21:20:43.541Z
Learning: Applies to **/*.{ts,tsx} : Import from `trigger.dev/sdk` when writing Trigger.dev tasks. Never use `trigger.dev/sdk/v3` or deprecated `client.defineJob`
Applied to files:
packages/cli-v3/skills/authoring-chat-agent/SKILL.mdpackages/cli-v3/skills/realtime-and-frontend/SKILL.mdpackages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-03-06T14:44:55.489Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3173
File: packages/trigger-sdk/src/v3/chat.test.ts:103-104
Timestamp: 2026-03-06T14:44:55.489Z
Learning: In `packages/trigger-sdk/src/v3/chat.test.ts`, mocking `global.fetch` with `vi.fn()` is acceptable and intentional. `TriggerChatTransport` is a browser-facing SSE/HTTP client, and using testcontainers for these tests is not required. This file is an explicit exception to the repo's general no-mocks policy.
Applied to files:
packages/cli-v3/skills/chat-agent-advanced/SKILL.md
📚 Learning: 2026-05-18T14:40:18.886Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3658
File: packages/core/src/v3/realtimeStreams/manager.test.ts:1-147
Timestamp: 2026-05-18T14:40:18.886Z
Learning: In the triggerdotdev/trigger.dev codebase, the guideline "Never mock anything — use testcontainers instead" (from `CLAUDE.md` / `AGENTS.md`) applies exclusively to integration tests that interact with real external services (Redis, Postgres, etc.). It does NOT apply to unit tests for pure in-memory logic. Tests that stub `ApiClient` with `vi.fn()` to count calls — such as `packages/core/src/v3/realtimeStreams/manager.test.ts` and `packages/trigger-sdk/src/v3/sessions.test.ts` — are correct and intentional; these tests exercise in-memory cache semantics where testcontainers would have nothing to host. Do not flag `vi.fn()`-based `ApiClient` stubs in such unit tests as policy violations.
Applied to files:
packages/cli-v3/skills/chat-agent-advanced/SKILL.md
📚 Learning: 2026-02-25T17:28:20.456Z
Learnt from: isshaddad
Repo: triggerdotdev/trigger.dev PR: 3130
File: docs/v3-openapi.yaml:3134-3135
Timestamp: 2026-02-25T17:28:20.456Z
Learning: In the Trigger.dev codebase, the `publicAccessToken` returned by the SDK's `wait.createToken()` method is not part of the HTTP response body from `POST /api/v1/waitpoints/tokens`. The server returns only `{ id, isCached, url }`. The SDK's `prepareData` hook generates the JWT client-side from the `x-trigger-jwt-claims` response header after the HTTP call completes. The OpenAPI spec correctly documents only the HTTP response body, not SDK transformations.
<!-- [/add_learning]
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-02T12:43:37.906Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/core/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:37.906Z
Learning: Exercise caution with changes to trigger.dev/core as they affect both the customer-facing SDK and server-side webapp - breaking changes can impact deployed user tasks and the platform simultaneously
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Import from `trigger.dev/sdk` (NEVER from `trigger.dev/sdk/v3`)
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Use `trigger.dev/react-hooks` for React components that need to display real-time task status and results
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Use Trigger.dev Realtime API (`runs.subscribeToRun()`, `runs.subscribeToRunsWithTag()`, `runs.subscribeToBatch()`) for real-time updates instead of polling
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `metadata.stream()` to stream data in realtime from inside tasks
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`) to manage task execution stages
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `metadata.current()`, `metadata.get()`, `metadata.set()`, `metadata.del()`, and other metadata methods to attach and manage up to 256KB of structured data to runs
Applied to files:
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/init.ts : Implement `init.ts` command in `src/commands/` for project initialization
Applied to files:
packages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/promote.ts : Implement `promote.ts` command in `src/commands/` for deployment promotion
Applied to files:
packages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-06-02T21:20:43.541Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-02T21:20:43.541Z
Learning: Do not update `rules/` directory or `.claude/skills/trigger-dev-tasks/` unless explicitly asked - these are maintained in separate dedicated passes
Applied to files:
packages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/dev.ts : Implement `dev.ts` command in `src/commands/` for local development mode
Applied to files:
packages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/deploy.ts : Implement `deploy.ts` command in `src/commands/` for production deployment
Applied to files:
packages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/rules/**/* : Update `rules/` directory with versioned SDK documentation when SDK features change
Applied to files:
packages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-06-02T21:20:48.921Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/trigger-sdk/CLAUDE.md:0-0
Timestamp: 2026-06-02T21:20:48.921Z
Learning: Do NOT update `rules/` or `.claude/skills/trigger-dev-tasks/` directories unless explicitly asked, as these are maintained in separate dedicated passes
Applied to files:
packages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-03-22T13:26:12.060Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3244
File: apps/webapp/app/components/code/TextEditor.tsx:81-86
Timestamp: 2026-03-22T13:26:12.060Z
Learning: In the triggerdotdev/trigger.dev codebase, do not flag `navigator.clipboard.writeText(...)` calls for `missing-await`/`unhandled-promise` issues. These clipboard writes are intentionally invoked without `await` and without `catch` handlers across the project; keep that behavior consistent when reviewing TypeScript/TSX files (e.g., usages like in `apps/webapp/app/components/code/TextEditor.tsx`).
Applied to files:
packages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-03-22T19:24:14.403Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3187
File: apps/webapp/app/v3/services/alerts/deliverErrorGroupAlert.server.ts:200-204
Timestamp: 2026-03-22T19:24:14.403Z
Learning: In the triggerdotdev/trigger.dev codebase, webhook URLs are not expected to contain embedded credentials/secrets (e.g., fields like `ProjectAlertWebhookProperties` should only hold credential-free webhook endpoints). During code review, if you see logging or inclusion of raw webhook URLs in error messages, do not automatically treat it as a credential-leak/secrets-in-logs issue by default—first verify the URL does not contain embedded credentials (for example, no username/password in the URL, no obvious secret/token query params or fragments). If the URL is credential-free per this project’s conventions, allow the logging.
Applied to files:
packages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-05-18T08:21:27.694Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3632
File: apps/webapp/sentry.server.ts:4-21
Timestamp: 2026-05-18T08:21:27.694Z
Learning: When handling Prisma error P1001 ("Can't reach database server") in TypeScript, don’t assume a single error shape. Prisma can surface P1001 via two different error classes/fields: `PrismaClientKnownRequestError` exposes it as `err.code === "P1001"` (common during mid-query connection drops), while `PrismaClientInitializationError` exposes it as `err.errorCode === "P1001"` (common on client startup failure). Therefore, predicates should use `err.code === "P1001" || err.errorCode === "P1001"`. Do not flag `err.code === "P1001"` as “unreachable/never matches,” as it is expected in production.
Applied to files:
packages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-05-18T08:21:27.694Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3632
File: apps/webapp/sentry.server.ts:4-21
Timestamp: 2026-05-18T08:21:27.694Z
Learning: When handling Prisma errors for P1001 ("Can't reach database server"), do not assume it only appears under a single property name. Prisma may surface P1001 via either `PrismaClientKnownRequestError` (`err.code === "P1001"`, e.g., mid-query connection drops) or `PrismaClientInitializationError` (`err.errorCode === "P1001"`, e.g., client startup connection failure). To reliably detect the condition, check `err.code === "P1001" || err.errorCode === "P1001"`, and avoid review rules that would incorrectly flag `err.code === "P1001"` as unreachable/never-matching.
Applied to files:
packages/cli-v3/src/commands/skills.ts
📚 Learning: 2026-06-04T18:16:35.386Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3836
File: apps/supervisor/src/backpressure/backpressureMonitor.ts:3-5
Timestamp: 2026-06-04T18:16:35.386Z
Learning: When reviewing TypeScript in this repo, apply the rule “prefer type aliases over interfaces” only to data/object shapes and union/intersection type modeling. If an interface is being used as a behavioral contract for collaborators to implement (e.g., method-shape interfaces that define required behavior, such as `BackpressureLogger` / `BackpressureSignalSource` in `apps/supervisor/src/backpressure/backpressureMonitor.ts`), keep it as an `interface` and do not flag it as a type-alias-vs-interface violation.
Applied to files:
packages/cli-v3/src/commands/skills.ts
🪛 ast-grep (0.43.0)
packages/cli-v3/src/commands/skills.ts
[warning] 433-433: Regular expression constructed from variable input detected. This can lead to Regular Expression Denial of Service (ReDoS) attacks if the variable contains malicious patterns. Use libraries like 'recheck' to validate regex safety or use static patterns.
Context: new RegExp(${POINTER_START}.*?${POINTER_END}, "s")
Note: [CWE-1333] Inefficient Regular Expression Complexity
(regexp-from-variable)
🪛 LanguageTool
packages/cli-v3/skills/realtime-and-frontend/SKILL.md
[grammar] ~72-~72: Use a hyphen to join words.
Context: ...iggerPublicToken`). Both default to a 15 minute expiry. ## Core patterns ### 1....
(QB_NEW_EN_HYPHEN)
[grammar] ~272-~272: Ensure spelling is correct
Context: ...at you need. Only subscribeToRun auto-completes. 5. Forgetting "use client". Realtime/tr...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.22.1)
packages/cli-v3/skills/authoring-chat-agent/SKILL.md
[warning] 220-220: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
packages/cli-v3/skills/chat-agent-advanced/SKILL.md
[warning] 351-351: Blank line inside blockquote
(MD028, no-blanks-blockquote)
🔇 Additional comments (1)
packages/cli-v3/skills/realtime-and-frontend/SKILL.md (1)
1-305: LGTM!
| ``` | ||
| onValidateMessages -> hydrateMessages -> onChatStart (chat's first message only) | ||
| -> onTurnStart -> run() -> onBeforeTurnComplete -> onTurnComplete | ||
| ``` |
There was a problem hiding this comment.
Add a language hint to the fenced lifecycle-order block.
This fenced block is missing a language identifier, which triggers markdownlint MD040.
Suggested fix
-```
+```text
onValidateMessages -> hydrateMessages -> onChatStart (chat's first message only)
-> onTurnStart -> run() -> onBeforeTurnComplete -> onTurnComplete</details>
<details>
<summary>🧰 Tools</summary>
<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>
[warning] 220-220: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<!-- fingerprinting:phantom:poseidon:hawk -->
<!-- cr-comment:v1:2f09e48a06004db6caf3a9ef -->
_Source: Linters/SAST tools_
<!-- This is an auto-generated comment by CodeRabbit -->
| > Note on docs vocabulary: agent-side examples in some docs still use the legacy | ||
| > `trigger:turn-complete` chunk type. That is the agent-emit vocabulary. A custom **reader** must | ||
| > filter on the `trigger-control` header, not on `chunk.type`. | ||
|
|
||
| > MCP-driven agent chats (`list_agents`, `start_agent_chat`, `send_agent_message`, | ||
| > `close_agent_chat`) are MCP server tools used from Claude Code / Cursor, not importable SDK | ||
| > functions. See `/mcp-tools#agent-chat-tools`. |
There was a problem hiding this comment.
Remove the blank separator between consecutive blockquotes.
There is a blank line inside the blockquote section, triggering markdownlint MD028.
Suggested fix
> Note on docs vocabulary: agent-side examples in some docs still use the legacy
> `trigger:turn-complete` chunk type. That is the agent-emit vocabulary. A custom **reader** must
> filter on the `trigger-control` header, not on `chunk.type`.
-
> MCP-driven agent chats (`list_agents`, `start_agent_chat`, `send_agent_message`,
> `close_agent_chat`) are MCP server tools used from Claude Code / Cursor, not importable SDK
> functions. See `/mcp-tools#agent-chat-tools`.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| > Note on docs vocabulary: agent-side examples in some docs still use the legacy | |
| > `trigger:turn-complete` chunk type. That is the agent-emit vocabulary. A custom **reader** must | |
| > filter on the `trigger-control` header, not on `chunk.type`. | |
| > MCP-driven agent chats (`list_agents`, `start_agent_chat`, `send_agent_message`, | |
| > `close_agent_chat`) are MCP server tools used from Claude Code / Cursor, not importable SDK | |
| > functions. See `/mcp-tools#agent-chat-tools`. | |
| > Note on docs vocabulary: agent-side examples in some docs still use the legacy | |
| > `trigger:turn-complete` chunk type. That is the agent-emit vocabulary. A custom **reader** must | |
| > filter on the `trigger-control` header, not on `chunk.type`. | |
| > MCP-driven agent chats (`list_agents`, `start_agent_chat`, `send_agent_message`, | |
| > `close_agent_chat`) are MCP server tools used from Claude Code / Cursor, not importable SDK | |
| > functions. See `/mcp-tools#agent-chat-tools`. |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 351-351: Blank line inside blockquote
(MD028, no-blanks-blockquote)
Source: Linters/SAST tools
| const targets = [ | ||
| "claude-code", | ||
| "cursor", | ||
| "vscode", | ||
| "windsurf", | ||
| "gemini-cli", | ||
| "cline", | ||
| "agents.md", | ||
| "amp", | ||
| "kilo", | ||
| "ruler", | ||
| ] as const; |
There was a problem hiding this comment.
Avoid reporting unsupported targets as successful installs.
Targets like windsurf, gemini-cli, cline, amp, kilo, and ruler are listed in targets, but they resolve to no skills directory and are skipped per option; despite that, they can still produce a top-level “Installed the following skills” flow. This also makes the --target help text overstate what is actually installable.
Suggested fix
-const targets = [
+const targets = [
"claude-code",
"cursor",
"vscode",
"windsurf",
"gemini-cli",
"cline",
"agents.md",
"amp",
"kilo",
"ruler",
] as const;
+
+const installableTargets = new Set<SupportedTargets>([
+ "claude-code",
+ "cursor",
+ "vscode",
+ "agents.md",
+]);- "Choose the target (or targets) to install the Trigger.dev skills into. We currently support: " +
- targets.join(", ")
+ "Choose the target (or targets) to install the Trigger.dev skills into. Native install is currently supported for: " +
+ Array.from(installableTargets).join(", ")- if (result) {
+ if (result && (result.installations.length > 0 || result.pointer)) {
results.push(result);
} if (targetName === "unsupported") {
@@
}
+
+ if (!installableTargets.has(targetName)) {
+ log.message(
+ `${chalk.yellow("⚠")} ${targetLabels[targetName]} doesn't support native skills install yet. See manual configuration above.`
+ );
+ return;
+ }Also applies to: 75-79, 237-243, 245-255, 320-325, 334-352
Summary
trigger skillsinstalls Trigger.dev agent skills into your coding agent so it knows how to write Trigger.dev code: tasks, schedules, realtime, andchat.agentAI agents. The skills areSKILL.mdfiles (the open Agent Skills format) bundled with the CLI and copied into each tool's native skills directory (Claude Code, Cursor, GitHub Copilot, and Codex /AGENTS.md), version-matched to the CLI you run.trigger devoffers to install them on first run, and a one-line always-on pointer is written into yourCLAUDE.md/ Cursor rules / etc. so the agent always knows which skills are available and loads the right one on demand.This replaces the old
install-rulescommand, which stays as an alias. Four skills ship to start:authoring-tasks,realtime-and-frontend,authoring-chat-agent, andchat-agent-advanced.