commit fb52692c95b89d3dae36a127b419c9041480ba41
parent a21f6bccf3222c4482649e08df251f6ecd637d1f
Author: andrewlaack-collab <andrew.laack@imbue.com>
Date: Thu, 5 Feb 2026 22:00:39 +0000
Black, debugging, and opencode support (#18)
* Black, opencode export improvements, and better messaging
* Black
* Moved black
Diffstat:
5 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
@@ -31,7 +31,7 @@ Vet ships as an [agent skill](https://agentskills.io) that coding agents like [O
### Install the skill globally
```bash
-for dir in ~/.agents ~/.claude ~/.codex; do
+for dir in ~/.agents ~/.opencode ~/.claude ~/.codex; do
mkdir -p "$dir/skills/vet/scripts"
curl -fsSL https://raw.githubusercontent.com/imbue-ai/vet/main/skills/vet/SKILL.md \
-o "$dir/skills/vet/SKILL.md"
@@ -44,17 +44,17 @@ for dir in ~/.agents ~/.claude ~/.codex; do
done
```
-This places the skill in `~/.agents/skills/vet/`, `~/.claude/skills/vet/`, and `~/.codex/skills/vet/`, so it is discovered by OpenCode, Claude Code, and Codex.
+This places the skill in `~/.agents/skills/vet/`, `~/.opencode/skills/vet/`, `~/.claude/skills/vet/`, and `~/.codex/skills/vet/`, so it is discovered by OpenCode, Claude Code, and Codex.
### Install per-project
To have agents use vet automatically in a specific repo, copy the skill into the project:
```bash
-for dir in .agents .claude .codex; do
+for dir in .agents .opencode .claude .codex; do
cp -r /path/to/vet/skills/vet "$dir/skills/vet"
done
-git add .agents/skills/vet .claude/skills/vet .codex/skills/vet && \
+git add .agents/skills/vet .opencode/skills/vet .claude/skills/vet .codex/skills/vet && \
git commit -m "Add vet agent skill"
```
diff --git a/vet/api.py b/vet/api.py
@@ -87,6 +87,12 @@ def get_issues_with_raw_responses(
is_custom_model=lm_config.is_custom_model(),
)
+ if conversation_history:
+ logger.debug(
+ "Passing {} conversation history messages to identifier inputs",
+ len(conversation_history),
+ )
+
identifier_inputs = IdentifierInputs(
maybe_diff=diff_no_binary or None,
maybe_goal=goal,
diff --git a/vet/cli/main.py b/vet/cli/main.py
@@ -301,13 +301,20 @@ def configure_logging(verbose: bool, quiet: bool) -> None:
def load_conversation_from_command(command: str, cwd: Path) -> tuple:
+ logger.debug("Running history loader command: {}", command)
result = subprocess.run(command, shell=True, capture_output=True, text=True, cwd=cwd)
if result.returncode != 0:
logger.warning(f"History loader command failed with exit code {result.returncode}: {result.stderr}")
return ()
if not result.stdout.strip():
+ logger.debug("History loader command returned empty output, no conversation history loaded")
return ()
- return parse_conversation_history(result.stdout)
+ messages = parse_conversation_history(result.stdout)
+ logger.debug(
+ "Loaded {} conversation history messages from history loader command",
+ len(messages),
+ )
+ return messages
def apply_config_preset(args: argparse.Namespace, preset: CliConfigPreset) -> argparse.Namespace:
@@ -414,6 +421,8 @@ def main(argv: list[str] | None = None) -> int:
conversation_history = None
if args.history_loader is not None:
conversation_history = load_conversation_from_command(args.history_loader, repo_path)
+ else:
+ logger.debug("No history loader provided, skipping conversation history loading")
extra_context = None
if args.extra_context:
diff --git a/vet/cli/models.py b/vet/cli/models.py
@@ -9,7 +9,7 @@ from vet.cli.config.loader import get_models_by_provider_from_config
from vet.cli.config.loader import get_user_defined_model_ids
from vet.cli.config.schema import ModelsConfig
-DEFAULT_MODEL_ID = AnthropicModelName.CLAUDE_4_6_OPUS.value
+DEFAULT_MODEL_ID = AnthropicModelName.CLAUDE_4_5_SONNET_2025_09_29.value
def get_builtin_model_ids() -> set[str]:
diff --git a/vet/formatting_test.py b/vet/formatting_test.py
@@ -0,0 +1,14 @@
+import subprocess
+from pathlib import Path
+
+
+def test_black_formatting():
+ """Ensure all Python files are formatted with black."""
+ repo_root = Path(__file__).resolve().parent.parent
+ result = subprocess.run(
+ ["black", "--check", "."],
+ cwd=repo_root,
+ capture_output=True,
+ text=True,
+ )
+ assert result.returncode == 0, f"black found formatting issues:\n{result.stderr}{result.stdout}"