Imported from Count-I/myWorkspace (
AGENTS.md). Install upstream withnpx skills add Count-I/myWorkspace. Copyright stays with the author.
AGENTS.md — Multi-Agent Coordination Rules
This file governs behavior when multiple AI agents (or successive agent runs) work on this repository. Single-agent Claude Code sessions should also follow these rules.
Pre-Task Checklist
Before any work on this repository, ALWAYS:
- Read CLAUDE.md first. It contains hard constraints that override all other guidance.
- Check git status:
git status - Check recent commits:
git log --oneline -10 - Verify you're in the right directory:
pwd→ should be~/Codes/myWorkspace/
If anything is uncommitted or in a confusing state, ask the user before proceeding.
Read-Only Operations (No Approval Needed)
These are safe — no risk of breaking the system or losing work:
- Reading any file in the repository
- Running
git status,git log,git diff - Running
git show <commit> - Checking system state:
pacman -Q,systemctl status,uname -r - Reading config files:
/etc/fstab,/etc/mkinitcpio.conf,/etc/systemd/journald.conf.d/ - Testing syntax:
hyprctl reload,zsh -i -c "exit", shell script syntax checks - Listing files:
find,ls,tree - Grepping for patterns:
grep,rg
Operations Requiring Explicit User Approval
These modify system state or critical files. Always ask first.
File/System Modifications
- Editing
/etc/mkinitcpio.conf→ rebuilds the entire kernel boot environment - Editing
/boot/loader/entries/→ changes boot behavior - Running
sudocommands that modify/etc/,/boot/, or system services - Creating/deleting snapper snapshots
- Modifying
/etc/docker/daemon.jsonor Docker system configs - Enabling/disabling any system-level services:
sudo systemctl enable/disable - Changing user shell:
chsh
Package Management
pacman -S(install packages) — even with--neededyay -S(AUR package install)pacman -R,pacman -Rns(remove packages)yay -R(AUR package removal)- Any upgrade command:
pacman -Syu(use~/.local/bin/update.shinstead)
Git Operations
git pushorgit push --force(affects remote)git reset --hard,git checkout -- .(destructive)git branch -D,git tag -d(deletion)git stash drop(loss of work)- Any rebase or force operation
Snapshot/Recovery Operations
snapper create,snapper delete(any snapshot management)snapper undochange(modifying snapshot contents)- Modifying
/etc/snapper/configs/ - Subvolume operations:
btrfs subvolume,btrfs qgroup
Strictly Forbidden (Never Without Explicit User Command)
These operations are prohibited outright unless the user explicitly asks for them. Do not attempt them even if they seem efficient.
- Deleting any snapper snapshot
- Modifying
/boot/loader/entries/windows.conf(Windows dual-boot entry — preserve as-is) - Touching
/.snapshots/directory - Changing BTRFS subvolume layout or mount points
- Enabling SDDM or any other login manager (TTY autologin is the default and only canonical flow)
- Re-introducing HyDE, oh-my-zsh, GRUB, swww, optimus-manager, or any blacklisted component (see CLAUDE.md)
- Running
pacman -Rnswithout explicit user instruction
Testing Requirements
Before committing changes, verify:
Shell Scripts
# Syntax check
bash -n install/00-pre.sh
bash -n install/01-btrfs-verify.sh
# ... all scripts in install/
# Verify set -euo pipefail is at the top
head -5 install/00-pre.sh | grep "set -euo pipefail"
Hyprland Configs
# Syntax check (if Hyprland is installed)
hyprctl reload
# Verify a specific option was applied
hyprctl -j getoption general:border_size
zsh Configs
# Test startup
zsh -i -c "exit"
# Test that plugins source correctly
zsh -i -c "echo \$HISTFILE"
Git Commits
# Verify commit format matches convention from CLAUDE.md
git log --oneline -1
# Verify no large binaries were added
git ls-files -z --cached | xargs -0 du -h | sort -rh | head -10
Commit Workflow
Before Committing
- Run
git status— no surprises? - Run
git diff— does the content match intent? - Verify the commit message format:
<type>(<scope>): <description> - If modifying install scripts, syntax-check them:
bash -n <script> - If modifying Hyprland, test:
hyprctl reload(if running Hyprland)
Commit Format
<type>(<scope>): <description>
Optional longer explanation if the change is non-obvious.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Types: feat, fix, refactor, docs, chore
Scopes: hypr, waybar, zsh, kitty, nvidia, btrfs, packages, scripts, chrome, theme, gaming, docs, arch
Examples:
feat(hypr): add SUPER+SHIFT+S workspace overview keybindfix(nvidia): add NVreg_PreserveVideoMemoryAllocations to modprobe.ddocs(btrfs): clarify subvolume mount order for fresh installchore(packages): add lib32-vulkan-tools for 32-bit gaming
After Committing
- Do NOT push to remote without user approval
- Do NOT amend the commit (create a new one if a fix is needed)
- Print the commit hash and let the user see it:
git log -1 --oneline
Stow Operations
When deploying configs via stow:
Correct command:
cd ~/Codes/myWorkspace
stow -t ~ configs/<package>
WRONG commands (do not use):
stow -d configs <package> # Wrong — stows INTO dotfiles dir
cd configs && stow <package> # Wrong — changes CWD, breaks -t ~
Conflict resolution (first-run):
# If target file exists in home
stow --adopt -t ~ configs/<package> # pulls existing files into repo
git checkout -- . # restores canonical content
Never delete user files first. Let stow handle it.
Handling Build/Installation Errors
If an install script fails during execution:
- Do not retry immediately. Understand the failure first.
- Check error messages. Are they permanent (missing dependency) or transient (network)?
- Inspect the script. Does
set -euo pipefailcatch the error? - Ask the user. What should happen next? Retry? Skip? Fix and re-run?
Never use --ignore-errors, || true, or set +e to suppress errors. If an error must be ignored, document WHY with a comment.
Handling Untracked Files
If git status shows untracked files in the working tree:
- Investigate:
git check-ignore -v <file>— is it in.gitignore? - If not in
.gitignoreand should be: add to.gitignoreand commit - If untracked and should not be: ask user before adding or ignoring
- Never blindly
git add .— review changes first
Emergency Procedures
System Won't Boot
- Boot into live USB (Arch ISO)
- Follow
recovery/chroot-guide.mdto chroot into the system - Diagnose from chroot:
systemctl status,journalctl -b -e - Do NOT attempt
pacman -S,snapper, or other commands without full understanding
Git Merge Conflicts
- Do NOT force-push or reset --hard
- Run
git statusto see conflicted files - Open each conflicted file and resolve manually
- Run
git add <resolved files>andgit commitwith a clear message
Snapper Corruption
- Do NOT delete snapshots automatically
- Check
snapper -c root listfor valid snapshots - Ask user before performing rollback
Multi-Agent Handoff
If work is being passed to another agent:
- Commit all progress. No uncommitted changes.
- Write a clear commit message explaining what was done and what's next.
- Leave a note in the task description for the next agent: what's complete, what's pending, any gotchas.
- Do NOT leave work-in-progress state. Either finish it or explicitly mark it incomplete.
Dealing With Disagreement
If you believe a rule in CLAUDE.md or AGENTS.md is wrong or outdated:
- Do NOT violate the rule to prove the point.
- Document your concern in a comment or commit message.
- Ask the user if the rule should be changed.
- Update the rule together if the user agrees.
Example: "CLAUDE.md forbids oh-my-zsh, but the user now wants it installed. I'll ask for explicit permission to override CLAUDE.md before making the change."
Summary: Ask vs. Act
| Scenario | Action |
|---|---|
| Reading a file | Act (safe) |
| Checking git status | Act (safe) |
| Editing install script | Ask (affects system) |
| Running pacman -S | Ask (package install) |
| Creating snapper snapshot | Ask (loss of space) |
| Git commit to local repo | Act (safe if on correct branch) |
| Git push to remote | Ask (affects others) |
| Editing CLAUDE.md or AGENTS.md | Ask (changes the rules) |
| Adding new stow package | Ask (affects home dir) |
| Deleting a file from the repo | Ask (loss of history) |
When in doubt: ask the user first.