Skip to content

Rebuild live-config capture stack on main (supersedes #28 + capture-live-config)#39

Open
alycda wants to merge 22 commits into
mainfrom
claude/live-config-v2
Open

Rebuild live-config capture stack on main (supersedes #28 + capture-live-config)#39
alycda wants to merge 22 commits into
mainfrom
claude/live-config-v2

Conversation

@alycda

@alycda alycda commented Jul 2, 2026

Copy link
Copy Markdown
Owner

What

The agents/claude-hermes-config (#28) → claude/capture-live-config stack, rebuilt commit-for-commit on current main. 22 commits: the original 21 (hermes config, sprint/researcher skills, the full live-config capture: CLAUDE.md, settings, commands, skills, .claude.json, homebrew, ditto-worktree justfile/tb-ticket) plus one harmonization commit for the outbound-message gate (#38).

The original branches are untouched; this branch supersedes them. Close #28 when this merges.

Conflict resolutions (vs. new main)

Harmonization with #38 (new top commit)

tools/claude/CLAUDE.md is now the managed source of truth (oosSymlink, live-editable), so the @rules/outbound-comment-gate.md import is baked into it and claude-code.nix shrinks to just the rules-file link — the activation splice was only needed while CLAUDE.md was hand-edited. Also sets home-manager.backupFileExtension = "hm-backup" so machines migrating from hand-edited files activate cleanly with automatic backups.

Verified (tart VM, clean-ish machine, full darwin-rebuild switch)

  • CLAUDE.md/commands resolve through oosSymlinks to ~/dotfiles; edit-through confirmed.
  • Gate rule imports and resolves; 11 Claude skills + 10 agent skills + 6 commands + hermes config deployed.
  • Pre-existing ~/.claude/{CLAUDE.md,settings.json} auto-backed up as .hm-backup (the exact migration real machines will hit).
  • Idempotent second switch; statix/deadnix/nix flake check clean.

Known follow-ups (not in this PR)

  • tools/work/ (ditto-worktree justfile, tb-ticket) is captured but not yet deployed via home-manager — next increment.
  • Upstream renamed the ollama cask to ollama-app (pre-existing on main; brew bundle fails until fixed).
  • brew trust state is invalidated when taps update mid-switch; re-trust before switching.

🤖 Generated with Claude Code

alycda added 22 commits July 2, 2026 01:57
Move claude-code install and settings.json symlink into
tools/claude.nix so the module owns the full setup. settings.json
lands as a /nix/store symlink: read-only at runtime by design,
version-locked with the flake.
Wire up Hermes via a dedicated home-manager module so the live SOUL.md
default-persona file is editable in place. mkOutOfStoreSymlink targets
~/dotfiles/tools/hermes/SOUL.md so edits go straight to the working
tree (unlike claude's settings.json, which is locked to /nix/store).

hermes-agent isn't in nixpkgs yet, so it's bootstrapped via
`nix profile install github:NousResearch/hermes-agent` -- baked into
.devcontainer.json for the devcontainer path and called out in the
macOS README. Once hermes lands in nixpkgs, both flip to home-manager
ownership.

Runtime state (state.db, sessions/, logs/, .env, auth.json, memories/)
stays Hermes-owned -- documented in the module header so future work
doesn't try to manage it.
Eight personas live in tools/hermes/profiles/<name>/{SOUL.md,config.yaml}:
- distinguished-engineer  (mythos via anthropic)
- engineer                (claude-sonnet-4-6)
- principal-engineer      (claude-opus-4-7)
- researcher-claude       (claude-sonnet-4-6)
- researcher-codex        (gpt-5.5 via openai-codex)
- researcher-gemini       (gemini-2.5-pro)
- staff-engineer          (gpt-5.5 via openai-codex)
- writer                  (claude-haiku-4-5-20251001)

hermes.nix folds each profile into two mkOutOfStoreSymlink entries
(SOUL.md + config.yaml). Adding a new profile means dropping a
directory under tools/hermes/profiles/ and adding the name to
trackedProfiles.

darwin homebrew picks up the non-claude worker CLIs:
- codex      (cask) -- required by researcher-codex and staff-engineer
- gemini-cli (brew) -- required by researcher-gemini

Skills are intentionally not symlinked here; they land in a follow-up
commit once tools/hermes/skills/ and tools/agents/skills/ are added.

Migration note: darwin-rebuild will refuse to overwrite live
~/.hermes/profiles/<name>/ directories that already exist. Before the
first rebuild on a machine that already has these profiles populated,
either rm -rf the live dirs or pass --backup-extension=backup to
home-manager.
Brings the researcher skill into the tracked dotfiles tree:
- Canonical content lives at tools/agents/skills/researcher/
  (SKILL.md + 12 references/ + 2 templates/, sourced from PR 10).
  Folder name matches the skill name in SKILL.md frontmatter
  (name: researcher) -- required for skill discovery in both
  claude and hermes runtimes.

Both shells of usage get a live mount via mkOutOfStoreSymlink:
- hermes:  ~/.hermes/skills/research/researcher -> canonical
- claude:  ~/.claude/skills/researcher           -> canonical (user-level)

Hermes' nesting convention is ~/.hermes/skills/<category>/<skill>/SKILL.md
(observed under live ~/.hermes/skills/research/ alongside built-in
research-paper-writing/, blogwatcher/, polymarket/, etc.). Claude uses
the flatter ~/.claude/skills/<skill>/ shape; researcher is general-
purpose so it lands user-level rather than per-workspace.

Edits to SKILL.md, references/, or templates/ are live in both runtimes
simultaneously and tracked under one canonical path. The nix module is
the sole declarative source for the mount mapping -- no in-repo stub
symlink under tools/hermes/skills/research/, since that would create a
second source of truth and falsely imply this repo owns the hermes
`research` category (it doesn't; only the researcher entry inside it).

Migration note: existing live symlink
  ~/.hermes/skills/research/researcher -> ~/Desktop/AI Accelerator/...
will collide with the new home-manager symlink. Before the first
rebuild, either remove the live path (rm ~/.hermes/skills/research/
researcher) or pass --backup-extension=backup to home-manager.

Claude side has no collision today -- ~/.claude/skills/researcher does
not exist yet.

Skills landed: researcher only. sprint-{planner,execute,retrospective}
and the orchestration skill are intentionally separate commits to keep
each skill's history reviewable in isolation.
Three sprint workflow skills move from drifting workspace copies into
one tracked location:
- tools/agents/skills/sprint-planner/      (SKILL.md + ledger-yaml-format ref + ledger.py)
- tools/agents/skills/sprint-execute/      (SKILL.md)
- tools/agents/skills/sprint-retrospective/ (SKILL.md)

Content matches PR 10's sanitized snapshot (internal ticket IDs
replaced with <INTERNAL-TICKET>). The live state under
~/.hermes/skills/software-development/, ~/Desktop/AI Accelerator/.claude/
skills/, and ~/Work/ditto-worktree/.claude/skills/ had quietly diverged
across workspaces because no canonical source existed; this commit
establishes one.

Mounts via mkOutOfStoreSymlink:
- hermes:  ~/.hermes/skills/software-development/<skill>/
- claude:  ~/.claude/skills/<skill>/ (user-level)

Hermes nests under software-development per its category convention
(alongside built-in plan/, spike/, test-driven-development/, etc.).
Claude lands user-level matching the researcher pattern -- the
workspace-level drift was incidental, not intentional, so a single
canonical mount is the cleanup.

Migration note: existing live directories at
  ~/.hermes/skills/software-development/sprint-{planner,execute,retrospective}/
will collide with the new home-manager symlinks. Before the first
rebuild, either remove them (rm -rf) -- safe because PR 10 already
captured the live content -- or pass --backup-extension=backup to
home-manager.

Workspace claude copies under ~/Desktop/AI Accelerator/.claude/skills/
and ~/Work/ditto-worktree/.claude/skills/ are NOT touched here. They're
real dirs and will shadow ~/.claude/skills/<skill> when claude is
launched from those workspaces, until you delete them.

Skills tracked here intentionally exclude the live references/ and
scripts/ entries under sprint-planner that PR 10 chose not to track
(only ledger-yaml-format.md and ledger.py made the cut).
The sprinter skill orchestrates plan -> execute -> retro pipelines
across one or more sprints derived from a Linear ticket, using Hermes
Kanban as the durable substrate. Wraps the three sprint-* specialist
skills as per-sprint workers.

Canonical content lives at tools/hermes/skills/sprinter/:
- SKILL.md
- references/{decomposition-heuristic, kanban-context-additions,
              kanban-task-shapes, linear-fetch-patterns}.md
- scripts/decompose.py  (552 lines, executable, sourced from Desktop)
- templates/sprint-manifest.example.yaml

Source selection: pulled from
  ~/Desktop/AI Accelerator/hermes-skills/orchestration/sprinter/
in preference to PR 10's snapshot, which had drifted:
- PR 10 tracked an empty (0-byte) decompose.py; Desktop has the real
  18902-byte implementation.
- PR 10 had a typo'd filename (kanban-context-additiona.md, no 's');
  Desktop has the correctly-named kanban-context-additions.md, which
  the SKILL.md actually references.
- Template filename ordering: Desktop uses sprint-manifest.example.yaml,
  matching its own SKILL.md reference; PR 10 had .yaml.example which
  didn't match its body text.

SKILL.md was patched at two sites where the upstream content referenced
~/.hermes/skills/sprint/sprint-* -- a path that doesn't exist in either
the live state or this repo. Repointed both to
~/.hermes/skills/software-development/sprint-* to match where commit
22a2ea3 actually mounts the three specialist skills.

Mount via mkOutOfStoreSymlink:
- hermes: ~/.hermes/skills/orchestration/sprinter -> canonical

Not mounted for claude. The skill requires kanban_create and
kanban_link (hermes-only tools) so it cannot meaningfully run from
claude even with the SKILL.md in scope.

Migration note: nothing collides at the mount target today. Live
~/.hermes/skills/ has no `orchestration` category; the home-manager
symlink creates it fresh.

Skill name `sprinter` matches the enclosing folder (canonical dir is
sprinter/, mount target ends in /sprinter) per the rule established
when researcher landed.
Pulls five reference docs from PR 10 (29512cf) into the dotfiles tree:
- tools/claude/projects/communications/CLAUDE.md
- tools/claude/projects/ditto/CLAUDE.md
- tools/claude/projects/ditto/files/P10 - Rules for developing safety-critical code.md
- tools/claude/projects/ditto/files/TIGER_STYLE.md
- tools/claude/projects/ditto/files/Test Desiderata.md

These aren't laid out the way Claude Code natively discovers projects
(it expects per-workspace .claude/ directories, not a central
projects/<name>/ tree). Tracked in this shape regardless so the
content lives in one canonical place under version control instead of
drifting across workspaces. No home-manager symlinks here -- this
commit is content-only.
The capture stack manages ~/.claude/CLAUDE.md as an out-of-store symlink,
which supersedes the activation-script splice from PR #38: the import line
now lives in the captured CLAUDE.md itself, and claude-code.nix shrinks to
just the rules file deployment. Also set home-manager.backupFileExtension
so machines migrating from hand-edited dotfiles (CLAUDE.md, settings.json)
get automatic .hm-backup copies instead of a refused activation.
@@ -0,0 +1,3 @@
model:
default: claude-sonnet-4-6

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default: claude-sonnet-4-6
default: claude-sonnet-5

@@ -0,0 +1,3 @@
model:
default: mythos

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default: mythos
default: fable-5

@@ -0,0 +1,3 @@
model:
default: claude-opus-4-7

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default: claude-opus-4-7
default: claude-opus-4-8

@@ -0,0 +1,3 @@
model:
default: claude-sonnet-4-6

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default: claude-sonnet-4-6
default: claude-sonnet-5

"chatgpt"
"claude"
"clocker"
"cmux" # Ghostty-based terminal for AI coding agents

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated on line 68

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.

1 participant