Skip to content

Commit fe0b471

Browse files
committed
Document toolchain propagation and auto-seed tools
1 parent d787dc9 commit fe0b471

File tree

5 files changed

+75
-21
lines changed

5 files changed

+75
-21
lines changed

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ Maintainer role:
3030
- Surface priorities and context; do not file issues or modify code unless asked.
3131
- Track running versions (clawdbot/nix-clawdbot/clawdinators) and note them in `memory/ops.md`.
3232

33+
Toolchain workflow (repo source of truth):
34+
- Add/remove tools in `nix/tools/clawdinator-tools.nix` (packages + descriptions).
35+
- Tools list is rendered into `/etc/clawdinator/tools.md` by Nix and appended to workspace `TOOLS.md` at seed time.
36+
- Keep `clawdinator/workspace/TOOLS.md` aligned with upstream template; do not hardcode tool lists there.
37+
- When you add a new tool, verify it appears in `/etc/clawdinator/tools.md` and in the workspace `TOOLS.md` after seed.
38+
3339
The Zen of ~~Python~~ Clawdbot, ~~by~~ shamelessly stolen from Tim Peters:
3440
- Beautiful is better than ugly.
3541
- Explicit is better than implicit.

clawdinator/workspace/TOOLS.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,4 @@ Skills are shared. Your setup is yours. Keeping them apart means you can update
4040

4141
Add whatever helps you do your job. This is your cheat sheet.
4242

43-
## CLAWDINATOR Tooling Audit
44-
45-
Quick checks:
46-
- Binaries: `ls /run/current-system/sw/bin`
47-
- Active system profile: `readlink /run/current-system/sw`
48-
- NixOS package list: `nix-store --query --requisites /run/current-system/sw | sort`
49-
50-
CLAWDINATOR-specific tools:
51-
- `/usr/local/bin/memory-read`
52-
- `/usr/local/bin/memory-write`
53-
- `/usr/local/bin/memory-edit`
54-
55-
Seeded repos:
56-
- `/var/lib/clawd/repos/clawdbot`
57-
- `/var/lib/clawd/repos/nix-clawdbot`
58-
- `/var/lib/clawd/repos/clawdinators`
59-
- `/var/lib/clawd/repos/clawdhub`
60-
- `/var/lib/clawd/repos/nix-steipete-tools`
43+
<!-- Toolchain list is appended at seed time from /etc/clawdinator/tools.md -->

nix/modules/clawdinator.nix

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ let
7979
in
8080
"${repo.name}\t${repo.url}\t${branch}")
8181
cfg.repoSeeds);
82+
toolchain = import ../tools/clawdinator-tools.nix { inherit pkgs; };
83+
toolchainMd = lib.concatMapStringsSep "\n"
84+
(tool: "- **${tool.name}** — ${tool.description}")
85+
toolchain.docs;
8286

8387
tokenWrapper =
8488
if cfg.anthropicApiKeyFile != null || cfg.discordTokenFile != null || cfg.githubPatFile != null then
@@ -346,9 +350,7 @@ in
346350

347351
environment.systemPackages =
348352
[ cfg.package ]
349-
++ lib.optional cfg.memoryEfs.enable pkgs.nfs-utils
350-
++ lib.optional cfg.memoryEfs.enable pkgs.stunnel
351-
++ [ pkgs.util-linux ];
353+
++ toolchain.packages;
352354

353355
environment.etc."clawd/clawdbot.json".source = configSource;
354356
environment.etc."clawdinator/bin/memory-read" = {
@@ -363,6 +365,33 @@ in
363365
source = ../../scripts/memory-edit.sh;
364366
mode = "0755";
365367
};
368+
environment.etc."clawdinator/tools.md" = {
369+
mode = "0644";
370+
text = ''
371+
## Installed Toolchain (Nix)
372+
373+
${toolchainMd}
374+
375+
## Local scripts (installed by Nix)
376+
- **memory-read** — shared-lock read from `/memory`.
377+
- **memory-write** — exclusive-lock write to `/memory`.
378+
- **memory-edit** — exclusive-lock in-place edit for `/memory`.
379+
380+
## nix-steipete-tools (repo seeded, binaries not installed on Linux yet)
381+
Darwin-only upstream; the repo is seeded at `/var/lib/clawd/repos/nix-steipete-tools`.
382+
Tools expected once Linux packages exist:
383+
- summarize
384+
- gogcli
385+
- camsnap
386+
- sonoscli
387+
- bird
388+
- peekaboo
389+
- poltergeist
390+
- sag
391+
- imsg
392+
- oracle
393+
'';
394+
};
366395
environment.etc."stunnel/efs.conf" = lib.mkIf cfg.memoryEfs.enable {
367396
mode = "0644";
368397
text = ''

nix/tools/clawdinator-tools.nix

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{ pkgs }:
2+
{
3+
packages = [
4+
pkgs.git
5+
pkgs.curl
6+
pkgs.jq
7+
pkgs.python3
8+
pkgs.ffmpeg
9+
pkgs.ripgrep
10+
pkgs.nodejs_22
11+
pkgs.pnpm_10
12+
pkgs.util-linux
13+
pkgs.nfs-utils
14+
pkgs.stunnel
15+
];
16+
17+
docs = [
18+
{ name = "clawdbot-gateway"; description = "CLAWDINATOR runtime (Clawdbot gateway)."; }
19+
{ name = "git"; description = "Repo sync + ops."; }
20+
{ name = "curl"; description = "HTTP requests."; }
21+
{ name = "jq"; description = "JSON processing."; }
22+
{ name = "python3"; description = "Clawdbot dev chain dependency."; }
23+
{ name = "ffmpeg"; description = "Media processing."; }
24+
{ name = "ripgrep"; description = "Fast file search."; }
25+
{ name = "nodejs_22"; description = "Clawdbot dev chain runtime."; }
26+
{ name = "pnpm_10"; description = "Clawdbot dev chain package manager."; }
27+
{ name = "util-linux"; description = "Provides flock used by memory wrappers."; }
28+
{ name = "nfs-utils"; description = "NFS client utilities for EFS."; }
29+
{ name = "stunnel"; description = "TLS tunnel for EFS in transit."; }
30+
];
31+
}

scripts/seed-workspace.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ shopt -s nullglob
1515
for file in "$src"/*.md; do
1616
name="$(basename "$file")"
1717
install -m 0644 "$file" "$dst/$name"
18+
1819
done
1920

21+
if [ -f "/etc/clawdinator/tools.md" ]; then
22+
printf '\n%s\n' "$(cat /etc/clawdinator/tools.md)" >> "$dst/TOOLS.md"
23+
fi
24+
2025
rm -f "$dst/BOOTSTRAP.md"

0 commit comments

Comments
 (0)