Restructure the 37 root-level Python modules into a proper package:
clipwright/{core,api,pipeline,layouts,media,integrations,tools}
- Rewrite every local import (module-level and deferred) to absolute
clipwright.<group>.<mod> form; no legacy root shims or re-exports.
- Add clipwright/core/paths.py and route fonts/assets/cookies through it.
- Entry points: uvicorn clipwright.api.app:app; jobs run as
python -m clipwright.pipeline.main; probe as -m ...quality_probe.
- child_env() appends REPO_ROOT to PYTHONPATH so the -m workers work.
- transcribe_backends: sys.modules key now clipwright.media.scene_detection.
- Tooling: root pyproject.toml (pytest pythonpath=[.], ruff), shared
requirements-test.txt, CI installs it, Docker PYTHONPATH=/app.
- Tests: all imports/fakes/source-scans repointed; new tests/test_package_layout.py
enforces no root modules, docstring-only __init__, and no legacy imports.
- Docs/comments updated for the new layout.
Backend: 744 passed, 19 skipped. Frontend lint+build green.
- test_hooks.py: the 6-style contract the frontend mirrors (boxed vs
outline), fixed-bitmap emoji rescaling (_emoji_scale/_measure_width),
and create_hook_image rendering every style (emoji included) with the
unknown-style fallback.
- test_hook_layers.py: _strip_burned_hook walk-back (hooked_/legacy hook_,
missing-file stop), the two-step subtitled->hooked->clean strip /api/hook
replaces through, and _canonical_clip_file resolving hook chains with
newest-derivation-wins.