1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Example Debtmap Configuration: Orchestration Detection Tuning
#
# This example shows how to configure orchestration detection to reduce
# false positives for your specific codebase patterns.
[]
# Weights for combining cyclomatic and cognitive complexity
# Must sum to 1.0. Default favors cognitive complexity (0.7) over cyclomatic (0.3)
= 0.3
= 0.7
# Maximum values for normalization (0-100 scale)
= 50.0
= 100.0
[]
# Minimum number of meaningful function delegations to be considered orchestration
# Increase this if you're getting too many false positives on coordinator functions
= 3 # More strict: require at least 3 delegations
# Whether to exclude adapter patterns (single delegation with data transformation)
# Set to false if you want to flag adapters as potential debt
= true
# Whether to recognize functional chains (map/filter/collect) as idiomatic patterns
# Set to false if you want to flag complex functional chains as orchestration
= true
# Additional function name patterns to exclude from orchestration detection
# Use this to exclude your project-specific patterns that aren't orchestration
= [
"adapt", # Adapter functions
"convert", # Conversion functions
"transform", # Transformation functions
"translate", # Translation functions
"wrap", # Wrapper functions
"proxy", # Proxy functions
"facade", # Facade pattern functions
"bridge", # Bridge pattern functions
"decorator", # Decorator pattern functions
"chain", # Chain of responsibility
"visitor", # Visitor pattern
"strategy", # Strategy pattern
"factory", # Factory pattern (creation, not orchestration)
"builder", # Builder pattern (construction, not orchestration)
"to_", # Conversion functions like to_string, to_json
"from_", # Construction from other types
"as_", # View/reference conversions
"into_", # Consuming conversions
"try_", # Fallible operations
"with_", # Builder-style methods
]
# Additional function name patterns to always consider as orchestration
# Use this to ensure certain patterns are always flagged for review
= [
"orchestrate", # Explicit orchestration
"coordinate", # Coordination logic
"workflow", # Workflow management
"pipeline", # Data pipeline coordination
"saga", # Saga pattern orchestration
"process_all", # Batch processing coordination
"handle_request", # Request handling orchestration
"dispatch", # Event/command dispatching
"route", # Request routing
"schedule", # Task scheduling
"manage", # Resource management
"control", # Control flow orchestration
"execute_steps", # Multi-step execution
"run_sequence", # Sequential orchestration
]
# Note: These patterns are checked in addition to the structural analysis.
# A function must still meet the min_delegations requirement and other
# criteria to be flagged as orchestration.