Commit 8373e3f
Your Name
feat(pipeline): auto-detect execution flows from entry points via BFS + Louvain
Add process detection as a post-indexing pass that discovers cross-community
execution flows:
1. Find all entry point nodes (is_entry_point=true or Route label)
2. Load CALLS edges and run Louvain community detection
3. BFS from each entry point to depth 8, max 200 visited nodes
4. Identify the deepest node that crosses a Louvain community boundary
5. Name the flow 'EntryPoint → Terminal' with process_type=cross_community
6. Store to new processes + process_steps tables
New schema: 'processes' table (id, project, label, process_type, step_count,
entry_point_id, terminal_id) and 'process_steps' table (process_id, node_id, step).
New store API: cbm_store_detect_processes(), cbm_store_list_processes(),
cbm_store_get_process_steps() with corresponding free functions.
New MCP tool: list_processes returns up to 300 processes ordered by step count.
Tested: TS/Hapi monorepo detects 300 cross-community processes, matching
the flow count from competing tools. Examples: 'ssoCallbackHandler →
catchUnexpectedResponse', 'exportCourse → sendSQSMessage'.1 parent 358de42 commit 8373e3f
4 files changed
Lines changed: 414 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
284 | 291 | | |
285 | 292 | | |
286 | 293 | | |
| |||
1158 | 1165 | | |
1159 | 1166 | | |
1160 | 1167 | | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
1161 | 1207 | | |
1162 | 1208 | | |
1163 | 1209 | | |
| |||
2919 | 2965 | | |
2920 | 2966 | | |
2921 | 2967 | | |
| 2968 | + | |
| 2969 | + | |
| 2970 | + | |
2922 | 2971 | | |
2923 | 2972 | | |
2924 | 2973 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
831 | 842 | | |
832 | 843 | | |
833 | 844 | | |
| |||
0 commit comments