Skip to content

dev → main#552

Merged
zbigniewsobiecki merged 13 commits intomainfrom
dev
Feb 25, 2026
Merged

dev → main#552
zbigniewsobiecki merged 13 commits intomainfrom
dev

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

Test plan

  • CI passes (lint, typecheck, tests)
  • No regressions in agent execution paths
  • YAML-driven agent config loads correctly

🤖 Generated with Claude Code

aaight and others added 13 commits February 24, 2026 17:55
…d hintConfig trailing messages (#537)

Co-authored-by: Cascade Bot <bot@cascade.dev>
…545)

The 0015 migration failed on dev because it references the `runs` table
which doesn't exist in all environments. Wrap the UPDATE in a DO block
that checks for table existence first.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…s model context (#546)

The splitting agent on JIRA projects failed because:
1. The PM wizard's JIRA_STATUS_SLOTS omitted 'stories', so users couldn't
   configure the stories status mapping.
2. promptContext.ts only read storiesListId from Trello config, leaving it
   undefined for JIRA projects — the agent hallucinated a container ID.
3. The progress model had no agent-role context, generating misleading
   messages like "split main.py" instead of referencing work item breakdown.

Changes:
- Add 'stories' to JIRA_STATUS_SLOTS in pm-wizard
- Fall back to JIRA project key for storiesListId in promptContext
- Auto-transition new JIRA issues to stories status after creation
- Extract AGENT_ROLE_HINTS to shared agentMessages.ts, wire into both
  ackMessageGenerator and progressModel
- Add tests for all new behavior

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cascade Bot <bot@cascade.dev>
…es) (#543)

Co-authored-by: Cascade Bot <bot@cascade.dev>
…#548)

* refactor(tests): add integration test infrastructure and review fixes

Introduce vitest workspace with separate unit/integration projects,
shared test helpers (factories, mock DB, mock personas), and a full
integration test suite for credentialsRepository including encryption
round-trip coverage.

Review fixes:
- OS-aware psql in ensure-services.sh for macOS compatibility
- Explicit DATABASE_URL in setup.sh migrations (removes env race)
- Build step added to CI integration-tests job
- container_name in docker-compose.test.yml for easier debugging
- Extract buildProgressMonitorConfig() to fix cognitive complexity lint

Unit test cleanup: remove redundant mock boilerplate across 100+ test
files by leveraging vitest workspace setup files and shared helpers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(ci): run integration tests on PRs

Remove the `if: github.event_name == 'push'` guard from the
integration-tests job so it also runs on pull_request events.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cascade Bot <bot@cascade.dev>
* feat(tests): add integration test suites for all DB repositories

* fix(tests): remove unused imports and dead code in integration tests

Remove unused `seedRun` import from runsRepository.test.ts, and remove
unused `seedPrWorkItem` and `seedRunLogs` helpers from seed.ts along
with their now-unnecessary schema imports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
)

* refactor(agents): configuration-driven agent definitions with YAML + review fixes

Phase 2 of the configuration-driven agents architecture. Extracts
hardcoded agent profiles into declarative YAML definitions with
typed schemas, registry-based strategy resolution, and Eta task
prompt templates.

Key changes:
- Add YAML agent definitions (src/agents/definitions/*.yaml) with
  Zod-validated schema for identity, capabilities, tools, strategies,
  backend config, compaction, hints, and trailing messages
- Extract context pipeline steps into composable functions
  (contextSteps.ts) wired via YAML contextPipeline arrays
- Move task prompts from TS functions to Eta templates
  (src/agents/prompts/task-templates/*.eta)
- Derive agent capabilities from YAML instead of hardcoded switch
- Add DB column for per-agent task prompt overrides (migration 0016)
- Wire task prompt override rendering through resolveModelConfig
  with full AgentInput context (fixes commentText/commentAuthor
  rendering in DB overrides)
- Drive compaction, hint, and initial message configs from YAML
  definitions instead of hardcoded maps
- Add guard clauses to PR context steps (fetchPRContextStep,
  fetchPRConversationStep, postInitialPRCommentHook) replacing
  unsafe `as` casts
- Fix prCommentResponse.eta whitespace with Eta trimming tags
- Remove identity-mapping TASK_PROMPT_TEMPLATE_REGISTRY (Zod
  schema validates allowed values directly)
- Remove duplicate section header in strategies.ts

Net: -905 lines removed, +2078 added (much of the addition is YAML
definitions and comprehensive tests). 3259 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add task-templates to build and Docker images

The new task prompt templates (ci.eta, commentResponse.eta, etc.) were
missing from both the npm build script and the Dockerfiles. At runtime,
renderTaskPrompt() uses readFileSync with __dirname-relative paths,
which would throw ENOENT in production containers.

Changes:
- Add build:copy-task-templates script to package.json
- Copy src/agents/prompts/task-templates/*.eta to dist/ during build
- Add task-templates COPY directive to Dockerfile.worker and Dockerfile.dashboard

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cascade Bot <bot@cascade.dev>
@zbigniewsobiecki zbigniewsobiecki merged commit 3b339d6 into main Feb 25, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants