From b2c1a213b3fad4582f4b305572038618ab14af7d Mon Sep 17 00:00:00 2001 From: vitya Date: Wed, 20 May 2026 13:35:51 +0300 Subject: [PATCH] =?UTF-8?q?fix(using-yt-tools):=20describe=20per-CLI=20std?= =?UTF-8?q?out=20contract=20[v0.2.1=E2=86=920.2.2]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes finding [using-yt-tools-frames-multiline-stdout]: the previous "Last line каждого CLI's stdout — absolute path артефакта" wording matched yt-transcript / yt-watch reality but quietly misled callers about yt-frames, which emits one ``Wrote: `` line per extracted frame (designed that way per ``yt_tools/frames.py`` docstring so streaming consumers don't have to parse a trailing summary; ``tests/test_cli_smoke.py:81`` enforces the prefix). Chose spec-fix over code-fix: changing yt-frames to bare paths would break the existing piping/scraping contract — bigger surface than the docs typo this finding actually is. SKILL.md now spells out per-CLI stdout shape and notes warnings/errors go to stderr. PATCH (wording clarification, no behavior change). Co-Authored-By: Claude Opus 4.7 (1M context) --- skills/using-yt-tools/SKILL.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/skills/using-yt-tools/SKILL.md b/skills/using-yt-tools/SKILL.md index 7f020da..d60ec9e 100644 --- a/skills/using-yt-tools/SKILL.md +++ b/skills/using-yt-tools/SKILL.md @@ -1,6 +1,6 @@ --- name: using-yt-tools -version: 0.2.1 +version: 0.2.2 description: Two flows for YouTube content. **Iterative-watch** (summary/exploration): transcript with [mm:ss] anchors → pick moments → extract frames. **Targeted-frames** (specific timestamps): extract frames directly, no transcript. Triggers: "что в ролике", "о чём видео", "video summary", "youtube transcript", "покажи кадр на N", или любой youtube.com URL. CLI в `~/projects/.common/lib/yt-tools/`. YouTube-only; для Vimeo/Twitch/local — другие тулзы. --- @@ -58,7 +58,12 @@ CLI entry-points на PATH (из `pip install -e ~/projects/.common/lib/yt-tools 5. Answer the user, citing both transcript paragraph and frame contents ``` -Last line каждого CLI's stdout — absolute path артефакта (CLI designed для single-line EOF output). Не парси текст вокруг, бери конец stdout. +**Stdout contract per CLI** (бери последнюю строку, формат зависит от CLI): + +- `yt-transcript`, `yt-watch` — одна строка на stdout: bare absolute path артефакта (`/transcript.md` или `/watch.md`). +- `yt-frames` — **N строк** формата `Wrote: `, одна на каждый извлечённый кадр. Strip префикс `"Wrote: "` чтобы получить путь. Дизайн осознан: per-line output чтобы caller'ы пайпили / скрейпили без парсинга summary в конце. + +Warnings и errors уходят в stderr (`warning: …`, `error: …`); stdout остаётся машинно-парсимым. ### Flow B — targeted-frames