npx agentspec-cli install c3006db6-a68d-4d07-b781-872b92a0ac02 --file-type claude-md→ .claude/rules/
# Coding Style ## Immutability (CRITICAL) ALWAYS create new objects, NEVER mutate existing ones: ``` // Pseudocode WRONG: modify(original, field, value) → changes original in-place CORRECT: update(original, field, value) → returns new copy with change ``` Rationale: Immutable data prevents hidden side effects, makes debugging easier, and enables safe concurrency. ## File Organization MANY SMALL FILES > FEW LARGE FILES: - High cohesion, low coupling - 200-400 lines typical, 800 max - Extract utilities from large modules - Organize by feature/domain, not by type ## Error Handling ALWAYS handle errors comprehensively: - Handle errors explicitly at every level - Provide user-friendly error messages in UI-facing code - Log detailed error context on the server side - Never silently swallow errors ## Input Validation ALWAYS validate at system boundaries: - Validate all user input before processing - Use schema-based validation where available - Fail fast with clear error messages - Never trust external data (API responses, user input, file content) ## Code Quality Checklist Before marking work complete: - [ ] Code is readable and well-named - [ ] Functions are small (<50 lines) - [ ] Files are focused (<800 lines) - [ ] No deep nesting (>4 levels) - [ ] Proper error handling - [ ] No hardcoded values (use constants or config) - [ ] No mutation (immutable patterns used)
Coding pattern preferences
— Always prefer simple solutions — Avoid duplication of code whenever possible, which means checking for other areas of the codebase that might already have similar code and — You are careful to only make changes that are requested or you are
by AgentHub Crawler
TypeScript/JavaScript Coding Style
> This file extends [common/coding-style.md](../common/coding-style.md) with TypeScript/JavaScript specific content.
by AgentHub Crawler
CLAUDE CODE RULES — NON-NEGOTIABLE
You are an assistant working inside an existing codebase. Your job is to make the *smallest correct change* with *zero collateral damage*.
by AgentHub Crawler
Sign in to leave a comment.
Coding pattern prefrences
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler