From dda5ebf86dbdb7949d2a8116eaa1f4d7e897a000 Mon Sep 17 00:00:00 2001 From: Jone Date: Wed, 25 Mar 2026 20:13:51 +0100 Subject: [PATCH 1/3] docs(index.md): refine file list and links --- index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.md b/index.md index 5c4be73..3042b9e 100644 --- a/index.md +++ b/index.md @@ -5,6 +5,7 @@ This is my AI discovery subdomain. There are only a few files here, as that is a - index.md - This file, which serves as the homepage for the subdomain - ai.txt - This robots.txt-like file just links to .well-known/ai.json - .well-known/ai.json - This file contains metadata about the AI stuff like profile, ... -- AGENTS.md - In this file, there are all the AI agent instructions +- AGENTS.md - Global AI agent instructions (used across all of Jone's projects) +- .github/copilot-instructions.md - Repository-specific Copilot instructions (deployment, shell context, etc.) That's all files :) From 0d7a194518aae6cbf90cfe235668f5b589ce8635 Mon Sep 17 00:00:00 2001 From: Jone Date: Wed, 25 Mar 2026 20:15:04 +0100 Subject: [PATCH 2/3] docs(AGENTS.md): add more global instructions, reformat --- AGENTS.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index d5ebf37..efb33ab 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,7 +17,7 @@ Name: Ducky | Jone's AI assistant | https://ai.jone.foo/ai.txt ## Code & Implementation **General:** CODE MUST be correct | KEEP minimal + clean | NO explanations in code; comments only if needed | RULES as comments (e.g., `# MUST do X`) | NO new features without permission -**Style:** FOLLOW existing code style | PREFER existing patterns/deps | NO new libs unless needed | USE PEP8 if no style guide | USE descriptive names | AVOID abbreviations +**Style:** FOLLOW existing code style | PREFER existing patterns/deps | NO new libs unless needed | USE PEP8 if no style guide | USE descriptive names | AVOID abbreviations | AVOID unnecessary apostrophes (e.g., use "dont" context words, not "don't" in formal writing) **Language Choice:** USE python or rust when unspecified (if possible) | ALTERNATIVES: Java → Kotlin **Editing:** READ context before editing | MAKE minimal changes | PREFER small diffs | NO full rewrites **Quality:** ENSURE runnable + complete | HANDLE edge cases | DO NOT ignore errors | KEEP error handling simple | PREFER efficient solutions | ADD logs only if useful @@ -42,7 +42,15 @@ Name: Ducky | Jone's AI assistant | https://ai.jone.foo/ai.txt **Copilot CLI:** `/fleet` (multi-agent) | `/research` (gather info) | `/review` (check before commit) | `/compact` (save tokens) | `/instructions` (toggle + reload AGENTS.md) | `!` (shell) | `Shift+Tab` (cycle) | `Ctrl+O/E` (expand) | `Ctrl+T` (reasoning) | `Ctrl+S` (run, preserve input) -**RTK - Rust Token Killer:** Always prefix shell commands with `rtk` to minimize token consumption. Usage: `rtk git status`, `rtk cargo test`, `rtk grep "pattern" src/`, etc. Meta: `rtk gain` (token savings) | `rtk gain --history` (with history) | `rtk discover` (find missed opportunities) | `rtk proxy ` (raw/debug). The `.github/hooks/rtk-rewrite.json` hook intercepts raw bash calls automatically. +**Shell Context:** Copilot CLI runs commands in **bash**, not zsh or other shells. +RC-file: `~/.bashrc` is used (not `~/.zprofile`). Only bash-specific syntax. + +**RTK - Rust Token Killer:** Always prefix shell commands with `rtk` to minimize token consumption. +Usage: `rtk git status`, `rtk cargo test`, `rtk grep "pattern" src/`, etc. +Meta: `rtk gain` (token savings) | `rtk gain --history` (with history) | `rtk discover` (find missed opportunities) | `rtk proxy ` (raw/debug). +The `.github/hooks/rtk-rewrite.json` hook intercepts raw bash calls automatically. +**DO NOT** suggest MCP servers, aliases, or RC-file modifications for RTK — the hook handles everything. +Dont proactively mention RTK unless user asks about optimization. **Pre-Start:** ✓ Clear instructions | ✓ ASK if unclear | ✓ Reason FIRST | ✓ CHECK security | ✓ USE `/review` | ✓ Small diffs | ✓ Check MUST/NEVER/ALWAYS rules | ✓ Maintain context | ✓ Consistency checks | ✓ Monitor Agents | ✓ Escalate if unresolved @@ -56,4 +64,5 @@ Name: Ducky | Jone's AI assistant | https://ai.jone.foo/ai.txt **`@mention` files for instant context:** Use `@filename` in prompts to include file content upfront — saves round-trips when agents need to understand current state. **`/research` for investigation sessions:** "Improve X" or "Require Y" tasks? Use `/research` to gather info with GitHub search + web sources BEFORE coding. **`/compact` proactively:** Don't wait until token crunch — after ~15 turns on a long task, run `/compact` to reset context and keep focus. -**`/delegate` for docs changes:** Even small AGENTS.md edits → prefer `/delegate` (PR flow) over direct main branch commits for review safety. \ No newline at end of file +**`/delegate` for docs changes:** Even small AGENTS.md edits → prefer `/delegate` (PR flow) over direct main branch commits for review safety. + From c898999fa43309eb4df662910fdd6c86a4b8c2bf Mon Sep 17 00:00:00 2001 From: Jone Date: Wed, 25 Mar 2026 20:15:09 +0100 Subject: [PATCH 3/3] 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