diff --git a/.clinerules b/.clinerules new file mode 100644 index 0000000..2ca04e9 --- /dev/null +++ b/.clinerules @@ -0,0 +1,32 @@ +--- +description: Architectural decisions for rulectl development +globs: ["**/*.py"] +--- + +# Global ADRs (All Files) + +## ADR: Use Python For All Development Purposes + +1. use python for everything, and use python 3+ + +# Python File ADRs (*.py) + +## ADR: Click Framework for CLI Application Architecture + +1. Use Click framework (click>=8.0.0) for all command-line interface implementation in Python applications +2. Structure CLI with @click.group() decorator at the top level and @click.command() for subcommands +3. Define command-line options using @click.option() with type hints, help text, and default values +4. Use @click.argument() for required positional arguments with click.Choice() for enumerated values +5. Include colorama>=0.4.6 for cross-platform colored terminal output in all CLI applications +6. Implement --verbose/-v flag for debug output and --force/-f flag to skip confirmation prompts +7. Provide clear help text for all commands and options using the help parameter + +## ADR: Anthropic Claude AI Integration for Code Analysis + +1. Use Anthropic Claude API (via BAML client) for all AI-powered code analysis in Python files +2. Default to 'claude-sonnet-4-20250514' model for analysis tasks unless specific model requirements dictate otherwise +3. Store Anthropic API keys in environment variables (ANTHROPIC_API_KEY) and never hardcode credentials in Python source files +4. Validate BAML client initialization before performing any AI operations using check_baml_client() validation +5. Import AI functionality from baml_client.async_client module for all async AI operations +6. Track token usage for all Claude API calls to monitor costs and usage patterns +7. Set BAML_LOG environment variable to 'OFF' to disable verbose logging in production \ No newline at end of file diff --git a/.cursor/rules/adr-001.mdc b/.cursor/rules/adr-001.mdc new file mode 100644 index 0000000..a7b3453 --- /dev/null +++ b/.cursor/rules/adr-001.mdc @@ -0,0 +1,16 @@ +--- +globs: ["**/*.py"] +alwaysApply: false +--- + +# Click Framework for CLI Application Architecture + +## Policies + +1. Use Click framework (click>=8.0.0) for all command-line interface implementation in Python applications +2. Structure CLI with @click.group() decorator at the top level and @click.command() for subcommands +3. Define command-line options using @click.option() with type hints, help text, and default values +4. Use @click.argument() for required positional arguments with click.Choice() for enumerated values +5. Include colorama>=0.4.6 for cross-platform colored terminal output in all CLI applications +6. Implement --verbose/-v flag for debug output and --force/-f flag to skip confirmation prompts +7. Provide clear help text for all commands and options using the help parameter \ No newline at end of file diff --git a/.cursor/rules/adr-002.mdc b/.cursor/rules/adr-002.mdc new file mode 100644 index 0000000..9accd4f --- /dev/null +++ b/.cursor/rules/adr-002.mdc @@ -0,0 +1,16 @@ +--- +globs: ["**/*.py"] +alwaysApply: false +--- + +# Anthropic Claude AI Integration for Code Analysis + +## Policies + +1. Use Anthropic Claude API (via BAML client) for all AI-powered code analysis in Python files +2. Default to 'claude-sonnet-4-20250514' model for analysis tasks unless specific model requirements dictate otherwise +3. Store Anthropic API keys in environment variables (ANTHROPIC_API_KEY) and never hardcode credentials in Python source files +4. Validate BAML client initialization before performing any AI operations using check_baml_client() validation +5. Import AI functionality from baml_client.async_client module for all async AI operations +6. Track token usage for all Claude API calls to monitor costs and usage patterns +7. Set BAML_LOG environment variable to 'OFF' to disable verbose logging in production \ No newline at end of file diff --git a/.cursor/rules/adr-003.mdc b/.cursor/rules/adr-003.mdc new file mode 100644 index 0000000..f920f8e --- /dev/null +++ b/.cursor/rules/adr-003.mdc @@ -0,0 +1,10 @@ +--- +globs: ["**"] +alwaysApply: false +--- + +# Use Python For All Development Purposes + +## Policies + +1. use python for everything, and use python 3+ \ No newline at end of file diff --git a/.gemini/GEMINI.md b/.gemini/GEMINI.md new file mode 100644 index 0000000..2282e8f --- /dev/null +++ b/.gemini/GEMINI.md @@ -0,0 +1,5 @@ +Development standards and architectural decision records are stored individually below and are important to development. + +@adr-001.md +@adr-002.md +@adr-003.md \ No newline at end of file diff --git a/.gemini/adr-001.md b/.gemini/adr-001.md new file mode 100644 index 0000000..229b8d7 --- /dev/null +++ b/.gemini/adr-001.md @@ -0,0 +1,11 @@ +# Click Framework for CLI Application Architecture + +## Policies + +1. Use Click framework (click>=8.0.0) for all command-line interface implementation in Python applications +2. Structure CLI with @click.group() decorator at the top level and @click.command() for subcommands +3. Define command-line options using @click.option() with type hints, help text, and default values +4. Use @click.argument() for required positional arguments with click.Choice() for enumerated values +5. Include colorama>=0.4.6 for cross-platform colored terminal output in all CLI applications +6. Implement --verbose/-v flag for debug output and --force/-f flag to skip confirmation prompts +7. Provide clear help text for all commands and options using the help parameter \ No newline at end of file diff --git a/.gemini/adr-002.md b/.gemini/adr-002.md new file mode 100644 index 0000000..5bce035 --- /dev/null +++ b/.gemini/adr-002.md @@ -0,0 +1,11 @@ +# Anthropic Claude AI Integration for Code Analysis + +## Policies + +1. Use Anthropic Claude API (via BAML client) for all AI-powered code analysis in Python files +2. Default to 'claude-sonnet-4-20250514' model for analysis tasks unless specific model requirements dictate otherwise +3. Store Anthropic API keys in environment variables (ANTHROPIC_API_KEY) and never hardcode credentials in Python source files +4. Validate BAML client initialization before performing any AI operations using check_baml_client() validation +5. Import AI functionality from baml_client.async_client module for all async AI operations +6. Track token usage for all Claude API calls to monitor costs and usage patterns +7. Set BAML_LOG environment variable to 'OFF' to disable verbose logging in production \ No newline at end of file diff --git a/.gemini/adr-003.md b/.gemini/adr-003.md new file mode 100644 index 0000000..08d615e --- /dev/null +++ b/.gemini/adr-003.md @@ -0,0 +1,5 @@ +# Use Python For All Development Purposes + +## Policies + +1. use python for everything, and use python 3+ \ No newline at end of file diff --git a/.kiro/steering/architectural-decisions.md b/.kiro/steering/architectural-decisions.md new file mode 100644 index 0000000..53825f5 --- /dev/null +++ b/.kiro/steering/architectural-decisions.md @@ -0,0 +1,37 @@ +--- +title: Architectural Decisions +type: steering +inclusion: always +--- + +# Global ADRs (All Files) + +## ADR: Use Python For All Development Purposes + +1. use python for everything, and use python 3+ + +--- + +# Python File ADRs (*.py) + +## ADR: Click Framework for CLI Application Architecture + +1. Use Click framework (click>=8.0.0) for all command-line interface implementation in Python applications +2. Structure CLI with @click.group() decorator at the top level and @click.command() for subcommands +3. Define command-line options using @click.option() with type hints, help text, and default values +4. Use @click.argument() for required positional arguments with click.Choice() for enumerated values +5. Include colorama>=0.4.6 for cross-platform colored terminal output in all CLI applications +6. Implement --verbose/-v flag for debug output and --force/-f flag to skip confirmation prompts +7. Provide clear help text for all commands and options using the help parameter + +--- + +## ADR: Anthropic Claude AI Integration for Code Analysis + +1. Use Anthropic Claude API (via BAML client) for all AI-powered code analysis in Python files +2. Default to 'claude-sonnet-4-20250514' model for analysis tasks unless specific model requirements dictate otherwise +3. Store Anthropic API keys in environment variables (ANTHROPIC_API_KEY) and never hardcode credentials in Python source files +4. Validate BAML client initialization before performing any AI operations using check_baml_client() validation +5. Import AI functionality from baml_client.async_client module for all async AI operations +6. Track token usage for all Claude API calls to monitor costs and usage patterns +7. Set BAML_LOG environment variable to 'OFF' to disable verbose logging in production \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..e565f50 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,66 @@ +# Development Guidelines + +## Project Structure & Module Organization + +The repository follows a standard Python project structure with: +- CLI commands implemented using the Click framework +- BAML client integration for AI-powered code analysis +- Environment-based configuration for API credentials + +## Build, Test, and Development Commands + +### CLI Implementation Standards + +1. Use Click framework (click>=8.0.0) for all command-line interface implementation in Python applications +2. Structure CLI with @click.group() decorator at the top level and @click.command() for subcommands +3. Define command-line options using @click.option() with type hints, help text, and default values +4. Use @click.argument() for required positional arguments with click.Choice() for enumerated values +5. Include colorama>=0.4.6 for cross-platform colored terminal output in all CLI applications +6. Implement --verbose/-v flag for debug output and --force/-f flag to skip confirmation prompts +7. Provide clear help text for all commands and options using the help parameter + +## Coding Style & Naming Conventions + +### Language Standards + +1. use python for everything, and use python 3+ + +### General Guidelines + +1. Use TypeScript for all new code where applicable +2. Follow existing naming conventions in each package +3. Use descriptive variable names +4. Add docstrings for public APIs + +## Testing Guidelines + +1. Write unit tests for business logic +2. Include integration tests for CLI commands +3. Aim for meaningful test coverage +4. Test AI integration points with mocked responses + +## Commit & Pull Request Guidelines + +1. Write clear, descriptive commit messages +2. Reference issue numbers in commits +3. Keep PRs focused and reviewable +4. Ensure CI passes before requesting review + +## Security & Configuration Tips + +### AI Integration Standards + +1. Use Anthropic Claude API (via BAML client) for all AI-powered code analysis in Python files +2. Default to 'claude-sonnet-4-20250514' model for analysis tasks unless specific model requirements dictate otherwise +3. Store Anthropic API keys in environment variables (ANTHROPIC_API_KEY) and never hardcode credentials in Python source files +4. Validate BAML client initialization before performing any AI operations using check_baml_client() validation +5. Import AI functionality from baml_client.async_client module for all async AI operations +6. Track token usage for all Claude API calls to monitor costs and usage patterns +7. Set BAML_LOG environment variable to 'OFF' to disable verbose logging in production + +### General Security + +1. Never commit API keys or sensitive credentials +2. Use environment variables for all configuration +3. Validate all external inputs +4. Follow principle of least privilege for API access \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..0362c07 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,27 @@ +## ADR 1: Click Framework for CLI Application Architecture + +1. Use Click framework (click>=8.0.0) for all command-line interface implementation in Python applications +2. Structure CLI with @click.group() decorator at the top level and @click.command() for subcommands +3. Define command-line options using @click.option() with type hints, help text, and default values +4. Use @click.argument() for required positional arguments with click.Choice() for enumerated values +5. Include colorama>=0.4.6 for cross-platform colored terminal output in all CLI applications +6. Implement --verbose/-v flag for debug output and --force/-f flag to skip confirmation prompts +7. Provide clear help text for all commands and options using the help parameter + +--- + +## ADR 2: Anthropic Claude AI Integration for Code Analysis + +1. Use Anthropic Claude API (via BAML client) for all AI-powered code analysis in Python files +2. Default to 'claude-sonnet-4-20250514' model for analysis tasks unless specific model requirements dictate otherwise +3. Store Anthropic API keys in environment variables (ANTHROPIC_API_KEY) and never hardcode credentials in Python source files +4. Validate BAML client initialization before performing any AI operations using check_baml_client() validation +5. Import AI functionality from baml_client.async_client module for all async AI operations +6. Track token usage for all Claude API calls to monitor costs and usage patterns +7. Set BAML_LOG environment variable to 'OFF' to disable verbose logging in production + +--- + +## ADR 3: Use Python For All Development Purposes + +1. use python for everything, and use python 3+ \ No newline at end of file