Wiki Add Edge
Create a typed edge between two pages in the knowledge graph.
HARD-GATE
Tool
vault_add_edge
Parameters
| Param | Required | Description |
|---|---|---|
| source | yes | Source page path (e.g., "concepts/transformer.md") |
| target | yes | Target page path (e.g., "concepts/attention.md") |
| edge_type | yes | One of: component_of, instance_of, supported_by, contradicts, supersedes, derived_from, addresses, raises, failed_for, related_to |
| weight | no | Edge weight 0.0-1.0 (default 1.0) |
Protocol
- Verify both source and target files exist
- Select appropriate edge_type based on the semantic relationship
- Call
vault_add_edge - If duplicate rejected, this is expected — the relationship already exists
- Inline wikilink: Ensure the source page body contains
[[dir/slug]]pointing to the target (dir/slug = target path minus.md). Place at a semantically relevant location. If already present, skip. If no suitable location, append a sentence containing the wikilink at end of body. - Return result to calling tactic
Edge Type Selection Guide
| Relationship | Edge Type |
|---|---|
| A is part of B | component_of |
| A is an example of B | instance_of |
| A provides evidence for B | supported_by |
| A conflicts with B | contradicts |
| A replaces B | supersedes |
| A was built from B | derived_from |
| A answers/solves B | addresses |
| A creates/implies B (question) | raises |
| A didn't work for B | failed_for |
| A is related to B (weak) | related_to |
Yield
Returns: { success: boolean, edge_type: string, edge_count: number }