Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions DreamcoderHerdr/.config/herdr/dreamcoder/0.9.1/config.dark.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Managed by Dreamcoder; repository variant only.
[theme]
name = "catppuccin"

[theme.custom]
accent = "#A5B4FC"
panel_bg = "#000000"
surface0 = "#0B0B0B"
surface1 = "#0D0D0F"
surface_dim = "#0B0B0B"
overlay0 = "#767676"
overlay1 = "#A7A7A7"
text = "#E6E6E6"
subtext0 = "#C7C7C7"
mauve = "#D8B4FE"
green = "#34D399"
yellow = "#FBBF24"
red = "#FB8585"
blue = "#7DD3FC"
teal = "#3B82F6"
peach = "#D4B5FD"
sidebar_bg = "#000000"
active_row_bg = "#0B0B0B"
selection_bg = "#3A3A3A"

[ui]
accent = "#6FA0AF"
pane_scrollbars = false

[keys]
prefix = "ctrl+a"
previous_agent = "prefix+alt+k"
next_agent = "prefix+alt+j"
focus_agent = "prefix+ctrl+1..9"
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Managed by Dreamcoder; repository variant only.
[theme]
name = "catppuccin-latte"

[theme.custom]
accent = "#824f16"
panel_bg = "#f3eadc"
surface0 = "#fff7ea"
surface1 = "#decbb1"
surface_dim = "#e6d7c4"
overlay0 = "#66513b"
overlay1 = "#554638"
text = "#17120d"
subtext0 = "#352e22"
mauve = "#7d3e64"
green = "#315b31"
yellow = "#654300"
red = "#842f24"
blue = "#0d4a68"
teal = "#0f6570"
peach = "#a7471c"
sidebar_bg = "#f3eadc"
active_row_bg = "#fff7ea"
selection_bg = "#decbb1"

[ui]
accent = "#6FA0AF"
pane_scrollbars = false

[keys]
prefix = "ctrl+a"
previous_agent = "prefix+alt+k"
next_agent = "prefix+alt+j"
focus_agent = "prefix+ctrl+1..9"
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Managed by Dreamcoder; repository variant only.
[theme]
name = "catppuccin"

[theme.custom]
accent = "#a4afee"
panel_bg = "#000000"
surface0 = "#090909"
surface1 = "#0b0b0d"
surface_dim = "#090909"
overlay0 = "#797979"
overlay1 = "#959595"
text = "#c6c6c6"
subtext0 = "#ababab"
mauve = "#b98beb"
green = "#43b48b"
yellow = "#d1a126"
red = "#e88484"
blue = "#62b9e2"
teal = "#3a76d6"
peach = "#b48ce9"
sidebar_bg = "#000000"
active_row_bg = "#090909"
selection_bg = "#323232"

[ui]
accent = "#6FA0AF"
pane_scrollbars = false

[keys]
prefix = "ctrl+a"
previous_agent = "prefix+alt+k"
next_agent = "prefix+alt+j"
focus_agent = "prefix+ctrl+1..9"
4 changes: 3 additions & 1 deletion DreamcoderShell/.config/fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ alias zf="zen-browser -P Founder"
set -gx BROWSER "zen-browser -P Personal"
# Start selected terminal multiplexer (Herdr)
if status is-interactive; and command -q herdr; and not set -q HERDR_ENV; and not set -q TMUX; and not set -q ZELLIJ; and not set -q ORCA_PANE_KEY
herdr; or echo "⚠️ Herdr failed to start; continuing in Fish."
# Herdr spawns panes with $SHELL; pin it to this fish so panes never inherit
# a foreign login shell (e.g. zsh from the session environment).
env SHELL=(status fish-path) herdr; or echo "⚠️ Herdr failed to start; continuing in Fish."
end

# ── SDD Profile Aliases ───────────────────────────────────────────
Expand Down
25 changes: 16 additions & 9 deletions DreamcoderShell/.config/fish/functions/dev-dots.fish
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
# Launch Dreamcoder-dots dev workspace with Herdr
function dev-dots
set -l project_dir "$HOME/Documents/PROYECTOS/dreamcoder-dots"
set -l herdr_lib "$project_dir/scripts/herdr-lib.sh"

if not test -d "$project_dir"
echo "❌ Project not found: $project_dir"
return 1
end

# Start Herdr if not running
if not set -q HERDR_SOCKET
herdr --session dreamcoder-dots &
sleep 0.5
# Herdr control commands only work from inside a Herdr pane; the fish
# autostart in config.fish launches or attaches the session.
if not set -q HERDR_ENV
echo "❌ Run dev-dots from a Herdr pane (start one with: herdr)"
return 1
end

cd "$project_dir"
echo "🚀 Dreamcoder-dots workspace ready at $project_dir"

# Open lazygit in current dir
herdr tab open -- lazygit

# Open nvim in project
herdr tab open -- nvim
# Herdr 0.9 has no `tab open`: create each tab, wait for its shell, then run.
for tool in lazygit nvim
set -l pane_id (herdr tab create --cwd "$project_dir" --label $tool --no-focus | jq -r '.result.root_pane.pane_id')
if test -z "$pane_id"; or test "$pane_id" = null
echo "❌ herdr tab create failed for $tool"
return 1
end
bash -c 'source "$1"; herdr_wait_shell "$2"' _ "$herdr_lib" "$pane_id"
and herdr pane run "$pane_id" $tool >/dev/null
end

# Status line
echo " 📂 $(pwd)"
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ High-level documentation on how the system is built and how it works.
| [Monorepo Structure](architecture/monorepo-structure.mmd) | Visual map of the repository: `src/`, `scripts/`, `tests/`, and every top-level directory |
| [Data Flow](architecture/data-flow.mmd) | Full flow of `dreamcoder-theme sync`: palette → tokens → renderers → writers → disk |
| [Source Manifest](sources.md) | Upstream inputs (ML4W, Gentleman.Dots), ownership boundaries, and prohibitions on secrets/runtime state |
| [Herdr Integration](herdr.md) | Herdr 0.7.3/0.8.0 contracts, versioned generated variants, and deployment profiles |
| [Herdr Integration](herdr.md) | Herdr 0.7.3/0.8.0/0.8.2/0.9.1 contracts, versioned generated variants, and deployment profiles |
| [Design System](DREAMCODER_DESIGN_SYSTEM.md) | Design principles, color philosophy, and visual identity guidelines |
| [Control Center](DREAMCODER_CONTROL_CENTER.md) | Central control dashboard for the Dreamcoder Workbench ecosystem |

Expand Down
36 changes: 33 additions & 3 deletions docs/herdr.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ configuration.
| `herdr-0.7.3` | 0.7.3 | `herdr config check` | `herdr server reload-config` | `~/.config/herdr/config.toml` | Pre-existing supported profile |
| `herdr-0.8.0` | 0.8.0 | `herdr config check` | `herdr server reload-config` | `~/.config/herdr/config.toml` (overridable by `HERDR_CONFIG_PATH`) | Installed-binary evidence |
| `herdr-0.8.2` | 0.8.2 | Source-derived | `herdr server reload-config` | XDG config path (overridable by `HERDR_CONFIG_PATH`) | Public upstream source; no local runtime observation |
| `herdr-0.9.1` | 0.9.1 | `herdr config check` | `herdr server reload-config` | `~/.config/herdr/config.toml` (overridable by `HERDR_CONFIG_PATH`) | Installed-binary evidence |

### Herdr 0.8.0 installed-binary evidence

Expand All @@ -52,6 +53,30 @@ base and the custom `sidebar_bg`, `active_row_bg`, and `selection_bg` tokens.
See the complete hashes and procedural boundaries in
[`herdr-contract-evidence.md`](../src/dreamcoder_theme/herdr-contract-evidence.md).

### Herdr 0.9.1 installed-binary evidence

Observed from the executable installed by `herdr update` (0.9.0 → 0.9.1):

- Executable: `~/.cargo/bin/herdr`, version `0.9.1`
- Binary SHA-256:
`2a02fed16beb651ef006e1d43f048f652ca4dc58ad053cd2d44450563d5c54b7`
- Config validation: `herdr config check`. In 0.9.1 it is strict: unknown keys
(`theme.custom.*`, `ui.*`) and unknown theme names are reported as issues and
exit non-zero, so a passing check proves every emitted field is recognized.
- Reload command: `herdr server reload-config`
- Config path: `~/.config/herdr/config.toml`, overridable via `HERDR_CONFIG_PATH`
- Default-config deltas relevant to the Dreamcoder variant (`herdr --default-config`):
`[ui] pane_scrollbars` now defaults to `true` (the variant keeps `false`);
`[ui] accent` defaults to the named color `"cyan"` (the variant pins a hex);
`[keys] prefix` defaults to `"ctrl+b"` and `previous_agent` / `next_agent` /
`focus_agent` are unset by default (the variant keeps `ctrl+a` and its agent
bindings); `catppuccin-latte` is a valid built-in theme name.

The 0.9.1 variants carry the same field set as 0.8.2 (catppuccin base,
`catppuccin-latte` for Light, sidebar/active-row/selection tokens). Each
generated variant passed `HERDR_CONFIG_PATH=<variant> herdr config check`. A
live reload was not observed (the server was not running when captured).

## Generated repository variants

Versioned variants are generated from the Dreamcoder Workbench canonical tokens
Expand All @@ -69,13 +94,17 @@ DreamcoderHerdr/.config/herdr/dreamcoder/
0.8.2/config.dark.toml
0.8.2/config.light.toml
0.8.2/config.night.toml
0.9.1/config.dark.toml
0.9.1/config.light.toml
0.9.1/config.night.toml
```

- Each variant carries the header `# Managed by Dreamcoder; repository variant only.`
- Light renders Dreamcoder Light; dark renders Dreamcoder dark.
- The 0.8.0 variants include `pane_scrollbars = false`.
- The 0.8.2 Light variant uses `catppuccin-latte`; all 0.8.2 variants explicitly
map sidebar, active-row, and navigation-selection backgrounds.
- The 0.8.2 and 0.9.1 Light variants use `catppuccin-latte`; all 0.8.2 and
0.9.1 variants explicitly map sidebar, active-row, and navigation-selection
backgrounds.
- Active/live configuration (`~/.config/herdr/config.toml`, or whatever
`HERDR_CONFIG_PATH` points to) stays out of git. The repository only ever
ships static, versioned variants.
Expand Down Expand Up @@ -103,7 +132,8 @@ that deployment profiles validate against their schema, that the mobile profile
selects Light with pane scrollbars disabled, that the source manifest is
present, and that no sensitive material exists in the synchronization surface.
When `herdr` is installed, the verifier additionally runs `herdr config check`
against a temporary copy of the 0.8.0 light variant using `HERDR_CONFIG_PATH`
against a temporary copy of the light variant for the installed version (the
0.8.0 variant when that version has no profile) using `HERDR_CONFIG_PATH`
(never the live configuration). When `herdr` is absent, that step is skipped
safely.

Expand Down
18 changes: 18 additions & 0 deletions docs/installation/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,21 @@ systemctl --user disable --now dreamcoder-theme-auto.timer
| Btop theme not found | Run `dreamcoder-theme sync` to regenerate |
| Auto-timer not switching | Check `systemctl --user status dreamcoder-theme-auto.timer` |
| Doctor reports missing files | Run `./scripts/dreamcoder repair` |

### Upstream upgrades that re-point Dreamcoder targets

An ML4W upgrade can re-point `~/.config/fish`, `~/.config/kitty`,
`~/.config/fastfetch`, `~/.bashrc`, or `~/.zshrc` to its own tree under
`~/.mydotfiles`. `./scripts/dreamcoder repair` (and `install`) relinks the
Dreamcoder stow modules (`DreamcoderShell`, `DreamcoderKitty`,
`DreamcoderGhostty`, `DreamcoderFastfetch`, `DreamcoderWarp`, `DreamcoderBat`,
`DreamcoderSystemd`) before applying hooks:

- a stow dry run lists every blocking target: regular files, and symlinks stow
does not own (foreign trees or absolute links into the repo);
- each one is moved, never deleted, to
`~/.local/share/dreamcoder/install-conflicts/<backup-id>/<path under $HOME>`;
symlinks move as links, so the tree they point to stays untouched;
- stow then links the modules. Anything the upstream tree held that you still
need (for example fish universal variables in its `fish_variables`) must be
copied back by hand.
55 changes: 53 additions & 2 deletions odd/tasks/ml4w-2.16-gentleman-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,57 @@ injected into ML4W-owned files.
- Pre-existing, out of scope: `tests/shell/test_apply_theme.bats` "kanagawa bridge
carries night-derived colors" also fails on clean `main`.

- [x] T5 — Restore the Dreamcoder stow layer: `scripts/dreamcoder-lib.sh` stows modules
`Shell Kitty Ghostty Fastfetch Warp Bat Systemd`, which no longer exist (renamed to
`Dreamcoder*`), so `dreamcoder install|repair` cannot relink anything. Fix the module
list and let install/repair replace a Dreamcoder-owned target that ML4W re-pointed
to its own tree (backed up, never deleted). Route: delegated writer.
- Trigger: the ML4W 2.16 upgrade (00:04) re-pointed `~/.config/fish` to ML4W's empty
`config.fish`, dropping the Dreamcoder fish layer and the Herdr autostart
(`DreamcoderShell/.config/fish/config.fish:51`); `kitty` and `fastfetch` also point
to ML4W.
- Evidence: commit `fix(install): relink Dreamcoder stow modules over foreign targets`;
`bats tests/ml4w/ tests/shell/` 126/127 (only the known kanagawa failure);
`tests/shell/test_stow_layer.bats` 8/8; `stow -n -v` of the 7 modules into an empty
temp HOME exits 0; pytest green on a clean `HEAD` export plus this change (the live
working tree fails `test_active_mirror_identity_consistency` only because of the
uncommitted 07:00 auto-theme rewrite); shellcheck clean.
- Rationale: modules renamed 1:1 (`a9dd5b5` prefix rename; `installer.py` was
already updated, the shell list was missed) — no new packages, a bats test pins
the list to `installer_plan()`. Conflicts come from a stow dry run instead of a
hand-kept list, so foreign symlinks (ML4W), regular files, and absolute links into
the repo are all moved (never deleted, symlinks moved as links) to
`~/.local/share/dreamcoder/install-conflicts/<backup-id>/` — not under
`~/.config/dreamcoder`, which is itself a stow target. Install and repair now stow
before hooks, so hooks never write through ML4W links. The fastfetch hook keeps
stow's relative link instead of re-creating an absolute one each run.
- Live dry run (read-only) conflicts T6 will move: `.config/{fish,kitty,fastfetch}`
and `.bashrc`/`.zshrc` (ML4W links), `.config/dreamcoder`, `.config/starship.toml`,
systemd unit links (absolute repo links), `.config/systemd/user/dreamcoder-env.conf`
(identical regular file), warp settings/theme links. ML4W's `fish_variables`
(universal vars incl. `fish_user_paths`) is not migrated — report to the user.
- [ ] T6 — Relink the live system through `dreamcoder repair`, confirm a new
interactive fish starts Herdr. Route: inline.
- [x] T7 — Herdr 0.9.1: live binary updated with `herdr update` (0.9.0 → 0.9.1),
integrations reinstalled, `herdr config check` ok. Onboard a `herdr-0.9.1` profile
per `docs/herdr.md` (installed-binary evidence, generated variants, verify-repo-sync).
Route: delegated writer.
- Evidence: commit `feat(herdr): onboard the installed Herdr 0.9.1 profile`; binary
SHA-256 `2a02fed1…5c54b7`; `HERDR_CONFIG_PATH=<variant> herdr config check` ok for
0.9.1 dark/light/night; pytest green on a clean `HEAD` export plus this change;
`verify-repo-sync.py` ok (host check now validates the installed 0.9.1 variant).
- Rationale: 0.9.1's `config check` is strict (unknown keys and theme names fail),
so passing proves the 0.8.2 field set is accepted; the profile reuses it with no new
fields and the variants are byte-identical to 0.8.2. Variants generated with a
scoped `sync_herdr_repo_variants(profiles=(HERDR_091_PROFILE,))` call, touching no
other file. Consequence: a version between profiles (0.9.0) now fails closed; only
versions newer than 0.9.1 fall back. `herdr-theme-switch.sh` needed no change
(Python detection). Herdr scripts (`herdr-lib`, `herdr-review`,
`herdr-workspace-dev`) and the fish autostart (plain `herdr`) match the 0.9.1 CLI;
`dev-dots.fish` used `herdr tab open`, absent in 0.9.1, now `tab create` +
`pane run` from inside a Herdr pane (`HERDR_ENV`).
- Not observed: live `server reload-config` (server not running at capture).

## Acceptance criteria

- `bats tests/ml4w/` and `python -m pytest tests/` pass.
Expand All @@ -106,5 +157,5 @@ injected into ML4W-owned files.

## Next step

Feature complete. Pending user decisions: SUPER+SHIFT+arrows overlap (resize vs
move), the pre-existing kanagawa bridge test, push/PR of the branch.
T6 (inline live relink). Pending user decisions: SUPER+SHIFT+arrows
overlap (resize vs move), the pre-existing kanagawa bridge test, push/PR of the branch.
6 changes: 6 additions & 0 deletions scripts/apply-fastfetch-assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ BACKUP_DIR="${CONFIG_HOME}/dreamcoder-backup-$(date +%Y%m%d-%H%M%S)"
}

mkdir -p "${CONFIG_HOME}"
# Already linked (e.g. by stow's relative link): keep it, so the next
# `dreamcoder repair` does not see an absolute link stow does not own.
if [[ -L "${TARGET_DIR}" && "$(cd -P "${TARGET_DIR}" 2>/dev/null && pwd)" == "$(cd -P "${SOURCE_DIR}" && pwd)" ]]; then
printf '✓ Fastfetch assets linked: %s\n' "${TARGET_DIR}"
exit 0
fi
if [[ -e "${TARGET_DIR}" && ! -L "${TARGET_DIR}" ]]; then
mkdir -p "${BACKUP_DIR}"
mv "${TARGET_DIR}" "${BACKUP_DIR}/"
Expand Down
Loading
Loading