mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
- Convert 40 JS files to TypeScript (CLI, tools, core, MCP server) - Add Zod for runtime parameter validation - Add type definitions in src/types/ - Keep src/templates/ as JavaScript (dashboard frontend) - Update bin entries to use dist/ - Add tsconfig.json with strict mode - Add backward-compatible exports for tests - All 39 tests passing Breaking changes: None (backward compatible) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
71 lines
1.2 KiB
Plaintext
71 lines
1.2 KiB
Plaintext
# Rule Template: Implementation Patterns
|
|
|
|
## Variables
|
|
- {TECH_STACK_NAME}: Tech stack display name
|
|
- {FILE_EXT}: File extension pattern
|
|
|
|
## Output Format
|
|
|
|
```markdown
|
|
---
|
|
paths: src/**/*.{FILE_EXT}
|
|
---
|
|
|
|
# {TECH_STACK_NAME} Implementation Patterns
|
|
|
|
## Common Patterns
|
|
|
|
[With code examples from Exa research]
|
|
|
|
### Pattern 1: [Name]
|
|
```{lang}
|
|
// Example code
|
|
```
|
|
**When to use**: [Context]
|
|
**Benefits**: [Why this pattern]
|
|
|
|
### Pattern 2: [Name]
|
|
...
|
|
|
|
## Anti-Patterns to Avoid
|
|
|
|
[Common mistakes with examples]
|
|
|
|
### Anti-Pattern 1: [Name]
|
|
```{lang}
|
|
// Bad example
|
|
```
|
|
**Problem**: [Why it's bad]
|
|
**Solution**: [Better approach]
|
|
|
|
## Error Handling
|
|
|
|
[Error handling conventions]
|
|
- Error types and hierarchy
|
|
- Try-catch patterns
|
|
- Error propagation
|
|
- Logging practices
|
|
|
|
## Async Patterns
|
|
|
|
[Asynchronous code conventions - if applicable]
|
|
- Promise handling
|
|
- Async/await usage
|
|
- Concurrency patterns
|
|
- Error handling in async code
|
|
|
|
## State Management
|
|
|
|
[State handling patterns]
|
|
- Local state patterns
|
|
- Shared state approaches
|
|
- Immutability practices
|
|
```
|
|
|
|
## Content Guidelines
|
|
|
|
- Focus on source code implementation
|
|
- Provide concrete code examples
|
|
- Show both good and bad patterns
|
|
- Include context for when to apply each pattern
|