FastAPI Code One Task Group
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Implement one bucket of FastAPI tasks from a plan’s task group end to end: one quality baseline up front, each task implemented with its fast tests, then the whole bucket validated once — with the container-backed stage serialized behind a repository-wide lock.
Purpose
iru-fastapi-code-one-task-group is the FastAPI counterpart to iru-nestjs-code-one-task-group and iru-php-code-one-task-group, built on the shared Python gate skills (iru-python-test, -coverage, -code-quality, -docstrings), each run through an iru-gate-runner agent. Step 1 detects the runner prefix, layout, persistence stack, sync versus async, Alembic, the fast versus integration test split, wired quality tools and Docker availability, and captures one pre-change quality baseline. It then implements each task through iru-fastapi-code-one-task (in parallel agents when allowed, except tasks sharing main.py, dependencies.py, a model module or conftest.py, or each adding an Alembic revision).
Step 3 validates cheapest first: license headers, docstrings, scoped fast tests, optional import boundaries, an 80% coverage gate measured from container-free tests alone, the full fast suite, Ruff plus mypy/pyright (plus Bandit) diffed against the baseline, an app-import and OpenAPI-build smoke check with a single-head Alembic check, and last the container-backed stage behind the atomic mkdir-based .integration-test.lock (stale after 60 minutes, bounded ~45-minute wait, released on every exit path). That stage runs iru-python-test integration and, when models or migrations changed, an alembic upgrade, check and downgrade round trip against a throwaway PostgreSQL. Integration results never count toward coverage, and a stage needing Docker when it is unavailable is reported unverified.
Plugin
Shipped by the iru-python plugin of the ai-catalog marketplace (install with /plugin install iru-python@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
Bucket text |
Yes |
Every FastAPI-tagged task/sub-task in the bucket with its own text, the group’s |
None — always invoked with a specific bucket’s text, by |
Outputs
-
Source files, fast tests, integration tests and Alembic revisions created or modified per task, via
iru-fastapi-code-one-task. -
License headers and docstrings kept current across the files the bucket touched.
-
Container-free test coverage of at least 80% lines for changed or new production files, never satisfied by integration tests.
-
No new Ruff, mypy/pyright or Bandit issues versus the baseline, an app that imports with an OpenAPI schema that builds, and a single Alembic head.
-
implementation_plan.mdwith each task’s checkbox checked and its note replaced by the final outcome, quoting the container-free coverage, the integration result and the Alembic result separately. -
A bucket report to the caller: detected shape, per-task results, accepted coverage exceptions, type-check and security findings, the smoke check, the container-backed outcome (passed, fixed, unverified with reason, or no integration selection), lock behavior, and any blocked task.
Execution flow
Dependencies
Invokes
-
FastAPI Code One Task — Step 2, once per task in the bucket (concurrently or sequentially), via the
iru-isolated-skill-executoragent; implements the task and its fast tests and checks off its own checkbox.
Each of the following is invoked via the iru-gate-runner agent so reports stay out of this skill’s context:
-
Python Code Quality — Step 1 (baseline) and Step 3.7 (Ruff, mypy/pyright, Bandit vs baseline).
-
Check License — Step 3.1, license headers for every file the bucket touched.
-
Python Docstrings — Step 3.2, docstrings for the production files.
-
Python Test — Steps 3.3, 3.6 and 3.9, scoped fast tests, the full fast suite and the integration run.
-
Python Coverage — Step 3.5, container-free coverage for the bucket’s changed files.
Invoked by
-
Code One Task Group — Step 2, bucket for key fastapi.
Related agents
-
iru-isolated-skill-executor— one per task in Step 2, so each task’s transcript stays out of this skill’s context. -
iru-gate-runner— the baseline (Step 1) and every validation check (Step 3), including the import-boundary check, the smoke check, the Alembic round trip and the lock-protected integration run.
Source
SKILL.md on GitHub — the file this page was generated from.