Use this skill when the user wants to design or set up hard quality gates for a Python backend repository or backend subpackage. The scope is limited to Python backend services and does not cover mobile clients or web frontends.
Required reading
Before proposing changes, read these files in full:
../references/three-layer-model.md../references/landing-safety.md../references/github-review-and-rulesets.md../references/invocation-examples.md../references/gate-levels-and-template.mdreferences/platform-quality-gates.mdreferences/concrete-rules.md
These paths are all anchored to the directory where this skill's SKILL.md resides; after loading the skill, progressively read the corresponding materials by relative path.
Process
- Inspect the
AGENTS.md, Python package management files,pyproject.toml, test configuration, import boundary tools, deployment checks, GitHub workflows, hook scripts, and existing gate orchestration entry points in the target repository. - Form a plan according to the three-layer structure below.
- If you need to extend rules or confirm the latest rule names, first consult
references/concrete-rules.md's official documentation entry point; do not add rules from memory alone. - Use
../references/gate-levels-and-template.md's grading table to give recommended tiers and trade-offs; do not decide the tier for the user. - Stop at the confirmation-before-write gate. Show the exact files and remote settings the plan will create or modify, then request explicit user approval.
- After approval, implement the narrowest but useful scaffolding, run the new local entry point, and report GitHub settings that still require manual handling.
Layer 1: Check tools
Identify executable Python backend checks: formatters, static checkers, type checkers, import boundary checkers, unit and integration tests, environment validation, deployment validation, background task process or task queue checks, and custom gate scripts.
Layer 2: Check rules
Map each tool to the rules it enforces: code style, types, architectural boundaries, no network by default in tests, test fixture strategy, environment variable requirements, deployment invariants, or background task process contracts.
Layer 3: Invocation timing
Decide where checks run: local hooks for fast feedback, pull request workflows as the authority, required status checks to block merges, deployment workflows for pre-release gates, and GitHub rulesets to constrain review requirements.
Output shape
Return a concise scaffolding plan containing:
- Files to be created or modified;
- Layer 1 tool table;
- Layer 2 rule table;
- Layer 3 invocation timing table;
- confirmation-before-write prompt;
- Post-implementation verification commands.