# Hacker Bob v1.2.0 Release Notes

## Highlights

`v1.2.0` is a minor release that adds the smart-contract testing pipeline (six chain families across EVM, SVM, Move, ink!, and CosmWasm), introduces adapter auto-detection so `hacker-bob install` works without `--adapter`, and reframes the README install flow for AI coding agents.

## Smart-contract testing pipeline (Phase 0–6)

Six chain families are now first-class hunt surfaces, each with its own runner, agent role, and evidence-pack sample type:

| Family | Runner | Sample type |
|---|---|---|
| EVM | `bounty_foundry_run`, `bounty_halmos_run` | `evm_foundry_run` |
| SVM | `bounty_anchor_run` | `svm_anchor_run` |
| Aptos Move | `bounty_aptos_run` | `aptos_move_test` |
| Sui Move | `bounty_sui_run` | `sui_move_test` |
| Substrate ink! | `bounty_substrate_run` | `substrate_ink_test` |
| CosmWasm | `bounty_cosmwasm_run` | `cosmwasm_cw_multi_test` |

Each runner accepts a manifest path and a single test selector, parses framework output into structured pass/fail records, and caps captured stdout to bounded excerpts. Runners use a strict allowlist of CLI flags (e.g., `--features`, `--all-features`, `--no-default-features`, `--locked`, `--quiet`); flags like `--workspace` are rejected to keep the test surface bounded per invocation.

Two new hunter agent roles, `hunter-substrate` and `hunter-cosmwasm`, ship with bug-class catalogs covering ink!- and CosmWasm-specific failure modes (`set_code_hash_unauthorized`, `lazy_storage_layout_drift`, `chain_extension_unauthenticated`, `migrate_msg_open`, `submessage_reply_misuse`, `indexed_map_key_collision`, and others).

Findings normalization rejects EVM-shape addresses on Move families, validates SS58 addresses with proper alphabet/length rules (no checksum, since SS58 lacks a BLAKE2b checksum), and validates bech32 addresses with full BIP-0173 polymod checksum.

The new `evidence-agent` role dispatches by `surface_type`: HTTP findings go through `bounty_http_scan` with the operator's egress profile; SC findings go through the appropriate family runner. Phase gates respect SC surfaces uniformly: HUNT→CHAIN tolerates `partial` + `bypass_attempts`, CHAIN→VERIFY clears via `bounty_write_chain_attempt` per pivot, and VERIFY→GRADE clears via SC-aware evidence packs.

## Adapter auto-detection

`hacker-bob install <project-dir>` no longer requires `--adapter`. When the flag is omitted, Bob picks an adapter using a layered detector:

1. **Prior install metadata** — `.hacker-bob/install.json:installed_adapters[]` from a previous install. Reinstalls preserve the operator's prior choice.
2. **Host environment markers** — `$CLAUDE_PROJECT_DIR` (Claude Code) or `$CODEX_HOME` (Codex). Strongest live signal that an AI agent or operator was invoked from inside a specific host CLI.
3. **Project artifacts** — `.claude/`, `.codex/plugins/`, `.agents/plugins/`, or `.mcp.json` in the install target.
4. **Host CLI on `PATH`** — `claude` or `codex` resolvable.
5. **Default fallback** — Claude.

The chosen adapter and reason are logged to stderr (e.g., `hacker-bob: auto-selected adapter claude (reason: project_dot_claude)`). Pass `--adapter <claude|codex|generic-mcp|all>` to override.

### Behavior changes

- **`install` and `update` (no `--adapter`)**: previously defaulted to `claude` regardless of what was already installed, which meant reinstalling a Codex-only project silently added Claude alongside it, and updates only refreshed Claude. With auto-detection, reinstalls and updates preserve the existing adapter mix from install metadata.
- **`doctor` (no `--adapter`)**: previously ran only Claude checks. Now runs the full check set for every adapter recorded in install metadata.
- **`uninstall` (no `--adapter`)**: previously removed only Claude. Now removes every adapter recorded in install metadata. The default `--dry-run` behavior is unchanged: explicit `--yes` is still required to actually remove files.

If you relied on the old "no flag means Claude only" default, pass `--adapter claude` explicitly to keep the previous behavior.

## Brutalist verifier wired to `@brutalist/mcp`

The brutalist-verifier role now invokes the external [`@brutalist/mcp`](https://www.npmjs.com/package/@brutalist/mcp) server for an adversarial roast pass on every finding, in addition to re-running each PoC. The PoC re-run still drives `disposition` and `severity`; the roast supplements `reasoning` so severity inflation, theoretical impact, and chain hand-waving get caught.

Install configuration changes per adapter:

- **Claude**: `.mcp.json` merge writes `mcpServers.brutalist` alongside `mcpServers.bountyagent`.
- **Codex**: bundled plugin `.mcp.json` (`adapters/codex/hacker-bob/.mcp.json`) registers both servers, so plugin activation brings the brutalist server with it.
- **Generic MCP**: `mergeConfig` writes both entries to the operator's root `.mcp.json`.

The `brutalist` server is invoked as `npx -y @brutalist/mcp@latest`. It's optional: `requiredMcpServers` for the brutalist-verifier agent stays `bountyagent`-only, and the prompt has explicit graceful-fallback wording so the agent continues PoC-only verification when the MCP is missing or errors.

The tools allowlist exposes `mcp__brutalist__roast`, `mcp__brutalist__brutalist_discover`, and `mcp__brutalist__cli_agent_roster`. It deliberately excludes `mcp__brutalist__roast_cli_debate` — the debate orchestrator spawns multiple CLI agents and is too time-expensive for a per-finding verification loop.

A new info-level doctor check (`claude_mcp_brutalist_optional`, `generic_mcp_brutalist_optional`) reports brutalist-server presence. It never errors on absence.

## AI-agent install reframing

The README Quickstart now leads with a `### For AI Coding Agents` subsection that:

- Treats a pasted repository URL as an install request and defaults to `$PWD` rather than asking for a target path.
- Documents adapter auto-selection so AI agents understand what gets picked and how to override it.
- Provides a per-adapter verification table (Claude: `claude mcp list` shows `bountyagent`; Codex: `~/.codex/skills/bob-hunt/SKILL.md` exists; generic-mcp: `.mcp.json` contains `mcpServers.bountyagent` pointing at this project's `mcp/server.js`).
- Tells agents not to install into the Hacker Bob source tree.
- Explains that `bountyagent` is the expected MCP server namespace, not a stale skill name to "fix."

A new `## MCP Troubleshooting` section documents five concrete failure modes:

- `Cannot find module './tools/index.js'` (stale install).
- `bountyagent` missing from `claude mcp list` (Claude wiring).
- `$bob-hunt` not resolving in Codex (Codex skills/plugin wiring).
- `.mcp.json` missing `mcpServers.bountyagent` (generic-mcp wiring).
- `bountyagent` looks like a stale skill name (educational).

Each failure mode includes a concrete diagnostic command and recovery flow.

## Install

```bash
npx -y hacker-bob@1.2.0 install /path/to/your/project
```

After installing, fully restart your host CLI (Claude Code or Codex) in that project, then run `/bob-hunt target.com` (Claude) or `$bob-hunt target.com` (Codex).

## Verification

- `npm test` passes (479 tests across 9 suites, including 14 new adapter-detection unit tests and 7 new CLI integration tests).
- `npm run release:check` passes.
- Manual smoke installs across `--adapter claude`, `--adapter codex`, `--adapter generic-mcp`, and `--adapter all` work with the documented verification steps.
