docs(.github): add repo-specific instructions
This commit is contained in:
parent
0d7a194518
commit
c898999fa4
1 changed files with 82 additions and 0 deletions
82
.github/copilot-instructions.md
vendored
Normal file
82
.github/copilot-instructions.md
vendored
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue