Phase 0 Classification

April 24, 2026 · View on GitHub

Authoritative freeze-and-classify table. Does not move files. Later phases execute actions per row phase column.

Vocabulary: keep (stays in place) · move (path change, same concept) · split (divide across 2+ destinations) · refactor (logic change) · archive (to archive/legacy-cli/<subdir>) · delete (remove outright) · decide-later (open question blocking action).

See 03-reorg-synthesis.md for the target architecture this classification lands into, and phases/phase-0-freeze-and-classify.md for the Phase 0 entry/exit criteria.

Summary counts

actionrows
keep47
move118
split9
refactor4
archive83
delete2
decide-later13
total276

src/cli/ core

CLI infrastructure. Most ergonomics keep; runtime.ts gets the critical coupling fix in Phase 2.

pathactiondestinationphasenotes
src/cli/index.tsrefactorsrc/cli/index.ts3Shrink COMMAND_LOADERS to surviving commands
src/cli/runtime.tsrefactor2Delete setCliRuntime; pass context explicitly
src/cli/hooks.tskeepCommander preAction plumbing
src/cli/colors.tskeepCLI-local ergonomics
src/cli/format.tskeepCLI-local ergonomics
src/cli/output.tskeepCLI-local ergonomics
src/cli/progress.tskeepCLI-local ergonomics
src/cli/ui.tskeepCLI-local ergonomics
src/cli/inquirer.tskeepCLI-local ergonomics
src/cli/template-code.tskeepCLI-local ergonomics
src/cli/paths.tskeepCLI-local ergonomics
src/cli/utils.tskeepCLI-local ergonomics
src/cli/meta.tskeepCLI-local ergonomics

src/cli/commands/ — 43 subcommands

Minimal survivors: doctor, mcp, config, render. Everything else archives to archive/legacy-cli/commands/.

pathactiondestinationphasenotes
src/cli/commands/doctor.tskeepHost diagnostic — irreplaceable by harness
src/cli/commands/mcp.tskeepMCP adapter launcher
src/cli/commands/config.tskeepcm config show — debugging aid
src/cli/commands/render.tsrefactorsrc/cli/commands/render.ts3Wrapper over scripts/harness/render.ts
src/cli/commands/annotate.tsarchivearchive/legacy-cli/commands/4Agentic surface — harness skill replaces
src/cli/commands/archetypes.tsarchivearchive/legacy-cli/commands/4Registry op — moves to runtime API
src/cli/commands/assets.tsarchivearchive/legacy-cli/commands/4Vendor refresh — replaced by flow
src/cli/commands/audio.tsarchivearchive/legacy-cli/commands/3Stage-runner — replaced by harness script
src/cli/commands/bench.tsarchivearchive/legacy-cli/commands/3Dev-only bench; keep impl, drop command
src/cli/commands/blueprint.tsarchivearchive/legacy-cli/commands/4Agentic — becomes skill
src/cli/commands/caption-quality-gate.tsarchivearchive/legacy-cli/commands/4Becomes flow gate
src/cli/commands/caption-quality.tsarchivearchive/legacy-cli/commands/4Demoted to skill
src/cli/commands/captions.tsarchivearchive/legacy-cli/commands/3Stage-runner
src/cli/commands/classify.tsarchivearchive/legacy-cli/commands/4Agentic
src/cli/commands/demo.tsarchivearchive/legacy-cli/commands/4Marketing artefact
src/cli/commands/evaluate.tsarchivearchive/legacy-cli/commands/3Replaced by evaluate-batch flow
src/cli/commands/extract-features.tsarchivearchive/legacy-cli/commands/4Becomes skill
src/cli/commands/feedback.tsarchivearchive/legacy-cli/commands/4Agentic
src/cli/commands/frame-analyze.tsarchivearchive/legacy-cli/commands/4Becomes skill
src/cli/commands/generate.tsarchivearchive/legacy-cli/commands/3Replaced by generate-short flow
src/cli/commands/generate-defaults.tsarchivearchive/legacy-cli/commands/3Helper for generate.ts
src/cli/commands/generate-output.tsarchivearchive/legacy-cli/commands/3Helper
src/cli/commands/generate-preflight.tsarchivearchive/legacy-cli/commands/3Helper → preflight-check flow
src/cli/commands/generate-quality.tsarchivearchive/legacy-cli/commands/3Helper
src/cli/commands/generate-sync.tsarchivearchive/legacy-cli/commands/3Helper
src/cli/commands/hooks.tsarchivearchive/legacy-cli/commands/3Content-hook CLI → runtime API
src/cli/commands/import.tsarchivearchive/legacy-cli/commands/3Importer CLI wrapper
src/cli/commands/init.tsarchivearchive/legacy-cli/commands/4Scaffolding command
src/cli/commands/lab.tsarchivearchive/legacy-cli/commands/4Launches src/lab (also archived)
src/cli/commands/media.tsarchivearchive/legacy-cli/commands/3Stage-runner
src/cli/commands/package.tsarchivearchive/legacy-cli/commands/3Runtime API instead
src/cli/commands/prompts.tsarchivearchive/legacy-cli/commands/4Prompt registry CLI
src/cli/commands/publish.tsarchivearchive/legacy-cli/commands/3Runtime API instead
src/cli/commands/qa.tsarchivearchive/legacy-cli/commands/4Agentic
src/cli/commands/quality-rank.tsarchivearchive/legacy-cli/commands/4Becomes skill
src/cli/commands/quality-score.tsarchivearchive/legacy-cli/commands/4Becomes skill
src/cli/commands/rate.tsarchivearchive/legacy-cli/commands/4Becomes skill
src/cli/commands/research.tsarchivearchive/legacy-cli/commands/4Agentic — migrates to skill
src/cli/commands/retrieve.tsarchivearchive/legacy-cli/commands/4Replaced by runtime API
src/cli/commands/score.tsarchivearchive/legacy-cli/commands/4Becomes skill
src/cli/commands/script.tsarchivearchive/legacy-cli/commands/3Stage-runner
src/cli/commands/setup.tsarchivearchive/legacy-cli/commands/4Scaffolding
src/cli/commands/telemetry.tsarchivearchive/legacy-cli/commands/4Agentic surface
src/cli/commands/templates.tsarchivearchive/legacy-cli/commands/4Template CLI → runtime API
src/cli/commands/timestamps.tsarchivearchive/legacy-cli/commands/3Stage-runner
src/cli/commands/validate.tsarchivearchive/legacy-cli/commands/3Becomes flow + skill
src/cli/commands/videospec.tsarchivearchive/legacy-cli/commands/4Becomes skill
src/cli/commands/visuals.tsarchivearchive/legacy-cli/commands/3Stage-runner
src/cli/commands/workflows.tsarchivearchive/legacy-cli/commands/4Entire workflows system replaced

src/core/

Split across src/infra/ (cross-cutting), src/adapters/ (external bridges), src/runtime/ (deterministic core).

pathactiondestinationphasenotes
src/core/config.tsmove+refactorsrc/infra/config.ts2Drop CLI-global coupling
src/core/logger.tsmovesrc/infra/logger.ts2Pino wrapper
src/core/errors.tsmovesrc/infra/errors.ts2CMError type
src/core/retry.tsmovesrc/infra/retry.ts2Generic retry util
src/core/require.tsmovesrc/infra/require.ts2Dynamic require shim
src/core/events/movesrc/infra/events/2Emitter/observer infra
src/core/pipeline.tsmovesrc/runtime/pipeline.ts2Runtime pipeline bus
src/core/pipeline.events.tsmovesrc/runtime/pipeline.events.ts2Event defs
src/core/providers/movesrc/adapters/providers/2Provider-wrapping decorators
src/core/llm/movesrc/adapters/llm/2openai/anthropic/gemini clients
src/core/doctor/movesrc/infra/doctor/2Feeds cm doctor
src/core/assets/movesrc/adapters/asr/whisper-assets/2Whisper model mgmt
src/core/video/movesrc/runtime/media/2ffmpeg wrapper
src/core/ocr/movesrc/adapters/ocr/2Tesseract binding
src/core/text/movesrc/runtime/text/2Similarity utils
src/core/embeddings/movesrc/runtime/embeddings/2Pure embedder
src/core/retrieval/movesrc/runtime/retrieval/2Brute-force retrieval

src/domain/ (implicit contracts barrel)

Phase 1 lift — highest-risk mechanical move.

pathactiondestinationphasenotes
src/domain/index.tsrefactorsrc/contracts/index.ts1Contracts barrel
src/domain/ids.tsmovesrc/contracts/ids.ts1Stable type
src/domain/doctor.tsmovesrc/contracts/doctor.ts1Stable type
src/domain/render-templates.tsmovesrc/contracts/render-templates.ts1Stable type
src/domain/repo-facts.generated.tsmovesrc/contracts/generated/1Generated — update gen script path
src/domain/ubiquitous-language.generated.tsmovesrc/contracts/generated/1Generated — update gen script path

src/types/

pathactiondestinationphasenotes
src/types/kokoro-js.d.tsmovesrc/contracts/ambient/kokoro-js.d.ts1Until kokoro-js ships types

src/script/

pathactiondestinationphasenotes
src/script/schema.tssplitsrc/contracts/script.ts + src/runtime/script/1Types vs runtime
src/script/generator.tsmovesrc/runtime/script/generator.ts2Calls adapter/llm
src/script/blueprint-compliance.tsmovesrc/runtime/script/blueprint-compliance.ts2Deterministic helper
src/script/sanitize.tsmovesrc/runtime/script/sanitize.ts2Deterministic helper
src/script/research-context.tsmovesrc/runtime/script/research-context.ts2Consumer of adapters/research
src/script/prompts/movesrc/prompts/script/2Consolidate prompts

src/audio/

Split: runtime deterministic code stays, TTS/ASR providers move to adapters.

pathactiondestinationphasenotes
src/audio/pipeline.tsmovesrc/runtime/audio/pipeline.ts2Runtime entry
src/audio/alignment.tsmovesrc/runtime/audio/alignment.ts2Deterministic
src/audio/schema.tssplitsrc/contracts/audio.ts + src/runtime/audio/1
src/audio/tts/movesrc/adapters/tts/2kokoro/elevenlabs clients
src/audio/tts/kokoro.tsmovesrc/adapters/tts/kokoro.ts2External TTS
src/audio/tts/elevenlabs.tsmovesrc/adapters/tts/elevenlabs.ts2External TTS
src/audio/tts/text-chunking.tsmovesrc/adapters/tts/text-chunking.ts2Provider util
src/audio/tts/types.tsmovesrc/contracts/tts.ts1Type defs
src/audio/tts/index.tsmovesrc/adapters/tts/index.ts2Barrel
src/audio/asr/whisper-cpp/movesrc/adapters/asr/whisper-cpp/2External ASR
src/audio/asr/gemini-asr.tsmovesrc/adapters/asr/gemini-asr.ts2External ASR
src/audio/asr/elevenlabs-forced-alignment.tsmovesrc/adapters/asr/elevenlabs-forced-alignment.ts2External
src/audio/asr/post-processor.tsmovesrc/runtime/audio/asr/post-processor.ts2Deterministic
src/audio/asr/reconcile.tsmovesrc/runtime/audio/asr/reconcile.ts2Deterministic
src/audio/asr/script-match.tsmovesrc/runtime/audio/asr/script-match.ts2Deterministic
src/audio/asr/validator.tsmovesrc/runtime/audio/asr/validator.ts2Deterministic
src/audio/asr/index.tsmovesrc/runtime/audio/asr/index.ts2Barrel
src/audio/sync/movesrc/runtime/audio/sync/2Deterministic
src/audio/mix/movesrc/runtime/audio/mix/2Deterministic
src/audio/mix/schema.tssplitsrc/contracts/mix.ts + src/runtime/audio/mix/1Type lift

src/visuals/

pathactiondestinationphasenotes
src/visuals/schema.tssplitsrc/contracts/visuals.ts + src/runtime/visuals/1
src/visuals/matcher.tsmovesrc/runtime/visuals/matcher.ts2Deterministic
src/visuals/duration.tsmovesrc/runtime/visuals/duration.ts2Deterministic
src/visuals/keywords.tsmovesrc/runtime/visuals/keywords.ts2Deterministic
src/visuals/evaluation.tsmovesrc/runtime/visuals/evaluation.ts2Deterministic
src/visuals/observability.tsmovesrc/runtime/visuals/observability.ts2Deterministic
src/visuals/gameplay.tsmovesrc/runtime/visuals/gameplay.ts2Deterministic
src/visuals/provider-router.tsmovesrc/runtime/visuals/provider-router.ts2Deterministic
src/visuals/motion/movesrc/runtime/visuals/motion/2Deterministic
src/visuals/providers/pexels*.tsmovesrc/adapters/visuals/pexels.ts2External API
src/visuals/providers/pixabay*.tsmovesrc/adapters/visuals/pixabay.ts2External API
src/visuals/providers/nanobanana-provider.tsmovesrc/adapters/visuals/nanobanana.ts2External
src/visuals/providers/local-provider.tsmovesrc/adapters/visuals/local.ts2Local fs provider
src/visuals/providers/local-image-provider.tsmovesrc/adapters/visuals/local-image.ts2Local fs provider
src/visuals/providers/mock-provider.tsmovesrc/adapters/visuals/mock.ts2Test double
src/visuals/providers/types.tsmovesrc/contracts/visuals-provider.ts1Type defs
src/visuals/providers/index.tsmovesrc/adapters/visuals/index.ts2Barrel

