From c898999fa43309eb4df662910fdd6c86a4b8c2bf Mon Sep 17 00:00:00 2001 From: Jone Date: Wed, 25 Mar 2026 20:15:09 +0100 Subject: [PATCH] docs(.github): add repo-specific instructions --- .github/copilot-instructions.md | 82 +++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..15bf8dd --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,82 @@ +# GitHub Copilot Instructions for ai.jone.foo + +This file contains repository-specific instructions for Copilot when working on the ai.jone.foo project. + +## Repository Structure + +For file list, see index.md. This file documents Copilot-specific workflow and restrictions for ai.jone.foo. + +## RTK Integration + +Jone uses **RTK (Rust Token Killer)** via a pre-tool hook to minimize token consumption. + +### How it works + +The `.github/hooks/rtk-rewrite.json` hook intercepts bash commands at execution time: +- Raw commands like `git status`, `grep pattern src/`, `find .` are rewritten to use `rtk` +- This reduces command output token usage by 60-90% + +See AGENTS.md for RTK usage and restrictions. + +## Deployment Workflow + +### Deploy process + +When the user says "deploy" or wants to push changes to production, follow this exact process: + +1. **Commit and push to main** + + ```bash + git add (changes, NEVER do git add -A or git add .) + git commit -m "scope: short description" + git push + ``` + +2. **SSH to root@jone.foo and pull** + ```bash + ssh root@jone.foo "cd /home/caddy/ai.jone.foo && git pull" + ``` + +### Important details + +- **User:** `root` (not `caddy`) +- **Deploy location:** `/home/caddy/ai.jone.foo` +- **Path expansion:** When escaping for SSH, use `\~` instead of `~` and `\;` for semicolons +- **No intermediate script** — deploy is just `git pull` (files served directly by Caddy) + +### What NOT to do + +- Don't suggest custom deployment scripts or CI/CD +- Don't ask for confirmation in the middle of deployment +- When deploying, always verify the pull succeeded with a follow-up status check + +## Shell Context + +See AGENTS.md for shell context details. + +## What's in AGENTS.md + +**AGENTS.md** (in the repo root) contains **global instructions** for all Copilot sessions across all of Jone's projects: + +- Custom instructions (tone, language, code style) +- **Testing rules:** never inline commands, always use proper unit tests +- Sub-agent communication patterns +- Security rules +- Git and workflow preferences + +**DO NOT duplicate** AGENTS.md content here. Link to it if needed, but keep this file repo-specific only. + +## Repository conventions + +- **Markdown formatting:** Use vanilla markdown, no special tooling +- **Commit messages:** Follow conventional commits (see AGENTS.md) +- **Language:** German for docs, English for code/config +- **No external dependencies** — keep this repo minimal + +## When to escalate + +If the user asks for: + +- Complex CI/CD or automation → Suggest they use `/plan` to think through it first +- MCP servers for RTK → Clarify that the hook system already handles it +- Caching or optimization of git pulls → Document in this file, don't implement magic