Thanks for your interest in contributing to DebuggAI. This document covers the essentials.
git clone https://github.com/rish-e/debuggai.git
cd debuggai
pip install -e ".[dev]"The MCP server is Python-native (no npm required). For live persona testing:
pip install -e ".[live]"
playwright install chromiumpytestdebuggai/
├── debuggai/ # Python core package
│ ├── engines/ # Analysis engines (code, intent, creative)
│ ├── models/ # Pydantic data models
│ ├── reports/ # Report generation
│ ├── utils/ # Git, LLM, FFmpeg utilities
│ ├── cli.py # CLI entry point
│ ├── config.py # Configuration system
│ └── orchestrator.py # Engine coordination
├── mcp-server/ # TypeScript MCP server
├── rules/ # YAML rule definitions
└── tests/ # Tests and fixtures
Add patterns to the appropriate file in debuggai/engines/code/:
security.pyfor security vulnerabilitiesperformance.pyfor performance anti-patternsimports.pyfor import-related checks
Each pattern follows this structure:
(
re.compile(r"""your_pattern_here"""),
Severity.CRITICAL, # CRITICAL | MAJOR | MINOR | INFO
"Short title",
"Detailed description of the issue.",
"Suggested fix.",
"rule-id", # Unique identifier
)- Add tree-sitter grammar to
pyproject.tomldependencies - Add file extension mapping in
engines/code/scanner.py(SUPPORTED_EXTENSIONS) - Add import resolution logic in
engines/code/imports.py - Add language-specific patterns to security/performance scanners
- Python: formatted with
ruff, line length 100 - TypeScript: standard TS conventions
- Commits: imperative mood, concise ("Add Go import detection", not "Added Go import detection")
- Fork the repo and create a branch from
main - Add tests for new features
- Ensure
pytestandruff checkpass - Submit a PR with a clear description of the change
Open an issue with:
- DebuggAI version (
debuggai --version) - Python version
- What you ran and what happened
- Expected behavior
Rule packs live in rules/. Format:
rules:
- id: "my-rule"
severity: major
category: security
pattern: "dangerous_function\\("
languages: [python, javascript]
title: "Dangerous function usage"
description: "This function is unsafe because..."
suggestion: "Use safe_function() instead."By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.