src/render/

pathactiondestinationphasenotes
src/render/schema.tssplitsrc/contracts/render.ts + src/runtime/render/1
src/render/service.tsmovesrc/runtime/render/service.ts2Render entry
src/render/audio-mix.tsmovesrc/runtime/render/audio-mix.ts2Runtime
src/render/index.tsmovesrc/runtime/render/index.ts2Barrel
src/render/template-sdk.tsmovesrc/runtime/render/template-sdk.ts2Template API
src/render/remotion/movesrc/runtime/render/remotion/2Remotion compositions (tsx)
src/render/templates/movesrc/runtime/render/templates/2Registry + installer
src/render/captions/movesrc/runtime/render/captions/2Caption pipeline
src/render/presets/movesrc/runtime/render/presets/2Style presets
src/render/styles/movesrc/runtime/render/styles/2
src/render/themes/movesrc/runtime/render/themes/2
src/render/tokens/movesrc/runtime/render/tokens/2Design tokens
src/render/assets/moveassets/render/2Static assets out of src/

src/media/

pathactiondestinationphasenotes
src/media/schema.tssplitsrc/contracts/media.ts + src/runtime/media/1
src/media/service.tsmovesrc/runtime/media/service.ts2Runtime
src/media/synthesis/orchestrator.tsmovesrc/runtime/media/synthesis/orchestrator.ts2Runtime
src/media/synthesis/registry.tsmovesrc/runtime/media/synthesis/registry.ts2
src/media/synthesis/types.tsmovesrc/contracts/media-synthesis.ts1Type defs
src/media/synthesis/google-auth.tsmovesrc/adapters/media-synthesis/google-auth.ts2External
src/media/synthesis/http.tsmovesrc/adapters/media-synthesis/http.ts2External HTTP
src/media/synthesis/adapters/movesrc/adapters/media-synthesis/2Veo/Nanobanana/DepthFlow

src/videospec/ + src/videointel/

Merge into one location. Two modules doing the same work.

pathactiondestinationphasenotes
src/videospec/schema.tssplitsrc/contracts/videospec.ts + src/runtime/videospec/1V1 namespace
src/videospec/analyze.tsmovesrc/runtime/videospec/analyze.ts2Merge target
src/videospec/features.tsmovesrc/runtime/videospec/features.ts2
src/videospec/cache.tsmovesrc/runtime/videospec/cache.ts2
src/videospec/ingest.tsmovesrc/runtime/videospec/ingest.ts2
src/videospec/index.tsmovesrc/runtime/videospec/index.ts2Barrel
src/videointel/schema.tssplitsrc/contracts/videospec.ts (merged)1Merge into videospec contract
src/videointel/blueprint.tsmovesrc/runtime/videospec/blueprint.ts2Merge
src/videointel/blueprint-context.tsmovesrc/runtime/videospec/blueprint-context.ts2Merge
src/videointel/classify.tsmovesrc/runtime/videospec/classify.ts2Merge
src/videointel/compare.tsmovesrc/runtime/videospec/compare.ts2Merge
src/videointel/test-fixtures.tsmovefixtures/videospec/2Promote to top-level fixtures
src/videointel/index.tsdelete2Merge duplicates videospec index

src/validate/

All runtime; Python bridge preserved.

