Use this repository as a compact skill for repeated document briefing tasks.
When a user asks to summarize, brief, digest, recap, or rerender documents:
- Normalize the input into
DocumentInput. - Compute a stable document fingerprint.
- Check
DocumentSummaryStatecache. - Summarize only cache misses.
- Render from templates.
- Report cache stats when useful.
- Do not call an LLM for a repeated document.
- Do not call an LLM for template-only changes.
- Do not collapse all documents into one giant prompt if document-level caching is possible.
- Store structured state, not just final strings.
- Preserve IDs, names, dates, and numeric values.
If an input type is unfamiliar, still normalize it to text plus metadata and mark uncertainties in unknowns.
For sensitive documents, prefer ephemeral, no output cache, PII redaction, and optional HMAC signing. Treat HMAC as tamper detection only; cache files remain plaintext unless the deployment provides encrypted storage.