Internal prompt catalog
This module documents every fixed model-facing prompt and prompt wrapper shipped in Aivory 2.4.6. It covers the main chat system prompt, internal task-model calls, retrieval and memory jobs, image and research flows, Verify, tool-loop instructions, and the built-in document-generation skill.
The source code is canonical. The files covered here are unchanged between the v2.4.6 tag and the current application main branch at the time this catalog was completed.
Publication boundary
The catalog publishes fixed source strings and exact assembly rules. It does not publish instance or user data:
- administrator-configured model system prompts, moderation categories, or custom compaction instructions;
- personas, nicknames, custom instructions, project instructions, administrator/user skill bodies, or memories;
- document names, uploaded file contents, excerpts, user messages, assistant answers, search results, or tool output;
- API keys, channel configuration, database content, or provider payloads from a real request.
For those values the documentation shows placeholders, boundary tags, insertion order, and trust level. A placeholder such as <USER_MESSAGE> describes a runtime value; it is not literal prompt text.
Complete coverage matrix
| Area | Fixed prompt or wrapper | Documented in |
|---|---|---|
| Main chat | identity, default style, date grounding, persona headers, trust boundary | Main chat system prompt |
| Main chat | native/prompt tool guidance, sandbox paths, skills, project, memory, documents | Main chat system prompt |
| Message layer | RAG block, selected user skills, spreadsheet preview, selected excerpt, continuation summary | Main chat system prompt |
| Metadata | conversation title system prompt and locale directive | Task prompts |
| Automation | automatic tool route and request envelope | Task prompts |
| Automation | forced-search query generation and fallback | Task prompts |
| Context | compaction system prompt, request template, merge labels, reinjection wrapper | Task prompts |
| Compatibility | cross-vendor downgrade prompt | Task prompts |
| Retrieval | uploaded-document router and request rules | Retrieval, memory, and safety |
| Retrieval | iterative evidence judge and JSON payload | Retrieval, memory, and safety |
| Retrieval | oversized-document map-reduce extractor | Retrieval, memory, and safety |
| Memory | extraction, conflict adjudication, semantic deduplication | Retrieval, memory, and safety |
| Safety | generic and administrator-category moderation prompts | Retrieval, memory, and safety |
| Images | direct image intent planner and prompt optimizer | Image, Deep Research, and Verify |
| Images | faithful edit wrapper applied before the image provider | Image, Deep Research, and Verify |
| Deep Research | planner, coverage verifier, cross-validator | Image, Deep Research, and Verify |
| Deep Research | common writer rules, three report structures, no-evidence writer | Image, Deep Research, and Verify |
| Verify | auditor system prompt and question/answer envelope | Image, Deep Research, and Verify |
| Tools | prompt-mode preamble, stop sequence, result/error wrappers, malformed-call retry | Tool protocol and built-in skills |
| Tools | budget/no-progress finalization instructions and public tool errors | Tool protocol and built-in skills |
| Documents | built-in document-generation skill and self-check recipes | Tool protocol and built-in skills |
How to read the templates
Each page distinguishes four model-facing layers:
- System prompt: highest-priority authored instruction sent by the application.
- Request template: a user-layer body constructed by the server for an internal task.
- Dynamic data: runtime content inserted into a template. Its trust boundary is stated explicitly.
- Output contract and fallback: accepted output shape, normalization, and what the server does when the model fails.
Some prompts are assembled conditionally rather than stored as one constant. In those cases the page lists the exact fixed fragments and the exact order used by composeSystemPrompt. Authored main-chat fragments are localized for English, Simplified Chinese, Traditional Chinese, Japanese, and French in prompt_l10n.go; the English page shows the canonical English strings and the Chinese page shows the actual Simplified Chinese strings.
Change policy
Prompt changes are behavior changes. A release that changes a fixed contract should update this module, its coverage matrix, and the linked source version together. Private runtime values must never be copied into documentation, issues, screenshots, or release notes.