add_dependency
Adds one dependency (arrow) between two existing org blocks. Type 'business' (the default, dashed unless style says otherwise) is a business relation between two blocks, whether or not one is the parent of the other: an ownership share (a stake of any size, including a stake held by a parent in its own child), a lease, a service. Type 'structural' (solid) is a hierarchy link; parent/child arrows are created automatically by add_cell (with parentId) and move_cell, so a hand-made structural arrow is only needed where those do not apply: typically a parent in 'hat' mode, whose children are root blocks without parentId. Not for the relations between ERD fields (add_relation) nor for the flows of arch/process/journey/captable diagrams (connect_kind_nodes). REFUSED, nothing written, when the id already exists, when fromId equals toId, or when either block is unknown. Per-arrow appearance: style, animated, color (ColorKey), strokeWidth, fromAnchor/toAnchor. shares (default 0) is the ownership percentage the arrow carries: the group ownership look-through (compute_group_ownership) reads it on 'business' arrows only, and ignores a value that is zero, negative or greater than one hundred (the percentage is then read from the label). An existing arrow is changed with update_dependency (type included) and removed with delete_dependency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique ID (e.g. 'dep-coretech-aaas') | |
| toId | Yes | ID of the destination block | |
| type | No | business = dashed business arrow, structural = solid hierarchy | |
| color | No | Stroke color (ColorKey palette) | |
| label | No | Text on the arrow | |
| style | No | ||
| fromId | Yes | ID of the source block | |
| shares | No | Ownership percentage carried by the arrow (default 0); read by compute_group_ownership on 'business' arrows only, a value that is zero, negative or greater than one hundred being ignored | |
| animated | No | Enables the 'dash flow' animation on the arrow | |
| toAnchor | No | Destination anchor point | |
| fromAnchor | No | Source anchor point | |
| strokeWidth | No | Stroke width in px (≈ 0.5 to 8) | |
| expectedProjectId | No | UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted. |