Skip to content

phuryn/product-engineering / app-stack/skills/saas-authorization

saas-authorization

Verified

Adding sign-in, a role, a route that touches data, API tokens, a webhook or job, or 'is this secure': who may do what in a multi-tenant SaaS.

FileKindSize
SKILL.mdskill md12.3 KB
receipts.mdmarkdown1.1 KB
references/documents-and-tests.mdmarkdown11.5 KB
references/model.mdmarkdown20.5 KB
references/threat-model.mdmarkdown20.0 KB

receipts.md

View on GitHub
# saas-authorization: receipts

Each heading is a rule from `SKILL.md`, with the case that taught it.

## Decide who may act on what across every tenant boundary.

- `Undated`: The rules were learned building several products with coding agents on Next.js (App Router) + Supabase Postgres + Clerk + Netlify. Among them were a live Q&A product with an anonymous audience and a monitoring product with API tokens and background workers. They appear here only as examples, named by kind.

## Everything belongs to a workspace, and the product keys on its own row.

- `2026-10-31`, an evals product left authorship out of its first version because this rule gave it no recipe.

## Check permissions, not roles.

- `2026-09-16`, a control was shown under one permission while its action checked another.

## What a screen *says* is gated too.

- `2026-09-17`, two lifecycle states promised the second role actions reserved for the first.

## Invariants are database constraints, not application code.

- `2026-09-16`: A missing quota is an error, never an entitlement.

- `2026-09-03`: A limit of N is a lock and a count, and then every write must go through the function.
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall