@sebastienrousseau/dotfiles 0.2.500 → 0.2.501

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/README.md +82 -44
  3. package/docs/.vitepress/reports/localization-readability-audit.md +4 -0
  4. package/docs/AI.md +8 -2
  5. package/docs/CNAME +1 -0
  6. package/docs/COPYRIGHT +1 -1
  7. package/docs/NAMING_CONVENTIONS.md +7 -0
  8. package/docs/README.md +4 -0
  9. package/docs/_config.yml +59 -0
  10. package/docs/adr/ADR-001-ci-cd-pipeline.md +17 -0
  11. package/docs/adr/ADR-002-shell-performance.md +9 -0
  12. package/docs/adr/ADR-003-security-first.md +18 -0
  13. package/docs/adr/ADR-004-cli-architecture.md +14 -0
  14. package/docs/adr/ADR-005-chezmoi-choice.md +10 -0
  15. package/docs/adr/ADR-006-shell-selection.md +9 -0
  16. package/docs/adr/ADR-007-multi-shell-parity.md +10 -1
  17. package/docs/adr/ADR-008-alias-system-architecture.md +10 -0
  18. package/docs/adr/ADR-009-wallpaper-driven-theming.md +131 -0
  19. package/docs/adr/ADR-010-starship-transient-prompt.md +144 -0
  20. package/docs/adr/ADR-011-nushell-tier3-keep.md +144 -0
  21. package/docs/adr/README.md +7 -0
  22. package/docs/architecture/ARCHITECTURE.md +4 -0
  23. package/docs/architecture/INTEROP.md +8 -0
  24. package/docs/architecture/REPO_LAYOUT.md +5 -1
  25. package/docs/architecture/WALKTHROUGH.md +4 -0
  26. package/docs/architecture/fleet-deployment.md +4 -0
  27. package/docs/archive/EUXIS_2026_REVIEW.md +11 -3
  28. package/docs/archive/LEGACY_ROADMAP.md +45 -27
  29. package/docs/archive/MILESTONE_v0.2.493.md +4 -0
  30. package/docs/archive/PLAN.md +46 -8
  31. package/docs/archive/REPO_AUDIT.md +8 -0
  32. package/docs/guides/INSTALL.md +4 -0
  33. package/docs/guides/NEOVIM_IDE_GUIDE.md +9 -0
  34. package/docs/guides/THEMING.md +8 -0
  35. package/docs/guides/TROUBLESHOOTING.md +28 -0
  36. package/docs/guides/WSL2_NIX_TROUBLESHOOTING.md +70 -1
  37. package/docs/index.md +6 -2
  38. package/docs/interop/A2A.md +7 -0
  39. package/docs/interop/POWERSHELL.md +102 -0
  40. package/docs/manual/00-introduction.md +5 -1
  41. package/docs/manual/01-concepts/01-architecture.md +4 -0
  42. package/docs/manual/01-concepts/02-trust-model.md +6 -2
  43. package/docs/manual/01-concepts/03-theme-engine.md +4 -0
  44. package/docs/manual/01-concepts/04-fleet.md +7 -1
  45. package/docs/manual/01-concepts/05-self-healing.md +8 -1
  46. package/docs/manual/02-tutorials/01-first-install.md +5 -0
  47. package/docs/manual/02-tutorials/02-add-wallpaper.md +5 -0
  48. package/docs/manual/02-tutorials/03-create-profile.md +6 -0
  49. package/docs/manual/02-tutorials/04-encrypt-secret.md +6 -0
  50. package/docs/manual/02-tutorials/05-deploy-fleet.md +5 -1
  51. package/docs/manual/03-reference/01-dot-cli.md +4 -0
  52. package/docs/manual/03-reference/02-config-files.md +8 -2
  53. package/docs/manual/03-reference/03-environment.md +4 -0
  54. package/docs/manual/03-reference/04-templates.md +7 -1
  55. package/docs/manual/03-reference/05-feature-flags.md +10 -0
  56. package/docs/manual/04-cookbook/01-recipes.md +4 -0
  57. package/docs/manual/04-cookbook/02-troubleshooting.md +32 -0
  58. package/docs/manual/04-cookbook/03-faq.md +8 -0
  59. package/docs/manual/05-appendices/A-platform-matrix.md +4 -0
  60. package/docs/manual/05-appendices/B-security-checklist.md +6 -0
  61. package/docs/manual/05-appendices/C-glossary.md +4 -0
  62. package/docs/manual/05-appendices/D-bibliography.md +5 -1
  63. package/docs/manual/05-appendices/E-license.md +4 -0
  64. package/docs/manual/_toc.yml +1 -1
  65. package/docs/manual/command-index.md +4 -0
  66. package/docs/manual/concept-index.md +4 -0
  67. package/docs/operations/ATTESTATION.md +5 -0
  68. package/docs/operations/CI_CADENCE.md +107 -0
  69. package/docs/operations/CI_COMPOSITES.md +156 -0
  70. package/docs/operations/COMPLETIONS.md +123 -0
  71. package/docs/operations/COVERAGE.md +148 -0
  72. package/docs/operations/DRIFT.md +107 -0
  73. package/docs/operations/MAINTENANCE.md +5 -1
  74. package/docs/operations/MIGRATION.md +14 -6
  75. package/docs/operations/OPERATIONS.md +24 -0
  76. package/docs/operations/PERFORMANCE.md +133 -0
  77. package/docs/operations/RELIABILITY.md +6 -0
  78. package/docs/operations/ROADMAP.md +36 -18
  79. package/docs/operations/TESTING.md +4 -0
  80. package/docs/operations/TRACEABILITY.md +4 -0
  81. package/docs/operations/TRUSTED_AGENT_WORKSTATION.md +4 -0
  82. package/docs/operations/VERSION_SYNC.md +54 -5
  83. package/docs/reference/ALIASES.md +7 -0
  84. package/docs/reference/ALIASES_CHEATSHEET.md +5 -1
  85. package/docs/reference/ALIASES_DEPRECATIONS.md +5 -1
  86. package/docs/reference/FEATURES.md +4 -0
  87. package/docs/reference/FONTS.md +4 -0
  88. package/docs/reference/PROFILES.md +4 -0
  89. package/docs/reference/SCREENSHOTS.md +4 -0
  90. package/docs/reference/SCRIPTS.md +4 -0
  91. package/docs/reference/SUPPORT_MATRIX.md +10 -4
  92. package/docs/reference/THEMES.md +4 -0
  93. package/docs/reference/TOOLS.md +4 -0
  94. package/docs/reference/UTILS.md +16 -12
  95. package/docs/security/AI_ACT_COMPLIANCE.md +4 -0
  96. package/docs/security/AUDIT_BYPASS.md +103 -0
  97. package/docs/security/AUTOMATION_SECRETS.md +4 -0
  98. package/docs/security/CI_EGRESS_ALLOWLIST.md +127 -0
  99. package/docs/security/COMPLIANCE.md +5 -0
  100. package/docs/security/DEPS_DEV_EXCEPTIONS.md +86 -0
  101. package/docs/security/ENCRYPTION.md +5 -0
  102. package/docs/security/FMEA.md +4 -0
  103. package/docs/security/HISTORY_FILTERING.md +132 -0
  104. package/docs/security/INCIDENT_RESPONSE.md +4 -0
  105. package/docs/security/INSTALL_VERIFICATION.md +122 -0
  106. package/docs/security/KEYS.md +4 -0
  107. package/docs/security/KEY_ROTATION.md +4 -0
  108. package/docs/security/MCP_POLICY.md +9 -0
  109. package/docs/security/POLICY_RELEASES.md +4 -0
  110. package/docs/security/README.md +4 -0
  111. package/docs/security/SCORECARD.md +80 -0
  112. package/docs/security/SECRETS.md +12 -0
  113. package/docs/security/SECURITY.md +4 -0
  114. package/docs/security/SECURITY_CHECKLIST.md +11 -0
  115. package/docs/security/SHELL_EXEMPTIONS.md +145 -0
  116. package/docs/security/SOUP_REGISTER.md +4 -0
  117. package/docs/security/THREAT_MODEL.md +10 -0
  118. package/docs/security/VERIFICATION_VALIDATION.md +5 -1
  119. package/docs/themes/README.md +4 -0
  120. package/docs/themes/VISUAL_INTEGRITY_REPORT.md +4 -0
  121. package/dot_config/ai/identity.md +3 -0
  122. package/dot_config/ai/patterns/architect.md +2 -0
  123. package/dot_config/ai/patterns/hardener.md +2 -0
  124. package/dot_config/ai/patterns/refactor.md +2 -0
  125. package/dot_config/alacritty/alacritty.toml.tmpl +3 -3
  126. package/dot_config/atuin/config.toml.tmpl +47 -0
  127. package/dot_config/dotfiles/agent-card.json +1 -1
  128. package/dot_config/dotfiles/boot/README.md +2 -0
  129. package/dot_config/dotfiles/grub/README.md +2 -0
  130. package/dot_config/dotfiles/lock/README.md +2 -0
  131. package/dot_config/fish/conf.d/init.fish.tmpl +21 -0
  132. package/dot_config/fish/functions/_cached_eval.fish +84 -11
  133. package/dot_config/fish/functions/_cached_eval_clear.fish +17 -0
  134. package/dot_config/foot/foot.ini.tmpl +3 -3
  135. package/dot_config/fuzzel/fuzzel.ini.tmpl +2 -2
  136. package/dot_config/ghostty/config.tmpl +3 -3
  137. package/dot_config/git/hooks/executable_commit-msg +146 -0
  138. package/dot_config/goose/config.yaml +2 -2
  139. package/dot_config/gtk-3.0/gtk.css.tmpl +2 -2
  140. package/dot_config/gtk-3.0/settings.ini.tmpl +2 -2
  141. package/dot_config/gtk-4.0/gtk.css.tmpl +2 -2
  142. package/dot_config/gtk-4.0/settings.ini.tmpl +2 -2
  143. package/dot_config/kitty/kitty.conf.tmpl +3 -3
  144. package/dot_config/mise/config.toml +1 -1
  145. package/dot_config/niri/config.kdl.tmpl +2 -2
  146. package/dot_config/nushell/cached_eval.nu +80 -0
  147. package/dot_config/nushell/env.nu.tmpl +21 -13
  148. package/dot_config/shell/00-core-paths.sh.tmpl +1 -0
  149. package/dot_config/shell/05-core-safety.sh +1 -0
  150. package/dot_config/shell/10-secrets.sh +1 -0
  151. package/dot_config/shell/40-fzf-defaults.sh.tmpl +1 -0
  152. package/dot_config/shell/40-ls-colors.sh +1 -0
  153. package/dot_config/shell/50-logic-functions-core.sh.tmpl +1 -0
  154. package/dot_config/shell/50-logic-functions.sh.tmpl +1 -0
  155. package/dot_config/shell/51-logic-functions-extra.sh.tmpl +1 -0
  156. package/dot_config/shell/90-ux-aliases.sh.tmpl +1 -0
  157. package/dot_config/shell/91-ux-aliases-lazy.sh.tmpl +1 -0
  158. package/dot_config/shell/README.md +25 -8
  159. package/dot_config/starship.toml.tmpl +2 -2
  160. package/dot_config/tmux/tmux.conf.tmpl +3 -3
  161. package/dot_config/user-dirs.dirs +1 -0
  162. package/dot_config/vscode/settings.json.tmpl +2 -2
  163. package/dot_config/waybar/config.jsonc.tmpl +2 -2
  164. package/dot_config/waybar/style.css.tmpl +2 -2
  165. package/dot_config/wezterm/wezterm.lua.tmpl +3 -3
  166. package/dot_config/zsh/dot_zshrc.tmpl +154 -17
  167. package/dot_config/zsh/rc.d/00-alias-shims.zsh +28 -6
  168. package/dot_config/zsh/rc.d/30-options.zsh.tmpl +26 -6
  169. package/dot_local/bin/executable_bm +2 -0
  170. package/dot_local/bin/executable_dot +9 -2
  171. package/dot_local/bin/executable_dot-load-benchmark +1 -1
  172. package/dot_local/bin/executable_notify +2 -0
  173. package/dot_local/bin/executable_open +2 -0
  174. package/dot_local/bin/executable_tour +4 -2
  175. package/dot_local/bin/executable_up +3 -1
  176. package/install.sh +12 -4
  177. package/package.json +1 -1
  178. package/scripts/ci/check-dangerous-chmod.sh +19 -0
  179. package/scripts/ci/check-deps-dev.sh +236 -0
  180. package/scripts/ci/check-insecure-tls.sh +61 -0
  181. package/scripts/ci/check-regression-traceability.sh +67 -0
  182. package/scripts/ci/check-shell-preamble.sh +106 -0
  183. package/scripts/ci/run-coverage.sh +362 -0
  184. package/scripts/ci/validate-chezmoidata.sh +25 -0
  185. package/scripts/diagnostics/doctor.sh +173 -5
  186. package/scripts/diagnostics/drift-dashboard.sh +177 -13
  187. package/scripts/diagnostics/health.sh +21 -4
  188. package/scripts/diagnostics/perf.sh +304 -77
  189. package/scripts/diagnostics/workstation-attestation.sh +6 -1
  190. package/scripts/dot/commands/agent.sh +14 -5
  191. package/scripts/dot/commands/ai.sh +75 -10
  192. package/scripts/dot/lib/bento.sh +2 -1
  193. package/scripts/dot/lib/log.sh +6 -0
  194. package/scripts/dot/lib/platform.sh +1 -0
  195. package/scripts/dot/lib/ui.sh +11 -0
  196. package/scripts/dot/lib/utils.sh +5 -0
  197. package/scripts/git-hooks/pre-commit-audit.sh +1 -1
  198. package/scripts/git-hooks/pre-push +66 -3
  199. package/scripts/ops/heal-chezmoi.sh +41 -6
  200. package/scripts/qa/powershell-contract.ps1 +95 -0
  201. package/scripts/theme/merge-wallpaper.sh +4 -0
  202. package/scripts/theme/switch.sh +20 -10
  203. package/dot_config/atuin/config.toml +0 -40
  204. package/dot_local/bin/__pycache__/executable_dot-load-benchmark-ptycpython-312.pyc +0 -0
