Skip to content

Commit 0e9f613

Browse files
committed
Revert "feat(ecc): prune plugin 43→12 items, promote 7 rules to .claude/rules/ (anomalyco#245)"
This reverts commit 1bd68ff.
1 parent 1bd68ff commit 0e9f613

536 files changed

Lines changed: 111479 additions & 253 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude-plugin/plugin.json‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,17 @@
2424
],
2525
"skills": ["./skills/", "./commands/"],
2626
"agents": [
27+
"./agents/architect.md",
2728
"./agents/build-error-resolver.md",
29+
"./agents/code-reviewer.md",
30+
"./agents/database-reviewer.md",
31+
"./agents/doc-updater.md",
2832
"./agents/e2e-runner.md",
33+
"./agents/go-build-resolver.md",
34+
"./agents/go-reviewer.md",
35+
"./agents/planner.md",
36+
"./agents/python-reviewer.md",
37+
"./agents/refactor-cleaner.md",
2938
"./agents/security-reviewer.md",
3039
"./agents/tdd-guide.md"
3140
]

‎.cursor/MIGRATION.md‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Migrating from Claude Code to Cursor
2+
3+
This guide maps Claude Code concepts to their Cursor equivalents.
4+
5+
## Concept Mapping
6+
7+
| Claude Code | Cursor | Notes |
8+
|-------------|--------|-------|
9+
| `~/.claude/rules/` | `.cursor/rules/` | Project-scoped; YAML frontmatter with `description`, `globs`, `alwaysApply` |
10+
| `~/.claude/agents/` | `.cursor/agents/` | `model: opus` → `model: anthropic/claude-opus-4-5`; `tools` → `readonly` |
11+
| `~/.claude/skills/` | `.cursor/skills/` | Identical Agent Skills standard (SKILL.md) |
12+
| `~/.claude/commands/` | `.cursor/commands/` | Compatible markdown format |
13+
| `~/.claude.json` mcpServers | `.cursor/mcp.json` | Uses `${env:VAR_NAME}` interpolation syntax |
14+
| Hooks (PreToolUse/PostToolUse/Stop) | No equivalent | Use linters, formatters, pre-commit hooks, CI/CD |
15+
| Contexts | Rules with `alwaysApply: false` | Manually activated via @ mentions |
16+
| `model: opus` | `model: anthropic/claude-opus-4-5` | Full model ID required |
17+
| `model: sonnet` | `model: anthropic/claude-sonnet-4-5` | Full model ID required |
18+
| `tools: ["Read", "Grep"]` | `readonly: true` | Read-only tools mapped to readonly flag |
19+
| `tools: ["Read", "Write", "Bash"]` | `readonly: false` | Write tools mapped to full access |
20+
21+
## Feature Parity Matrix
22+
23+
| Feature | Claude Code | Cursor | Status |
24+
|---------|-------------|--------|--------|
25+
| Rules | Global + Project | Project only | Available |
26+
| Agents | Full tool control | readonly flag | Available |
27+
| Skills | Agent Skills standard | Agent Skills standard | Identical |
28+
| Commands | Slash commands | Slash commands | Available |
29+
| MCP Servers | Native support | Native support | Available |
30+
| Hooks | PreToolUse/PostToolUse/Stop | Not available | Use alternatives |
31+
| Contexts | Context files | Rules (alwaysApply: false) | Partial |
32+
| Multi-model orchestration | codeagent-wrapper | Not available | Not available |
33+
| Global config | ~/.claude/ | Project .cursor/ only | Different scope |
34+
35+
## Key Differences
36+
37+
### Rules
38+
- **Claude Code**: Rules stored globally in `~/.claude/rules/` with subdirectories
39+
- **Cursor**: Rules stored in project `.cursor/rules/` with YAML frontmatter for metadata
40+
- **Translation**: Subdirectory paths flattened with hyphens (e.g., `common/security.md` → `common-security.md`)
41+
42+
### Agents
43+
- **Claude Code**: Specify individual tools via `tools: [...]` array
44+
- **Cursor**: Binary `readonly: true/false` flag
45+
- **Translation**: Read-only tools (Read, Grep, Glob) → `readonly: true`; any write tool → `readonly: false`
46+
47+
### Model IDs
48+
- **Claude Code**: Short names (`opus`, `sonnet`, `haiku`)
49+
- **Cursor**: Full Anthropic model IDs (`anthropic/claude-opus-4-5`, `anthropic/claude-sonnet-4-5`)
50+
51+
### Hooks → Alternatives
52+
Claude Code hooks have no direct equivalent in Cursor. Alternatives:
53+
- **Formatting on save**: Configure Cursor's format-on-save with Prettier, Black, gofmt
54+
- **Linting**: Use Cursor's built-in linter integration (ESLint, Ruff, golangci-lint)
55+
- **Pre-commit**: Use `husky` or `pre-commit` for git hooks
56+
- **CI/CD**: Move stop-hook checks to GitHub Actions or similar
57+
58+
### MCP Configuration
59+
- **Claude Code**: Environment values use placeholder strings (e.g., `"YOUR_GITHUB_PAT_HERE"`)
60+
- **Cursor**: Environment values use interpolation syntax (e.g., `"${env:GITHUB_PERSONAL_ACCESS_TOKEN}"`)
61+
62+
## Tips for Migrating
63+
64+
1. **Start with rules**: Install common + your language-specific rules first
65+
2. **Add agents gradually**: Start with planner and code-reviewer, add others as needed
66+
3. **Skills are plug-and-play**: The skills/ directory works identically in both tools
67+
4. **Set up MCP**: Copy mcp.json and configure your environment variables
68+
5. **Replace hooks with CI**: Set up pre-commit hooks and CI checks for what you lose from Claude Code hooks

‎.cursor/README.md‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Everything Claude Code — Cursor IDE Support
2+
3+
Pre-translated configurations for [Cursor IDE](https://cursor.com), part of the [ecc-universal](https://www.npmjs.com/package/ecc-universal) package.
4+
5+
## What's Included
6+
7+
| Category | Count | Description |
8+
|----------|-------|-------------|
9+
| Rules | 27 | Coding standards, security, testing, patterns (common + TypeScript/Python/Go) |
10+
| Agents | 13 | Specialized AI agents (planner, architect, code-reviewer, tdd-guide, etc.) |
11+
| Skills | 43 | Agent skills for backend, frontend, security, TDD, and more |
12+
| Commands | 31 | Slash commands for planning, reviewing, testing, and deployment |
13+
| MCP Config | 1 | Pre-configured MCP servers (GitHub, Supabase, Vercel, Railway, etc.) |
14+
15+
## Agents
16+
17+
| Agent | Description | Mode |
18+
|-------|-------------|------|
19+
| planner | Expert planning specialist for complex features and refactoring | Read-only |
20+
| architect | Software architecture specialist for system design and scalability | Read-only |
21+
| code-reviewer | Code review for quality, security, and maintainability | Full access |
22+
| tdd-guide | Test-driven development with 80%+ coverage enforcement | Full access |
23+
| security-reviewer | Security vulnerability detection (OWASP Top 10) | Full access |
24+
| build-error-resolver | Build and TypeScript error resolution | Full access |
25+
| e2e-runner | End-to-end testing with Playwright | Full access |
26+
| doc-updater | Documentation and codemap updates | Full access |
27+
| refactor-cleaner | Dead code cleanup and consolidation | Full access |
28+
| database-reviewer | PostgreSQL/Supabase database specialist | Full access |
29+
| go-build-resolver | Go build error resolution | Full access |
30+
| go-reviewer | Go code review specialist | Full access |
31+
| python-reviewer | Python code review specialist | Full access |
32+
33+
## Installation
34+
35+
```bash
36+
# Install the package
37+
npm install ecc-universal
38+
39+
# Install Cursor configs for TypeScript projects
40+
./install.sh --target cursor typescript
41+
42+
# Install for multiple languages
43+
./install.sh --target cursor typescript python golang
44+
```
45+
46+
## Rules Structure
47+
48+
- **Common rules** (always active): coding-style, security, testing, git-workflow, hooks, patterns, performance, agents
49+
- **Language-specific rules** (activated by file type): TypeScript, Python, Go
50+
- **Context rules** (manually activated): dev, research, review modes
51+
52+
## MCP Servers
53+
54+
The included `mcp.json` provides pre-configured MCP servers. Copy to your project's `.cursor/mcp.json` and set environment variables:
55+
56+
- `GITHUB_PERSONAL_ACCESS_TOKEN` — GitHub operations
57+
- `FIRECRAWL_API_KEY` — Web scraping
58+
59+
## Further Reading
60+
61+
- [Migration Guide](MIGRATION.md) — Concept mapping from Claude Code to Cursor
62+
- [Main README](../README.md) — Full documentation and guides

‎.cursor/agents/architect.md‎

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
---
2+
name: architect
3+
description: Software architecture specialist for system design, scalability, and technical decision-making. Use PROACTIVELY when planning new features, refactoring large systems, or making architectural decisions.
4+
tools: ["Read", "Grep", "Glob"]
5+
model: opus
6+
---
7+
8+
You are a senior software architect specializing in scalable, maintainable system design.
9+
10+
## Your Role
11+
12+
- Design system architecture for new features
13+
- Evaluate technical trade-offs
14+
- Recommend patterns and best practices
15+
- Identify scalability bottlenecks
16+
- Plan for future growth
17+
- Ensure consistency across codebase
18+
19+
## Architecture Review Process
20+
21+
### 1. Current State Analysis
22+
- Review existing architecture
23+
- Identify patterns and conventions
24+
- Document technical debt
25+
- Assess scalability limitations
26+
27+
### 2. Requirements Gathering
28+
- Functional requirements
29+
- Non-functional requirements (performance, security, scalability)
30+
- Integration points
31+
- Data flow requirements
32+
33+
### 3. Design Proposal
34+
- High-level architecture diagram
35+
- Component responsibilities
36+
- Data models
37+
- API contracts
38+
- Integration patterns
39+
40+
### 4. Trade-Off Analysis
41+
For each design decision, document:
42+
- **Pros**: Benefits and advantages
43+
- **Cons**: Drawbacks and limitations
44+
- **Alternatives**: Other options considered
45+
- **Decision**: Final choice and rationale
46+
47+
## Architectural Principles
48+
49+
### 1. Modularity & Separation of Concerns
50+
- Single Responsibility Principle
51+
- High cohesion, low coupling
52+
- Clear interfaces between components
53+
- Independent deployability
54+
55+
### 2. Scalability
56+
- Horizontal scaling capability
57+
- Stateless design where possible
58+
- Efficient database queries
59+
- Caching strategies
60+
- Load balancing considerations
61+
62+
### 3. Maintainability
63+
- Clear code organization
64+
- Consistent patterns
65+
- Comprehensive documentation
66+
- Easy to test
67+
- Simple to understand
68+
69+
### 4. Security
70+
- Defense in depth
71+
- Principle of least privilege
72+
- Input validation at boundaries
73+
- Secure by default
74+
- Audit trail
75+
76+
### 5. Performance
77+
- Efficient algorithms
78+
- Minimal network requests
79+
- Optimized database queries
80+
- Appropriate caching
81+
- Lazy loading
82+
83+
## Common Patterns
84+
85+
### Frontend Patterns
86+
- **Component Composition**: Build complex UI from simple components
87+
- **Container/Presenter**: Separate data logic from presentation
88+
- **Custom Hooks**: Reusable stateful logic
89+
- **Context for Global State**: Avoid prop drilling
90+
- **Code Splitting**: Lazy load routes and heavy components
91+
92+
### Backend Patterns
93+
- **Repository Pattern**: Abstract data access
94+
- **Service Layer**: Business logic separation
95+
- **Middleware Pattern**: Request/response processing
96+
- **Event-Driven Architecture**: Async operations
97+
- **CQRS**: Separate read and write operations
98+
99+
### Data Patterns
100+
- **Normalized Database**: Reduce redundancy
101+
- **Denormalized for Read Performance**: Optimize queries
102+
- **Event Sourcing**: Audit trail and replayability
103+
- **Caching Layers**: Redis, CDN
104+
- **Eventual Consistency**: For distributed systems
105+
106+
## Architecture Decision Records (ADRs)
107+
108+
For significant architectural decisions, create ADRs:
109+
110+
```markdown
111+
# ADR-001: Use Redis for Semantic Search Vector Storage
112+
113+
## Context
114+
Need to store and query 1536-dimensional embeddings for semantic market search.
115+
116+
## Decision
117+
Use Redis Stack with vector search capability.
118+
119+
## Consequences
120+
121+
### Positive
122+
- Fast vector similarity search (<10ms)
123+
- Built-in KNN algorithm
124+
- Simple deployment
125+
- Good performance up to 100K vectors
126+
127+
### Negative
128+
- In-memory storage (expensive for large datasets)
129+
- Single point of failure without clustering
130+
- Limited to cosine similarity
131+
132+
### Alternatives Considered
133+
- **PostgreSQL pgvector**: Slower, but persistent storage
134+
- **Pinecone**: Managed service, higher cost
135+
- **Weaviate**: More features, more complex setup
136+
137+
## Status
138+
Accepted
139+
140+
## Date
141+
2025-01-15
142+
```
143+
144+
## System Design Checklist
145+
146+
When designing a new system or feature:
147+
148+
### Functional Requirements
149+
- [ ] User stories documented
150+
- [ ] API contracts defined
151+
- [ ] Data models specified
152+
- [ ] UI/UX flows mapped
153+
154+
### Non-Functional Requirements
155+
- [ ] Performance targets defined (latency, throughput)
156+
- [ ] Scalability requirements specified
157+
- [ ] Security requirements identified
158+
- [ ] Availability targets set (uptime %)
159+
160+
### Technical Design
161+
- [ ] Architecture diagram created
162+
- [ ] Component responsibilities defined
163+
- [ ] Data flow documented
164+
- [ ] Integration points identified
165+
- [ ] Error handling strategy defined
166+
- [ ] Testing strategy planned
167+
168+
### Operations
169+
- [ ] Deployment strategy defined
170+
- [ ] Monitoring and alerting planned
171+
- [ ] Backup and recovery strategy
172+
- [ ] Rollback plan documented
173+
174+
## Red Flags
175+
176+
Watch for these architectural anti-patterns:
177+
- **Big Ball of Mud**: No clear structure
178+
- **Golden Hammer**: Using same solution for everything
179+
- **Premature Optimization**: Optimizing too early
180+
- **Not Invented Here**: Rejecting existing solutions
181+
- **Analysis Paralysis**: Over-planning, under-building
182+
- **Magic**: Unclear, undocumented behavior
183+
- **Tight Coupling**: Components too dependent
184+
- **God Object**: One class/component does everything
185+
186+
## Project-Specific Architecture (Example)
187+
188+
Example architecture for an AI-powered SaaS platform:
189+
190+
### Current Architecture
191+
- **Frontend**: Next.js 15 (Vercel/Cloud Run)
192+
- **Backend**: FastAPI or Express (Cloud Run/Railway)
193+
- **Database**: PostgreSQL (Supabase)
194+
- **Cache**: Redis (Upstash/Railway)
195+
- **AI**: Claude API with structured output
196+
- **Real-time**: Supabase subscriptions
197+
198+
### Key Design Decisions
199+
1. **Hybrid Deployment**: Vercel (frontend) + Cloud Run (backend) for optimal performance
200+
2. **AI Integration**: Structured output with Pydantic/Zod for type safety
201+
3. **Real-time Updates**: Supabase subscriptions for live data
202+
4. **Immutable Patterns**: Spread operators for predictable state
203+
5. **Many Small Files**: High cohesion, low coupling
204+
205+
### Scalability Plan
206+
- **10K users**: Current architecture sufficient
207+
- **100K users**: Add Redis clustering, CDN for static assets
208+
- **1M users**: Microservices architecture, separate read/write databases
209+
- **10M users**: Event-driven architecture, distributed caching, multi-region
210+
211+
**Remember**: Good architecture enables rapid development, easy maintenance, and confident scaling. The best architecture is simple, clear, and follows established patterns.

0 commit comments

Comments
 (0)