Skip to content

Split init/dev/share/deploy/eval into options/run exec modules#138

Merged
alexkroman merged 2 commits into
mainfrom
claude/commands-refactor-uftgvy
Jun 12, 2026
Merged

Split init/dev/share/deploy/eval into options/run exec modules#138
alexkroman merged 2 commits into
mainfrom
claude/commands-refactor-uftgvy

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

Apply the gh-CLI-style options/run split (already used by transcribe,
stream, agent, speak, llm, clip, dictate, dub) to the remaining
flag-heavy single-run commands. Each command module now only parses
argv into a frozen Options dataclass and hands it to a
module-level run_(opts, state, *, json_mode) in a dedicated
_exec module:

  • aai_cli/dev_exec.py (DevOptions / run_dev)
  • aai_cli/share_exec.py (ShareOptions / run_share)
  • aai_cli/deploy_exec.py (DeployOptions / run_deploy; flag->target
    resolution moved into run_deploy)
  • aai_cli/evaluate_exec.py (EvalOptions / run_evaluate; EvalSpeechModel
    and all scoring/render helpers)
  • aai_cli/init_exec.py (InitOptions / run_init + launch_app, called
    by the onboarding wizard)

The onboarding wizard now scaffolds via init_exec.run_init/launch_app
instead of reaching into the command module. The new exec modules are
registered in .importlinter contract 1 (core modules must not import
command modules), and the moved tests are repointed at the exec modules.

claude and others added 2 commits June 12, 2026 23:30
Apply the gh-CLI-style options/run split (already used by transcribe,
stream, agent, speak, llm, clip, dictate, dub) to the remaining
flag-heavy single-run commands. Each command module now only parses
argv into a frozen <Cmd>Options dataclass and hands it to a
module-level run_<cmd>(opts, state, *, json_mode) in a dedicated
<cmd>_exec module:

- aai_cli/dev_exec.py        (DevOptions / run_dev)
- aai_cli/share_exec.py      (ShareOptions / run_share)
- aai_cli/deploy_exec.py     (DeployOptions / run_deploy; flag->target
                              resolution moved into run_deploy)
- aai_cli/evaluate_exec.py   (EvalOptions / run_evaluate; EvalSpeechModel
                              and all scoring/render helpers)
- aai_cli/init_exec.py       (InitOptions / run_init + launch_app, called
                              by the onboarding wizard)

The onboarding wizard now scaffolds via init_exec.run_init/launch_app
instead of reaching into the command module. The new exec modules are
registered in .importlinter contract 1 (core modules must not import
command modules), and the moved tests are repointed at the exec modules.
@alexkroman alexkroman enabled auto-merge June 12, 2026 23:32
@alexkroman alexkroman added this pull request to the merge queue Jun 12, 2026
Merged via the queue into main with commit e523721 Jun 12, 2026
15 checks passed
@alexkroman alexkroman deleted the claude/commands-refactor-uftgvy branch June 12, 2026 23:39
alexkroman pushed a commit that referenced this pull request Jun 13, 2026
…mediafile refactor

Reconciles the shared-scaffolding refactor with three upstream changes:
the language-native voice rotation (#136), the dub --video flag and the
new caption command (#139), and the exec-module splits (#138).

- run_dub keeps upstream's YouTube-download branch and _dub_and_emit
  split, with this branch's early validation (--voice parse, URL echo,
  out-path checks) threaded through; the parsed --voice pair rides in a
  frozen _VoicePlan.
- caption_exec now uses the shared mediafile helpers too (it had copied
  the same scaffolding), which also gives caption the upfront out-path
  validation, the samefile self-overwrite guard, the transcript status
  check, and the './-' ffmpeg path hardening.
- mediafile grows the caption-shaped pieces: validate_out (hoisted from
  dub_exec), a general resolve_transcript (diarized variant delegates),
  a kind= parameter for validate_local_media, and a suggestion override
  for ffmpeg_failure.
- test_dub_pipeline's YouTube-source tests move to test_dub_sources.py
  to stay under the 500-line file gate.

https://claude.ai/code/session_018TuAQTvp9PVy5EdhsDWo2h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants