Skip to content

What a proposal does: behaviour before and after - #18

Merged
dtt-github merged 1 commit into
mainfrom
feature/proposal-behaviour
Nov 6, 2026
Merged

dtt-github merged 1 commit into
mainfrom
feature/proposal-behaviour

Conversation

@dtt-github

Copy link
Copy Markdown
Owner

Why

A non-expert reviewing an AI proposal sees a code diff they can't read, plus "all examples pass". Passing examples don't say what else changed. They should approve a behaviour change, not a code diff.

What

  • Proposals open on a behaviour tab instead of the code diff.
  • Compare behaviour runs every example on the base commit and with the proposal's files, in the browser, and compares every output cycle by cycle, including the extra cycles after each example ends. Each difference is put in words (lib/compare.ts):
    • a shift of the same behaviour reads "led now changes 1 cycle earlier";
    • anything else reads "busy at cycle 40 was 1, now 0 (different in 3 cycles)";
    • with no difference at all, it says the change only touches cases the examples don't try.
  • For editors, how well each version is tested: examples passing, coverage, and each state machine's moves added or removed. This comes from POST /agent/{id}/compare (design::quality runs the gate on both trees).

Checks

  • API test: the compare endpoint's shape and member-only access.
  • cargo test --workspace (122), clippy, fmt; web typecheck, lint, build.
  • In the browser, with two test proposals added to the local database (no model call):
    • Counting to N-2 was described cycle by cycle, with the first example going from passes to fails and examples passing 2 → 1.
    • Starting the counter at 1 was described as "led now changes 1 cycle earlier".

🤖 Generated with Claude Code

Agent proposals now open on a behaviour tab instead of the code diff.
Compare behaviour runs every example on the base commit and with the
proposal's files, in the browser, and compares every output cycle by cycle
(the extra cycles after each example included). Each difference is put in
words (lib/compare.ts): a shift of the same behaviour reads "led now
changes 1 cycle earlier", anything else "busy at cycle 40 was 1, now 0
(different in 3 cycles)"; with no difference it says the change only
touches cases the examples don't try.

For editors it also compares how well each version is tested: examples
passing, coverage and each state machine's moves added or removed, from
POST /agent/{id}/compare (design::quality runs the gate on both trees).

Checked in the browser with two test proposals added to the local database
(no model call): counting to N-2 was described cycle by cycle with the
first example going from passes to fails; starting the counter at 1 was
described as the LED changing 1 cycle earlier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dtt-github
dtt-github merged commit e85bff4 into main Nov 6, 2026
2 checks passed
@dtt-github
dtt-github deleted the feature/proposal-behaviour branch November 6, 2026 14:42
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.

1 participant