feat(agent): autonomous-loop infrastructure + roadmap rework

A git-tracked agent/ directory so AI agents can iterate on the distro
unattended (runner-agnostic: /loop, headless claude -p, or a fresh
manual session — all state lives in the checkout, per the distro's own
philosophy):

- LOOP.md — the iteration protocol: orient → pick one BACKLOG task →
  verify up the V0–V3 ladder → commit+push main → record. Safety rails
  (v1 untouchable, no force-push, no surprise lock bumps) and
  stop-and-escalate conditions.
- BACKLOG.md — the forward half of docs/ROADMAP.md reworked into a
  prioritized queue (5 NOW / 6 NEXT / LATER / PROPOSED / Decisions);
  ROADMAP.md stays the design/decision record + shipped log.
- GOALS.md — the four pillars (stable > reproducible/zero-hidden-state >
  effortless config > beautiful), quality bars, non-goals.
- CONVENTIONS.md — coding/design rules (in-flake state, menu placement,
  Waybar whole-swap parity, toggle-vs-package, no formatter).
- MEMORY.md — curated hard-won lessons (VM recipes, btrfs-assistant
  segfault watch, rofi/WirePlumber/hyprlock gotchas).
- HARDWARE-QUEUE.md — every pending V3 on-hardware check collected from
  the ROADMAP, with exact steps, split by machine.
- JOURNAL.md — append-only iteration log, seeded with this bootstrap.

Plus a root CLAUDE.md entry point and README/ROADMAP pointers.

Verified: V0 — docs-only; nix flake check --no-build green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-07-04 08:51:11 +01:00
parent 9726ba3b2f
commit 6d70bba8e6
10 changed files with 584 additions and 4 deletions

142
agent/BACKLOG.md Normal file
View File

@@ -0,0 +1,142 @@
# Backlog — the prioritized task queue
The forward-looking half of the old docs/ROADMAP.md, reworked as a queue
agents can execute. Detailed design notes and decision records stay in
`docs/ROADMAP.md` (referenced as "ROADMAP § <item>"); this file is *what's
next, in what order*.
**Rules:**
- Agents take the topmost actionable item (see LOOP.md). Finished items
are **deleted** here — the journal + git log are the record; durable
design notes get a ✓-entry in docs/ROADMAP.md if worth keeping.
- Tags: `[blocked:hw]` needs real hardware (see HARDWARE-QUEUE.md) ·
`[human]` needs Bernardo · `[stuck]` two failed attempts, needs help ·
`[big]` must be split before starting.
- Agents may append to **PROPOSED** and **Decisions** freely; only
Bernardo moves items *out* of PROPOSED into the tiers.
---
## NOW
### 1. Opt-in auto-commit of the flake on state mutations
Phase 4 of the in-flake-state principle (phases 13: night-light,
keyboard memory, display resolution — shipped). Every menu write
(`nomarchy-theme-sync set/apply`) already does `git add -N`; add an
opt-in (a `settings.autoCommit` flag, itself menu-toggled) that commits
**owned files only** (theme-state.json) with a generated message after
each mutation. **Why:** closes the loop on "your checkout is your
machine" — settings changes become history. **Done when:** off by
default; toggleable from the System menu; commits fire on apply/set;
never commits unrelated dirty files; graceful when the repo has no user
git identity. **Verify:** V1 + a round-trip on the theme-sync CLI in a
sandbox repo; V2 if wired into a check.
### 2. btrfs-assistant segfault — attempt the nixpkgs override fix
ROADMAP § Snapshot browse/restore. btrfs-assistant 2.2 crashes in
`libbtrfsutil.so.1.4.0` (ABI mismatch, confirmed not a VM artifact); the
`nomarchy-snapshots` fzf fallback ships. Try an override aligning its
libbtrfsutil (or a version bump/pin); if upstream nixpkgs has since
fixed it, just verify and re-point the menu. **Done when:** the GUI
launches in the VM test, or the attempt is written up as infeasible
(then re-check on each lock bump). **Verify:** V2 — extend the snapper
VM check to launch the binary.
### 3. Keyboard layouts — cycle bind + summer-bar parity
ROADMAP § Keyboard layouts, remaining bullets: (a) a multi-layout cycle
bind (`hyprctl switchxkblayout` current-device, or xkb `grp:` option)
when >1 session layout, in the cheatsheet; (b) add `hyprland/language`
to the summer-day/night `waybar.jsonc` whole-swaps (parity rule — the
generated bar has it, the static ones don't; gating doesn't translate,
decide the static behavior and note it). **Verify:** V1 + `jq` the
rendered configs; V3 queue the on-hardware cycle check.
### 4. Full docs review & restructure
ROADMAP § Full docs review. The roadmap/backlog split is done (this
file); remaining: reconcile every README option table against the live
`nomarchy.*` surface; drift pass over docs/OVERRIDES.md, docs/TESTING.md,
templates/downstream/README.md; read the install/first-run story end to
end. Site-vs-markdown is a Decision (below). **Verify:** V0 + a
mechanical option-surface diff (eval the options, compare to the
tables — consider making that a permanent check).
### 5. Webcam follow-ups (small)
ROADMAP § Webcam: ship `v4l-utils` + `cameractrls` (commented app-suite
entries or alongside the camera toggle — respect the option-surface
rule) for genuine-tuning cases; write up the portal/Flatpak
libcamera-path gap (internal IR still listed there) as a PROPOSED item
with options. **Verify:** V1.
## NEXT
### 6. Automated upstream lock bumps (maintainer CI) `[big]`
ROADMAP § Automated upstream lock bumps — design decided: weekly
scheduled job (Forgejo Actions) runs `nix flake update` (within pinned
release branches) → `nix flake check` + the `checks.*` suite + toplevel
build → lands on `main` on green; `v1` promotion stays human. Repo has
no CI today, so slice: (a) a workflow that just runs checks on push,
(b) the scheduled bump job, (c) the fast-lane note for security bumps.
### 7. Display profiles — docked/undocked switching
ROADMAP § Display / monitor management, remaining: true profile
switching of the *same* outputs (multi-layout toggles, beyond
per-output hotplug rules), optionally workspace-to-monitor binding.
Design first (state-file shape, menu surface) — write the plan into
this entry before coding.
### 8. Greeter theming from the JSON
ROADMAP § Greeter. tuigreet themed from theme-state.json at system
rebuild (same model as Plymouth's tint). Scope: tuigreet only (no SDDM).
### 9. Launch-or-focus UX scripts
ROADMAP § launch-or-focus. Hyprland dispatch scripts: a bind launches an
app or focuses its existing window. Curate which apps get binds;
cheatsheet entries via keybinds.nix.
### 10. "nomarchy" control center + first-boot welcome `[big]`
ROADMAP § control center. A single front-end over the common toggles on
the same `nomarchy-theme-sync` surface, + a first-boot guided
"pick your theme / essentials" flow. Needs a design pass (TUI vs GUI)
→ write options into Decisions before implementing.
### 11. Look & Feel menu category
ROADMAP § Menu system, remaining: group Theme + night-light (+ wallpaper
cycle, future appearance toggles) under a Look & Feel submenu once it
earns ≥3 entries — keep the root at six.
## LATER
- **Wallpapers artifact split** (ROADMAP § Faster switches — decided,
deferred): pinned `Nomarchy-wallpapers` input so a state write stops
re-copying 86 MB. Follow-on: pre-built theme variants if switches are
still slow after.
- **Installer round 2** (ROADMAP § Installer): multi-disk BTRFS RAID,
impermanence, BIOS/legacy boot.
- **Boot-from-snapshot**: a systemd-boot equivalent of grub-btrfs.
- **Night-light geo mode**: lat/long auto sunset/sunrise (means wlsunset).
- **Per-theme icon overrides** / more icon packs (ROADMAP § Icon themes).
- **MIPI/IPU software-ISP camera** support (no-UVC machines).
- **Auto-timezone Waybar tooltip** showing the detected zone (optional).
- **VPN exit-node richer display** (country/city) (optional).
- **NixOS release bump → v2** `[human]`: deliberate, hand-edited, never
automated; the previous attempt was discarded (2026-06-22) over a
Hyprland OOM blocker — see MEMORY.md before retrying.
## PROPOSED (agent suggestions — await human triage)
*Agents: append here with a one-paragraph pitch (what/why/cost). Do not
implement. Bernardo moves accepted items into a tier.*
- *(empty)*
## Decisions `[human]`
Open calls only Bernardo can make; agents add options/evidence but never
decide.
- **Formatter adoption:** repo deliberately has none; `nixfmt-rfc-style`
would flatten the aligned hand-formatting of ~33 files. Adopt or
declare never?
- **Docs site vs Markdown-in-repo** (from the docs-review item).
- **Control center form factor:** TUI (gum/ratatui-style) vs GUI vs
"the rofi menu *is* the control center, just add a first-boot flow".