diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c1cac89..f9ed2bb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,3 +16,5 @@ jobs: run: ./scripts/check-doc-pointers.sh - name: The site's numbers match the docs run: ./scripts/check-site-numbers.sh + - name: CLAUDE.md names scripts and pladder-cli commands that exist + run: ./scripts/check-doc-commands.sh diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index 5a9ab1a..c3136fc 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -21,5 +21,43 @@ jobs: run: | # Commands only: a comment may name what not to do. if grep -rnE '^[^#]*(pkill -x Pladder|killall Pladder)' scripts; then exit 1; fi + - name: Every script answers --help and does nothing else + # One that builds, launches or records before reading --help fails + # here: on the 5 s timeout, on a missing say or screencapture, or on + # the files it leaves behind. + run: | + for file in scripts/*; do + if [[ -x "$file" && "$file" != *.sh ]]; then + echo "::error file=$file::$file is executable but not a .sh, so no --help check covers it" + exit 1 + fi + done + count=0 + for script in scripts/*.sh; do + count=$((count + 1)) + if [[ ! -x "$script" ]]; then + echo "::error file=$script::$script is not executable" + exit 1 + fi + for args in "--help" "-h" "x --help"; do + read -r -a argv <<<"$args" + if ! out=$(timeout 5 "$script" "${argv[@]}" 2>&1); then + echo "::error file=$script::$script $args did not exit 0" + echo "$out" + exit 1 + fi + if ! grep -q "^Usage: $script" <<<"$out"; then + echo "::error file=$script::$script $args printed no \"Usage: $script\" line" + echo "$out" + exit 1 + fi + done + done + if [[ -n "$(git status --porcelain --ignored)" ]]; then + echo "::error::a --help run left files behind" + git status --porcelain --ignored + exit 1 + fi + echo "$count scripts answer --help" - name: ShellCheck run: shellcheck scripts/*.sh diff --git a/CLAUDE.md b/CLAUDE.md index c25310e..e2bacaf 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -38,7 +38,8 @@ swift run -c release pladder-cli bench bench/fixtures --engine parakeet-tdt-v3-i swift run -c release pladder-cli bench-coordinator [--polish] [--live] # the coordinator's own share of release-to-paste, stand-ins of fixed latency swift run -c release pladder-cli polish [--model apple|s1-mini|s1-mini-8bit] # one transcript, cold and warm swift run -c release pladder-cli polish-set docs/polish-set.json --model s1-mini-8bit # a polish model over the test set: error rate, exact matches, timings -./scripts/overlay-demo.sh [dir] [--style …] [--speed …] # play every overlay path with stand-ins, record the screen, cut contact sheets +./scripts/overlay-demo.sh [dir] [--style …] [--reduce-motion] # play every overlay path with stand-ins, record the screen, cut contact sheets +./scripts/make-screenshots.sh [dir] [--settings | --settings-scene [--accessibility | --get-started] | --menu] [--managed] # the app's own views as pictures: the README's by default, into docs/images ./scripts/check-site-numbers.sh # the site's figures against docs/BENCHMARKS.md, and no pinned release on it ./scripts/make-site-media.sh # a screen recording of a dictation as the site's MP4, WebM and poster ``` @@ -125,3 +126,46 @@ The developer dictates with a running Pladder all day, often into Claude session - Do not edit `~/Library/Application Support/Pladder/settings.json`; it is the live configuration. - A copy launched for testing gets its own settings file with `PLADDER_SETTINGS_PATH=/tmp//settings.json "$PWD/dist/Pladder.app/Contents/MacOS/Pladder"`, and a different chord from the copy in use, so the two never fire together. Launched as the bare binary so the environment reaches it; its command line still contains `$PWD/dist/Pladder.app`, so the `pkill -f` above stops it. - To test an update, the copy needs a bundle ID of its own (Sparkle's defaults and the grants are per bundle ID), `LSEnvironment` in its Info.plist for `PLADDER_SETTINGS_PATH` (Sparkle relaunches it through LaunchServices, without your shell's environment), a feed on `http://127.0.0.1` and a throwaway key, signed with `appcast.sh` and `SPARKLE_ED_KEY`; never the real key. + +## Verify + +Proof is what you saw in this session: a command's output, a picture, a contact sheet. Every `scripts/*.sh` answers `-h` and `--help` with its usage and does nothing else, so ask it first. The rules in "Working on this Mac while Pladder is in use" hold for every line here. + +| Change | Run | Where it lands | +|---|---|---| +| Any Swift | `swift build`, with no new warning, and `swift test` | the terminal | +| Core logic: the coordinator, a tracker, the settings | a test that fails without the change | the terminal | +| A processor, the dictionary | `swift run -c release pladder-cli