pathactiondestinationphasenotes
src/validate/schema.tssplitsrc/contracts/validate.ts + src/runtime/validate/1
src/validate/cadence.tsmovesrc/runtime/validate/cadence.ts2Deterministic
src/validate/ffprobe.tsmovesrc/runtime/validate/ffprobe.ts2Deterministic
src/validate/ffprobe-audio.tsmovesrc/runtime/validate/ffprobe-audio.ts2Deterministic
src/validate/flow-consistency.tsmovesrc/runtime/validate/flow-consistency.ts2
src/validate/frame-bounds.tsmovesrc/runtime/validate/frame-bounds.ts2
src/validate/freeze.tsmovesrc/runtime/validate/freeze.ts2
src/validate/gates.tsmovesrc/runtime/validate/gates.ts2Flow gate impls
src/validate/profiles.tsmovesrc/runtime/validate/profiles.ts2
src/validate/python-json.tsmovesrc/runtime/validate/python-json.ts2Python bridge
src/validate/python-probe.tsmovesrc/runtime/validate/python-probe.ts2Update script path
src/validate/quality.tsmovesrc/runtime/validate/quality.ts2
src/validate/safety.tsmovesrc/runtime/validate/safety.ts2
src/validate/scene-detect.tsmovesrc/runtime/validate/scene-detect.ts2Python bridge
src/validate/temporal.tsmovesrc/runtime/validate/temporal.ts2
src/validate/validate.tsmovesrc/runtime/validate/validate.ts2
src/validate/video-info.tsmovesrc/runtime/validate/video-info.ts2
src/validate/audio-signal.tsmovesrc/runtime/validate/audio-signal.ts2
src/validate/content-type.tsmovesrc/runtime/validate/content-type.ts2

src/score/ and src/quality-score/

pathactiondestinationphasenotes
src/score/schema.tssplitsrc/contracts/score.ts + src/runtime/score/1
src/score/sync-schema.tsmovesrc/contracts/sync.ts1Sync type defs
src/score/ (remaining ~19 scorers)movesrc/runtime/score/2DNSMOS, image/video reward, engagement, pacing, semantic, sync
src/quality-score/feature-schema.tsmovesrc/contracts/quality-score.ts1Type defs
src/quality-score/label-schema.tsmovesrc/contracts/quality-score.ts1Type defs
src/quality-score/feature-extractor.tsmovesrc/runtime/score/ml/feature-extractor.ts2
src/quality-score/scorer.tsmovesrc/runtime/score/ml/scorer.ts2
src/quality-score/index.tsmovesrc/runtime/score/ml/index.ts2Barrel

src/evaluate/

pathactiondestinationphasenotes
src/evaluate/schema.tssplitsrc/contracts/evaluate.ts + src/runtime/evaluate/1
src/evaluate/preference-schema.tsmovesrc/contracts/preference.ts1Type defs
src/evaluate/active-learning.tsmovesrc/runtime/evaluate/active-learning.ts2
src/evaluate/batch.tsarchivearchive/legacy-cli/evaluate-batch/3Replaced by evaluate-batch flow
src/evaluate/calibrator.tsmovesrc/runtime/evaluate/calibrator.ts2
src/evaluate/compare.tsmovesrc/runtime/evaluate/compare.ts2
src/evaluate/diversity.tsmovesrc/runtime/evaluate/diversity.ts2
src/evaluate/evaluator.tsmovesrc/runtime/evaluate/evaluator.ts2Per-item scorer (keep)
src/evaluate/index.tsmovesrc/runtime/evaluate/index.ts2Barrel

src/research/ — SPLIT

Orchestrator archives (replaced by skill); adapters move.

pathactiondestinationphasenotes
src/research/schema.tsmovesrc/contracts/research.ts1Type defs
src/research/orchestrator.tsarchivearchive/legacy-cli/research/4Replaced by research skill
src/research/indexer.tsarchivearchive/legacy-cli/research/4Replaced by skill
src/research/index.tsarchivearchive/legacy-cli/research/4Barrel for archived surface
src/research/tools/hackernews.tsmovesrc/adapters/research/hackernews.ts2External API
src/research/tools/reddit.tsmovesrc/adapters/research/reddit.ts2External API
src/research/tools/tavily.tsmovesrc/adapters/research/tavily.ts2External API
src/research/tools/web-search.tsmovesrc/adapters/research/web-search.ts2External API
src/research/tools/base-tool.tsmovesrc/adapters/research/base-tool.ts2Shared base
src/research/tools/types.tsmovesrc/contracts/research-tool.ts1Type defs
src/research/tools/index.tsmovesrc/adapters/research/index.ts2Barrel

src/feedback/, src/policy/

pathactiondestinationphasenotes
src/feedback/schema.tsmovesrc/contracts/feedback.ts1Type defs
src/feedback/store.tsmovesrc/runtime/feedback/store.ts2JSONL store
src/policy/schema.tsmovesrc/contracts/policy.ts1Type defs

src/hooks/ — content-hook openers (not git hooks)

pathactiondestinationphasenotes
src/hooks/schema.tsmovesrc/contracts/openers.ts1Rename to avoid "hooks" overload
src/hooks/constants.tsmovesrc/runtime/openers/constants.ts2
src/hooks/download.tsmovesrc/runtime/openers/download.ts2
src/hooks/resolve.tsmovesrc/runtime/openers/resolve.ts2
src/hooks/libraries/movesrc/runtime/openers/libraries/2
src/hooks/index.tsmovesrc/runtime/openers/index.ts2Barrel

