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
58 changes: 0 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,33 +111,6 @@ The `s` command opens a fuzzy file finder (fzf) to search and open files in `$ED

Lot's of aliases - see `./scripts/aliases.sh`. Some small interactive shell helper functions in `./scripts/funcs.sh`.

## AI Agent Configuration

`PI_CODING_AGENT_DIR` in dotfiles/common/env.sh points pi's config to `~/dotfiles/config/pi/`.

`CLAUDE.md` at the repo root serves the same purpose for Claude Code.

<<<<<<< HEAD
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>setenv.XDG_CONFIG_HOME</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>launchctl setenv XDG_CONFIG_HOME $HOME/dotfiles</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

$ launchctl load ~/Library/LaunchAgents/setenv.XDG_CONFIG_HOME.plist
```

## AI Configuration

Two AGENTS.md:
Expand All @@ -150,34 +123,3 @@ PI_CODING_AGENT_DIR in dotfiles/common/env.sh points pi's config to ~/dotfiles/c
CLAUDE.md at the repo root serves the same purpose for Claude Code, but is symlinked to `AGENTS.md`.

Skills are defined once in agents/skills/ and symlinked by make dotfiles to both ~/.agents/skills (pi) and ~/.claude/skills (Claude Code).
||||||| 5f1ddca
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>setenv.XDG_CONFIG_HOME</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>launchctl setenv XDG_CONFIG_HOME $HOME/dotfiles</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

$ launchctl load ~/Library/LaunchAgents/setenv.XDG_CONFIG_HOME.plist
```

## Agent Configuration

PI_CODING_AGENT_DIR in dotfiles/common/env.sh points pi's config to ~/dotfiles/config/pi/, which contains agent/AGENTS.md (agent instructions), settings.json, themes, and sessions.

CLAUDE.md at the repo root serves the same purpose for Claude Code.

Skills are defined once in agents/skills/ and symlinked by make dotfiles to both ~/.agents/skills (pi) and ~/.claude/skills (Claude Code).
=======
Skills are defined once in `.agents/skills/` and symlinked by `make dotfiles` to both `~/.agents/skills` (for Pi) and `~/.claude/skills` (for Claude Code).
>>>>>>> dacbf2ff02af0435dad113fec6089182f393df64
3 changes: 3 additions & 0 deletions config/nvim/after/ftplugin/markdown.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
vim.opt_local.foldenable = true
vim.opt_local.foldlevel = 6

-- Shift+Enter: new bullet, indented one level deeper (requires kitty keyboard protocol)
vim.keymap.set("i", "<S-CR>", "<Plug>(bullets-newline)<Plug>(bullets-demote)", { buffer = true, remap = true })
16 changes: 4 additions & 12 deletions config/nvim/lua/config/keymap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ km("n", "<leader>rg", ":lua require'telescope.builtin'.live_grep(require('telesc
km("n", "<leader>rc", ":lua require'telescope.builtin'.grep_string(require('telescope.themes').get_ivy({}))<cr>", opts)
-- Search for current word
vim.keymap.set("n", "<leader>g", function()
require("telescope.builtin").grep_string(require("telescope.themes").get_ivy({ hidden = true }))
require("telescope.builtin").current_buffer_fuzzy_find(require("telescope.themes").get_ivy({
hidden = true,
default_text = vim.fn.expand("<cword>"),
}))
end, opts)
vim.keymap.set("n", "<leader>.", function()
require("telescope.builtin").grep_string(require("telescope.themes").get_ivy({ hidden = true }))
Expand All @@ -120,16 +123,5 @@ vim.keymap.set("n", "<leader>z", ":ZenMode<CR>")

-- Misc / Unused / Broken

-- Move blocks of text up and down
km("x", "J", ":move '>+1<CR>gv-gv", opts)
km("x", "K", ":move '<-2<CR>gv-gv", opts)

-- change nvim behaviour of replacing buffer after ciw
km("v", "p", '"_dP', opts)

-- from https://youtu.be/w7i4amO_zaE
-- move selected blocks up and down with J and K
km("v", "J", ":m '>+1<CR>gv=gv", opts)
km("v", "K", ":m '>-2<CR>gv=gv", opts)
-- keep cursor in place when using J
km("n", "J", "mzJ`z", opts)
8 changes: 8 additions & 0 deletions config/nvim/lua/config/option.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,11 @@ vim.opt.wildignore:append("*.egg-info/**")
-- Enable wildmenu for command-line completion
vim.opt.wildmenu = true
vim.opt.wildmode = "longest:full,full"

--- Folding Config
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
-- High foldlevel keeps everything open on load; without this, folds start closed
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
vim.opt.foldtext = ""
3 changes: 2 additions & 1 deletion config/nvim/lua/plugins/formatting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ return {
python = {
"isort",
"ruff_format",
"trim_whitespace",
},
-- markdown = { "injected" },
javascript = { "prettier" },
Expand All @@ -35,6 +34,8 @@ return {
},
sql = { "sqlfluff" },
["*"] = {
-- "codespell",
"trim_whitespace",
-- "codespell",
"trim_newlines",
},
Expand Down
2 changes: 1 addition & 1 deletion config/nvim/lua/plugins/markdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ return {
"preservim/vim-markdown",
ft = "markdown",
init = function()
vim.g.vim_markdown_folding = 1
vim.g.vim_markdown_folding_disabled = 1
vim.g.vim_markdown_folding_level = 6
vim.g.vim_markdown_frontmatter = 1
vim.g.vim_markdown_no_default_key_mappings = 1
Expand Down
24 changes: 14 additions & 10 deletions config/pi/AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< HEAD
You are an expert software engineer and data scientist, writing excellent code:

- Responses and code should be concise - favour a less verbose implementation where appropriate
Expand All @@ -9,7 +8,7 @@ You are an expert software engineer and data scientist, writing excellent code:
- Include docstrings for functions
- All Python code should pass strict type checking. Use `list` style rather than `typing.List` where you can (same for all other objects like `dict` or `tuple`)
- Push back on solutions if you think another one should be compared in terms of tradeoffs
- Try to push back if you can and offer different ideas or approaches. Try to explore a range of ideas, perspectives.
- Try to push back if you can and offer different ideas or approaches. Try to explore a range of ideas, perspectives.
- List tradeoffs explicitly if appropriate. List assumptions explicitly if appropriate. List what you are uncertain about.
- Always be consistent with patterns established in the code base
- Don't put `_df` suffixes onto dataframe variables - use `data` as the default name for a dataframe
Expand All @@ -22,11 +21,11 @@ Always create a plan and then ask to execute. You should very rarely go off and

## Searching & Reading

When reading, read deeply, in great detail. Note intricacies. Go through everything.
When reading, read deeply, in great detail. Note intricacies. Go through everything.

## Planning

Plans will go into `./ai/plan-something.md`.
Plans will go into `./ai/plan-something.md`. Always start a plan filename with `plan-`

Check for a plan before you start a planning task - if you find an existing plan, the read and edit it.

Expand All @@ -43,23 +42,22 @@ Plans should include a section on `## Steps` which lists in order the work neede
- Favour flat unnested code - try to minimize levels of indentation
- Fail at the source of the error rather than checking and failing
- Never start changing code unless you have explicit approval to start making changes
||||||| 5f1ddca
=======

## How to Respond

Responses should be concise.
Responses should be concise.

List tradeoffs explicitly if appropriate. List assumptions explicitly if appropriate. List what you are uncertain about.

Do not include summaries at the end of responses unless specifically asked.

Try to push back if you can and offer different ideas or approaches. Try to explore a range of ideas, perspectives.
Try to push back if you can and offer different ideas or approaches. Try to explore a range of ideas, perspectives.

Always create a plan and then ask to execute. You should rarely go off and implement without some back and forth conversation with me.

## Searching & Reading

Read deeply in great detail. Note intricacies. Go through everything.
Read deeply in great detail. Note intricacies. Go through everything.

Search the internet if you need it - I always want you to check documentation.

Expand Down Expand Up @@ -88,4 +86,10 @@ Only include comments when they explain something that is not obvious from the c
Always respect existing conventions in each file and across the code base when making changes.

Always ask for permissions before starting work. Never edit files until you have presented a plat to the user.
>>>>>>> dacbf2ff02af0435dad113fec6089182f393df64

## About Me

I like:

- Simple solutions
- Small edits that I can change
25 changes: 3 additions & 22 deletions config/pi/settings.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
{
<<<<<<< HEAD
"lastChangelogVersion": "0.69.0",
"defaultProvider": "databricks",
"defaultModel": "databricks-claude-sonnet-4-6",
||||||| 5f1ddca
"lastChangelogVersion": "0.66.1",
"defaultProvider": "openrouter",
"defaultModel": "moonshotai/kimi-k2.5",
=======
"lastChangelogVersion": "0.78.0",
"defaultProvider": "openrouter",
"defaultModel": "moonshotai/kimi-k2.5",
>>>>>>> dacbf2ff02af0435dad113fec6089182f393df64
"defaultModel": "~google/gemini-pro-latest",
"theme": "dracula",
"packages": [
"npm:@aliou/pi-guardrails",
Expand All @@ -21,13 +10,5 @@
"npm:pi-mono-status-line",
"npm:@guwidoe/pi-prompt-suggester"
],
"defaultThinkingLevel": "off",
<<<<<<< HEAD
"quietStartup": false
||||||| 5f1ddca
"defaultThinkingLevel": "medium",
"quietStartup": false
=======
"quietStartup": true
>>>>>>> dacbf2ff02af0435dad113fec6089182f393df64
}
"defaultThinkingLevel": "medium"
}
3 changes: 3 additions & 0 deletions dotfiles/.tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ run '~/.tmux/plugins/tpm/tpm'
# pi needs this...
set -g extended-keys on
set -g extended-keys-format csi-u
# make tmux request the kitty keyboard protocol from the outer terminal
# (required for nvim to distinguish <S-CR> from <CR>)
set -as terminal-features 'xterm*:extkeys'
6 changes: 4 additions & 2 deletions dotfiles/common/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ setopt HIST_SAVE_NO_DUPS # Don't save duplicates to file
setopt SHARE_HISTORY # Share history between all sessions
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks from commands
export AWS_LOG_LEVEL=3
source ~/dotfiles/macos/pyenv-flags

alias brew='arch -arm64 brew'

# custom ipython config
export IPYTHONDIR="$HOME/dotfiles/.ipython"
Expand All @@ -121,7 +122,8 @@ export IPYTHONDIR="$HOME/dotfiles/.ipython"
# export NODE_PATH=~/.npm-packages/lib/node_modules
# export PATH="/nix/var/nix/profiles/default/bin:$HOME/.nix-profile/bin:$PATH"

pyenv_init
# source ~/dotfiles/macos/pyenv-flags
# pyenv_init
starship_init
flyctl_init

Expand Down
9 changes: 9 additions & 0 deletions scripts/drafts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env sh
echo "== ~/personal/area/writing =="
ls -t ~/personal/area/writing

echo "== final-personal-blog/_drafts =="
ls -t ~/personal/area/blogs/final-personal-blog/_drafts

echo "== adgefficiency.com (draft: true) =="
grep -rl 'draft: true' ~/personal/area/blogs/adgefficiency.com/content
8 changes: 6 additions & 2 deletions scripts/search.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ MIN_HEIGHT=20
target_dir="${1:-.}"
cd "$target_dir" || exit

# exclude ./archive from the file list fed to fzf
FZF_DEFAULT_COMMAND='find . -path ./archive -prune -o -type f -print'
export FZF_DEFAULT_COMMAND

if [ "$TERM_HEIGHT" -ge "$MIN_HEIGHT" ]; then
fzf --preview 'bat --style=numbers --color=always {}' --height 60% -m --print0 | xargs -0 $EDITOR
fzf --preview 'bat --style=numbers --color=always {}' --height 60% -m --print0 | xargs -0 "$EDITOR"
else
fzf --no-preview --height 40% -m --print0 | xargs -0 $EDITOR
fzf --no-preview --height 40% -m --print0 | xargs -0 "$EDITOR"
fi
Loading