@@ -17,15 +17,15 @@ public sealed class RegexRuleEngine
1717 /// <summary>
1818 /// Evaluates a command against regex-based rules, considering git context.
1919 /// </summary>
20- public Task < RiskAssessment > EvaluateAsync (
20+ public static Task < RiskAssessment > EvaluateAsync (
2121 string command ,
2222 string claimedPurpose ,
2323 string workingDirectory ,
2424 IReadOnlyList < CommandRecord > sessionHistory ,
2525 CancellationToken cancellationToken = default )
2626 {
2727 // Build command context with git information
28- var context = this . BuildContext ( command , workingDirectory ) ;
28+ var context = BuildContext ( command , workingDirectory ) ;
2929
3030 // Evaluate all rules in order
3131 foreach ( var rule in CommandRules . DefaultRules )
@@ -55,7 +55,7 @@ public Task<RiskAssessment> EvaluateAsync(
5555 } ) ;
5656 }
5757
58- private CommandContext BuildContext ( string command , string workingDirectory )
58+ private static CommandContext BuildContext ( string command , string workingDirectory )
5959 {
6060 var context = new CommandContext { Command = command , WorkingDirectory = workingDirectory } ;
6161
@@ -73,27 +73,27 @@ private CommandContext BuildContext( string command, string workingDirectory )
7373 }
7474
7575 // Try to get current branch
76- if ( this . TryRunGitCommand ( workingDirectory , "rev-parse --abbrev-ref HEAD" , out var currentBranch ) )
76+ if ( TryRunGitCommand ( workingDirectory , "rev-parse --abbrev-ref HEAD" , out var currentBranch ) )
7777 {
7878 context = context with { CurrentBranch = currentBranch . Trim ( ) } ;
7979 }
8080
8181 // Try to get remote URL
82- if ( this . TryRunGitCommand ( workingDirectory , "config --get remote.origin.url" , out var remoteUrl ) )
82+ if ( TryRunGitCommand ( workingDirectory , "config --get remote.origin.url" , out var remoteUrl ) )
8383 {
8484 context = context with { RemoteUrl = remoteUrl . Trim ( ) } ;
8585 }
8686
8787 // Try to check if merge is in progress
88- if ( this . TryRunGitCommand ( workingDirectory , "rev-parse -q --verify MERGE_HEAD" , out _ ) )
88+ if ( TryRunGitCommand ( workingDirectory , "rev-parse -q --verify MERGE_HEAD" , out _ ) )
8989 {
9090 context = context with { IsMergeInProgress = true } ;
9191 }
9292
9393 return context ;
9494 }
9595
96- private bool TryRunGitCommand ( string workingDirectory , string arguments , out string output )
96+ private static bool TryRunGitCommand ( string workingDirectory , string arguments , out string output )
9797 {
9898 try
9999 {
0 commit comments