Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# AGENTS.md — dotfiles

This file provides codebase context for AI coding agents (Codex, Copilot, etc.).
See `CLAUDE.md` for the full reference — everything below is a summary.

## Repository purpose

Personal dotfiles for Ubuntu/Debian: one-command install (`install.sh`), managed
updates (`update.sh`), post-install test suite (`test.sh`), and CI matrix covering
3 Ubuntu versions × 3 install profiles + 2 no-sudo variants.

## Key files

| File | Role |
|------|------|
| `install.sh` | Entry point — profile selection, module orchestration |
| `update.sh` | Tool updates with `--check` mode and PATH shadow detection |
| `test.sh` | Post-install validation (run after every install and update) |
| `lib/utils.sh` | Shared helpers: logging, sudo detection, GitHub release fetching |
| `modules/` | Per-concern installers: base, zsh, tmux, neovim, tools |
| `nvim/.config/nvim/init.lua` | Single-file Neovim config (lazy.nvim) |

## Critical rules (never violate)

- All scripts use `set -euo pipefail`. Use `count=$(( count + 1 ))` — never `(( count++ ))`.
- Every function variable must be declared `local` (or `local -a` for arrays).
- Never construct GitHub release asset URLs manually — use `_gh_release_info` or
`_gh_latest_release` from `lib/utils.sh`; asset names change between releases.
- Never use `command -v` at install time to probe binary locations — use direct
`[ -x /absolute/path ]` probes.
- Never commit generated protobuf files (`*_pb2.py`, `*.pb.go`, etc.).
- Logging: `log_step`, `log_info`, `log_ok`, `log_warn`, `log_error`, `die` — never bare `echo`.

## Neovim config

`nvim/.config/nvim/init.lua` registers mixed-case Ex command aliases at the bottom
of the file so accidental Shift-holding doesn't fail:

```
W → w Wq/WQ → wq Wqa/WQa/WQA → wqa Q → q Qa/QA → qa
```

Add new aliases to the `pairs({…})` table — one line, no boilerplate.

## Version bump rules

- `fix:` commits → patch (`X.Y.Z+1`)
- `feat:` commits → minor (`X.Y+1.0`)
- `BREAKING CHANGE` → major (`X+1.0.0`)

Edit `VERSION`, update `CHANGELOG.md`, commit as `chore: release vX.Y.Z`, tag
`vX.Y.Z` on the merge commit on `master`.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.5.0] - 2026-05-05

### Added
- `nvim/init.lua`: `Wqa`, `WQa`, `WQA` command aliases mapping to `wqa`
(write-quit-all), completing the mixed-case alias set alongside the existing
`Wq`/`WQ` aliases. Resolves #21.
- `AGENTS.md`: new agent-facing codebase guide summarising the key rules, file
layout, and Neovim command alias table for Codex / Copilot / other AI agents.

### Changed
- `CLAUDE.md`: added "Neovim config" section documenting the full Ex command alias
table (`W`, `Wq`/`WQ`, `Wqa`/`WQa`/`WQA`, `Q`, `Qa`/`QA`) and how to extend it.

## [1.4.1] - 2026-05-03

### Fixed
Expand Down
20 changes: 20 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,26 @@ warns and bails rather than creating a link inside it.

---

## Neovim config

`nvim/.config/nvim/init.lua` is a single-file config using lazy.nvim.

**Command aliases** — the bottom of `init.lua` registers mixed-case variants of
common Ex commands so accidental Shift-holding doesn't fail:

| Typed | Runs |
|-------|------|
| `W` | `w` |
| `Wq`, `WQ` | `wq` |
| `Wqa`, `WQa`, `WQA` | `wqa` |
| `Q` | `q` |
| `Qa`, `QA` | `qa` |

Add new aliases to the `pairs({…})` table at the bottom of `init.lua` — one line,
no per-command boilerplate.

---

## fzf integration

fzf is installed via **git clone** to `~/.fzf/` (not apt, not a binary release).
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.1
1.5.0
3 changes: 2 additions & 1 deletion nvim/.config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ map('n', '<leader>L', '<cmd>Lazy<CR>', { desc = 'Lazy UI' })
-- ══════════════════════════════════════════════════════════════════════════════
-- Commands
-- ══════════════════════════════════════════════════════════════════════════════
for lhs, rhs in pairs({ W = 'w', WQ = 'wq', Wq = 'wq', Q = 'q', Qa = 'qa', QA = 'qa' }) do
for lhs, rhs in pairs({ W = 'w', WQ = 'wq', Wq = 'wq', Q = 'q', Qa = 'qa', QA = 'qa',
Wqa = 'wqa', WQa = 'wqa', WQA = 'wqa' }) do
vim.api.nvim_create_user_command(lhs, rhs, {})
end
Loading