Skip to content

feat: rewrite Prowler Studio to use Claude Agent SDK#83

Open
puchy22 wants to merge 12 commits intoclean-slatefrom
new-product
Open

feat: rewrite Prowler Studio to use Claude Agent SDK#83
puchy22 wants to merge 12 commits intoclean-slatefrom
new-product

Conversation

@puchy22
Copy link
Copy Markdown
Member

@puchy22 puchy22 commented Nov 5, 2025

Overview

Complete rewrite of Prowler Studio using Claude Agent SDK for automated Prowler security check creation. This implementation features a modular agent-based architecture with self-correcting workflows and comprehensive quality tooling.

Key Changes

🏗️ Architecture

  • Agent-Based Design: Modular agents for different tasks (implementation, testing, PR creation)
  • Claude Agent SDK Integration: Leverages latest SDK with MCP server support
  • Self-Correcting Workflow: Automated verification and fix loops (up to 5 attempts)
  • Type-Safe Codebase: Full Python type hints with strict mypy checking

🤖 Core Components

ChecKreatorAgent

  • Creates Prowler checks from markdown tickets
  • Automatic check discovery from git changes
  • Verification loop that ensures checks load correctly
  • Custom MCP server with mkcheck tool

Shared Tools

  • Git operations: Repository preparation and branch management
  • Prowler tools: Dependency installation and check verification
  • Typed result models with Pydantic

Infrastructure

  • CLI with Typer framework
  • Jinja2 template-based prompt management
  • Comprehensive error handling

🧪 Quality Assurance

Pre-commit hooks enforce:

  • Ruff: Fast linting and formatting
  • mypy: Strict type checking
  • pyupgrade: Python 3.12+ syntax
  • Bandit: Security vulnerability scanning
  • interrogate: Docstring coverage (80% minimum)
  • Commitizen: Conventional commit messages

Files Changed

  • 14 Python files in src/ directory
  • Configuration: pyproject.toml, .pre-commit-config.yaml, uv.lock
  • Documentation: README.md, AGENTS.md, LICENSE

Commit Structure

  1. Core infrastructure and CLI framework
  2. Agent base class and architecture
  3. Git and Prowler tools
  4. Prompt loading utilities
  5. ChecKreatorAgent implementation
  6. Documentation

Usage

# Install dependencies
uv sync

# Create a check from a ticket
prowler-studio create-check check_ticket.md feat/my_new_check

Architecture Benefits

  • Extensible: Add new agents without modifying existing code
  • Maintainable: Clear separation of concerns with typed interfaces
  • Reliable: Self-correcting verification loops ensure quality
  • Developer-Friendly: Comprehensive documentation and best practices guide

Future Enhancements

  • TestingAgent for automated test creation
  • PRCreationAgent for GitHub PR automation
  • ReviewSummaryAgent for code review summaries

Testing

  • Manual test: Create check from ticket
  • Verify check loads in Prowler
  • Test verification loop with intentional errors
  • Run all pre-commit hooks successfully

- Add pyproject.toml with dependencies (typer, gitpython, jinja2, claude-agent-sdk)
- Add CLI entry point with create-check command
- Add custom exceptions for error handling
- Configure ruff, mypy, bandit, and interrogate in pyproject.toml
- Add .gitignore for Python projects
- Add abstract Agent base class with async run() method
- Add comprehensive agent development best practices guide
- Document SRP, type safety, Pydantic models, and constants usage
- Add prepare_repo_for_work() for Git branch management
- Add mkcheck MCP tool for check folder creation
- Add install_prowler_dependencies() with poetry
- Add verify_check_loaded() for check verification
- Add Pydantic models for tool results
- Add Jinja2 template loading with context rendering
- Centralize prompt management for agents
- Implement check creation from markdown tickets
- Add 5-attempt verification and fix loop
- Add automatic check discovery from git changes
- Use Claude Agent SDK with custom MCP server
- Add Jinja2 prompts for implementation and fixes
- Add typed result models (CheckImplementationResult, etc.)
- Add comprehensive README with architecture explanation
- Document ChecKreatorAgent workflow and verification loop
- Add installation and usage instructions
- Add guide for creating new agents
- Include Apache 2.0 license
@puchy22 puchy22 changed the base branch from main to clean-slate November 5, 2025 10:04
@puchy22 puchy22 changed the title feat: rewrite Prowler Studio with Claude Agent SDK feat: rewrite Prowler Studio to use Claude Agent SDK Nov 5, 2025
Comment thread README.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants