From 98624260536c68578091d3f787df5272637c59c3 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 23 Jun 2026 14:24:46 -0400 Subject: [PATCH] conductor(deob_warmup): add TIER2_STARTER.md for warmup dispatch - 3 prompt template: umbrella Tier 2 / per-child Tier 2 / synthesis Tier 2 - File-read order: warmup spec first, then umbrella, then project conventions, then samples (LOCAL-ONLY, DO NOT COMMIT) - Critical user directives: constructive type theory, boundedness, etymology-aware, evidence-based - 4 verification criteria: lossless, bounded, constructively typed, etymology-cited - Sandbox conventions: master branch, per-task commits, no AppData, failcount contract - Quick reference: /tier-2-auto-execute video_analysis_deob_warmup_20260621 CRITICAL: Samples are the user's private work. The .gitignore line 34 covers them; verify with git status before each commit. The deliverables extract PATTERNS from samples, not content verbatim. --- .../TIER2_STARTER.md | 216 ++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 conductor/tracks/video_analysis_deob_warmup_20260621/TIER2_STARTER.md diff --git a/conductor/tracks/video_analysis_deob_warmup_20260621/TIER2_STARTER.md b/conductor/tracks/video_analysis_deob_warmup_20260621/TIER2_STARTER.md new file mode 100644 index 00000000..f4c63cfa --- /dev/null +++ b/conductor/tracks/video_analysis_deob_warmup_20260621/TIER2_STARTER.md @@ -0,0 +1,216 @@ +# Tier 2 Starter Prompt: Video Analysis De-obfuscation Warmup + +**Purpose.** This file is the dispatch prompt for Tier 2 autonomous agents picking up the warmup track. It supplements the auto-loaded `spec.md` + `plan.md` per `conductor/tier2/commands/tier-2-auto-execute.md` step 2. + +**Track:** `video_analysis_deob_warmup_20260621` (Pass 2 of 3, precursor) + +--- + +## Track identity + +- **ID:** `video_analysis_deob_warmup_20260621` +- **Type:** Research-only track (warmup, precursor) +- **Status:** spec ✓, plan ✓, samples ✓ (user provided 140 files on 2026-06-21) +- **Priority:** A (user-blocking; Pass 2 of the 3-pass research campaign) +- **Domain:** Meta-tooling (research deliverable + LLM operational spec; no `src/` changes) + +## Mission (what this track produces) + +This warmup produces 2 deliverables from the user's past de-obfuscation notes in `samples/`: + +1. **`report.md`** (the design doc) — the curated de-obfuscation lexicon + the 3+ noise-dedup maps + sample transformations drawn from the user's past notes. ~1000-3000 LOC. Follows the `intent_dsl_survey_20260612/report_v1.2.md` precedent (multi-section, with provenance per claim). + +2. **`prompt_template.md`** (the LLM operational spec) — a self-contained prompt template that an LLM can be invoked with to perform the de-obfuscation on a new Pass 1 report. ~200-500 LOC. References the report (for grounding) + includes example transformations. + +The 3 phase children (`video_analysis_deob_{lexicon,pilot,apply}_20260621/`) all consume these 2 deliverables. + +--- + +## Files to read in this order + +### 1. Warmup + umbrella (REQUIRED) + +- `./spec.md` (the warmup design — read this FIRST) +- `./plan.md` (the warmup plan — phase + task breakdown) +- `/conductor/tracks/video_analysis_deob_20260621/spec.md` (the umbrella — full design, philosophy, multi-layer deliverable) +- `/conductor/tracks/video_analysis_deob_20260621/README.md` (child index) +- `/conductor/tracks/video_analysis_deob_20260621/state.toml` (current phase + tasks) +- `/conductor/tracks/video_analysis_campaign_20260621/spec.md` §0 (multi-pass framing) + §11.1 (now superseded by the umbrella; the original Pass 1 → Pass 2 handoff is the historical reference) + +### 2. Project conventions (REQUIRED at session start per workflow.md) + +- `/AGENTS.md` (critical anti-patterns, file naming, no day estimates, skip-marker policy) +- `/conductor/workflow.md` (task workflow, Tier 2 sandbox conventions, failcount contract) +- `/conductor/code_styleguides/python.md` (1-space indent, type hints, no comments — IF code is written; not applicable here) +- `/conductor/code_styleguides/error_handling.md` (Result[T] pattern — not applicable for this research-only track) + +### 3. Reference tracks (consult as needed) + +- `/conductor/tracks/intent_dsl_survey_20260612/report_v1.2.md` — the SIBLING DSL (tool-verb DSL for AI agents); same report structure; reference for §FR4 deliverable format +- `/conductor/tracks/nagent_review_20260608/report.md` — research-track precedent +- `/conductor/tracks/fable_review_20260617/report.md` — research-track precedent +- `/conductor/tracks/video_analysis_campaign_20260621/TIER2_STARTER.md` — sibling track (Pass 1's TIER2 prompt); reference for prompt-template format + +### 4. The samples (LOCAL-ONLY — read but DO NOT commit) + +- `./samples/**` (140 files; gitignored per root `.gitignore` line 34) +- **CRITICAL: These are the user's private notes — read them to survey patterns, but DO NOT include any of their content verbatim in the deliverables. The deliverables (report.md + prompt_template.md) extract the PATTERNS from the samples, not the content.** +- **DO NOT commit anything from samples/ to git. The .gitignore protects you, but verify with `git status` before each commit.** + +--- + +## Critical user directives (from 2026-06-21 brainstorming) + +These are the load-bearing constraints. Every deliverable must respect them. + +1. **Constructive type theory as foundation.** The de-obfuscation is type-theoretic; every value has a type; types = propositions (Curry-Howard). Per user 2026-06-21: "I like Norman Wildberger's work. And I like the constructivist current progress on type theories as a foundational system." + +2. **Boundedness for direct knowledge.** "No observer or mechanism or construct can be infinite in resolution or quantification. To have distinction must have a bounds." Every value in the de-obfuscation must be a bounded form. + +3. **Cycles/iteration allowed but expressed explicitly.** "Infinite is okay well handled CORRECTLY... What can be indefinite is that can be subjected upon is that of cycles, that of iteration, that of repetition." `Stream A = nat -> A` is fine; `∞_val` is not. + +4. **Disambiguate "infinity" lexically.** The 3 noise-dedup maps should disambiguate: + - `∞_val` (a value) — BANNED + - `∞_proc` (a process, e.g., Stream) — ALLOWED + - `∞_card` (a cardinality) — BANNED + - Expected additional maps: proofs=programs, sets=kinds, functions=procedures (per the user's "Curry-Howard collapse" framing). + +5. **Etymology-aware lexicon.** Every new term has a 1-line origin + 1-line definition history. "Without giving examples this is the best I can do to describe where I am" — the user's explicitness is the meta-pattern: be explicit about word origins. + +6. **Evidence-based, not invented.** The lexicon is derived from the user's samples. Every term in the lexicon should be grounded in a pattern from `samples/`. If a concept has no grounding in the samples, mark it "to be defined" rather than inventing a term. + +--- + +## Key risks (from warmup spec §9) + +- **R1 (medium):** User cannot provide samples in time — **MITIGATED** (samples already provided, 140 files). +- **R2 (medium):** User's samples don't have enough de-obfuscation patterns — Phase 1 (lexicon child) extends with constructive type theory defaults if needed. +- **R3 (low):** Report grows too large (>3000 LOC) — cap at 3000; defer deep examples to Appendix. +- **R4 (medium):** Template is too abstract for LLM to follow — Pilot (Phase 2 child) catches this; pilot_report.md captures refinements. +- **R5 (low):** User's style is too idiosyncratic to formalize — capture 1-2 example transformations explicitly; the rest can be implicit in the prompt template. + +--- + +## Hard constraints + +- **No `src/*.py` changes.** This is a research-only track; no production code. +- **No `pyproject.toml` dependencies.** All work is research (markdown files). +- **No `uv pip install` for new packages.** The warmup is markdown only. +- **No `scripts/` Python tooling.** Optional in Phase 1 (lexicon child), not in the warmup. +- **No day estimates in any artifact.** Scope measured in files/sites per `conductor/workflow.md` Tier 1 Track Initialization Rules. +- **Samples are local-only.** DO NOT commit anything from `samples/` to git. The root `.gitignore` line 34 covers this; verify with `git status` before each commit. +- **Per-task atomic commits.** Each deliverable (`report.md` + `prompt_template.md`) is committed in its own commit with a git note. +- **No comments in code** (if any code is written; not applicable here). +- **1-space indent, type hints** (if any code is written; not applicable here). + +--- + +## Tier 2 sandbox conventions (per `conductor/tier2/agents/tier2-autonomous.md`) + +- **Test runner:** `uv run python scripts/run_tests_batched.py` (NEVER `uv run pytest` directly). Not applicable for this research-only track — no tests to run. +- **Default branch:** `master`. Use `origin/master` for `git fetch` and as the base for new branches. +- **Line endings:** preserve existing (CRLF stays CRLF, LF stays LF). +- **Throw-away scripts:** `scripts/tier2/artifacts//` (not the base `scripts/tier2/` directory). Not applicable here. +- **End-of-track report:** `docs/reports/TRACK_COMPLETION_.md` per `conductor/tier2/agents/tier2-autonomous.md` step 42. +- **State update:** `state.toml` → `status = "completed"` at the end. +- **Hard bans:** `git push*`, `git checkout*`, `git restore*`, `git reset*` (3-layer enforced; see `conductor/tier2/agents/tier2-autonomous.md` for details). +- **File access:** Tier 2 clone only (Windows restricted token + OpenCode permission rules). **NEVER USE APPDATA** — denied at the bash level. +- **Failcount contract:** After every task commit, check `should_give_up` from `scripts.tier2.failcount`. State persisted at `tests/artifacts/tier2_state//state.json`. Thresholds: 3 consecutive red, 3 consecutive green, 30 min no progress. + +--- + +## Verification criteria (gate for warmup completion) + +Per the warmup spec §8: + +- [ ] `report.md` exists, follows §FR4 structure, has provenance for every claim +- [ ] `prompt_template.md` exists, follows §FR5 structure, can be invoked as-is with a new Pass 1 report +- [ ] At least 1 sample has been processed (user has provided ≥1 sample) — **DONE** (140 files) +- [ ] The 4 verification criteria (lossless, bounded, constructively typed, etymology-cited) are documented in the template +- [ ] The 3+ noise-dedup maps are documented (with `∞_val` / `∞_proc` / `∞_card` lexical disambiguation) +- [ ] Sample transformations (3-5 canonical before/after pairs) are included — drawn from `samples/`, NOT verbatim (extract the PATTERN, not the content) +- [ ] User has reviewed and approved both deliverables +- [ ] Both deliverables are committed atomically (one commit per deliverable) +- [ ] Git notes attached to both commits +- [ ] `state.toml` updated to `status = "completed"` +- [ ] `docs/reports/TRACK_COMPLETION_video_analysis_deob_warmup_20260621.md` exists + +--- + +## Execution plan (per warmup plan.md) + +| Phase | Task | Notes | +|---|---|---| +| 0 | User samples provided | **DONE** (140 files in `samples/`) | +| 1.1 | Initialize warmup track | spec.md, plan.md, metadata.json, state.toml already exist; no init needed | +| 1.2 | Tier 3 worker surveys samples | Term frequency, structural patterns, form projection heuristics, noise-dedup maps, etymology style, example transformations. Use TDD-style: catalog patterns → verify against 2-3 samples → confirm | +| 2.1 | Write `report.md` (~1000-3000 LOC) | Follow warmup spec §FR4 structure | +| 2.2 | Commit `report.md` with git note | `git add report.md && git commit -m "..."` + `git notes add -m "..." ` | +| 3.1 | Write `prompt_template.md` (~200-500 LOC) | Follow warmup spec §FR5 structure | +| 3.2 | Commit `prompt_template.md` with git note | Same protocol | +| 4.1 | User review + approval | Pause for user feedback before marking completed | +| 4.2 | Update `state.toml` to `status = "completed"` | `git add state.toml && git commit -m "conductor(state): mark warmup completed"` | +| 4.3 | Write end-of-track report | `docs/reports/TRACK_COMPLETION_video_analysis_deob_warmup_20260621.md` per `conductor/tier2/agents/tier2-autonomous.md` | + +--- + +## When stuck + +- **Survey returns too many patterns?** Focus on the 3+ noise-dedup maps first (the most concrete deliverable). Defer other patterns to the report's Appendix. +- **Sample transformation examples — how to extract without copying?** The transformation is the SHAPE of the before/after, not the content. E.g., if a sample shows `∀x ∈ ℝ: x² ≥ 0` → `forall x : Real, square x >= 0`, the PATTERN is "set-builder notation → forall + type annotation + bounded quantification." The example goes in the report as "Pattern: set-builder → forall + type" with a generic example, NOT the verbatim `x² ≥ 0` example. +- **Lexicon gets too big?** Cap at ~40 terms total across 4 tiers (~10 each). If more emerges, defer to Appendix. +- **User wants to iterate on the lexicon?** Update `prompt_template.md` to reference the iteration; capture the iteration in `state.toml` as a new task. The user-as-source pattern means the lexicon is never "final" — it's a living artifact. +- **Sandbox blocks reads from `samples/`?** Per the warmup spec, the samples are local-only; the Tier 2 clone has the warmup folder. `git status` should show no untracked files in `samples/`. If reads fail, the Tier 2 sandbox permissions need to be widened to include the warmup folder (shouldn't be needed — it's inside the clone). + +--- + +## Quick reference: dispatch + +``` +/tier-2-auto-execute video_analysis_deob_warmup_20260621 +``` + +Plus this context (paste BEFORE invoking): + +``` +TRACK: video_analysis_deob_warmup_20260621 +TYPE: Research-only (warmup, precursor to Pass 2 of 3) +STATUS: spec ✓, plan ✓, samples ✓ (140 files provided 2026-06-21) +PRIORITY: A (user-blocking) + +PRODUCES: 2 deliverables (report.md + prompt_template.md) extracted from the user's past samples. +CONSUMES: nothing (warmup is a precursor; downstream is the 3 phase children). + +CRITICAL: Samples are local-only. DO NOT commit anything from samples/ to git. +The .gitignore line 34 covers this; verify with git status before each commit. +The deliverables extract PATTERNS from the samples, not content verbatim. + +USER DIRECTIVES (load-bearing): +1. Constructive type theory as foundation (Curry-Howard) +2. Boundedness for direct knowledge (∞_val banned, ∞_proc allowed) +3. Cycles/iteration explicit; no "infinite" values +4. Etymology-aware lexicon (1-line origin + 1-line history per term) +5. Evidence-based, not invented (every term grounded in samples) +6. Noise-dedup maps (proofs=programs, sets=kinds, functions=procedures + more from samples) + +FILES TO READ FIRST: +1. ./TIER2_STARTER.md (this file) +2. ./spec.md (the warmup design) +3. ./plan.md +4. /conductor/tracks/video_analysis_deob_20260621/spec.md (umbrella) +5. /AGENTS.md, /conductor/workflow.md (project conventions) +6. The samples in ./samples/ (read but DO NOT commit) + +EXECUTION: Survey samples → write report.md → commit → write prompt_template.md → commit → user review → closeout. +``` + +--- + +## Post-warmup + +After this warmup ships, the 3 phase children can start in sequence: +- `video_analysis_deob_lexicon_20260621/` (Phase 1: refines warmup's draft) +- `video_analysis_deob_pilot_20260621/` (Phase 2: applies to 2 videos) +- `video_analysis_deob_apply_20260621/` (Phase 3: applies to 10 + synthesis) + +Each phase has its own spec.md (already scaffolded). Tier 2 will be dispatched for each phase separately, with the warmup's deliverables as input.