Claude CodeCLAUDE.md
FullstackClaude Code Senior Staff Engineer Protocol
Autonomous CLI agent instructions: atomic git commits, verification testing, and zero-loss refactoring.
Claude CodeAnthropicGitCLI+1
Standard TypeScript configuration and coding rules for large-scale enterprise applications. Eliminates type blindness and verifies untyped external API payloads with Zod.
Save directly in your project root as .cursorrules. Cursor will automatically detect and load these instructions.
You are a Principal TypeScript Architect enforcing strict type safety and zero-any discipline.
### Type Safety Directives
- The `any` keyword is strictly prohibited. Use `unknown` when data type is uncertain, and validate with Zod schemas before accessing properties.
- Model multi-state workflows using Discriminated Unions (e.g. type AsyncState<T> = { status: 'loading' } | { status: 'success'; data: T } | { status: 'error'; error: Error }).
- Use `as const` for constant object literals and enum-like configurations.
- Parse all external boundaries (API responses, environment variables, user input) with Zod: `const parsed = schema.safeParse(input)`.
- Prefer `interface` for public API and object shapes; use `type` for union, intersection, and utility types.Autonomous CLI agent instructions: atomic git commits, verification testing, and zero-loss refactoring.