@@ -1,3 +1,8 @@
1
+ ---
2
+ render_with_liquid: false
3
+ ---
4
+ {% raw %}
5
+
1
6
  # ADR-001: Multi-stage CI/CD Pipeline Design
2
7
 
3
8
  **Status**: Accepted
@@ -7,6 +12,7 @@
7
12
  ## Context
8
13
 
9
14
  The dotfiles repository requires a CI/CD pipeline that:
15
+
10
16
  - Validates changes across multiple platforms (Linux, macOS)
11
17
  - Runs security scans to detect secrets and vulnerabilities
12
18
  - Tests shell scripts, Lua configurations, and Nix expressions
@@ -14,6 +20,7 @@ The dotfiles repository requires a CI/CD pipeline that:
14
20
  - Minimizes GitHub Actions costs (runner minutes)
15
21
 
16
22
  Traditional approaches run all checks on every commit, leading to:
23
+
17
24
  - Wasted compute on unrelated changes (e.g., running Lua linting when only docs change)
18
25
  - High costs from macOS runners ($0.08/min vs $0.008/min for Linux)
19
26
  - Long feedback times from sequential job execution
@@ -23,27 +30,33 @@ Traditional approaches run all checks on every commit, leading to:
23
30
  Implement a **5-stage progressive CI pipeline** with path-based filtering:
24
31
 
25
32
  ### Stage 1: Change Detection
33
+
26
34
  Use `dorny/paths-filter` to detect which file categories changed:
35
+
27
36
  - `shell`: *.sh, scripts/**, install/**
28
37
  - `lua`: dot_config/nvim/**, *.lua
29
38
  - `nix`: nix/**, *.nix
30
39
  - `config`: dot_*/**, .chezmoitemplates/**
31
40
 
32
41
  ### Stage 2: Lint (Parallel, Conditional)
42
+
33
43
  - **lint-shell**: Only runs if shell files changed
34
44
  - **lint-lua**: Only runs if Lua files changed
35
45
  - Run in parallel to minimize wall-clock time
36
46
 
37
47
  ### Stage 3: Security (Always on PRs)
48
+
38
49
  - **secrets-scan**: Gitleaks on every PR (critical)
39
50
  - **link-check**: Only on schedule (expensive)
40
51
 
41
52
  ### Stage 4: Test (Conditional Matrix)
53
+
42
54
  - Linux-only for PRs (cheapest)
43
55
  - Full matrix (Linux + macOS) on schedule/manual trigger
44
56
  - Docker container tests for installation validation
45
57
 
46
58
  ### Stage 5: Quality (Schedule/Manual Only)
59
+
47
60
  - Idempotency verification
48
61
  - Performance benchmarks
49
62
  - Nix flake checks
@@ -58,17 +71,20 @@ Use `dorny/paths-filter` to detect which file categories changed:
58
71
  ## Consequences
59
72
 
60
73
  ### Positive
74
+
61
75
  - ~50% reduction in GitHub Actions minutes
62
76
  - Fast feedback for most changes (1-3 minutes)
63
77
  - Comprehensive testing still available via schedule/manual
64
78
  - Clear separation of concerns between stages
65
79
 
66
80
  ### Negative
81
+
67
82
  - Complexity in workflow configuration
68
83
  - Some bugs might only surface in scheduled runs
69
84
  - Path filter maintenance required as repo structure evolves
70
85
 
71
86
  ### Neutral
87
+
72
88
  - Developers can trigger full CI manually with `workflow_dispatch`
73
89
  - Breaking changes to CI require testing across all stages
74
90
 
@@ -99,3 +115,4 @@ jobs:
99
115
 
100
116
  - [GitHub Actions Path Filtering](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)
101
117
  - [dorny/paths-filter](https://github.com/dorny/paths-filter)
118
+ {% endraw %}
@@ -1,3 +1,7 @@
1
+ ---
2
+ render_with_liquid: false
3
+ ---
4
+
1
5
  # ADR-002: Shell Performance Optimization Strategy
2
6
 
3
7
  **Status**: Accepted
@@ -12,6 +16,7 @@ configurations (completions, prompts, plugins), startup can easily exceed 1-2
12
16
  seconds.
13
17
 
14
18
  Goals:
19
+
15
20
  - Target startup time: <500ms for interactive shells
16
21
  - Maintain full functionality (completions, syntax highlighting, git info)
17
22
  - Support both zsh and bash
@@ -84,6 +89,7 @@ zinit light zsh-users/zsh-autosuggestions
84
89
  ### Monitoring
85
90
 
86
91
  Benchmark script to track startup time:
92
+
87
93
  ```bash
88
94
  hyperfine --warmup 3 --runs 10 "zsh -i -c exit"
89
95
  ```
@@ -93,17 +99,20 @@ CI enforces 500ms threshold with warnings.
93
99
  ## Consequences
94
100
 
95
101
  ### Positive
102
+
96
103
  - Consistent <500ms startup across platforms
97
104
  - Full functionality preserved
98
105
  - Easy to add new tools without performance regression
99
106
  - Clear patterns for contributors to follow
100
107
 
101
108
  ### Negative
109
+
102
110
  - First invocation of lazy-loaded commands is slower
103
111
  - Cache invalidation bugs can cause stale behavior
104
112
  - Complexity in understanding load order
105
113
 
106
114
  ### Neutral
115
+
107
116
  - Profiling required when adding new plugins
108
117
  - Trade-off between convenience and performance explicit
109
118
 
@@ -1,3 +1,7 @@
1
+ ---
2
+ render_with_liquid: false
3
+ ---
4
+
1
5
  # ADR-003: Security-First Approach
2
6
 
3
7
  **Status**: Accepted
@@ -7,6 +11,7 @@
7
11
  ## Context
8
12
 
9
13
  Dotfiles repositories present unique security challenges:
14
+
10
15
  - They configure system behavior and permissions
11
16
  - They may contain or reference secrets (API keys, tokens)
12
17
  - They execute scripts with user privileges
@@ -21,6 +26,7 @@ Implement a **defense-in-depth security model** with multiple layers:
21
26
  ### Layer 1: Secrets Protection
22
27
 
23
28
  **Never commit secrets:**
29
+
24
30
  ```bash
25
31
  # .gitleaks.toml - block common secret patterns
26
32
  [[rules]]
@@ -29,6 +35,7 @@ regex = '''(?i)(api[_-]?key|apikey)\s*[:=]\s*['"]?([a-zA-Z0-9]{20,})'''
29
35
  ```
30
36
 
31
37
  **Encrypted secrets with age:**
38
+
32
39
  ```bash
33
40
  # Secrets stored encrypted, decrypted at apply time
34
41
  chezmoi.encryption = "age"
@@ -36,6 +43,7 @@ chezmoi.age.identity = "~/.config/chezmoi/key.txt"
36
43
  ```
37
44
 
38
45
  **CI enforcement:**
46
+
39
47
  - Gitleaks runs on every PR
40
48
  - TruffleHog for verified secrets detection
41
49
  - Block merge if secrets detected
@@ -43,6 +51,7 @@ chezmoi.age.identity = "~/.config/chezmoi/key.txt"
43
51
  ### Layer 2: Input Validation
44
52
 
45
53
  **Path traversal prevention:**
54
+
46
55
  ```bash
47
56
  # Validate all user inputs
48
57
  if [[ ! "$template_lang" =~ ^[a-zA-Z0-9_-]+$ ]]; then
@@ -51,6 +60,7 @@ fi
51
60
  ```
52
61
 
53
62
  **Safe file operations:**
63
+
54
64
  ```bash
55
65
  # Use absolute paths, validate before operations
56
66
  local real_path
@@ -63,6 +73,7 @@ fi
63
73
  ### Layer 3: Opt-in System Modifications
64
74
 
65
75
  **Dangerous operations require explicit consent:**
76
+
66
77
  ```bash
67
78
  # Security scripts are opt-in
68
79
  if [ "${DOTFILES_SECURITY:-0}" != "1" ]; then
@@ -72,6 +83,7 @@ fi
72
83
  ```
73
84
 
74
85
  **Comprehensive logging:**
86
+
75
87
  ```bash
76
88
  # All system modifications logged
77
89
  log_security_change() {
@@ -82,6 +94,7 @@ log_security_change() {
82
94
  ### Layer 4: CI Security Scanning
83
95
 
84
96
  **Multi-tool approach:**
97
+
85
98
  - **Gitleaks**: Secrets in git history
86
99
  - **Shellcheck**: Shell script vulnerabilities
87
100
  - **Checkov**: Infrastructure misconfigurations
@@ -89,6 +102,7 @@ log_security_change() {
89
102
  - **CodeQL**: Static analysis for Python/JavaScript
90
103
 
91
104
  **Weekly deep scans:**
105
+
92
106
  ```yaml
93
107
  schedule:
94
108
  - cron: '0 2 * * 0' # Weekly security audit
@@ -97,6 +111,7 @@ schedule:
97
111
  ### Layer 5: Minimal Privileges
98
112
 
99
113
  **Scripts request only needed permissions:**
114
+
100
115
  ```bash
101
116
  # Don't run as root unless necessary
102
117
  if [ "$(id -u)" = "0" ]; then
@@ -110,17 +125,20 @@ sudo sysctl -w net.ipv4.tcp_keepalive_time=60
110
125
  ## Consequences
111
126
 
112
127
  ### Positive
128
+
113
129
  - Secrets never enter git history
114
130
  - System modifications are auditable
115
131
  - Multiple layers catch different vulnerability types
116
132
  - Contributors have clear security patterns to follow
117
133
 
118
134
  ### Negative
135
+
119
136
  - Additional complexity in scripts
120
137
  - Encrypted secrets require key management
121
138
  - Some features disabled by default (friction)
122
139
 
123
140
  ### Neutral
141
+
124
142
  - Security vs convenience trade-offs explicit
125
143
  - Regular security audits via scheduled CI
126
144
 
@@ -1,3 +1,7 @@
1
+ ---
2
+ render_with_liquid: false
3
+ ---
4
+
1
5
  # ADR-004: Chezmoi + Custom CLI Wrapper Architecture
2
6
 
3
7
  **Status**: Accepted
@@ -7,12 +11,14 @@
7
11
  ## Context
8
12
 
9
13
  Managing dotfiles requires:
14
+
10
15
  - Tracking file changes and applying them consistently
11
16
  - Handling platform-specific configurations
12
17
  - Supporting encrypted secrets
13
18
  - Providing a good developer experience
14
19
 
15
20
  Options considered:
21
+
16
22
  1. **Bare git repository**: Simple but poor UX, no templating
17
23
  2. **GNU Stow**: Symlink-based, limited features
18
24
  3. **Chezmoi only**: Powerful but complex CLI
@@ -45,18 +51,21 @@ Use **Chezmoi as the core engine** with a **custom `dot` CLI wrapper** that:
45
51
  ### Core Principles
46
52
 
47
53
  **1. Chezmoi handles complexity:**
54
+
48
55
  - Template rendering with Go text/template
49
56
  - Encrypted secrets with age
50
57
  - State tracking (what's applied vs source)
51
58
  - Cross-platform path handling
52
59
 
53
60
  **2. dot CLI handles UX:**
61
+
54
62
  - Memorable command names (`dot sync` vs `chezmoi apply`)
55
63
  - Domain-specific commands (`dot doctor`, `dot theme`)
56
64
  - Integration with external tools (Nix, Docker, Neovim)
57
65
  - Consistent help and error messages
58
66
 
59
67
  **3. Modular command structure:**
68
+
60
69
  ```text
61
70
  scripts/dot/
62
71
  ├── lib/
@@ -72,6 +81,7 @@ scripts/dot/
72
81
  ```
73
82
 
74
83
  **4. Delegation pattern:**
84
+
75
85
  ```bash
76
86
  # Main dispatcher in dot CLI
77
87
  dispatch() {
@@ -94,6 +104,7 @@ dispatch() {
94
104
  ### Extension Points
95
105
 
96
106
  Custom commands can:
107
+
97
108
  1. Wrap chezmoi commands with better defaults
98
109
  2. Add entirely new functionality (benchmarks, themes)
99
110
  3. Integrate with system tools (nix, docker, brew)
@@ -102,6 +113,7 @@ Custom commands can:
102
113
  ## Consequences
103
114
 
104
115
  ### Positive
116
+
105
117
  - Leverage Chezmoi's battle-tested engine
106
118
  - User-friendly interface for common tasks
107
119
  - Easy to add domain-specific commands
@@ -109,11 +121,13 @@ Custom commands can:
109
121
  - Single entry point (`dot`) for all operations
110
122
 
111
123
  ### Negative
124
+
112
125
  - Two layers to understand (chezmoi + dot)
113
126
  - Version coupling between chezmoi and scripts
114
127
  - Some chezmoi features not exposed via dot
115
128
 
116
129
  ### Neutral
130
+
117
131
  - Advanced users can still use chezmoi directly
118
132
  - Documentation needed for both layers
119
133
  - Upgrade path when chezmoi adds new features
@@ -1,3 +1,8 @@
1
+ ---
2
+ render_with_liquid: false
3
+ ---
4
+ {% raw %}
5
+
1
6
  # ADR-005: Chezmoi as Dotfiles Manager
2
7
 
3
8
  **Status**: Accepted
@@ -7,6 +12,7 @@
7
12
  ## Context
8
13
 
9
14
  Managing dotfiles across multiple machines requires:
15
+
10
16
  - Version control for configuration files
11
17
  - Template support for machine-specific values
12
18
  - Cross-platform compatibility (macOS, Linux, WSL)
@@ -65,6 +71,7 @@ chezmoi apply
65
71
  ## Consequences
66
72
 
67
73
  ### Positive
74
+
68
75
  - Consistent configuration across all machines
69
76
  - Secure secrets management with age encryption
70
77
  - Easy to add new machines to the fleet
@@ -72,12 +79,14 @@ chezmoi apply
72
79
  - Built-in diff and dry-run for safe updates
73
80
 
74
81
  ### Negative
82
+
75
83
  - Learning curve for Go templates
76
84
  - Additional abstraction layer over raw Git
77
85
  - Requires chezmoi binary installation
78
86
  - Some features (scripts) require careful ordering
79
87
 
80
88
  ### Neutral
89
+
81
90
  - Configuration stored in `~/.local/share/chezmoi` by default
82
91
  - Custom wrapper CLI (`dot`) provides simpler interface
83
92
  - Regular `git` commands still work in source directory
@@ -87,3 +96,4 @@ chezmoi apply
87
96
  - [Chezmoi Documentation](https://www.chezmoi.io/)
88
97
  - [Chezmoi Quick Start](https://www.chezmoi.io/quick-start/)
89
98
  - [Comparison with Other Tools](https://www.chezmoi.io/comparison-table/)
99
+ {% endraw %}
@@ -1,3 +1,7 @@
1
+ ---
2
+ render_with_liquid: false
3
+ ---
4
+
1
5
  # ADR-006: Zsh as Default Shell
2
6
 
3
7
  **Status**: Accepted
@@ -7,6 +11,7 @@
7
11
  ## Context
8
12
 
9
13
  Choosing a default shell impacts:
14
+
10
15
  - Developer productivity and workflow
11
16
  - Plugin ecosystem and extensibility
12
17
  - Cross-platform compatibility
@@ -45,6 +50,7 @@ Use **Zsh** as the default interactive shell with **Zinit** as the plugin manage
45
50
  | Antibody | ~300ms | Simple, fast |
46
51
 
47
52
  Zinit provides:
53
+
48
54
  - **Turbo Mode**: Deferred loading after prompt
49
55
  - **Ice Modifiers**: Fine-grained control over plugin loading
50
56
  - **Binary Installation**: Install completions and binaries
@@ -84,6 +90,7 @@ zinit light zdharma-continuum/fast-syntax-highlighting
84
90
  ## Consequences
85
91
 
86
92
  ### Positive
93
+
87
94
  - Fast, responsive shell experience
88
95
  - Rich plugin ecosystem (autosuggestions, syntax highlighting)
89
96
  - Powerful completion system
@@ -91,12 +98,14 @@ zinit light zdharma-continuum/fast-syntax-highlighting
91
98
  - Modern prompt with Starship
92
99
 
93
100
  ### Negative
101
+
94
102
  - Requires zsh installation on some Linux distros
95
103
  - Plugin manager adds complexity
96
104
  - Some bash-isms need adjustment
97
105
  - Turbo mode can cause brief visual delay
98
106
 
99
107
  ### Neutral
108
+
100
109
  - Users can still use bash for scripts
101
110
  - Configuration more complex than vanilla shell
102
111
  - Performance monitoring needed
@@ -1,3 +1,7 @@
1
+ ---
2
+ render_with_liquid: false
3
+ ---
4
+
1
5
  # ADR-007: Multi-Shell Parity Strategy
2
6
 
3
7
  ## Status
@@ -12,9 +16,10 @@ Accepted
12
16
 
13
17
  The dotfiles distribution supports three shells: Zsh (default since macOS Catalina), Fish (modern interactive shell), and Nushell (structured data shell). The codebase has 98 alias files and 52+ functions written in POSIX/Bash. Without a parity strategy, each shell gets a fragmented subset of functionality.
14
18
 
15
- **Problem:** Fish had zero access to the alias/function library until v0.2.500 added bridge templates. Nushell had only 6 hardcoded aliases and no function access.
19
+ **Problem:** Fish had zero access to the alias/function library until v0.2.501 added bridge templates. Nushell had only 6 hardcoded aliases and no function access.
16
20
 
17
21
  **Constraints:**
22
+
18
23
  - Nushell's `source` is parse-time evaluated (no dynamic sourcing)
19
24
  - Fish syntax differs significantly from POSIX (no `$()`, different `if`, no `[[`)
20
25
  - Maintaining N copies of every alias/function is unsustainable
@@ -31,6 +36,7 @@ Adopt a **hub-and-spoke bridge architecture**:
31
36
  - Functions: Chezmoi template-generated `def` wrappers delegating to bash (in `functions.nu.tmpl`)
32
37
 
33
38
  **Parity tiers:**
39
+
34
40
  - **Tier 1 (Full):** Zsh, Bash — all aliases, functions, lazy loading, cached eval
35
41
  - **Tier 2 (Bridged):** Fish — all simple aliases, all functions via wrappers, `_cached_eval` caching
36
42
  - **Tier 3 (Compatible):** Nushell — simple aliases (no complex bash syntax), all functions via bash delegation
@@ -38,16 +44,19 @@ Adopt a **hub-and-spoke bridge architecture**:
38
44
  ## Consequences
39
45
 
40
46
  ### Positive
47
+
41
48
  - Single source of truth for aliases and functions
42
49
  - Adding a new alias/function automatically propagates to all shells
43
50
  - Nushell users get access to 40+ functions that were previously unavailable
44
51
  - Fish users get mtime-aware caching via `_cached_eval`
45
52
 
46
53
  ### Negative
54
+
47
55
  - Complex bash aliases (pipes, conditionals) are skipped for Nushell
48
56
  - Function calls in Fish/Nushell incur bash subprocess overhead (~5ms per call)
49
57
  - Cache invalidation requires shell restart or manual cache clear
50
58
 
51
59
  ### Risks
60
+
52
61
  - Nushell's rapid development may break bridge syntax in future versions
53
62
  - Very large alias sets may slow Nushell startup during cache generation
@@ -1,3 +1,7 @@
1
+ ---
2
+ render_with_liquid: false
3
+ ---
4
+
1
5
  # ADR-008: Alias System Architecture
2
6
 
3
7
  ## Status
@@ -13,6 +17,7 @@ Accepted
13
17
  The dotfiles manage 98 alias files across 30+ categories (git, docker, kubernetes, python, security, etc.). These need to load fast, support per-machine toggling, and work across Zsh, Bash, Fish, and Nushell.
14
18
 
15
19
  **Design questions:**
20
+
16
21
  1. How to organize alias files for maintainability?
17
22
  2. How to control which aliases load on which machines?
18
23
  3. How to balance startup speed with alias availability?
@@ -47,6 +52,7 @@ Three profiles control alias scope (set in `.chezmoidata.toml`):
47
52
  ### Bucket Toggles
48
53
 
49
54
  Per-category flags in `.chezmoidata.toml` under `[aliases.buckets]`:
55
+
50
56
  ```toml
51
57
  [aliases.buckets]
52
58
  system = true
@@ -62,6 +68,7 @@ svn = false # disable on machines without SVN
62
68
  ### Function Groups (groups.json)
63
69
 
64
70
  Functions use a parallel system with `groups.json` as a registry:
71
+
65
72
  - Groups: api, curl, text, system, files, interactive, nav, security, misc
66
73
  - Lazy-loaded per group on first invocation
67
74
  - Stub functions replaced with real implementations on first call
@@ -69,17 +76,20 @@ Functions use a parallel system with `groups.json` as a registry:
69
76
  ## Consequences
70
77
 
71
78
  ### Positive
79
+
72
80
  - Adding aliases is self-service: create a file in the right category
73
81
  - Per-machine customization without forking
74
82
  - Lazy loading keeps startup under 200ms even with 98 alias files
75
83
  - `groups.json` enables automated bridge generation for Fish/Nushell
76
84
 
77
85
  ### Negative
86
+
78
87
  - Alias definitions wrap in functions (`set_default_aliases()`) for sourcing safety, adding complexity
79
88
  - Two-phase loading means some aliases aren't available until after first prompt
80
89
  - Profile/bucket system requires understanding .chezmoidata.toml
81
90
 
82
91
  ### Trade-offs
92
+
83
93
  - Chose file-per-category over monolithic alias file for maintainability
84
94
  - Chose runtime extraction for Fish/Nushell over maintaining parallel definitions
85
95
  - Chose lazy loading over compile-time bundling for flexibility
@@ -0,0 +1,131 @@
1
+ ---
2
+ render_with_liquid: false
3
+ ---
4
+
5
+ # ADR-009: Wallpaper-Driven Theming Engine
6
+
7
+ ## Status
8
+
9
+ Accepted
10
+
11
+ ## Date
12
+
13
+ 2026-05-12
14
+
15
+ ## Context
16
+
17
+ Most dotfiles distributions ship a small fixed palette (Solarized, Gruvbox,
18
+ Tokyo Night) chosen once and recycled across every terminal, editor, and
19
+ status bar. When the user changes wallpapers — a daily occurrence on macOS
20
+ with HEIC dark/light variants and on Linux with `swww`/`hyprpaper` —
21
+ terminal chrome stays static, creating visual incoherence between the
22
+ chosen wallpaper and the surrounding tooling.
23
+
24
+ Manual palette switching solves coherence but adds friction: it requires
25
+ the user to (a) generate a palette, (b) regenerate config for every tool
26
+ (`alacritty.toml`, `kitty.conf`, `wezterm.lua`, neovim themes, …), and
27
+ (c) reload each tool. Tools like pywal/wal automate (a) and (b), but
28
+ pywal palettes routinely fail WCAG contrast thresholds (especially for
29
+ bright wallpapers) and lack support for many of the format files this
30
+ project ships.
31
+
32
+ **Problem:** Reuse the user's chosen wallpaper as the single source of
33
+ truth for terminal + status-bar colors, with accessibility guaranteed and
34
+ no manual regeneration step.
35
+
36
+ **Constraints:**
37
+
38
+ - Output must satisfy **WCAG 2.2 AAA contrast** (≥ 7:1 for normal text,
39
+ ≥ 4.5:1 for large text) — non-negotiable, the dotfiles ship as
40
+ workstation infrastructure.
41
+ - Palette extraction must work offline on both macOS (HEIC, dynamic
42
+ wallpapers with embedded dark/light variants) and Linux (PNG/JPEG via
43
+ `swww`, `hyprpaper`, `feh`, GNOME).
44
+ - Total time from "user changes wallpaper" → "all terminals retinted"
45
+ must be ≤ 3 seconds (rebuild trigger + write of templated configs).
46
+ - Targets include Warp, iTerm2, Alacritty, Ghostty, Kitty, Wezterm,
47
+ Tmux, Neovim (multiple themes), VS Code, Firefox theme JSON, Niri
48
+ borders, Waybar, GTK/Qt (matugen pipeline).
49
+
50
+ ## Decision
51
+
52
+ Build a self-contained theming engine — `dot theme rebuild` —
53
+ implemented in `scripts/theme/` with the following pipeline:
54
+
55
+ 1. **Source detection** — locate the active wallpaper across macOS
56
+ (`defaults read … wallpaper`), GNOME/dconf, KDE, Niri, swww,
57
+ hyprpaper. HEIC dynamic wallpapers decompose into dark and light
58
+ variants; both feed the engine.
59
+
60
+ 2. **Color extraction** — **K-Means clustering in CIELAB** (not RGB).
61
+ CIELAB is perceptually uniform, so distances correlate with the way
62
+ humans see color similarity. 8-cluster K-Means yields a 16-color
63
+ ANSI palette (8 normal + 8 bright) plus 4 accent slots.
64
+
65
+ 3. **Contrast enforcement** — compute WCAG 2.2 contrast against the
66
+ chosen background; nudge each foreground hue along the lightness
67
+ axis until the ratio passes AAA. The nudge stays within the cluster
68
+ to preserve aesthetic intent. If AAA cannot be reached, fall back to
69
+ AA with a logged warning (never silently regress).
70
+
71
+ 4. **Format generation** — emit one canonical TOML palette to
72
+ `.chezmoidata/themes.toml`, then run `chezmoi apply` so every
73
+ theme-aware template (terminals, editors, status bars, browsers)
74
+ regenerates from a single declarative source.
75
+
76
+ 5. **Companion pipelines** — `dot-theme-sync` feeds the same accent
77
+ colors to **matugen** for Material You-style GTK/Qt theming on
78
+ Linux, keeping desktop chrome in lockstep with the terminal.
79
+
80
+ The whole flow is idempotent (`chezmoi apply` is no-op if nothing
81
+ changed), repeatable, and tested under `tests/unit/theme/`.
82
+
83
+ ## Consequences
84
+
85
+ ### Positive
86
+
87
+ - Single source of truth: change the wallpaper, every tool retints in
88
+ one keystroke.
89
+ - Accessibility is structural, not opt-in — every shipped palette
90
+ passes WCAG AAA before it touches a config file.
91
+ - No competing "premium" dotfiles distribution (mathiasbynens, holman,
92
+ paulirish, omakub) ships anything similar. The engine is a defining
93
+ differentiator and surfaced in the README hero.
94
+ - Reuses chezmoi's templating — no new templating layer to maintain.
95
+
96
+ ### Negative
97
+
98
+ - K-Means on a 4K wallpaper takes ~500–800 ms; cached after first run,
99
+ but the cold path is non-trivial.
100
+ - HEIC handling on Linux requires `libheif` (extra dep on Debian/Ubuntu
101
+ before 24.04).
102
+ - Contrast enforcement can produce slightly different palettes from the
103
+ same wallpaper across major OS versions when system color profiles
104
+ differ (mitigated by snapshot tests).
105
+
106
+ ### Risks
107
+
108
+ - Wallpapers with extreme dynamic range (pure-white backgrounds, deep
109
+ monochrome) may fail to produce an aesthetically pleasing 16-color
110
+ palette even when WCAG AAA is satisfied. Mitigation: maintainer
111
+ curation of a fallback theme set in `.chezmoidata/themes.toml`.
112
+ - Future Wayland compositors may not expose a stable wallpaper-detection
113
+ API. The engine isolates source detection in a single module so the
114
+ blast radius of compositor churn is one file.
115
+
116
+ ## Alternatives Considered
117
+
118
+ | Alternative | Why rejected |
119
+ |---|---|
120
+ | pywal/wal | RGB K-Means, no WCAG enforcement, limited target list. |
121
+ | matugen alone | Excellent for GTK/Qt; not terminal-aware. We use it *in addition*, not instead. |
122
+ | Static curated themes (Tokyo Night et al.) | Loses the "wallpaper coherence" property that motivates the whole project. |
123
+ | Hand-roll per-terminal scripts | Doesn't compose with chezmoi; loses the single-source-of-truth invariant. |
124
+
125
+ ## References
126
+
127
+ - WCAG 2.2 contrast: <https://www.w3.org/TR/WCAG22/#contrast-minimum>
128
+ - CIELAB color space: <https://en.wikipedia.org/wiki/CIELAB_color_space>
129
+ - `scripts/theme/` — engine source
130
+ - `.chezmoidata/themes.toml` — output palette schema
131
+ - Issue #873 — captures this ADR alongside `llms.txt`