Skip to main content

What it does

Searches your memory store for rules, lessons, and past decisions relevant to an action you’re about to take. Returns a checklist of applicable constraints, warnings, and past mistakes to help you avoid repeating errors. Always call this before configuration changes, file deletions, API writes, external messages, or production system modifications. Preflight is a recall preset, not a separate policy engine. It calls recall with mode: "decision" and categories rule, lesson, and decision, preserving agentId, channel, sessionKey, projectId, and repoSlug when supplied. For repo work, pass the repo scope so safety memories from unrelated projects do not crowd the checklist.

Parameters

Returns

Field descriptions:
  • action — Echo of your input action description
  • checklist — Formatted markdown with rules, lessons, decisions organized by type
  • itemCount — Total number of relevant memories found
  • memories — Array of matching memory records (if available)

Examples

Basic usage

Advanced usage

When to use this vs alternatives

  • crystal_preflight — Before ANY risky action (config, delete, external message, production change)
  • crystal_recall — When you need general context about a topic, not safety/decision guidance
  • crystal_why_did_we — When you want to understand WHY a specific past decision was made

Error handling

Notes

  • Searches across rules, lessons, and decisions (categories: rule, lesson, decision)
  • Stores (procedural, semantic, prospective) are automatically weighted
  • Results inherit graph/source-role ranking from recall, then are rendered as a compact checklist.
  • If preflight returns unrelated project history, pass projectId or repoSlug instead of broad account recall.
  • Memory titles are always shown; full content is available in the JSON response if needed
  • The checklist is formatted with a defense header to prevent injection
  • If no memories match, the checklist advises “proceed with standard caution”
  • Use this BEFORE committing to the action, not after
  • The tool supports both API-key auth (HTTP endpoint) and Convex JWT (query-based) seamlessly