How anhtu604/pyh works
Protect Your Health is an offline-first workflow for producing Vietnamese preventive-health videos from an operator-selected topic and doctor-approved brief, through evidence, script and storyboard, to rendered video, two explicit doctor reviews, and a manual publishing package. The graph preserves the v2 workflow kernel, evidence and visual-asset branches, AI-clip handoff, and voice/render capabilities. Edges follow README descriptions or shown source references; some implementation links are omitted because the sampled excerpts do not establish them.
Main entry points: cli.py Command interface · produce.py Video production · gate_review.py Doctor review gates · evidence.py Evidence research
Components 25
Editorial workflow
- Topic selection
src/healthvideo/workflows/topic.py - Project setup
src/healthvideo/workflows/create_project_v2.py - Brief and script
src/healthvideo/workflows/author.py - Evidence research
src/healthvideo/workflows/evidence.py - Evidence clients
src/healthvideo/evidence/clients.py - Storyboard
src/healthvideo/domain/storyboard.py
Workflow kernel
- Workflow state
src/healthvideo/domain/state_graph.py - Revision storage
src/healthvideo/storage/revisions.py
Media production
- Visual asset workflow
src/healthvideo/workflows/visual_assets.py - Asset manifest
src/healthvideo/domain/asset_manifest.py - AI clip workflow
src/healthvideo/workflows/ai_clips.py - Veo provider
src/healthvideo/video_ai/veo.py - Speech generation
src/healthvideo/tts - Video production
src/healthvideo/workflows/produce.py - Render input
src/healthvideo/render/input.py - Remotion renderer
src/healthvideo/render/remotion.py - Video composition
video/src/HealthVideo.tsx - Captions
video/src/components/Captions.tsx
Review and release
- Doctor review gates
src/healthvideo/workflows/gate_review.py - HTML review packet
src/healthvideo/workflows/review_html.py - Second-model handoff
src/healthvideo/workflows/agent_review.py - Publishing package
src/healthvideo/workflows/package.py
Operator support
- Command interface
src/healthvideo/cli.py - Project backup
src/healthvideo/workflows/backup.py
Other components
- Operator / doctor
Connections 24
- Operator / doctor → Command interface: issues commands
README.md - Command interface → Topic selection: runs selection
src/healthvideo/cli.py - Command interface → Project setup: creates project
README.md - Command interface → Brief and script: runs authoring
- Command interface → Evidence research: starts research
README.md - Evidence research → Evidence clients: uses clients
src/healthvideo/evidence/clients.py - Command interface → Doctor review gates: runs approvals
src/healthvideo/cli.py - Command interface → Second-model handoff: manages handoff
src/healthvideo/cli.py - Command interface → Video production: starts production
README.md - Command interface → Publishing package: creates package
README.md - Video production → Speech generation: generates speech
README.md - Video production → Render input: prepares input
- Video production → Remotion renderer: renders video
README.md - Remotion renderer → Video composition: renders composition
- Video composition → Captions: renders captions
- Visual asset workflow → Asset manifest: registers assets
src/healthvideo/workflows/gate_review.py - AI clip workflow → Asset manifest: updates manifest
src/healthvideo/workflows/ai_clips.py - AI clip workflow → Veo provider: requests clips
- Doctor review gates → Asset manifest: hashes assets
src/healthvideo/workflows/gate_review.py - Doctor review gates → Workflow state: advances state
src/healthvideo/workflows/gate_review.py - Doctor review gates → Revision storage: records review
- HTML review packet → Evidence research: reads evidence
src/healthvideo/workflows/review_html.py - HTML review packet → Storyboard: reads scenes
src/healthvideo/workflows/review_html.py - Project backup → Revision storage: backs up project