mimic_ai_knowledge_write
Write pattern-to-component mappings and DS rules to the knowledge file, automatically promoting CANDIDATE entries to VERIFIED after 3 uses. Handle corrections, rejections, conflict dismissals, and reset gap counts when the DS is updated.
Instructions
Write pattern→component mappings and explicit DS rules to the Mimic AI knowledge file (ds-knowledge.json). Call this at the end of every successful HTML-to-Figma run. Automatically promotes CANDIDATE entries to VERIFIED once use_count reaches 3 with no corrections. Use increment_correction=true when the user corrected a mapping — also write a matching rule_update with reset_seen_count=true. Use state="REJECTED" to permanently suppress a mapping. Use dismissed_conflicts to suppress a DS evolution conflict notice for a specific candidate component. Use rule_updates to record DS gaps, substitutions, and conventions. Use reset_gap_seen_counts=true when the user signals their DS was updated — resets all gap AND substitution rules so new components can be discovered. Gaps with seen_count ≥ 3 are surfaced as DS enhancement recommendations (unless dismissed or resolved). Response includes key_warnings (malformed key format — treat as errors, fix immediately) and rule_type_warnings (rule type changed — confirm intentional).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| updates | Yes | Array of pattern entry updates to apply. | |
| rule_updates | No | Array of explicit DS rule updates: gaps (no component exists), substitutions (use this instead), or conventions (DS usage rules). | |
| reset_gap_seen_counts | No | Set true when the user signals their design system was updated. Resets seen_count to 0 on ALL gap-type rules, causing Mimic AI to re-run DS search for those patterns on the next run and discover any newly added components. |