Commit Graph

4 Commits

Author SHA1 Message Date
Teknium
0228845ffc refactor(hermes_cli/subcommands): hoist add_yes_flag/add_json_flag into _shared, dedupe gateway --system and peer remote-subparser builders, compact dashboard docs 2026-09-02 20:45:41 -07:00
Teknium
1967a13bfa refactor(hermes_cli/subcommands): reflow argparse kwargs and drop redundant help=(...) parens (AST-verified) 2026-09-02 20:14:46 -07:00
Teknium
a43396dd53 refactor(hermes_cli/subcommands): pack argparse builder calls onto <=100-col lines (AST-verified) 2026-09-02 19:57:24 -07:00
teknium1
b2e6053243 refactor(cli): extract hermes cron parser into hermes_cli/subcommands/ (god-file Phase 2)
Phase 2 of the god-file decomposition plan. main()'s argparse tree is 179
inline add_parser calls in one 3,297-line function. This establishes the
hermes_cli/subcommands/ package and extracts the first group (cron) as the
proof-of-pattern:

- hermes_cli/subcommands/_shared.py: shared parser helpers (add_accept_hooks_flag),
  re-exported from main.py for backwards compat.
- hermes_cli/subcommands/cron.py: build_cron_parser(subparsers, cmd_cron=...).
  Handler injected so the module never imports main (cycle avoidance).
- main()'s ~155-line inline cron block becomes one build_cron_parser() call.

Behavior-neutral: 'hermes cron create --help' output is byte-identical to
origin/main. main() 3297 -> 3143 LOC.

Validation: tests/hermes_cli/ 6466 passed / 0 failed under per-file process
isolation; new test_subcommands_cron.py covers subactions, aliases, options,
no-agent tristate, injected dispatch, and --accept-hooks.
2026-06-07 22:18:14 -07:00