diff --git a/.gitignore b/.gitignore index 1bccd22..ca1a0a1 100644 --- a/.gitignore +++ b/.gitignore @@ -288,3 +288,8 @@ poetry.toml pyrightconfig.json # End of https://www.toptal.com/developers/gitignore/api/python + +# ──────────────── Added by agents-init ────────────────── +# agents-init --agents +AGENTS/ +# ──────────────────────────────────────────────────────── diff --git a/conf.d/abbr.fish b/conf.d/abbr.fish index be6c762..efc43cf 100644 --- a/conf.d/abbr.fish +++ b/conf.d/abbr.fish @@ -72,8 +72,8 @@ abbr -a g git abbr -a gitig gi abbr -a git-ignore gi # Antigravity -abbr -a ag antigravity -abbr -a ag. antigravity . +abbr -a ag agy +abbr -a ag. agy . # Quit abbr -a /exit exit # Window-management abbreviations are opinionated (C4 integrations) diff --git a/docs/fish-config.index b/docs/fish-config.index index 8989ab6..de17cd9 100644 --- a/docs/fish-config.index +++ b/docs/fish-config.index @@ -11,6 +11,10 @@ synopsis=# SYNOPSIS description=# DESCRIPTION toc=# TABLE OF CONTENTS contents=# TABLE OF CONTENTS +autopair=# DESCRIPTION +puffer=# DESCRIPTION +puffer-fish=# DESCRIPTION +logging-events=# DESCRIPTION # ── Section 1: Configuration Variables ─────────────────────── variables=# 1. CONFIGURATION VARIABLES diff --git a/docs/fish-config.md b/docs/fish-config.md index 00a06ee..c936b00 100644 --- a/docs/fish-config.md +++ b/docs/fish-config.md @@ -43,15 +43,18 @@ The configuration is split across: config.fish Main entry point; sets env vars and PATH conf.d/ abbr.fish All abbreviations - cheat.fish cheat.sh completions + autopair.fish Auto-pair brackets and quotes (bundled from jorgebucaran/autopair.fish) + cheat.fish cheat.sh tab completions done.fish Desktop notifications for long commands first_run.fish One-time init: Fisher bootstrap, theme, welcome key_bindings.fish Custom key bindings and Vi mode + logging-events.fish C5 --on-variable event handlers; syncs logging state at startup paru-wrapper.fish Auto-generates ~/.local/bin/paru logging wrapper + puffer.fish !! / !$ / ./ expansion (bundled from nickeb96/puffer-fish) + sponge_privacy.fish Sponge privacy patterns; filters credentials from history starship.fish fish_prompt with OSC 133 shell-integration markers tailscale.fish Tailscale CLI tab completions theme.fish Catppuccin syntax highlight colors - sponge_privacy.fish Sponge privacy patterns; filters credentials from history tricks.fish PATH, bang-bang helpers, bat man pages, aliases wakatime.fish WakaTime shell hook yay-wrapper.fish Auto-generates ~/.local/bin/yay logging wrapper @@ -413,8 +416,8 @@ Appending n to any :cd* abbreviation also runs nvim after changing dir. ## 4.8 AI Assistants - ag antigravity - ag. antigravity . + ag agy + ag. agy . v antigravity-ide s wezterm ssh (WezTerm only) @@ -1085,13 +1088,18 @@ Add -i (interactive confirmation) to destructive commands: ## 5.12 AI and Developer Tools -### antigravity +### agy - Synopsis: antigravity [args...] - Runs the agy CLI (Antigravity AI assistant) with noisy deprecation - warnings filtered from stderr. + Synopsis: agy [args...] + Wrapper for the agy Antigravity AI CLI. Before launching, delegates to + agents-init --agents to ensure AGENTS/ is scaffolded and CLAUDE.md is + symlinked to AGENTS/AGENTS.md in the current project, then forwards all + arguments verbatim to the real agy binary. Command shadow (C1): when + __fish_config_op_aliases (or the master) is disabled, the call is + passed through to the real agy binary unchanged. - antigravity chat + agy chat + agy resume ### antigravity-ide @@ -1105,15 +1113,33 @@ Add -i (interactive confirmation) to destructive commands: file in the current directory, or opens an interactive fzf picker if no session file is found. +### agents-init + + Synopsis: agents-init [--agents | --plugins] + Scaffold an AGENTS/ sub-repository for tracking agent specs and plugin + directories. Creates AGENTS/ as a standalone git repo, initializes + standard plugin subdirectories (superpowers/, plans/, specs/), moves any + existing AGENTS.md and docs/plugin dirs into the sub-repo, and replaces + them with relative symlinks. Also adds CLAUDE.md -> AGENTS/AGENTS.md so + Claude Code picks up the shared agent instructions. Adds all managed + paths to .gitignore and auto-commits every change inside the AGENTS/ + sub-repo. Fully idempotent: a second run produces no output and no new + commits. Flags: --agents re-runs only the AGENTS.md / symlink step; + --plugins re-runs only the plugin-directory wiring step. Called + automatically by the claude and agy wrappers on every invocation. + + agents-init + agents-init --agents + agents-init --plugins + ### claude Synopsis: claude [args...] - Wrapper for the claude CLI. Before launching, checks the current - directory and the git project root for CLAUDE.md; when it is absent but - AGENTS.md is present, creates a relative symlink CLAUDE.md -> AGENTS.md - so Claude Code picks up shared agent instructions without duplicating - the file. All arguments are forwarded verbatim. Command shadow (C1): - when __fish_config_op_aliases (or the master) is disabled, the call is + Wrapper for the claude CLI. Before launching, delegates to agents-init + --agents to ensure AGENTS/ is scaffolded and CLAUDE.md is symlinked to + AGENTS/AGENTS.md in the current project, then forwards all arguments + verbatim to the real claude binary. Command shadow (C1): when + __fish_config_op_aliases (or the master) is disabled, the call is passed through to the real claude binary unchanged. claude diff --git a/functions/_agents_init_ensure_gitignore.fish b/functions/_agents_init_ensure_gitignore.fish new file mode 100644 index 0000000..f4f411a --- /dev/null +++ b/functions/_agents_init_ensure_gitignore.fish @@ -0,0 +1,82 @@ +# Copyright (C) 2026 Rootiest +# SPDX-License-Identifier: AGPL-3.0-or-later + +# SYNOPSIS +# _agents_init_ensure_gitignore