- Зачем:
- пользователь сжимает контекст сессии; состояние конвейера и решения
должны переживать сжатие в файле проекта, а не в разговоре.
- Что:
- создан .scratch/handoffs/20260720-0425-xray-proxy-after-06.md: состояние
после задачи 06, порядок 03→04→05, правила прогона
(medium-эксперимент, леджер, thread_id) и решения пользователя.
- в AGENTS.md закреплено правило размещения handoff-записок в
.scratch/handoffs/ (одноразовые, коммитятся, уборка best-effort).
- Проверка:
- git show --stat HEAD.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
87 lines
5.8 KiB
Markdown
87 lines
5.8 KiB
Markdown
# GEMINI.md - Project Context & Instructions
|
|
|
|
This repository contains personal dotfiles and configurations for a highly productive development environment, integrating Bash, Tmux, Vim, VS Code, and various AI assistants (Gemini CLI, Claude, Codex, Opencode).
|
|
|
|
## 📂 Project Overview
|
|
|
|
* **Type:** Non-Code Project (Dotfiles / Configuration)
|
|
* **Management:** Uses `stow` for Linux/WSL and `chezmoi` for Windows/WSL.
|
|
* **Key Focus:**
|
|
* Unified configuration across editors and terminals.
|
|
* Deep integration with AI tools via shared "skills".
|
|
* Automated environment setup (proxy handling, secret loading).
|
|
|
|
## 🛠 Key Components
|
|
|
|
### 1. Shell & Terminal (Bash & Tmux)
|
|
* **Bash:** Custom prompt (`.bash_prompt`), utility functions (`.bash_functions` like `proxy_on/off`), and core customizations (`.bash_custom`).
|
|
* **Tmux:** Dual prefix (`C-b` and `C-Space`), Vi-mode for copying, and optimized pane management.
|
|
* **Secrets:** Managed via `~/.env.secrets` (not tracked in Git).
|
|
|
|
### 2. Editors (Vim, VS Code, Zed)
|
|
* **Vim:** Minimalist `.vimrc`, 2-space indentation, leader-key mappings (`Space`).
|
|
* **VS Code (WSL):** Uses `server-env-setup` to automatically load secrets and configure proxy settings upon startup.
|
|
* **Zed:** Placeholder directory for future configuration.
|
|
|
|
### 3. AI Agents & Skills
|
|
* **Shared Skills:** Located in `agents/.agents/skills/`. This is the single source of truth for AI instructions.
|
|
* **Gemini CLI:** Configured via `gemini/.gemini/`.
|
|
* **Policies:** `readonly-commands.toml` allows critical commands like `git status`, `git diff`, and `git add` to run without confirmation.
|
|
* **Opencode:** MCP-based assistant configuration (`opencode.json`) with support for documentation, search, and web-reading.
|
|
* **Skill Bridges:** Symlinks are used to share skills across Claude, Codex, and Opencode.
|
|
|
|
## 🚀 Usage & Maintenance
|
|
|
|
### Deployment
|
|
* **Linux/WSL:** Use `stow <package_name>` from the root directory.
|
|
* **Windows:** Use `chezmoi apply`.
|
|
|
|
### Adding/Updating Skills
|
|
1. Modify files in `agents/.agents/skills/`.
|
|
2. Ensure symlinks in other tool directories are updated if new skills are added.
|
|
|
|
### Git Workflow for AI (Gemini CLI)
|
|
* **Safe Commands:** `git status`, `git diff`, and `git add` are pre-approved in the policy.
|
|
* **Commits:** Always use the `conventional-commits` skill for generating commit messages. Use the ` Способ B` (temporary file) if direct Heredoc causes issues.
|
|
|
|
## 📋 TODO
|
|
|
|
Планы на будущее — см. [TODO.md](TODO.md).
|
|
|
|
## ⚠️ Important Files for Reference
|
|
* `README.md`: Detailed installation and usage instructions.
|
|
* `bash/.bash_functions`: Proxy and environment management functions.
|
|
* `gemini/.gemini/policies/readonly-commands.toml`: Permissions for Gemini CLI.
|
|
* `agents/.agents/skills/conventional-commits/SKILL.md`: Rules for commit formatting.
|
|
|
|
## 🤖 AI Interaction Mandates
|
|
* **Adhere to Local Patterns:** When suggesting changes, follow the 2-space indent rule and minimalist style established in `.vimrc` and `.bash_custom`.
|
|
* **Privacy First:** Never log or commit contents of `~/.env.secrets`.
|
|
* **Verification:** Before updating configs, verify with `git status` and `git diff` (which are allowed without confirmation).
|
|
|
|
## 🗣 Язык и рассуждения
|
|
|
|
Пиши на ясном русском языке. Иностранные слова оставляй только там, где у термина нет устоявшегося русского аналога: имена технологий и инструментов (Kafka, ClickHouse, Airflow) и названия из кода. Если для понятия есть обычное русское слово — используй его, не выдумывай транслитерации (пиши «приведение в соответствие», а не «реконсиляция»; «точка отсчёта», а не «origin»).
|
|
|
|
Документы, комментарии и объяснения держи короткими и понятными читателю, который их не писал: простые слова, короткие фразы, сложную мысль поясняй при первом упоминании (помни про менти-неспециалиста). Если понятность и буквальная точность спорят — выбирай понятность. Правило касается и текста, и заголовков разделов.
|
|
|
|
Внутренние рассуждения и промежуточные пометки по ходу работы веди на английском — он экономнее по токенам (кириллица занимает примерно в 1,5–2 раза больше). На русском остаётся всё, что видит и хранит проект: итоговые ответы пользователю, документы, комментарии в коде и сообщения коммитов.
|
|
|
|
## Agent skills
|
|
|
|
### Issue tracker
|
|
|
|
Задачи хранятся в отслеживаемых Git Markdown-файлах текущей ветки под `.scratch/`. Перед `merge --no-ff` они удаляются. См. `docs/agents/issue-tracker.md`.
|
|
|
|
### Triage labels
|
|
|
|
Используются стандартные названия состояний triage. См. `docs/agents/triage-labels.md`.
|
|
|
|
### Domain docs
|
|
|
|
Используется схема single-context: корневой `CONTEXT.md` и общие ADR в `docs/adr/`. См. `docs/agents/domain.md`.
|
|
|
|
### Handoffs
|
|
|
|
Записки для продолжения работы в новой сессии — `.scratch/handoffs/YYYYMMDD-HHMM-<slug>.md` (одноразовые, коммитятся, уборка best-effort; скилл `/handoff` пишет сюда).
|