aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-25 20:50:27 +0200
committerDanilo M. <danix@danix.xyz>2026-09-25 20:50:27 +0200
commit0679099f804000123f2999ce07948d324305d998 (patch)
tree71b117f0d3876430bca145353ae934bf486999f8
parentc92bdd69fe19dca126469bb1c0bc3a598917af9d (diff)
downloadslackrepo_setup-0679099f804000123f2999ce07948d324305d998.tar.gz
slackrepo_setup-0679099f804000123f2999ce07948d324305d998.zip
Move agent guidance to AGENTS.mdHEADmaster
AGENTS.md is the tool-neutral convention on this system. CLAUDE.md is kept as a thin importer (@AGENTS.md) since Claude Code does not read AGENTS.md natively. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--AGENTS.md78
-rw-r--r--CLAUDE.md78
2 files changed, 81 insertions, 75 deletions
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000..dcc195e
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,78 @@
+# AGENTS.md
+
+This file provides guidance to AI coding agents (Claude Code, opencode, etc) working in this repository.
+
+## What this is
+
+Single bash script (`slackrepo_setup_SBo-danix.sh`) that builds a personal Slackware SlackBuilds
+repo at `/var/lib/sbopkg/SBo-danix`. The repo feeds **slackrepo** (`../GITHUB/slackrepo/`), the
+tool used to build slackware64-current packages. The repo is regenerated from scratch weekly.
+No build/test tooling; run the script directly.
+
+## The -current dependency problem
+
+SBo SlackBuilds target Slackware **stable**. Some of their build-time REQUIRES are unneeded on
+**-current** because -current already ships them as system packages or newer versions. Examples:
+`google-go-lang` (system package in -current), `rust-opt` (only exists because stable's system
+rust is old). These are "phantom deps" on -current.
+
+slackrepo strips a dep from a package via a per-package **hintfile** (`<prgnam>.hint`) containing
+`DELREQUIRES="rust-opt"`. Relevant slackrepo internals:
+
+- Hintfile search order (`parsefunctions.sh` ~line 414): `$SR_SBREPO/$itemdir`, `$SR_HINTDIR`,
+ `$SR_HINTDIR/$itemdir`, then `$SR_DEFAULT_HINTDIR[/itemdir]`. **First match wins** — only one
+ hintfile per package is sourced.
+- `DELREQUIRES` (`parsefunctions.sh` ~line 595) removes listed deps from that **single** package's
+ REQUIRES. There is **no** repo-wide "delete dep X everywhere" mechanism; every dependent needs
+ its own hintfile. Hintdirs are set in `etc/slackrepo_SBo-danix.conf` (`HINTDIR`,
+ `DEFAULT_HINTDIR`).
+
+Pain point: a package with ~20 REQUIRES may pull in several phantom-dep dependents; hand-writing a
+hintfile per dependent each week is tedious and error-prone.
+
+**Solution does not live here.** Hintfiles are owned by the `mkhint` tool (`../mkhintfile/`), which
+already creates/backs up/reviews them. The phantom-dep auto-strip is implemented there, not in this
+setup script:
+- A phantom-dep list at `~/.config/mkhint/phantom-deps` (one dep per line, `#` comments).
+- `mkhint --new` auto-adds `DELREQUIRES` for any listed dep it sees in the `.info` REQUIRES.
+- `mkhint --fix-current` (`-F`) bulk-sweeps the whole repo after a weekly regen: every package whose
+ REQUIRES hits a phantom dep gets a hintfile with the right `DELREQUIRES` (created if absent, merged
+ in place if present).
+
+Weekly flow: regenerate repo with this script; `sbshadow` runs `mkhint -F` at the end.
+Do **not** add a hintfile generator to this script — it would create a second owner of HINT_DIR and
+fight mkhint's `.bak` handling.
+
+## Run
+
+```bash
+./slackrepo_setup_SBo-danix.sh
+```
+
+Destructive: `rm -rf`s `$REPO` on every run to start clean, then re-clones upstream. Interactive
+`read` prompt inside `sbshadow` is the only confirmation (declining exits 0, run continues).
+
+## Architecture
+
+Pipeline, in order:
+
+1. Clone upstream SBo (`Ponce/slackbuilds`), check out `current`, branch to `danix-current`.
+2. Overlay two personal remotes as **git subtrees** (squashed): `my-slackbuilds` → `personal/`,
+ `Slackware-Pentesting-Suite` → `pentesting/`.
+3. **Shadowing**: delegated to `sbshadow` (separate script, must be on PATH). It reconciles both
+ ways against the pristine `current` branch: any upstream package whose directory name matches a
+ package under `personal/` or `pentesting/` is `git rm`'d (shadow); any upstream package missing
+ from HEAD and no longer carried in an overlay is restored with `git checkout current -- cat/pkg`
+ (unshadow). A package is identified by a `$pkg/$pkg.SlackBuild` file. Match by directory
+ basename only, not content. Then it always runs `mkhint -F`.
+
+`sbshadow` is also called by the `sbpull` bash function (`sbpull.bash`, sourced from root's `.bashrc` on the build VM) after a
+`git subtree pull`, so overlay changes are applied without regenerating the whole repo. It is the
+single owner of shadow logic; do not re-inline it here.
+
+## Constraints
+
+- `set -euo pipefail` — any unhandled failure aborts. Keep new steps failure-safe.
+- Paths under `$REPO`; shadow logic depends on the upstream layout being `category/package/`
+ (`sbshadow` greps `cat/pkg/pkg.SlackBuild` in `git ls-tree current`). Layout change breaks it.
+- Unshadow assumes anything missing from HEAD but present in `current` was removed by shadowing.
diff --git a/CLAUDE.md b/CLAUDE.md
index 1d2f67f..e7ff4cf 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -1,78 +1,6 @@
# CLAUDE.md
-This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+AGENTS.md is the single source of truth for agent guidance in this repository.
+Edit AGENTS.md, not this file.
-## What this is
-
-Single bash script (`slackrepo_setup_SBo-danix.sh`) that builds a personal Slackware SlackBuilds
-repo at `/var/lib/sbopkg/SBo-danix`. The repo feeds **slackrepo** (`../GITHUB/slackrepo/`), the
-tool used to build slackware64-current packages. The repo is regenerated from scratch weekly.
-No build/test tooling; run the script directly.
-
-## The -current dependency problem
-
-SBo SlackBuilds target Slackware **stable**. Some of their build-time REQUIRES are unneeded on
-**-current** because -current already ships them as system packages or newer versions. Examples:
-`google-go-lang` (system package in -current), `rust-opt` (only exists because stable's system
-rust is old). These are "phantom deps" on -current.
-
-slackrepo strips a dep from a package via a per-package **hintfile** (`<prgnam>.hint`) containing
-`DELREQUIRES="rust-opt"`. Relevant slackrepo internals:
-
-- Hintfile search order (`parsefunctions.sh` ~line 414): `$SR_SBREPO/$itemdir`, `$SR_HINTDIR`,
- `$SR_HINTDIR/$itemdir`, then `$SR_DEFAULT_HINTDIR[/itemdir]`. **First match wins** — only one
- hintfile per package is sourced.
-- `DELREQUIRES` (`parsefunctions.sh` ~line 595) removes listed deps from that **single** package's
- REQUIRES. There is **no** repo-wide "delete dep X everywhere" mechanism; every dependent needs
- its own hintfile. Hintdirs are set in `etc/slackrepo_SBo-danix.conf` (`HINTDIR`,
- `DEFAULT_HINTDIR`).
-
-Pain point: a package with ~20 REQUIRES may pull in several phantom-dep dependents; hand-writing a
-hintfile per dependent each week is tedious and error-prone.
-
-**Solution does not live here.** Hintfiles are owned by the `mkhint` tool (`../mkhintfile/`), which
-already creates/backs up/reviews them. The phantom-dep auto-strip is implemented there, not in this
-setup script:
-- A phantom-dep list at `~/.config/mkhint/phantom-deps` (one dep per line, `#` comments).
-- `mkhint --new` auto-adds `DELREQUIRES` for any listed dep it sees in the `.info` REQUIRES.
-- `mkhint --fix-current` (`-F`) bulk-sweeps the whole repo after a weekly regen: every package whose
- REQUIRES hits a phantom dep gets a hintfile with the right `DELREQUIRES` (created if absent, merged
- in place if present).
-
-Weekly flow: regenerate repo with this script; `sbshadow` runs `mkhint -F` at the end.
-Do **not** add a hintfile generator to this script — it would create a second owner of HINT_DIR and
-fight mkhint's `.bak` handling.
-
-## Run
-
-```bash
-./slackrepo_setup_SBo-danix.sh
-```
-
-Destructive: `rm -rf`s `$REPO` on every run to start clean, then re-clones upstream. Interactive
-`read` prompt inside `sbshadow` is the only confirmation (declining exits 0, run continues).
-
-## Architecture
-
-Pipeline, in order:
-
-1. Clone upstream SBo (`Ponce/slackbuilds`), check out `current`, branch to `danix-current`.
-2. Overlay two personal remotes as **git subtrees** (squashed): `my-slackbuilds` → `personal/`,
- `Slackware-Pentesting-Suite` → `pentesting/`.
-3. **Shadowing**: delegated to `sbshadow` (separate script, must be on PATH). It reconciles both
- ways against the pristine `current` branch: any upstream package whose directory name matches a
- package under `personal/` or `pentesting/` is `git rm`'d (shadow); any upstream package missing
- from HEAD and no longer carried in an overlay is restored with `git checkout current -- cat/pkg`
- (unshadow). A package is identified by a `$pkg/$pkg.SlackBuild` file. Match by directory
- basename only, not content. Then it always runs `mkhint -F`.
-
-`sbshadow` is also called by the `sbpull` bash function (`sbpull.bash`, sourced from root's `.bashrc` on the build VM) after a
-`git subtree pull`, so overlay changes are applied without regenerating the whole repo. It is the
-single owner of shadow logic; do not re-inline it here.
-
-## Constraints
-
-- `set -euo pipefail` — any unhandled failure aborts. Keep new steps failure-safe.
-- Paths under `$REPO`; shadow logic depends on the upstream layout being `category/package/`
- (`sbshadow` greps `cat/pkg/pkg.SlackBuild` in `git ls-tree current`). Layout change breaks it.
-- Unshadow assumes anything missing from HEAD but present in `current` was removed by shadowing.
+@AGENTS.md