reviewing-python-architecture
Review ADRs to check they follow testing principles and parent PDR constraints. Use when reviewing ADRs or architecture decisions.
Best use case
reviewing-python-architecture is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Review ADRs to check they follow testing principles and parent PDR constraints. Use when reviewing ADRs or architecture decisions.
Teams using reviewing-python-architecture should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/reviewing-python-architecture/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How reviewing-python-architecture Compares
| Feature / Agent | reviewing-python-architecture | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Review ADRs to check they follow testing principles and parent PDR constraints. Use when reviewing ADRs or architecture decisions.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
<objective>
Review ADRs against `/testing` principles and applicable PDR constraints. Point out violations, reference the specific principle, and show correct architecture.
</objective>
<quick_start>
1. Read `/testing` for methodology (5 stages, 5 factors, 7 exceptions)
2. Identify violations of testing principles and parent PDR constraints
3. Output APPROVED or REJECTED with specific violations
4. Show correct approach with code examples
</quick_start>
<principles_to_enforce>
From `/testing`:
**Level definitions** (from Stage 2 Five Factors):
- **Level 1**: Pure computation, file I/O with temp dirs, standard dev tools (git, curl)
- Test directly, no doubles needed
- **Level 2**: Real dependencies via harnesses (Docker, databases, project-specific binaries)
- Use real systems, not fakes
- **Level 3**: Real credentials, external services, browsers
- Full real-world workflows
**Critical rules** (from Five Factors):
- Standard dev tools (git, cat, grep, curl) are Level 1
- Project-specific tools (Docker, PostgreSQL, Hugo) are Level 2
- SaaS services (Trakt, GitHub API, Stripe, Auth0) jump from Level 1 → Level 3 (no Level 2)
- Network dependencies and external services are Level 3
**Mocking prohibition** (Cardinal Rule):
- **NO mocking. Ever.** - `/testing` cardinal rule
- NO `unittest.mock.patch` for external services
- NO `respx.mock` for internet APIs
- Use dependency injection with Protocol interfaces instead
- Test doubles (stubs, spies, fakes) only when exception case applies
**Reality principle**:
- "Reality is the oracle" - tests must verify behavior against real systems
- A fake proves your code works with your imagination, not the real system
**Test doubles require exception case** (Stage 5):
- Only 7 legitimate exceptions for test doubles
- Each use must document which exception applies
- No exception = no doubles, test at Level 2
</principles_to_enforce>
<output_format>
````markdown
# ARCHITECTURE REVIEW
**Decision:** [APPROVED | REJECTED]
---
## Violations
### {Violation name}
**Where:** Lines {X-Y}
**Principle violated:** /testing {section name}
**Why this fails:** {Direct explanation}
**Correct approach:**
```{language}
{Show what the architecture should be}
```
````
---
{Repeat for each violation}
---
## Required Changes
{Concise list of what must change}
---
## References
- /testing: {section name} (principle violated)
- /standardizing-python-testing: {section if applicable}
---
{If REJECTED: "Revise and resubmit"}
{If APPROVED: "Architecture meets standards"}
````
</output_format>
<review_guidelines>
**Don't:**
- Reference specific line numbers (they change)
- Provide grep commands
- Explain multiple times
- Count statistics
**Do:**
- Reference `/testing` section names (e.g., "Stage 5 Exception 1", "Cardinal Rule")
- Show correct architecture with code examples
- Be direct about violations
- Reference `/standardizing-python-testing` for Python-specific patterns
</review_guidelines>
<example_review>
```markdown
# ARCHITECTURE REVIEW
**Decision:** REJECTED
---
## Violations
### Level 2 Assigned to SaaS Service
**Where:** Lines 132-133
**Principle violated:** /testing Stage 2 Factor 2
Trakt.tv is a SaaS service that cannot run locally. Per /testing Five Factors:
- SaaS services have no Level 2 - jump from Level 1 to Level 3
**Correct approach:**
```markdown
| List operations | 1 | DI with TraktListProvider protocol |
| List operations | 3 | Real Trakt API with test account |
````
---
### Mocking External Services
**Where:** Lines 132, 133, 145
**Principle violated:** /testing Cardinal Rule
Testing Strategy says "Mock at the PyTrakt API boundary" - this violates the NO MOCKING principle.
**Correct approach:**
Use dependency injection per /standardizing-python-testing:
```python
class TraktListProvider(Protocol):
def __call__(self, list_name: str, username: str) -> Any | None: ...
# Level 1: Inject fake implementation (Exception 1: Failure modes)
# Level 3: Use real PyTrakt
```
---
## Required Changes
1. Remove all Level 2 assignments for SaaS operations
2. Remove "Mock at boundary" language
3. Add DI protocol definitions per /standardizing-python-testing
4. Document which exception case justifies any test doubles
---
## References
- /testing: Cardinal Rule (no mocking)
- /testing: Stage 2 Factor 2 (dependency levels)
- /testing: Stage 5 (exception cases for test doubles)
- /standardizing-python-testing: Protocol patterns
---
Revise and resubmit.
```
</example_review>
<success_criteria>
Review is complete when:
- [ ] Checked for mocking violations (Cardinal Rule)
- [ ] Verified level assignments match `/testing` Five Factors
- [ ] Checked test double usage has documented exception case
- [ ] Output follows format with section references (not line numbers)
- [ ] Correct approach shown with code examples
</success_criteria>
```Related Skills
software-architecture
Design scalable software systems with proven architectural patterns (MVC, microservices, event-driven), SOLID principles, system design trade-offs, and architectural decision records (ADRs).
sentry-python-setup
Setup Sentry in Python apps. Use when asked to add Sentry to Python, install sentry-sdk, or configure error monitoring for Python applications, Django, Flask, FastAPI.
sentry-python-sdk
Full Sentry SDK setup for Python. Use when asked to "add Sentry to Python", "install sentry-sdk", "setup Sentry in Python", or configure error monitoring, tracing, profiling, logging, metrics, crons, or AI monitoring for Python applications. Supports Django, Flask, FastAPI, Celery, Starlette, AIOHTTP, Tornado, and more.
review-architecture
Verify DDD patterns, Clean Architecture boundaries, and bITdevKit-specific conventions in modular monolith projects
react-native-architecture
Build production React Native apps with Expo, navigation, native modules, offline sync, and cross-platform patterns. Use when developing mobile apps, implementing native integrations, or architecti...
react-gradual-architecture
Incremental React code organization guidelines. Start small, then extract when scanning and responsibilities start to blur. Use when creating features, organizing files, refactoring components, or deciding when to extract hooks, UI, or utils.
React Frontend Architecture
Comprehensive guidelines and standards for building scalable React applications, including project structure, component design, state management, and styling.
python-workflow
Python project workflow guidelines. Triggers: .py, pyproject.toml, uv, pip, pytest, Python. Covers package management, virtual environments, code style, type safety, testing, configuration, CQRS patterns, and Python-specific development tasks.
python-workflow-development
Develop Python scripts and modules for building AI workflows and integrations. Use when coding data ingestion, transformation, analysis, and automation pipelines in pilot projects requiring Python automation.
python-typing
Migrate Python codebases to strict type checking with pyright. Use when user wants to add types, fix type errors, set up strict mode, or run a typing migration. Provides setup automation, fix patterns, discipline enforcement, and optional iteration loop support.
python-testing
Use when implementing new Python code (follow TDD), designing test suites, reviewing test coverage, setting up pytest infrastructure, writing fixtures, mocking dependencies, or performing parametrized testing
python-testing-patterns
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.