

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1234567# Backend Python Rules89These rules apply when working on backend Python code in `core/` and `edgekit/`.1011## Technology Stack1213- **Framework**: FastAPI (Python 3.11+)14- **ORM**: SQLAlchemy 2.x with async session patterns15- **Migrations**: Alembic16- **Database**: PostgreSQL 1617- **Authentication**: JWT (custom implementation)1819## Coding Standards2021- Use `ruff` for linting and formatting (config in `pyproject.toml`)22- Always run `ruff check .` before committing23- Use `mypy` for type checking24- Python 3.11+ features are allowed (StrEnum, etc.)25- Use async/await patterns for all FastAPI endpoints2627## Database Operations2829**CRITICAL**: All database operations MUST use RLS context helpers.3031```python32# User operations33async with with_user_context(session, user_id) as ctx:34 result = await ctx.execute(select(Model).where(Model.user_id == user_id))3536# Admin operations37async with with_admin_context(session, user_id) as ctx:38 result = await ctx.execute(select(Model))3940# System/background operations41async with with_system_context(session, "source_name") as ctx:42 result = await ctx.execute(insert(Model).values(data))43```4445Never use direct session calls without RLS context wrappers.4647## Migration Workflow4849```bash50alembic revision --autogenerate -m "description" # Create migration51alembic upgrade head # Apply locally52# Review the generated migration file before committing53git add alembic/versions/54git commit -m "feat(db): add migration description [{{TICKET_PREFIX}}-XXX]"55```5657Rules:58- Always create proper Alembic migrations (never skip)59- Review auto-generated migrations for correctness60- Add RLS policies for any new tables61- Schema changes require System Architect approval6263## FastAPI Patterns6465- Use dependency injection for database sessions66- Use Pydantic v2 models for request/response validation67- Use proper HTTP status codes68- Include OpenAPI documentation (FastAPI generates this)69- Use structured logging7071## Testing7273- Use `pytest` with async support (`pytest-asyncio`)74- Run `pytest tests/` before committing75- Integration tests go in `tests/integration/`76- E2E tests go in `tests/e2e/`7778## Key References7980- See `patterns_library/api/` for API route patterns81- See `docs/database/DATA_DICTIONARY.md` for schema reference82- See `docs/database/RLS_IMPLEMENTATION_GUIDE.md` for RLS patterns83- See `CONTRIBUTING.md` for full workflow details84
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bybren-llc/safe-agentic-workflow.cursor/rules/00-core-principles.mdc · 399 | Cursor rules | no sections | 48/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/01-git-workflow.mdc · 399 | Cursor rules | lint-formatstyletypesgit+2 | 85/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/02-pattern-discovery.mdc · 399 | Cursor rules | stylearchgitdo-not+2 | 73/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/03-safe-ai-dlc.mdc · 399 | Cursor rules | styledo-not | 59/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/04-knowledge-vault.mdc · 399 | Cursor rules | stylegitapido-not | 73/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/11-frontend-react.mdc · 399 | Cursor rules | buildstyletypessecurity+3 | 65/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/12-database-sql.mdc · 399 | Cursor rules | testtypesgitsecurity+3 | 69/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/13-testing.mdc · 399 | Cursor rules | teststyletesting-strategyapi+1 | 88/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/14-spec-creation.mdc · 399 | Cursor rules | teststylegitdo-not | 69/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/15-deployment.mdc · 399 | Cursor rules | setuptestgitsecurity+2 | 80/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/16-stripe-payments.mdc · 399 | Cursor rules | testdo-not | 61/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/20-agent-architect.mdc · 399 | Cursor rules | stylearchgit | 58/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/21-agent-backend.mdc · 399 | Cursor rules | testlint-formatstyleapi+1 | 85/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/22-agent-qas.mdc · 399 | Cursor rules | teststylesecurityagent-behaviour | 81/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/23-agent-security.mdc · 399 | Cursor rules | stylesecurity | 52/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/30-background-agents.mdc · 399 | Cursor rules | testlint-formatstylegit+1 | 74/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/31-mcp-integration.mdc · 399 | Cursor rules | stylesecuritydo-notagent-behaviour | 61/100 | today | |
| bybren-llc/safe-agentic-workflow.gemini/GEMINI.md · 399 | GEMINI.md | lint-formatstylearchgit+4 | 66/100 | today | |
| bybren-llc/safe-agentic-workflowAGENTS.md · 399 | AGENTS.md | buildteststylearch+5 | 84/100 | today | |
| bybren-llc/safe-agentic-workflowCLAUDE.md · 399 | CLAUDE.md | buildtestlint-formatarch+6 | 91/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 46 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/bybren-llc-safe-agentic-workflow-cursor-rules-10-backend-python)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.