import_patterns
Bulk-insert coding patterns into the instinct memory system to seed it from external sources like CSV exports or script outputs, with confidence summation for existing patterns.
Instructions
Bulk-insert many patterns in a single call; faster than looping observe().
Use this to seed the store from an external source — a CSV export,
another project's instinct DB, or patterns extracted by a script.
For patterns already present, confidence is summed (not replaced),
matching observe() semantics.
For importing from a CLAUDE.md file specifically, prefer
import_claude_md() which handles the markdown parsing for you.
Args:
patterns: List of dicts. Each dict requires at minimum a
"pattern" key. Optional keys: "category" (sequence |
preference | fix_pattern | combo), "source", "project",
"metadata" (dict), "explain" (str), "confidence" (int —
starting count, defaults to 1).
Returns:
Dict with keys: "imported" (int — new patterns created),
"merged" (int — existing patterns whose confidence rose),
"errors" (list of {"pattern", "reason"} for rejected rows).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patterns | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||