본문으로 건너뛰기
cccskills
무료GitHub에 공개

verify-gent

Launch gent (this repo's TUI agent harness) on the scripted model in a scratch home, check the run is worth driving, drive the real TUI and `gent ctl` as a user does from a feature map, and keep the proof. Use to check a change in the real TUI, to confirm a turn, a slash command, a pane, a picker or a ctl call works, or to show the owner it works. No paid model call, no owner data.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(18)

  • SKILL.md10.5 KB
  • drives/asks.json826 B
  • drives/commands.json1.4 KB
  • drives/model-and-effort-routes.json1.7 KB
  • drives/model-and-effort.json1.4 KB
  • drives/sessions-routes.json1.0 KB
  • drives/sessions.json1.1 KB
  • drives/shell-mode.json722 B
  • drives/turn-prompt-flag.json356 B
  • drives/turn-resume.json446 B
  • drives/turn.json1.3 KB
  • features/asks.md2.3 KB
  • features/commands.md3.0 KB
  • features/model-and-effort.md4.3 KB
  • features/README.md3.1 KB
  • features/sessions.md3.7 KB
  • features/shell-mode.md1.8 KB
  • features/turn.md4.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Verify gent

One run is one scratch directory: a seeded home, a source server of this checkout on the scripted model, and a gent wrapper that reaches only that server. A drive opens the real TUI on a pty (zigpty and a headless xterm, no herdr), sends keys, waits for text and saves each screen. gent ctl reads and drives the same session from a shell.

Run every command from the checkout under test. Use bun run --silent, so stdout holds only the command's JSON.

Launch

RUN="$TMPDIR/verify/<name>"            # a new directory, outside every checkout
bun run --silent verify:launch --dir "$RUN"

It prints one Launched line: dir, work, gent, url, build, supervisorPid, serverPid, ms (about 1.3 s on the laptop, measured). Paths are the real paths (/private/tmp/…, not /tmp/…). It refuses a directory that is not empty or that is inside the checkout under any name, a symlink included. Until the server answers, launch owns the supervisor: ctrl+c, a kill or a failure of launch stops the supervisor and its server. What it seeds:

  • $RUN/home: HOME, with .gent/config.json naming anthropic/claude-sonnet-5.
  • $RUN/data: GENT_DATA_DIR. $RUN/auth: fake provider keys (GENT_AUTH_DIRECTORY). $RUN/gh: an empty gh config. $RUN/cache: the source transform cache (XDG_CACHE_HOME).
  • $RUN/work: the workspace. A drive runs there unless its script names a cwd.
  • $RUN/bin/gent: runs this checkout's apps/tui/src/main.tsx with the run's environment and nothing of the caller's.
  • $RUN/pids.json: the receipt stop reads, written as each process starts. $RUN/run.json: the record, written once the server answers.
  • $RUN/server.log, $RUN/serve.log: the server and supervisor output. $RUN/verify.log: the whole cause of a helper defect.

The server is gent server start --mock: the scripted model. A message that holds a debug phrase plays a scenario (DEBUG_SCENARIOS in packages/core/src/runtime/provider.ts): debug tools (six tool steps, the last fails), debug ask (a background question, then a 20 s bash step), debug think (a reasoning heading, one bash step, the answer Both chrome paths draw once.), debug threads, debug delegate, debug handoff, debug usage limit. Any other message gets gent debug response. Latest user message: ….

Ready means usable: the record exists and the lock's server answers with the recorded PID. A turn needs no warm-up.

Doctor

bun run --silent verify:doctor --dir "$RUN"

Read-only. It prints Healthy with every check and timingsMeaningful, or fails with DoctorFailed naming the first failed check:

  • record: run.json parses.
  • supervisor: the recorded supervisor PID is alive and runs verify.ts serve.
  • server: the data directory's lock names the recorded server PID, and its identity route answers.
  • build: the server's build is src-<short HEAD> of this checkout; uncommitted files are counted in the detail.
  • client: a client lists sessions within 10 s.
  • scratch: HOME, GENT_DATA_DIR, GENT_AUTH_DIRECTORY and XDG_CACHE_HOME resolve under $RUN.
  • log: the logs under $RUN/data/logs hold no Error or Fatal line.
  • load: the load average against the core count. Above it, timingsMeaningful is false: claim no timing.

Run it before the first drive, and again after any surprising result.

Drive

A drive is a JSON script for verify:drive, which runs it on the run's TUI:

bun run --silent verify:drive --dir "$RUN" --script <script.json> --out "$EVIDENCE/<feature>" 2> "$EVIDENCE/<feature>.log"
  • command is the argv, and its program is gent: the run's wrapper. ["gent"] opens a new session, ["gent", "resume"] the last one, ["gent", "-p", "<prompt>"] sends a first prompt. Another program is refused.
  • Steps: ["send", text], ["keys", name] (enter, esc, tab, up, down, left, backspace, ctrl+c, ctrl+p …, the keys table in packages/e2e/src/pty-fixture.ts), ["waitFor", regex, ms], ["settle", ms] (the screen is quiet that long), ["wait", ms], ["resize", cols, rows], ["cap", name], ["capAll", name] (with scrollback), ["sh", command, ms] (30 s unless the step names its ms).
  • The script is checked before anything runs. A waitFor regex that does not compile, a capture name that is not one file name (../x, a/b), a cwd outside $RUN (symlinks resolved), or an env that sets a variable of the run (HOME, GENT_DATA_DIR, GENT_AUTH_DIRECTORY, XDG_CACHE_HOME, PATH, EVIDENCE …) fails it with VerifyFailed (step: "script"). An --out inside the checkout under any name is refused (step: "out").
  • sh runs in the workspace with gent on PATH as the run's wrapper and $EVIDENCE set to --out. gent ctl there finds the run's server through its data directory. Each sh step runs in a process group of its own; the step's end stops the group, so a command it left in the background does not outlive it.
  • Each step prints one line on stderr: ok|miss|fail <step> <ms>ms, then the file a capture saved, or why the step failed. --print adds each capture's screen after its line. Stdout holds only the result.
  • It prints Driven (steps, end, captures, recording). It fails with DriveFailed (problems, one line each; steps; end) after the script ran to its end when a waitFor never matched, an sh step exited non-zero or outlived its limit, or the program exited by itself with another code than the script's exit (0 when it names none). A program still running when the steps end is stopped by the drive (end: Stopped) and passes, unless the script names an exit.
  • Reach a state by keys and slash commands. gent ctl send is a second client, a user path of its own; never a setter that skips the TUI.

Feature recipes, with a shipped script each: features/README.md.

gent ctl (full surface in apps/tui/docs/cli.md): send, events, wait, snapshot, status, request. Outside a drive, run it as $RUN/bin/gent ctl … --cwd $RUN/work. Exit codes: 0 ok, 1 failed, 2 usage (a flag the parser refuses too), 3 no server, 4 not found, 124 wait timed out. Every failure is one JSON line on stderr. status --run <id> prints a machine run's view (View), the machines extension's projection of its run-status request. A request reply is {"_tag":"Value","value":…}, or {"_tag":"Void"} for a request with no output (/goal). send --new --request-id <id> is safe to retry: the same id makes one session and one message.

Evidence

The caller names the evidence directory, outside every checkout (verify:drive refuses one inside). One subdirectory per feature. What it holds:

  • each cap as <name>.txt: a header (# <name> <cols>x<rows> buffer=… cursor=… t=<ms>), then numbered rows;
  • drive.cast: the whole drive as an asciicast v2 recording, on by default (--no-record turns it off). Before it prints Driven, the drive reads it back as a player does: a version 2 header at the script's colsxrows, events in time order, a length above zero. Driven.recording names the file, its seconds and events. Any asciicast v2 player plays it (asciinema play, not installed on the laptop);
  • the files the script's sh steps write: gent ctl JSON (events, snapshot, status, a request reply) and workspace files;
  • the drive's own output: the Driven or DriveFailed line, and the step lines on stderr (keep them: 2> "$EVIDENCE/<feature>.log").

Proof rules:

  • A write is proved by a second view: a gent ctl read, a gent resume, or a file in $RUN/work.
  • A flaky step is reported as n/n trials, with the doctor's load line.
  • A failure is rerun on a second run of the base commit (a fresh $RUN), to tell new from pre-existing.
  • An entry point the run cannot reach is reported with its unmet precondition, never passed through another path.

Cleanup

bun run --silent verify:stop --dir "$RUN" --remove

It reads the receipt $RUN/pids.json, so a run whose launch died before its server answered stops too. It sends SIGTERM to the recorded supervisor (only when that PID still runs verify.ts serve), waits up to 10 s, then SIGKILLs a recorded PID that still runs the run's command. It prints Stopped (supervisorPid, serverPid, removed) only when ps shows no recorded PID left. When ps cannot run, or a PID survives the SIGKILL, it fails with StopFailed (alive) and keeps the receipt and the directory: run it again. Never kill by name: the owner's gent and other runs match. Evidence stays where --out put it.

Helpers

CommandPrints
bun run --silent verify:launch --dir <run> [--port 0] [--timeout 90]Launched
bun run --silent verify:doctor --dir <run>Healthy, else DoctorFailed
bun run --silent verify:drive --dir <run> --script <file> --out <dir> [--print] [--no-record]Driven, else DriveFailed
bun run --silent verify:stop --dir <run> [--remove]Stopped, else StopFailed

All four are packages/e2e/src/verify.ts, tested by packages/e2e/tests/verify.test.ts (in bun run test:e2e). A helper failure is one tagged JSON line on stderr and exit 1: VerifyFailed (step, message), DoctorFailed, DriveFailed or StopFailed. A flag the parser refuses is VerifyUsage and exit 2. A defect is VerifyFailed with step: "defect"; its whole cause is in $RUN/verify.log. bun packages/e2e/src/drive.ts <script> [--no-record] [--print] runs a script with no run around it, when a check needs no server.

Hosts

Proved on the laptop (macOS) only. The Workbox (bite-cristian) is unproven: the ps and git checks and the zigpty pty are untested there. Several runs can live side by side: each run has its own port (--port 0 picks a free one) and its own data directory. Never drive the owner's gent: its lock is under ~/.gent, which no run reads.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Write, test, turn on or off, add and remove gent extensions while gent runs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

cevr/gent52026년 10월 21일 업데이트

Foundational principles for architectural decisions and code review.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

cevr/gent52026년 10월 21일 업데이트

Fetch and inspect external Git repositories and npm packages with their native command-line tools.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

cevr/gent52026년 10월 21일 업데이트

cevr의 스킬 모두 보기

이 스킬의 문제 신고