Logo von Testing Tui Runtime

Testing Tui Runtime

CommunityBeliebt
subsy
testing-tui-runtime

How to drive the ralph-tui TUI (`run`, watch mode, pause/quit paths) end-to-end in a real terminal with a fake agent and a scratch beads tracker, without AI credentials.

Übersicht

Herausgebersubsy
Repositoryralph-tui
Skill-Nametesting-tui-runtime
Sterne
2.5K
Forks
242
Mitgelieferte Dateien
Nur Anweisungen
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von subsy auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Testing Tui Runtime in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/subsy/ralph-tui/tree/main/.agents/skills/testing-tui-runtime
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/subsy/ralph-tui.git /tmp/ralph-tui
mkdir -p .claude/skills
cp -r /tmp/ralph-tui/.agents/skills/testing-tui-runtime .claude/skills/testing-tui-runtime
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Testing Tui Runtime in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Testing Tui Runtime automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Testing Tui Runtime nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Runtime/E2E testing of the ralph-tui TUI

Use this when a change must be proven in the real TUI (watch mode, engine status labels, pause/resume, shutdown/quit paths) rather than with unit tests.

Build & run

bash
cd /path/to/ralph-tui && bun run build      # produces dist/cli.js

Run the built CLI (not bun run dev) so behaviour matches shipped code:

bash
bun /path/to/ralph-tui/dist/cli.js run [flags]

