#+TITLE: Add ~/.dotfiles to the ai launcher's project discovery #+DATE: 2026-06-16 * Request Add =~/.dotfiles= as an explicit discovery candidate in the =ai= launcher (=claude-templates/bin/ai=), the same way =~/.emacs.d= is handled. * Why =~/.dotfiles= was migrated out of archsetup into a standalone stow repo and just got bootstrapped as its own AI project (=.ai/protocols.org= now present). But =build_candidates()= only scans three roots — =~/.emacs.d=, =~/code/*=, and =~/projects/*=. =~/.dotfiles= sits directly in =$HOME=, under none of them, so the fzf picker (bare =ai=) and the "launch dotfiles" by-name trigger never see it. Explicit =ai ~/.dotfiles= already works (=single_mode= only checks for the marker, not a discovery root), but the picker and by-name launch don't. This is the launcher half of making =~/.dotfiles= a first-class project. The inbox-send half is already handled downstream: =~/.dotfiles= was added to =~/.claude/inbox-roots.txt= (its config-file extension point), so =inbox-send= reaches it now. * The change In =claude-templates/bin/ai=, inside =build_candidates()= (currently ~line 89, right after the =~/.emacs.d= line), add: #+begin_src bash maybe_add_candidate "$HOME/.dotfiles" #+end_src So the head of =build_candidates= reads: #+begin_src bash build_candidates() { candidates=() maybe_add_candidate "$HOME/.emacs.d" maybe_add_candidate "$HOME/.dotfiles" if [ -d "$HOME/code" ]; then ... #+end_src =maybe_add_candidate= already guards on =.ai/protocols.org=, so this is inert on any machine where =~/.dotfiles= isn't bootstrapped — same safety as the existing =~/.emacs.d= line. * Notes - I did NOT edit the rulesets canonical from archsetup's session — rulesets had a dirty tree and an interrupted session-context when I checked, so this goes through your own flow instead of interleaving. - Worth a glance: if =bin/ai= has a discovery test that enumerates the expected candidate roots, it may need the new line added there too. - Generalization to consider (your call, not requested): =~/.emacs.d= and =~/.dotfiles= are both single-project roots in =$HOME=. If more of these accrue, a small explicit list (or a =~/.claude/ai-roots.txt= mirroring =inbox-roots.txt=) would scale better than one =maybe_add_candidate= line each. Not needed for two. Sender: archsetup (2026-06-16 task-audit follow-through).