# Task Assignment: Milestone M4 Iteration 2 Remediation Implementer

## Timestamp
2026-10-09T08:42:00Z

## Assigned Subagent
- Role: M4 Remediation Implementer (`worker_m4_remediation_2`)
- Type: teamwork_preview_worker
- Working Directory: c:\Projects\KieuStory\.agents\teamwork\worker_m4_remediation_2

## Context & Authoritative References
- Authoritative User Request: c:\Projects\KieuStory\.agents\teamwork\ORIGINAL_REQUEST.md
- Scope Document: c:\Projects\KieuStory\.agents\teamwork\orchestrator_1\PROJECT.md
- Remediation Plan: c:\Projects\KieuStory\.agents\teamwork\explorer_m4_remediation_1\remediation_plan.md
- Explorer Handoff: c:\Projects\KieuStory\.agents\teamwork\explorer_m4_remediation_1\handoff.md
- Iteration 1 Forensic Audit Report: c:\Projects\KieuStory\.agents\teamwork\auditor_m4_1\handoff.md
- Iteration 1 Challenger 1 Report: c:\Projects\KieuStory\.agents\teamwork\challenger_m4_1\handoff.md
- Iteration 1 Reviewer 2 Report: c:\Projects\KieuStory\.agents\teamwork\reviewer_m4_2\handoff.md

## Mandatory Integrity Warning
DO NOT CHEAT. All implementations must be genuine. DO NOT hardcode test results, create dummy/facade implementations, or circumvent the intended task. A teamwork_preview_auditor will independently verify your work. Integrity violations WILL be detected and your work WILL be rejected.

## Write Ownership
- c:\Projects\KieuStory\05_Production_Pipeline\production_orchestrator.py
- c:\Projects\KieuStory\tools\update_banana_turnaround_prompts.py
- c:\Projects\KieuStory\tools\manage_turnaround_sheets.py
- c:\Projects\KieuStory\02_AI_Prompts\gemini_banana_prompts.json
- c:\Projects\KieuStory\tests\test_production_pipeline_m4.py
- Relocation destination: c:\Projects\KieuStory\04_Assets\turnaround_sheets\
- STRICT PRESERVATION / READ-ONLY:
  * 04_Assets/characters/ 62 Git-tracked canonical files (DO NOT MODIFY, ALTER OR DELETE)
  * 04_Assets/archive/ep01_legacy_v1/ (DO NOT MODIFY OR DELETE)

## Step-by-Step Execution Tasks
Follow `remediation_plan.md` in exact order:
1. Relocate Untracked Character Assets:
   - Identify all untracked files in `04_Assets/characters/` (should be 55 files: 54 turnaround sheets + 1 view artifact).
   - Safely move them to `04_Assets/turnaround_sheets/` preserving subfolder structure.
   - Verify: `04_Assets/characters/` has exactly 62 files on disk. `git status -s 04_Assets/characters` is empty.
2. Update Turnaround Generation Tools & Prompts:
   - In `tools/update_banana_turnaround_prompts.py`: update lines 426-427 to use `04_Assets/turnaround_sheets/`.
   - In `tools/manage_turnaround_sheets.py`: update line 17 to use `04_Assets/turnaround_sheets/`.
   - Run `python tools/update_banana_turnaround_prompts.py` to sync `02_AI_Prompts/gemini_banana_prompts.json`.
3. Fix Fallback Concat Stream Specifier Probe:
   - In `05_Production_Pipeline/production_orchestrator.py`:
     * Line 106: import `get_ffprobe` from `audio_continuity_engine` (`try...from audio_continuity_engine import AudioContinuityEngine, get_ffmpeg, get_ffprobe...except ImportError: get_ffprobe = lambda: "ffprobe"`).
     * Line 1170: replace `ffprobe_exe = ffmpeg_exe.replace("ffmpeg", "ffprobe")` with `ffprobe_exe = get_ffprobe()`.
4. Add Regression Test for Fallback Concat:
   - In `tests/test_production_pipeline_m4.py`: add test `test_05_fallback_concat_with_silent_clip_without_crash` verifying that concatenating a clip with audio and a clip without audio via fallback path executes without error and yields valid AAC stereo audio.
5. Verification Suites:
   - `python -m pytest tests/test_m2_hygiene.py -v` (Must PASS 6/6)
   - `python -m pytest tests/test_adversarial_m4_audio_concat_probe.py -v` (Must PASS 5/5)
   - `python -m pytest tests/test_production_pipeline_m4.py -v` (Must PASS 16/16)
   - `python -m pytest tests/test_critic_gate.py -v` (Must PASS 30/30)
   - `python -m pytest tests/test_production_pipeline_m3.py tests/test_adversarial_m3_audio_engine.py tests/test_tier5_pipeline_hardening.py -q` (Must PASS 42/42)
6. Deliver Report:
   - Write comprehensive report to `c:\Projects\KieuStory\.agents\teamwork\worker_m4_remediation_2\handoff.md`.
   - Send completion message to parent orchestrator.


## 2026-10-09T08:41:05Z
You are Worker 2 for Milestone M4 Iteration 2 Remediation.

Your working directory is: c:\Projects\KieuStory\.agents\teamwork\worker_m4_remediation_2

MANDATORY FIRST STEP:
Read c:\Projects\KieuStory\.agents\teamwork\ORIGINAL_REQUEST.md completely. Do not skip this.
Read c:\Projects\KieuStory\.agents\teamwork\orchestrator_1\PROJECT.md.
Read c:\Projects\KieuStory\.agents\teamwork\worker_m4_remediation_2\DISPATCH.md.
Read c:\Projects\KieuStory\.agents\teamwork\explorer_m4_remediation_1\remediation_plan.md.
Read c:\Projects\KieuStory\.agents\teamwork\explorer_m4_remediation_1\handoff.md.

MANDATORY INTEGRITY WARNING:
DO NOT CHEAT. All implementations must be genuine. DO NOT hardcode test results, create dummy/facade implementations, or circumvent the intended task. A teamwork_preview_auditor will independently verify your work. Integrity violations WILL be detected and your work WILL be rejected.

EXCLUSIVE WRITE OWNERSHIP:
- c:\Projects\KieuStory\05_Production_Pipeline\production_orchestrator.py
- c:\Projects\KieuStory\tools\update_banana_turnaround_prompts.py
- c:\Projects\KieuStory\tools\manage_turnaround_sheets.py
- c:\Projects\KieuStory\02_AI_Prompts\gemini_banana_prompts.json
- c:\Projects\KieuStory\tests\test_production_pipeline_m4.py
- Relocation destination: c:\Projects\KieuStory\04_Assets\turnaround_sheets\
- STRICT PRESERVATION / READ-ONLY:
  * 04_Assets/characters/ 62 Git-tracked canonical files (DO NOT MODIFY, ALTER OR DELETE)
  * 04_Assets/archive/ep01_legacy_v1/ (DO NOT MODIFY OR DELETE)

TASKS TO EXECUTE IN EXACT ORDER (per remediation_plan.md):
1. Relocate Untracked Character Assets:
   - Identify all untracked files in 04_Assets/characters/ (should be 55 files: 54 turnaround sheets + 1 view artifact).
   - Safely move them to 04_Assets/turnaround_sheets/ preserving subfolder structure.
   - Clean up empty views directory if left behind.
   - Verify: 04_Assets/characters/ has exactly 62 files on disk. git status -s 04_Assets/characters is completely clean/empty.
2. Update Turnaround Generation Tools & Prompts:
   - In tools/update_banana_turnaround_prompts.py: update lines 426-427 to use 04_Assets/turnaround_sheets/.
   - In tools/manage_turnaround_sheets.py: update line 17 to use 04_Assets/turnaround_sheets/.
   - Run python tools/update_banana_turnaround_prompts.py to sync 02_AI_Prompts/gemini_banana_prompts.json.
3. Fix Fallback Concat Stream Specifier Probe:
   - In 05_Production_Pipeline/production_orchestrator.py:
     * Line 106: import get_ffprobe from audio_continuity_engine (with fallback lambda: "ffprobe").
     * Line 1170: replace ffprobe_exe = ffmpeg_exe.replace("ffmpeg", "ffprobe") with ffprobe_exe = get_ffprobe().
4. Add Regression Test for Fallback Concat with Silent Clips:
   - In tests/test_production_pipeline_m4.py: add test_05_fallback_concat_with_silent_clip_without_crash.
5. Verification Suites:
   - python -m pytest tests/test_m2_hygiene.py -v (Must PASS 6/6)
   - python -m pytest tests/test_adversarial_m4_audio_concat_probe.py -v (Must PASS 5/5)
   - python -m pytest tests/test_production_pipeline_m4.py -v (Must PASS 16/16)
   - python -m pytest tests/test_critic_gate.py -v (Must PASS 30/30)
   - python -m pytest tests/test_production_pipeline_m3.py tests/test_adversarial_m3_audio_engine.py tests/test_tier5_pipeline_hardening.py -q (Must PASS 42/42)
6. Deliver Report:
   - Write comprehensive report to c:\Projects\KieuStory\.agents\teamwork\worker_m4_remediation_2\handoff.md.
   - Send completion message to parent orchestrator.
