get_briefing
Onboard coding agents with project context, relevant memories, and action items before making changes, consolidating multiple lookups into a single call.
Instructions
⭐ DEFAULT-FIRST for coding agents on any repo where hivelore init ran: call this BEFORE
changing source or project config for the current goal (unless the developer explicitly opts out).
One-shot onboarding: everything relevant in a single call under a token budget.
PROGRESSIVE DISCLOSURE — after this, drill down only if needed: mem_relevant_to / mem_search (compact lists) → mem_get (full body + anchors).
RETURNS (in order of priority): 0. action_required — ⚠️ HANDLE THIS FIRST if non-empty (see protocol below)
last_session — recap of the previous session (goal, what was done, next steps)
project_context — .ai/project-context.md (auto-generated from code-map if template)
module_contexts — relevant .ai/modules//context.md based on files being edited
memories — ranked team memories relevant to your task
symbol_locations — file:line:kind for any requested symbols (no grep needed)
setup_warnings — actionable warnings if setup is incomplete
decay_warnings — memories not read in >90 days (consider reviewing)
⚠️ ACTION_REQUIRED PROTOCOL — MANDATORY: If action_required[] is non-empty, STOP and for each item:
Show the developer the exact developer_message field verbatim
Wait for explicit human confirmation ('yes', 'go ahead', 'oui', etc.)
Only then proceed with any code changes NEVER act autonomously on cross-repo breaking changes, dep bumps, or contract diffs.
KEY PARAMETERS: task — what you are about to do (1–2 sentences) — ALWAYS provide this files — files you are about to edit — surfaces anchored memories symbols — symbol names to look up in the code-map (e.g. ['PaymentService']) format — 'full' (default) | 'compact' (1-line) | 'actions' (bullet-first excerpts) budget_preset — 'quick' | 'balanced' | 'deep' — scales max_tokens/memories/module contexts
EXAMPLE USAGE: get_briefing({ task: 'add a Stripe payment integration', files: ['src/payments/'], symbols: ['PaymentService'] })
CONFIDENCE LEVELS in memories: authoritative — validated + read 10+ times (highest trust) trusted — validated or proposed + read 3+ times low — proposed, few reads (take with caution) unverified — draft (unverified: true flag set)
Replaces 4–5 separate tool calls. Prefer this first; use mem_search / mem_get only for follow-up.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | What you are about to do, in 1–2 sentences. Used to rank relevant memories semantically. | |
| files | No | Project-relative file paths the agent is currently looking at or about to edit | |
| track | No | Increment read_count on returned memories | |
| format | No | Output format: 'full' returns memory bodies (honors token budget via truncation); 'compact' returns a 1-line summary per memory (call mem_get for detail); 'actions' squeezes bodies to actionable bullet lines — fewer tokens vs full. | full |
| symbols | No | Symbol names to look up in the code-map (e.g. ['PaymentService', 'TenantFilter']). Returns the file(s) exporting each symbol so agents don't need to grep. Requires `hivelore index code` to have been run. | |
| semantic | No | Use semantic ranking when a task is provided (requires `hivelore embeddings index`). | |
| max_tokens | No | Approximate token budget for the entire briefing. Each section is allocated a share and truncated to fit. | |
| max_memories | No | Cap on memories surfaced regardless of token budget | |
| budget_preset | No | Shortcut token budget: 'quick' minimizes tokens/skip module CONTEXT slices; 'balanced' mirrors historical defaults; 'deep' uses a larger briefing. When set, overrides max_tokens, max_memories, and include_module_contexts. | |
| deterministic | No | Ignore machine-local usage/impact signals so repeated evaluations rank the shared corpus reproducibly. | |
| include_stale | No | Include stale memories (excluded by default — they may be outdated) | |
| memory_scopes | No | Restrict the candidate corpus to selected scopes. Omit to include every scope. | |
| min_semantic_score | No | Drop semantic-only memory hits whose cosine score is below this threshold. Useful to avoid weakly-related noise when the task is short or the corpus is broad. Has no effect on memories matched via anchor/module/literal — those are always kept. Try 0.25–0.4 for stricter matching. | |
| dedupe_project_context | No | Token saver (default ON): skip re-emitting the project-context body if an identical copy was already sent within the last few minutes this session (the agent still has it). Set false to always include it. | |
| include_module_contexts | No | Include the `.ai/modules/<name>/context.md` slices inferred from `files` (default ON). Set false to keep the briefing to project context + memories. Overridden by `budget_preset` when that is set. | |
| include_project_context | No | Include the `.ai/project-context.md` body (default ON). Set false when the agent already has the project overview and you only want the module/memory layers — see `dedupe_project_context` for the automatic, session-aware version of the same saving. |