Files
tpl-agentic-dev-base/.cursor/rules/project-status.mdc

145 lines
4.4 KiB
Plaintext

---
description:
globs:
alwaysApply: true
---
# Project Status Guidelines
## **Project Stage Assessment**
- **Determine Current Stage**: Always assess project maturity before making development decisions
- **Stage-Based Priorities**: Adjust development focus based on current project stage
- **Documentation Updates**: Keep [CLAUDE.md](mdc:CLAUDE.md) "Project Status" section current
## **Development Stage Categories**
Based on the project stage assessment from `@create-app-design-document.md`:
### **Stage-Based Development Guidelines**
Development priorities should be determined based on the project stage assessment from the app design document. Each stage has different priorities for what AI should care about vs skip during development.
**Reference:** The specific DO/DON'T lists for each stage are defined in:
- App Design Document generated via `@create-app-design-document.md`
- CLAUDE.md "Project Status" section (updated during app design document creation)
## **Implementation Guidelines**
### **Security-First Approach (All Stages)**
```typescript
// ✅ DO: Always validate inputs with Zod
const userInput = userSchema.parse(input);
// ✅ DO: Use protectedProcedure for auth
export const updateUser = protectedProcedure
.input(updateUserSchema)
.mutation(async ({ ctx, input }) => {
// Implementation
});
// ❌ DON'T: Skip validation even in pre-MVP
const user = input; // Unsafe
```
### **Stage-Appropriate Error Handling**
```typescript
// ✅ Pre-MVP: Basic error handling
try {
await updateUser(data);
} catch (error) {
toast.error('Update failed');
}
// ✅ Production: Comprehensive error handling
try {
await updateUser(data);
} catch (error) {
logger.error('User update failed', { userId, error });
if (error instanceof ValidationError) {
toast.error('Please check your input');
} else {
toast.error('An unexpected error occurred');
captureException(error);
}
}
```
## **Decision Framework**
### **Feature Priority Questions**
1. **Stage Check**: What project stage are we in?
2. **Security Impact**: Does this affect user data or system security?
3. **Core Functionality**: Is this essential for primary user goals?
4. **User Impact**: How many users does this affect?
5. **Technical Debt**: Can we defer this to post-MVP?
### **Code Quality Standards**
- **Pre-MVP**: Focus on readable, working code with security
- **MVP+**: Add testing for user-facing features
- **Production**: Full quality standards and documentation
- **Enterprise**: Advanced patterns and team coordination
## **Status Documentation**
### **Required in CLAUDE.md**
```markdown
## Project Status: [Stage Name]
**Current Stage**: [Pre-MVP | MVP | Production | Enterprise]
**DO NOT care about:**
- [List based on stage]
**DO care about:**
- [List based on stage]
**Next Stage Goals:**
- [Key milestones to reach next stage]
```
### **Regular Updates**
- Update status when deploying to production
- Reassess priorities quarterly or at major milestones
- Document stage transition criteria
- Communicate status changes to team
## **Examples by Stage**
### **Pre-MVP Example: Authentication Feature**
```typescript
// ✅ FOCUS: Core login flow with security
export const loginUser = publicProcedure
.input(loginSchema)
.mutation(async ({ input }) => {
const user = await verifyCredentials(input);
const session = await createSession(user.id);
return { success: true, sessionId: session.id };
});
// ❌ SKIP: Comprehensive testing (save for MVP+)
// ❌ SKIP: Password strength indicators (save for MVP+)
// ❌ SKIP: Remember me functionality (save for MVP+)
```
### **Production Example: Authentication Feature**
```typescript
// ✅ COMPREHENSIVE: Full feature with testing, accessibility, monitoring
export const loginUser = publicProcedure
.input(loginSchema)
.mutation(async ({ input, ctx }) => {
try {
await rateLimiter.check(ctx.ip);
const user = await verifyCredentials(input);
const session = await createSession(user.id);
logger.info('User login successful', { userId: user.id });
await auditLog.record('USER_LOGIN', { userId: user.id });
return { success: true, sessionId: session.id };
} catch (error) {
logger.warn('Login attempt failed', { ip: ctx.ip, error });
throw new TRPCError({ code: 'UNAUTHORIZED', message: 'Invalid credentials' });
}
});
```
Follow stage-appropriate development practices to maintain velocity while ensuring quality at the right time.