Skip to content

feat(#369): add Aider as second agent backend - #385

Merged
admarble merged 9 commits into
mainfrom
feature/369-add-aider-as-second-agent-backend
Mar 23, 2026
Merged

admarble merged 9 commits into
mainfrom
feature/369-add-aider-as-second-agent-backend

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Implement AiderDriver that shells out to aider --yes --no-auto-commits --message "<prompt>" for fully non-interactive phase execution
  • Add AiderSettings type with model, editFormat, and extraArgs config plus load-time validation
  • Register "aider" in the driver registry and wire settings through CLI → run.ts → phase-executor → driver
  • Add conditional Aider CLI check in sequant doctor when configured as default agent
  • 37 new tests (unit + settings + integration) covering all 14 AC items

AC Verification

AC Description Status Evidence
AC-1 AiderDriver implements AgentDriver ✅ aider.ts — name, executePhase(), isAvailable()
AC-2 isAvailable() checks PATH ✅ which aider via execSync
AC-3 Phase execution with correct flags ✅ --yes --no-auto-commits --no-pretty --message
AC-4 --no-auto-commits always present ✅ Hardcoded in buildArgs()
AC-5 Output captured for QA parsing ✅ stdout captured in result.output
AC-6 Exit code mapping ✅ 0→success, non-zero→failure
AC-7 Timeout enforcement ✅ SIGTERM via setTimeout + kill
AC-8 Verbose streaming ✅ onOutput called per chunk when verbose=true
AC-9 CLI --agent aider ✅ Already wired in #368, settings.run.agent fallback added
AC-10 Doctor checks Aider ✅ Conditional check when agent="aider"
AC-11 Settings support ✅ AiderSettings interface + RunSettings.agent/aider
AC-12 Clear error on missing binary ✅ ENOENT → "Install with: pip install aider-chat"
AC-13 Settings validation ✅ validateAiderSettings() with type checking
AC-14 Dry-run prompts ✅ Prompts passed directly to --message arg

Test plan

  • npm run build — passes
  • npm run lint — passes (0 errors, 0 warnings)
  • npm test — 1619 tests pass (65 files), including 37 new aider tests
  • Manual: npx sequant run 123 --agent aider --dry-run shows correct prompts
  • Manual: npx sequant doctor with run.agent: "aider" in settings

Closes #369

🤖 Generated with Claude Code

Implement AiderDriver that shells out to the aider CLI for phase
execution, proving the AgentDriver abstraction from #368 works with
a fundamentally different execution model (subprocess CLI vs in-process SDK).

- AiderDriver implements AgentDriver interface with spawn-based execution
- isAvailable() checks aider CLI on PATH via `which aider`
- Always passes --yes --no-auto-commits --no-pretty for non-interactive use
- Exit code mapping, timeout enforcement, abort signal support
- Verbose mode streams stdout incrementally via onOutput callback
- Clear ENOENT error message when aider binary not found
- AiderSettings type with model, editFormat, extraArgs config
- Settings validation at load time (rejects invalid types)
- Driver registry updated: getDriver("aider") returns AiderDriver
- Doctor command checks aider availability when configured as default agent
- CLI --agent flag + settings.run.agent flow aider settings to driver
- 37 new tests covering all AC items (unit + integration + settings)

Entire-Checkpoint: b12321faff9d
@admarble admarble mentioned this pull request Mar 23, 2026
11 tasks
dependabot Bot and others added 8 commits March 23, 2026 00:33
Bumps the development-dependencies group with 4 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [globals](https://github.com/sindresorhus/globals) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@typescript-eslint/eslint-plugin` from 8.53.0 to 8.57.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.57.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.53.0 to 8.57.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.57.1/packages/parser)

Updates `globals` from 17.0.0 to 17.4.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](sindresorhus/globals@v17.0.0...v17.4.0)

Updates `typescript-eslint` from 8.53.0 to 8.57.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.57.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.57.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.57.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: globals
  dependency-version: 17.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: typescript-eslint
  dependency-version: 8.57.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
…y with 4 updates

Bumps the production-dependencies group with 4 updates in the / directory: [@anthropic-ai/claude-agent-sdk](https://github.com/anthropics/claude-agent-sdk-typescript), [hono](https://github.com/honojs/hono), [inquirer](https://github.com/SBoudrias/Inquirer.js) and [yaml](https://github.com/eemeli/yaml).


Updates `@anthropic-ai/claude-agent-sdk` from 0.2.75 to 0.2.81
- [Release notes](https://github.com/anthropics/claude-agent-sdk-typescript/releases)
- [Changelog](https://github.com/anthropics/claude-agent-sdk-typescript/blob/main/CHANGELOG.md)
- [Commits](anthropics/claude-agent-sdk-typescript@v0.2.75...v0.2.81)

Updates `hono` from 4.12.7 to 4.12.8
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](honojs/hono@v4.12.7...v4.12.8)

Updates `inquirer` from 13.3.0 to 13.3.2
- [Release notes](https://github.com/SBoudrias/Inquirer.js/releases)
- [Commits](https://github.com/SBoudrias/Inquirer.js/compare/[email protected]@13.3.2)

Updates `yaml` from 2.8.2 to 2.8.3
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](eemeli/yaml@v2.8.2...v2.8.3)

---
updated-dependencies:
- dependency-name: "@anthropic-ai/claude-agent-sdk"
  dependency-version: 0.2.81
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: hono
  dependency-version: 4.12.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: inquirer
  dependency-version: 13.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: yaml
  dependency-version: 2.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.3.1 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@34e1148...de0fac2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.4.0 to 6.3.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@49933ea...53b8394)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
- Add AIDER_PHASE_PROMPTS with self-contained instructions (no skill
  references) so Aider receives actionable prompts instead of
  "/spec {issue}" invocations it can't execute.
- Resolve changed files via git diff and pass --file flags to Aider
  for file-oriented context (AC-3).
- Add files?: string[] to AgentExecutionConfig interface.
- Tests for --file flag passing (present and empty cases).
Move prompt generation before the dry-run early return so
`--dry-run --verbose --agent aider` displays the self-contained
prompt that would be sent. Also returns the prompt in output
for programmatic inspection.
@admarble
admarble merged commit 606245d into main Mar 23, 2026
3 of 5 checks passed
@admarble
admarble deleted the feature/369-add-aider-as-second-agent-backend branch March 23, 2026 05:42
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.

Add Aider as second agent backend

1 participant