Skip to content

Consolidate bin/ ↔ ~/.local/bin to a single canonical source (deploy by symlink) #4

Description

@4444J99

Debt

bin/ is the declared source-of-record for the diagnostic CLIs, but the deployed
runtime at ~/.local/bin/<tool> is a separate chezmoi-managed copy. Two copies
that can drift = parallel substrate, which docs/repository-standards.md §4 and the
canonical-surfaces doctrine forbid. There must be exactly one canonical source.

Blocker

Consolidation requires chezmoi-source git ops (chezmoi forget auto-commits to the
dotfiles repo). The chezmoi source tree is currently lock-held by another session,
so this is deferred — not optional, just gated. Do it when the lock frees.

Steps (execute when the chezmoi source lock is free)

For each tool — sysdiag memdiag mem-pressure-snapshot memdiag-watch.zsh archive-snapshot claude-health-check:

  1. chezmoi diff ~/.local/bin/<tool> — verify bin/<tool> matches the deployed copy.
    If they diverge, reconcile toward bin/ (it is canonical) before proceeding.
  2. chezmoi forget ~/.local/bin/<tool> — stop chezmoi managing it (removes from source).
  3. ln -sfn "$HOME/Workspace/_diagnostics/bin/<tool>" "$HOME/.local/bin/<tool>" — deploy
    as a symlink to the canonical source.
  4. Verify: command -v <tool> resolves and the tool runs (sysdiag doctor, etc.).
  5. Update bin/README.md "Source of record vs. deployed runtime" — drop the "deferred"
    caveat; state that ~/.local/bin/<tool> is a symlink to bin/.

Done when

readlink ~/.local/bin/sysdiag points into _diagnostics/bin/, and no copy of any
diagnostic CLI remains in the chezmoi source tree. One canonical source, deployed by
symlink, version-controlled here, pushed offsite.

Related

Same lock currently also gates durable persistence of this scope's memory artifact
(project_artifact_memdiag_loop.md) into chezmoi source — both unblock together.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions