From 0293cc3ef315a441ef049b21771b0002bb4b22bc Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Wed, 10 Dec 2025 10:03:16 -0500 Subject: [PATCH 1/8] Add IDE dirs to gitignore --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 66fab6a..4d17cf3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ audit-cli output/ -bin/ \ No newline at end of file +bin/ +.idea/ +.vscode/ From 14db95688cda8143107f30852eb5cd9cbb843596 Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Wed, 10 Dec 2025 10:06:40 -0500 Subject: [PATCH 2/8] Remove '(s)' for more readable output --- README.md | 10 +++++----- commands/compare/file-contents/output.go | 13 ++++++------- commands/extract/procedures/procedures_test.go | 2 +- internal/rst/parser.go | 3 +-- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 5ecbd17..164a98b 100644 --- a/README.md +++ b/README.md @@ -218,19 +218,19 @@ Examples: With the `-v` flag, the command shows detailed information about each procedure: ``` -Found 36 unique procedure(s): +Found 36 unique procedures: 1. Before You Begin Output file: before-you-begin-pull-the-mongodb-docker-image-e8eeec.rst Steps: 5 - Appears in 2 selection(s): + Appears in 2 selections: - docker, None, None, None, None, None, without-search-docker - docker, None, None, None, None, None, with-search-docker 2. Install MongoDB Community Edition Output file: install-mongodb-community-edition-download-the-tarball-44c437.rst Steps: 4 - Appears in 1 selection(s): + Appears in 1 selections: - macos, None, None, tarball, None, None, None ``` @@ -771,7 +771,7 @@ Procedure Details Implementation: procedure-directive Steps: 5 Contains sub-procedures: no - Appears in 2 selection(s): + Appears in 2 selections: - docker, None, None, None, None, None, without-search-docker - docker, None, None, None, None, None, with-search-docker @@ -787,7 +787,7 @@ Procedure Details Implementation: ordered-list Steps: 4 Contains sub-procedures: yes - Appears in 10 selection(s): + Appears in 10 selections: - linux, None, None, tarball, None, None, with-search - linux, None, None, tarball, None, None, without-search ... diff --git a/commands/compare/file-contents/output.go b/commands/compare/file-contents/output.go index 4634d68..5a86d86 100644 --- a/commands/compare/file-contents/output.go +++ b/commands/compare/file-contents/output.go @@ -62,16 +62,16 @@ func printSummary(result *ComparisonResult) { // Show breakdown if result.MatchingFiles > 0 { - fmt.Printf(" - %d version(s) match\n", result.MatchingFiles) + fmt.Printf(" - %d versions match\n", result.MatchingFiles) } if result.DifferingFiles > 0 { - fmt.Printf(" - %d version(s) differ\n", result.DifferingFiles) + fmt.Printf(" - %d versions differ\n", result.DifferingFiles) } if result.NotFoundFiles > 0 { - fmt.Printf(" - %d version(s) not found (file does not exist)\n", result.NotFoundFiles) + fmt.Printf(" - %d versions not found (file does not exist)\n", result.NotFoundFiles) } if result.ErrorFiles > 0 { - fmt.Printf(" - %d version(s) had errors\n", result.ErrorFiles) + fmt.Printf(" - %d versions had errors\n", result.ErrorFiles) } // Show hints (only in version comparison mode) @@ -88,10 +88,10 @@ func printSummary(result *ComparisonResult) { // No differences, but some files not found or had errors fmt.Printf("✓ No differences found among existing files\n") if result.NotFoundFiles > 0 { - fmt.Printf(" - %d version(s) not found (file does not exist)\n", result.NotFoundFiles) + fmt.Printf(" - %d versions not found (file does not exist)\n", result.NotFoundFiles) } if result.ErrorFiles > 0 { - fmt.Printf(" - %d version(s) had errors\n", result.ErrorFiles) + fmt.Printf(" - %d versions had errors\n", result.ErrorFiles) } } } @@ -200,4 +200,3 @@ func printDiffs(result *ComparisonResult) { fmt.Println(strings.Repeat("=", 80)) } - diff --git a/commands/extract/procedures/procedures_test.go b/commands/extract/procedures/procedures_test.go index 802db83..4cd5292 100644 --- a/commands/extract/procedures/procedures_test.go +++ b/commands/extract/procedures/procedures_test.go @@ -65,7 +65,7 @@ func TestParseFileWithFilter(t *testing.T) { } } - t.Logf("Found %d procedure(s) matching 'python'", len(variations)) + t.Logf("Found %d procedures matching 'python'", len(variations)) } func TestParseFileDeterministic(t *testing.T) { diff --git a/internal/rst/parser.go b/internal/rst/parser.go index a7a7bb0..9214bca 100644 --- a/internal/rst/parser.go +++ b/internal/rst/parser.go @@ -68,7 +68,7 @@ func ParseFileWithIncludes( } if verbose && len(includeFiles) > 0 { - fmt.Printf(" Found %d include(s) in %s\n", len(includeFiles), filepath.Base(filePath)) + fmt.Printf(" Found %d includes in %s\n", len(includeFiles), filepath.Base(filePath)) } // Recursively parse included files @@ -88,4 +88,3 @@ func ParseFileWithIncludes( return processedFiles, nil } - From 32a56093d84340663479c07b5525c87f75637101 Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Wed, 10 Dec 2025 10:50:44 -0500 Subject: [PATCH 3/8] Add an AGENTS.md file to help with LLM-augmented development --- AGENTS.md | 427 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 427 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..88e1472 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,427 @@ +# AGENTS.md - LLM Development Guide for audit-cli + +This document provides essential context for LLMs performing development tasks in the `audit-cli` repository. + +## Repository Overview + +**Purpose**: A Go CLI tool for auditing and analyzing MongoDB's reStructuredText (RST) documentation. + +**Key Capabilities**: +- Extract code examples and procedures from RST files +- Search documentation for patterns +- Analyze file dependencies and relationships +- Compare files across documentation versions +- Count documentation pages and tested code examples + +**Target Users**: MongoDB technical writers performing maintenance, scoping work, and reporting. + +## Project Structure + +``` +audit-cli/ +├── main.go # CLI entry point using cobra +├── go.mod # Module: github.com/mongodb/code-example-tooling/audit-cli +├── commands/ # Command implementations (parent + subcommands) +│ ├── extract/ # Extract content from RST files +│ │ ├── extract.go # Parent command +│ │ ├── code-examples/ # Extract code examples subcommand +│ │ └── procedures/ # Extract procedures subcommand +│ ├── search/ # Search through files +│ │ └── find-string/ # Find string subcommand +│ ├── analyze/ # Analyze RST structures +│ │ ├── includes/ # Analyze include relationships +│ │ ├── usage/ # Find file usages +│ │ └── procedures/ # Analyze procedure variations +│ ├── compare/ # Compare files across versions +│ │ └── file-contents/ # Compare file contents +│ └── count/ # Count documentation content +│ ├── tested-examples/ # Count tested code examples +│ └── pages/ # Count documentation pages +├── internal/ # Internal packages (not importable externally) +│ ├── projectinfo/ # MongoDB docs project structure utilities +│ │ ├── pathresolver.go # Path resolution +│ │ ├── source_finder.go # Source directory detection +│ │ └── version_resolver.go # Version path resolution +│ └── rst/ # RST parsing utilities +│ ├── parser.go # Generic parsing with includes +│ ├── directive_parser.go # Directive parsing +│ ├── directive_regex.go # Regex patterns for directives +│ ├── parse_procedures.go # Procedure parsing (core logic) +│ └── get_procedure_variations.go # Variation extraction +├── testdata/ # Test fixtures (auto-ignored by Go build) +│ ├── input-files/source/ # Test RST files +│ ├── expected-output/ # Expected extraction results +│ ├── compare/ # Compare command test data +│ └── count-test-monorepo/ # Count command test data +├── bin/ # Build output directory +├── docs/ # Additional documentation +│ └── PROCEDURE_PARSING.md # Detailed procedure parsing logic +└── README.md # Comprehensive user documentation + +``` + +## Technology Stack + +- **Language**: Go 1.24 +- **CLI Framework**: [spf13/cobra](https://github.com/spf13/cobra) v1.10.1 +- **Diff Library**: [aymanbagabas/go-udiff](https://github.com/aymanbagabas/go-udiff) v0.3.1 +- **YAML Parsing**: gopkg.in/yaml.v3 v3.0.1 +- **Testing**: Go standard library (`testing` package) + +## Domain Knowledge: MongoDB Documentation + +### RST Directives Supported + +**Code Example Directives**: +- `.. literalinclude::` - Transclude code from external files +- `.. code-block::` - Inline code blocks +- `.. io-code-block::` - Input/output code examples with `.. input::` and `.. output::` sub-directives + +**Procedure Directives**: +- `.. procedure::` with `.. step::` - Structured procedures +- Ordered lists (numbered `1.` or lettered `a.`) - Simple procedures +- `#.` - Continuation marker (auto-numbered) +- YAML steps files - Converted to procedures during build + +**Variation Mechanisms**: +- `.. composable-tutorial::` with `.. selected-content::` - Content variations by selection +- `.. tabs::` with `.. tab::` and `:tabid:` - Tabbed content variations + +**Content Inclusion**: +- `.. include::` - Include RST content from other files +- `.. toctree::` - Table of contents (navigation, not content inclusion) + +### MongoDB Documentation Structure + +**Versioned Projects**: `content/{project}/{version}/source/` +- Versions: `manual`, `current`, `upcoming`, `v8.0`, `v7.0`, etc. + +**Non-versioned Projects**: `content/{project}/source/` + +**Tested Code Examples**: `content/code-examples/tested/{language}/{product}/` +- Products: `pymongo`, `mongosh`, `go/driver`, `go/atlas-sdk`, `javascript/driver`, `java/driver-sync`, `csharp/driver` + +## Building and Running + +### Build from Source +```bash +cd bin +go build ../ +./audit-cli --help +``` + +### Run Without Building +```bash +go run main.go [command] [flags] +``` + +### Run Tests +```bash +# All tests +go test ./... + +# Specific package +go test ./commands/extract/code-examples -v + +# Specific test +go test ./commands/extract/code-examples -run TestLiteralIncludeDirective -v + +# With coverage +go test ./... -cover +``` + +## Development Patterns + +### Command Structure + +**Parent-Subcommand Pattern**: All commands follow a two-level hierarchy: +- Parent command (e.g., `extract`, `analyze`) - defined in `commands/{parent}/{parent}.go` +- Subcommand (e.g., `code-examples`, `procedures`) - defined in `commands/{parent}/{subcommand}/{subcommand}.go` + +**File Organization per Subcommand**: +``` +commands/{parent}/{subcommand}/ +├── {subcommand}.go # Command definition and RunE function +├── {subcommand}_test.go # Tests +├── types.go # Type definitions +├── parser.go or analyzer.go # Core logic +├── output.go or report.go # Output formatting +└── (other domain-specific files) +``` + +**Command Registration**: Parent commands register subcommands in their `New{Parent}Command()` function: +```go +func NewExtractCommand() *cobra.Command { + cmd := &cobra.Command{Use: "extract", Short: "..."} + cmd.AddCommand(codeexamples.NewCodeExamplesCommand()) + cmd.AddCommand(procedures.NewProceduresCommand()) + return cmd +} +``` + +### Error Handling + +- Use `fmt.Errorf()` for error wrapping with context +- Return errors from functions; handle at command level +- Print errors to stderr using `fmt.Fprintf(os.Stderr, ...)` +- Exit with non-zero status on errors + +### Testing Conventions + +**Test Data Location**: `testdata/` directory (auto-ignored by Go build) +- Input files: `testdata/input-files/source/` +- Expected output: `testdata/expected-output/` +- Relative path from test: `filepath.Join("..", "..", "..", "testdata")` + +**Test Patterns**: +- Table-driven tests for multiple scenarios +- Temporary directories for output: `os.MkdirTemp("", "test-*")` +- Clean up with `defer os.RemoveAll(tempDir)` +- Byte-for-byte content comparison for extracted files + +**Deterministic Testing**: Critical for procedure parsing +- All map iterations must be sorted +- Content hashing must use sorted keys +- Run tests multiple times to verify determinism + +### Code Patterns + +**Path Resolution**: +- Use `filepath.Join()` for cross-platform paths +- Use `filepath.Abs()` to get absolute paths +- Use `internal/projectinfo` for MongoDB-specific path resolution + +**RST Parsing**: +- Use `internal/rst` package for directive parsing +- Use regex patterns from `internal/rst/directive_regex.go` +- Handle include directives with `ParseFileWithIncludes()` + +**Output Formatting**: +- Separate output logic into `output.go` or `report.go` +- Support multiple output formats (text, JSON) where applicable +- Use consistent formatting (headers with `=` separators, indentation) + +## Key Design Decisions + +### RST Parsing Strategy + +**Incremental, Opportunistic Parsing**: RST parsing capabilities are added incrementally as needed by various commands, rather than using a complete AST-based parser. + +**Rationale**: +- MongoDB documentation uses many custom directives not supported by standard reStructuredText parsing libraries +- A complete parser converting RST to an AST would require significant operational overhead that is not needed at this time +- Targeted parsing for specific directives is more maintainable and performant for this use case + +**Critical Rule**: All new RST parsing functionality MUST be added to the `internal/rst` module, NOT to individual command modules. This ensures: +- Parsing capabilities can be reused across commands +- Functionality can be expanded incrementally +- Parsing logic remains centralized and maintainable + +**Implementation Pattern**: +1. Add regex patterns to `internal/rst/directive_regex.go` +2. Add directive types and parsing logic to `internal/rst/directive_parser.go` +3. Add specialized parsing functions (e.g., `parse_procedures.go`) as separate files in `internal/rst` +4. Commands import and use functions from `internal/rst` package + +### Procedure Parsing + +**Uniqueness**: Procedures are grouped by heading + content hash +- Same heading, different content → separate procedures +- Same content, multiple selections → one procedure with multiple appearances + +**Analysis vs. Extraction**: +- **Analysis**: Groups procedures by heading, shows variations +- **Extraction**: Creates one file per unique procedure (by content hash) + +**Determinism**: All operations must produce consistent results +- Sort all map iterations +- Use sorted keys for hashing +- Critical for testing and CI/CD + +See `docs/PROCEDURE_PARSING.md` for comprehensive details. + +### Include Directive Handling + +**Context-Aware Expansion**: +- No composable tutorial → Expand all includes globally +- Composable tutorial with selected-content in main file → Expand includes within blocks +- Composable tutorial with includes in steps → Expand to detect selected-content blocks + +### Version Comparison + +**Auto-Discovery**: Automatically detects product directory and available versions from file path +- Pattern: `/path/to/{product}/{version}/source/...` +- Discovers all sibling version directories unless `--versions` specified + +## Adding New Commands + +### 1. Create Subcommand Directory +```bash +mkdir -p commands/{parent}/{subcommand} +``` + +### 2. Create Command File +Create `commands/{parent}/{subcommand}/{subcommand}.go`: +```go +package subcommand + +import ( + "github.com/spf13/cobra" +) + +func NewSubcommandCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "subcommand", + Short: "Brief description", + Long: `Detailed description`, + Args: cobra.ExactArgs(1), // or cobra.NoArgs, etc. + RunE: runSubcommand, + } + + // Add flags + cmd.Flags().StringP("output", "o", "./output", "Output directory") + + return cmd +} + +func runSubcommand(cmd *cobra.Command, args []string) error { + // Implementation + return nil +} +``` + +### 3. Create Supporting Files +- `types.go` - Type definitions +- `{subcommand}_test.go` - Tests +- Domain-specific files (parser, analyzer, output, etc.) + +### 4. Register with Parent Command +In `commands/{parent}/{parent}.go`: +```go +import "github.com/mongodb/code-example-tooling/audit-cli/commands/{parent}/{subcommand}" + +func New{Parent}Command() *cobra.Command { + cmd := &cobra.Command{...} + cmd.AddCommand(subcommand.NewSubcommandCommand()) + return cmd +} +``` + +### 5. Add Tests +Create test fixtures in `testdata/` and write tests following existing patterns. + +## Common Tasks + +### Adding a New RST Directive + +1. **Add regex pattern** to `internal/rst/directive_regex.go`: +```go +var MyDirectiveRegex = regexp.MustCompile(`^\.\.\s+my-directive::\s*(.*)$`) +``` + +2. **Add directive type** to `internal/rst/directive_parser.go`: +```go +const ( + MyDirective DirectiveType = "my-directive" +) +``` + +3. **Add parsing logic** in `ParseDirectives()` function + +4. **Add tests** in appropriate test file + +### Updating Expected Test Output + +When changing parsing logic: +```bash +# Regenerate expected output +./bin/audit-cli extract code-examples testdata/input-files/source/literalinclude-test.rst \ + -o testdata/expected-output + +# Verify changes are correct before committing +git diff testdata/expected-output/ +``` + +### Adding Support for a New Product + +For `count tested-examples` command: + +1. Add product to valid products list in `commands/count/tested-examples/counter.go` +2. Update README.md with new product +3. Add test data to `testdata/count-test-monorepo/content/code-examples/tested/` +4. Update tests in `tested_examples_test.go` + +## Important Notes for LLMs + +### When Making Changes + +1. **Always check existing patterns** - Look at similar commands/functions before implementing new ones +2. **Maintain consistency** - Follow the established file organization and naming conventions +3. **Update tests** - All changes should include corresponding test updates +4. **Check determinism** - For procedure parsing, verify output is consistent across runs +5. **Update documentation** - Keep README.md, AGENTS.md, and PROCEDURE_PARSING.md in sync with code changes + +### Common Pitfalls + +1. **Map iteration order** - Always sort map keys before iterating (especially in procedure parsing) +2. **Path separators** - Use `filepath.Join()` instead of string concatenation +3. **Relative paths in tests** - Remember tests are 3 levels deep: `commands/{parent}/{subcommand}/` +4. **Include directive resolution** - Use `internal/projectinfo` for MongoDB-specific path conventions +5. **Testdata directory** - This is a special Go convention; files here are ignored during builds + +### Testing Requirements + +- **Unit tests** for all new functions +- **Integration tests** for command execution +- **Determinism tests** for procedure parsing +- **Table-driven tests** for multiple scenarios +- **Test coverage** should not decrease + +### Documentation Requirements + +- **Package-level comments** for all packages +- **Function comments** for exported functions +- **README.md updates** for user-facing changes +- **PROCEDURE_PARSING.md updates** for procedure parsing logic changes +- **Inline comments** for complex logic + +## Resources + +- **README.md**: Comprehensive user documentation and development guide +- **docs/PROCEDURE_PARSING.md**: Detailed procedure parsing business logic +- **Go Cobra Documentation**: https://github.com/spf13/cobra +- **MongoDB RST Conventions**: See examples in `testdata/input-files/source/` + +## Quick Reference + +### File Naming Conventions +- Commands: `{subcommand}.go` +- Tests: `{subcommand}_test.go` +- Types: `types.go` +- Core logic: `parser.go`, `analyzer.go`, `counter.go`, etc. +- Output: `output.go`, `report.go` + +### Import Path +```go +import "github.com/mongodb/code-example-tooling/audit-cli/{package}" +``` + +### Running Specific Tests +```bash +# By package +go test ./internal/rst -v + +# By function name +go test ./commands/extract/procedures -run TestParseFileDeterministic -v + +# With race detection +go test ./... -race +``` + +### Build Tags +None currently used in this project. + +### Environment Variables +None currently used in this project. + + From d312503311f32d7fb79c68879f541a9cb3df09d2 Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Wed, 10 Dec 2025 10:58:38 -0500 Subject: [PATCH 4/8] Add comment to reinforce rST centralization for LLM-aided development --- internal/rst/directive_regex.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/rst/directive_regex.go b/internal/rst/directive_regex.go index cc063ac..4ea7249 100644 --- a/internal/rst/directive_regex.go +++ b/internal/rst/directive_regex.go @@ -6,6 +6,17 @@ import "regexp" // // This file contains all regular expressions for matching RST directives. // These patterns are shared across the codebase to ensure consistency. +// +// IMPORTANT: This is the ONLY place where RST directive regex patterns should be defined. +// When adding support for new RST directives: +// 1. Add the regex pattern to this file +// 2. Add corresponding parsing logic to directive_parser.go or a specialized parser file +// 3. DO NOT define RST regex patterns in individual command modules +// +// This centralization ensures: +// - Parsing capabilities can be reused across commands +// - Functionality can be expanded incrementally +// - Parsing logic remains maintainable and consistent // IncludeDirectiveRegex matches .. include:: directives in RST files. // Example: .. include:: /path/to/file.rst From d0a3ebda811914466174b1b9a25fe64b9ed46964 Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Wed, 10 Dec 2025 11:10:26 -0500 Subject: [PATCH 5/8] Add versioning to the project --- AGENTS.md | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++ main.go | 14 ++++++-- 3 files changed, 206 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG.md diff --git a/AGENTS.md b/AGENTS.md index 88e1472..232cde0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -115,6 +115,12 @@ go build ../ go run main.go [command] [flags] ``` +### Check Version +```bash +./audit-cli --version +# Output: audit-cli version 0.1.0 +``` + ### Run Tests ```bash # All tests @@ -130,6 +136,98 @@ go test ./commands/extract/code-examples -run TestLiteralIncludeDirective -v go test ./... -cover ``` +## Versioning + +This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (SemVer): + +- **MAJOR** version (X.0.0): Incompatible API changes or breaking changes to command behavior +- **MINOR** version (0.X.0): New functionality added in a backward-compatible manner +- **PATCH** version (0.0.X): Backward-compatible bug fixes + +**Note**: While in `0.x.x` versions, breaking changes may occur in minor releases. Version `1.0.0` will signal a stable, production-ready release. + +### When to Increment Versions + +- **MAJOR** (e.g., 0.5.0 → 1.0.0): + - Breaking changes to command syntax or flags + - Removal of commands or features + - Changes to output format that break existing scripts + - First stable release (0.x.x → 1.0.0) + +- **MINOR** (e.g., 0.1.0 → 0.2.0): + - New commands or subcommands + - New flags or options + - New RST directive support + - New output formats (when existing formats remain unchanged) + - Significant new features + +- **PATCH** (e.g., 0.1.0 → 0.1.1): + - Bug fixes + - Performance improvements + - Documentation updates + - Internal refactoring with no user-facing changes + +### Releasing a New Version + +When releasing a new version, follow these steps: + +1. **Update the version constant** in `main.go`: + ```go + const version = "0.2.0" // Update this line + ``` + +2. **Update CHANGELOG.md** following the [Keep a Changelog](https://keepachangelog.com/) format: + ```markdown + ## [0.2.0] - YYYY-MM-DD + + ### Added + - New feature descriptions + + ### Changed + - Modified behavior descriptions + + ### Fixed + - Bug fix descriptions + + ### Removed + - Removed feature descriptions (if any) + ``` + +3. **Test the version output**: + ```bash + go run main.go --version + # Should display: audit-cli version 0.2.0 + ``` + +4. **Commit the changes**: + ```bash + git add main.go CHANGELOG.md + git commit -m "Release version 0.2.0" + ``` + +5. **Tag the release** (optional but recommended): + ```bash + git tag v0.2.0 + git push origin v0.2.0 + ``` + +### CHANGELOG Format + +The CHANGELOG.md follows the [Keep a Changelog](https://keepachangelog.com/) format with these sections: + +- **Added**: New features, commands, or capabilities +- **Changed**: Changes to existing functionality +- **Deprecated**: Features that will be removed in future versions +- **Removed**: Features that have been removed +- **Fixed**: Bug fixes +- **Security**: Security-related changes + +Each version entry should include: +- Version number in square brackets: `[0.2.0]` +- Release date in ISO format: `YYYY-MM-DD` +- Organized sections with bullet points describing changes +- User-facing language (avoid technical jargon when possible) + ## Development Patterns ### Command Structure diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..b6108c7 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,96 @@ +# Changelog + +All notable changes to audit-cli will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.1.0] - 2025-12-10 + +### Added + +Initial release after splitting from the MongoDB code-example-tooling monorepo. + +#### Extract Commands +- `extract code-examples` - Extract code examples from RST files + - Supports `literalinclude`, `code-block`, and `io-code-block` directives + - Handles partial file extraction with `:start-after:`, `:end-before:`, `:lines:` options + - Automatic language detection and normalization + - Recursive directory scanning + - Follow include directives to process entire documentation trees +- `extract procedures` - Extract procedures from RST files + - Supports `procedure` directive with `step` sub-directives + - Supports ordered lists (numbered and lettered) + - Detects and extracts procedure variations (tabs, composable tutorials) + - Content-based deduplication using hashing + - Optional include directive expansion + +#### Search Commands +- `search find-string` - Search for substrings in documentation files + - Case-sensitive and case-insensitive search modes + - Exact word matching or partial matching + - Recursive directory scanning + - Follow include directives + - Language breakdown in verbose mode + +#### Analyze Commands +- `analyze includes` - Analyze include directive relationships + - Tree view of include dependencies + - Flat list of all included files + - Circular include detection + - Maximum depth tracking +- `analyze usage` - Find all files that use a target file + - Tracks `include`, `literalinclude`, and `io-code-block` references + - Optional toctree entry tracking + - Recursive mode to find all documentation pages that ultimately use a file + - Path exclusion support +- `analyze procedures` - Analyze procedure variations and statistics + - Count procedures and variations + - Detect implementation types (directive vs ordered list) + - Step count analysis + - Sub-procedure detection + - Variation listing (composable tutorial selections and tabids) + +#### Compare Commands +- `compare file-contents` - Compare file contents across versions + - Direct comparison between two files + - Version comparison mode with auto-discovery + - Unified diff output + - Progressive detail levels (summary, paths, diffs) + +#### Count Commands +- `count tested-examples` - Count tested code examples in the monorepo + - Total count across all products + - Per-product breakdown + - Per-language breakdown + - Supports: pymongo, mongosh, go/driver, go/atlas-sdk, javascript/driver, java/driver-sync, csharp/driver +- `count pages` - Count documentation pages (.txt files) + - Total count across all projects + - Per-project breakdown + - Per-version breakdown + - Automatic exclusions (code-examples, meta directories) + - Custom directory exclusions + - Current version only mode + +#### Internal Packages +- `internal/rst` - RST parsing utilities + - Directive parsing (literalinclude, code-block, io-code-block, procedure, step, tabs, composable-tutorial) + - Include directive following with circular detection + - Procedure parsing with variation detection + - Content extraction with partial file support +- `internal/projectinfo` - MongoDB documentation structure utilities + - Source directory detection + - Product directory detection + - Version path resolution + +#### Documentation +- Comprehensive README.md with usage examples +- PROCEDURE_PARSING.md with detailed procedure parsing business logic +- AGENTS.md for LLM development assistance + +### Technical Details +- Built with Go 1.24 +- Uses spf13/cobra v1.10.1 for CLI framework +- Uses aymanbagabas/go-udiff v0.3.1 for diff generation +- Comprehensive test coverage with deterministic testing for procedure parsing + diff --git a/main.go b/main.go index c9a8d2c..8c9ae77 100644 --- a/main.go +++ b/main.go @@ -13,6 +13,8 @@ package main import ( + "fmt" + "github.com/mongodb/code-example-tooling/audit-cli/commands/analyze" "github.com/mongodb/code-example-tooling/audit-cli/commands/compare" "github.com/mongodb/code-example-tooling/audit-cli/commands/count" @@ -21,10 +23,15 @@ import ( "github.com/spf13/cobra" ) +// version is the current version of audit-cli. +// Update this when releasing new versions following semantic versioning. +const version = "0.1.0" + func main() { var rootCmd = &cobra.Command{ - Use: "audit-cli", - Short: "A CLI tool for auditing and analyzing MongoDB documentation", + Use: "audit-cli", + Version: version, + Short: "A CLI tool for auditing and analyzing MongoDB documentation", Long: `audit-cli helps MongoDB technical writers perform audit-related tasks in the documentation monorepo, including: @@ -37,6 +44,9 @@ documentation monorepo, including: Designed for maintenance tasks, scoping work, and reporting to stakeholders.`, } + // Customize version output format + rootCmd.SetVersionTemplate(fmt.Sprintf("audit-cli version %s\n", version)) + // Add parent commands rootCmd.AddCommand(extract.NewExtractCommand()) rootCmd.AddCommand(search.NewSearchCommand()) From 538744a3e06a858f757b10e3fe7858865f68b3fb Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Wed, 10 Dec 2025 11:23:29 -0500 Subject: [PATCH 6/8] Update go module path for new repo --- .gitignore | 1 + AGENTS.md | 33 +++++++++++++++++-- README.md | 4 +-- commands/analyze/analyze.go | 6 ++-- commands/analyze/includes/analyzer.go | 2 +- commands/analyze/includes/output.go | 2 +- commands/analyze/procedures/analyzer.go | 2 +- commands/analyze/procedures/types.go | 2 +- commands/analyze/usage/analyzer.go | 4 +-- commands/compare/compare.go | 2 +- commands/compare/file-contents/comparer.go | 2 +- .../compare/file-contents/file_contents.go | 2 +- .../compare/file-contents/version_resolver.go | 2 +- commands/count/count.go | 4 +-- commands/count/pages/counter.go | 2 +- commands/extract/code-examples/parser.go | 2 +- commands/extract/extract.go | 4 +-- commands/extract/procedures/parser.go | 2 +- commands/extract/procedures/types.go | 2 +- commands/extract/procedures/writer.go | 2 +- commands/search/find-string/find_string.go | 2 +- commands/search/search.go | 2 +- go.mod | 4 +-- go.sum | 1 + internal/rst/include_resolver.go | 2 +- main.go | 10 +++--- 26 files changed, 67 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index 4d17cf3..4acec74 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ output/ bin/ .idea/ .vscode/ +coverage.out diff --git a/AGENTS.md b/AGENTS.md index 232cde0..91964ec 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,7 +20,7 @@ This document provides essential context for LLMs performing development tasks i ``` audit-cli/ ├── main.go # CLI entry point using cobra -├── go.mod # Module: github.com/mongodb/code-example-tooling/audit-cli +├── go.mod # Module: github.com/grove-platform/audit-cli ├── commands/ # Command implementations (parent + subcommands) │ ├── extract/ # Extract content from RST files │ │ ├── extract.go # Parent command @@ -501,7 +501,7 @@ For `count tested-examples` command: ### Import Path ```go -import "github.com/mongodb/code-example-tooling/audit-cli/{package}" +import "github.com/grove-platform/audit-cli/{package}" ``` ### Running Specific Tests @@ -522,4 +522,33 @@ None currently used in this project. ### Environment Variables None currently used in this project. +## Continuous Integration + +### GitHub Actions Workflow + +The project uses GitHub Actions to automatically run tests on pull requests and pushes to `main`. + +**Workflow file**: `.github/workflows/run-tests.yml` + +**What it does**: +- Runs on all PRs to `main` and pushes to `main` +- Sets up Go 1.24 +- Caches Go modules for faster builds +- Runs all tests with race detection: `go test ./... -v -race -coverprofile=coverage.out` +- Displays test coverage summary + +**Viewing results**: +- Check the "Actions" tab in GitHub to see workflow runs +- Each PR will show a green checkmark or red X indicating test status +- Click on the workflow run to see detailed test output and coverage + +**Local testing before pushing**: +```bash +# Run the same tests that CI runs +go test ./... -v -race -coverprofile=coverage.out + +# View coverage summary +go tool cover -func=coverage.out | tail -1 +``` + diff --git a/README.md b/README.md index 164a98b..974e138 100644 --- a/README.md +++ b/README.md @@ -1333,7 +1333,7 @@ Example: Adding `extract tables` subcommand 3. **Register the subcommand** in `commands/extract/extract.go`: ```go import ( - "github.com/mongodb/code-example-tooling/audit-cli/commands/extract/tables" + "github.com/grove-platform/audit-cli/commands/extract/tables" ) func NewExtractCommand() *cobra.Command { @@ -1378,7 +1378,7 @@ Example: Adding `analyze` parent command 3. **Register in main.go:** ```go import ( - "github.com/mongodb/code-example-tooling/audit-cli/commands/analyze" + "github.com/grove-platform/audit-cli/commands/analyze" ) func main() { diff --git a/commands/analyze/analyze.go b/commands/analyze/analyze.go index d3cd9a0..bd0881f 100644 --- a/commands/analyze/analyze.go +++ b/commands/analyze/analyze.go @@ -10,9 +10,9 @@ package analyze import ( - "github.com/mongodb/code-example-tooling/audit-cli/commands/analyze/includes" - "github.com/mongodb/code-example-tooling/audit-cli/commands/analyze/procedures" - "github.com/mongodb/code-example-tooling/audit-cli/commands/analyze/usage" + "github.com/grove-platform/audit-cli/commands/analyze/includes" + "github.com/grove-platform/audit-cli/commands/analyze/procedures" + "github.com/grove-platform/audit-cli/commands/analyze/usage" "github.com/spf13/cobra" ) diff --git a/commands/analyze/includes/analyzer.go b/commands/analyze/includes/analyzer.go index c482cb6..1e35b80 100644 --- a/commands/analyze/includes/analyzer.go +++ b/commands/analyze/includes/analyzer.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - "github.com/mongodb/code-example-tooling/audit-cli/internal/rst" + "github.com/grove-platform/audit-cli/internal/rst" ) // AnalyzeIncludes analyzes a file and builds a tree of include relationships. diff --git a/commands/analyze/includes/output.go b/commands/analyze/includes/output.go index a71cdc2..67a88bc 100644 --- a/commands/analyze/includes/output.go +++ b/commands/analyze/includes/output.go @@ -5,7 +5,7 @@ import ( "path/filepath" "strings" - "github.com/mongodb/code-example-tooling/audit-cli/internal/projectinfo" + "github.com/grove-platform/audit-cli/internal/projectinfo" ) // PrintTree prints the include tree structure. diff --git a/commands/analyze/procedures/analyzer.go b/commands/analyze/procedures/analyzer.go index c634945..00d0488 100644 --- a/commands/analyze/procedures/analyzer.go +++ b/commands/analyze/procedures/analyzer.go @@ -3,7 +3,7 @@ package procedures import ( "fmt" - "github.com/mongodb/code-example-tooling/audit-cli/internal/rst" + "github.com/grove-platform/audit-cli/internal/rst" ) // AnalyzeFile analyzes procedures in a file and returns a report. diff --git a/commands/analyze/procedures/types.go b/commands/analyze/procedures/types.go index 7ffcffa..2ed9cfd 100644 --- a/commands/analyze/procedures/types.go +++ b/commands/analyze/procedures/types.go @@ -1,6 +1,6 @@ package procedures -import "github.com/mongodb/code-example-tooling/audit-cli/internal/rst" +import "github.com/grove-platform/audit-cli/internal/rst" // ProcedureAnalysis contains analysis results for a single procedure. type ProcedureAnalysis struct { diff --git a/commands/analyze/usage/analyzer.go b/commands/analyze/usage/analyzer.go index 99aadc9..8ecd259 100644 --- a/commands/analyze/usage/analyzer.go +++ b/commands/analyze/usage/analyzer.go @@ -8,8 +8,8 @@ import ( "sort" "strings" - "github.com/mongodb/code-example-tooling/audit-cli/internal/projectinfo" - "github.com/mongodb/code-example-tooling/audit-cli/internal/rst" + "github.com/grove-platform/audit-cli/internal/projectinfo" + "github.com/grove-platform/audit-cli/internal/rst" ) // AnalyzeUsage finds all files that use the target file. diff --git a/commands/compare/compare.go b/commands/compare/compare.go index e353ce9..e89ab10 100644 --- a/commands/compare/compare.go +++ b/commands/compare/compare.go @@ -8,7 +8,7 @@ package compare import ( - "github.com/mongodb/code-example-tooling/audit-cli/commands/compare/file-contents" + "github.com/grove-platform/audit-cli/commands/compare/file-contents" "github.com/spf13/cobra" ) diff --git a/commands/compare/file-contents/comparer.go b/commands/compare/file-contents/comparer.go index 08b4fc0..195a048 100644 --- a/commands/compare/file-contents/comparer.go +++ b/commands/compare/file-contents/comparer.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - "github.com/mongodb/code-example-tooling/audit-cli/internal/projectinfo" + "github.com/grove-platform/audit-cli/internal/projectinfo" ) // CompareFiles performs a direct comparison between two files. diff --git a/commands/compare/file-contents/file_contents.go b/commands/compare/file-contents/file_contents.go index 87b74fa..9ad6118 100644 --- a/commands/compare/file-contents/file_contents.go +++ b/commands/compare/file-contents/file_contents.go @@ -19,7 +19,7 @@ import ( "path/filepath" "strings" - "github.com/mongodb/code-example-tooling/audit-cli/internal/projectinfo" + "github.com/grove-platform/audit-cli/internal/projectinfo" "github.com/spf13/cobra" ) diff --git a/commands/compare/file-contents/version_resolver.go b/commands/compare/file-contents/version_resolver.go index 487d51c..ee70fe9 100644 --- a/commands/compare/file-contents/version_resolver.go +++ b/commands/compare/file-contents/version_resolver.go @@ -1,7 +1,7 @@ package file_contents import ( - "github.com/mongodb/code-example-tooling/audit-cli/internal/projectinfo" + "github.com/grove-platform/audit-cli/internal/projectinfo" ) // ResolveVersionPaths resolves file paths for all specified versions. diff --git a/commands/count/count.go b/commands/count/count.go index 94cf474..091a0b2 100644 --- a/commands/count/count.go +++ b/commands/count/count.go @@ -9,8 +9,8 @@ package count import ( - "github.com/mongodb/code-example-tooling/audit-cli/commands/count/pages" - "github.com/mongodb/code-example-tooling/audit-cli/commands/count/tested-examples" + "github.com/grove-platform/audit-cli/commands/count/pages" + "github.com/grove-platform/audit-cli/commands/count/tested-examples" "github.com/spf13/cobra" ) diff --git a/commands/count/pages/counter.go b/commands/count/pages/counter.go index 8bd8cfc..e205a70 100644 --- a/commands/count/pages/counter.go +++ b/commands/count/pages/counter.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/mongodb/code-example-tooling/audit-cli/internal/projectinfo" + "github.com/grove-platform/audit-cli/internal/projectinfo" ) // CountPages counts .txt files in the content directory. diff --git a/commands/extract/code-examples/parser.go b/commands/extract/code-examples/parser.go index 0681428..816df9e 100644 --- a/commands/extract/code-examples/parser.go +++ b/commands/extract/code-examples/parser.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/mongodb/code-example-tooling/audit-cli/internal/rst" + "github.com/grove-platform/audit-cli/internal/rst" ) // ParseFile parses a file and extracts code examples from reStructuredText directives. diff --git a/commands/extract/extract.go b/commands/extract/extract.go index bd639d2..8b5f0bc 100644 --- a/commands/extract/extract.go +++ b/commands/extract/extract.go @@ -9,8 +9,8 @@ package extract import ( - "github.com/mongodb/code-example-tooling/audit-cli/commands/extract/code-examples" - "github.com/mongodb/code-example-tooling/audit-cli/commands/extract/procedures" + "github.com/grove-platform/audit-cli/commands/extract/code-examples" + "github.com/grove-platform/audit-cli/commands/extract/procedures" "github.com/spf13/cobra" ) diff --git a/commands/extract/procedures/parser.go b/commands/extract/procedures/parser.go index 42e9c77..974d809 100644 --- a/commands/extract/procedures/parser.go +++ b/commands/extract/procedures/parser.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/mongodb/code-example-tooling/audit-cli/internal/rst" + "github.com/grove-platform/audit-cli/internal/rst" ) // ParseFile parses a file and extracts all procedure variations. diff --git a/commands/extract/procedures/types.go b/commands/extract/procedures/types.go index 27391b6..7e5d3e8 100644 --- a/commands/extract/procedures/types.go +++ b/commands/extract/procedures/types.go @@ -1,6 +1,6 @@ package procedures -import "github.com/mongodb/code-example-tooling/audit-cli/internal/rst" +import "github.com/grove-platform/audit-cli/internal/rst" // ProcedureVariation represents a single variation of a procedure to be extracted. type ProcedureVariation struct { diff --git a/commands/extract/procedures/writer.go b/commands/extract/procedures/writer.go index 9e545a6..1820cfe 100644 --- a/commands/extract/procedures/writer.go +++ b/commands/extract/procedures/writer.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - "github.com/mongodb/code-example-tooling/audit-cli/internal/rst" + "github.com/grove-platform/audit-cli/internal/rst" ) // WriteVariation writes a procedure variation to a file. diff --git a/commands/search/find-string/find_string.go b/commands/search/find-string/find_string.go index c60168e..651050c 100644 --- a/commands/search/find-string/find_string.go +++ b/commands/search/find-string/find_string.go @@ -23,7 +23,7 @@ import ( "path/filepath" "strings" - "github.com/mongodb/code-example-tooling/audit-cli/internal/rst" + "github.com/grove-platform/audit-cli/internal/rst" "github.com/spf13/cobra" ) diff --git a/commands/search/search.go b/commands/search/search.go index e6c6cec..8927aa5 100644 --- a/commands/search/search.go +++ b/commands/search/search.go @@ -8,7 +8,7 @@ package search import ( - "github.com/mongodb/code-example-tooling/audit-cli/commands/search/find-string" + "github.com/grove-platform/audit-cli/commands/search/find-string" "github.com/spf13/cobra" ) diff --git a/go.mod b/go.mod index d32a943..1b82fab 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,14 @@ -module github.com/mongodb/code-example-tooling/audit-cli +module github.com/grove-platform/audit-cli go 1.24 require ( github.com/aymanbagabas/go-udiff v0.3.1 github.com/spf13/cobra v1.10.1 + gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/spf13/pflag v1.0.10 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index d072fa3..8b4bbd4 100644 --- a/go.sum +++ b/go.sum @@ -9,6 +9,7 @@ github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4 github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/rst/include_resolver.go b/internal/rst/include_resolver.go index 61bad68..e84073e 100644 --- a/internal/rst/include_resolver.go +++ b/internal/rst/include_resolver.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/mongodb/code-example-tooling/audit-cli/internal/projectinfo" + "github.com/grove-platform/audit-cli/internal/projectinfo" ) // FindIncludeDirectives finds all include directives in a file and resolves their paths. diff --git a/main.go b/main.go index 8c9ae77..8a0c608 100644 --- a/main.go +++ b/main.go @@ -15,11 +15,11 @@ package main import ( "fmt" - "github.com/mongodb/code-example-tooling/audit-cli/commands/analyze" - "github.com/mongodb/code-example-tooling/audit-cli/commands/compare" - "github.com/mongodb/code-example-tooling/audit-cli/commands/count" - "github.com/mongodb/code-example-tooling/audit-cli/commands/extract" - "github.com/mongodb/code-example-tooling/audit-cli/commands/search" + "github.com/grove-platform/audit-cli/commands/analyze" + "github.com/grove-platform/audit-cli/commands/compare" + "github.com/grove-platform/audit-cli/commands/count" + "github.com/grove-platform/audit-cli/commands/extract" + "github.com/grove-platform/audit-cli/commands/search" "github.com/spf13/cobra" ) From 2088fe18dc28b9232908c35c042d6f0601dfdf80 Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Wed, 10 Dec 2025 11:23:45 -0500 Subject: [PATCH 7/8] Add CI to run tests on PR and push to main --- .github/workflows/run-tests.yml | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..d978d29 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,47 @@ +name: Run Go Tests in CI + +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24' + + - name: Cache Go modules + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Download dependencies + run: go mod download + + - name: Run tests + run: go test ./... -v -race -coverprofile=coverage.out + + - name: Display coverage + run: go tool cover -func=coverage.out + + - name: Check test coverage + run: | + total_coverage=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//') + echo "Total test coverage: ${total_coverage}%" From 3e143c7c7e20483bc123e68af911882c4c79556e Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Wed, 10 Dec 2025 12:16:27 -0500 Subject: [PATCH 8/8] Remove explicit package version info and refer to go.mod --- AGENTS.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 91964ec..d37efe4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -62,12 +62,14 @@ audit-cli/ ## Technology Stack -- **Language**: Go 1.24 -- **CLI Framework**: [spf13/cobra](https://github.com/spf13/cobra) v1.10.1 -- **Diff Library**: [aymanbagabas/go-udiff](https://github.com/aymanbagabas/go-udiff) v0.3.1 -- **YAML Parsing**: gopkg.in/yaml.v3 v3.0.1 +- **Language**: Go +- **CLI Framework**: [spf13/cobra](https://github.com/spf13/cobra) +- **Diff Library**: [aymanbagabas/go-udiff](https://github.com/aymanbagabas/go-udiff) +- **YAML Parsing**: gopkg.in/yaml.vX - **Testing**: Go standard library (`testing` package) +Refer to the `go.mod` for version info. + ## Domain Knowledge: MongoDB Documentation ### RST Directives Supported @@ -550,5 +552,3 @@ go test ./... -v -race -coverprofile=coverage.out # View coverage summary go tool cover -func=coverage.out | tail -1 ``` - -