Skip to content

Add runner abstraction for multi-tool support#52

Merged
that-github-user merged 1 commit intomainfrom
issue-32-runner-abstraction
Mar 28, 2026
Merged

Add runner abstraction for multi-tool support#52
that-github-user merged 1 commit intomainfrom
issue-32-runner-abstraction

Conversation

@that-github-user
Copy link
Copy Markdown
Owner

Summary

  • Define Runner interface: name, description, available(), run()
  • Runner registry with getRunner(), listRunners(), getDefaultRunner()
  • Refactor Claude Code runner to implement the interface
  • Add --runner CLI flag (default: claude-code)
  • Tool availability check before running (clear error if not installed)
  • Foundation for adding Aider, Cursor, Copilot runners

Change type

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • CI / infrastructure
  • Chore

Related issue

Closes #32

How to test

npm test                    # 61 tests pass
thinktank run --help        # shows --runner flag
thinktank run "task" --runner nonexistent  # "Unknown runner" error

Breaking changes

  • This PR introduces breaking changes

The runClaudeAgent export is replaced by claudeCodeRunner object export. No external consumers expected at this stage.

🤖 Generated with Claude Code

- Runner interface: name, description, available(), run()
- Runner registry: getRunner(), listRunners(), getDefaultRunner()
- Refactor Claude Code runner to implement Runner interface
- Add --runner flag to CLI (default: claude-code)
- Availability check: errors if tool isn't installed
- 5 new registry tests, total: 61 tests passing
- Foundation for adding Aider, Cursor, Copilot runners

Closes #32

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@that-github-user
Copy link
Copy Markdown
Owner Author

Self-review checklist:

  • Runner interface is minimal: name, description, available(), run()
  • Registry returns undefined (not throws) for unknown runners
  • run.ts checks availability before creating worktrees
  • Error messages are actionable ("Is X installed?")
  • Claude Code runner preserves all existing behavior (spawn, timeout, diff capture)
  • --runner flag defaults to claude-code, visible in --help
  • 5 new registry tests, 61 total passing
  • Lint clean, types pass

@that-github-user that-github-user merged commit 2594ea7 into main Mar 28, 2026
3 checks passed
@that-github-user that-github-user deleted the issue-32-runner-abstraction branch March 28, 2026 17:54
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 runner abstraction for Cursor, Copilot, and other AI coding tools

1 participant