Skip to content
Open
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
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
nvim/snapshot
nvim/plugin
nvim/nvim
nvim/lazy-lock.json

gemini/history
gemini/tmp
gemini/google_accounts.json
gemini/installation_id
gemini/oauth_creds.json
gemini/projects.json
gemini/state.json
gemini/trustedFolders.json
54 changes: 54 additions & 0 deletions GEMINI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Dotfiles Project Overview

This repository contains personal configuration files (dotfiles) for various tools, including Zsh, Neovim, Tmux, Git, and more. It is designed to be portable across macOS (Darwin) and Linux (Debian-based distributions).

## Core Technologies
- **Shell:** Zsh with [Oh My Zsh](https://ohmyz.sh/), [ys theme](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#ys), and several plugins (`gh`, `git`, `vi-mode`, `pyenv`, `nodenv`, `asdf`, `poetry`).
- **Editor:** Neovim configured using [LazyVim](https://www.lazyvim.org/) and [lazy.nvim](https://github.com/folke/lazy.nvim).
- **Terminal Multiplexer:** Tmux with platform-specific configurations (`tmux/Darwin.conf` and `tmux/Linux.conf`).
- **Tool Managers:** Supports `pyenv`, `nodenv`, `rbenv`, `goenv`, `tfenv`, and `rustup`.
- **Package Managers:** Homebrew (macOS) and `apt` (Linux).

## Directory Structure
- `bin/`: Custom scripts and binaries.
- `nvim/`: Neovim configuration (`init.lua`, `lua/config/`, `lua/plugins/`).
- `shlibs/`: Shell libraries for installation, logging, and environment detection.
- `tmux/`: Tmux configurations, including OS-specific overrides.
- `zsh/`: Zsh environment, aliases, functions, and SSH agent setup.
- `install.sh`: The main installation script for dependencies and configuration linking.

## Building and Running

### Installation
The primary entry point for setting up the environment is `install.sh`.

```bash
# General installation (deps + config)
./install.sh install

# Only install configurations (symlinking)
./install.sh config

# Fast installation (skips some prompts)
./install.sh fast-install

# Install only Neovim and its dependencies
./install.sh install-neovim
```

The `install.sh` script performs the following actions:
1. Installs system-level dependencies via Homebrew or `apt`.
2. Sets up tool version managers (`pyenv`, `nodenv`, etc.).
3. Installs Rust, Neovim, and various CLI tools (`ripgrep`, `fd`, `gh`).
4. Symlinks configuration files from the repository to the home directory (e.g., `~/.zshrc`, `~/.tmux.conf`, `~/.config/nvim`).

### Maintenance
- **Purge configurations:** `./install.sh purge` removes the symlinks created by the installer.
- **Update Neovim:** The installer includes a `compile_neovim` function for Linux environments to build from source.

## Development Conventions

- **Shell Scripting:** Shared logic is modularized in `shlibs/`. Use `shlibs/logging.sh` for output and `shlibs/os.sh` for platform detection.
- **Neovim Configuration:** Follows the `LazyVim` structure. Custom plugins should be added to `nvim/lua/plugins/`, and core configurations to `nvim/lua/config/`.
- **Environment Variables:** Managed in `zsh/env.zsh`. Paths and tool initializations should be added there to ensure they are available in the shell.
- **Aliases:** Custom aliases are located in `zsh/aliases.zsh`.
15 changes: 15 additions & 0 deletions gemini/GEMINI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

# Use Tools available
use mcp_context7_query-docs to query for api documentation
use mcp_github for relevant github tasks
use mcp_astgrep for abstract syntax tree dumps and efficient structured code search

# Making changes
- break down commits by units of work
- commits should be broken down into logical parts
- do not group unrelated changes into a single commit
- do not comment code.
- code should be self documenting.
- use clear naming, descriptive variables.
- code should prioritize readability
- code should be concise, but not obfuscated.
167 changes: 167 additions & 0 deletions gemini/policies/tools.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# Project-level tool permissions migrated from tools.allowed and tools.exclude
# Generated to comply with Gemini CLI 1.0 Policy Engine migration.

# Allowed shell commands (No-prompt)
[[rule]]
toolName = "run_shell_command"
commandPrefix = "git status"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "git diff"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "git log"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "git grep"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "git branch --show-current"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "git remote -v"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "gh pr status"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "gh show"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "gh pr checks"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "gh pr view"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "gh run view"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "diff"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "find"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "pwd"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "grep"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "cat"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "ls"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "poetry run flake8"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "poetry run pyright"
decision = "allow"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "cd"
decision = "allow"
priority = 100

# Other allowed tools
[[rule]]
toolName = "find_code"
decision = "allow"
priority = 100

[[rule]]
toolName = "list_directory"
decision = "allow"
priority = 100

[[rule]]
toolName = "read_file"
decision = "allow"
priority = 100

# Explicitly allowed git commands for specific repositories
# Uses argsPattern to match both the command and the dir_path (keys are sorted alphabetically)
[[rule]]
toolName = "run_shell_command"
argsPattern = '"command":"git (add|commit|push|pull|fetch|rebase|reset|stash|status|diff|log|grep).*","dir_path":"/.*/repos/jaybocc2/.*"'
decision = "allow"
priority = 120

[[rule]]
toolName = "run_shell_command"
commandPrefix = "git commit"
decision = "ask_user"
priority = 100

[[rule]]
toolName = "run_shell_command"
commandPrefix = "git add"
decision = "ask_user"
priority = 100

# Explicitly denied shell commands
[[rule]]
toolName = "run_shell_command"
commandPrefix = "git push"
decision = "deny"
priority = 100
deny_message = "Git push is restricted by project policy. Please use git commands directly if needed."
61 changes: 57 additions & 4 deletions gemini/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"selectedAuthType": "oauth-personal",
"preferredEditor": "neovim",
"policyPaths": [
"./gemini/policies"
],
"security": {
"auth": {
"selectedType": "oauth-personal"
}
},
"checkpointing": {
"enabled": true
},
Expand All @@ -20,17 +26,64 @@
]
},
"github": {
"description": "Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.",
"httpUrl": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "${GITHUB_PAT}"
"Authorization": "Bearer ${GITHUB_PAT}"
},
"timeout": 5000
},
"context7": {
"description": "Up-to-date code docs for any prompt",
"httpUrl": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "${CONTEXT7_API_KEY}"
}
}
},
"context": {
"fileName": [
"AGENTS.md",
"CONTEXT.md",
"GEMINI.md",
"CLAUDE.md",
".claude/CLAUDE.md"
]
},
"tools": {
"core": [
"list_directory",
"read_file",
"grep_search",
"glob",
"replace",
"write_file",
"web_fetch",
"run_shell_command",
"save_memory",
"google_web_search",
"ask_user",
"codebase_investigator",
"cli_help",
"activate_skill"
]
},
"general": {
"preferredEditor": "neovim",
"sessionRetention": {
"enabled": true,
"maxAge": "30d",
"warningAcknowledged": true
}
},
"experimental": {
"plan": true
},
"vimMode": true,
"fileFiltering": {
"respectGitIgnore": true
},
"model": {
"name": "auto-gemini-3"
}
}
}
61 changes: 61 additions & 0 deletions gemini/skills/address-pr-feedback/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: address-pr-comments
description: Address review comments on a GitHub pull request. Use when the user asks to "address PR comments", "respond to review feedback", "handle reviewer comments", or "resolve review threads".
disable-model-invocation: true
---

# Address PR Review Comments

## Context

- Current branch: !`git branch --show-current`
- get pull request review with git mcp: `pull_request_read`

## Your task

Work through every unresolved review thread on this PR systematically. For each thread:

### Step 1 — Understand the comment
Read the comment carefully. Identify:
- What file and line it refers to
- What the reviewer is asking for (change, question, clarification, nitpick)
- Whether a code change is actually required

### Step 2 — Make changes if needed
If a code change is warranted:
- Read the relevant file(s) first
- Make the change using Edit (or Write for new files)
- Do NOT commit yet — collect all changes first

If no change is needed (e.g. the reviewer asked a question, or you disagree), prepare a clear explanation.

### Step 3 — Commit each change separately
After addressing a comment that requires code changes, create a single follow-up commit. Write a short message that summarizes what was changed (e.g. `"fix: use const for immutable bindings per review"`) rather than a generic message:

Skip this step if no code changes were made.
Provide a commit message and wait until prompted to continue if not allowed by policy to commit.

### Step 4 — Reply to each comment
use github mcp

Good reply patterns:
- For changes made: "Done — <brief description of what changed>."
- For questions answered: "< direct answer to question >."
- For declined suggestions: "I kept the existing approach because <reason>."
- For issues already resolved in code: "I fixed this in <commit>"

### Step 5 — Resolve each thread
Resolve every thread/comment if satisfactory
use git mcp / gh cli and GraphQL id field:

```
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "<thread_id>"}) { thread { id isResolved } } }'
```
## Notes

- break down commits by units of work
- commits should be broken down into logical parts
- do not group unrelated changes into a single commit
- If the PR has no open review threads, report that there is nothing to address
- Always reply before resolving so the reviewer sees the response
- Keep replies concise and direct
Loading