Commit ffb10a9
committed
Fold per-command run-logic into commands/<cmd>/ packages
Each command that owns private run-logic becomes a package instead of a
flat module plus a sibling *_exec.py at the package root: __init__.py holds
the Typer app + SPEC, and its support modules sit beside it underscore-
prefixed (_exec.py for the run_<cmd> body, plus _select/_data/_hf_api/_listen
helpers). This colocates a command's exec with the command file and follows
the Prefect/spaCy convention (flat file by default; promote to a folder only
when a command has earned multiple modules; underscore-prefix private modules,
which also dodges the webhooks `listen` command-vs-module name collision).
13 commands folded: stream, agent, speak, llm, clip, dictate, caption, dub,
evaluate, deploy, dev, share, webhooks. transcribe and init stay at the root
alongside doctor_checks/setup_exec because the onboarding wizard
(onboard/sections.py) reuses transcribe_exec/render/batch and init_exec, so
they are shared beyond a single command.
command_registry already discovers packages (pkgutil.iter_modules), so
registration, help ordering, and the snapshot partition are unchanged.
import-linter contract 1 drops the folded execs (now covered by contract 2's
independence rule) and contract 3 points at the new _select/_data paths; all
three contracts stay green. AGENTS.md documents the module-or-package rule.
https://claude.ai/code/session_01XfcMSCxZPLJgg2UQBy8a4v1 parent 8e39d2a commit ffb10a9
63 files changed
Lines changed: 264 additions & 211 deletions
File tree
- aai_cli
- commands
- agent
- caption
- clip
- deploy
- dev
- dictate
- dub
- evaluate
- llm
- speak
- stream
- webhooks
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | | - | |
11 | 16 | | |
12 | 17 | | |
13 | | - | |
14 | 18 | | |
15 | 19 | | |
16 | | - | |
17 | | - | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 26 | | |
28 | | - | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 29 | | |
35 | 30 | | |
36 | 31 | | |
| |||
39 | 34 | | |
40 | 35 | | |
41 | 36 | | |
42 | | - | |
43 | 37 | | |
44 | 38 | | |
45 | 39 | | |
| |||
49 | 43 | | |
50 | 44 | | |
51 | 45 | | |
52 | | - | |
53 | | - | |
54 | 46 | | |
55 | 47 | | |
56 | | - | |
57 | 48 | | |
58 | 49 | | |
59 | 50 | | |
| |||
65 | 56 | | |
66 | 57 | | |
67 | 58 | | |
68 | | - | |
69 | 59 | | |
70 | 60 | | |
71 | 61 | | |
| |||
87 | 77 | | |
88 | 78 | | |
89 | 79 | | |
90 | | - | |
| 80 | + | |
| 81 | + | |
91 | 82 | | |
92 | 83 | | |
93 | 84 | | |
94 | 85 | | |
95 | 86 | | |
96 | | - | |
97 | 87 | | |
98 | 88 | | |
99 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
25 | 43 | | |
26 | 44 | | |
27 | 45 | | |
| |||
61 | 79 | | |
62 | 80 | | |
63 | 81 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
67 | 86 | | |
68 | 87 | | |
69 | 88 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
File renamed without changes.
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
0 commit comments