src/archetypes/

pathactiondestinationphasenotes
src/archetypes/schema.tsmovesrc/contracts/archetypes.ts1Type defs
src/archetypes/types.tsmovesrc/contracts/archetypes-types.ts1Type defs
src/archetypes/registry.tsmovesrc/runtime/archetypes/registry.ts2
src/archetypes/installer.tsmovesrc/runtime/archetypes/installer.ts2
src/archetypes/dev.tsmovesrc/runtime/archetypes/dev.ts2

src/workflows/ — ALL ARCHIVE

Replaced by prompt-language flows. Single biggest deletion in the plan.

pathactiondestinationphasenotes
src/workflows/schema.tsarchivearchive/legacy-cli/workflows/4Duplicate orchestration
src/workflows/runner.tsarchivearchive/legacy-cli/workflows/4Reimplements spawn+timeout
src/workflows/registry.tsarchivearchive/legacy-cli/workflows/4
src/workflows/resolve.tsarchivearchive/legacy-cli/workflows/4
src/workflows/installer.tsarchivearchive/legacy-cli/workflows/4
src/workflows/dev.tsarchivearchive/legacy-cli/workflows/4

src/prompts/, src/importers/, src/package/, src/publish/, src/bench/, src/analysis/

pathactiondestinationphasenotes
src/prompts/types.tsmovesrc/contracts/prompts.ts1Type defs
src/prompts/registry.tsmovesrc/prompts/registry.ts2Consolidate at top-level src/prompts/
src/prompts/index.tsmovesrc/prompts/index.ts2Barrel
src/prompts/sources/movesrc/prompts/sources/2Keep
src/prompts/templates/movesrc/prompts/templates/2Keep
src/prompts/README.mdkeepDocs
src/importers/timestamps.tsmovesrc/runtime/importers/timestamps.ts2Thin adapter
src/importers/visuals.tsmovesrc/runtime/importers/visuals.ts2Thin adapter
src/package/schema.tsmovesrc/contracts/package.ts1Type defs
src/package/generator.tsmovesrc/runtime/package/generator.ts2
src/publish/schema.tsmovesrc/contracts/publish.ts1Type defs
src/publish/generator.tsmovesrc/runtime/publish/generator.ts2
src/bench/types.tsmovesrc/contracts/bench.ts1Type defs
src/bench/ffmpeg.tsmovescripts/harness/bench/ffmpeg.ts3Demote to harness script
src/bench/generate.tsmovescripts/harness/bench/generate.ts3Demote
src/bench/recipes.tsmovescripts/harness/bench/recipes.ts3Demote
src/bench/run.tsmovescripts/harness/bench/run.ts3Demote
src/bench/stats.tsmovescripts/harness/bench/stats.ts3Demote
src/analysis/frame-analysis.tsmovesrc/runtime/analysis/frame-analysis.ts2Single-file util

src/server/mcp/ — becomes src/adapters/mcp/

pathactiondestinationphasenotes
src/server/mcp/server.tsmovesrc/adapters/mcp/server.ts2MCP is an adapter
src/server/mcp/tools.tsmovesrc/adapters/mcp/tools.ts2Tool exposure
src/server/mcp/session-store.tsmove+refactorsrc/adapters/mcp/session-store.ts2Drop CLI coupling
src/server/mcp/fastmcp.tsmovesrc/adapters/mcp/fastmcp.ts2
src/server/mcp/index.tsmovesrc/adapters/mcp/index.ts2Barrel + launchable entry

src/lab/ — ALL ARCHIVE

10-file HTTP review UI. Replaced by publish-prep-review skill in Phase 4.

pathactiondestinationphasenotes
src/lab/server/archivearchive/legacy-cli/lab/4HTTP server
src/lab/session/archivearchive/legacy-cli/lab/4Session mgmt
src/lab/stores/archivearchive/legacy-cli/lab/4Experiments store
src/lab/services/archivearchive/legacy-cli/lab/4Services
src/lab/security/archivearchive/legacy-cli/lab/4Security middleware
src/lab/metrics/archivearchive/legacy-cli/lab/4Metrics
src/lab/feedback/archivearchive/legacy-cli/lab/4Feedback subsystem
src/lab/schema/archivearchive/legacy-cli/lab/4Lab-specific schema
src/lab/paths.tsarchivearchive/legacy-cli/lab/4

