Files
ra-h-os/src/config/workflows/integrate.ts
T
“BeeRad”andClaude Opus 4.5 2cbc950fd4 sync: Idea Genealogy + Quick Capture Overhaul
From private repo:

Idea Genealogy:
- Required edge explanations across UI/tools/API/MCP
- Inferred edge schema (category/type/confidence)
- Added part_of relationship type
- Connection UI chips (Made by / Part of / Came from / Related)

Quick Capture Overhaul:
- Jina.ai fallback for JS-rendered sites (Twitter, SPAs)
- Simplified UI: removed mode buttons, auto-detect input type
- Renamed to "Add Stuff", moved to top-right
- Auto-edge creation from description entities
- Increased content summary length (500→1500 chars)

Description Generation Fix:
- Simplified prompt to "what is this"
- Added link/dimensions context
- Better creator attribution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 17:08:26 +11:00

68 lines
2.2 KiB
TypeScript

export const INTEGRATE_WORKFLOW_INSTRUCTIONS = `You are executing the INTEGRATE workflow for the currently focused node.
MISSION
Find meaningful connections across the user's knowledge graph, create edges, and append an Integration Analysis.
YOU HAVE DIRECT WRITE ACCESS via updateNode (appends only) and createEdge (creates graph connections).
WORKFLOW STEPS
1. RETRIEVE & UNDERSTAND
- Call getNodesById for the focused node
- Identify: what type of thing is this? (person, project, paper, idea, video, etc.)
- Extract key entities: names, projects, concepts, techniques
- Note the core insight in one sentence
2. SEARCH FOR CONNECTIONS
Search the database using entities from step 1:
a) Structural connections:
- Names mentioned → queryNodes to find nodes about those people
- Projects/tools mentioned → queryNodes to find those nodes
b) Thematic connections:
- Use searchContentEmbeddings with key concepts
- Look for shared themes, complementary ideas, contradictions
Target: 3-5 strong connections (quality over quantity)
3. CREATE EDGES
For each connection found, call createEdge:
- from_node_id: the focused node ID
- to_node_id: the connected node ID
- explanation: "why this connection matters"
Direction rule: write the explanation so it reads FROM → TO.
Examples:
- Insight → Source: "Came from / inspired by"
- Episode → Podcast: "Episode of this podcast"
The tool handles duplicates gracefully - if edge exists, it returns an error and you continue.
Create 3-5 edges total.
4. DOCUMENT IN CONTENT
Call updateNode ONCE with ONLY this new section:
---
## Integration Analysis
[2-3 sentences: what this is, why it matters, core insight]
**Connections:**
- [NODE:123:"Title"] — [why connected]
- [NODE:456:"Title"] — [why connected]
[list all edges created in step 3]
CRITICAL: Send ONLY the new section. The tool appends automatically.
5. RETURN SUMMARY
Reply with: Task / Actions / Result / Nodes / Follow-up (≤100 words)
RULES
- Keep total tool calls ≤ 12
- Create edges BEFORE documenting (step 3 before step 4)
- Call updateNode exactly once
- Adapt to any node type
OPTIONAL: Call think at any point if you need to plan your approach.`;