feat(nix): install the CLI unconditionally, gate context per harness (task 0046) #55
Reference in New Issue
Block a user
Delete Branch "task-0046-reshape-hm-module-per-harness-toggle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements
.claude/tasks/0046-reshape-hm-module-per-harness-toggle.md.Summary
Reshapes the home-manager module so that enabling gitea-axi means "install the CLI, always", and the Claude Code agent context follows the harness.
programs.gitea-axi.enablenow installs the binary unconditionally.skill.enable,sessionStartHook.enable) and their assertion are replaced by one per-harness toggle,enableClaudeCodeIntegration(default literaltrue). Its artefacts land only whenprograms.claude-code.enableis also on, and are silently absent otherwise — no assertion.home.fileinto Claude Code's skills directory (readingconfigDirfrom the sibling module), rather than contributed toprograms.claude-code.skills. This composes with both the attribute-set and whole-directory forms of an operator's own skills option, fixing the path-form collision at its root.programs.claude-code.enableexplicitly (which also keeps package realisation lazy); the hook keeps its sibling-module gate for free. The asymmetry is commented in the module.package = nullfallback unchanged.Supersedes three decisions of ADR 0020, per ADR 0021.
Verified by evaluating the real module through
home-manager.lib.homeManagerConfigurationunder four configurations (both-on, Claude Code off, integration off,package = null); all matched the intended behaviour. The automatednix flake checkproof of this composition is the follow-up task 0047, whose task file is included here but implemented separately.No deviations from the plan.
Review
Risk
Overall: Medium
home-manager-module.nixplus its docs/ADR/spec/task files; no source code, no callers, self-contained flake output.claude-code.enablegate is a correctness-and-realisation-cost concern.mkIf/mkMergegating asymmetry is subtle.setuppath is unchanged and still available.Standards — unaddressed
The one documented-standard finding (multi-sentence Markdown lines in the task file's Implementation Notes) was fixed in this diff.
Spec
No findings — the diff faithfully implements task 0046, with no missing requirements, no scope creep, and no implemented-but-wrong behaviour.