Audit baseline: 0cc18b8, verified against current master on 2026-09-10.
The native CLI bin/agentbox is 5,103 lines with 129 functions/methods at the audit baseline. It combines schema validation, host configuration, rendering, filesystem reconciliation, activation/verification, password provisioning, and update/rollback. That increases the review surface of a small host change.
Proposed change: extract importable modules with explicit inputs for schema/configuration, pure rendering, filesystem commit/reconciliation, activation/verification, and update/rollback. Keep the command-line entry point small and preserve its exit-status contract. Stage by responsibility so each PR is reviewable and behavior-preserving.
This complements #529 (settings daemon), #451 (shared backend contracts), and #527 (managed-resource reconciliation). It should not replace or duplicate their work, and it must not create a third backend specification.
Acceptance:
- Pure schema/render components import without starting subprocesses or mutating a host.
- The installed runtime packages every required module; source checkout and installed-profile entry points behave identically.
- Native fixture, golden snapshot, backend parity, and one-spec checks continue to pass.
- Public CLI/configuration behavior and update/rollback failure handling remain unchanged.
P3: post-release simplification, not a reason to undertake a rewrite during the one-week security freeze.
Audit baseline: 0cc18b8, verified against current master on 2026-09-10.
The native CLI bin/agentbox is 5,103 lines with 129 functions/methods at the audit baseline. It combines schema validation, host configuration, rendering, filesystem reconciliation, activation/verification, password provisioning, and update/rollback. That increases the review surface of a small host change.
Proposed change: extract importable modules with explicit inputs for schema/configuration, pure rendering, filesystem commit/reconciliation, activation/verification, and update/rollback. Keep the command-line entry point small and preserve its exit-status contract. Stage by responsibility so each PR is reviewable and behavior-preserving.
This complements #529 (settings daemon), #451 (shared backend contracts), and #527 (managed-resource reconciliation). It should not replace or duplicate their work, and it must not create a third backend specification.
Acceptance:
P3: post-release simplification, not a reason to undertake a rewrite during the one-week security freeze.