diff --git a/.changes/knowledge/chore-prompt-audit-knowledge-to-pixel-art-0d5d79e3.md b/.changes/knowledge/chore-prompt-audit-knowledge-to-pixel-art-0d5d79e3.md new file mode 100644 index 00000000000..e3cebb11cda --- /dev/null +++ b/.changes/knowledge/chore-prompt-audit-knowledge-to-pixel-art-0d5d79e3.md @@ -0,0 +1,12 @@ +--- +bump: patch +--- + +### Changed + +- Skill instructions for course-digest, distill, docpage-digest, map-corpus and video-digest use + plain emphasis instead of capital letters, and drop notes about how a rule came about. +- Corrected facts the instructions had wrong: the screenshot file names and folders the + extractor writes, the referer header it sends, where key-frame images live, and the claim-inventory + phase number. Version-dependent tool facts (Chrome remote debugging, ffmpeg `-ss` and its + `whisper` filter, the plugin variables) now point at their upstream pages. diff --git a/.changes/machine-health/chore-prompt-audit-knowledge-to-pixel-art-41a799d7.md b/.changes/machine-health/chore-prompt-audit-knowledge-to-pixel-art-41a799d7.md new file mode 100644 index 00000000000..e7a01e59f1e --- /dev/null +++ b/.changes/machine-health/chore-prompt-audit-knowledge-to-pixel-art-41a799d7.md @@ -0,0 +1,11 @@ +--- +bump: patch +--- + +### Changed + +- The audit skill says the orchestrator writes the report, `latest.json` and the history line, + and the session writes none of them. +- The severity rubric and remediation policy now match the checks: tamper protection off is WARN, + a detection is CRIT only with no recorded remediation, Clear-TempFiles triggers on the + `disk-space` check, and a first run is a dry run. Capital-letter emphasis is lower-cased. diff --git a/.changes/markdown-format/chore-prompt-audit-knowledge-to-pixel-art-04e5835a.md b/.changes/markdown-format/chore-prompt-audit-knowledge-to-pixel-art-04e5835a.md new file mode 100644 index 00000000000..a26596ba966 --- /dev/null +++ b/.changes/markdown-format/chore-prompt-audit-knowledge-to-pixel-art-04e5835a.md @@ -0,0 +1,7 @@ +--- +bump: patch +--- + +### Changed + +- The setup skill uses plain emphasis instead of capital letters. diff --git a/.changes/mcp-tools/chore-prompt-audit-knowledge-to-pixel-art-b7a7164c.md b/.changes/mcp-tools/chore-prompt-audit-knowledge-to-pixel-art-b7a7164c.md new file mode 100644 index 00000000000..3310df9459b --- /dev/null +++ b/.changes/mcp-tools/chore-prompt-audit-knowledge-to-pixel-art-b7a7164c.md @@ -0,0 +1,9 @@ +--- +bump: patch +--- + +### Changed + +- The audit and audit-posture skills use plain emphasis instead of capital letters. +- Three eval grader criteria drop a trailing note that repeated the criterion; what each grader + checks is unchanged. diff --git a/.changes/miro/chore-prompt-audit-knowledge-to-pixel-art-3f99932a.md b/.changes/miro/chore-prompt-audit-knowledge-to-pixel-art-3f99932a.md new file mode 100644 index 00000000000..5e67fa2883a --- /dev/null +++ b/.changes/miro/chore-prompt-audit-knowledge-to-pixel-art-3f99932a.md @@ -0,0 +1,11 @@ +--- +bump: patch +--- + +### Changed + +- `miro_bulk_create_sticky_notes` says a mid-batch failure returns an error without the IDs of + notes already placed, so check the board before retrying. `miro_attach_tag` states what it + returns and that it errors on an item type that takes no tags. +- The setup skill names its one API gate: a request runs only when `verify-api` was passed, and + only the read-only call. diff --git a/.changes/multi-agent/chore-prompt-audit-knowledge-to-pixel-art-c3122072.md b/.changes/multi-agent/chore-prompt-audit-knowledge-to-pixel-art-c3122072.md new file mode 100644 index 00000000000..d8dc89973d0 --- /dev/null +++ b/.changes/multi-agent/chore-prompt-audit-knowledge-to-pixel-art-c3122072.md @@ -0,0 +1,11 @@ +--- +bump: patch +--- + +### Changed + +- The config reference points at the upstream pages for subagent `model` values and the effort + cap's scopes instead of restating them. Skill headings and the drift-audit skeptic prompt use + plain emphasis instead of capital letters. +- The `su-apply-guard-off-confirms` eval no longer expects a local-layer offer, which its own + description says cannot arise at a home root. diff --git a/.changes/mutation-testing/chore-prompt-audit-knowledge-to-pixel-art-3282775a.md b/.changes/mutation-testing/chore-prompt-audit-knowledge-to-pixel-art-3282775a.md new file mode 100644 index 00000000000..ec09a29cf73 --- /dev/null +++ b/.changes/mutation-testing/chore-prompt-audit-knowledge-to-pixel-art-3282775a.md @@ -0,0 +1,9 @@ +--- +bump: patch +--- + +### Changed + +- The audit skill and its context files use plain emphasis instead of capital letters and drop + design-history asides. The principles references name the marketplace repository as the home + of the `lib/hook-utils.test.sh` worked example. diff --git a/.changes/naming/chore-prompt-audit-knowledge-to-pixel-art-f9e6d92b.md b/.changes/naming/chore-prompt-audit-knowledge-to-pixel-art-f9e6d92b.md new file mode 100644 index 00000000000..a48612500c1 --- /dev/null +++ b/.changes/naming/chore-prompt-audit-knowledge-to-pixel-art-f9e6d92b.md @@ -0,0 +1,8 @@ +--- +bump: patch +--- + +### Changed + +- The name-it-better skill and its sources file, description included, use plain emphasis + instead of capital letters. diff --git a/.changes/overengineering/chore-prompt-audit-knowledge-to-pixel-art-88f9786f.md b/.changes/overengineering/chore-prompt-audit-knowledge-to-pixel-art-88f9786f.md new file mode 100644 index 00000000000..7c1d7c5dd81 --- /dev/null +++ b/.changes/overengineering/chore-prompt-audit-knowledge-to-pixel-art-88f9786f.md @@ -0,0 +1,8 @@ +--- +bump: patch +--- + +### Changed + +- The audit and delta skills and their context files use plain emphasis instead of capital + letters, and the scrutiny method drops a history aside. diff --git a/.changes/performance/chore-prompt-audit-knowledge-to-pixel-art-8643d2e4.md b/.changes/performance/chore-prompt-audit-knowledge-to-pixel-art-8643d2e4.md new file mode 100644 index 00000000000..a8390d229a5 --- /dev/null +++ b/.changes/performance/chore-prompt-audit-knowledge-to-pixel-art-8643d2e4.md @@ -0,0 +1,11 @@ +--- +bump: patch +--- + +### Changed + +- The `discriminate.py` and `spawn-census.sh` refusal messages and the harness README state the + rule and its reason without the story of an earlier run. +- The verify skill requires one verifier and says when a second is worth dispatching. Skill and + catalog facts about pyperf, Criterion, benchstat, JMH, `gh run view` and plugin auto-update + point at their upstream pages. diff --git a/.changes/pixel-art/chore-prompt-audit-knowledge-to-pixel-art-3e589387.md b/.changes/pixel-art/chore-prompt-audit-knowledge-to-pixel-art-3e589387.md new file mode 100644 index 00000000000..acb1a3bd4c2 --- /dev/null +++ b/.changes/pixel-art/chore-prompt-audit-knowledge-to-pixel-art-3e589387.md @@ -0,0 +1,8 @@ +--- +bump: patch +--- + +### Changed + +- The animate, scene and vfx skills say to judge motion from the preview sheet, not the GIF, and + drop a restated claim about one browser tool's `file:` URL handling. diff --git a/plugins/knowledge/reference/citation-shape.md b/plugins/knowledge/reference/citation-shape.md index ab8b5102f21..15098260117 100644 --- a/plugins/knowledge/reference/citation-shape.md +++ b/plugins/knowledge/reference/citation-shape.md @@ -1,6 +1,6 @@ # Tracked citation shape -This document owns the citation shape that `knowledge` skills use whenever a TRACKED output +This document owns the citation shape that `knowledge` skills use whenever a tracked output refers to fetched external content. The rule it serves: **tracked outputs cite, never copy**. The verbatim snapshot stays in the untracked work slice; only the citation crosses into anything committed. @@ -44,7 +44,7 @@ checkable against its slice without re-fetching. ## Sub-resource anchors (optional extension) -A citation MAY narrow to a region of the resource with the emitting skill's deterministic node +A citation may narrow to a region of the resource with the emitting skill's deterministic node id (e.g. map-corpus `n0007-05b0396b`, whose trailing 8 hex are the first 8 of the node's span hash). Serialization is fixed so independent emitters converge: @@ -66,7 +66,7 @@ skill's manifest format doc. ## Drift -A citation asserts what WAS fetched, not what the URL serves now. On re-fetch, a differing hash +A citation asserts what was fetched, not what the URL serves now. On re-fetch, a differing hash means upstream drift: record the new fetch as a new citation (new date, new hash) and note the drift; never edit the old citation's hash in place and never silently re-snapshot over the slice the old citation points into. diff --git a/plugins/knowledge/reference/providers/github/repo-tree.md b/plugins/knowledge/reference/providers/github/repo-tree.md index 26fa4f5460a..7e4db84a97d 100644 --- a/plugins/knowledge/reference/providers/github/repo-tree.md +++ b/plugins/knowledge/reference/providers/github/repo-tree.md @@ -23,7 +23,7 @@ gh api "repos///git/trees/?recursive=1" > discovery/repo-tree. ``` The snapshot is immutable like every other discovery snapshot. Per -[Get a tree](https://docs.github.com/en/rest/git/trees#get-a-tree) (read 2026-11-02): any value of +[Get a tree](https://docs.github.com/en/rest/git/trees#get-a-tree) (read 2026-11-02; recheck when that page changes its truncation limits): any value of `recursive` returns the whole subtree, each `tree` entry carries `path`, `mode`, `type` and `sha`, and a recursive listing is capped at 100,000 entries and 7 MB. Past the cap the response sets `truncated` to `true`, and the parser refuses it: a truncated listing is not a complete diff --git a/plugins/knowledge/skills/course-digest/SKILL.md b/plugins/knowledge/skills/course-digest/SKILL.md index a578efb6311..f215121c108 100644 --- a/plugins/knowledge/skills/course-digest/SKILL.md +++ b/plugins/knowledge/skills/course-digest/SKILL.md @@ -67,9 +67,9 @@ Slug conformance is form-only (kebab-case `[a-z0-9-]`, ≤ 40 chars, Windows-res ## Prerequisites (verify before starting) 1. **course-extraction deps**. `node "${CLAUDE_PLUGIN_ROOT}/skills/course-digest/extraction/setup-deps.mjs" --data-dir "${CLAUDE_PLUGIN_DATA}"`. Installs the pipeline's node dependencies into `${CLAUDE_PLUGIN_DATA}` (persists across plugin updates) and provisions Playwright's Chromium into `${CLAUDE_PLUGIN_DATA}/ms-playwright`. Idempotent. Safe to re-run, and re-run after a plugin update. -2. **Platform auth**. Set `COURSE_EMAIL`/`COURSE_PASSWORD` (Dometrain → Clerk) or `TEACHABLE_EMAIL`/`TEACHABLE_PASSWORD` (Teachable) in your shell before invoking; they inherit into the pipeline's node subprocess. The env-var prefix is course-config-driven via `platformConfig.authEnvPrefix`. Session cookies persist under `${CLAUDE_PLUGIN_DATA}/auth/.auth-state.json` and are reused across runs. **Interactive manual login is the fallback** when no credentials are set. It opens a browser window for you to log in. NOTE: the manual-login prompt (`node:readline` + headed browser) may not function under headless plugin execution; env-var + cookie-reuse carry the skill regardless, and manual login is a known limitation there, not a blocker. These credentials live in shell environment variables, not in plugin `userConfig`: this plugin's `userConfig` options are non-secret scalars. Where option values are kept: . +2. **Platform auth**. Set `COURSE_EMAIL`/`COURSE_PASSWORD` (Dometrain → Clerk) or `TEACHABLE_EMAIL`/`TEACHABLE_PASSWORD` (Teachable) in your shell before invoking; they inherit into the pipeline's node subprocess. The env-var prefix is course-config-driven via `platformConfig.authEnvPrefix`. Session cookies persist under `${CLAUDE_PLUGIN_DATA}/auth/.auth-state.json` and are reused across runs. **Interactive manual login is the fallback** when no credentials are set. It opens a browser window for you to log in. The manual-login prompt (`node:readline` + headed browser) may not function under headless plugin execution; env-var + cookie-reuse carry the skill regardless, and manual login is a known limitation there, not a blocker. These credentials live in shell environment variables, not in plugin `userConfig`: this plugin's `userConfig` options are non-secret scalars. Where option values are kept: . 3. **ffmpeg**, required for video frame extraction (scene detection, interval capture). Check: `ffmpeg -version`. Install: `winget install Gyan.FFmpeg` (Windows), `brew install ffmpeg` (macOS), `sudo apt install ffmpeg` (Linux). Floor 7.1+ (newer codecs, AV1, Opus, degrade or fail below this). -4. **ImageMagick 7**, required by `classify-frames.js` for contact sheet generation (`magick montage`). Check: `magick -version`. Install: `winget install ImageMagick.ImageMagick` (Windows), `brew install imagemagick` (macOS), `sudo apt install imagemagick` (Linux). Ubuntu <26.04 ships v6. V7 may require building from source. +4. **ImageMagick 7**, required by `classify-frames.js` for contact sheet generation (`magick montage`). Check: `magick -version`. Install: `winget install ImageMagick.ImageMagick` (Windows), `brew install imagemagick` (macOS), `sudo apt install imagemagick` (Linux). Where the distribution's package is v6 (`magick` is missing or reports 6.x), v7 may require building from source. 5. **A browser tool for Phase 1 (course discovery)**, picked by the browser-tool rubric `/testing:run-e2e` owns. A missing tool is a prerequisite gap to report, not a reason to switch tools. Frame extraction needs no browser tool: the scripts read HLS URLs themselves. If any prerequisite fails, stop and inform the user. Re-run `setup-deps.mjs` for the node dependencies + Chromium; the media binaries (ffmpeg, ImageMagick) are OS-level installs via your platform's package manager per the commands above. @@ -102,12 +102,12 @@ node "${CLAUDE_PLUGIN_ROOT}/skills/course-digest/extraction/run.mjs" --data-dir node "${CLAUDE_PLUGIN_ROOT}/skills/course-digest/extraction/run.mjs" --data-dir "${CLAUDE_PLUGIN_DATA}" extract-course.js --course-dir --metadata-only ``` -Script uses Playwright's bundled Chromium with a fresh temp context (not Chrome itself. Chrome 136+ blocks CDP on default profiles). Auth handled via `addCookies()` after context launch: with credentials set it logs in and saves state; subsequent runs inject cached cookies automatically. Skips already-extracted lessons (crash-safe, resumable). Runs headless by default (`--show-browser` to show the browser). +Script uses Playwright's bundled Chromium with a fresh temp context (not Chrome itself, which ignores the remote-debugging switches on its default data directory; the version and switches: ). Auth handled via `addCookies()` after context launch: with credentials set it logs in and saves state; subsequent runs inject cached cookies automatically. Skips already-extracted lessons (crash-safe, resumable). Runs headless by default (`--show-browser` to show the browser). **Key technical details:** - Uses `--disable-blink-features=AutomationControlled` to bypass automation detection on course platform logins -- Chrome profiles are NOT used. Playwright's own Chromium with a dedicated temp context dir in the OS temp directory +- Chrome profiles are not used. Playwright's own Chromium with a dedicated temp context dir in the OS temp directory - Auth state saved to `${CLAUDE_PLUGIN_DATA}/auth/.auth-state.json` (session expiry depends on the platform's auth provider, configured in `platformConfig.authWarnDays`) - HLS video URLs captured via DOM read from the video player element (selector from `platformConfig.videoPlayerSelector`). No claude-in-chrome needed - Frame extraction via ffmpeg scene detection (threshold 0.1), with interval fallback for sparse results @@ -200,7 +200,7 @@ Multi-modal extraction gaps beyond these three (code OCR from frames, slide-text ### Dedup semantics -Dedup phase (`classify-frames.js --phase dedup`) **reports** near-duplicates but does NOT +Dedup phase (`classify-frames.js --phase dedup`) **reports** near-duplicates but does not delete frame files. Actual frame curation happens in `generate-manifests.js` which sets `keep: true/false` per frame. Frame PNG files remain on disk. Manifests define which frames to use during synthesis. diff --git a/plugins/knowledge/skills/course-digest/context/multimodal-evaluation.md b/plugins/knowledge/skills/course-digest/context/multimodal-evaluation.md index ddc754f6134..276cce72577 100644 --- a/plugins/knowledge/skills/course-digest/context/multimodal-evaluation.md +++ b/plugins/knowledge/skills/course-digest/context/multimodal-evaluation.md @@ -28,8 +28,9 @@ at higher cost. For higher accuracy on specific frames, Claude's vision can read PNG files directly during summarization phase. -**Recommended approach**: Hybrid two-pass. Tesseract on all frames (free, fast), then -selectively send high-value frames (code-heavy keyframes) to Claude vision during summarization. +**Recommended approach**: start with Claude vision on the curated keyframes (Option B below). Once +Option A is built, run Tesseract on all frames (free, fast), then send high-value frames +(code-heavy keyframes) to Claude vision during summarization. **Output**: `code-snippets.md` per lesson, containing extracted code blocks. diff --git a/plugins/knowledge/skills/course-digest/context/storage-schema.md b/plugins/knowledge/skills/course-digest/context/storage-schema.md index 135d26e45e8..bae86505b4c 100644 --- a/plugins/knowledge/skills/course-digest/context/storage-schema.md +++ b/plugins/knowledge/skills/course-digest/context/storage-schema.md @@ -28,9 +28,10 @@ courses/// notes.md # Lesson notes (if platform provides them) code-snippets.md # Code extracted from lesson (inline code blocks) resources.json # Download URLs, article links, PDF links (Teachable adapter) - screenshots/ # Key frames as PNG files - 001-slide-intro.png # Zero-padded, descriptive suffix - 002-code-example.png + screenshots/ # Extracted frames as PNG files + scene-01/ + scene_0001.png # Scene-detection frame + interval_0001.png # Interval-capture fallback frame 02-what-will-you-learn/ transcript.md ... @@ -205,7 +206,7 @@ Per-lesson resource metadata: download URLs, article links, PDF links extracted - Understanding progression (how codebase evolves lesson by lesson) - Catching discrepancies (what code does vs what instructor says) -Phase 3 synthesis agents read BOTH: repo for architectural context, downloads for lesson-specific teaching. Repo alone misses journey; ZIPs alone miss big picture. +Phase 3 synthesis agents read both: repo for architectural context, downloads for lesson-specific teaching. Repo alone misses journey; ZIPs alone miss big picture. For courses with GitHub repos instead of ZIPs, `code/repo/` is a shallow clone and per-section analysis comes from `git log` or directory-based sections. @@ -213,13 +214,13 @@ For courses with GitHub repos instead of ZIPs, `code/repo/` is a shallow clone a - Format: PNG - Max width: 1280px -- Naming: `{NNN}-{descriptive-suffix}.png` (e.g., `001-test-list-creation.png`) +- Naming: the extractor writes `screenshots/scene-01/scene_NNNN.png` (scene detection) and `screenshots/scene-01/interval_NNNN.png` (interval fallback) - Only capture when visual content adds information beyond transcript: - Code on screen (IDE, terminal) - Architecture diagrams - Slides with visual content - UI demonstrations -- Do NOT screenshot talking-head segments; the transcript covers those +- Do not screenshot talking-head segments; the transcript covers those ## Size management @@ -227,4 +228,4 @@ For courses with GitHub repos instead of ZIPs, `code/repo/` is a shallow clone a - **Screenshots**: resize to 1280px wide, compress with reasonable quality - **Transcripts**: typically 1-3 KB per minute of video (~30 KB for a 30-min lesson) - **course.json**: grows with lessons but stays under 50 KB for large courses -- **Expected total per course**: 1-5 MB for transcripts + metadata, 10-50 MB with screenshots +- **Expected total per course**: 1-5 MB for transcripts + metadata; with screenshots, size it from the measured per-lesson figures in [screenshot-strategy.md](../reference/screenshot-strategy.md#file-size-management) diff --git a/plugins/knowledge/skills/course-digest/context/workflow.md b/plugins/knowledge/skills/course-digest/context/workflow.md index 7b29affd0c5..bc76ee2f4b9 100644 --- a/plugins/knowledge/skills/course-digest/context/workflow.md +++ b/plugins/knowledge/skills/course-digest/context/workflow.md @@ -18,10 +18,10 @@ Eight phases executed in order. Each phase produces artifacts consumed by subsequent phases. -**Critical ordering rule:** ALL context must be gathered before summarization begins. Module +**Ordering rule:** all context must be gathered before summarization begins. Module summaries generated from transcripts alone are incomplete. They miss code syntax, visual diagrams, repo patterns. Full sequence: Extract → Process Frames → Analyze Code -Repo → Validate → THEN Synthesize. +Repo → Validate → then Synthesize. **Completeness markers:** Module summaries should note their context sources: @@ -183,7 +183,7 @@ only, then discard. ## Phase 3: Synthesize **Goal:** Produce per-module summaries combining all three knowledge modalities into a unified -analysis. A `[full-context]` summary is NOT just transcripts with metadata. It synthesizes what +analysis. A `[full-context]` summary is not just transcripts with metadata. It synthesizes what the instructor says, what's shown on screen, what the actual code does. **Three modalities (all required for `[full-context]`):** @@ -192,7 +192,7 @@ the instructor says, what's shown on screen, what the actual code does. |----------|--------|-----------------| | Audio/transcript | `transcript.md` per lesson | Instructor explanations, arguments, verbal emphasis, things said but not shown | | Visual/frames | Frame PNG files + `manifest.json` | Code on screen, architecture diagrams, slides, terminal output, UI demos | -| Code/repo | `code/repo/
/` source files | Actual implementation patterns, DI setup, project structure, what the code DOES vs what the instructor SAYS it does | +| Code/repo | `code/repo/
/` source files | Actual implementation patterns, DI setup, project structure, what the code does vs what the instructor says it does | **Multi-agent approach per module:** @@ -238,7 +238,7 @@ Build this table during Phase 2c. Example from per-section repo: **Per module, identify:** - Core concepts taught (with lesson references) -- Code patterns demonstrated (from transcripts AND actual code AND visual frames) +- Code patterns demonstrated (from transcripts and actual code and visual frames) - Discrepancies between what's said, shown, and coded (these are high-value findings) - Best practices advocated - Anti-patterns warned against @@ -261,7 +261,7 @@ Build this table during Phase 2c. Example from per-section repo: ## Phase 5: Recommend -**Goal:** Map course learnings to THIS repository. Primary deliverable. +**Goal:** Map course learnings to this repository. Primary deliverable. 1. Read `course-summary.md` + all module summaries 2. Read repository's CLAUDE.md, `.claude/rules/`, key architecture files @@ -303,9 +303,9 @@ When invoked with `/knowledge:course-digest resume `: ## Execution model: sequential vs parallel -**Bot detection constraint:** All browser-based extraction (Phase 2) MUST be sequential. Dometrain and +**Bot detection constraint:** All browser-based extraction (Phase 2) must be sequential. Dometrain and similar platforms rate-limit and detect automated access. Navigate no faster than ~2 seconds between -lessons. Do NOT parallelize DOM interactions, browser contexts, lesson navigation. +lessons. Do not parallelize DOM interactions, browser contexts, lesson navigation. **What can run in parallel:** @@ -351,4 +351,4 @@ at recording time. Before using recommended patterns, verify current stable vers `/discovery:research` or `mcp__nuget__get_latest_package_version`. **Rule:** Course content is a starting point for research, not a final answer. Every action item -gets `/discovery:explore` + `/discovery:research` verification AT TIME OF INTEGRATION, not at digest time. +gets `/discovery:explore` + `/discovery:research` verification at time of integration, not at digest time. diff --git a/plugins/knowledge/skills/course-digest/reference/adapters/discovery-checklist.md b/plugins/knowledge/skills/course-digest/reference/adapters/discovery-checklist.md index fc69fb3cfa0..5f6d2c2b2d9 100644 --- a/plugins/knowledge/skills/course-digest/reference/adapters/discovery-checklist.md +++ b/plugins/knowledge/skills/course-digest/reference/adapters/discovery-checklist.md @@ -132,7 +132,7 @@ Adapt selector for non-Teachable platforms. The class pattern will differ. - **text**: plain text content, embedded links (label + href), heading presence - **file**: download link labels, CDN domain, file extensions (.zip, .sql, .json) - **code_display**: code content, language, length -- **pdf_embed**: iframe src OR download link (platforms vary) +- **pdf_embed**: iframe src or download link (platforms vary) - **code_embed**: iframe domain (may be third-party widget, low extraction value) - **image**: direct img src or linked image - Any other types discovered @@ -198,11 +198,11 @@ Verify it on the platform in front of you before designing around it: on Hotmart Steps: -1. Set up `page.on("response")` listener BEFORE navigating +1. Set up `page.on("response")` listener before navigating 2. Filter for subtitle manifest: URL containing `textstream_eng` + `.m3u8` 3. Capture manifest response body (contains all segment URLs with auth tokens) 4. Parse manifest to get segment filenames -5. Fetch all segments from WITHIN iframe context (`hotmartFrame.evaluate(fetch(...))`) +5. Fetch all segments from within iframe context (`hotmartFrame.evaluate(fetch(...))`) 6. Parse WebVTT cues, deduplicate overlapping segments, sort by timestamp ```javascript @@ -223,13 +223,13 @@ page.on("response", async (response) => { - CORS blocks `fetch()` from parent page to video CDN, so fetch from inside iframe context - HLS subtitle segments overlap by design (each ~6s segment includes adjacent cues for smooth playback), so deduplicate by `startTime + text` key - Subtitle manifest only loads after video playback starts, so trigger play first -- Seeking the video does NOT reliably trigger new subtitle segment loads. The player caches them +- Seeking the video does not reliably trigger new subtitle segment loads. The player caches them ### 3.4 Check for platform API transcript endpoints Some platforms expose transcripts via API: -- **Teachable**: `/api/v2/hotmart/private_video?attachment_id={id}` returns video metadata (video_id, duration, signature) but NOT transcripts +- **Teachable**: `/api/v2/hotmart/private_video?attachment_id={id}` returns video metadata (video_id, duration, signature) but not transcripts - **Wistia Data API**: has a captions endpoint but requires the account owner's API token, so it is unusable for third-party courses - **Single public YouTube videos**: use `/knowledge:video-digest` (`transcript` / `watch` actions). Caption acquisition via yt-dlp is `/knowledge:video-digest`'s concern, not course adapters @@ -240,7 +240,7 @@ If no subtitle source exists: 1. Capture HLS master URL via network intercept 2. Extract audio with ffmpeg: `ffmpeg -i "HLS_URL" -vn -acodec pcm_s16le -ar 16000 -ac 1 audio.wav` 3. Transcribe with Whisper (local or API) -4. FFmpeg 8.0+ has native Whisper filter support +4. An FFmpeg build that includes the native `whisper` audio filter can transcribe directly (**Pointer**: for the filter and what a build needs to include it) Slower and less accurate than platform-provided captions but works universally. @@ -402,7 +402,7 @@ Common gotchas across platforms: - **Automation detection**: use `--disable-blink-features=AutomationControlled` in Playwright to bypass basic detection - **Lazy-loaded content**: video players, subtitle tracks, and some attachments only load after user interaction (play button click, scroll). Wait for specific DOM elements or network requests, not just `domcontentloaded` - **HLS subtitle segment overlap**: segments contain overlapping cues for smooth playback. Deduplicate by `startTime + text` composite key -- **CORS on fetch**: fetching video CDN resources from parent page context fails due to CORS. Fetch from WITHIN video player's iframe context using `frame.evaluate(async () => { await fetch(...) })` +- **CORS on fetch**: fetching video CDN resources from parent page context fails due to CORS. Fetch from within video player's iframe context using `frame.evaluate(async () => { await fetch(...) })` - **Platform API != documented API**: platforms often have undocumented internal APIs (like Teachable's `/api/v2/hotmart/private_video`) that are more useful than official public API. Inspect network traffic during normal page loads ## Regression Checklist (for existing providers) diff --git a/plugins/knowledge/skills/course-digest/reference/adapters/dometrain.md b/plugins/knowledge/skills/course-digest/reference/adapters/dometrain.md index f4f76777d1d..7ca3f4af6fd 100644 --- a/plugins/knowledge/skills/course-digest/reference/adapters/dometrain.md +++ b/plugins/knowledge/skills/course-digest/reference/adapters/dometrain.md @@ -8,7 +8,7 @@ Platform-specific extraction logic for Dometrain (dometrain.com) courses. Dometrain uses **Mux Player** (`` custom element) loaded from `cdn.jsdelivr.net/npm/@mux/mux-player`. Videos are HLS streams with JWT-protected access tokens (playback-restricted, user-scoped, and short-lived). Read the remaining lifetime from the token itself rather than assuming a window; the check is under "Getting the HLS URL" below. -Video player is NOT a standard `