You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prepares the tool for integration with kubecompare MCP (openshift-kni#12)
* Prepares the tool for integration with kubecompare MCP by allowing external use of the required methods.
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Mario Vazquez <mavazque@redhat.com>
* Added RabbitCI suggestions
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Mario Vazquez <mavazque@redhat.com>
* claude.md is a link to agents.md now
Signed-off-by: Mario Vazquez <mavazque@redhat.com>
---------
Signed-off-by: Mario Vazquez <mavazque@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+19-18Lines changed: 19 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,25 +4,26 @@ This document provides guidelines for AI agents working with the RDS Analyzer co
4
4
5
5
## Project Overview
6
6
7
-
RDS Analyzer is a Go CLI tool that evaluates evaluates kube-compare JSON reports against a set of rules. It determines the impact of configuration deviations and generates text or HTML reports.
7
+
RDS Analyzer is a Go CLI tool and library that evaluates kube-compare JSON reports against a set of rules. It determines the impact of configuration deviations and generates text or HTML reports.
8
8
9
9
## Architecture
10
10
11
11
### Package Structure
12
12
13
-
```
14
-
internal/
13
+
```text
14
+
pkg/ # Public library API - importable by external Go modules
└── types/ # Data structures - shared types for validation reports
20
+
internal/
21
+
└── cli/ # Cobra CLI - command parsing and flag handling (not importable)
21
22
```
22
23
23
24
### Data Flow
24
25
25
-
1. CLI loads rules YAML (`-r`). For a full run, `analyzer.New` calls `rules.ValidateRulesRegexpPatterns` (which walks the YAML AST with `validateRegexPatternsFromYAML`), then builds `rules.Engine`. With **`--validate-rules-only`**, the CLI calls `rules.ValidateRulesRegexpPatterns` only and exits without building an engine or reading input JSON. On regexp failure, the process exits before reading input.
26
+
1. CLI loads rules YAML (`-r`). For a full run, `analyzer.New` calls `rules.ValidateRulesRegexpPatterns` (which walks the YAML AST with `validateRegexPatternsFromYAML`), then builds `rules.Engine`. With **`--validate-rules-only`**, the CLI calls `rules.ValidateRulesRegexpPatterns` only and exits without building an engine or reading input JSON. On regexp failure, the process exits before reading input. For library usage, `analyzer.NewFromBytes` accepts in-memory YAML rules bytes instead of a file path.
26
27
2. CLI reads JSON input (file or stdin) into `types.ValidationReport`
27
28
3.`analyzer.Analyzer` orchestrates processing:
28
29
- Uses the loaded `rules.Engine`
@@ -34,7 +35,7 @@ internal/
34
35
35
36
### Regex Validation
36
37
37
-
All regex patterns in rule files are validated by `rules.ValidateRulesRegexpPatterns` (YAML regexp walk). `analyzer.New` invokes it before constructing the engine for normal analysis. The **`--validate-rules-only`** path runs the same validation from `internal/cli` without loading the full analyzer. This includes:
38
+
All regex patterns in rule files are validated by `rules.ValidateRulesRegexpPatterns` (YAML regex walk). `analyzer.New` invokes it before constructing the engine for normal analysis. The **`--validate-rules-only`** path runs the same validation from the CLI without loading the full analyzer. This includes:
38
39
-`regex` patterns in condition rules (global_rules, rules)
0 commit comments