11 tool nodes connected to AI Agent via ai_tool | Timezone: America/New_York | Model: claude-sonnet-4-6, temp 0.2
| Mode | Trigger Condition | Enrichment Scope | Dedup Window | Report Tag |
|---|---|---|---|---|
| create | New D2C ticket created (human actor only) | Full protocol: all 11 sources, claim verification, follow-the-leads | 1 hour | (none) |
| status_in_progress | Ticket moves to any started state + updatedFrom.stateId present | Full protocol (same as create). Developer needs fresh context | 7 calendar days | (re-enrichment) |
| pr_linked | Any update on ticket with GitHub PR in attachments | Lightweight: PR details + brief Slack (2 queries) + related tickets only. Skips BQ, Sentry, Vercel, Drive, Notion, Figma | 24 hours | (lightweight) |
Scans D2C "In Progress" tickets | Flags if no activity for 7+ days | Health Check dedup: 24 hours
| Parameter | Value |
|---|---|
| Target | D2C team tickets in started state type |
| Staleness threshold | 7 calendar days since last updatedAt |
| Health Check dedup | Skip if ## Health Check comment posted < 24 hours ago |
| Comment includes | Days stale, assignee, linked PR count, actionable suggestions |
| Schedule | Weekdays at 10:00 AM ET (cron: 0 10 * * 1-5) |
| Test | Ticket | Result | Duration |
|---|---|---|---|
| create Full enrichment | D2C-4849 | Pass 3 PRs, Statsig gate, related tickets | ~85s |
| re-enrichment | D2C-4849 | Pass "(re-enrichment)" tag, fresh data | ~85s |
| pr_linked Lightweight | D2C-4766 | Pass PR #1138, 3 Slack, 3 related | ~36s |
| Dedup: fresh report | D2C-4849 | Pass In Progress <7d skipped | <1s |
| Race condition fix | Post Comment | Fixed 5-min DB dedup | n/a |
| Figma integration | D2C-4828 | Pass URL parse, node, comments | ~56s |
| Variable | Source | Used By |
|---|---|---|
| LINEAR_API_KEY | Linear Settings > API | Validate, Linear API, Post Comment |
| LINEAR_OAUTH_CLIENT_ID | Linear OAuth App | Post Comment (bot identity) |
| LINEAR_OAUTH_CLIENT_SECRET | Linear OAuth App | Post Comment (bot identity) |
| GITHUB_TOKEN | GitHub PAT | GitHub API |
| SLACK_BOT_TOKEN | Slack App > OAuth | Slack API |
| SENTRY_AUTH_TOKEN | Sentry > Auth Tokens | Sentry API |
| VERCEL_TOKEN | Vercel > Tokens | Vercel API |
| NOTION_API_KEY | Notion Integration | Notion API |
| GOOGLE_SA_CLIENT_EMAIL | GCP Service Account | Drive, BigQuery |
| GOOGLE_SA_PRIVATE_KEY_1 | GCP SA key (part 1) | Drive, BigQuery |
| GOOGLE_SA_PRIVATE_KEY_2 | GCP SA key (part 2) | Drive, BigQuery |
| GOOGLE_PROJECT_ID | GCP Project | BigQuery |
| FIGMA_API_TOKEN | Figma PAT | Figma API |
| LANGFUSE_PUBLIC_KEY | Langfuse Settings | Langfuse API |
| LANGFUSE_SECRET_KEY | Langfuse Settings | Langfuse API |
| STATSIG_API_KEY | Statsig Console | Statsig API |
| Credential | Type | Used By |
|---|---|---|
| Anthropic account | anthropicApi | Claude Sonnet 4.6 |
| Linear account | linearApi | Webhook trigger |