uprava chovani

This commit is contained in:
lachtan
2026-08-27 14:18:18 +02:00
parent de0f4c8a8f
commit 8119f780e7
2 changed files with 42 additions and 62 deletions

View File

@@ -10,6 +10,19 @@ Test: *Who is the recipient?* User gets notified → `/remind` skill (SQLite `db
**Do NOT just write reminders to MEMORY.md** — that won't trigger actual notifications.
## Doručené připomínky — „co dnes přišlo?"
Připomínky doručuje **systémový cron uživatele nanobot**
(`skills/remind/scripts/remind_send.py`) přímo přes Telegram, mimo agenta —
agent u odeslání není. Když se uživatel ptá na minulé/dnešní připomínky
(„připomněl jsi mi…?", „co dnes přišlo?"), zavolej
`uv run skills/remind/scripts/remind_cli.py delivered [--since YYYY-MM-DD]`
čte tabulku `reminder_fires` (jen doručené, čas v Praze).
`log/reminder.log` je provozní/debug log všech operací (ADD/EDIT/REMOVE/…/DELIVER,
UTC) — ne zdroj pravdy pro doručení. `log/reminder_cron.log` zachytává
stdout/stderr crontabu — za zdravého běhu prázdný, plní se jen při pádech skriptu.
## Heartbeat Tasks
`HEARTBEAT.md` is checked on the configured heartbeat interval. Use file tools to manage periodic tasks:
@@ -37,6 +50,25 @@ Never use `/tmp/`, hardcoded absolute paths, or in-memory databases for persiste
The exec safety guard blocks commands without an explicit workspace path (e.g. `lua -e '...'`, `which`). Write scripts to files inside the workspace (e.g. `tmp/script.lua`) and run them with `working_dir` set to the workspace root.
## python — use uv
For all Python code (scripts, snippets, one-liners, tools) use `uv`,
not `python` / `python3` / `pip` directly.
- Run a script: `uv run script.py` (not `python script.py`)
- One-liner / snippet: `uv run --with <pkg> python -c '...'`
- Script with declared dependencies: `uv run --script script.py`
(PEP 723 header inside the file)
- Add a project dependency: `uv add <pkg>` (not `pip install`)
- Remove: `uv remove <pkg>`
- Sync environment: `uv sync`
- Run a tool: `uv run pytest`, `uv run ruff`, `uv run mypy`, …
- REPL: `uv run python`
Do not use `pip`, `pip-tools`, `poetry`, `conda`, or the system `python`.
Reason: isolated, reproducible environments with no system-level side
effects, faster resolves, no "works on my machine" surprises.
## File / Code Conventions
### Report / result files
@@ -49,6 +81,16 @@ The exec safety guard blocks commands without an explicit workspace path (e.g. `
- Longer / non-trivial script -> Python.
- Override: if the user explicitly specifies a language or location, their instruction always takes precedence.
### Available scripting languages
In addition to Python and Bash, the agent can also write and run:
- **Lua** — via `lua` interpreter (scripts in `tmp/`, run with `working_dir` set to workspace root)
- **Rust** — via `rustc` / `cargo` (compile and run inside workspace)
- **TypeScript** — via `bun` (preferred) or `deno` / `node` if available
Use these when the user explicitly asks for them or when they are the right tool for the job. Default remains Python for non-trivial scripts and Bash for very short shell snippets.
### Git clones
- Always clone repos into `workspace/src/<repo-name>`, not directly into workspace root.