Bidirectional sync between the local Intelligence SQLite database and the [FOS] Intelligence Notion database. Reads from both the patterns and healing_patterns tables.
From founder-osnpx claudepluginhub thecloudtips/founder-os --plugin founder-osThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Syncs learned patterns and healing data between the local Intelligence DB and the [FOS] Intelligence Notion database. Sync is triggered explicitly by /founder-os:memory:sync (shared with Memory Engine). It is NOT triggered automatically by read-only commands like /founder-os:intel:status.
Follow the standard 3-step discovery pattern:
For each row in patterns where updated_at is newer than the last sync timestamp (from config where key = 'notion.last_sync'):
| SQLite Column | Notion Property | Transform |
|---|---|---|
description | Pattern (title) | Direct |
plugin | Plugin (select) | Null → "Cross-Plugin" |
pattern_type | Type (select) | Capitalize: taste → "Taste", workflow → "Workflow" |
confidence | Confidence (number) | Direct (0.0–1.0) |
status | Status (status) | Capitalize: active → "Active", approved → "Approved", rejected → "Rejected" |
observations | Observations (number) | Direct |
confirmations | Confirmations (number) | Direct |
rejections | Rejections (number) | Direct |
updated_at | Last Applied (date) | ISO 8601 |
instruction | Instruction (rich_text) | Direct |
Use pattern_id as the external ID to match existing Notion pages on subsequent syncs (upsert, not duplicate).
For each row in healing_patterns where last_seen is newer than the last sync timestamp:
| SQLite Column | Notion Property | Transform |
|---|---|---|
error_signature | Pattern (title) | Direct |
plugin | Plugin (select) | Null → "Cross-Plugin" |
| (fixed) | Type (select) | Fixed: "Healing" |
| (calculated) | Confidence (number) | success_count / max(1, success_count + failure_count) |
| (fixed) | Status (status) | Fixed: "Active" |
success_count + failure_count | Observations (number) | Sum |
last_seen | Last Applied (date) | ISO 8601 |
fix_action + fallback_action | Instruction (rich_text) | Concatenate: "Fix: {fix_action}. Fallback: {fallback_action}" |
Use healing_pattern_id as the external ID for upsert matching.
When a user edits a pattern page in Notion, pull the following fields back to the local patterns table:
patterns.status, normalized to lowercasepatterns.instructionpatterns.confidencePull is scoped to pages with a matching external ID in the local DB. Pages created directly in Notion (no external ID) are NOT synced back — patterns must originate from observations captured by the hooks layer.
After a successful sync run, store the current timestamp in the config table:
INSERT OR REPLACE INTO config (key, value) VALUES ('notion.last_sync', datetime('now'))
On subsequent syncs, use this timestamp to filter only changed rows:
-- Patterns changed since last sync
SELECT * FROM patterns WHERE updated_at > (SELECT value FROM config WHERE key = 'notion.last_sync')
-- Healing patterns changed since last sync
SELECT * FROM healing_patterns WHERE last_seen > (SELECT value FROM config WHERE key = 'notion.last_sync')
If notion.last_sync does not exist (first sync), push all rows.
After each sync, return a summary object:
{
"pushed": {
"patterns": <count>,
"healing_patterns": <count>
},
"pulled": {
"status_changes": <count>,
"instruction_edits": <count>,
"confidence_overrides": <count>
},
"errors": <count>,
"last_sync": "<ISO 8601 timestamp>"
}
{ "status": "unavailable" }.