Skip to content

Sync docs with repo, compound closed-PR lessons, fix lint parity + taskbook placement - #51

Draft
alycda wants to merge 5 commits into
mainfrom
claude/compound-engineering-plugin-tchbun
Draft

Sync docs with repo, compound closed-PR lessons, fix lint parity + taskbook placement#51
alycda wants to merge 5 commits into
mainfrom
claude/compound-engineering-plugin-tchbun

Conversation

@alycda

@alycda alycda commented Jul 28, 2026

Copy link
Copy Markdown
Owner

What & why

A documentation + compound-engineering pass, plus two small fixes surfaced by that pass.

1. Sync the structure docs with reality (579a593)

Both the README diagram and CLAUDE.md's Repository Structure had drifted ~a dozen commits behind the actual tree. Neither documented four whole top-level areas or the newer home-manager modules:

  • lib/core-packages.nix — the shared pkgs list imported by both the flake devShells and home-manager (now has its own note explaining the pattern)
  • tools/ — non-Nix tool content (agents overlay, cheat, claude rules, helix), wired in by home-manager/modules/tools/*
  • secrets/ — agenix/ragenix encrypted secrets
  • docker/ + Dockerfile — the x86_64 image for the frozen 2012 MBP
  • plus modules/git.nix, ide/vscode-profiles/, profiles/code.nix, darwin/modules/homebrew.nix; dropped the phantom darwin/profiles/alyssa.nix

2. Compound durable lessons mined from closed PRs (297f844)

A pass over all 31 closed PRs (merged and abandoned) — mining each body, review thread, and diff — distilling the reusable rules not already captured. Every claim was verified against the current tree. Highlights:

3. Fixes surfaced by the pass

  • deadnix parity: justfile's lint-deadnix ran deadnix -- . (report-only) while CI runs deadnix --fail ., so a green just ci could still fail CI. Aligned local to CI.
  • taskbook placement: taskbook (a Node closure) sat in lib/core-packages.nix, which common.nix — and therefore the headless dev/x86 devcontainer — inherits, contradicting the lean-container rule. Moved it to the desktop profiles (home.nix, work.nix) where it's actually used.

Testing

Docs + config only; no runtime behavior change beyond the two fixes. CLAUDE.md structure verified (balanced code fences, intact headings). The user runs darwin-rebuild/home-manager switch themselves.

Follow-ups

Filed as a separate issue: writing the agent-distribution invariants into tools/agents/README.md and the Claude-Code-on-web instruction-drift open risk (#40).

🤖 Generated with Claude Code


Generated by Claude Code

claude added 3 commits July 28, 2026 21:44
Both the README structure diagram and CLAUDE.md's Repository Structure
had drifted ~a dozen commits behind reality. Neither documented four
whole top-level areas or the newer home-manager modules, so a reader
(human or agent) building a mental model from the docs would miss half
the repo.

What was stale and is now captured:
- lib/core-packages.nix — the shared pkgs list imported by BOTH the
  flake devShells and home-manager, so ephemeral `nix develop` and
  switched profiles install the same core CLI tools. This is a real
  architectural decision and now has its own note in CLAUDE.md.
- tools/ — non-Nix tool content (agents overlay, cheat, claude rules,
  helix), wired in by the new home-manager/modules/tools/* modules.
- secrets/ — agenix/ragenix age-encrypted secrets.
- docker/ + Dockerfile — the x86_64 image for the frozen 2012 MBP.
- home-manager: modules/git.nix, modules/tools/*, ide/vscode-profiles/,
  profiles/code.nix; darwin/modules/homebrew.nix.
- Dropped the phantom darwin/profiles/alyssa.nix (ditto is the only
  darwinConfiguration).

Docs-only; no behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UGTA5cYd5qJuzCAhux7s2D
A compound-engineering pass over all 31 closed PRs (merged and
abandoned), mining each PR's body, review discussion, and resulting
diff for reusable rules and gotchas, then distilling the ones not
already captured into the guidelines. Every claim was verified against
the current tree before writing. Abandoned PRs were as instructive as
merged ones — they record what NOT to do.

New / expanded guidance:

- New section "Tools Nix Can't Fully Manage": SDK/version managers via
  activation scripts not nix-shell (#3, #6); prefer Homebrew over a
  hand-rolled derivation and never commit lib.fakeHash (#19); the full
  installer-script-under-activation playbook — sanitized PATH, sessionPath
  over rc exports, guard on the binary path not `command -v`, pin the
  installer version (#32 -> #37); linkGeneration vs writeBoundary ordering
  for generated @imports (#38); pin a CLI to a fast-updating input to stay
  matched to its companion extension, with the opaque "Interrupted" failure
  mode (#26).
- Configuration Conflicts to Avoid: don't hand-list a package a `programs.*`
  module already provides (#11); enable the shell or its hooks never inject
  (#24); runtime-mutable config must stay unmanaged (#44, #10, #38).
- System vs User: fonts are system-level (#20); dock-pinned apps must be
  casks under cleanup="zap" (#13); pinned nix-darwin drifts against a newer
  brew CLI, worsened by autoUpdate (#35).
- Module Organization: don't over-modularize a trivial package (#44);
  devShell ships the minimal build, home-manager owns the full config (#7);
  keep path-assuming out-of-store-symlink modules out of common.nix (#46).
- Adding a Tool: shell integration is a step separate from installing the
  binary (#23, #24).
- Testing: passing activation is not proof a tool works — verify end state
  in a clean VM (#37).
- CI Checks: prefer `just ci`/`just lint`; flagged the deadnix parity gap
  (`-- .` local vs `--fail .` in CI) and floating action refs (#14, #1).

Docs-only; no behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UGTA5cYd5qJuzCAhux7s2D
1. deadnix parity — `just lint-deadnix` ran `deadnix -- .` (report-only)
   while CI runs `deadnix --fail .`, so a green `just ci` could still
   fail CI on dead code. Pass `--fail` locally too, restoring `just ci`
   as a trustworthy pre-push gate.

2. taskbook placement — taskbook (a Node closure) sat in
   lib/core-packages.nix, which common.nix imports into ALL profiles
   including the headless dev/x86 devcontainer, and which the flake
   devShells also pull. That bloats the disk-constrained 2012 MBP image
   for no container benefit — the exact thing the lean-common.nix rule
   exists to prevent. Moved it to the desktop profiles (home.nix,
   work.nix) where it's actually used, and documented core-packages as
   a lean, universal-CLI-only list.

CLAUDE.md updated so the guidelines match the code: the deadnix-parity
note now reflects the realigned state, the "don't over-modularize" note
records that simplest-placement ≠ core-packages for heavy closures, and
the shared-package-list section gains the keep-it-lean caveat.

Docs + config only; the user runs the rebuild.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UGTA5cYd5qJuzCAhux7s2D
claude and others added 2 commits July 28, 2026 22:00
…eering-plugin-tchbun

# Conflicts:
#	CLAUDE.md
Brings the branch up to date with main (22 commits) and resolves the
three conflicts, all of which were additive — both sides appended to the
same lists, so nothing had to be dropped.

CLAUDE.md:
- Configuration Conflicts: kept main's base-image collisions entry at #4
  (main's own changelog line calls it "a fourth configuration conflict",
  so renumbering it would have made that line wrong) and shifted this
  branch's three compounded lessons to #5-#7.
- CI Checks: kept both the `just lint`/CI parity note from this branch
  and main's Entity diff subsection — they document different jobs.
- Changelog: kept all three entries, newest first.

lib/core-packages.nix: took main's `gnused` and `supabase-cli`, but held
this branch's removal of `taskbook`. That removal is the point of the
branch — taskbook's Node closure has no business in the headless
devcontainer — and it now lives in home.nix/work.nix instead. A naive
"take both sides" would have silently reverted the fix.

Verified before pushing: statix clean, deadnix --fail clean,
nix flake check --all-systems passes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

⊕ Entity-level changes

CLAUDE.md

Status Type Name
Δ heading System vs User Configuration
Δ heading Module Organization
+ heading Shared package lists (lib/core-packages.nix)
Δ heading Configuration Conflicts to Avoid
+ heading Tools Nix Can't Fully Manage
Δ heading Adding a New Development Tool
Δ heading See justfile for all available commands
Δ heading Running linters locally before pushing
Δ heading Meta: Updating This Document

home-manager/profiles/home.nix

Status Type Name
Δ binding home

home-manager/profiles/work.nix

Status Type Name
Δ binding home

justfile

Status Type Name
Δ chunk lines 21-40

lib/core-packages.nix

Status Type Name
Δ orphan module-level

Summary: 2 added, 11 modified across 5 files (1 modified orphan)

functions and classes, not lines · sem

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