Skip to content

AI Proposer

Ryan Cole edited this page Nov 14, 2026 · 1 revision

For functions that matching leaves with no candidate, pbeta can ask Claude. The model is a proposer, never a judge: every answer is verified like any other candidate and only ever queued for review. It's off unless you opt in.

Setup

It runs through the Claude Code CLI on your Claude subscription. Install Claude Code and sign in (claude, then /login). Point --claude (or PBETA_CLAUDE) at the CLI if it isn't claude on your PATH.

Use

# Every function matching left unmatched; proposals into the review queue
pbeta propose --old old.json --new new.json --store store.json --allow-remote

# Only for hooks that came out with no candidate at all
pbeta repair --old old.json --new new.json --hooks hooks.toml --store store.json --propose --allow-remote
Option Meaning
--allow-remote Required. Function features, strings included, leave this machine.
--replay Only use answers already in the log; never call the model.
--log Every prompt and reply is appended here (default .pbeta/ai-log.jsonl).
--model, --effort Model id (default claude-opus-5-5) and effort.
--rva, --limit Ask about only these old functions, or at most this many (propose).
--shortlist Candidates shown per question (default 5).

What's sent

Features as JSON, not code: size, blocks, register arguments, top mnemonic counts, up to 16 strings (each clipped to 120 characters), constants, imports and matched neighbours, for the old function and its closest unmatched new functions. The model answers {choice, confidence, rationale}, and none is allowed. The reply is parsed into a strict schema and never executed: binaries can contain attacker-controlled strings.

How well it does

On Lua and zstd (/O2 and /Od): 75 of 77 proposals correct, and no wrong proposal passed verification. Details in docs/design.md §8.

Clone this wiki locally