Summary
Several of the largest Bash command files mix argument parsing, validation, external orchestration, and file writing into single, very long functions.
Details
cli/bash/commands/basectl/subcommands/repo.sh:2102-2572 — base_repo_init, 471 lines, 30+ locals (file itself is 3,177 lines).
cli/bash/commands/basectl/subcommands/gh.sh:892 — base_gh_issue_readiness, 258 lines.
cli/bash/commands/basectl/subcommands/setup_common.sh:1024 — setup_run_project_artifact_layer, 196 lines.
Impact
These functions are difficult to test in isolation, review for security-relevant changes (e.g. GitHub API/CLI orchestration), or safely modify without regressions.
Suggested fix
Decompose into smaller named steps (parse → validate → plan → execute → report), consistent with smaller functions already used elsewhere in the same files.
Summary
Several of the largest Bash command files mix argument parsing, validation, external orchestration, and file writing into single, very long functions.
Details
cli/bash/commands/basectl/subcommands/repo.sh:2102-2572—base_repo_init, 471 lines, 30+ locals (file itself is 3,177 lines).cli/bash/commands/basectl/subcommands/gh.sh:892—base_gh_issue_readiness, 258 lines.cli/bash/commands/basectl/subcommands/setup_common.sh:1024—setup_run_project_artifact_layer, 196 lines.Impact
These functions are difficult to test in isolation, review for security-relevant changes (e.g. GitHub API/CLI orchestration), or safely modify without regressions.
Suggested fix
Decompose into smaller named steps (parse → validate → plan → execute → report), consistent with smaller functions already used elsewhere in the same files.