Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
d7a0eae
feat(github): replace hardcoded agent messages with LLM-generated ack…
zbigniewsobiecki Feb 22, 2026
0743e5d
Merge pull request #490 from zbigniewsobiecki/feat/llm-ack-github-agents
zbigniewsobiecki Feb 22, 2026
8d81311
feat(review): add configurable review trigger modes (ownPrsOnly, exte…
Feb 22, 2026
c81ab70
Merge pull request #491 from zbigniewsobiecki/feature/review-trigger-…
zbigniewsobiecki Feb 22, 2026
af400c9
refactor(router): extract shared credential resolution & platform API…
Feb 22, 2026
df49bcd
fix(router): remove unused high-level helpers and fix stale comment
Feb 22, 2026
d2d53cf
Merge pull request #492 from zbigniewsobiecki/refactor/router-platfor…
zbigniewsobiecki Feb 22, 2026
032cc00
fix(repo): clone repository on configured baseBranch instead of defau…
zbigniewsobiecki Feb 23, 2026
233ad37
refactor(server): extract generic webhook handler factory to eliminat…
aaight Feb 23, 2026
36a69a6
feat(triggers): add per-agent JIRA issue-transitioned toggles and pm-…
aaight Feb 23, 2026
ed23001
feat(pm): replace PR comment links with native attachments/remote lin…
aaight Feb 23, 2026
a5f9b9c
feat(dashboard): replace free-text key inputs with dropdowns in PM in…
aaight Feb 23, 2026
f2e6e75
feat(progress): add agent-specific emojis and labels to progress upda…
aaight Feb 23, 2026
a4189fe
fix(dashboard): fix review trigger toggles showing under PM section (…
aaight Feb 23, 2026
39a083f
feat(sentry): add error monitoring for router, worker, and dashboard …
zbigniewsobiecki Feb 23, 2026
47a562c
fix(dashboard): fix auth routing - reactive state, beforeLoad guard, …
aaight Feb 23, 2026
0763849
refactor: code review cleanups for trigger system and router (#504)
zbigniewsobiecki Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ Optional (infrastructure):
- `DATABASE_SSL` - Set to `false` to disable SSL for local PostgreSQL (default: enabled)
- `CLAUDE_CODE_OAUTH_TOKEN` - For Claude Code backend (subscription auth)
- `CREDENTIAL_MASTER_KEY` - 64-char hex string (32-byte AES-256 key) for encrypting credentials at rest. Generate with `npm run credentials:generate-key`. When set, all new/updated credentials are encrypted automatically; existing plaintext credentials continue to work.
- `SENTRY_DSN` - Sentry DSN for error monitoring (router + worker)
- `SENTRY_ENVIRONMENT` - Sentry environment tag (default: NODE_ENV or 'production')
- `SENTRY_RELEASE` - Release identifier for source maps (e.g., git SHA)
- `SENTRY_TRACES_SAMPLE_RATE` - Trace sampling rate 0.0-1.0 (default: 0.1)

**Project credentials** (`GITHUB_TOKEN_IMPLEMENTER`, `GITHUB_TOKEN_REVIEWER`, `TRELLO_API_KEY`, `TRELLO_TOKEN`, LLM API keys) are stored in the `credentials` table (org-scoped, encrypted at rest when `CREDENTIAL_MASTER_KEY` is set). Integration-specific credentials (GitHub tokens, Trello keys, JIRA tokens) are linked to integrations via the `integration_credentials` join table with provider-defined roles. Non-integration credentials (LLM API keys) remain org-scoped defaults. There is no env var fallback — the database is the sole source of truth for project-scoped secrets.

Expand Down Expand Up @@ -189,6 +193,121 @@ const openrouterKey = await getOrgCredential(projectId, 'OPENROUTER_API_KEY');

Role definitions and env-var-key mappings are in `src/config/integrationRoles.ts`.

### Review Agent Trigger Modes

The review agent supports three independent trigger modes via the `reviewTrigger` config in the SCM integration triggers. **All modes default to `false`** — existing behavior is preserved via a legacy fallback.

| Mode | Description |
|------|-------------|
| `ownPrsOnly` | Trigger review when CI passes on PRs authored by the **implementer** persona |
| `externalPrs` | Trigger review when CI passes on PRs authored by **anyone** (including external contributors) |
| `onReviewRequested` | Trigger review when a CASCADE persona is **explicitly requested** as reviewer |

#### Setting via CLI

```bash
# Enable review for implementer PRs only (most common)
cascade projects review-trigger-set <project-id> --own-prs-only

# Enable review for external contributor PRs
cascade projects review-trigger-set <project-id> --external-prs

# Enable both CI-triggered modes
cascade projects review-trigger-set <project-id> --own-prs-only --external-prs

# Enable review when explicitly requested
cascade projects review-trigger-set <project-id> --on-review-requested

# Disable a mode
cascade projects review-trigger-set <project-id> --no-own-prs-only
```

#### Setting via Dashboard

In the **Agent Configs** tab, the `review` agent section shows three toggles under the SCM integration:
- **Own PRs Only** — CI-triggered review for implementer-authored PRs
- **External PRs** — CI-triggered review for all other PR authors
- **On Review Requested** — review triggered when a persona is explicitly requested

#### Direct JSON Config

```bash
cascade projects integration-set <project-id> \
--category scm --provider github --config '{}' \
--triggers '{"reviewTrigger":{"ownPrsOnly":true,"externalPrs":false,"onReviewRequested":true}}'
```

#### Backward Compatibility

When `reviewTrigger` is absent, the system falls back to legacy booleans:
- `checkSuiteSuccess` → `ownPrsOnly` (default `true` for existing projects)
- `reviewRequested` → `onReviewRequested` (default `false`)
- `externalPrs` always `false` in legacy mode (no legacy equivalent)

### PM Agent Trigger Modes

Briefing, planning, and implementation agents each have independent toggles for their PM triggers. **All modes default to `true`** for backward compatibility.

#### Trello card-moved triggers

| Flag | Description |
|------|-------------|
| `cardMovedToBriefing` | Trigger briefing agent when a card is moved to the Briefing list |
| `cardMovedToPlanning` | Trigger planning agent when a card is moved to the Planning list |
| `cardMovedToTodo` | Trigger implementation agent when a card is moved to the Todo list |

#### JIRA issue-transitioned triggers (per-agent)

The `issueTransitioned` field supports both a legacy boolean (applies to all agents) and a nested per-agent object:

| Agent | Field | Description |
|-------|-------|-------------|
| briefing | `issueTransitioned.briefing` | Trigger briefing when issue transitions to Briefing status |
| planning | `issueTransitioned.planning` | Trigger planning when issue transitions to Planning status |
| implementation | `issueTransitioned.implementation` | Trigger implementation when issue transitions to Todo status |

#### Setting via CLI

```bash
# Disable Trello card-moved trigger for briefing agent
cascade projects pm-trigger-set <project-id> --no-card-moved-to-briefing

# Disable JIRA issue-transitioned for implementation agent only
cascade projects pm-trigger-set <project-id> --no-issue-transitioned-implementation

# Enable JIRA triggers for briefing and planning, disable for implementation
cascade projects pm-trigger-set <project-id> \
--issue-transitioned-briefing \
--issue-transitioned-planning \
--no-issue-transitioned-implementation

# Disable all Trello card-moved triggers
cascade projects pm-trigger-set <project-id> \
--no-card-moved-to-briefing \
--no-card-moved-to-planning \
--no-card-moved-to-todo
```

#### Setting via Dashboard

In the **Agent Configs** tab, the briefing, planning, and implementation agent sections each show:
- **Card moved to [list]** — Trello card-moved toggle (Trello projects only)
- **Issue Transitioned** — JIRA per-agent transition toggle (JIRA projects only)
- **Ready to Process label** — label-based trigger toggle

#### Direct JSON Config

```bash
# Disable JIRA issue-transitioned for implementation only
cascade projects integration-set <project-id> \
--category pm --provider jira --config '{"projectKey":"PROJ","statuses":{...}}' \
--triggers '{"issueTransitioned":{"briefing":true,"planning":true,"implementation":false}}'
```

#### Backward Compatibility

The legacy `issueTransitioned: true/false` boolean is still supported — it applies to all agents uniformly.

## Claude Code Backend

CASCADE supports using Claude Code SDK as an alternative agent backend. Configure per-project:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dashboard
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ COPY --from=builder /app/src/agents/prompts/templates ./dist/agents/prompts/temp

ENV PORT=3001
EXPOSE 3001
CMD ["node", "dist/dashboard.js"]
CMD ["node", "--import", "./dist/instrument.js", "dist/dashboard.js"]
2 changes: 1 addition & 1 deletion Dockerfile.router
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ COPY config ./config

ENV PORT=3000
EXPOSE 3000
CMD ["node", "dist/router/index.js"]
CMD ["node", "--import", "./dist/instrument.js", "dist/router/index.js"]
2 changes: 1 addition & 1 deletion Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ COPY --chown=node:node src/agents/prompts/templates ./dist/agents/prompts/templa
COPY --chown=node:node config ./config

# Worker entry point - processes a single job and exits
CMD ["node", "dist/worker-entry.js"]
CMD ["node", "--import", "./dist/instrument.js", "dist/worker-entry.js"]
Loading