From f5609ec3aa591e93938992e329c4732332288517 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 20 Jun 2026 22:06:53 -0400 Subject: feat(ai): discover ~/.dotfiles in the launcher picker build_candidates() only scanned ~/.emacs.d, ~/code/*, and ~/projects/*, so ~/.dotfiles (a bootstrapped AI project living directly in $HOME) never showed in the launcher picker. I added it as an explicit candidate next to ~/.emacs.d. The maybe_add_candidate guard keys off .ai/protocols.org, so the line stays inert where ~/.dotfiles isn't bootstrapped. --- claude-templates/bin/ai | 1 + working/ai-dotfiles-discovery/proposed.diff | 7 ----- working/ai-dotfiles-discovery/request.org | 41 ----------------------------- 3 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 working/ai-dotfiles-discovery/proposed.diff delete mode 100644 working/ai-dotfiles-discovery/request.org diff --git a/claude-templates/bin/ai b/claude-templates/bin/ai index 5a806ec..994dc1f 100755 --- a/claude-templates/bin/ai +++ b/claude-templates/bin/ai @@ -87,6 +87,7 @@ maybe_add_candidate() { build_candidates() { candidates=() maybe_add_candidate "$HOME/.emacs.d" + maybe_add_candidate "$HOME/.dotfiles" if [ -d "$HOME/code" ]; then while IFS= read -r d; do maybe_add_candidate "$d" diff --git a/working/ai-dotfiles-discovery/proposed.diff b/working/ai-dotfiles-discovery/proposed.diff deleted file mode 100644 index f22c7a8..0000000 --- a/working/ai-dotfiles-discovery/proposed.diff +++ /dev/null @@ -1,7 +0,0 @@ ---- a/claude-templates/bin/ai -+++ b/claude-templates/bin/ai -@@ build_candidates() { - candidates=() - maybe_add_candidate "$HOME/.emacs.d" -+ maybe_add_candidate "$HOME/.dotfiles" - if [ -d "$HOME/code" ]; then diff --git a/working/ai-dotfiles-discovery/request.org b/working/ai-dotfiles-discovery/request.org deleted file mode 100644 index 3535daf..0000000 --- a/working/ai-dotfiles-discovery/request.org +++ /dev/null @@ -1,41 +0,0 @@ -#+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). -- cgit v1.2.3