SuperAPI AI Directory

scaffold-python-backend-quality-gates

Deployment & operations

View repository

Updated 10-15 17:24

About this skill

Set up Python backend quality gates

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.md
  • references/platform-quality-gates.md
  • references/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

  1. 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.
  2. Form a plan according to the three-layer structure below.
  3. 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.
  4. 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.
  5. 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.
  6. 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.