fix(using-yt-tools): describe per-CLI stdout contract [v0.2.1→0.2.2]

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: <abs path>`` 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) <noreply@anthropic.com>
This commit is contained in:
2026-05-20 13:35:51 +03:00
parent f11a6b8b6b
commit b2c1a213b3

View File

@@ -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 артефакта (`<abs>/transcript.md` или `<abs>/watch.md`).
- `yt-frames`**N строк** формата `Wrote: <abs path>`, одна на каждый извлечённый кадр. Strip префикс `"Wrote: "` чтобы получить путь. Дизайн осознан: per-line output чтобы caller'ы пайпили / скрейпили без парсинга summary в конце.
Warnings и errors уходят в stderr (`warning: …`, `error: …`); stdout остаётся машинно-парсимым.
### Flow B — targeted-frames