diff options
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -10,8 +10,9 @@ Two programs: the GUI (`sb_builder/`, PyQt6 incl. QtDBus, stdlib otherwise) and `remote/sbb-remote`, a single-file stdlib-only Python helper deployed on the VM. Do not add third-party dependencies to either. -Design and phasing: `docs/superpowers/specs/`. Phase 1 (core) is -`2026-10-19-sb-builder-phase1-design.md`. +Design and phasing: `docs/design/`, one spec per phase. Phase 1 (core) is +`2026-10-19-sb-builder-phase1-design.md`. New specs go there; implementation +plans are working files, kept out of git (`.superpowers/`). ## How it works @@ -19,6 +20,8 @@ Design and phasing: `docs/superpowers/specs/`. Phase 1 (core) is answers with JSON. `sb_builder/remote.py` is the only code that runs ssh (and local `virsh`). `sb_builder/upstream.py` runs the local `nvchecker` over the repo's `nvchecker.toml`; the VM never sees the GitHub token. + `sb_builder/repository.py` reads the built package repository from its + local mount (`[repository] path`), never over ssh. - Trust boundary: the helper runs only a fixed table of job kinds and builds argv itself from validated args. Never pass shell strings or paths from the GUI to the helper. @@ -30,8 +33,14 @@ Design and phasing: `docs/superpowers/specs/`. Phase 1 (core) is `gpg-preset-passphrase`. Every other subprocess in the helper runs with `stdin=DEVNULL`, so nothing can read the passphrase off the ssh channel. Never put the passphrase in argv, env, logs or files. +- Second exception: `config-get` / `config-set` (Keystone's settings page) + run before `load_config`, so a broken helper config stays fixable; + `config-set` reads the new text from stdin, validates it with `check()` + (the same rules as `load_config`), keeps `.bak` and replaces atomically. + The config names paths and scripts the helper runs: the ssh login is root + already, so this grants nothing new. - Hints are parsed (`shlex`), never sourced. `sb_builder/hints.py` mirrors - slackrepo's own rules (`../GITHUB/slackrepo/libexec/functions.d/parsefunctions.sh`); + slackrepo's own rules (`libexec/functions.d/parsefunctions.sh` in [slackrepo](https://github.com/aclemons/slackrepo)); check that file when changing it. - Hint editing lives in the helper (`hint-update`, `hint-new`, `fix-current` jobs run the helper's own `_hint` command): text edits, `.bak` before each @@ -48,14 +57,14 @@ Design and phasing: `docs/superpowers/specs/`. Phase 1 (core) is ## UI guidelines -Every tab follows these (design: `docs/superpowers/specs/2026-10-20-sb-builder-ui-design.md`). +Every tab follows these (design: `docs/design/2026-10-20-sb-builder-ui-design.md`). 1. Tabs are permanent and load their data lazily on first show (`loaded`, `reload()`); the ribbon never opens or closes tabs. 2. Main ribbon: the tab's actions (`tab.actions`) in workflow order. Small ribbon: view controls (`tab.view_actions`). Build them with `sb_builder/ui.py` `action()`. Nothing actionable lives inside a view - except navigation links. + except navigation buttons to another tab (`ui.nav_button()`). 3. Change actions act on ticked rows, view actions on the highlighted row. A row click toggles its tick; Ctrl+A / Ctrl+Shift+A select visible / clear. 4. An inapplicable action is disabled with `ui.enable(action, reason)`, the @@ -98,4 +107,4 @@ at a config whose `state_dir` is under `/tmp`. - License: GPLv2 only (`LICENSE`, header in each source file). - Work directly on master. -- `.superpowers/` is brainstorming scratch, ignored. +- `.superpowers/` is brainstorming and plan scratch, ignored. |
