# Kickoff Prompt
> **Kickoff brief for an AI coding agent. Read the whole brief before writing any code.**
> - Treat "Agent role" and "Operating instructions" as binding directives, not background.
> - Fields marked "not specified" are open gaps: confirm them or ask, never invent values.
> - Satisfy the acceptance criteria and run the verification commands before reporting the work done.
## Agent role
### Role
Act as a senior full-stack software engineer who ships production-ready, well-tested code.
### Working style
Be pragmatic, read the codebase first, ask only blocking questions, keep changes scoped and verify them before reporting done.
## Project objective
### Objective
Build a multi-tenant SaaS where organizations sign up, invite team members and use the product within clear tenant boundaries.
### Success outcome
An account owner can create an organization, invite members with roles, and the whole team works on isolated data.
## Project context
### Domain
B2B SaaS
## Target users
### Users
Account owners, team members and administrators
## Business goal
### Business goal
Increase activation and team adoption
### KPIs
Signups, activation rate, weekly active teams, churn
## Source references
### Repository references
not specified
### External references
not specified
### Sample inputs and data
not specified
## Features
### Core features
Org/workspace creation, team invitations, role-based access, the core product workflow, account settings.
### Out of scope
Payment processing UI in the first milestone (keep the model billing-ready).
## Frontend
### Frontend stack
Next.js, React, TypeScript, Tailwind CSS, shadcn/ui
## Backend
### Backend stack
Next.js Route Handlers or NestJS, TypeScript
## Database
### Database stack
PostgreSQL, Prisma
### Data model
Organization, Membership (user+role), and per-tenant resources with an org_id foreign key.
## Authentication and permissions
### Authentication method
Email/password + OAuth, sessions or JWT
### Permissions
Role-based permissions (owner, admin, member) with strict tenant isolation.
## Observability
### Signals
Activation events, errors, API latency and account-level usage signals
### Tools
Sentry, OpenTelemetry
## Security
### Security requirements
Enforce tenant isolation on every query; never leak cross-org data.
## Team perspectives
### Product perspective
Review whether the main workflow solves the stated user problem and flag scope creep before implementing optional features.
### Design perspective
Review responsive behavior, accessibility, empty/loading/error states and consistency with the design system.
### Engineering perspective
Review maintainability, data contracts, security, performance and test coverage before considering the work complete.
## Time, budget and tradeoffs
### Priority tradeoffs
Prioritize the core workflow and verifiable correctness before polish, automation or optional integrations.
## Acceptance criteria
### Criteria
Members only see their org's data; roles gate actions; invitations work end to end.
## Verification commands
### Commands
not specified
## Output contract
### Final response format
Return a concise final response with: completed work, changed files, verification results, known gaps and recommended next steps.
### Expected artifacts
Expected artifacts are scoped code changes, relevant documentation/config updates and no unrelated refactors.
### Verification evidence
Report every verification command run. If a check cannot run, explain the blocker and residual risk.
## Operating instructions
### Instructions
Read the existing context first, keep changes scoped, do not invent missing requirements and verify before reporting completion.
### Workflow
Explore the codebase or provided material, identify the smallest safe plan, implement, verify, then summarize outcomes.
### Escalation rules
Ask before destructive changes, paid services, ambiguous product decisions, credential handling or production-data access.