Python Web
Use for Python/SSR-first websites, landings, booking/order/catalog/admin systems, dashboards, BFFs, and small productized business apps. Local-business projects are a primary use case, not the skill name/boundary.
Prefer server-rendered HTML with FastAPI + Jinja2. Use HTMX for partial forms/updates and Alpine.js for tiny client-side state only when they simplify UX. Do not turn this into a React/TS-first app unless explicitly requested.
Triggers
- build/plan a Python FastAPI/Jinja2 site/app
- create a landing, small catalog/commerce, booking, ordering, dashboard, CRM/leads, cash-flow, or admin system
- scope a sellable web package from public/user-provided business data
- design FastAPI routes, Jinja templates, forms, SQLModel/Alembic persistence, auth/admin boundaries
- implement with uv, Tailwind, pytest, ruff, ty
Boundary
Covers:
- public-data discovery, brief, scope, project state, route map, template map, data model, form contracts
- FastAPI, Jinja2, Tailwind, HTMX/Alpine optional, Pydantic, SQLModel, Alembic
- SQLite local, PostgreSQL/Supabase/managed Postgres production
- responsive UI, accessibility, tests, deployment readiness
Excludes:
- frontend-heavy React/Next.js/SPAs by default
- fake reviews, spam, ToS bypass, private scraping
- sensitive medical records or unnecessary personal data
- enterprise architecture unless explicitly required
Stack
Default unless repo already has compatible Python conventions:
- Python 3.12+, uv
- FastAPI, Uvicorn, Jinja2
- Tailwind CSS; HTMX optional for partial updates/forms; Alpine.js optional for tiny state
- Pydantic validation; SQLModel ORM/models; Alembic migrations
- SQLite local; PostgreSQL/Supabase/Neon/Railway Postgres in production when needed
- Session-based admin auth by default; external auth only when required
- pytest, ruff format/check, ty check
Avoid Celery, Redis, React, GraphQL, or complex frontend build systems unless the requirement truly demands it.
Product Profiles
Pick one primary profile; list secondary modules separately.
| Profile |
Use when |
Core scope |
static-site |
presence/content |
pages, SEO, CTA, contact, map/social |
conversion-landing |
one offer/campaign |
offer, proof, FAQ, lead form, WhatsApp/events |
booking-system |
appointments |
services, availability, booking, admin status |
ordering-system |
food/service orders |
menu, cart, customer info, WhatsApp/admin hand |
catalog-commerce |
products/light commerce |
catalog, search, cart intent, admin catalog |
admin-dashboard |
internal ops/cash-flow/leads |
CRUD, summaries, filters, export, permissions |
custom-ops |
specific workflow |
domain model + one vertical slice |
Reference Map
- Research/business facts/sales positioning:
references/discovery.md
- Package/module selection:
references/product-catalog.md
- Routes, templates, DB, migrations, auth, deployment:
references/architecture.md
- Coding workflow/patterns:
references/implementation.md
- Final verification:
references/checklists.md
Workflow
- Inspect repo: uv/pyproject, scripts, FastAPI app, routes, templates, DB, migrations, tests. Reuse conventions.
- Build
Business Brief if business context matters: confirmed facts, user facts, assumptions, unknowns, goals.
- Choose profile/package; define MVP, phase 2, out of scope.
- Produce/update project state before nontrivial code:
SPEC.md
DESIGN.md
TODO.md
.spec/state.md
.spec/handoff.md
.mem/open-loops.md
- Define route map, template map, flows, entities/tables, form contracts, auth/deployment assumptions, acceptance criteria.
- Implement one vertical slice first: schema/model -> migration -> service -> FastAPI route -> Jinja page/partial -> validation states -> tests -> docs.
- Validate with repo scripts; prefer
uv run ruff format --check ., uv run ruff check ., uv run ty check, uv run pytest; for DB, uv run alembic upgrade head.
Architecture Defaults
Simple app:
app/{main.py,core,routes,templates,static,components,services}
Persisted/admin system:
app/
main.py
core/{config.py,security.py,templates.py}
db/{session.py,models.py}
features/{public,admin,bookings,orders,catalog,cashflow}
templates/{layouts,pages,partials,components}
static/{css,js}
tests/
alembic/versions/
Dependency direction:
routes -> services -> db/session/models
routes -> templates
services -> db/session/models
models -> no routes/templates imports
templates -> no business logic
Keep business rules testable; IO/framework/provider code stays at edges.
Output
Planning responses include: summary, package/profile, MVP, phase 2, out of scope, route map, template map, data model, architecture, checklist, risks/questions, and state files updated.
Implementation responses include: files changed, behavior added, validation run, assumptions/remaining confirmations, and state updates when decisions or next steps changed.
1---2name: python-web3description: Plan, sell, design, and implement Python/HTML-first web apps with FastAPI, Jinja2, Tailwind, HTMX/Alpine when useful, Pydantic, SQLModel, Alembic, SQLite/Postgres, pytest, ruff, ty, and uv.4---56# Python Web78Use for Python/SSR-first websites, landings, booking/order/catalog/admin systems, dashboards, BFFs, and small productized business apps. Local-business projects are a primary use case, not the skill name/boundary.910Prefer server-rendered HTML with FastAPI + Jinja2. Use HTMX for partial forms/updates and Alpine.js for tiny client-side state only when they simplify UX. Do not turn this into a React/TS-first app unless explicitly requested.1112## Triggers1314- build/plan a Python FastAPI/Jinja2 site/app15- create a landing, small catalog/commerce, booking, ordering, dashboard, CRM/leads, cash-flow, or admin system16- scope a sellable web package from public/user-provided business data17- design FastAPI routes, Jinja templates, forms, SQLModel/Alembic persistence, auth/admin boundaries18- implement with uv, Tailwind, pytest, ruff, ty1920## Boundary2122Covers:2324- public-data discovery, brief, scope, project state, route map, template map, data model, form contracts25- FastAPI, Jinja2, Tailwind, HTMX/Alpine optional, Pydantic, SQLModel, Alembic26- SQLite local, PostgreSQL/Supabase/managed Postgres production27- responsive UI, accessibility, tests, deployment readiness2829Excludes:3031- frontend-heavy React/Next.js/SPAs by default32- fake reviews, spam, ToS bypass, private scraping33- sensitive medical records or unnecessary personal data34- enterprise architecture unless explicitly required3536## Stack3738Default unless repo already has compatible Python conventions:3940- Python 3.12+, uv41- FastAPI, Uvicorn, Jinja242- Tailwind CSS; HTMX optional for partial updates/forms; Alpine.js optional for tiny state43- Pydantic validation; SQLModel ORM/models; Alembic migrations44- SQLite local; PostgreSQL/Supabase/Neon/Railway Postgres in production when needed45- Session-based admin auth by default; external auth only when required46- pytest, ruff format/check, ty check4748Avoid Celery, Redis, React, GraphQL, or complex frontend build systems unless the requirement truly demands it.4950## Product Profiles5152Pick one primary profile; list secondary modules separately.5354| Profile | Use when | Core scope |55| -------------------- | ---------------------------- | ----------------------------------------------- |56| `static-site` | presence/content | pages, SEO, CTA, contact, map/social |57| `conversion-landing` | one offer/campaign | offer, proof, FAQ, lead form, WhatsApp/events |58| `booking-system` | appointments | services, availability, booking, admin status |59| `ordering-system` | food/service orders | menu, cart, customer info, WhatsApp/admin hand |60| `catalog-commerce` | products/light commerce | catalog, search, cart intent, admin catalog |61| `admin-dashboard` | internal ops/cash-flow/leads | CRUD, summaries, filters, export, permissions |62| `custom-ops` | specific workflow | domain model + one vertical slice |6364## Reference Map6566- Research/business facts/sales positioning: `references/discovery.md`67- Package/module selection: `references/product-catalog.md`68- Routes, templates, DB, migrations, auth, deployment: `references/architecture.md`69- Coding workflow/patterns: `references/implementation.md`70- Final verification: `references/checklists.md`7172## Workflow73741. Inspect repo: uv/pyproject, scripts, FastAPI app, routes, templates, DB, migrations, tests. Reuse conventions.752. Build `Business Brief` if business context matters: confirmed facts, user facts, assumptions, unknowns, goals.763. Choose profile/package; define MVP, phase 2, out of scope.774. Produce/update project state before nontrivial code:78 - `SPEC.md`79 - `DESIGN.md`80 - `TODO.md`81 - `.spec/state.md`82 - `.spec/handoff.md`83 - `.mem/open-loops.md`845. Define route map, template map, flows, entities/tables, form contracts, auth/deployment assumptions, acceptance criteria.856. Implement one vertical slice first: schema/model -> migration -> service -> FastAPI route -> Jinja page/partial -> validation states -> tests -> docs.867. Validate with repo scripts; prefer `uv run ruff format --check .`, `uv run ruff check .`, `uv run ty check`, `uv run pytest`; for DB, `uv run alembic upgrade head`.8788## Architecture Defaults8990Simple app:9192```txt93app/{main.py,core,routes,templates,static,components,services}94```9596Persisted/admin system:9798```txt99app/100 main.py101 core/{config.py,security.py,templates.py}102 db/{session.py,models.py}103 features/{public,admin,bookings,orders,catalog,cashflow}104 templates/{layouts,pages,partials,components}105 static/{css,js}106 tests/107alembic/versions/108```109110Dependency direction:111112```txt113routes -> services -> db/session/models114routes -> templates115services -> db/session/models116models -> no routes/templates imports117templates -> no business logic118```119120Keep business rules testable; IO/framework/provider code stays at edges.121122## Output123124Planning responses include: summary, package/profile, MVP, phase 2, out of scope, route map, template map, data model, architecture, checklist, risks/questions, and state files updated.125126Implementation responses include: files changed, behavior added, validation run, assumptions/remaining confirmations, and state updates when decisions or next steps changed.