Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
527 changes: 527 additions & 0 deletions .claude/skills/update-api-console-components/SKILL.md

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Cursor Ignore - Exclude from AI context for better performance

# Build outputs
dist/
coverage/
demo/vendor.js

# Dependencies
node_modules/

# Generated AMF models (except specific test models)
demo/models/*.json
demo/models/flattened/*.json
!demo/models/jldAsync26.json
!demo/models/avro.json
!demo/models/avro2.json
!demo/models/grpc-test.json
!demo/models/grpc-test-compact.json
!demo/models/product-order-deep-allof.json

# IDE configs (keep lightweight)
.vscode/*
!.vscode/settings.json
.idea/

# OS files
.DS_Store
Thumbs.db
*.stackdump

# Git internals
.git/

# Large log files
*.log
npm-debug.log*

# Test screenshots (visual regression baselines - too many files)
test/visual/screenshots/

# Package lock files (too large, let Cursor use package.json)
package-lock.json

# Temporary files
*.tmp
*.swp
*~
63 changes: 63 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Cursor Rules for api-console v6

## Repository Context
- This is api-console v6, built with LitElement and Web Components
- Open source project (CPAL-1.0 license)
- Part of MuleSoft's API Console ecosystem

## Git & Commit Rules
- NEVER commit directly to master/main (ALWAYS create feature branch first)
- ALWAYS configure GPG signing before committing (see docs/team/configs/git-gpg-setup.md)
- MuleSoft repos: Use @mulesoft.com email
- Commits must be GPG signed
- Use Conventional Commits format: `<type>(<scope>): <subject>`
- Valid types: feat, fix, docs, style, refactor, test, chore, perf, ci, build, revert

## Branch Naming Conventions
- Component fixes: `fix/W-XXXXXXXX-description`
- Features: `feat/W-XXXXXXXX-description` or `feat/description`
- Releases: `build/X.X.X` (api-console only)
- Chores: `chore/description`

## Code Style
- Use @web/test-runner for testing (NOT Jest - poor Shadow DOM support)
- Use AmfHelperMixin utilities for AMF queries (NOT direct JSON access)
- Custom events for component communication (NOT direct method calls)
- Shadow DOM with CSS custom properties for theming
- No `any` types in TypeScript
- Prefer Edit tool over Write for existing files

## Testing
- Write tests immediately after implementing feature (TDD approach)
- Run `npm test` before creating PR (must pass)
- Update visual regression baselines when UI changes intentionally: `npm run test:visual:update`

## Build & Verification
- DO NOT run build after every small change (saves tokens, avoids loops)
- Order: Implement β†’ Tests β†’ Build β†’ Fix compilation errors
- Only build when: user asks explicitly, before PR, or after major type changes

## AMF Model Architecture
- API Console does NOT parse API specs directly (requires AMF model)
- Models are JSON-LD format (AMF v4.0+)
- Generate models: `npm run build:models`
- Load via `amf` property or `modelLocation` (URL to JSON)

## Common Pitfalls
- Don't parse API files directly (use AMF models)
- Don't import CodeMirror/crypto as ES modules (use vendor.js)
- Don't expose Entities in API responses (use DTOs)
- Don't put business logic in Controllers (use Service layer)
- Don't modify AMF model structure (external standard)

## Quick Commands
- `npm run prepare` - Build vendor.js + generate AMF models (after clone)
- `npm start` - Dev server
- `npm test` - Run all tests
- `npm run build:vendor` - Rebuild non-ES6 dependencies

## Related Documentation
- CLAUDE.md - Full project context
- docs/team/patterns/ - Architectural decisions
- docs/team/runbooks/ - Operational procedures
- docs/team/onboarding/ - New team member guide
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,13 @@ demo/models/flattened/*.json

.idea/
.sfdx
.codegenie
.codegenie
# Claude/Cursor working files
# Note: Skills are committed (team workflows), other .claude/ content is not
.claude/analyses/
.claude/plans/
.claude/investigations/
.claude/context/
.claude/temp/
.claude/README.md
.cursor/
Loading