Skip to content

Add superfile (worked example for the new-tool template) - #199

Closed
alycda wants to merge 2 commits into
claude/loving-hawking-5eh9pmfrom
claude/superfile-eval
Closed

alycda wants to merge 2 commits into
claude/loving-hawking-5eh9pmfrom
claude/superfile-eval

Conversation

@alycda

@alycda alycda commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Stacked on #198 (base is claude/loving-hawking-5eh9pm, not main). Retarget to main once #198 merges. This PR adds superfile and fills in the new-tool template as it goes, to see where the template helps and where it doesn't.

what

superfile, a TUI file manager (Go, MIT). CLI/TUI. It builds for aarch64-darwin and linux. Added to home.nix and to the darwin-gated list in work.nix.

why

No file manager is installed today; I grepped the repo for yazi, ranger, lf, nnn, broot and xplr and found none. This is an evaluation target for the template, so the "closest existing tool" answer is eza plus bat for listing and previewing, which don't navigate or operate on files.

how

  • Placement: profile packages, no module. superfile writes its own config and state at runtime, so there is nothing for home-manager to own. work.nix also feeds the alyssa@work-dev devcontainer, so it sits in the darwin-gated list. Not lib/core-packages.nix, which every container inherits.
  • Source: nixpkgs superfile. The locked rev (7a0f122) has 1.3.3; nixos-unstable and master have 1.6.0. That is a stale lock rather than a lagging nixpkgs, so the fix is nix flake update, which the weekly workflow does. I did not pin forward as lib/weave.nix does, and I did not bump the lock here because that moves every input under a one-package change. Until the next update this installs 1.3.3.
  • Constraints:
    • headless-safe: gated out of the container; no credential prompt
    • runtime-mutable state stays unmanaged
    • base-image collision risk: only the superfile binary, nothing that overlaps the nixos/nix profile. This is by inspection, not by activating in the image.
    • network calls: auto_check_update defaults to true, a once-a-day check on exit. Left at the default, with a comment saying how to turn it off.

verify

  • statix check . and deadnix --fail . pass
  • both profile files parse
  • the locked nixpkgs' superfile builds on x86_64-linux and superfile --version prints v1.3.3
  • not verified: full evaluation of the home configurations. This sandbox's proxy refuses the github: flake inputs, so nix eval .#homeConfigurations... can't run here. CI's eval-configurations.sh is the check for that.
  • not verified: anything on a real macOS profile. After a switch, run zsh -lc 'command -v superfile && superfile --version'.

Template evaluation

The template did its job: it forced the version check, the placement reasoning and the "not verified" list. Four gaps showed up, none fixed here (they belong on #198 if you agree):

  1. Binary name. The upstream docs say spf; nixpkgs installs superfile (mainProgram), on 1.6.0 too. The verify baseline command -v <tool> only works with the real binary name, which what doesn't ask for. Suggest adding "binary name, if it differs from the project name" to what. I added no spf alias; that is your call.
  2. Phone-home behaviour. Nothing in how asks about update checks or telemetry, and this tool has one on by default. Given a privacy-first default, suggest a constraint checkbox: "network calls at startup or exit, and how to disable them".
  3. Which version source. The prompt says "version at the pinned rev, and master if stale". The check that mattered was the three-way one: locked rev vs nixos-unstable head vs master. It decides between flake update and a pin-forward, which are different PRs. Suggest naming nixos-unstable in the prompt.
  4. "Can't run it where you are". This prompt earned its place. The flake eval was blocked here, and without the prompt the gap would have been easy to skip.

🤖 Generated with Claude Code

https://claude.ai/code/session_014ctTM9ShmZvCpEmMKEdHvP


Generated by Claude Code

Stacked on the new-tool issue template as a worked example of filling it
in. Package only, no module: superfile writes its own config and state at
runtime, so there is nothing for home-manager to own (CLAUDE.md, "Runtime-
mutable config must stay unmanaged"), and one package does not justify a
bespoke module (PR #44).

Placement:
- home.nix: desktop-only profile, plain `packages` entry
- work.nix: inside the darwin-gated list, since this profile is also
  alyssa@work-dev on aarch64-linux and a file manager earns nothing in a
  headless devcontainer. Not lib/core-packages.nix for the same reason.

Version: the locked nixpkgs carries 1.3.3, while nixos-unstable and master
carry 1.6.0. That is a stale flake.lock, not a lagging nixpkgs, so the fix
is `nix flake update` (the weekly workflow does it), not a pin-forward in
lib/ like weave. Deliberately not bumping the lock here: it would move
every input under a one-package change.

Two things found while checking, not fixed here:
- the binary is `superfile`, not `spf` as the upstream docs write it
- `auto_check_update` defaults to true: a once-a-day network call on exit

Verified: statix and deadnix clean, both profile files parse, the locked
nixpkgs' superfile builds on x86_64-linux and reports v1.3.3. NOT verified:
full flake evaluation of the home configurations; the sandbox proxy blocks
the github: flake inputs. CI's eval-configurations.sh covers that.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014ctTM9ShmZvCpEmMKEdHvP
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

⊕ Entity-level changes

home-manager/profiles/home.nix

Status Type Name
Δ binding home

home-manager/profiles/work.nix

Status Type Name
Δ binding home

Summary: 2 modified across 2 files

functions and classes, not lines · sem

Pick up the template changes the superfile dry run motivated, so the
stacked PR's base and head agree. A merge rather than a rebase: the
branch is already pushed and #199 is open against it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014ctTM9ShmZvCpEmMKEdHvP
alycda pushed a commit that referenced this pull request Oct 3, 2026
Filling the template in for superfile (#199) turned up three prompts that
were missing or too vague. Changes:

- what: ask for the binary name when it differs from the project name.
  superfile installs `superfile` while its docs say `spf`, so a `verify`
  that trusted the project name would have checked the wrong command.
  The verify baseline now says <binary> rather than <tool>.
- how/source: compare three points, not "master if stale": the locked
  rev, nixos-unstable head and master. The result picks the fix. Locked
  behind with unstable current is a stale lock (`nix flake update`);
  unstable and master both behind is nixpkgs lagging (vendor input or
  pin-forward). superfile was the first kind; weave and crush are the
  second, and the two cases are different PRs.
- how/constraints: add a checkbox for network calls at startup or exit
  (update checks, telemetry). superfile checks for updates on exit by
  default, and nothing in the template would have asked.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014ctTM9ShmZvCpEmMKEdHvP

alycda commented Oct 3, 2026

Copy link
Copy Markdown
Owner Author

Update to the "Template evaluation" section above: gaps 1–3 (binary name, network calls, three-way version check) are now applied to the template in #198 (62ad229), and this branch has merged them in (2e16f09). Gap 4 needed no change. The "none fixed here" wording in the description is out of date.


Generated by Claude Code

@alycda
alycda added this pull request to stack #200 October 3, 2026 09:07
@alycda alycda closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants