From 0f9b879afbe216fba90532399358e43771cde9a9 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Wed, 27 May 2026 18:28:18 +0200 Subject: [PATCH] =?UTF-8?q?chore(claude):=20add=20onboard=20config=20?= =?UTF-8?q?=E2=80=94=20memory,=20tasks,=20audit,=20gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Onboard scaffolding for the dotfiles repo: 5 memory registries, TODO backlog, onboard audit report, and .gitignore (ignores Oldconfig, vim swap, .claude/settings.local.json). Co-Authored-By: Claude Opus 4.7 (1M context) --- .claude/audits/ONBOARD_REPORT.md | 50 ++++++++++++++++++++++++++++++++ .claude/memory/blockers.md | 9 ++++++ .claude/memory/decisions.md | 25 ++++++++++++++++ .claude/memory/evals.md | 9 ++++++ .claude/memory/journal.md | 12 ++++++++ .claude/memory/learnings.md | 13 +++++++++ .claude/tasks/TODO.md | 27 +++++++++++++++++ .gitignore | 17 +++++++++++ 8 files changed, 162 insertions(+) create mode 100644 .claude/audits/ONBOARD_REPORT.md create mode 100644 .claude/memory/blockers.md create mode 100644 .claude/memory/decisions.md create mode 100644 .claude/memory/evals.md create mode 100644 .claude/memory/journal.md create mode 100644 .claude/memory/learnings.md create mode 100644 .claude/tasks/TODO.md create mode 100644 .gitignore diff --git a/.claude/audits/ONBOARD_REPORT.md b/.claude/audits/ONBOARD_REPORT.md new file mode 100644 index 0000000..c183416 --- /dev/null +++ b/.claude/audits/ONBOARD_REPORT.md @@ -0,0 +1,50 @@ +# Onboard Report — config + +Date: 2026-05-27 · Mode: right-sized (inline, no subagent fan-out — 8 files justify it) + +## Profile + +- Archetype: **dotfiles-meta** (meta/config) — confidence HAUTE +- Stack: bash + vimscript +- Public: no (personal/private) +- Database: none +- Size: 8 tracked files, ~405 lines +- audit_stack run: analyze, code-clean, cso, doc (SEO/GEO/design/perf/a11y N/A) + +## Scores + +| Domain | Score | Note | +| ---------- | ----- | --------------------------------------------------------- | +| analyze | 70 | tiny + clear; installer logic was broken (now fixed) | +| code-clean | 75 | shellcheck-clean installer; bashrc style nits remain | +| cso (sec) | 90 | no secrets; only generic `curl`-less local-exec risk | +| doc | 95 | was 0 (no README); now README + CLAUDE.md created | + +## What's good (protect this) + +- vim config is coherent: pathogen + molokai + syntastic (C `-Wall -Werror -Wextra`) + NERDTree + 42 canonical-class helpers. Self-contained, plugins committed. +- bashrc-linux has a thoughtful git-aware prompt + command timer. +- No secrets, no `curl|sh` in any doc, no hardcoded tokens. +- Per-target bashrc split (server/linux/osx) is a clean separation. + +## What was wrong + +### Fixed this session (install.sh) +- **[Critique]** server + osx branches `cp /tmp/config/bash/bashrc-*` — `/tmp/config` never populated → both targets silently installed no bashrc. Now SCRIPT_DIR-relative. +- **[Haute]** `[ "$1" == "server" ]` bashism under `#!/bin/sh` → fails on dash. Now `#!/usr/bin/env bash`. +- **[Haute]** `cp /tmp/nerdtree ~/.vim/bundle/` missing `-r` (nerdtree is a dir) → copy fails. Now clones directly into bundle. +- **[Moyenne]** `apt-get` ran unconditionally including for `osx` → fails on macOS. Now guarded by `command -v apt-get`. +- **[Moyenne]** redundant molokai clone (already committed in `vim/colors/`). Dropped. +- **[Basse]** unquoted `$HOME`/`$1`, no `set -eu`, no-op `source ~/.bashrc` at end, `/tmp/nerdtree`+`/tmp/config` never cleaned. All resolved. shellcheck now CLEAN. + +### Still open (not in this session's scope) +- **[Moyenne]** `vim/vimrc` `GenerateClassC` uses bare `name` instead of `a:name` → `:ClassC` errors with E121. See BLK-001. +- **[Basse]** `bash/bashrc-*` use legacy backticks (SC2006) + `$((...$var...))` (SC2004). Cosmetic; deferred. + +## Missing files — created this session +README.md · CLAUDE.md · .gitignore · .claude/memory/* · .claude/tasks/TODO.md · .claude/settings.json + +Not created (personal repo, optional): LICENSE, CHANGELOG.md, CONTRIBUTING.md. + +## Next steps +See `.claude/tasks/TODO.md` for the prioritized backlog. diff --git a/.claude/memory/blockers.md b/.claude/memory/blockers.md new file mode 100644 index 0000000..29c4ecd --- /dev/null +++ b/.claude/memory/blockers.md @@ -0,0 +1,9 @@ +# Blockers + +Friction + root cause + status. Caveman + English. + +## BLK-001 — vimrc GenerateClassC bare `name` var — OPEN +2026-05-27. `vim/vimrc` func `GenerateClassC` uses `name` instead of `a:name` → vimscript E121 +undefined variable on `:ClassC Foo`. `GenerateClassH` correct (uses `a:name`). Not fixed — +vim domain, out of onboard scope (user said fix install.sh only). Fix: prefix all with `a:`. +Status: open, logged in TODO P2. diff --git a/.claude/memory/decisions.md b/.claude/memory/decisions.md new file mode 100644 index 0000000..a1bb1df --- /dev/null +++ b/.claude/memory/decisions.md @@ -0,0 +1,25 @@ +# Decisions + +Design/architecture choices. Caveman + English. + +## BDR-001 — Installer rewritten bash, not POSIX sh +2026-05-27. `install.sh` used `#!/bin/sh` but `[ "$1" == "x" ]` (bashism) → breaks on dash. +Switched shebang to `#!/usr/bin/env bash` + `set -euo pipefail`. Repo targets apt-get systems, +bash always present. Alternative (stay POSIX, use `=`) rejected — bash gives brace expansion + +arrays if needed later. Status: done. + +## BDR-002 — Installer paths relative to SCRIPT_DIR +2026-05-27. Old script mixed `/tmp/config/bash/...` (never populated) and relative `bash/...`. +server + osx branches referenced nonexistent `/tmp/config` → silent fail. Now compute +`SCRIPT_DIR` once, all paths relative to it. Works from any cwd. Status: done. + +## BDR-003 — apt-get guarded by command -v +2026-05-27. `apt-get` ran unconditionally even for `osx` target → fails on macOS. +Wrapped in `if command -v apt-get`. osx skips system packages. Status: done. + +## BDR-004 — remote-install.sh bootstrap: clone ~/config, idempotent pull +2026-05-27. Added curl|bash bootstrap. Clones repo to `$HOME/config` (env-overridable +REPO_URL/CLONE_DIR/BRANCH), pulls if exists, ensures git first, then `bash install.sh`. +Alt rejected: temp-dir + tarball download (no git dep) — kept git path, simpler + repo +needs git anyway. Risk noted: curl|bash runs unreviewed remote code (archetype pain point); +mitigated by HTTPS + pinned branch + manual fallback in README, not eliminated. Status: done. diff --git a/.claude/memory/evals.md b/.claude/memory/evals.md new file mode 100644 index 0000000..51b12d1 --- /dev/null +++ b/.claude/memory/evals.md @@ -0,0 +1,9 @@ +# Evals + +Quality check of Claude output. Caveman + English. + +## EVAL-001 — install.sh fix verified +2026-05-27. Method: `shellcheck install.sh` (CLEAN) + `bash -n install.sh` (syntax OK). +Not runtime-tested (would mutate ~/.vim, ~/.bashrc on this machine). Logic traced by hand: +SCRIPT_DIR resolution, idempotent clones, target case map all correct. Anomaly: none. +Action: safe to commit. Full runtime test deferred to next clean VM. diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md new file mode 100644 index 0000000..16fc9e8 --- /dev/null +++ b/.claude/memory/journal.md @@ -0,0 +1,12 @@ +# Journal + +3-5 lines/session. Caveman + English. + +## 2026-05-27 — onboard (right-sized) +Onboarded dotfiles repo. Archetype dotfiles-meta HAUTE. 8 files, ~405 lines, graphify skipped. +Found + fixed install.sh: broken /tmp/config paths (server+osx silent fail), bashism under sh, +missing cp -r nerdtree, redundant molokai clone, unquoted vars, no set -eu. shellcheck CLEAN. +Created README, CLAUDE.md, .gitignore, .claude memory/tasks/audits. No secrets found. +Open: vimrc GenerateClassC bug (BLK-001), bashrc backtick style nits. +Then: install.sh arg dropped → uname OS-detect (Darwin→osx else linux). Deleted bashrc-server. +Added remote-install.sh curl|bash bootstrap (BDR-004). shellcheck CLEAN. Docs synced. diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md new file mode 100644 index 0000000..1bfb9e7 --- /dev/null +++ b/.claude/memory/learnings.md @@ -0,0 +1,13 @@ +# Learnings + +Reusable patterns. Caveman + English. + +## LRN-001 — Dotfiles installer idempotency pattern +2026-05-27. Re-runnable installer: `rm -rf` target before each `git clone`, `mkdir -p` dirs, +back up existing config to fixed `~/Oldconfig` (overwrite prev backup). Avoids "clone fails, +dir exists" on second run. Apply to any provisioning script. + +## LRN-002 — Redundant vim plugin fetch +2026-05-27. molokai colorscheme committed in `vim/colors/` AND cloned to /tmp then copied. +`cp -rupv vim/* ~/.vim/` already deploys it. Dropped the clone. Lesson: check what tracked +files already cover before adding external fetch. diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md new file mode 100644 index 0000000..e8e9be9 --- /dev/null +++ b/.claude/tasks/TODO.md @@ -0,0 +1,27 @@ +# TODO — onboard backlog (2026-05-27) + + + +## Done this session +- [x] [P0] Fix install.sh broken /tmp/config paths (server+osx silent fail) +- [x] [P0] Fix bashism under #!/bin/sh → bash + set -euo pipefail +- [x] [P1] Fix nerdtree copy (cp -r / direct clone into bundle) +- [x] [P1] Guard apt-get behind command -v (osx no longer fails) +- [x] [P2] Drop redundant molokai clone +- [x] [P2] Create README.md, CLAUDE.md, .gitignore +- [x] [P2] Create .claude/memory + tasks + audits + +## P2 — Moyenne +- [ ] [P2] [/hotfix] — vim/vimrc GenerateClassC: bare `name` → `a:name` (fixes :ClassC E121) + Files: vim/vimrc (~line 75-95) + Source: .claude/memory/blockers.md BLK-001 + +## P3 — Basse +- [ ] [P3] [/code-clean] — bashrc-* legacy backticks → $(...) (SC2006), arithmetic SC2004 + Files: bash/bashrc-linux, bash/bashrc-server, bash/bashrc-osx + Note: cosmetic only, no behavior change + +## Post-MVP (optional, backlog) +- [ ] Runtime-test install.sh on a clean VM (all 4 targets) — not safe on dev machine +- [ ] Consider an `uninstall.sh` (restore from ~/Oldconfig) +- [ ] LICENSE if repo ever goes public diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..888c976 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# OS junk +.DS_Store +Thumbs.db + +# Vim swap / backup +*.swp +*.swo +*~ + +# Local install backup (created by install.sh) +Oldconfig/ + +# onboard audit raw outputs (consumed by /onboard STEP 7) +.onboard-audit/ + +# Claude local settings (machine-specific) +.claude/settings.local.json