Skip to content

Commit cf51086

Browse files
committed
tootootootoolinglinglingling
1 parent 08ff35a commit cf51086

10 files changed

Lines changed: 313 additions & 0 deletions

File tree

orders/codex/order.ncl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
let { Order, .. } = import "../order.contract.ncl" in
2+
{
3+
blend = {
4+
files = [
5+
{
6+
from_file = "skills/local-tooling",
7+
symlink = true
8+
},
9+
],
10+
11+
prefix = ["~/.codex"],
12+
},
13+
} | Order
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: local-tooling
3+
description: Use when Codex needs to choose, inspect, or troubleshoot this user's local shell behavior, Vanilla dotfiles and Blend-managed config, filesystem search tools, language runtimes, package managers, PATH/toolchain issues, or platform CLIs on their macOS arm64 and Arch Linux x86_64 machines. Trigger for questions or tasks involving elvish, nushell, zsh/bash/sh availability, Vanilla dotfiles, blend view, proto, rust/cargo paths, Homebrew/pacman language tools, gh, glab, twg, pup, sentry, ripgrep, fd, or machine-specific command selection.
4+
---
5+
6+
# Local Tooling
7+
8+
Use this skill to pick commands that fit the user's machines instead of assuming a generic Unix setup. Prefer durable conventions from the user's dotfiles, then verify current state before running version-sensitive commands.
9+
10+
## Quick Start
11+
12+
1. Treat `~/Vanilla` as the primary dotfiles checkout. It is normally present at that path across OSes.
13+
2. Treat Vanilla configs as Blend-managed. Use `blend view` from `~/Vanilla` for read-only dotfile inspection, and do not run other Blend commands unless the user explicitly asks.
14+
3. For environment/PATH questions, inspect `~/.local/bin/van/shellenv` and `~/.local/bin/van/shellenv.nu` first. `~/.local/bin/van` points through `~/Vanilla/bin`, which is a repo-level symlink to the physical Blend-managed script Source at `~/Vanilla/orders/bin/bin`.
15+
4. Prefer nushell for new scripts when reasonable. Prefer elvish only for interactive-shell context or existing elvish scripts.
16+
5. Prefer `rg` and `fd` for filesystem discovery when installed.
17+
6. Prefer proto-managed language toolchains when possible. Avoid Homebrew/pacman language runtimes for version-sensitive work.
18+
7. Prefer platform CLIs such as `gh`, `glab`, `twg`, `pup`, and `sentry` when installed and configured, but verify auth/config with a small read before relying on them.
19+
20+
## References
21+
22+
- Read `references/shell.md` for shell choice, dotfiles layout, and environment setup.
23+
- Read `references/dotfiles.md` for Vanilla/Blend dotfile inspection and safety rules.
24+
- Read `references/filesystem.md` for file and text search preferences.
25+
- Read `references/toolchains.md` for proto, Rust, package managers, PATH, and language-runtime decisions.
26+
- Read `references/platform-clis.md` for GitHub, GitLab, Atlassian, Datadog, and Sentry CLI handling.
27+
28+
## Validation
29+
30+
When current machine state matters, run `scripts/inspect-local-tooling.nu` if `nu` is available. Use its output as a snapshot, not as permanent truth.
31+
32+
If the active PATH appears to contradict this skill, do not silently build a one-off workaround. Mention the mismatch, use `~/.local/bin/van/shellenv` as the expected environment source, and ask the user if the mismatch should be fixed in dotfiles.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Local Tooling"
3+
short_description: "Machine shell and toolchain conventions"
4+
default_prompt: "Use $local-tooling to inspect this machine’s shell, CLI, and language toolchain conventions before choosing commands."
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Vanilla Dotfiles And Blend
2+
3+
## Source Of Truth
4+
5+
- The user's dotfiles repo is `~/Vanilla`, hosted as `frantic1048/Vanilla`.
6+
- The repo is managed by the user's own tool `blend`, implemented in `~/Vanilla/blend`.
7+
- Most config packages live under `~/Vanilla/orders/<order-name>/`.
8+
- User scripts are physically sourced from `~/Vanilla/orders/bin/bin`; `~/Vanilla/bin` is a repo-level symlink kept as the stable entrypoint and contains `bin/blend` as a symlink to the built Blend binary.
9+
- Each order's deployment shape is described by its `order.ncl`.
10+
- Read `~/Vanilla/blend/README.md`, `~/Vanilla/NEW_BLEND.md`, and `~/Vanilla/blend/src/` when deeper Blend behavior matters.
11+
12+
## Rendered Versus Symlinked Config
13+
14+
Blend supports both render/copy-to-target and symlink-to-target modes.
15+
16+
- Most orders use render/copy-to-target mode.
17+
- Rendered target files can drift from the source files in `~/Vanilla`.
18+
- Symlinked entries can be identified in `order.ncl` with `symlink = true` or by `blend view` output showing a symlink relationship.
19+
- Do not assume source files and live system config are identical. Verify the order and target relationship first.
20+
21+
## Inspecting Orders
22+
23+
Prefer read-only inspection:
24+
25+
```sh
26+
cd ~/Vanilla
27+
blend view
28+
blend view nushell
29+
```
30+
31+
- Run `blend view` with `PWD=~/Vanilla` when possible. Outside the repo, Blend may use its state directory from the last successful run to locate orders, which is useful but less explicit.
32+
- `blend view` without an order name lists all discovered orders and their source-to-target relationships.
33+
- `blend view <order-name>` focuses one order.
34+
- The output shows target paths, symlink status, no-change status, and source/target diffs.
35+
- In Codex sandboxed sessions, `blend view` may print a sandbox initialization warning and still exit successfully with useful output. Treat this as a warning, not a failure, when the command exit code is zero.
36+
37+
## Safety Boundary
38+
39+
Use only `blend view` for routine Codex inspection.
40+
41+
Do not run other Blend commands unless the user explicitly asks, because other commands may write to target config, update state, create snapshots, sync, or otherwise mutate the system.
42+
43+
## Reading `order.ncl`
44+
45+
When `blend view` is unavailable or more detail is needed, read `~/Vanilla/orders/<order-name>/order.ncl`.
46+
47+
Useful fields:
48+
49+
- `prefix`: target directory prefix, often OS-specific.
50+
- `files`: deployed files or directories.
51+
- `from_file`: source file or directory inside the order.
52+
- `from_config`: inline structured config rendered to a target file.
53+
- `name`: target filename override.
54+
- `when`: OS, architecture, hostname, or similar condition.
55+
- `symlink`: whether the target should be a symlink instead of rendered/copied content.
56+
- `exclude`: files skipped when deploying a source directory.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Filesystem Search
2+
3+
## Preferred Tools
4+
5+
- Use `rg` for text search.
6+
- Use `rg --files` for fast file listing when the task is repo/file discovery.
7+
- Use `fd` for filesystem finding when name, extension, depth, or type filters make it clearer than `rg --files`.
8+
9+
## Fallbacks
10+
11+
- If `rg` or `fd` are not installed on the current machine, fall back to standard tools already available in the task environment.
12+
- Avoid adding dependencies just to search files.
13+
14+
## Command Style
15+
16+
- Keep discovery commands narrow and readable.
17+
- When searching dotfiles, start in `~/Vanilla` and the relevant `orders/` subdirectory if the topic is known.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Platform CLIs
2+
3+
## Preference
4+
5+
Prefer platform CLIs when installed and configured, because they usually give more accurate live state than manual web or filesystem inference.
6+
7+
Common CLIs:
8+
9+
- `gh` for GitHub
10+
- `glab` for GitLab
11+
- `twg` for Atlassian/Jira/Confluence/internal work graph tasks
12+
- `pup` for Datadog
13+
- `sentry` for Sentry
14+
15+
## Verification
16+
17+
These CLIs may not always be installed or authenticated on every machine. Before promising live operations, run a small non-mutating check:
18+
19+
- `command -v <tool>`
20+
- a read-only auth/status command when available
21+
- a small read against the relevant host/project when auth status is known to be unreliable
22+
23+
## Failure Handling
24+
25+
If a platform CLI exists but is unauthenticated or configured for the wrong host, report that directly and avoid inferring live state from stale local context.
26+
27+
For GitLab in particular, auth status and API behavior can diverge in some shells. Prefer proving a small authenticated read before planning a larger metadata refresh.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Shell And Environment
2+
3+
## Dotfiles Source
4+
5+
- The user's main dotfiles repo is `frantic1048/Vanilla`.
6+
- The local checkout is normally `~/Vanilla` on every OS.
7+
- Current migrated config lives under `~/Vanilla/orders/`.
8+
- `~/.local/bin/van` is expected to resolve through `~/Vanilla/bin`.
9+
- `~/Vanilla/bin` is a repo-level symlink to `~/Vanilla/orders/bin/bin`, the physical Blend-managed script Source directory.
10+
11+
## Shell Choice
12+
13+
- Elvish is the user's main interactive shell.
14+
- Existing elvish scripts may still exist, especially in `~/Vanilla/orders/bin/bin` and elvish config. `~/Vanilla/bin` should remain usable as the stable symlinked entrypoint.
15+
- Avoid writing new elvish scripts unless the task is specifically about elvish integration.
16+
- Prefer nushell for new local automation scripts because it has rich built-ins and useful static checking, which makes agent-authored scripts easier to debug.
17+
- Bash, sh, and zsh availability varies across the user's macOS arm64 and Arch Linux x86_64 machines. Use them for short POSIX-compatible commands, repo-native scripts, or when a tool explicitly requires them.
18+
19+
## Environment Source
20+
21+
- Treat `~/.local/bin/van/shellenv.nu` as the environment brain.
22+
- `~/.local/bin/van/shellenv` is a bash bootstrap wrapper that finds `nu`, then delegates to `shellenv.nu`.
23+
- Nushell config uses `use ~/.local/bin/van/shellenv.nu; shellenv apply`.
24+
- Elvish config evaluates `~/.local/bin/van/shellenv elvish`.
25+
- POSIX shells can use `~/.local/bin/van/shellenv posix`.
26+
27+
## PATH Expectations
28+
29+
The shellenv helper is expected to put user-managed paths before package-manager paths. Important early entries include:
30+
31+
- `~/.cargo/bin`
32+
- `~/.local/share/pnpm`
33+
- `~/.proto/shims`
34+
- `~/.proto/bin`
35+
- `~/.proto/tools/node/globals/bin`
36+
- `~/.local/bin/van`
37+
- `~/.local/bin`
38+
39+
On macOS, Homebrew paths such as `/opt/homebrew/bin` or `/usr/local/bin` are still appended for general CLI availability, but avoid relying on Homebrew language runtimes for version-sensitive work.
40+
41+
## Drift Handling
42+
43+
If `command -v` shows an unexpected package-manager runtime before the user-managed path, first check whether the command ran inside the expected shellenv. Prefer fixing `shellenv` or asking the user to fix it over repeating local PATH workarounds in every task.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Language Toolchains
2+
3+
## Proto
4+
5+
- Prefer proto-managed language tools when possible.
6+
- The user syncs proto configuration from `~/Vanilla/orders/proto/.proto/.prototools` to `~/.proto/.prototools`.
7+
- Read `~/.proto/.prototools` for the current global proto-managed versions.
8+
- Run `proto status` or targeted version commands when current runtime versions matter.
9+
- `~/.proto/shims`, `~/.proto/bin`, and `~/.proto/tools/node/globals/bin` should normally be on PATH through `shellenv`.
10+
11+
## Current Verified Proto File Shape
12+
13+
As of the first creation of this skill, `~/.proto/.prototools` and `~/Vanilla/orders/proto/.proto/.prototools` matched and included:
14+
15+
- `bun`
16+
- `deno`
17+
- `go`
18+
- `proto`
19+
- `python`
20+
- `rust`
21+
- `uv`
22+
- `npm`
23+
- `node`
24+
- `pnpm`
25+
- `yarn`
26+
27+
Do not treat these versions as permanent. Re-read the file before making version-specific claims.
28+
29+
## Rust
30+
31+
- Rust is special: executables normally live in `~/.cargo/bin`, not only under `~/.proto/shims`.
32+
- `shellenv` should already put `~/.cargo/bin` early in PATH.
33+
- If `command -v cargo` or `command -v rustc` points to Homebrew/pacman unexpectedly, check whether shellenv has been applied before working around it.
34+
35+
## Package-Manager Runtimes
36+
37+
- Avoid Homebrew/pacman-sourced language tools for version-sensitive work. They are harder to manage consistently and can have side effects with other package-manager packages.
38+
- Package-manager CLIs are fine for platform utilities and OS packages, but prefer proto or repo-local pins for language runtimes and package managers.
39+
- If PATH or runtime selection looks weird, tell the user. The user prefers fixing the shared environment source over accumulating Codex-specific workarounds.
40+
41+
## Repository-Specific Pins
42+
43+
Always respect repo-local version files and package-manager metadata over global defaults. Common examples include:
44+
45+
- `.node-version`
46+
- `.python-version`
47+
- `.dvmrc`
48+
- `.prototools`
49+
- `packageManager` in `package.json`
50+
- Rust toolchain files
51+
52+
Use native tool-specific version files when present. Use `.prototools` as the fallback for tools without a native version file.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env nu
2+
3+
let tools = [
4+
rg
5+
fd
6+
blend
7+
proto
8+
cargo
9+
rustc
10+
node
11+
npm
12+
pnpm
13+
deno
14+
bun
15+
uv
16+
python
17+
gh
18+
glab
19+
twg
20+
pup
21+
sentry
22+
nu
23+
elvish
24+
bash
25+
zsh
26+
sh
27+
]
28+
29+
let tool_rows = ($tools | each {|tool|
30+
let resolved = (which $tool | first | default null)
31+
{
32+
tool: $tool
33+
path: (if $resolved == null { null } else { $resolved.path })
34+
}
35+
})
36+
37+
let proto_file = ($nu.home-dir | path join ".proto" ".prototools")
38+
let vanilla_proto_file = ($nu.home-dir | path join "Vanilla" "orders" "proto" ".proto" ".prototools")
39+
let shellenv = ($nu.home-dir | path join ".local" "bin" "van" "shellenv")
40+
let shellenv_nu = ($nu.home-dir | path join ".local" "bin" "van" "shellenv.nu")
41+
let vanilla_bin = ($nu.home-dir | path join "Vanilla" "bin")
42+
let vanilla_bin_source = ($nu.home-dir | path join "Vanilla" "orders" "bin" "bin")
43+
44+
{
45+
os: $nu.os-info
46+
vanilla: {
47+
path: ($nu.home-dir | path join "Vanilla")
48+
exists: (($nu.home-dir | path join "Vanilla") | path exists)
49+
bin_entrypoint: $vanilla_bin
50+
bin_entrypoint_exists: ($vanilla_bin | path exists)
51+
bin_source: $vanilla_bin_source
52+
bin_source_exists: ($vanilla_bin_source | path exists)
53+
}
54+
shellenv: {
55+
wrapper: $shellenv
56+
wrapper_exists: ($shellenv | path exists)
57+
nushell_module: $shellenv_nu
58+
nushell_module_exists: ($shellenv_nu | path exists)
59+
}
60+
proto: {
61+
home_file: $proto_file
62+
home_file_exists: ($proto_file | path exists)
63+
vanilla_file: $vanilla_proto_file
64+
vanilla_file_exists: ($vanilla_proto_file | path exists)
65+
}
66+
tools: $tool_rows
67+
}

orders/git/git/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
[rebase]
3434
autoSquash = true
3535
instructionFormat = "%aN\t%s"
36+
[branch]
37+
autoSetupMerge = simple
3638
[http]
3739
postBuffer = 1048576000
3840

0 commit comments

Comments
 (0)