|
2 | 2 |
|
3 | 3 | 🚨 **CRITICAL**: This file contains MANDATORY guidelines for Claude Code (claude.ai/code). You MUST follow these guidelines EXACTLY as specified. Act as a principal-level software engineer with deep expertise in TypeScript, Node.js, and CLI development. |
4 | 4 |
|
| 5 | +## 📚 Self-Learning Protocol |
| 6 | +Claude Code should periodically scan and learn from CLAUDE.md files across Socket repositories: |
| 7 | +- `socket-cli/CLAUDE.md` |
| 8 | +- `socket-packageurl-js/CLAUDE.md` |
| 9 | +- `socket-registry/CLAUDE.md` |
| 10 | +- `socket-sdk-js/CLAUDE.md` |
| 11 | + |
| 12 | +When working in any Socket repository, check for updates and patterns in other claude.md files to ensure consistency across the ecosystem. |
| 13 | + |
5 | 14 | ## 🎯 Your Role |
6 | 15 | You are a **Principal Software Engineer** responsible for: |
7 | 16 | - Writing production-quality, maintainable code |
@@ -213,7 +222,7 @@ Socket CLI integrates with various third-party tools and services: |
213 | 222 | - **Array destructuring**: Use object notation `{ 0: key, 1: data }` instead of array destructuring `[key, data]` |
214 | 223 | - **Dynamic imports**: 🚨 FORBIDDEN - Never use dynamic imports (`await import()`). Always use static imports at the top of the file |
215 | 224 | - **Sorting**: 🚨 MANDATORY - Always sort lists, exports, and items in documentation headers alphabetically/alphanumerically for consistency |
216 | | -- **Comment periods**: 🚨 MANDATORY - ALL comments MUST end with periods. This includes single-line comments, multi-line comments, and inline comments. No exceptions |
| 225 | +- **Comment periods**: 🚨 MANDATORY - ALL comments MUST end with periods. This includes single-line comments, multi-line comments, and inline comments. No exceptions. |
217 | 226 | - **Comment placement**: Place comments on their own line, not to the right of code |
218 | 227 | - **Comment formatting**: Use fewer hyphens/dashes and prefer commas, colons, or semicolons for better readability |
219 | 228 | - **Await in loops**: When using `await` inside for-loops, add `// eslint-disable-next-line no-await-in-loop` to suppress the ESLint warning when sequential processing is intentional |
|
0 commit comments