src/demo/, src/test/, src/index.ts

pathactiondestinationphasenotes
src/demo/runner.tsarchivearchive/legacy-cli/demo/4Marketing artefact
src/test/stubs/keepFakeLLMProvider etc.
src/test/fixtures/movefixtures/2Promote to top-level
src/index.tsrefactorsrc/index.ts6Re-scope exports to contracts+runtime

connectors/, registry/

pathactiondestinationphasenotes
connectors/mcp-reddit/keepVendored third-party; add VENDORED.md in Phase 2
registry/repo-facts.yamlkeepCanonical source
registry/ubiquitous-language.yamlkeepCanonical source

templates/ (top-level) — ALL ARCHIVE

Third-party reference repos nothing imports.

pathactiondestinationphasenotes
templates/Short-Video-Creator/archivearchive/legacy-cli/templates/4Python reference project
templates/template-audiogram/archivearchive/legacy-cli/templates/4Remotion template reference
templates/template-overlay/archivearchive/legacy-cli/templates/4Remotion template reference
templates/template-tiktok-base/archivearchive/legacy-cli/templates/4Remotion template reference
templates/vidosy/archivearchive/legacy-cli/templates/4External tool reference

scripts/ — reorganise

Python runtime dependencies (19 files) → scripts/python/

pathactiondestinationphasenotes
scripts/audio_quality.pymovescripts/python/audio_quality.py3Runtime dep (via python-probe)
scripts/clip_embeddings.pymovescripts/python/clip_embeddings.py3Runtime dep
scripts/dnsmos_score.pymovescripts/python/dnsmos_score.py3Runtime dep
scripts/flow_warp_error.pymovescripts/python/flow_warp_error.py3Runtime dep
scripts/freeze_detect.pymovescripts/python/freeze_detect.py3Runtime dep
scripts/image_reward.pymovescripts/python/image_reward.py3Runtime dep
scripts/intern_video.pymovescripts/python/intern_video.py3Runtime dep
scripts/onnx_inference.pymovescripts/python/onnx_inference.py3Runtime dep
scripts/preference_server.pymovescripts/python/preference_server.py3Preference loop server
scripts/safety_check.pymovescripts/python/safety_check.py3Runtime dep
scripts/scene_detect.pymovescripts/python/scene_detect.py3Runtime dep
scripts/semantic_similarity.pymovescripts/python/semantic_similarity.py3Runtime dep
scripts/temporal_quality.pymovescripts/python/temporal_quality.py3Runtime dep
scripts/text_embeddings.pymovescripts/python/text_embeddings.py3Runtime dep
scripts/train_calibrator.pymovescripts/python/train_calibrator.py3ML training
scripts/train_quality_scorer.pymovescripts/python/train_quality_scorer.py3ML training
scripts/video_info.pymovescripts/python/video_info.py3Runtime dep
scripts/video_quality.pymovescripts/python/video_quality.py3Runtime dep
scripts/video_reward.pymovescripts/python/video_reward.py3Runtime dep

Code-gen → scripts/gen/ · Ops → scripts/ops/ · Dev → scripts/dev/ · Quality → scripts/quality/

