This example shows the shape of a source-checkout dogfood flow for Python FastAPI and pytest repositories. It uses committed fixture paths as examples, but the commands are intended for any repository you choose to initialize.
FastAPI route:
from fastapi import APIRouter
router = APIRouter()
@router.get("/health")
def health():
return {"ok": True}pytest test:
def test_health_response(client):
response = client.get("/health")
assert response.status_code == 200RepoGrammar can form bounded families only when enough compatible exact-anchor
evidence exists. Low-support examples, ambiguous fixtures, dynamic imports,
runtime dependency injection, stale evidence, and framework magic remain
UNKNOWN.
export REPOGRAMMAR_TARGET=/path/to/python/repo
cd "$REPOGRAMMAR_TARGET"
repogrammar init
repogrammar families
repogrammar find --project . --token-budget 8000 path/to/routes.py
repogrammar find --project . --token-budget 8000 path/to/test_routes.py
For metadata plus bounded source spans:
repogrammar find --project . --token-budget 8000 --include-source-spans path/to/routes.py
- A FastAPI route family should mention framework-family support such as
framework:fastapi.routeonly when compatible exact anchors are present. - A pytest family should preserve fixture ambiguity as
UNKNOWNwhen fixture binding is not unambiguous. - The
read_planlists repo-relative spans to inspect before editing. - Default output does not include source snippets.
checkresults remain advisory where runtime equivalence is unproven.
- Dynamic route decorators or route prefixes must not become support evidence.
- Custom pytest wrappers must not be treated as native runner support.
- Ambiguous or plugin-provided fixtures must remain typed
UNKNOWN. - Low-support examples should return
UNKNOWNinstead of a weak family claim.