Skip to content

Commit 444574e

Browse files
chernistryauto-heal-fixupgithub-actions[bot]
authored
feat(cli): bernstein integrations list - enumerate wired-in adapters (#1496)
* adapters: add use-case metadata module for end-user copy Per-adapter end-user copy (headline, binary, optional details, optional docs path) lives in src/bernstein/adapters/use_cases.py alongside the adapter implementations. Single source of truth in the adapters package so a separate top-level docs/integrations.md is not needed. Used by the upcoming bernstein integrations list command. Adapters without an entry will fall back to the first line of the module docstring. * feat(cli): add bernstein integrations list command Bernstein ships 40+ adapters under src/bernstein/adapters/ but the only way for a user to enumerate them is to read the source tree. This adds a top-level integrations group with a list subcommand that surfaces the adapter registry directly. Flags: - (no flag) one-line summary per adapter (name + headline use case) - --details per-adapter block with binary, config knob, docs link - --json stable machine-readable payload for CI dashboards - --installed filter to adapters whose binary is on $PATH Per-adapter copy is pulled from bernstein.adapters.use_cases so the description lives next to the adapter code, not in a parallel doc. When an adapter has no curated entry the first line of its module docstring is used so newcomers still appear with a sensible summary. Tests under tests/unit/cli/test_integrations_list.py cover the default table view, --details, --json, --installed filtering, unknown subcommand handling, the synthetic generic adapter, and the no-em-dash style check on curated copy. * docs(adapters): add integrations index page and README pointer New docs/adapters/index.md lists adapter categories with examples and links to the source-of-truth metadata in src/bernstein/adapters/use_cases.py. The page does not re-list every adapter so it cannot drift; for the full enumeration it points at the CLI. README install section gains a one-liner so newcomers discover bernstein integrations list --installed right after install. * chore(ci): regenerate contract drift allow-lists Auto-applied by contract-drift-autofix.yml on PR #1496. Regenerated via scripts/regen_contract_drift.py. Refs #1273. Source CI run: https://github.com/sipyourdrink-ltd/bernstein/actions/runs/26091497329 * docs(agents-md): sync use_cases.py entry across CLI hint files Resolves AGENTS.md cross-CLI sync drift detected by repo-hygiene. * ci: re-trigger after adding macos-needed label --------- Co-authored-by: auto-heal-fixup <auto-heal-fixup@bernstein.local> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 4773d19 commit 444574e

13 files changed

Lines changed: 794 additions & 1 deletion

File tree

.cursor/rules/module-map.mdc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ alwaysApply: false
132132
| `report.py` | Adapter conformance + capability report |
133133
| `rovo.py` | Atlassian Rovo Dev CLI adapter |
134134
| `skills_injector.py` | Inject per-task Claude Code skills into the worktree before spawn |
135+
| `use_cases.py` | Per-adapter metadata for the ``bernstein integrations list`` command |
135136
| `ci/` | CI system adapters for log parsing and failure extraction |
136137

137138
### `src/bernstein/agents/` — agent catalog & discovery

.goosehints

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ Bernstein is named after Leonard Bernstein, the American conductor and composer.
133133
| `report.py` | Adapter conformance + capability report |
134134
| `rovo.py` | Atlassian Rovo Dev CLI adapter |
135135
| `skills_injector.py` | Inject per-task Claude Code skills into the worktree before spawn |
136+
| `use_cases.py` | Per-adapter metadata for the ``bernstein integrations list`` command |
136137
| `ci/` | CI system adapters for log parsing and failure extraction |
137138

138139
### `src/bernstein/agents/` — agent catalog & discovery

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ Bernstein is named after Leonard Bernstein, the American conductor and composer.
133133
| `report.py` | Adapter conformance + capability report |
134134
| `rovo.py` | Atlassian Rovo Dev CLI adapter |
135135
| `skills_injector.py` | Inject per-task Claude Code skills into the worktree before spawn |
136+
| `use_cases.py` | Per-adapter metadata for the ``bernstein integrations list`` command |
136137
| `ci/` | CI system adapters for log parsing and failure extraction |
137138

138139
### `src/bernstein/agents/` — agent catalog & discovery

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ Bernstein is named after Leonard Bernstein, the American conductor and composer.
133133
| `report.py` | Adapter conformance + capability report |
134134
| `rovo.py` | Atlassian Rovo Dev CLI adapter |
135135
| `skills_injector.py` | Inject per-task Claude Code skills into the worktree before spawn |
136+
| `use_cases.py` | Per-adapter metadata for the ``bernstein integrations list`` command |
136137
| `ci/` | CI system adapters for log parsing and failure extraction |
137138

138139
### `src/bernstein/agents/` — agent catalog & discovery

CONVENTIONS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ Bernstein is named after Leonard Bernstein, the American conductor and composer.
133133
| `report.py` | Adapter conformance + capability report |
134134
| `rovo.py` | Atlassian Rovo Dev CLI adapter |
135135
| `skills_injector.py` | Inject per-task Claude Code skills into the worktree before spawn |
136+
| `use_cases.py` | Per-adapter metadata for the ``bernstein integrations list`` command |
136137
| `ci/` | CI system adapters for log parsing and failure extraction |
137138

138139
### `src/bernstein/agents/` — agent catalog & discovery

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ bernstein init
6666
bernstein run -g "fix the failing test in tests/test_foo.py"
6767
```
6868

69+
See installed integrations: `bernstein integrations list --installed`.
70+
6971
## sponsor
7072

7173
if bernstein routed a model that saved you a claude bill, $25 covers a month of my coffee.

docs/adapters/index.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Integrations index
2+
3+
Bernstein ships ready-made adapters for the CLI coding agents under
4+
`src/bernstein/adapters/`. This page lists every wired-in integration
5+
with a one-line use case so you do not have to grep the source tree.
6+
7+
The same data is available from the CLI:
8+
9+
```bash
10+
bernstein integrations list # one line per adapter
11+
bernstein integrations list --details # per-adapter block with config knob
12+
bernstein integrations list --installed # only adapters whose binary is on $PATH
13+
bernstein integrations list --json # stable JSON for CI dashboards
14+
```
15+
16+
Per-adapter copy lives in
17+
[`src/bernstein/adapters/use_cases.py`](../../src/bernstein/adapters/use_cases.py).
18+
That module is the single source of truth - this page links to it so we
19+
do not maintain two copies of the same list.
20+
21+
## Selecting an adapter
22+
23+
Set the active adapter through the `cli:` knob in `bernstein.yaml`:
24+
25+
```yaml
26+
cli: claude # or any other registry key listed below
27+
```
28+
29+
Use `bernstein adapters check <name>` to verify conformance for a
30+
single adapter, and `bernstein adapters list` for a richer view that
31+
includes source paths and conformance verdicts.
32+
33+
## Categories
34+
35+
The current registry covers four broad categories. Names below match
36+
the registry keys you pass via `cli:`.
37+
38+
### Mainstream coding agents
39+
40+
These are the most exercised adapters in the test matrix.
41+
42+
- `claude` - Anthropic Claude Code CLI.
43+
- `codex` - OpenAI Codex CLI.
44+
- `cursor` - Cursor Agent CLI.
45+
- `aider` - Aider pair-programming CLI.
46+
- `gemini` - Google Gemini CLI.
47+
- `copilot` - GitHub Copilot CLI.
48+
- `goose` - Block Goose.
49+
50+
### Local and offline
51+
52+
For air-gap or BYO-model scenarios.
53+
54+
- `ollama` - drives Aider against an Ollama or OpenAI-compatible server.
55+
- `gptme` - local-first coding agent with shell tools.
56+
- `mock` - test stub, no API keys or network.
57+
- `generic` - wrap any coding agent CLI by command string.
58+
59+
### Specialised adapters
60+
61+
- `iac` - infrastructure-as-code (Terraform / Pulumi) with plan-before-apply.
62+
- `clm` - sovereign LLM gateway over mTLS for regulated deployments.
63+
- `cloudflare` - Cloudflare Agents SDK via wrangler.
64+
- `openai_agents` - in-process OpenAI Agents SDK v2 (requires the
65+
`[openai]` extra).
66+
67+
### Other supported CLIs
68+
69+
See `bernstein integrations list` for the full enumerated set. The
70+
registry currently surfaces ~40 adapters; this page lists categories
71+
rather than re-listing each entry so the index does not drift.
72+
73+
## Adding a new adapter
74+
75+
1. Add a `<name>.py` module under `src/bernstein/adapters/` implementing
76+
`CLIAdapter`.
77+
2. Register the class in `src/bernstein/adapters/registry.py`.
78+
3. Add an entry to `src/bernstein/adapters/use_cases.py` so the new
79+
adapter shows up in `bernstein integrations list` with a meaningful
80+
headline.
81+
4. Cover the adapter with a conformance test under `tests/contract/`.
82+
83+
The contract for new adapters lives in
84+
[ADAPTER_GUIDE.md](./ADAPTER_GUIDE.md).

0 commit comments

Comments
 (0)