nanobot: 2026-09-11 15:17:08
This commit is contained in:
@@ -52,6 +52,13 @@ them. The Dream processor must not touch `notes/`.
|
||||
**Run scripts with `uv run`, workspace-relative paths** (exec runs from the workspace
|
||||
root, not the skill dir): `uv run skills/note/scripts/<script>.py …`.
|
||||
|
||||
**Never pass the text on the command line.** Not as an argument, not in a heredoc, not
|
||||
through a pipe — always `write_file` it to `tmp/` and pass the path. The exec safety
|
||||
guard scans the raw command string and has no shell parser, so quoting does not help: a
|
||||
colon right after a letter that follows a diacritic parses as a Windows drive path, and
|
||||
a note like `Cíl: koupit mléko` blocks the whole command with *path outside working dir*.
|
||||
Since capture takes the user's input verbatim, this would hit real notes, not edge cases.
|
||||
|
||||
**Language.** This skill body is English; always reply to the user in the user's own
|
||||
language.
|
||||
|
||||
@@ -60,9 +67,10 @@ language.
|
||||
The default: file the note into the knowledge base immediately, in this turn.
|
||||
|
||||
1. Read `Channel` / `Chat ID` from the runtime context if present.
|
||||
2. Capture:
|
||||
`uv run skills/note/scripts/note_capture.py --text "<raw input>" [--channel <ch>] [--chat-id <id>]`
|
||||
Pass the input **as-is** — do not reformulate or strip URLs here.
|
||||
2. Capture, in two steps — `write_file` the raw input to `tmp/note-capture.md`, then:
|
||||
`uv run skills/note/scripts/note_capture.py --file tmp/note-capture.md [--channel <ch>] [--chat-id <id>]`
|
||||
Pass the input **as-is** — do not reformulate or strip URLs here. See
|
||||
*Never pass the text on the command line* below for why it goes through a file.
|
||||
3. Run the **Compile workflow** (below) inline: acquire the lock, process `notes/inbox/`,
|
||||
file into `notes/notes.md`, move the source to `notes/done/` (or `notes/hard/`).
|
||||
4. **Commit** the change (see *Versioning* below): via `exec` run
|
||||
@@ -79,7 +87,10 @@ the user is firing off many notes quickly, suggest `/note cron`.
|
||||
Capture only; let the background cron file it later. Fast, non-blocking.
|
||||
|
||||
1. Read `Channel` / `Chat ID` from the runtime context if present.
|
||||
2. `uv run skills/note/scripts/note_capture.py --text "<raw input>" [--channel <ch>] [--chat-id <id>]`
|
||||
2. `write_file` the raw input to `tmp/note-capture.md`, then
|
||||
`uv run skills/note/scripts/note_capture.py --file tmp/note-capture.md [--channel <ch>] [--chat-id <id>]`
|
||||
(the extra write is what keeps the capture from being blocked — see below; it is still
|
||||
one fast turn, so this mode stays non-blocking)
|
||||
3. Confirm in **one short line** (e.g. "captured — I'll file it in the background") and **STOP the
|
||||
turn**. Forbidden here: reformulating, reading `notes/notes.md`, running any compile
|
||||
step, taking the lock. If you catch yourself about to read the doc, you are compiling
|
||||
@@ -174,5 +185,7 @@ never reached the KB — you may cancel it directly with `exec: rm notes/inbox/<
|
||||
|
||||
- `/note` with no content → ask what to note.
|
||||
- Empty / whitespace-only input → `note_capture.py` exits non-zero; ask for real content.
|
||||
- `No such file` from capture → the `write_file` step was skipped or the path is wrong;
|
||||
write `tmp/note-capture.md` first, never fall back to passing the text as an argument.
|
||||
- The compile step, not capture, decides sections and does all fetching. If you ever find
|
||||
yourself reformulating or reading `notes.md` during a `cron` capture, stop.
|
||||
|
||||
Reference in New Issue
Block a user