Private
Public Access
0
0

conductor(track): add TIER2_STARTER.md for video_analysis_campaign dispatch

3 prompt templates for Tier 2 autonomous agents:
1. Umbrella Tier 2 (Phase 0+1+2 init): installs tooling, builds 5 scripts, scaffolds 12 children
2. Per-child Tier 2 (one child's 5-phase pipeline): Acquire, Keyframes, OCR, Synthesis, Verification
3. Synthesis Tier 2 (after all 12 children): cross-cutting per_video_summary.md + report.md

Includes: file-read order, key risks, hard constraints, verification criteria, per-track Tier 2 dispatch commands, and a quick-reference table.
This commit is contained in:
2026-06-21 15:13:24 -04:00
parent 6533b7120c
commit 3529161b0f
@@ -0,0 +1,243 @@
# Tier 2 Starter Prompt: Video Analysis Campaign
**Purpose.** This file is the dispatch prompt for Tier 2 autonomous agents picking up tracks in the `video_analysis_campaign_20260621` campaign. It supplements the auto-loaded `spec.md` + `plan.md` per `conductor/tier2/commands/tier-2-auto-execute.md` step 2.
**Two prompt templates below:**
1. **Umbrella Tier 2** — for Phase 0 (tooling) + Phase 1 (5 scripts) + Phase 2 initialization (12 child tracks scaffolded with plan.md/metadata.json/state.toml).
2. **Per-child Tier 2** — for executing one child's 5-phase pipeline (Acquire → Keyframes → OCR → Synthesis → Verification).
---
## Template 1: Umbrella Tier 2 (Phases 0 + 1 + 2 init)
```
Dispatch Tier 2 with: /tier-2-auto-execute video_analysis_campaign_20260621
Plus this context (paste BEFORE invoking):
---
TRACK: video_analysis_campaign_20260621
TYPE: Multi-track research campaign (1 umbrella + 12 children + 1 synthesis = 14 folders)
STATUS: spec_approved; awaiting Phase 0 (tooling prerequisites)
PRIORITY: A (user-blocking research campaign)
PASS 1 OF 3 (multi-pass — load-bearing framing):
- Pass 1 (THIS): information extraction + distillation → 12 deep-dive reports + cross-cutting synthesis
- Pass 2 (FUTURE, USER-led): de-obfuscation via user's math encoding notation. USER must rediscover the encoding before Pass 2 starts.
- Pass 3 (FUTURE, USER-led): projection to user's applied domain. USER must articulate "own caveats" before Pass 3 starts.
- CRITICAL: Pass 1 artifacts MUST be lossless. Per-video target: 1000-10000 LOC markdown. Over-summarization here is data loss that cascades.
FILES TO READ IN THIS ORDER (do not skip):
1. /TIER2_STARTER.md (this file)
2. ./spec.md (full design — 15 sections, ~600 lines)
3. ./plan.md (Phase 0+1 bite-sized tasks; Phase 2-4 brief pointers)
4. ./metadata.json (scope, risk_register, verification_criteria, user_directives)
5. ./state.toml (current_phase, task tracking)
6. ./README.md (child index)
THEN at session start (per conductor/workflow.md Standard Task Workflow):
7. /AGENTS.md (critical anti-patterns, file naming, no day estimates, skip-marker policy)
8. /conductor/workflow.md (task workflow, Tier 2 sandbox conventions, failcount contract)
9. /conductor/code_styleguides/python.md (1-space indent, type hints, no comments)
10. /conductor/code_styleguides/error_handling.md (Result[T] pattern for new scripts)
REFERENCE SCRIPTS (consult as needed, DO NOT import):
- C:/projects/forth/bootslop/download_videos.py (yt-dlp usage)
- C:/projects/forth/bootslop/extract_frames.py (cv2 + imagehash)
- C:/projects/forth/bootslop/process_visuals.py (winsdk OCR + visual heuristics)
- C:/projects/forth/bootslop/ocr_interaction.py (standalone OCR)
KEY RISKS (from metadata.json risk_register):
- R1 + R10 (HIGH, verified 2026-06-21): yt-dlp, cv2, imagehash, pillow NOT in repo venv. Phase 0 prerequisite.
- R5 (CONFIRMED for 2 videos): 9vM4p9NN0Ts, lVynu4bo1rY failed oEmbed 401. yt-dlp may still work; verify in Phase 1 of those child tracks.
- R7 (MEDIUM): Pass 1 over-summarization loses signal for Pass 2. Enforce 1000-10000 LOC floor per child report.
- R8 (MEDIUM): Tier 2 capacity for 12+ child tracks — each child is independently shippable; the campaign is async.
HARD CONSTRAINTS:
- NO day/hour/minute estimates in any artifact. Scope measured in files/sites only.
- NO src/*.py changes. NO new pyproject.toml deps beyond the 4 packages installed in Phase 0.
- NO comments in source code. Documentation lives in /docs.
- 1-space indent on all Python. Type hints on all public functions.
- All new scripts follow Result[T] convention per /conductor/code_styleguides/error_handling.md.
- Test runner: uv run python scripts/run_tests_batched.py (NEVER uv run pytest directly).
VERIFICATION CRITERIA (gate for campaign completion):
- All 12 child tracks shipped with report.md (1000-10000 LOC) + summary.md (200-400 words) + artifacts/
- Synthesis track shipped with per_video_summary.md + report.md
- 5 scripts in scripts/video_analysis/ with passing TDD tests
- End-of-track report at docs/reports/TRACK_COMPLETION_video_analysis_campaign_20260621.md
- state.toml updated to status = "completed"
EXECUTION PLAN:
- Phase 0: 4 install tasks (yt-dlp, cv2/imagehash/PIL, OCR backend, scripts/ namespace scaffold)
- Phase 1: 5 scripts with TDD (delegate each to Tier 3 worker via mma_exec.py --role tier3-worker)
- Phase 2: Initialize each child track (plan.md + metadata.json + state.toml) — 12 tracks total. Per-child 5-phase pipeline execution is a SEPARATE Tier 2 dispatch per child (see Template 2).
- Phase 3: Synthesis track (blocked by all 12 children). Initialize + dispatch Tier 3 for cross-cutting report.
- Phase 4: Closeout — update umbrella README.md, write end-of-track report, move 14 folders to archive/, update chronology.md.
WHEN STUCK:
- Multi-pass question? Re-read spec.md §0 + §11.
- Tooling question? Reference bootslop scripts (don't import).
- Style question? Check /conductor/code_styleguides/ + AGENTS.md.
- Per-child question? Read the child spec.md for that slug.
- State/plan question? Update plan.md and state.toml atomically per the per-task commit protocol in /conductor/tier2/agents/tier2-autonomous.md.
---
```
---
## Template 2: Per-Child Tier 2 (one child's 5-phase pipeline)
After Template 1 completes, dispatch a new Tier 2 per child track:
```
Dispatch Tier 2 with: /tier-2-auto-execute video_analysis_<SLUG>_20260621 --resume
Where <SLUG> is one of:
- cs229_building_llms (E, video #1)
- probability_logic (A, video #2)
- entropy_epiplexity (A, video #3)
- score_dynamics_giorgini (A, video #4)
- platonic_intelligence_kumar (B, video #5)
- free_lunches_levin (B, video #6)
- generic_systems_fields (C, video #7)
- brain_counterintuitive (C, video #8)
- neural_dynamics_miller (C, video #9)
- multiscale_hoffman (C, video #10)
- cs336_architectures (E, video #11)
- creikey_dl_cv (D, video #12)
Plus this context (paste BEFORE invoking):
---
TRACK: video_analysis_<SLUG>_20260621
TYPE: Per-child research track (one of 12 in the video_analysis_campaign_20260621 umbrella)
STATUS: spec ✓ (scaffolded by umbrella Tier 2); plan ✓ + metadata ✓ + state ✓ (created by umbrella Tier 2 in Phase 2 init)
PASS 1 OF 3 (multi-pass campaign — load-bearing):
- This child track produces raw artifacts (transcript.json, frames/, ocr.md) + a 1000-10000 LOC report.md + a 200-400 word summary.md.
- These artifacts feed Pass 2 (de-obfuscation) and Pass 3 (projection). They MUST be lossless.
- DO NOT over-summarize. The Tier 3 worker prompt must specify "1000-10000 LOC" target.
FILES TO READ IN THIS ORDER:
1. ./spec.md (lightweight — references umbrella, gives video details, specifies 7 deliverables + 5-phase pipeline + 8-section report structure)
2. /conductor/tracks/video_analysis_campaign_20260621/TIER2_STARTER.md (this parent file — for cross-track context)
3. /conductor/tracks/video_analysis_campaign_20260621/spec.md (full umbrella design)
4. /conductor/tracks/video_analysis_campaign_20260621/plan.md (campaign-level plan)
5. /conductor/tracks/video_analysis_campaign_20260621/README.md (child index — confirm this is the right child)
THEN at session start (if first Tier 2 invocation in this session):
6. /AGENTS.md
7. /conductor/workflow.md
8. /conductor/code_styleguides/python.md
9. /conductor/code_styleguides/error_handling.md
PIPELINE (5 phases per umbrella spec §FR5):
Phase 1: Acquire
- Run scripts/video_analysis/extract_transcript.py <url> <output>/artifacts/transcript.json
- Run scripts/video_analysis/download_video.py <url> <output>/artifacts/video.mp4 (unless skip_video_download=true)
- For E-cluster children (cs229_building_llms, cs336_architectures): yt-dlp may fail per R5 — if so, fall back to manual transcript sourcing if available, or escalate.
- Commit artifacts atomically.
Phase 2: Keyframes
- Run scripts/video_analysis/extract_keyframes.py <video> <output>/artifacts/frames --threshold 0.4
- Manual review of frame set; flag candidates that look wrong.
- Commit frames/ + extraction_meta.json atomically.
Phase 3: OCR
- Run scripts/video_analysis/ocr_frames.py <frames-dir> <output>/artifacts/ocr.md --backend winsdk (or tesseract per Phase 0 decision)
- Spot-check OCR quality.
- Commit ocr.md atomically.
Phase 4: Synthesis (DELEGATE TO TIER 3 WORKER)
- Delegate to: uv run python scripts/mma_exec.py --role tier3-worker "<surgical prompt>"
- The Tier 3 worker prompt must specify:
* Source files: transcript.json + ocr.md + frames/*.jpg
* Target output: <output>/report.md (1000-10000 LOC) + <output>/summary.md (200-400 words)
* 8-section structure per umbrella spec §FR6
* Forward + backward cross-references to other children in the campaign
- Human review + iteration if needed.
- Commit report.md + summary.md atomically.
Phase 5: Verification
- Idempotency check: re-run all scripts, confirm outputs match modulo timestamps.
- Audit checklist: every section of report.md is populated, no "TBD".
- Write end-of-track report at docs/reports/TRACK_COMPLETION_video_analysis_<SLUG>_20260621.md.
- Update state.toml to status = "completed".
HARD CONSTRAINTS:
- All scripts are in scripts/video_analysis/ (Phase 1 deliverables from umbrella).
- Per-task commits with git notes.
- Use uv run python scripts/run_tests_batched.py for any test runs.
- DO NOT modify src/*.py files. Research-only campaign.
WHEN STUCK:
- Script error? Re-read the script's source code (scripts/video_analysis/<script>.py).
- Cross-reference question? Check umbrella spec.md §6 (videos in execution order) + the Connections section of the related children's spec.md files.
- Report LOC question? If under 1000 LOC, expand Frame Analysis + Math/Theoretical Content sections. If over 10000 LOC, split into multiple sub-reports (but defer to Tier 1 for approval).
---
Final synthesis Tier 2 (Template 3 — after all 12 children shipped):
Dispatch Tier 2 with: /tier-2-auto-execute video_analysis_synthesis_20260621
Plus this context:
---
TRACK: video_analysis_synthesis_20260621
TYPE: Cross-cutting synthesis track (blocked by all 12 child tracks)
STATUS: spec ✓ (already written by umbrella Tier 1)
INPUTS: All 12 children's report.md + summary.md files.
OUTPUTS:
- per_video_summary.md — one paragraph (150-250 words) per video, in execution order
- report.md — 6-section synthesis: Theme Matrix, Cross-Video Concept Map, 5-10 Takeaways, Math Prereq Graph, Open Research Questions, Next-Watch List
- Target LOC: 1000-5000 (less than per-video because heavy lifting is in children). Per umbrella spec §0: lossless preservation directive applies here too — DO NOT over-summarize; Pass 2 will compress.
FILES TO READ:
1. ./spec.md
2. /conductor/tracks/video_analysis_campaign_20260621/TIER2_STARTER.md
3. /conductor/tracks/video_analysis_campaign_20260621/spec.md §0 + §11 (multi-pass framing + future handoff)
4. All 12 children's report.md + summary.md (in /conductor/tracks/video_analysis_<SLUG>_20260621/)
DELEGATE: synthesis report.md is large — delegate to Tier 3 worker via mma_exec.py --role tier3-worker with a surgical prompt specifying all 12 inputs + the 6-section output structure.
---
```
---
## Post-campaign (after all 14 tracks shipped)
The umbrella Tier 2 (or the user) handles Phase 4 closeout:
1. Update umbrella README.md with final statuses (all [x]).
2. Write end-of-track report at `docs/reports/TRACK_COMPLETION_video_analysis_campaign_20260621.md`.
3. Move all 14 folders from `conductor/tracks/` to `conductor/archive/` (preserves git history as rename).
4. Update `conductor/chronology.md` with 14 new rows.
5. Update `conductor/tracks.md` to remove the campaign from Active Tracks.
---
## Quick reference: tracks in this campaign
| # | Slug | Cluster | YouTube ID | Tier 2 dispatch command |
|---|---|---|---|---|
| UMBRELLA | video_analysis_campaign_20260621 | — | — | `/tier-2-auto-execute video_analysis_campaign_20260621` |
| 1 | cs229_building_llms | E | 9vM4p9NN0Ts | `/tier-2-auto-execute video_analysis_cs229_building_llms_20260621 --resume` |
| 2 | probability_logic | A | 0yF9TvMeAzM | `/tier-2-auto-execute video_analysis_probability_logic_20260621 --resume` |
| 3 | entropy_epiplexity | A | _U8AwUq_aJQ | `/tier-2-auto-execute video_analysis_entropy_epiplexity_20260621 --resume` |
| 4 | score_dynamics_giorgini | A | P75iVMmbqQk | `/tier-2-auto-execute video_analysis_score_dynamics_giorgini_20260621 --resume` |
| 5 | platonic_intelligence_kumar | B | 1mXUFweWOug | `/tier-2-auto-execute video_analysis_platonic_intelligence_kumar_20260621 --resume` |
| 6 | free_lunches_levin | B | K8BmMU1Tm-I | `/tier-2-auto-execute video_analysis_free_lunches_levin_20260621 --resume` |
| 7 | generic_systems_fields | C | QeMajYvhEbI | `/tier-2-auto-execute video_analysis_generic_systems_fields_20260621 --resume` |
| 8 | brain_counterintuitive | C | cDxtFtoQVNc | `/tier-2-auto-execute video_analysis_brain_counterintuitive_20260621 --resume` |
| 9 | neural_dynamics_miller | C | 0BS-BzEFTXA | `/tier-2-auto-execute video_analysis_neural_dynamics_miller_20260621 --resume` |
| 10 | multiscale_hoffman | C | YnfaT5APPB0 | `/tier-2-auto-execute video_analysis_multiscale_hoffman_20260621 --resume` |
| 11 | cs336_architectures | E | lVynu4bo1rY | `/tier-2-auto-execute video_analysis_cs336_architectures_20260621 --resume` |
| 12 | creikey_dl_cv | D | yxkUvXs-hoQ | `/tier-2-auto-execute video_analysis_creikey_dl_cv_20260621 --resume` |
| SYNTH | video_analysis_synthesis_20260621 | — | — | `/tier-2-auto-execute video_analysis_synthesis_20260621` |
Total Tier 2 invocations: 14 (1 umbrella + 12 children + 1 synthesis).