You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(kits): add neutral shell rc.d hook for personal kits #482
Move the neutral shell drop-in hook described in ADR-0030 out of team-specific kit behavior and into the base-image contract or a built-in neutral kit.
Provide a neutral ~/.rc.d hook for shell snippets delivered by built-in, team, or personal kits.
Source snippets for bash and zsh in deterministic lexical order.
Define equivalent native conf.d behavior or documented constraints for fish and nushell.
Document guardrails: kit-owned, not user-editable state; no secrets; do not duplicate what devenv already provides inside a devenv shell.
Document intended use-cases: neutral hook, agent shell integration outside devenv, team tool completions/env, personal aliases/functions, direnv/devenv hook.
Deferred Decisions
Whether this lives in the base image or a built-in neutral kit can be decided at implementation time, based on which path minimizes backend-specific behavior.
Acceptance Criteria
Personal kits can add shell snippets without depending on a team kit.
Existing team-kit behavior has a migration path.
Shell startup remains deterministic and does not expose secrets.
Tests cover snippet ordering and shell startup integration where feasible.
Orchestration Notes
Implementation should be done by an authoring sub-agent and reviewed by an independent adversarial review sub-agent. Review findings must be addressed before the increment is accepted.
SBX: test proves a neutral hybrid/v1 kit with files/home/agent/.rc.d/10-team.sh materializes through kit_translate_to_sbx into the sbx-v2 kit payload and mode workaround.
MSB: test proves a neutral kit can copy /home/agent/.rc.d/10-team.sh and /home/agent/.rc.d/90-personal.sh into the guest and chown the top rc.d tree to the agent user.
This complements 2982ba5, which added the MSB login-profile bridge that sources ~/.rc.d/*.sh for bash/zsh login shells.
Added acq_login_profile_rc_block as the shared backend-neutral bridge text.
MSB now writes that shared bridge from its acq-owned login-profile setup.
SBX now installs the same bridge at create time through a post-create sbx exec, rather than through a startup-bearing kit.
SBX waits for exec readiness before bridge installation, so freshly-created sandboxes do not silently miss the hook while exec is still starting.
The bridge sources readable ~/.rc.d/*.sh snippets in deterministic byte order via LC_ALL=C listing.
Tests now execute the generated block against a temporary HOME and verify snippet order, instead of only checking logged command text.
Documentation now states the implemented shell behavior precisely: the built-in ~/.profile bridge covers bash login shells; zsh-capable base images must wire the same directory from native zsh startup files; fish/nushell remain documented native-conf.d future paths.
Implemented and shipped in v4.0.0 via #474 (with corrective #549). Neutral ~/.rc.d/*.sh hook is delivered and bridged on both msb and sbx. The PR's Closes: footer did not auto-close this because the collapsed-stack squash merge dropped the closing keyword references; closing manually now that the work is on main and released.
Activity
mogul commentedon Sep 17, 2026
Implemented the first quickstart-side rc.d increment on
refactor/acq-devenv-base-image.Commit:
2982ba5 feat(kits): source neutral rc snippetsWhat landed:
~/.rc.d/*.shsnippets for bash/zsh login shells.direnv allowand does not duplicate the explicitACQ_ACTIVATE_PROJECT_ENVbehavior..bashrcbridge behavior remains intact.Verification:
bash -n acq.backends/msb.sh test/bats/72-msb-agent-user.batsgit diff --checkprintf %s\\n acq.backends/msb.sh test/bats/72-msb-agent-user.bats | xargs -r -n8 shellcheck --severity=warning./scripts/test-acq-bats test/bats/72-msb-agent-user.bats test/bats/140-opencode-migration-gate.bats(50/50)Still deferred:
.shsnippets only.mogul commentedon Sep 18, 2026
Added fixture coverage for neutral rc.d snippet delivery.
Commit:
932a8b7 test(kits): cover neutral rc snippet deliveryWhat landed:
hybrid/v1kit withfiles/home/agent/.rc.d/10-team.shmaterializes throughkit_translate_to_sbxinto the sbx-v2 kit payload and mode workaround./home/agent/.rc.d/10-team.shand/home/agent/.rc.d/90-personal.shinto the guest and chown the top rc.d tree to the agent user.2982ba5, which added the MSB login-profile bridge that sources~/.rc.d/*.shfor bash/zsh login shells.Verification:
bash -n acq.backends/msb.sh acq.backends/kit-translate.sh test/bats/72-msb-agent-user.bats test/bats/74-msb-restart-durability.bats test/bats/90-sbx-startup-kit.batsgit diff --check./test/vendor/bats-core/bin/bats --filter 'rc\\.d\\(sbx\\)|rc\\.d\\(msb\\)|migration gate' test/bats/90-sbx-startup-kit.bats test/bats/72-msb-agent-user.bats test/bats/74-msb-restart-durability.bats test/bats/140-opencode-migration-gate.bats(9/9)Known residual:
test/bats/90-sbx-startup-kit.batsstill includes the unrelated pre-existing stale-probe/git-identity failure; the new SBX rc.d test passes.docs(kits): document neutral rc snippets (#511)
mogul commentedon Sep 24, 2026
Updated rc.d implementation status
The latest quickstart-side rc.d increment is now pushed on
refactor/acq-devenv-base-image/ #474.Latest relevant commit:
59d10f0 feat(kits): wire neutral rc snippetsWhat changed since the earlier comments here:
acq_login_profile_rc_blockas the shared backend-neutral bridge text.sbx exec, rather than through a startup-bearing kit.~/.rc.d/*.shsnippets in deterministic byte order viaLC_ALL=Clisting.HOMEand verify snippet order, instead of only checking logged command text.~/.profilebridge covers bash login shells; zsh-capable base images must wire the same directory from native zsh startup files; fish/nushell remain documented native-conf.d future paths.Verification:
./scripts/test-acq-bats test/bats/72-msb-agent-user.bats test/bats/90-sbx-startup-kit.bats61/61)./scripts/test-acq-bats597/597) after the follow-up hardening commitgit diff --checknpm run lint:md0issues)Residual risk: live
./scripts/verify-backendswas not run in this session because it requires a sandbox-capable host/backend setup.mogul commentedon Oct 6, 2026
Implemented and shipped in v4.0.0 via #474 (with corrective #549). Neutral ~/.rc.d/*.sh hook is delivered and bridged on both msb and sbx. The PR's
Closes:footer did not auto-close this because the collapsed-stack squash merge dropped the closing keyword references; closing manually now that the work is onmainand released.feat(isolation): add the scope-layers pattern and a team-kit template (…