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
51 changes: 51 additions & 0 deletions .agents/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Global Agent Instructions

## Git Sign-off

When creating commits with DCO sign-off (`git commit -s`), always use:

```
Signed-off-by: Prasanth Baskar <bupdprasanth@gmail.com>
```

Never hardcode or guess the sign-off email. Always use `bupdprasanth@gmail.com`.

## Harbor Worktree Push Rules

See `~/.agents/harbor-worktree-rules.md` for full details. Summary:

**CRITICAL: Wrong remote = private code leaked to public repos.**

Harbor (`~/code/OSS/harbor/`) is a bare repo with worktrees named `{remote}-{description}`. The prefix before the first `-` IS the push target remote. Derive: `basename "$PWD" | cut -d'-' -f1`

- `8gcr-*` → `8gcr` (**PRIVATE**) | `next-*` → `next` (**PRIVATE**) | `bupd-*` → `bupd` (fork) | `upstream-*` → `upstream` (**PUBLIC**) | `glab-*` → `glab` (**PRIVATE**)

1. ONLY push to the remote matching the directory prefix.
2. NEVER push `8gcr` or `next` code to `upstream`.
3. When unsure, ask. Confirm remote + branch before force-push.

## Neovim PR Review

When the user provides a GitHub PR URL or PR number and wants local Neovim review, use the `neovim-pr-review` skill or run:

```bash
python ~/.agents/skills/neovim-pr-review/scripts/prepare_pr_review.py <github-pr-url>
```

This workflow requires a clean worktree, creates a dedicated review branch, and leaves the PR changes unstaged with `git reset --mixed` so Neovim highlights the changed files. Do not use `git reset --hard` for this workflow.

For a raw PR patch, prefer GitHub CLI auth:

```bash
gh pr diff <number-or-url> -R <owner/repo> --patch > pr.patch
```

For public repositories, `<pr-url>.patch` and `<pr-url>.diff` also work.

## Shared Agent Skills

Shared skills live under `~/.agents/skills/<skill-name>/SKILL.md`. Each skill uses YAML frontmatter with `name` and `description`; optional references, scripts, and assets live beside that `SKILL.md`.

Agents that support skills should index `~/.agents/skills/*/SKILL.md` at session start and autoload a skill when the user's request matches its description. Load only the matching `SKILL.md` first, then load bundled files referenced by that skill as needed.

For Codex, OpenCode, Claude-compatible agents, or custom tools without native skill indexing, use `~/.agents/skills/README.md` and `~/.agents/skills/registry.json` as discovery aids. Do not load every skill body by default.
10 changes: 10 additions & 0 deletions .agents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Shared Agent Rules

Canonical rules for all AI agents. See `~/dotfiles/AGENT-CONFIG.md` for the full management plan.

- `AGENTS.md` — Global agent instructions (source of truth, symlinked by `.claude/CLAUDE.md` and `.codex/AGENTS.md`)
- `harbor-worktree-rules.md` — Harbor multi-remote push safety
- `git-signoff.md` — DCO sign-off identity
- `skills/` — Shared skills with `SKILL.md` frontmatter for agent autoloading
- `skills/README.md` — Human-readable skill discovery index
- `skills/registry.json` — Machine-readable skill discovery manifest
5 changes: 5 additions & 0 deletions .agents/git-signoff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Git Sign-off

Use `git commit -s` with: `Signed-off-by: Prasanth Baskar <bupdprasanth@gmail.com>`

Never hardcode or guess the sign-off email. Always use `bupdprasanth@gmail.com`.
23 changes: 23 additions & 0 deletions .agents/harbor-worktree-rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Harbor Worktree Push Rules

**CRITICAL: Wrong remote = private code leaked to public repos.**

Harbor (`~/code/OSS/harbor/`) is a bare Git repo with worktrees named `{remote}-{description}`.
The prefix before the first `-` in the directory name IS the Git remote to push to.

Derive remote: `basename "$PWD" | cut -d'-' -f1`

## Remotes

- `8gcr-*` → `8gcr` (container-registry/8gcr — **PRIVATE**)
- `next-*` → `next` (container-registry/harbor-next — **PRIVATE**)
- `bupd-*` → `bupd` (bupd/harbor — personal fork)
- `upstream-*` → `upstream` (goharbor/harbor — **PUBLIC**)
- `glab-*` → `glab` (8gears/container-registry/harbor — **PRIVATE**)

## Rules

1. ONLY push to the remote matching the directory prefix.
2. NEVER push `8gcr` or `next` code to `upstream` — that is public OSS.
3. When unsure, ask before pushing.
4. Confirm both remote AND branch before any force-push.
31 changes: 31 additions & 0 deletions .agents/skills/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Shared Skills

This directory is the shared skill root for OpenCode, Codex, Claude-compatible agents, and custom agent tooling.

## Discovery

- Canonical source: `~/.agents/skills/<skill-name>/SKILL.md`
- Metadata: YAML frontmatter `name` and `description`
- Autoload rule: match the user's task to a skill description, then load only that skill's `SKILL.md`
- Bundled resources: load referenced files from the same skill directory only when needed
- Machine-readable manifest: `~/.agents/skills/registry.json`

## Matt Pocock Skills

Installed from `mattpocock/skills`:

- `obsidian-vault` - Search, create, and organize Obsidian notes.
- `edit-article` - Restructure and tighten article drafts.
- `caveman` - Ultra-compressed communication mode.
- `handoff` - Produce handoff notes for another agent.
- `write-a-skill` - Create new agent skills.
- `diagnose` - Disciplined debugging and regression diagnosis.
- `grill-with-docs` - Stress-test plans against docs, domain language, and ADRs.
- `triage` - Triage issues through project workflow states.
- `improve-codebase-architecture` - Find architecture and refactoring opportunities.
- `setup-matt-pocock-skills` - Configure repos for the engineering skill set.
- `tdd` - Use red-green-refactor development.
- `to-issues` - Break plans into implementation issues.
- `to-prd` - Turn conversation context into a PRD.
- `zoom-out` - Explain code at a higher abstraction level.
- `prototype` - Build throwaway prototypes for logic or UI questions.
Loading