drift_check
Audit served agent profiles for prompt validation failures and silently misconfigured config levers. Reports drift read-only, scoped to this environment, so you know what to publish or fix.
Instructions
Check whether each agent profile's SERVED prompt (resolved through
prompt_version_ids — not the newest version) passes
core.prompt_validator.validate_prompt — the same gate
admin_mcp/tools_configure.py's publish path runs before a write — plus a
registry of config levers whose wrong value is silent
(voice_config.barge_in_enabled, voice_config.answer_watchdog_sec,
memory_config.enabled on a voice profile, ... — voice_config is FLAT since
2026-08-17; the old voice_config.live.* paths are what an unmigrated row
still stores, not where a lever is read from). A served prompt DIFFERING
from the repo constant is expected under DB-authoring (prompts change
through MCP/API/DB, never a merge) and shows as info when the
validator has real rules to check it against, warning when it does
not (unconfirmed, not proven safe). What is still critical is the
served version FAILING validation outright — the modern shape of "is my
merged prompt fix actually live?": every scripts/seed_*.py /
admin/seed_*.py is insert-if-missing, so once a row exists a seeder can
NEVER push a repo edit into it, and a profile can stay pinned to a bad
version indefinitely unless something checks for it. Findings whose summary carries
"[INCIDENT LEVER LEFT ENGAGED]" are config levers pulled during a past
incident and never restored — a different failure mode from "never
configured" and worth flagging louder; summary.incident_levers_engaged
counts them. want_diff=False by default: a prompt diff can be large and
half Arabic, expensive to put in an LLM's context — pass true only when
you need the actual text delta. profile/agent_kind optionally narrow the
findings (profile matches the exact agent_profiles.slug a finding is
about; agent_kind matches that slug's agent_kind per the check
registry — best-effort, only as complete as PROMPT_CHECKS' coverage).
Every fetch is scoped to ONE agent_profiles.environment — this process's
own — and the AI project is a single DB holding every environment's rows,
so drifted: 0 describes that environment and nothing else. The audited
value is returned as audited_environment; quote it whenever you report a
verdict. Read-only: this reports drift, it does not fix it — publish the
fix with prompts action=serve / update_profile.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "drift_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | Only findings for this profile slug. | |
| want_diff | No | Include the prompt text delta (large, half-Arabic). | |
| agent_kind | No | Only findings for this agent kind. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |