feat: personal notes, each person's standing instructions for how Jarvis answers them

A personalNotes tool (add, list, delete the asker's own notes) offered only
with a notes backend. The app keeps the notes in config/notes.json and sends
the asker's with every voice, chat and task reply; the reply engine puts them
in a <person_notes> fence as that person's preferences, which never permit an
action or a tool. The worker's schedule bridge becomes a shared app bridge
for schedule_action and note_action. A 사람별 지침 screen edits and deletes
any note; features.notes turns the tool and the notes off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-14 17:10:53 +09:00
parent e4b6327cf9
commit a5bd25b86f
32 changed files with 901 additions and 91 deletions

View File

@@ -0,0 +1,40 @@
# personalNotes tool spec (v2)
Each person's standing instructions for how Jarvis answers them ("앞으로 나한테는 반말로 해",
"날씨는 섭씨로만"). Product rules: `docs/v2/proactive.md` (제안 4). The app keeps the notes and
sends the asker's with every reply (`app/src/admin.spec.md`, "Personal notes"); this tool only asks
it to add, list or delete them.
## Principles
- **Only in v2, only the asker's own.** The tool exists for a turn only when the v2 voice worker's
brain put a notes backend in the turn state (`turn_state.set_notes`). Without one (v1, evals
without a backend, scheduled tasks) it is not offered and refuses. The backend acts for the
person asking only.
- **Saved only when asked to apply from now on.** The description tells the model to add a note
only for something the person wants from now on, never for a one-off request.
- **Notes shape answers, never permissions.** The reply engine puts the asker's notes
(`run_reply_engine(person_notes=...)`) in the system prompt inside a `<person_notes>` fence,
labelled as the person's own preferences for how they are answered, to follow unless they conflict
with the rules above, and never permitting an action or a tool. Fence tags inside a note are
removed so it cannot close the block. Only the asker's notes are sent, so one person's notes never
reach another person's answer. Eval: `evals/test_personal_notes.py`.
- **Raw data.** The tool returns plain text for the reply model; no LLM call inside.
## Schema
| action | needs | does |
|---|---|---|
| `add` | `text` | saves it (whitespace collapsed, 1-300 characters) |
| `list` | | the asker's notes: `- id <id>: <text>` |
| `delete` | `id` | deletes one of the asker's notes |
`action` is read as its first known word. A refused request never reaches the app.
## Backend
`turn_state.get_notes()` returns an object with `act(action, **fields) -> dict` (add: `text`;
delete: `note`, the note's id): `{"ok": true, "item": {"id", "text"}}` for add and delete,
`{"ok": true, "items": [...]}` for list, `{"ok": false, "error": "..."}` on failure. The voice worker
implements it (`voice_worker/app_bridge.py`): each action goes to the app as `note_action` with the
asker (voice_worker.spec.md, "Personal notes").