- .ai/ instruction set (root, behavior, skills, constraints) - apply.sh workflow documentation (apply.md) - architecture documentation (docs/architecture.md) - .github/copilot-instructions.md for VS Code auto-load - .gitignore (tmp/, .ai-instructions.conf)"
1.9 KiB
1.9 KiB
Git Instructions
🚨 GIT POLICY - ABSOLUTELY CRITICAL
NEVER EVER make git commands without explicit user approval!
Forbidden Commands - DO NOT RUN:
- ❌ git add - User runs this themselves (including git add ., git add -A, git add )
- ❌ git commit - User runs this themselves
- ❌ git push - User runs this themselves
- ❌ git push --force - User runs this themselves
- ❌ git reset - User runs this themselves
- ❌ ANY command that modifies git repository or server state
What You CAN Do:
- ✅
git status- Show current state - ✅
git diff- Show changes - ✅
git log- Show history - ✅ Show the command user should run
- ✅ Explain what the command will do
Exception:
Only if user explicitly says:
- "commit this now"
- "push this now"
- "go ahead and commit"
Otherwise: SHOW the command, WAIT for user to run it
Best Practices
- Always show
git diffbefore suggesting commits - Show
git statusto verify what will be committed - Explain impact of each git operation
- User controls git commands, you analyze and advise
- Never assume user wants to commit
- Production platform infrastructure: Stability > Speed
Commit Message Workflow
When the user asks for a commit message:
- Run
git diff --stagedorgit diff— read what actually changed - Documentation check — scan the changed files and ask: does any
docs/orREADME.mdneed updating based on these changes? If yes, flag it clearly before writing the message. Do not block the commit — just surface it. - Write the commit message — one short subject line, optionally a blank line and brief body if the change needs context
- Show the command — display the full
git commit -m "..."for the user to run themselves
Format:
<type>: <what changed>
<optional: why, or what is not obvious from the diff>
Types: feat, fix, docs, refactor, chore