Skip to content

Design setup_common.sh ownership reduction path #929

Description

@codeforester

Problem

cli/bash/commands/basectl/subcommands/setup_common.sh is currently about 2,141 lines and attracts setup, check, JSON, profile, project artifact, hook, log, and dev-layer coordination behavior. The file size is a maintainability signal, but Base should not blindly split shell code into sourced fragments just because the file is large.

Desired outcome

Design a safe ownership-reduction path for setup_common.sh that identifies which responsibilities should move to Python, which belong in existing Base Bash command helpers, and which represent genuine new shell boundaries.

Scope

  • Inventory the major responsibilities currently inside setup_common.sh.
  • Identify behavior that should move into Python setup/check/dev layers.
  • Identify behavior that should move into existing command-specific Bash helpers.
  • Identify any truly distinct shell boundary that would justify a separate sourceable helper under Base standards.
  • Preserve the single-file shell-library policy; this issue is not a license to create shell fragments by concern.
  • Produce a sequenced follow-up plan with small implementation issues if extraction is warranted.

Non-goals

  • Do not split setup_common.sh mechanically by topic.
  • Do not add a shell module loader.
  • Do not change setup/check behavior in the design-only slice.

Acceptance criteria

  • A design note or tracked plan describes the current responsibility map.
  • The plan distinguishes Python-owned behavior, command-helper behavior, and shell-boundary behavior.
  • Follow-up implementation issues are created only for clear ownership moves.
  • The plan explicitly respects the single-file sourceable library standard documented in STANDARDS.md.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or product improvement

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions