carlos / todomvc-bakeoff Public

Clone
git clone https://amadan.net/carlos/todomvc-bakeoff

Plain git — no account needed to clone.

Download

Download this file

1#!/usr/bin/env bash
2# Fable scores one app's readability three times, blind to which agent or
3# app it is (only the language is named); the per-field median is kept.
4# builders/run-readability.sh <slug>
5set -euo pipefail
6slug=$1
7repo=$(cd "$(dirname "$0")/.." && pwd)
8cd "$repo"
9language=$(cd harness && go run ./cmd/language "$slug")
10work=$(mktemp -d -p "${TMPDIR:-$HOME/.cache}")
11trap 'rm -rf "$work"' EXIT
12{
13 sed "s/{LANGUAGE}/$language/g" builders/prompts/readability.md
14 echo
15 bakeoff source --slug "$slug" --dir "${APP_DIR:-apps/$slug}" | sed -e "s/todo-$slug/todo-app/g" -e "s|apps/$slug|apps/app|g"
16} > "$work/prompt.md"
17replies=()
18for i in 1 2 3; do
19 claude -p --model claude-fable-5-1 --output-format json --tools "" \
20 --mcp-config '{"mcpServers":{}}' --strict-mcp-config --no-session-persistence \
21 < "$work/prompt.md" > "builders/logs/$slug.readability$i.json"
22 python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["result"])' "builders/logs/$slug.readability$i.json" > "$work/reply$i"
23 replies+=("$work/reply$i")
24done
25bakeoff readability --slug "$slug" --replies "$(IFS=,; echo "${replies[*]}")"
26