You are already running inside the megaplan harness for this step. Do the requested planning/review/execution work directly. Do NOT invoke the megaplan CLI, do NOT read or activate the megaplan skill, do NOT start nested megaplan plans, and do NOT recurse into another planning harness. Treat mentions of megaplan in the repository or environment as implementation context only.
WRITE ACCESS CONTRACT: You are running with auto-approved writes inside a writable workspace. Treat the working directory as fully writable. Do NOT preemptively skip or block tasks on permission, sandbox, or read-only grounds. Attempt every required edit; only report failure AFTER a real OS-level rejection from a specific shell command. Do not infer 'read-only' from absence of activity; absence is not denial. If a single shell command unexpectedly fails, retry with a different invocation before concluding the environment is restricted.
You are creating an implementation plan for the following idea.
code
Idea:
Phase 3 Part 2: Mixed-mode capability + manifest-driven step selection
Goal
Deliver the actual mixed-mode timeline capability that Phase 3 Part 1 set the foundation for. A brief should be able to produce a render that combines source-extracted VIDEO clips with generated IMAGE clips in one timeline. Make pipeline.py's mode-fork branches (if args.video, is_all_generative_arrangement) go away by replacing them with manifest-driven step selection that dispatches on each timeline clip's classified_kind.
Repo
/Users/user_c042661f/Documents/reigh-workspace/ArtAgents — currently on main at commit 0502d43 (Phase 3 Part 1). Working tree should be clean at start. Push directly to main when done.
What just landed (Phase 3 Part 1 — context)
Commit 0502d43 delivered:
artagents/pipeline.py reduced 1293 → 151 lines (now a thin CLI router with compatibility aliases for legacy imports: Step, STEP_ORDER, resolve_args, build_steps, run_step, pool_main).
artagents/orchestrators/hype/run.py: 1211 lines — owns parser, Step dataclass, command builders, sentinels/cache, audit/preflight/editor loop, pool_main, and main(). This is now the canonical hype orchestration.
15 hype executor.yamls + the runner repointed at (T3 from the prior plan).
Assistant
{"plan":"I’ll use the ArtAgents repo instructions, then inspect only the orchestration, executor manifest, brief, timeline, and cut/arrange touch points needed to produce a concrete plan. I’ll avoid the megaplan skill and CLI as requested.","questions":[],"success_criteria":[],"assumptions":[]}
Assistant
{"plan":"I’m going to locate the current selectors and mixed-mode rejection points before writing the plan. The goal is to anchor each task to real files and avoid inventing a migration path the repo does not support.","questions":[],"success_criteria":[],"assumptions":[]}
Assistant
{"plan":"I found the current orchestrator is still filtering steps in build_steps(args) with args.video/args.audio, while build_pool_steps() remains the static command catalog. I’m checking the executor manifests and cut/arrange internals next so the plan can split mechanical manifest work from behavioral changes cleanly.","questions":[],"success_criteria":[],"assumptions":[]}
Assistant
User
Assistant
artagents.orchestrators.hype.run.build_pool_steps
artagents/executors/schema.py extended with two optional fields:
clip_kinds_supported: tuple[str, ...] — validates against ClipClassifiedKind (VIDEO/IMAGE/AUDIO/TEXT/EFFECT/OPAQUE)
pipeline_requirements: tuple[str, ...] — validates against a 21-fact allowlist (brief, pool, transcript, scenes, shots, quality_zones, scene_descriptions, scene_triage, quote_candidates, timeline, assets, metadata, source_video, source_audio, source_media, audio, video, rendered_video, theme, generative_visuals_enabled, target_duration)
tests/test_executor_schema_capabilities.py — 8 tests pinning the new schema fields.
Phase 3 Part 1 was megaplan tasks T1-T4 from a 13-task plan. The remaining T5-T13 became "Part 2," and that's what this run delivers. Codex stalled on T4 last time but the work T1-T4 produced is solid.
Settled design decisions (DO NOT debate during planning)
These were debated and decided in the outer conversation. The plan must respect them.
SD-001 — Mixed-mode arrange uses ONE LLM call with kind-aware context blocks
The arrange step gets a single prompt with the pool partitioned by classified_kind, plus per-kind guidance text in the prompt (e.g., "VIDEO clips have transcripts and are best for spoken content; IMAGE clips are generative and best for B-roll, transitions, or title cards."). Not separate LLM calls per kind. Not one homogeneous prompt that ignores kinds. The LLM stays the dispatcher; it just gets structured framing. Pure-generative briefs see a pool with only IMAGE/EFFECT entries (no VIDEO partition shown); source-cut briefs see only VIDEO entries — same behavior as today for those paths. load_bearing: true
SD-002 — --from <step> operates against the dynamic computed step set, not legacy STEP_ORDER
If the user runs --from refine on a brief that doesn't need refine, they get a clear error: "step 'refine' is not in this brief's computed step set: [transcribe, arrange, cut, render]". Not a silent skip-to-end. Not a "step unknown" error. The computed set is the source of truth; the static STEP_ORDER is preserved as a topological-order hint only. load_bearing: true
SD-003 — allow_generative_visuals lives in brief metadata, default false; CLI --allow-generative-effects is a transient override
Mixed-mode is an editorial decision, not a runtime one. The brief gets a top-level optional field allow_generative_visuals: true|false (default false). The CLI gains a flag --allow-generative-effects that overrides the brief for the current run only (does not write back to the brief). When allow_generative_visuals is false (default), source-cut behavior is unchanged for existing briefs. When true, the arrange step includes generative IMAGE entries in the pool and the cut step accepts mixed-kind arrangements. load_bearing: true
Constraints (non-negotiable, from earlier Reigh compatibility analysis)
Reigh compatibility — clip.kind is NEVER persisted. Reigh's clip allowlist (reigh-app/src/tools/video-editor/lib/serialize.ts:8-42) is closed and throws on unknown clip keys. ArtAgents' _CLIP_ALLOWED matches it byte-equivalent. All kind-based dispatch is runtime-only via Timeline.clips[i].classified_kind (Phase 2 added this).
Backwards-compat user-facing CLI — python3 -m artagents --video X.mp4 --brief brief.txt, --audio X.wav --brief brief.txt, and --brief brief.txt --target-duration 28 (pure-generative) all keep working with current behavior. They become hints that influence which clips get added to the timeline; behind the scenes they all converge on one path.
Topological order preserved — current pipeline ordering has real dependencies (e.g. pool_merge after pool_build for sources AND any generative pool); manifest-driven discovery must produce the same order when the same step set is needed. The static STEP_ORDER constant in hype/run.py (or wherever it lives now) becomes a topological-order hint, not the source of truth for which steps to run.
Schema package unchanged — clip kinds are runtime-derived. No @banodoco/timeline-schema changes.
Timeline round-trip stays byte-equivalent — tests/test_timeline_roundtrip_fixture.py is the regression gate.
What this delivers (the punch list)
Each item should be a small task (<300 LOC of edits, one focus area). Codex stalled on chunky single tasks in Phase 2 and Phase 3 Part 1 — split aggressively.
A. Add capabilities to all 15 hype executor manifests (mechanical)
For each of transcribe, scenes, quality_zones, shots, triage, scene_describe, quote_scout, pool_build, pool_merge, arrange, cut, refine, render, editor_review, validate, add clip_kinds_supported and pipeline_requirements to its executor.yaml. Suggested values:
The exact requirement names need to match PIPELINE_REQUIREMENT_FACTS in schema.py. If a name isn't in the allowlist, ADD it to the allowlist (don't fudge the manifest).
Suggest splitting this into 3-4 tasks (5 yamls per task) rather than one chunky task.
B. Replace STEP_ORDER usage in hype/run.py with registry-driven step selection
This is the substance. build_pool_steps() (or wherever step selection lives) should:
Look at the timeline's clips (or, before clips exist, the brief's declared kinds + --video/--audio/--allow-generative-effects hints) to determine which clip kinds are in play.
Query the executor registry for executors whose clip_kinds_supported intersects the active kinds AND whose pipeline_requirements are satisfiable.
Compute facts (e.g., "we have source_video", "we have source_audio", "generative_visuals_enabled is true") from the input.
Topologically order the resulting set using existing STEP_ORDER as a hint.
Return the ordered list; the runner runs it.
Keep the existing STEP_ORDER constant as a topological-order hint, not as the dispatch source of truth. Existing test monkeypatches of artagents.pipeline.run_step etc. should still work via the compatibility aliases.
Suggest splitting this into: (B1) implement the registry-driven selector function with unit tests; (B2) wire the selector into build_pool_steps; (B3) verify against the source-video / audio-only / pure-generative selected step lists captured during Phase 3 Part 1's T1 (those are baseline expectations).
C. Remove mixed-mode rejections in arrange/cut/refine
Find every place that calls is_all_generative_arrangement() or branches on if args.video/if args.audio for step-dispatch purposes (NOT for input parsing). Replace with clip-kind dispatch that handles mixed pools. The cut.py rejection of "video clips + generative visual_source pool entries in same arrangement" goes away — that's exactly the case mixed-mode enables.
Reigh-compat: NO new persisted clip fields. Generative provenance lives on the asset registry entry (already does today), not on the clip.
D. Add brief metadata field allow_generative_visuals
Brief loader (wherever it parses the brief) recognizes an optional allow_generative_visuals: true|false field defaulting to false. The hype runner exposes a CLI flag --allow-generative-effects that overrides the brief value for this run only. Both are surfaced as the generative_visuals_enabled runtime fact that the registry-driven selector uses.
E. Add top-level --dry-run writing hype.plan.json
The hype runner gains a --dry-run flag that does everything up to (but not including) actual executor invocation: parse args, prep brief, compute the step set with capabilities + facts + opt-in flags, build the redacted commands, and write <out>/hype.plan.json with:
selected_steps (in topological order)
skipped_steps (with reason: "no input satisfies requirements", "clip kind not in brief", etc.)
runtime_facts
capability_intent (active clip kinds)
redacted commands per step
expected sentinels
--dry-run must NOT call run_step or launch any child executor. Tests can patch artagents.orchestrators.hype.run.run_step to verify it's never invoked.
F. Mixed-mode fixture test
A new test file (tests/test_mixed_mode_fixture.py or similar) builds a brief with allow_generative_visuals: true, creates a pool with both a source-derived VIDEO clip entry and a generative IMAGE entry, mocks the arrange LLM to return an arrangement that uses both, runs cut.main() with --video AND mixed pool, and asserts:
The resulting timeline loads via Timeline.load() without error.
Timeline.clips[i].classified_kind returns VIDEO for one clip and IMAGE for the other.
No persisted clip.kind field anywhere in the JSON.
Generative provenance is on the asset registry entry, not on the clip.
The cut step did NOT raise "mixed source and generative" (the pre-Part-2 rejection).
This is the proof. Without it, nothing is shipped.
G. Final verification
pytest tests/ -q --ignore=tests/test_pool_schema.py --deselect tests/test_cut_timeline_resume.py::CutTimelineResumeTest::test_resume_mode_render_smoke — green
python3 -m artagents orchestrators list and executors list — work
python3 -m artagents --video X.mp4 --brief mixed_brief.txt --allow-generative-effects --dry-run — produces hype.plan.json with mixed-mode step set
Grep gate: is_all_generative_arrangement no longer used as a step-dispatch branch in pipeline.py or hype/run.py. (It can remain as a domain helper if used internally; it's not load-bearing for orchestration.)
Grep gate: if args.video: / if args.audio: no longer used as step-set branches in hype/run.py (input parsing is fine; step dispatch is not).
Round-trip fixture test (test_timeline_roundtrip_fixture.py) still passes.
Commit + push to main.
Out of scope
Pool / AssetRegistry domain class refactor (deferred to Phase 4).
Schema package changes (handled in Prereq A; mixed-mode adds zero new persisted fields).
Pre-existing test failures (tests/test_pool_schema.py and tests/test_cut_timeline_resume.py::test_resume_mode_render_smoke) — known broken before any of this work, not in scope.
Working notes
Codex has stalled in Phase 2 and Phase 3 Part 1 on chunky single tasks. Aim for 12-15 small tasks total, each <300 LOC of edits. Section A alone is ~3 tasks (5 yamls each); section B is ~3 tasks; sections C/D/E are ~1 task each; F is 1 task; G is 1 task. Roughly 10-12 tasks total.
ArtAgents pyenv 3.11.11 for python shell command; python3 works directly. Tests via pytest (no --timeout flag — plugin not installed).
Test command: pytest tests/ -q --ignore=tests/test_pool_schema.py --deselect tests/test_cut_timeline_resume.py::CutTimelineResumeTest::test_resume_mode_render_smoke
After major edits: python3 -m artagents orchestrators list && python3 -m artagents executors list (smoke).
The Timeline class from Phase 2 is the dispatch substrate. clip.classified_kind returns ClipClassifiedKind enum members; use those, not strings.
Direct push to main is the workflow. The user is the gatekeeper for any Reigh-side or schema-package changes (none expected here).
code
Project directory:
/Users/user_c042661f/Documents/reigh-workspace/ArtAgents
No prior clarification artifact exists. Identify ambiguities, ask clarifying questions, and state your assumptions inside the plan output.
Requirements:
- If the engineering brief suggests an approach, use it as your starting hypothesis — but before committing, consider if there's a simpler or more fundamental fix. The brief is well-researched input, not a final answer.
- If the brief is absent, incomplete, or says "skip", inspect the repository yourself before planning.
- Stay focused on the requested idea. If repo exploration surfaces unrelated issues or docs, ignore them and return to the task.
- Prefer source code, tests, and directly relevant config files. Avoid `.megaplan/`, prior plan artifacts, and unrelated `docs/` or ops/deployment material unless the task explicitly depends on them.
- Stop exploring once you have enough evidence to name the concrete touch points and validation path. Do not keep browsing after you can write the plan.
- Produce a concrete implementation plan in markdown.
- Define observable success criteria as objects with `criterion` (string) and `priority` (`must`, `should`, or `info`):
- `must` — hard gate. The reviewer will block on failure. Use for correctness, functional requirements, and verifiable outcomes (e.g., "all existing tests pass", "API returns 200 for valid input"). Every `must` criterion must have a clear yes/no answer.
- `should` — quality target. The reviewer flags but does not block. Use for subjective goals, numeric guidelines, and best-effort improvements (e.g., "file under ~300 lines", "no deeply nested conditionals", "each function has a single responsibility").
- `info` — documented for humans, reviewer skips. Use for criteria that cannot be verified in this pipeline (e.g., "13 manual smoke tests pass", "stakeholder sign-off obtained").
- Each success criterion should include a `requires` field listing the capabilities needed for verification. Valid capability strings: `run_shell`, `read_files`, `run_tests`, `parse_diff`, `read_build_output`, `run_linter` (container), `drive_browser`, `inspect_runtime_ui`, `observe_runtime_logs`, `subjective_judgment`, `verify_physical_device` (human). `must` criteria MUST have non-empty `requires`. Example: `{"criterion": "All tests pass", "priority": "must", "requires": ["run_tests"]}`.
- Use the `questions` field for ambiguities that would materially change implementation.
- Use the `assumptions` field for defaults you are making so planning can proceed now.
- Prefer cheap validation steps early.
- Keep the plan proportional to the task. A 1-line fix needs a 2-step plan (apply fix + run tests), not a 5-step investigation.
- If user notes answer earlier questions, incorporate them into the draft plan instead of re-asking them.
- Fix the problem fully. Do not limit scope just to avoid breaking existing tests — update the tests too if needed.
- Prefer the simplest, most direct fix. No fallbacks, type conversions, or defensive wrappers without concrete evidence they are needed.
- If the task or issue hints suggest a specific approach, follow it. Only deviate with concrete counter-evidence.
Plan template — simple format (adapt to the actual repo and scope):
md
# Implementation Plan: [Title]
## Overview
Summarize the goal, current repository shape, and the constraints that matter.
## Main Phase
### Step 1: Audit the current behavior (`megaplan/prompts.py`)
**Scope:** Small
1. **Inspect** the current implementation and call out the exact insertion points (`megaplan/prompts.py:29`).
### Step 2: Add the first change (`megaplan/evaluation.py`)
**Scope:** Medium
1. **Implement** the smallest viable change with exact file references (`megaplan/evaluation.py:1`).
2. **Capture** any tricky behavior with a short example.
```python
issues = validate_plan_structure(plan_text)
```
### Step 3: Wire downstream behavior (`megaplan/handlers.py`, `megaplan/workers.py`)
**Scope:** Medium
1. **Update** the runtime flow in the touched files (`megaplan/handlers.py:400`, `megaplan/workers.py:199`).
### Step 4: Prove the change (`tests/test_evaluation.py`, `tests/test_megaplan.py`)
**Scope:** Small
1. **Run** the cheapest targeted checks first (`tests/test_evaluation.py:1`).
2. **Finish** with broader verification once the wiring is in place (`tests/test_megaplan.py:1`).
## Execution Order
1. Update prompts and mocks before enforcing stricter validation.
2. Land higher-risk wiring after the validator and tests are ready.
## Validation Order
1. Start with focused unit tests.
2. Run the broader suite after the flow changes are in place.
For complex plans, use multiple phases:
md
## Phase 1: Foundation — Dependencies, DB, Types
### Step 1: Install dependencies (`package.json`)
...
### Step 2: Create database migration (`supabase/migrations/`)
...
## Phase 2: Core Integration
### Step 3: Port the main component (`src/components/`)
...
Template guidance:
Simple plans: use ## Main Phase with ### Step N: sections underneath.
Complex plans: use multiple ## Phase N: sections, each containing ### Step N: steps. Step numbers are global (not per-phase).
The flat ## Step N: format (without phases) also works for backwards compatibility.
Key invariants: one H1 title, one ## Overview, numbered step sections (### Step N: or ## Step N:), and at least one ordering section.
{"plan":"# Implementation Plan: Mixed-Mode Timeline Capability And Manifest-Driven Hype Selection\n\n## Overview\nThe repository is ready for this change structurally: artagents/pipeline.py is already a compatibility router, and canonical hype orchestration lives in artagents/orchestrators/hype/run.py. The remaining work is to move step selection out of hard-coded args.video / args.audio filters and into executor manifest capabilities, while preserving the existing Step command catalog and legacy import aliases.\n\nCurrent concrete touch points:\n- artagents/orchestrators/hype/run.py:95 parser, :268 arg normalization, :472 static command catalog, :748 hard-coded step filter, :1026--from forcing logic, :1077 runner entry.\n- artagents/executors/schema.py:27 capability requirement allowlist.\n- 15 hype executor.yaml manifests under artagents/executors/{transcribe,...,validate}/executor.yaml.\n- artagents/executors/arrange/run.py:272, :529, :566, :721 for kind-aware prompt framing and CLI flag pass-through.\n- artagents/executors/cut/run.py:1149 source-plus-generative rejection to remove.\n- artagents/executors/refine/run.py:536 duration branching that can remain domain validation, not orchestration dispatch.\n\nThe simplest durable fix is not to make the executor registry build commands. Keep build_pool_steps() as the authoritative command/sentinel catalog for compatibility, then add a selector layer that joins those Step objects with executor manifest capabilities and runtime facts.\n\n## Phase 1: Capability Metadata Foundation\n\n### Step 1: Add missing requirement facts (artagents/executors/schema.py)\nScope: Small\n1. Add any requirement names required by the punch list but absent from PIPELINE_REQUIREMENT_FACTS, especially arrangement if the cut manifest uses it.\n2. Keep validation strict so bad manifest values fail early.\n3. Run pytest tests/test_executor_schema_capabilities.py -q before touching selector logic.\n\n### Step 2: Add capabilities to first manifest batch\nScope: Small\n1. Update executor.yaml for transcribe, scenes, quality_zones, shots, and triage with clip_kinds_supported and pipeline_requirements.\n2. Use lower-case or upper-case consistently with existing schema normalization; tests should assert normalized values where needed.\n\n### Step 3: Add capabilities to second manifest batch\nScope: Small\n1. Update scene_describe, quote_scout, pool_build, pool_merge, and arrange manifests.\n2. Ensure pool_merge is marked broadly capable and requirement-light enough to always materialize a pool once a pool path is part of the flow.\n\n### Step 4: Add capabilities to third manifest batch\nScope: Small\n1. Update cut, refine, render, editor_review, and validate manifests.\n2. Preserve existing graph.provides, cache, metadata.pipeline_step, and command-builder fields unchanged.\n3. Add a manifest validation test that loads the 15 built-in hype executors and asserts these two capability fields are non-empty.\n\n## Phase 2: Runtime Facts And Dynamic Step Selection\n\n### Step 5: Parse brief metadata and CLI override (artagents/orchestrators/hype/run.py)\nScope: Medium\n1. Add --allow-generative-effects and --dry-run to the top-level hype parser at run.py:95.\n2. Add a small brief metadata parser used during resolve_args(): default allow_generative_visuals=False, overridden transiently by CLI --allow-generative-effects=True.\n3. Store the resolved value on args as args.generative_visuals_enabled without rewriting the brief file.\n4. Keep current pure-generative behavior working: no video/audio plus --target-duration still enables generated visuals as part of the pure-generative mode.\n\n### Step 6: Implement selector data model and fact computation (artagents/orchestrators/hype/run.py)\nScope: Medium\n1. Add helper functions near build_steps():\n - compute_runtime_facts(args) -> set[str]\n - compute_active_clip_kinds(args, facts) -> set[str]\n - select_hype_steps(args, *, include_skipped=False)\n2. Compute facts from inputs and known outputs: brief, source_video, source_audio, source_media, audio, video, theme, target_duration, generative_visuals_enabled, plus produced facts from selected upstream manifests.\n3. Use artagents.executors.registry.load_builtin_executors() or a narrow registry lookup for builtin.<step> definitions, then join by metadata.pipeline_step or builtin.{step.name}.\n4. Use STEP_ORDER only to order candidate steps and to drive dependency closure, not to decide which branches exist.\n\n### Step 7: Replace build_steps(args) filtering with selector output\nScope: Medium\n1. Keep build_pool_steps() returning all 15 Step objects for compatibility with artagents.executors.runner and legacy tests.\n2. Rewrite build_steps(args) to return select_hype_steps(args).selected_steps.\n3. Preserve baseline selections:\n - source video: source analysis through pool, arrange, cut, optional render/review/validate when --render.\n - audio-only: transcribe, pool_merge, arrange, cut, plus render-gated downstream steps as currently expected.\n - no-audio pure generative: pool_merge, arrange, cut, render when requested, but no transcript-dependent validation.\n4. Add focused tests in tests/test_hype_step_selection.py rather than overloading the existing caching tests.\n\n### Step 8: Make --from validate against computed steps\nScope: Small\n1. Move --from validation out of resolve_args()’s static STEP_ORDER check at run.py:357, or defer final validation until after build_steps(args).\n2. In _run_steps_once(), compute forcing using the selected step list index, not STEP_ORDER.index().\n3. If the named step is known globally but absent from the computed set, raise the settled error shape: step 'refine' is not in this brief's computed step set: [...].\n4. Keep truly unknown step names as clear usage errors.\n\n## Phase 3: Mixed-Mode Arrange, Cut, And Refine Behavior\n\n### Step 9: Add kind-aware arrange prompt framing (artagents/executors/arrange/run.py)\nScope: Medium\n1. Replace the current binary generative prompt extension with a pool digest grouped by runtime/classified kind: VIDEO, IMAGE, AUDIO, TEXT, EFFECT.\n2. Keep one LLM call. The prompt should include per-kind guidance only for kinds present in the eligible pool.\n3. Preserve old behavior for homogeneous pools: source-cut briefs see only VIDEO/source guidance unless allow_generative_visuals is enabled; pure-generative briefs see generated IMAGE/EFFECT guidance.\n4. Keep _eligible_pool_ids(... include_generative=...) as the opt-in gate.\n\n### Step 10: Remove mixed source/generative rejection in cut (artagents/executors/cut/run.py)\nScope: Small\n1. Delete the args.video is not None and arrangement_uses_generative_visuals(...) rejection at cut/run.py:1149.\n2. Keep arrangement duration validation for arrangements that are not entirely generative.\n3. Verify build_multitrack_timeline() still puts generated visual provenance in hype.assets.json entries and never writes kind onto timeline clips.\n\n### Step 11: Audit refine for orchestration-only generative branching (artagents/executors/refine/run.py)\nScope: Small\n1. Confirm is_all_generative_arrangement() usage at refine/run.py:536 is only duration-domain validation.\n2. If mixed arrangements need the same source duration window validation, leave it intact.\n3. Do not remove the helper globally unless tests prove it is now dead.\n\n## Phase 4: Dry Run Plan Output\n\n### Step 12: Add top-level dry-run plan writer (artagents/orchestrators/hype/run.py)\nScope: Medium\n1. Add build_dry_run_plan(args, selected, skipped) that writes <out>/hype.plan.json.\n2. Include selected_steps, skipped_steps with reasons, runtime_facts, capability_intent.active_clip_kinds, redacted commands from step.build_cmd(args), and expected sentinel paths.\n3. Redact env/secrets-oriented values consistently with existing command-safe behavior if available; otherwise add a tiny redactor for --env-file values and environment-derived secrets.\n4. In pool_main(), after prepare_brief_artifacts(args) and before prefetch or run_step, short-circuit when args.dry_run is true.\n5. Add a test that patches artagents.orchestrators.hype.run.run_step and asserts it is never called.\n\n## Phase 5: Regression Tests And Mixed-Mode Proof\n\n### Step 13: Add mixed-mode fixture test (tests/test_mixed_mode_fixture.py)\nScope: Medium\n1. Build a pool containing one source VIDEO entry and one generative IMAGE/EFFECT entry, using existing pool schema helpers where possible.\n2. Create an arrangement using both entries and run cut.main() with --video and the mixed pool.\n3. Assert Timeline.load() succeeds, clip views classify as VIDEO and IMAGE/EFFECT as appropriate, no clip JSON contains persisted kind, and generative provenance remains in the asset registry.\n4. Assert the old source-plus-generative rejection no longer occurs.\n\n### Step 14: Update existing tests for new semantics\nScope: Medium\n1. Update tests/test_pure_generative_pipeline.py expectations so --allow-generative-effects is driven by resolved generative_visuals_enabled, not simply args.video is None.\n2. Add source-video mixed-mode tests for --allow-generative-effects and brief metadata opt-in.\n3. Update caching tests that assume static STEP_ORDER.index() forcing only where the behavior materially changed.\n4. Keep tests/test_executor_move_wrappers.py compatible by preserving STEP_ORDER as a topological-order hint.\n\n## Phase 6: Final Verification And Publish\n\n### Step 15: Run focused validation\nScope: Small\n1. Run pytest tests/test_executor_schema_capabilities.py -q.\n2. Run new selector and mixed-mode tests.\n3. Run pytest tests/test_timeline_roundtrip_fixture.py -q to protect Reigh JSON compatibility.\n\n### Step 16: Run broad repo validation\nScope: Medium\n1. Run pytest tests/ -q --ignore=tests/test_pool_schema.py --deselect tests/test_cut_timeline_resume.py::CutTimelineResumeTest::test_resume_mode_render_smoke.\n2. Run python3 -m artagents orchestrators list and python3 -m artagents executors list.\n3. Run three dry-run smoke commands with small temporary fixture inputs:\n - source video brief dry-run\n - pure-generative target-duration dry-run\n - source video plus --allow-generative-effects dry-run\n4. Run grep gates for no orchestration dispatch on is_all_generative_arrangement or if args.video / if args.audio in pipeline.py and hype/run.py.\n5. Commit and push directly to main after the suite is green.\n\n## Execution Order\n1. Land schema/manifests first, because selector tests need real capabilities.\n2. Add fact computation and selector behind tests while keeping build_pool_steps() unchanged.\n3. Wire selector into build_steps(), then fix --from against computed steps.\n4. Remove mixed-mode rejections only after the selector can opt into generative visuals explicitly.\n5. Add dry-run once selection explains both selected and skipped steps.\n6. Finish with the mixed-mode fixture and broad regression pass.\n\n## Validation Order\n1. Cheap schema tests after manifest edits.\n2. Selector unit tests for source, audio-only, pure-generative, and mixed-mode computed step sets.\n3. Cut/Timeline mixed-mode fixture.\n4. Dry-run no-executor-invocation test.\n5. Round-trip fixture.\n6. Full allowed suite and CLI smoke commands.","questions":["What exact brief metadata syntax should be supported for allow_generative_visuals in a plain .txt brief: YAML front matter, a leading key: value header block, JSON, or an existing local convention I have not found yet?","Should --dry-run include render/editor_review/validate only when --render is supplied, matching current execution gates, or should the plan file list those as skipped render-gated steps even without --render?"],"success_criteria":[{"criterion":"All 15 built-in hype executor manifests define valid non-empty clip_kinds_supported and pipeline_requirements fields, and registry loading still succeeds.","priority":"must","requires":["read_files","run_tests"]},{"criterion":"build_steps(args) selects steps through manifest capabilities and runtime facts, with no source/audio hard-coded branch deciding the step set in artagents/orchestrators/hype/run.py or artagents/pipeline.py.","priority":"must","requires":["read_files","parse_diff","run_tests"]},{"criterion":"--from errors against the computed dynamic step set when the step is known but absent, with a clear message listing the computed steps.","priority":"must","requires":["run_tests","read_build_output"]},{"criterion":"Source-video briefs preserve existing default behavior: generative visuals are not included unless brief metadata or CLI override enables them.","priority":"must","requires":["run_tests"]},{"criterion":"Mixed-mode cut accepts an arrangement combining source-derived VIDEO clips and generated IMAGE/EFFECT clips, writes Reigh-compatible timeline JSON, and does not persist clip.kind.","priority":"must","requires":["run_tests","read_files"]},{"criterion":"Generative provenance for mixed-mode output is represented in hype.assets.json asset registry entries, not on timeline clips.","priority":"must","requires":["run_tests","read_files"]},{"criterion":"Top-level --dry-run writes <out>/hype.plan.json with selected steps, skipped reasons, facts, active clip kinds, redacted commands, and expected sentinels, without invoking any executor.","priority":"must","requires":["run_tests","read_files"]},{"criterion":"tests/test_timeline_roundtrip_fixture.py passes, preserving byte-equivalent timeline round-trip behavior.","priority":"must","requires":["run_tests"]},{"criterion":"Broad verification command passes: pytest tests/ -q --ignore=tests/test_pool_schema.py --deselect tests/test_cut_timeline_resume.py::CutTimelineResumeTest::test_resume_mode_render_smoke.","priority":"must","requires":["run_tests"]},{"criterion":"python3 -m artagents orchestrators list and python3 -m artagents executors list both run successfully after changes.","priority":"must","requires":["run_shell","read_build_output"]},{"criterion":"The implementation keeps individual edit tasks small and localized, with selector logic separated from command construction.","priority":"should","requires":["parse_diff","subjective_judgment"]},{"criterion":"Dry-run skipped-step reasons are useful enough for a human to understand why a step was excluded without reading source code.","priority":"should","requires":["read_files","subjective_judgment"]},{"criterion":"Final commit is pushed directly to main.","priority":"info","requires":["run_shell"]}],"assumptions":["Brief metadata can be implemented as a small parser in the hype runner without changing arrangement JSON or timeline schema.","STEP_ORDER remains exported and unchanged as a topological ordering hint for compatibility tests and external imports.","build_pool_steps() should continue returning all 15 command/sentinel Step objects; dynamic selection belongs in build_steps(args) or a new selector helper.","The existing is_all_generative_arrangement() helper may remain for duration-validation logic; the requirement is to remove it as an orchestration/step-dispatch decision point.","Render, editor review, and validate remain gated by --render during actual execution, matching current behavior.","No Reigh or @banodoco/timeline-schema changes are needed; mixed-mode classification is runtime-derived via TimelineClipView.classified_kind."]}
You are already running inside the megaplan harness for this step. Do the requested planning/review/execution work directly. Do NOT invoke the megaplan CLI, do NOT read or activate the megaplan skill, do NOT start nested megaplan plans, and do NOT recurse into another planning harness. Treat mentions of megaplan in the repository or environment as implementation context only.
WRITE ACCESS CONTRACT: You are running with auto-approved writes inside a writable workspace. Treat the working directory as fully writable. Do NOT preemptively skip or block tasks on permission, sandbox, or read-only grounds. Attempt every required edit; only report failure AFTER a real OS-level rejection from a specific shell command. Do not infer 'read-only' from absence of activity; absence is not denial. If a single shell command unexpectedly fails, retry with a different invocation before concluding the environment is restricted.
You are revising an implementation plan after critique and gate feedback.
Phase 3 Part 2: Mixed-mode capability + manifest-driven step selection
Goal
Deliver the actual mixed-mode timeline capability that Phase 3 Part 1 set the foundation for. A brief should be able to produce a render that combines source-extracted VIDEO clips with generated IMAGE clips in one timeline. Make pipeline.py's mode-fork branches (if args.video, is_all_generative_arrangement) go away by replacing them with manifest-driven step selection that dispatches on each timeline clip's classified_kind.
Repo
/Users/user_c042661f/Documents/reigh-workspace/ArtAgents — currently on main at commit 0502d43 (Phase 3 Part 1). Working tree should be clean at start. Push directly to main when done.
What just landed (Phase 3 Part 1 — context)
Commit 0502d43 delivered:
artagents/pipeline.py reduced 1293 → 151 lines (now a thin CLI router with compatibility aliases for legacy imports: Step, STEP_ORDER, resolve_args, build_steps, run_step, pool_main).
artagents/orchestrators/hype/run.py: 1211 lines — owns parser, Step dataclass, command builders, sentinels/cache, audit/preflight/editor loop, pool_main, and main(). This is now the canonical hype orchestration.
15 hype executor.yamls + the runner repointed at artagents.orchestrators.hype.run.build_pool_steps (T3 from the prior plan).
artagents/executors/schema.py extended with two optional fields:
clip_kinds_supported: tuple[str, ...] — validates against ClipClassifiedKind (VIDEO/IMAGE/AUDIO/TEXT/EFFECT/OPAQUE)
pipeline_requirements: tuple[str, ...] — validates against a 21-fact allowlist (brief, pool, transcript, scenes, shots, quality_zones, scene_descriptions, scene_triage, quote_candidates, timeline, assets, metadata, source_video, source_audio, source_media, audio, video, rendered_video, theme, generative_visuals_enabled, target_duration)
tests/test_executor_schema_capabilities.py — 8 tests pinning the new schema fields.
Phase 3 Part 1 was megaplan tasks T1-T4 from a 13-task plan. The remaining T5-T13 became "Part 2," and that's what this run delivers. Codex stalled on T4 last time but the work T1-T4 produced is solid.
Settled design decisions (DO NOT debate during planning)
These were debated and decided in the outer conversation. The plan must respect them.
SD-001 — Mixed-mode arrange uses ONE LLM call with kind-aware context blocks
The arrange step gets a single prompt with the pool partitioned by classified_kind, plus per-kind guidance text in the prompt (e.g., "VIDEO clips have transcripts and are best for spoken content; IMAGE clips are generative and best for B-roll, transitions, or title cards."). Not separate LLM calls per kind. Not one homogeneous prompt that ignores kinds. The LLM stays the dispatcher; it just gets structured framing. Pure-generative briefs see a pool with only IMAGE/EFFECT entries (no VIDEO partition shown); source-cut briefs see only VIDEO entries — same behavior as today for those paths. load_bearing: true
SD-002 — --from <step> operates against the dynamic computed step set, not legacy STEP_ORDER
If the user runs --from refine on a brief that doesn't need refine, they get a clear error: "step 'refine' is not in this brief's computed step set: [transcribe, arrange, cut, render]". Not a silent skip-to-end. Not a "step unknown" error. The computed set is the source of truth; the static STEP_ORDER is preserved as a topological-order hint only. load_bearing: true
SD-003 — allow_generative_visuals lives in brief metadata, default false; CLI --allow-generative-effects is a transient override
Mixed-mode is an editorial decision, not a runtime one. The brief gets a top-level optional field allow_generative_visuals: true|false (default false). The CLI gains a flag --allow-generative-effects that overrides the brief for the current run only (does not write back to the brief). When allow_generative_visuals is false (default), source-cut behavior is unchanged for existing briefs. When true, the arrange step includes generative IMAGE entries in the pool and the cut step accepts mixed-kind arrangements. load_bearing: true
Constraints (non-negotiable, from earlier Reigh compatibility analysis)
Reigh compatibility — clip.kind is NEVER persisted. Reigh's clip allowlist (reigh-app/src/tools/video-editor/lib/serialize.ts:8-42) is closed and throws on unknown clip keys. ArtAgents' _CLIP_ALLOWED matches it byte-equivalent. All kind-based dispatch is runtime-only via Timeline.clips[i].classified_kind (Phase 2 added this).
Backwards-compat user-facing CLI — python3 -m artagents --video X.mp4 --brief brief.txt, --audio X.wav --brief brief.txt, and --brief brief.txt --target-duration 28 (pure-generative) all keep working with current behavior. They become hints that influence which clips get added to the timeline; behind the scenes they all converge on one path.
Topological order preserved — current pipeline ordering has real dependencies (e.g. pool_merge after pool_build for sources AND any generative pool); manifest-driven discovery must produce the same order when the same step set is needed. The static STEP_ORDER constant in hype/run.py (or wherever it lives now) becomes a topological-order hint, not the source of truth for which steps to run.
Schema package unchanged — clip kinds are runtime-derived. No @banodoco/timeline-schema changes.
Timeline round-trip stays byte-equivalent — tests/test_timeline_roundtrip_fixture.py is the regression gate.
What this delivers (the punch list)
Each item should be a small task (<300 LOC of edits, one focus area). Codex stalled on chunky single tasks in Phase 2 and Phase 3 Part 1 — split aggressively.
A. Add capabilities to all 15 hype executor manifests (mechanical)
For each of transcribe, scenes, quality_zones, shots, triage, scene_describe, quote_scout, pool_build, pool_merge, arrange, cut, refine, render, editor_review, validate, add clip_kinds_supported and pipeline_requirements to its executor.yaml. Suggested values:
The exact requirement names need to match PIPELINE_REQUIREMENT_FACTS in schema.py. If a name isn't in the allowlist, ADD it to the allowlist (don't fudge the manifest).
Suggest splitting this into 3-4 tasks (5 yamls per task) rather than one chunky task.
B. Replace STEP_ORDER usage in hype/run.py with registry-driven step selection
This is the substance. build_pool_steps() (or wherever step selection lives) should:
Look at the timeline's clips (or, before clips exist, the brief's declared kinds + --video/--audio/--allow-generative-effects hints) to determine which clip kinds are in play.
Query the executor registry for executors whose clip_kinds_supported intersects the active kinds AND whose pipeline_requirements are satisfiable.
Compute facts (e.g., "we have source_video", "we have source_audio", "generative_visuals_enabled is true") from the input.
Topologically order the resulting set using existing STEP_ORDER as a hint.
Return the ordered list; the runner runs it.
Keep the existing STEP_ORDER constant as a topological-order hint, not as the dispatch source of truth. Existing test monkeypatches of artagents.pipeline.run_step etc. should still work via the compatibility aliases.
Suggest splitting this into: (B1) implement the registry-driven selector function with unit tests; (B2) wire the selector into build_pool_steps; (B3) verify against the source-video / audio-only / pure-generative selected step lists captured during Phase 3 Part 1's T1 (those are baseline expectations).
C. Remove mixed-mode rejections in arrange/cut/refine
Find every place that calls is_all_generative_arrangement() or branches on if args.video/if args.audio for step-dispatch purposes (NOT for input parsing). Replace with clip-kind dispatch that handles mixed pools. The cut.py rejection of "video clips + generative visual_source pool entries in same arrangement" goes away — that's exactly the case mixed-mode enables.
Reigh-compat: NO new persisted clip fields. Generative provenance lives on the asset registry entry (already does today), not on the clip.
D. Add brief metadata field allow_generative_visuals
Brief loader (wherever it parses the brief) recognizes an optional allow_generative_visuals: true|false field defaulting to false. The hype runner exposes a CLI flag --allow-generative-effects that overrides the brief value for this run only. Both are surfaced as the generative_visuals_enabled runtime fact that the registry-driven selector uses.
E. Add top-level --dry-run writing hype.plan.json
The hype runner gains a --dry-run flag that does everything up to (but not including) actual executor invocation: parse args, prep brief, compute the step set with capabilities + facts + opt-in flags, build the redacted commands, and write <out>/hype.plan.json with:
selected_steps (in topological order)
skipped_steps (with reason: "no input satisfies requirements", "clip kind not in brief", etc.)
runtime_facts
capability_intent (active clip kinds)
redacted commands per step
expected sentinels
--dry-run must NOT call run_step or launch any child executor. Tests can patch artagents.orchestrators.hype.run.run_step to verify it's never invoked.
F. Mixed-mode fixture test
A new test file (tests/test_mixed_mode_fixture.py or similar) builds a brief with allow_generative_visuals: true, creates a pool with both a source-derived VIDEO clip entry and a generative IMAGE entry, mocks the arrange LLM to return an arrangement that uses both, runs cut.main() with --video AND mixed pool, and asserts:
The resulting timeline loads via Timeline.load() without error.
Timeline.clips[i].classified_kind returns VIDEO for one clip and IMAGE for the other.
No persisted clip.kind field anywhere in the JSON.
Generative provenance is on the asset registry entry, not on the clip.
The cut step did NOT raise "mixed source and generative" (the pre-Part-2 rejection).
This is the proof. Without it, nothing is shipped.
G. Final verification
pytest tests/ -q --ignore=tests/test_pool_schema.py --deselect tests/test_cut_timeline_resume.py::CutTimelineResumeTest::test_resume_mode_render_smoke — green
python3 -m artagents orchestrators list and executors list — work
python3 -m artagents --video X.mp4 --brief mixed_brief.txt --allow-generative-effects --dry-run — produces hype.plan.json with mixed-mode step set
Grep gate: is_all_generative_arrangement no longer used as a step-dispatch branch in pipeline.py or hype/run.py. (It can remain as a domain helper if used internally; it's not load-bearing for orchestration.)
Grep gate: if args.video: / if args.audio: no longer used as step-set branches in hype/run.py (input parsing is fine; step dispatch is not).
Round-trip fixture test (test_timeline_roundtrip_fixture.py) still passes.
Commit + push to main.
Out of scope
Pool / AssetRegistry domain class refactor (deferred to Phase 4).
Schema package changes (handled in Prereq A; mixed-mode adds zero new persisted fields).
Pre-existing test failures (tests/test_pool_schema.py and tests/test_cut_timeline_resume.py::test_resume_mode_render_smoke) — known broken before any of this work, not in scope.
Working notes
Codex has stalled in Phase 2 and Phase 3 Part 1 on chunky single tasks. Aim for 12-15 small tasks total, each <300 LOC of edits. Section A alone is ~3 tasks (5 yamls each); section B is ~3 tasks; sections C/D/E are ~1 task each; F is 1 task; G is 1 task. Roughly 10-12 tasks total.
ArtAgents pyenv 3.11.11 for python shell command; python3 works directly. Tests via pytest (no --timeout flag — plugin not installed).
Test command: pytest tests/ -q --ignore=tests/test_pool_schema.py --deselect tests/test_cut_timeline_resume.py::CutTimelineResumeTest::test_resume_mode_render_smoke
After major edits: python3 -m artagents orchestrators list && python3 -m artagents executors list (smoke).
The Timeline class from Phase 2 is the dispatch substrate. clip.classified_kind returns ClipClassifiedKind enum members; use those, not strings.
Direct push to main is the workflow. The user is the gatekeeper for any Reigh-side or schema-package changes (none expected here).
code
Current plan (markdown):
# Implementation Plan: Mixed-Mode Timeline Capability And Manifest-Driven Hype Selection
Overview
The repository is ready for this change structurally: artagents/pipeline.py is already a compatibility router, and canonical hype orchestration lives in artagents/orchestrators/hype/run.py. The remaining work is to move step selection out of hard-coded args.video / args.audio filters and into executor manifest capabilities, while preserving the existing Step command catalog and legacy import aliases.
15 hype executor.yaml manifests under artagents/executors/{transcribe,...,validate}/executor.yaml.
artagents/executors/arrange/run.py:272, :529, :566, :721 for kind-aware prompt framing and CLI flag pass-through.
artagents/executors/cut/run.py:1149 source-plus-generative rejection to remove.
artagents/executors/refine/run.py:536 duration branching that can remain domain validation, not orchestration dispatch.
The simplest durable fix is not to make the executor registry build commands. Keep build_pool_steps() as the authoritative command/sentinel catalog for compatibility, then add a selector layer that joins those Step objects with executor manifest capabilities and runtime facts.
Add any requirement names required by the punch list but absent from PIPELINE_REQUIREMENT_FACTS, especially arrangement if the cut manifest uses it.
Keep validation strict so bad manifest values fail early.
Run pytest tests/test_executor_schema_capabilities.py -q before touching selector logic.
Step 2: Add capabilities to first manifest batch
Scope: Small
Update executor.yaml for transcribe, scenes, quality_zones, shots, and triage with clip_kinds_supported and pipeline_requirements.
Use lower-case or upper-case consistently with existing schema normalization; tests should assert normalized values where needed.
Step 3: Add capabilities to second manifest batch
Scope: Small
Update scene_describe, quote_scout, pool_build, pool_merge, and arrange manifests.
Ensure pool_merge is marked broadly capable and requirement-light enough to always materialize a pool once a pool path is part of the flow.
Step 4: Add capabilities to third manifest batch
Scope: Small
Update cut, refine, render, editor_review, and validate manifests.
Preserve existing graph.provides, cache, metadata.pipeline_step, and command-builder fields unchanged.
Add a manifest validation test that loads the 15 built-in hype executors and asserts these two capability fields are non-empty.
Phase 2: Runtime Facts And Dynamic Step Selection
Step 5: Parse brief metadata and CLI override (artagents/orchestrators/hype/run.py)
Scope: Medium
Add --allow-generative-effects and --dry-run to the top-level hype parser at run.py:95.
Add a small brief metadata parser used during resolve_args(): default allow_generative_visuals=False, overridden transiently by CLI --allow-generative-effects=True.
Store the resolved value on args as args.generative_visuals_enabled without rewriting the brief file.
Keep current pure-generative behavior working: no video/audio plus --target-duration still enables generated visuals as part of the pure-generative mode.
Step 6: Implement selector data model and fact computation (artagents/orchestrators/hype/run.py)
Compute facts from inputs and known outputs: brief, source_video, source_audio, source_media, audio, video, theme, target_duration, generative_visuals_enabled, plus produced facts from selected upstream manifests.
Use artagents.executors.registry.load_builtin_executors() or a narrow registry lookup for builtin.<step> definitions, then join by metadata.pipeline_step or builtin.{step.name}.
Use STEP_ORDER only to order candidate steps and to drive dependency closure, not to decide which branches exist.
Step 7: Replace build_steps(args) filtering with selector output
Scope: Medium
Keep build_pool_steps() returning all 15 Step objects for compatibility with artagents.executors.runner and legacy tests.
Rewrite build_steps(args) to return select_hype_steps(args).selected_steps.
Preserve baseline selections:
source video: source analysis through pool, arrange, cut, optional render/review/validate when --render.
audio-only: transcribe, pool_merge, arrange, cut, plus render-gated downstream steps as currently expected.
no-audio pure generative: pool_merge, arrange, cut, render when requested, but no transcript-dependent validation.
Add focused tests in tests/test_hype_step_selection.py rather than overloading the existing caching tests.
Step 8: Make --from validate against computed steps
Scope: Small
Move --from validation out of resolve_args()’s static STEP_ORDER check at run.py:357, or defer final validation until after build_steps(args).
In _run_steps_once(), compute forcing using the selected step list index, not STEP_ORDER.index().
If the named step is known globally but absent from the computed set, raise the settled error shape: step 'refine' is not in this brief's computed step set: [...].
Keep truly unknown step names as clear usage errors.
Phase 3: Mixed-Mode Arrange, Cut, And Refine Behavior
Replace the current binary generative prompt extension with a pool digest grouped by runtime/classified kind: VIDEO, IMAGE, AUDIO, TEXT, EFFECT.
Keep one LLM call. The prompt should include per-kind guidance only for kinds present in the eligible pool.
Preserve old behavior for homogeneous pools: source-cut briefs see only VIDEO/source guidance unless allow_generative_visuals is enabled; pure-generative briefs see generated IMAGE/EFFECT guidance.
Keep _eligible_pool_ids(... include_generative=...) as the opt-in gate.
Step 10: Remove mixed source/generative rejection in cut (artagents/executors/cut/run.py)
Scope: Small
Delete the args.video is not None and arrangement_uses_generative_visuals(...) rejection at cut/run.py:1149.
Keep arrangement duration validation for arrangements that are not entirely generative.
Verify build_multitrack_timeline() still puts generated visual provenance in hype.assets.json entries and never writes kind onto timeline clips.
Step 11: Audit refine for orchestration-only generative branching (artagents/executors/refine/run.py)
Scope: Small
Confirm is_all_generative_arrangement() usage at refine/run.py:536 is only duration-domain validation.
If mixed arrangements need the same source duration window validation, leave it intact.
Do not remove the helper globally unless tests prove it is now dead.
Phase 4: Dry Run Plan Output
Step 12: Add top-level dry-run plan writer (artagents/orchestrators/hype/run.py)
Scope: Medium
Add build_dry_run_plan(args, selected, skipped) that writes <out>/hype.plan.json.
Include selected_steps, skipped_steps with reasons, runtime_facts, capability_intent.active_clip_kinds, redacted commands from step.build_cmd(args), and expected sentinel paths.
Redact env/secrets-oriented values consistently with existing command-safe behavior if available; otherwise add a tiny redactor for --env-file values and environment-derived secrets.
In pool_main(), after prepare_brief_artifacts(args) and before prefetch or run_step, short-circuit when args.dry_run is true.
Add a test that patches artagents.orchestrators.hype.run.run_step and asserts it is never called.
Phase 5: Regression Tests And Mixed-Mode Proof
Step 13: Add mixed-mode fixture test (tests/test_mixed_mode_fixture.py)
Scope: Medium
Build a pool containing one source VIDEO entry and one generative IMAGE/EFFECT entry, using existing pool schema helpers where possible.
Create an arrangement using both entries and run cut.main() with --video and the mixed pool.
Assert Timeline.load() succeeds, clip views classify as VIDEO and IMAGE/EFFECT as appropriate, no clip JSON contains persisted kind, and generative provenance remains in the asset registry.
Assert the old source-plus-generative rejection no longer occurs.
Step 14: Update existing tests for new semantics
Scope: Medium
Update tests/test_pure_generative_pipeline.py expectations so --allow-generative-effects is driven by resolved generative_visuals_enabled, not simply args.video is None.
Add source-video mixed-mode tests for --allow-generative-effects and brief metadata opt-in.
Update caching tests that assume static STEP_ORDER.index() forcing only where the behavior materially changed.
Keep tests/test_executor_move_wrappers.py compatible by preserving STEP_ORDER as a topological-order hint.
Phase 6: Final Verification And Publish
Step 15: Run focused validation
Scope: Small
Run pytest tests/test_executor_schema_capabilities.py -q.
Run new selector and mixed-mode tests.
Run pytest tests/test_timeline_roundtrip_fixture.py -q to protect Reigh JSON compatibility.
Step 16: Run broad repo validation
Scope: Medium
Run pytest tests/ -q --ignore=tests/test_pool_schema.py --deselect tests/test_cut_timeline_resume.py::CutTimelineResumeTest::test_resume_mode_render_smoke.
Run python3 -m artagents orchestrators list and python3 -m artagents executors list.
Run three dry-run smoke commands with small temporary fixture inputs:
source video brief dry-run
pure-generative target-duration dry-run
source video plus --allow-generative-effects dry-run
Run grep gates for no orchestration dispatch on is_all_generative_arrangement or if args.video / if args.audio in pipeline.py and hype/run.py.
Commit and push directly to main after the suite is green.
Execution Order
Land schema/manifests first, because selector tests need real capabilities.
Add fact computation and selector behind tests while keeping build_pool_steps() unchanged.
Wire selector into build_steps(), then fix --from against computed steps.
Remove mixed-mode rejections only after the selector can opt into generative visuals explicitly.
Add dry-run once selection explains both selected and skipped steps.
Finish with the mixed-mode fixture and broad regression pass.
Validation Order
Cheap schema tests after manifest edits.
Selector unit tests for source, audio-only, pure-generative, and mixed-mode computed step sets.
Cut/Timeline mixed-mode fixture.
Dry-run no-executor-invocation test.
Round-trip fixture.
Full allowed suite and CLI smoke commands.
code
Current plan metadata:
{
"version": 1,
"timestamp": "2026-05-03T03:23:51Z",
"hash": "sha256:fd68cf4c0488181ebef40143ac8b59caf52bff00e89973206851e11ed108f8df",
"questions": [
"What exact brief metadata syntax should be supported for allow_generative_visuals in a plain .txt brief: YAML front matter, a leading key: value header block, JSON, or an existing local convention I have not found yet?",
"Should --dry-run include render/editor_review/validate only when --render is supplied, matching current execution gates, or should the plan file list those as skipped render-gated steps even without --render?"
],
"success_criteria": [
{
"criterion": "All 15 built-in hype executor manifests define valid non-empty clip_kinds_supported and pipeline_requirements fields, and registry loading still succeeds.",
"priority": "must",
"requires": [
"read_files",
"run_tests"
]
},
{
"criterion": "build_steps(args) selects steps through manifest capabilities and runtime facts, with no source/audio hard-coded branch deciding the step set in artagents/orchestrators/hype/run.py or artagents/pipeline.py.",
"priority": "must",
"requires": [
"read_files",
"parse_diff",
"run_tests"
]
},
{
"criterion": "--from errors against the computed dynamic step set when the step is known but absent, with a clear message listing the computed steps.",
"priority": "must",
"requires": [
"run_tests",
"read_build_output"
]
},
{
"criterion": "Source-video briefs preserve existing default behavior: generative visuals are not included unless brief metadata or CLI override enables them.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "Mixed-mode cut accepts an arrangement combining source-derived VIDEO clips and generated IMAGE/EFFECT clips, writes Reigh-compatible timeline JSON, and does not persist clip.kind.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Generative provenance for mixed-mode output is represented in hype.assets.json asset registry entries, not on timeline clips.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Top-level --dry-run writes <out>/hype.plan.json with selected steps, skipped reasons, facts, active clip kinds, redacted commands, and expected sentinels, without invoking any executor.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "tests/test_timeline_roundtrip_fixture.py passes, preserving byte-equivalent timeline round-trip behavior.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "Broad verification command passes: pytest tests/ -q --ignore=tests/test_pool_schema.py --deselect tests/test_cut_timeline_resume.py::CutTimelineResumeTest::test_resume_mode_render_smoke.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": " and both run successfully after changes.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output"
]
},
{
"criterion": "The implementation keeps individual edit tasks small and localized, with selector logic separated from command construction.",
"priority": "should",
"requires": [
"parse_diff",
"subjective_judgment"
]
},
{
"criterion": "Dry-run skipped-step reasons are useful enough for a human to understand why a step was excluded without reading source code.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Final commit is pushed directly to .",
"priority": "info",
"requires": [
"run_shell"
]
}
],
"assumptions": [
"Brief metadata can be implemented as a small parser in the hype runner without changing arrangement JSON or timeline schema.",
" remains exported and unchanged as a topological ordering hint for compatibility tests and external imports.",
" should continue returning all 15 command/sentinel objects; dynamic selection belongs in or a new selector helper.",
"The existing helper may remain for duration-validation logic; the requirement is to remove it as an orchestration/step-dispatch decision point.",
"Render, editor review, and validate remain gated by during actual execution, matching current behavior.",
"No Reigh or changes are needed; mixed-mode classification is runtime-derived via ."
],
"structure_warnings": []
}
code
Gate summary:
{
"recommendation": "ITERATE",
"rationale": "Light robustness: single revision pass to incorporate critique feedback.",
"signals_assessment": "",
"warnings": [],
"settled_decisions": []
}
code
Open significant flags:
[
{
"id": "FLAG-001",
"severity": "significant",
"status": "open",
"concern": "Step selection: pool_merge is planned with pipeline_requirements=[pool], but pure-generative runs start with no pool.json; pool_merge is the step that creates a skeleton pool when the input path is absent. A selector that requires pool to be satisfiable before selecting pool_merge will skip it and break pure-generative dry-runs/runs.",
"evidence": "Plan Phase 1 Step 3 keeps pool_merge requirement-light but says requirements=[pool], while Phase 2 Step 6 selects only executors whose requirements are satisfiable. In the repo, artagents/executors/pool_merge/run.py:93-98 explicitly loads the pool only if it exists, otherwise _skeleton(), so pool is not a prerequisite for that step."
},
{
"id": "FLAG-002",
"severity": "significant",
"status": "open",
"concern": "Step selection: the proposed refine manifest requirements omit transcript, so the dynamic selector can include refine for no-audio pure-generative runs once timeline/assets/metadata exist. The actual refine CLI requires --transcript, and the hype command builder always points it at <out>/transcript.json, which does not exist in no-audio pure-generative mode.",
"evidence": "Plan Phase 1 Step 4 proposes refine requirements=[timeline, assets, metadata] and clip kinds including IMAGE/EFFECT. In the repo, artagents/executors/refine/run.py:58-65 requires --transcript, and artagents/orchestrators/hype/run.py:603-610 builds refine as a normal selected Step; current behavior avoids this via the args.audio is None filter."
},
{
"id": "FLAG-003",
"severity": "significant",
"status": "open",
"concern": "Mixed-mode proof: the plan assumes generated visual provenance already lives in hype.assets.json and that generated visuals can classify as IMAGE, but current cut materialization creates effect clips without an asset entry. Removing the mixed-mode rejection alone will not satisfy the stated provenance/classified-kind success criteria.",
"evidence": "For generative pool entries, artagents/executors/cut/run.py:532-564 appends a clip with clipType=<effect_id>, pool_id, and params, but no asset. Runtime classification in artagents/timeline.py:717-727 returns EFFECT for registered effect ids; IMAGE classification comes from asset registry entries, and registry validation at artagents/timeline.py:1008-1020 requires each asset entry to have file or ."
}
]
code
Requirements:
- Before addressing individual flags, check: does any flag suggest the plan is targeting the wrong code or the wrong root cause? If so, consider whether the plan needs a new approach rather than adjustments. Explain your reasoning.
- Update the plan to address the significant issues.
- Keep the plan readable and executable.
- Return flags_addressed with the exact flag IDs you addressed.
- Include `changes_summary` as a short plain-English summary of what changed in the revision. If there were no concrete flags, say that explicitly (for example: `No critique flags were raised; refined wording and kept the plan aligned for execution.`).
- Preserve or improve success criteria quality. Each criterion must have a `priority` of `must`, `should`, or `info`. Promote or demote priorities if critique feedback reveals a criterion was over- or under-weighted.
- Each success criterion should include a `requires` field listing the capabilities needed for verification. Valid capability strings: `run_shell`, `read_files`, `run_tests`, `parse_diff`, `read_build_output`, `run_linter` (container), `drive_browser`, `inspect_runtime_ui`, `observe_runtime_logs`, `subjective_judgment`, `verify_physical_device` (human). `must` criteria MUST have non-empty `requires`. Example: `{"criterion": "All tests pass", "priority": "must", "requires": ["run_tests"]}`.
- Verify that the plan remains aligned with the user's original intent, not just internal plan quality.
- Remove unjustified scope growth. If critique raised scope creep, narrow the plan back to the original idea unless the broader work is strictly required.
- Maintain the structural template: H1 title, ## Overview, phase sections with numbered step sections, ## Execution Order or ## Validation Order.
- CRITICAL: Your entire revised plan markdown (all sections) must be output as the `plan` field in the structured output. The prose response must not contain the plan text.
- CRITICAL: Return only the structured JSON object for the schema fields `plan`, `changes_summary`, `flags_addressed`, `assumptions`, `success_criteria`, and `questions`. Do not add commentary before or after the JSON object.
Plan template — simple format (adapt to the actual repo and scope):
md
# Implementation Plan: [Title]
## Overview
Summarize the goal, current repository shape, and the constraints that matter.
## Main Phase
### Step 1: Audit the current behavior (`megaplan/prompts.py`)
**Scope:** Small
1. **Inspect** the current implementation and call out the exact insertion points (`megaplan/prompts.py:29`).
### Step 2: Add the first change (`megaplan/evaluation.py`)
**Scope:** Medium
1. **Implement** the smallest viable change with exact file references (`megaplan/evaluation.py:1`).
2. **Capture** any tricky behavior with a short example.
```python
issues = validate_plan_structure(plan_text)
```
### Step 3: Wire downstream behavior (`megaplan/handlers.py`, `megaplan/workers.py`)
**Scope:** Medium
1. **Update** the runtime flow in the touched files (`megaplan/handlers.py:400`, `megaplan/workers.py:199`).
### Step 4: Prove the change (`tests/test_evaluation.py`, `tests/test_megaplan.py`)
**Scope:** Small
1. **Run** the cheapest targeted checks first (`tests/test_evaluation.py:1`).
2. **Finish** with broader verification once the wiring is in place (`tests/test_megaplan.py:1`).
## Execution Order
1. Update prompts and mocks before enforcing stricter validation.
2. Land higher-risk wiring after the validator and tests are ready.
## Validation Order
1. Start with focused unit tests.
2. Run the broader suite after the flow changes are in place.
For complex plans, use multiple phases:
md
## Phase 1: Foundation — Dependencies, DB, Types
### Step 1: Install dependencies (`package.json`)
...
### Step 2: Create database migration (`supabase/migrations/`)
...
## Phase 2: Core Integration
### Step 3: Port the main component (`src/components/`)
...
Template guidance:
Simple plans: use ## Main Phase with ### Step N: sections underneath.
Complex plans: use multiple ## Phase N: sections, each containing ### Step N: steps. Step numbers are global (not per-phase).
The flat ## Step N: format (without phases) also works for backwards compatibility.
Key invariants: one H1 title, one ## Overview, numbered step sections (### Step N: or ## Step N:), and at least one ordering section.
{
"plan": "# Implementation Plan: Mixed-Mode Timeline Capability And Manifest-Driven Hype Selection\n\n## Overview\nDeliver Phase 3 Part 2 by making hype step selection manifest-driven and by allowing a single timeline to combine source-derived VIDEO clips with generated IMAGE clips. The current plan is still targeting the right root cause: orchestration is selected by hard-coded mode branches in artagents/orchestrators/hype/run.py, while mixed-mode is blocked by a source-plus-generative rejection in artagents/executors/cut/run.py and binary arrange prompt framing in artagents/executors/arrange/run.py.\n\nThe critique does not point to the wrong code; it identifies three selector/materialization details that must be corrected before implementation:\n- pool_merge is a pool materializer, not a pool consumer. It must be selectable even when pool.json does not exist.\n- refine currently requires a transcript through its CLI and command builder. The manifest and selector must reflect that so no-audio pure-generative runs do not select it.\n- Generated visual provenance is not automatically an IMAGE asset today. Mixed-mode IMAGE support needs explicit cut materialization for generated image-backed pool entries, not just removal of the old rejection.\n\nConcrete touch points remain:\n- artagents/orchestrators/hype/run.py:95 parser, :268 arg normalization, :472 static command catalog, :748 hard-coded step filter, :1026--from forcing logic, :1077 runner entry.\n- artagents/executors/schema.py:27 capability requirement allowlist.\n- 15 hype manifests under artagents/executors/{transcribe,...,validate}/executor.yaml.\n- artagents/executors/arrange/run.py:272, :529, :566, :721 for kind-aware prompt framing and CLI flag pass-through.\n- artagents/executors/cut/run.py:532, :748, :1149 for generated visual materialization and source-plus-generative rejection.\n- artagents/executors/refine/run.py:58 and :536 for transcript dependency and duration-domain validation.\n\nKeep build_pool_steps() as the authoritative command/sentinel catalog for compatibility. Add a selector layer that joins those Step objects with executor manifest capabilities, graph-provided facts, and runtime input facts.\n\n## Phase 1: Capability Metadata Foundation\n\n### Step 1: Correct requirement vocabulary and selector semantics (artagents/executors/schema.py)\nScope: Small\n1. Add arrangement to PIPELINE_REQUIREMENT_FACTS because cut consumes it.\n2. Do not force every step to have a prerequisite: allow pool_merge to use an empty pipeline_requirements list because it creates a skeleton pool when no pool.json exists.\n3. Keep validation strict for unknown facts and invalid clip kinds.\n4. Run pytest tests/test_executor_schema_capabilities.py -q before selector work.\n\n### Step 2: Add capabilities to first manifest batch\nScope: Small\n1. Update executor.yaml for transcribe, scenes, quality_zones, shots, and triage with clip_kinds_supported and pipeline_requirements.\n2. Use the schema-normalized clip kind values consistently.\n\n### Step 3: Add capabilities to second manifest batch\nScope: Small\n1. Update scene_describe, quote_scout, pool_build, pool_merge, and arrange manifests.\n2. Set pool_merge.pipeline_requirements=[], despite the earlier suggested [pool], because pool_merge itself materializes the pool and must run in pure-generative starts.\n3. Keep pool_merge.cache.always_run behavior intact so generated entries are refreshed/materialized consistently.\n\n### Step 4: Add capabilities to third manifest batch\nScope: Small\n1. Update cut, refine, render, editor_review, and validate manifests.\n2. Set cut.pipeline_requirements=[arrangement, pool].\n3. Set refine.pipeline_requirements=[timeline, assets, metadata, transcript] to match its required --transcript CLI and prevent no-audio pure-generative selection.\n4. Preserve existing graph.provides, cache, metadata.pipeline_step, and command-builder fields unchanged.\n5. Add a manifest validation test that loads the 15 built-in hype executors and asserts capability fields are populated, except pool_merge which is allowed to have empty requirements.\n\n## Phase 2: Runtime Facts And Dynamic Step Selection\n\n### Step 5: Parse brief metadata and CLI override (artagents/orchestrators/hype/run.py)\nScope: Medium\n1. Add --allow-generative-effects and --dry-run to the top-level hype parser at run.py:95.\n2. Add a small brief metadata parser used during resolve_args(): default allow_generative_visuals=False, overridden transiently by CLI --allow-generative-effects=True.\n3. Store the resolved value on args as args.generative_visuals_enabled without rewriting the brief file.\n4. Preserve pure-generative behavior: no video/audio plus --target-duration still enables generated visuals as part of that mode even if source-video mixed mode defaults false.\n\n### Step 6: Implement selector result and fact computation (artagents/orchestrators/hype/run.py)\nScope: Medium\n1. Add helpers near build_steps():\n - compute_runtime_facts(args) -> set[str]\n - compute_active_clip_kinds(args, facts) -> set[str]\n - select_hype_steps(args, *, include_skipped=False) -> SelectionResult\n2. Initial runtime facts should include direct inputs only: brief, source_video, source_audio, source_media, audio, video, theme, target_duration, generative_visuals_enabled.\n3. During selection, add provided facts from selected upstream executors using existing manifest graph.provides, so requirements like pool, arrangement, timeline, assets, and rendered_video can become satisfiable.\n4. Treat pool_merge as a materializer with no prerequisite facts, not as a consumer requiring pool.\n5. Use STEP_ORDER only as the topological iteration/order hint and never as the branch source.\n\n### Step 7: Replace build_steps(args) filtering with selector output\nScope: Medium\n1. Keep build_pool_steps() returning all 15 Step objects for compatibility with artagents.executors.runner and legacy monkeypatches.\n2. Rewrite build_steps(args) to return select_hype_steps(args).selected_steps.\n3. Preserve baseline selections:\n - source video: source analysis through pool, arrange, cut, optional render/review/validate when --render.\n - audio-only: transcribe, pool_merge, arrange, cut, and render-gated downstream steps that have transcript requirements.\n - no-audio pure generative: pool_merge, arrange, cut, render when requested, but no refine/editor_review/validate because transcript is absent.\n4. Add focused tests in tests/test_hype_step_selection.py for source-video, audio-only, no-audio pure-generative, mixed-mode opt-in, and pool_merge-without-existing-pool.\n\n### Step 8: Make --from validate against computed steps\nScope: Small\n1. Move final --from validation out of resolve_args()’s static STEP_ORDER check at run.py:357 and into the selected-step path.\n2. In _run_steps_once(), compute forcing using the selected step list index, not STEP_ORDER.index().\n3. If the named step is known globally but absent from the computed set, raise: step 'refine' is not in this brief's computed step set: [...].\n4. Keep truly unknown step names as clear usage errors.\n\n## Phase 3: Mixed-Mode Arrange, Cut, And Generated Image Materialization\n\n### Step 9: Add kind-aware arrange prompt framing (artagents/executors/arrange/run.py)\nScope: Medium\n1. Replace the current binary generative prompt extension with a pool digest grouped by runtime/classified kind: VIDEO, IMAGE, AUDIO, TEXT, EFFECT.\n2. Keep one LLM call. Include per-kind guidance only for kinds present in the eligible pool.\n3. Preserve old behavior for homogeneous pools: source-cut briefs see only VIDEO/source guidance unless allow_generative_visuals is enabled; pure-generative briefs see only generated IMAGE/EFFECT entries.\n4. Keep _eligible_pool_ids(... include_generative=...) as the opt-in gate.\n\n### Step 10: Materialize generated IMAGE pool entries in cut (artagents/executors/cut/run.py, artagents/timeline.py if needed)\nScope: Medium\n1. Inspect the current pool entry shape accepted by timeline.validate_pool() and the generated entries emitted by pool_merge before editing.\n2. Add the smallest cut-side support for generated image-backed pool entries: when a generative visual pool entry references a file/url image asset through an existing or minimally extended ArtAgents pool field, register that image in hype.assets.json and emit a normal media/image clip that classifies as IMAGE through TimelineClipView.classified_kind.\n3. Keep generated effect entries as EFFECT clips; do not pretend text-card/effect clips are IMAGE.\n4. Do not persist kind or any other new classification field on timeline clips.\n5. Keep provenance on the asset registry entry or pool metadata copied into registry metadata, not on the clip.\n\n### Step 11: Remove mixed source/generative rejection in cut (artagents/executors/cut/run.py)\nScope: Small\n1. Delete the args.video is not None and arrangement_uses_generative_visuals(...) rejection at cut/run.py:1149 after generated IMAGE materialization exists.\n2. Keep arrangement duration validation for arrangements that are not entirely generative.\n3. Add regression coverage so source-video plus generated IMAGE no longer raises the pre-Part-2 rejection.\n\n### Step 12: Audit refine for orchestration-only generative branching (artagents/executors/refine/run.py)\nScope: Small\n1. Confirm is_all_generative_arrangement() usage at refine/run.py:536 is only duration-domain validation.\n2. Leave mixed arrangements subject to source duration window validation unless tests prove the domain rule is wrong.\n3. Do not remove is_all_generative_arrangement() globally unless it becomes dead after tests.\n\n## Phase 4: Dry Run Plan Output\n\n### Step 13: Add top-level dry-run plan writer (artagents/orchestrators/hype/run.py)\nScope: Medium\n1. Add build_dry_run_plan(args, selection) that writes <out>/hype.plan.json.\n2. Include selected_steps, skipped_steps with reasons, runtime_facts, capability_intent.active_clip_kinds, redacted commands from step.build_cmd(args), and expected sentinel paths.\n3. Include render/review/validate according to current execution gates: if --render is absent, record render-gated steps as skipped rather than selected.\n4. Redact env/secrets-oriented values consistently with existing command-safe behavior if available; otherwise add a tiny redactor for --env-file values and environment-derived secrets.\n5. In pool_main(), after prepare_brief_artifacts(args) and before prefetch or run_step, short-circuit when args.dry_run is true.\n6. Add a test that patches artagents.orchestrators.hype.run.run_step and asserts it is never called.\n\n## Phase 5: Regression Tests And Mixed-Mode Proof\n\n### Step 14: Add mixed-mode fixture test (tests/test_mixed_mode_fixture.py)\nScope: Medium\n1. Build a brief with allow_generative_visuals: true using the chosen brief metadata syntax.\n2. Create a pool with one source-derived VIDEO entry and one generated image-backed IMAGE entry.\n3. Mock the arrange LLM or call the arrange builder with a fake client so the arrangement uses both entries in one response.\n4. Run cut.main() with --video and the mixed pool.\n5. Assert Timeline.load() succeeds, one clip classifies as VIDEO and one as IMAGE, no persisted clip contains kind, and generated provenance is on the asset registry entry.\n6. Assert the old source-plus-generative rejection no longer occurs.\n\n### Step 15: Update existing tests for new semantics\nScope: Medium\n1. Update tests/test_pure_generative_pipeline.py expectations so generative inclusion is driven by args.generative_visuals_enabled, pure-generative mode, or explicit source-video opt-in, not simply args.video is None.\n2. Add source-video mixed-mode tests for --allow-generative-effects and brief metadata opt-in.\n3. Update caching tests that assume static STEP_ORDER.index() forcing only where dynamic --from behavior changes.\n4. Keep tests/test_executor_move_wrappers.py compatible by preserving STEP_ORDER as a topological-order hint.\n\n## Phase 6: Final Verification And Publish\n\n### Step 16: Run focused validation\nScope: Small\n1. Run pytest tests/test_executor_schema_capabilities.py -q.\n2. Run new selector, dry-run, and mixed-mode fixture tests.\n3. Run pytest tests/test_timeline_roundtrip_fixture.py -q to protect Reigh JSON compatibility.\n\n### Step 17: Run broad repo validation\nScope: Medium\n1. Run pytest tests/ -q --ignore=tests/test_pool_schema.py --deselect tests/test_cut_timeline_resume.py::CutTimelineResumeTest::test_resume_mode_render_smoke.\n2. Run python3 -m artagents orchestrators list and python3 -m artagents executors list.\n3. Run three dry-run smoke commands with small temporary fixture inputs:\n - source video brief dry-run\n - pure-generative target-duration dry-run\n - source video plus --allow-generative-effects dry-run\n4. Run grep gates for no orchestration dispatch on is_all_generative_arrangement or if args.video / if args.audio in pipeline.py and hype/run.py.\n5. Commit and push directly to main after the suite is green.\n\n## Execution Order\n1. Land schema/manifests first, with pool_merge and refine requirements corrected before selector tests.\n2. Add fact computation and selector behind tests while keeping build_pool_steps() unchanged.\n3. Wire selector into build_steps(), then fix --from against computed steps.\n4. Add generated IMAGE materialization, then remove the mixed-mode cut rejection.\n5. Add kind-aware arrange prompt framing after the pool/cut shape is clear.\n6. Add dry-run once selection explains both selected and skipped steps.\n7. Finish with mixed-mode fixture, round-trip regression, broad verification, commit, and push.\n\n## Validation Order\n1. Cheap schema tests after manifest edits.\n2. Selector unit tests for source, audio-only, pure-generative, mixed-mode, and pool_merge-without-pool.\n3. Cut/Timeline mixed-mode IMAGE fixture.\n4. Dry-run no-executor-invocation test.\n5. Round-trip fixture.\n6. Full allowed suite and CLI smoke commands.",
"changes_summary": "Revised the plan to treat pool_merge as a materializer with no pool prerequisite, add transcript to refine requirements, and explicitly plan generated IMAGE asset materialization in cut before removing the mixed-mode rejection.",
"flags_addressed": [
"FLAG-001",
"FLAG-002",
"FLAG-003"
],
"assumptions": [
"Brief metadata can be implemented as a small parser in the hype runner without changing arrangement JSON or timeline schema.",
"STEP_ORDER remains exported and unchanged as a topological ordering hint for compatibility tests and external imports.",
"build_pool_steps() continues returning all 15 command/sentinel Step objects; dynamic selection belongs in build_steps(args) or a new selector helper.",
"pool_merge may have empty pipeline_requirements because it creates a skeleton pool when no input pool exists.",
"refine remains transcript-dependent until its CLI and implementation are intentionally changed; no-audio pure-generative runs should not select it.",
"Generated text-card/effect entries classify as EFFECT. The mixed-mode IMAGE proof requires generated image-backed pool entries to materialize as asset-backed media clips.",
"The existing is_all_generative_arrangement() helper may remain for duration-validation logic; the requirement is to remove it as an orchestration/step-dispatch decision point.",
"Render, editor review, and validate remain gated by --render during actual execution, matching current behavior.",
"No Reigh or @banodoco/timeline-schema changes are needed; mixed-mode classification is runtime-derived via TimelineClipView.classified_kind."
],
"success_criteria": [
{
"criterion": "All 15 built-in hype executor manifests define valid clip_kinds_supported; all define appropriate pipeline_requirements, with pool_merge explicitly allowed to have an empty requirement list, and registry loading still succeeds.",
"priority": "must",
"requires": [
"read_files",
"run_tests"
]
},
{
"criterion": "pool_merge is selected for pure-generative dry-runs/runs even when <out>/pool.json does not exist.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "refine is not selected for no-audio pure-generative runs unless a transcript fact is available.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "build_steps(args) selects steps through manifest capabilities, produced facts, and runtime facts, with no source/audio hard-coded branch deciding the step set in artagents/orchestrators/hype/run.py or artagents/pipeline.py.",
"priority": "must",
"requires": [
"read_files",
"parse_diff",
"run_tests"
]
},
{
"criterion": "--from errors against the computed dynamic step set when the step is known but absent, with a clear message listing the computed steps.",
"priority": "must",
"requires": [
"run_tests",
"read_build_output"
]
},
{
"criterion": "Source-video briefs preserve existing default behavior: generative visuals are not included unless brief metadata or CLI override enables them.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "Mixed-mode cut accepts an arrangement combining source-derived VIDEO clips and generated IMAGE clips, writes Reigh-compatible timeline JSON, and does not persist clip.kind.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Generated IMAGE provenance for mixed-mode output is represented in hype.assets.json asset registry entries, not on timeline clips.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Generated EFFECT entries remain classified as EFFECT and are not mislabeled as IMAGE.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Top-level --dry-run writes <out>/hype.plan.json with selected steps, skipped reasons, facts, active clip kinds, redacted commands, and expected sentinels, without invoking any executor.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "tests/test_timeline_roundtrip_fixture.py passes, preserving byte-equivalent timeline round-trip behavior.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "Broad verification command passes: pytest tests/ -q --ignore=tests/test_pool_schema.py --deselect tests/test_cut_timeline_resume.py::CutTimelineResumeTest::test_resume_mode_render_smoke.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "python3 -m artagents orchestrators list and python3 -m artagents executors list both run successfully after changes.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output"
]
},
{
"criterion": "The implementation keeps individual edit tasks small and localized, with selector logic separated from command construction.",
"priority": "should",
"requires": [
"parse_diff",
"subjective_judgment"
]
},
{
"criterion": "Dry-run skipped-step reasons are useful enough for a human to understand why a step was excluded without reading source code.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Final commit is pushed directly to main.",
"priority": "info",
"requires": [
"run_shell"
]
}
],
"questions": [
"What exact brief metadata syntax should be supported for allow_generative_visuals in a plain .txt brief: YAML front matter, a leading key: value header block, JSON, or an existing local convention I have not found yet?",
"What generated image-backed pool entry shape should be considered canonical if no existing one is already supported: a file/url field on the generative pool entry, a nested asset object, or metadata pointing to an asset registry entry?"
]
}
“You are already running inside the megaplan harness for this step. Do the requested….” Conversation with gpt-5.5, from the Peter O’Mallet DataClaw Conversations dataset. The Chat Archive, 2026. https://thechatarchive.com/c/01m80eqfp7dyj6nmz6r27jyyhc