Scratch tracker (never touch the repo's own .beads)

Create a throwaway project dir with its own beads store and drive scenarios with bd:

bash
export RALPH_TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/ralph-tui-run.XXXXXX")" && cd "$RALPH_TEST_DIR"
bd init            # or `bd create ...` which bootstraps the store
bd create "Watch mode epic" --type epic -p 1          # note the epic id bd prints
bd create "Alpha task" --type task -p 2 --parent <epic-id>

A fresh dir per run, not a fixed one: a reused dir carries over .beads tasks, the .ralph-tui session file, locks and guards — exactly the things most scenarios here assert on, so a Recovered stale session banner or a stale-lock prompt from the previous run reads as a finding of the build under test. The unique dir also gives the run a unique epic id, which is how you address its process (see the signal trap below).

Gotchas:

  • bd commands must be run with the scratch dir as the working directory, otherwise you get "no beads database found".
  • With --tracker beads, the TUI requires --epic <id>; without it the TUI shows "No epics found" and interactive epic selection blocks automation.
  • br (beads-rust) may not be installed even though AGENTS.md references it; bd works.

Fake agents (no AI credentials needed)

Put plugins in ~/.config/ralph-tui/plugins/agents/:

  • echo.ts — returns echo-agent: local fake response\n<promise>COMPLETE</promise> instantly.
  • slowecho.ts — same but sleeps ~25s in interruptible 500 ms chunks. Essential for testing quit/pause mid-iteration; an instant agent gives you no window to interrupt.

Select with --agent echo / --agent slowecho.

Making timing visible on screen

Wrap the CLI so quit latency is provable in the recording:

bash
#!/bin/bash
cd "${RALPH_TEST_DIR:?export RALPH_TEST_DIR to the scratch dir first}"
export PATH="$PATH:$HOME/.local/bin"
echo "START $(date +%H:%M:%S.%3N)  args: $*"
bun /path/to/ralph-tui/dist/cli.js run "$@"
echo "=== PROCESS EXITED code=$? at $(date +%H:%M:%S.%3N) ==="
exec bash

Typical invocation: ./runwatch.sh --watch --poll 60 --agent echo --tracker beads --epic <epic-id> --no-setup --force

Use a long --poll (60s) to make a stalled pause/quit obvious, and a short one (10s) when you want auto-pickup to happen quickly.

TUI keys

s start · p pause/resume · q → quit dialog → y · d dashboard · r refresh. Header status labels: Waiting (watch idle), Selecting, Executing, Paused, Complete. Dashboard shows Waiting for new tasks when watch-idle.

Known traps

  • Interrupt (Ctrl+C) path: on builds that include the #431 fix (src/tui/utils/keyboard-shortcuts.ts
    • onInterruptRequest in RunApp.tsx + exitSignals: ['SIGQUIT','SIGABRT'] in run.tsx), keyboard Ctrl+C and external kill -INT <pid> both render the ⚠ Interrupt Ralph? dialog with the display intact; n/Esc cancel, y exits code 0 in ~2s and resets the active task to open, and a second Ctrl+C within ~1s force-quits via process.exit(1) (wrapper code=1, terminal left un-repainted; on builds whose exit handler calls releaseLockSync the force quit no longer leaves a lock file behind, on older ones it does). On older builds Ctrl+C is a complete no-op and kill -INT blanks the display and hangs, so always confirm which build you are on before blaming a change.
  • Ctrl+Shift+C is indistinguishable from Ctrl+C in most terminals: konsole sends byte 0x03 for both (verify with stty -isig; cat -v — Ctrl+Shift+C prints ^C, Alt+C prints ^[c), so the "copy" shortcut opens the interrupt dialog whenever the terminal does not consume it itself (konsole only consumes it when a konsole-level text selection exists). Alt+C is safely distinct. Clipboard contents cannot be verified on a box without xclip/xsel/wl-paste (that is what src/utils/clipboard.ts shells out to on Linux) — record the clipboard write as untested.
  • Early-startup signals need timing, and are quirky: the app's SIGINT/SIGTERM handlers are not installed for roughly the first ~0.7s. Drive it with ( sleep 0.5; kill -INT "$(pgrep -f "cli\.js run.*--epic $EPIC_ID")" ) & ./runwatch.sh ..., where $EPIC_ID is this run's epic — check the pattern matches exactly one pid (pgrep -cf ...) before signalling, and note the wrapper script is a different process from the CLI it launches, so signal the pid you matched rather than the wrapper. Do not use pkill -f 'dist/cli.js run': it hits every ralph run on the box, including a parallel test or a main worktree build you are comparing against, and mutates their session and task state. Historic behaviour (before the #434 fix in src/session/lock.ts): SIGINT in that window exited 130 but left a stale lock, and SIGTERM was delivered but ignored (the TUI mounted and kept running). On builds where registerLockCleanupHandlers owns the startup signals (guarded by process.listenerCount(signal) > 1), expect code=143 for SIGTERM / code=130 for SIGINT at every delay in the window, with .ralph-tui/ralph.lock removed; a signal landing before acquireLockWithPrompt (~0.05s) uses default disposition but cannot leave a lock. Always sweep several delays (0.05/0.2/0.3/0.4/0.5/0.7s), log that the signal was actually sent, and check ls .ralph-tui/ralph.lock plus the next launch's banner each time. Two signals in quick succession inside the window should still yield a single clean 130/143, never code=1.
  • Recovered stale session is not the same thing as Stale lock detected: the lock file can be correctly removed while .ralph-tui/session.json keeps status: "running", in which case every next launch prints ⚠ Recovered stale session / Session status set to "interrupted" (resumable) — even after a graceful q/y exit (code=0). Check jq .status .ralph-tui/session.json and session-meta.json before attributing that banner to a lock/signal change; it may be an independent session-persistence bug.
  • In TUI mode the process does not exit by itself when all tasks are done in non-watch mode; it parks on Complete until you quit. To prove "exits when work runs out", use headless mode: --no-tui (alias --headless) exits with code 0 and prints a run summary. Headless watch mode logs [watch] All tasks complete — polling every Ns and stays alive.
  • Killed sessions may leave a stale lock (older builds; fixed once the lock layer owns startup signals and the exit handler releases synchronously): the next launch prompts "Remove the stale lock and continue? (Y/n)" before the TUI starts. Answer y first; keys you send too early (e.g. s) land in that prompt. Prefer graceful q/y exits to avoid this.
  • After creating a task externally, allow up to one full poll interval plus a few seconds before concluding auto-pickup failed.
  • Lock guard file (.ralph-tui/ralph.lock.guard) and lockId: on builds that serialize lock mutations, .ralph-tui/ralph.lock carries a lockId nonce and every create/stale-clean/ --force/release goes through a guard file created with O_EXCL. Useful observer helper: print the lock's pid/lockId, whether the guard exists (and its contents), and pgreped ralph pids, and sample it before/after every scenario. The guard should never be observed present while a run merely executes — only during a mutation. Things worth planting by hand: an empty or not-json guard (should be reclaimed as malformed after ~250ms and the run starts normally), a guard naming a dead pid (reclaimed), and a guard naming a live pid (respected: acquire fails after ~2s with Timed out waiting for the session lock (another ralph-tui process may be starting or exiting)). On such builds a guard held past the sync budget at exit time is expected to leave the lock behind (later recovered as stale) rather than unlink it — a lock left behind there is a pass; a hang, a multi-second stall, or a live process's lock disappearing is the bug. Make sure the "live pid" in a planted guard is really alive (kill -0); a pid that has already exited silently converts the test into the dead-pid case.
  • run --resume may fail where standalone resume works: run.tsx acquires the session lock before calling resumeSession, which acquires again and refuses because a lock exists — observed as Resuming previous session... / Failed to resume session with exit 1, while ralph-tui resume on the same interrupted session starts fine. Reproduced on main too, so treat it as pre-existing unless the build under test claims to fix it; always cross-check against a git worktree build of main before calling it a regression.
  • Watch for an orphaned run with no lock file: observed once — the TUI painted nothing at all yet the engine kept executing iterations and .ralph-tui/ralph.lock was absent. That is the signature of an uncaught exception handler that releases the lock without exiting. It did not reproduce in follow-up attempts; if you hit a blank TUI, capture stdout/stderr by wrapping the run in script -q -c "./runwatch.sh ..." /tmp/run.log (this preserves the TTY, unlike a pipe) before killing it. Note runwatch.sh ends with exec bash, so a script-wrapped run leaves you in an inner shell — type exit to continue a scripted loop.

Devin Secrets Needed

None — the fake agent plugins and the local bd store avoid all external credentials.

Häufig gestellte Fragen

Was macht der KI-Skill Testing Tui Runtime?

How to drive the ralph-tui TUI (`run`, watch mode, pause/quit paths) end-to-end in a real terminal with a fake agent and a scratch beads tracker, without AI credentials.

Warum Testing Tui Runtime in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Testing Tui Runtime besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Testing Tui Runtime in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/subsy/ralph-tui/tree/main/.agents/skills/testing-tui-runtime ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Testing Tui Runtime nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Testing Tui Runtime verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Testing Tui Runtime damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Testing Tui Runtime kostenlos?

Ja. Der Skill wird von subsy auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