FastAPI Code One Task
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Carry out one task from a FastAPI implementation_plan.md — the implementation, its tests, any Alembic revision and the checkbox update — against a FastAPI service, and nothing else. It is the narrowest execution unit for FastAPI projects in the iru-code pipeline and runs on a medium model, since the plan already carries the hard reasoning and the guidance lives in reference/.
Purpose
iru-fastapi-code-one-task exists because FastAPI punishes some mistakes silently: a table model used as the response model leaks columns, blocking I/O inside async def stalls every request, and a forgotten include_router, an @app.on_event hook or an engine created at import time all import fine. The reference files mostly exist to prevent those. It also runs only the fast test files it touched, leaving the integration tier, coverage, Ruff/mypy and the full suite to the group.
It works in any FastAPI service, not only the catalog scaffold, and detects from files the app root and app object, the runner prefix (uv run --frozen, poetry run, pdm run, pipenv run, .venv/bin/ or bare python -m), Python, FastAPI and Pydantic versions, the layout (layered app/, the Full Stack template, src/<pkg>/ or ports and adapters), the persistence stack (SQLModel, SQLAlchemy 2.0, legacy, other or none) with Alembic, sync versus async, the test style and the Ruff/mypy/pyright configuration. It then reads reference/README.md and only the reference files the task needs (code-style.md and testing.md always; routers and dependencies, validation and schemas, persistence, settings and lifespan, async and concurrency, security, streaming and files, or hexagonal on demand).
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 |
|---|---|---|---|
|
Yes |
The task’s own text from the plan, including its exact |
None. |
Outputs
-
Source changes for the single task, including the router, dependency, service or model and the
include_routerwiring, plus a new reviewed Alembic revision with a reversibledowngrade()when the schema changes. Touched files are formatted with the project’s Ruff or Black/isort. -
Fast tests next to the code that are run and green, and
integrationtests where correctness depends on the real engine, which are written but never run. -
Enforced rules: full types and
Annotatedmarkers, docstrings withRaises:, no table model as a response model, no blocking call inasync def,extra="forbid"on write models, no new dependency or tool-config change unless asked, noprintor secrets. -
The task’s own checkbox (and covered sub-tasks) flipped to
[x]inimplementation_plan.mdwith a "group validation pending" note; a blocked task is left unchecked. -
A short report: detected shape and reference files read, files touched and any Alembic revision, fast test results, integration tests left for the group, blockers, deviations from
reference/, and silent-defect patterns noticed nearby. -
It never runs the integration tier, coverage, Ruff/mypy as a gate, license or docstring audits, Alembic against a database, Docker or the full suite.
Execution flow
Dependencies
Invokes
None — iru-fastapi-code-one-task does not call other skills; it reads its own reference/ files and runs the project’s fast-test command and Alembic revision generation directly.
Invoked by
-
FastAPI Code One Task Group — Step 2, implements each task and its fast tests, via the
iru-isolated-skill-executoragent.
Source
SKILL.md on GitHub — the file this page was generated from.