pathactiondestinationphasenotes
scripts/gen-cspell.mjsmovescripts/gen/gen-cspell.mjs3Regen spellcheck
scripts/gen-glossary.mjsmovescripts/gen/gen-glossary.mjs3Regen glossary
scripts/gen-repo-facts.mjsmovescripts/gen/gen-repo-facts.mjs3Regen repo facts
scripts/gen-ubiquitous-language-ts.mjsmovescripts/gen/gen-ubiquitous-language-ts.mjs3Regen lang barrel
scripts/lib/movescripts/gen/lib/3Shared by gen scripts
scripts/postinstall.mjsmovescripts/ops/postinstall.mjs3npm postinstall
scripts/install-whisper.tsmovescripts/ops/install-whisper.ts3Whisper model installer
scripts/sync-hooks.tsmovescripts/ops/sync-hooks.ts3Husky/git sync
scripts/vendor.ps1movescripts/ops/vendor.ps13Vendor refresh (Win)
scripts/vendor.shmovescripts/ops/vendor.sh3Vendor refresh (nix)
scripts/download-gameplay.ps1movescripts/ops/download-gameplay.ps13Gameplay assets
scripts/download-gameplay.shmovescripts/ops/download-gameplay.sh3Gameplay assets
scripts/make-demo-gif.shmovescripts/ops/make-demo-gif.sh3Demo asset builder
scripts/generate-gameplay-placeholder.shmovescripts/ops/generate-gameplay-placeholder.sh3Fallback gen
scripts/debug-hook.tsmovescripts/dev/debug-hook.ts3Author debug
scripts/debug-timestamps.tsmovescripts/dev/debug-timestamps.ts3Author debug
scripts/test-angles.tsmovescripts/dev/test-angles.ts3One-off
scripts/phoenix-loop-caption-sweep.tsarchivearchive/legacy-cli/scripts/4Replaced by caption-sweep flow
scripts/render-caption-demo.tsmovescripts/dev/render-caption-demo.ts3Author demo
scripts/trace-spawn.cjsmovescripts/dev/trace-spawn.cjs3Trace util
scripts/review-latest.mjsmovescripts/dev/review-latest.mjs3Author aid
scripts/qa/extract-screenshots.mjsmovescripts/dev/extract-screenshots.mjs3QA aid
scripts/test/ (smoke tests *.ts)movescripts/dev/smoke/3Rename: smoke harnesses, not unit tests
scripts/quality/keepUnchanged
scripts/run-vitest.mjsmovescripts/quality/run-vitest.mjs3Test runner
scripts/vitest/coverage-provider.mjsmovescripts/quality/coverage-provider.mjs3Vitest shim

examples/, experiments/, evals/, evaluations/

pathactiondestinationphasenotes
examples/complex-plane-rotation/movefixtures/examples/complex-plane-rotation/2Promote to top-level fixtures
experiments/complex-plane-rotation/archivearchive/legacy-cli/experiments/4Duplicate of examples — confirm no uniques first
evals/configs/keepPromptfoo configs
evals/rubrics/keepEval rubrics
evals/datasets/keepDatasets
evals/results/keepCaptured eval runs
evals/README.mdkeepDocs
evaluations/*.json (10 files)decide-later0Golden fixture or captured run? resolve collectively

Default if unresolved in Phase 0: move to output/evaluations/ (gitignored) if captured runs; to fixtures/showcase/ if referenced by tests.

tasks/ — ARCHIVE

Pre-beads file-based tracker. AGENTS.md says use beads now.

pathactiondestinationphasenotes
tasks/todo/archivearchive/legacy-cli/tasks/4Superseded by beads
tasks/in_progress/archivearchive/legacy-cli/tasks/4Superseded
tasks/done/archivearchive/legacy-cli/tasks/4Superseded
tasks/blocked/archivearchive/legacy-cli/tasks/4Superseded
tasks/templates/archivearchive/legacy-cli/tasks/4Superseded

test-fixtures/, test-e2e-output/, tests/, vendor/, assets/, config/

pathactiondestinationphasenotes
test-fixtures/movefixtures/2Promote + merge with src/test/fixtures/
test-e2e-output/decide-later0Likely captured output — should be gitignored?
tests/keepIntegration tests
vendor/keepVendored binaries/datasets
assets/keepFonts, archetypes, templates, lab, demo
config/cspell/keepBuild-time data

Root config files

pathactiondestinationphasenotes
package.jsonrefactor6Update description + files field in Phase 6
tsconfig*.jsonkeepTS config
eslint.config.jskeepLint config
vitest.config.tskeepTest config
stryker.conf.jsonkeepMutation testing
.husky/keepGit hooks
.github/deleteGitHub automation removed for local-first work
.prompt-language/keepprompt-language state dir
README.mdrefactor6Phase 6 rewrites harness-first
CHANGELOG.mdkeepRelease history
DIRECTION.mdkeepLiving doc
CLAUDE.md, AGENTS.mdkeepHarness docs

Decide-later register

Every decide-later row above needs resolution before its phase acts. Summary:

rowquestionblocker for
evaluations/*.json (10)captured runs or golden fixtures?Phase 0 close
test-e2e-output/should this be gitignored?Phase 0 close
experiments/videointel-*any unique logic vs src/videointel/?Phase 4 archive
src/lab/real users relying on review UI?Phase 4 archive
docs/research/publish in npm tarball?.npmignore policy
docs/direction/publish in npm tarball?.npmignore policy
MCP serverdoes content-machine continue shipping one?Phase 2 adapter scope

Not moved

This document classifies only. Phases 1–4 execute moves per the schedule in 03-reorg-synthesis.md and the beads epic content-machine-7tf.