.dotfiles

AGENTS.md

Project Overview

This is a macOS dotfiles repository that provides automated development environment setup with a focus on:

Setup Commands

# Full automated setup
./bootstrap.sh

# Alternative entry point
make run

# Check installation status
brew list | grep -E "(uv|poetry|kubectl)"

# Validate configuration
stow -n -v -d config -t "$HOME" zsh starship git opencode zed && echo "βœ… All configs valid"

# Run local checks
make check

# Update environment
source ~/.config/zsh/.zshrc && direnv reload

Architecture

.dotfiles/
β”œβ”€β”€ πŸš€ bootstrap.sh              # Main installation orchestrator
β”œβ”€β”€ πŸ“¦ Brewfile                  # ALL packages (read this first)
β”œβ”€β”€ βš™οΈ config/                   # Symlinked to $HOME via GNU Stow
β”‚   β”œβ”€β”€ πŸ€– agent_skills/         # Custom AI capabilities (submodule)
β”‚   β”œβ”€β”€ πŸ€– opencode/            # OpenCode AI assistant config
β”‚   β”œβ”€β”€ 🐚 zsh/                 # Shell configuration
β”‚   └── ⭐ starship/            # Shell prompt themes
β”œβ”€β”€ πŸ”¨ install/                 # Installation scripts (ORDERED)
β”‚   β”œβ”€β”€ brew.sh β†’ shell.sh β†’ git.sh β†’ dotfiles.sh β†’ python.sh β†’ ai.sh
└── πŸ“š lib/                     # Utility functions
    β”œβ”€β”€ logs.sh                 # log_info, log_error, log_success
    └── variables.sh            # Environment variables

Development Workflow

Before Making Changes

# ALWAYS validate first
stow -n -v -d config -t "$HOME" zsh starship git opencode zed 2>&1 | grep -i conflict

# Use existing logging
source lib/logs.sh
log_info "Starting task"

Adding New Tools

  1. Add to Brewfile
  2. Create config in config/<tool>/
  3. Add symlink in install/dotfiles.sh
  4. Test with stow -n -v <tool>

Python Environment Setup

# Check available versions
uv python list

# Create project environment
echo "3.14" > .python-version
direnv allow

# Validate
python --version && echo "βœ… Ready"

Code Style & Conventions

Configuration Management

Python Standards

Shell Configuration

Security Rules

NEVER Commit These Files

*.local
.envrc.local
.env
.env.*
*.pem
*.key
*_rsa
.aws/credentials

Secrets Management

Testing & Validation

Health Check Commands

# Core tools validation
command -v brew && echo "βœ… Homebrew"
command -v uv && echo "βœ… uv"
command -v stow && echo "βœ… GNU Stow"

# Configuration validation
[ -f ~/.config/zsh/.zshrc ] && echo "βœ… zsh configured"
[ -f ~/.gitconfig ] && echo "βœ… git configured"

# Agent skills
npx skills list && echo "βœ… Skills available"
ls -la config/agent_skills/ && echo "βœ… Custom skills"

# Security checks
make security

Debugging Common Issues

# Stow conflicts
stow -R -v -d config -t "$HOME" zsh starship git opencode zed

# Homebrew issues
brew doctor && brew update && brew upgrade

# Python environment problems
direnv reload && uv python list

Agent Skills System

Official Skills (npm/npx)

npx skills add python-helper
npx skills list
npx skills update

Custom Skills (config/agent_skills/)

Specialized skills for:

Usage:

npx skills use python-security-scanner scan .
npx skills use code-review-assistant review src/

Maintenance Commands

# Weekly updates
brew update && brew upgrade
uv self update
npx skills update
stow -R -v -d config -t "$HOME" zsh starship git opencode zed

# Cleanup
brew cleanup
uv cache clean

Emergency Recovery

Complete Reset (Nuclear Option)

cd ~/.dotfiles
stow -D -v -d config -t "$HOME" zsh starship git opencode zed
git checkout HEAD -- config/  # Reset configs
./bootstrap.sh             # Reinstall everything

Partial Fixes

# Fix only Stow issues
stow -R -v -d config -t "$HOME" zsh starship git opencode zed

# Fix only Python
uv self update && direnv reload

# Fix only Homebrew
brew doctor && brew update && brew upgrade

Important Notes

Key Tools Installed

Core Development

Modern CLI

AI Tools

File Structure Details

Path Purpose Agent Action
Brewfile All package definitions Read before adding tools
config/*/ Tool configurations Modify instead of ~/.* files
lib/logs.sh Logging functions Use for consistent output
install/*.sh Setup scripts Understand before modifying
.envrc.local Local secrets Create for API keys (gitignored)

Success Indicators

βœ… Installation Complete When:

βœ… Environment Ready When:


Last Updated: 2026-02-18 Format: AGENTS.md v2.0 Standard Compatible With: OpenCode, GitHub Copilot, Cursor, Zed, Claude Code, and other AI coding agents