Files
LazyBearWorks/AGENTS.md

124 lines
3.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AGENTS.md — LazyBear MCP
STACK: .NET 10 | ASP.NET Core | ModelContextProtocol.AspNetCore 1.2.0
STRUCTURE: LazyBear.MCP/{Program.cs, Services/Kubernetes/{K8sConfigTools,K8sDeploymentTools,K8sNetworkTools,K8sPodsTools}, appsettings.json}
---
## [A] КОД — ALWAYS
PRE_EDIT: read_file → keep_style → min_diff → no_secrets_in_code
PRE_COMMIT: dotnet build OK | MCP protocol intact | lang=ru (comments/docs/commits)
PRIORITY: user > this_file > code_style
---
## [B] КОММУНИКАЦИЯ — ALWAYS
DO: act_first → confirm_if_needed | short_and_precise | sequential_questions
DONT: end_with_question_only | print_secret_values | commit_.env.local
SECRETS: use .env.local if exists; else state_once + ref .env.example
LINKS: internal=relative_path spaces→%20 | external=markdown_label (not bare URL)
RULES_EDIT: minimal + non_duplicative
---
## [C] MEMORY LOG — ALWAYS
PREFIX: lazybear/
KEY: lazybear/<type>/<name> (ex: lazybear/bug/auth-fail)
TYPES: architecture | mcp_tool | decision | bug | config | task_log
ONE_TYPE_PER_ENTITY: true
ON session_start → read_graph OR search_nodes(<topic>)
ON significant_change → create_entities OR add_observations
---
## [D] INTERACTION — только при вопросе пользователю
### Формат
```
<инструкция ≤15 слов>
1) <вариант ≤5 слов>
2) <вариант>
```
RULES: первый_символ=инструкция | max_options=7 | blank_line_before_options
FORBIDDEN: текст до/после блока | метки ("Выберите:") | пояснения | статусы
### Ввод
VALID:
N → single select
N,N → multi (no spaces)
abort|cancel → FLOW_CANCEL
<text> → pass_to_system as-is
INVALID → reject+repeat: "вариант 2" | "1, 3" | "" | любая фраза вместо числа
### Поток
ONE_Q_PER_STEP: true
NO_SKIP: true
NO_STATE_BETWEEN_SESSIONS: true
CONFIRMATION (обязательный финальный шаг):
```
Итог:
- <поле>: <значение>
1) Подтвердить
2) Начать заново
3) Изменить шаг
```
COMPACT_MODE: `key=N key=N` → apply valid fields, skip their steps → go to CONFIRMATION
### После валидного ввода
EXECUTE: silent
NEXT_OUTPUT: result XOR next_question_block
```
✗ "Перехожу на ветку, затем подготовлю версию..."
✓ [молча] → результат или следующий вопрос
```
### Валидация
MATCH: exact_only | no_autocorrect | no_implicit_defaults
RETRY:
1 → error + repeat
2 → error + emphasize format (1 / 2 / 1,3)
3 → minimal hint
4 → STEP_ABORT
ABORT:
invalid×4 → STEP_ABORT (emit code only, no text)
abort|cancel → FLOW_CANCEL (emit code only, no text)
### Запрещённые шаблоны
```
✗ "Если хочешь, могу сделать коммит"
✗ "Дай знать если продолжить"
```
RULE: action available → always show choice block:
```
Выполнить коммит и push?
1) Да
2) Нет
```
OPTIONS: exhaustive | no "Другое" | freetext implicit (не предлагать как вариант)
### Приоритеты
PRIORITY: safety(absolute) > determinism > structure > format > convenience
DETERMINISM: same_input→same_output | option_order=fixed | option_text=never_rephrase