Comprehensive Python development tools for Amplifier - the "Python Development Home" in the Amplifier ecosystem.
| Component | Description |
|---|---|
| Tool Module | python_check - agent-callable tool for quality checks |
| Hook Module | Automatic checking on file write/edit events |
| Agent | python-dev - expert Python developer agent |
| LSP Integration | Includes lsp-python for code intelligence |
| Shared Library | Core checking logic used by tool and hook modules |
# In your bundle.yaml
includes:
- bundle: git+https://github.com/microsoft/amplifier-bundle-python-dev@mainThis gives you:
- Foundation tools and agents
- Python LSP (code intelligence)
- Python quality checks (tool + hook)
- Python development expert agent
| Check | Tool | What It Catches |
|---|---|---|
| Format | ruff format | Code style (PEP 8) |
| Lint | ruff check | Bugs, imports, style, complexity |
| Types | pyright | Type errors, missing annotations |
| Stubs | custom | TODOs, placeholders, incomplete code |
Configure via pyproject.toml:
[tool.amplifier-python-dev]
# Enable/disable checks
enable_ruff_format = true
enable_ruff_lint = true
enable_pyright = true
enable_stub_check = true
# Exclude paths
exclude_patterns = [
".venv/**",
"__pycache__/**",
"tests/fixtures/**",
]
# Behavior
fail_on_warning = false
# Hook configuration
[tool.amplifier-python-dev.hook]
enabled = true
file_patterns = ["*.py"]
report_level = "warning" # error | warning | info
auto_inject = true # Add issues to agent contextThe python-dev agent is an expert Python developer that wields both quality checks and LSP tools:
# Within Amplifier
> @python-dev Check src/auth.py for issues
# The agent will:
# 1. Run python_check on the file
# 2. Use LSP to understand code structure
# 3. Provide actionable recommendations
Agent capabilities:
- Code quality analysis
- Type error diagnosis
- Import organization
- Code structure understanding (via LSP)
- Best practices guidance
When enabled, the hook automatically runs checks after Python file edits:
- You write/edit a
.pyfile - Hook triggers and runs lint + type checks
- Issues are injected into agent context
- Agent is aware of problems immediately
This creates a tight feedback loop - issues are caught as you work, not at the end.
┌─────────────────────────────────────────────────────────────┐
│ amplifier-bundle-python-dev │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────────────┐│
│ │ CLI │ │ Tool │ │ Hook │ │ python-dev ││
│ │ │ │ Module │ │ Module │ │ Agent ││
│ └────┬────┘ └────┬────┘ └────┬────┘ └────────┬────────┘│
│ │ │ │ │ │
│ └────────────┴─────┬──────┴────────────────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ SHARED CORE │ │
│ │ checker.py │ │
│ └─────────────┘ │
│ │
├─────────────────────────────────────────────────────────────┤
│ INCLUDES: foundation + lsp-python │
└─────────────────────────────────────────────────────────────┘
This bundle embodies pragmatic professionalism:
- Readability over cleverness - Code should be obvious
- Complete or not at all - No stubs/TODOs in production
- Context-aware pragmatism - Rules serve the code
- Type safety as aid - Types help, don't constrain
- Clean imports - One per line, properly sorted
See PYTHON_BEST_PRACTICES.md for the full guide.
This bundle is the "Python Development Home" - a collection point for Python-specific capabilities:
| Phase | Feature | Status |
|---|---|---|
| MVP | Formatting, linting, types, stubs | ✅ Done |
| Testing | pytest integration, coverage | 🔮 Planned |
| Debugging | Debug session management | 🔮 Planned |
| Profiling | cProfile, py-spy integration | 🔮 Planned |
| Dependencies | pip-audit, outdated checks | 🔮 Planned |
Note
This project is not currently accepting external contributions, but we're actively working toward opening this up. We value community input and look forward to collaborating in the future. For now, feel free to fork and experiment!
Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit Contributor License Agreements.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
MIT License - see LICENSE for details.