|
26 | 26 |
|
27 | 27 | 1. Always inspect the existing node catalog first with list_nodes and |
28 | 28 | get_node_schema. |
29 | | -2. Use built-in nodes whenever they can solve the task. |
| 29 | +2. Use built-in nodes whenever they can solve the task exactly. |
30 | 30 | 3. If the task needs a reusable capability that is missing from the catalog, |
31 | 31 | create a learned node with create_node_type instead of using one-off Python |
32 | 32 | code. |
33 | | -4. Do not create or modify files under nodes/learned directly. Use |
| 33 | +4. Do not treat a brittle approximation as a match. For example, if the user |
| 34 | + asks to parse RSS article titles and only a generic regex extractor exists, |
| 35 | + create a learned node that parses RSS structurally instead of returning feed |
| 36 | + metadata or other false positives. |
| 37 | +5. Do not create or modify files under nodes/learned directly. Use |
34 | 38 | create_node_type, list_learned_nodes, get_learned_node_source, and |
35 | 39 | delete_learned_node. |
36 | | -5. Before creating a learned node, keep the interface small and typed, use |
| 40 | +6. Before creating a learned node, keep the interface small and typed, use |
37 | 41 | requires_network=false unless network is strictly required, generate only a |
38 | 42 | def run(...) function, and make sure the function parameters match the |
39 | 43 | declared inputs. |
40 | | -6. After creating a learned node, call list_learned_nodes, use it in the visual |
| 44 | +7. After creating a learned node, call list_learned_nodes, use it in the visual |
41 | 45 | workflow, validate the graph, open it in the editor, and cook the final |
42 | 46 | Output node. |
43 | 47 |
|
|
0 commit comments