KB Consult
kb_consultRecord a consultation to retrieve governing rules for an intent before starting code or architectural work. Surfaces pending maintenance items for operator confirmation.
Instructions
Record a consultation for (source_session, workspace) and return the governing rules for the intent. Call before code/architectural work. trigger is 'explicit' (default: a deliberate consult, clears the gate) or 'prompt_hook' (an installer auto-consult: audited, never clears).
Retrieval is hard-filtered to the in-force class (active/accepted/ approved, within its validity window, and never a memory-inbox doc): an unreviewed proposed memory, a retired/superseded decision, an expired doc, or a legacy/forged inbox file is never returned as a governing rule.
pending_actions, when present, lists open maintenance items (missing
status fields, recently-expired/expiring-soon docs); omitted when
the corpus is clean. Surface it to the operator and act on it only
with operator confirmation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| intent | Yes | Natural-language search query. | |
| trigger | No | Consult trigger: explicit or prompt_hook. | explicit |
| workspace | Yes | Project or workspace key in the KB. | |
| agent_identity | Yes | Human-readable agent identity for audit events. | |
| source_session | Yes | Stable id of the agent session making the call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||