Cursor rule
.cursor/rules/proto.mdcProtocol Buffer File Rules
Cursor rules
Quality
96/100
Scores the file, not the repository.Length
602 words
27 headings · 5 code blocksRepository
126
— · pushed 102 days agoLast changed
3 days ago
First indexed 3 days ago.12345678# Protocol Buffer File Rules910> **⚠️ XRP Protocol Buffers DEPRECATED**11>12> **Status**: `proto/rippleapi/` is **DEPRECATED** and no longer used.13>14> **Reason**: XRP functionality migrated to native Go implementation. gRPC server (`apps/xrpl-grpc-server/`) has been replaced with native xrpl-go libraries.1516## Overview1718Rules for modifying Protocol Buffer files (`*.proto`) in go-crypto-wallet.1920## Applicable Directories2122| Directory | Description | Status |23|-----------|-------------|--------|24| `proto/rippleapi/` | Ripple API definitions | ❌ DEPRECATED |2526## Verification Commands2728| Command | Purpose | Required |29|---------|---------|----------|30| `make proto-lint` | Lint proto files (buf only, requires PROTO_TOOL=buf) | When buf supports Edition 2024 |31| `make proto-breaking` | Check for breaking changes | Recommended |3233## Prohibited Actions3435**NEVER use `protoc` command directly.** Always use Make targets for code generation.3637```bash38# ❌ PROHIBITED - Never run protoc directly39protoc --go_out=... proto/*.proto4041# ✅ CORRECT - Always use Make targets42make proto # Go only43make proto-ts # TypeScript only44make proto-all # Both45```4647## Code Generation [DEPRECATED for XRP]4849> **⚠️ Note**: Proto generation commands no longer needed for XRP.5051| Command | Purpose | XRP Status |52|---------|---------|------------|53| `make proto` | Generate Go code from proto files | ⚠️ No longer generates XRP |54| `make proto-ts` | Generate TypeScript code from proto files | ❌ XRP TypeScript deprecated |55| `make proto-all` | Generate all proto files (Go + TypeScript) | ⚠️ XRP not included |56| `make proto-fmt` | Format proto files | ⚠️ XRP protos deprecated |57| `make clean-pb` | Clean all generated protobuf files | ⚠️ XRP files no longer generated |5859### Generation Workflow6061```bash62# 1. Edit proto files63# proto/rippleapi/*.proto6465# 2. Format66make proto-fmt6768# 3. Check breaking changes (optional)69make proto-breaking7071# 4. Generate code72make proto # Go only73make proto-ts # TypeScript only74make proto-all # Both Go and TypeScript7576# 5. Verify build77make check-build78```7980## Buf Configuration8182This project uses [Buf](https://buf.build/) for proto management.8384### Configuration Files8586| File | Description |87|------|-------------|88| `buf.yaml` | Module configuration and lint rules |89| `buf.gen.yaml` | Code generation configuration |9091### Lint Rules9293Using BASIC ruleset with exceptions for backward compatibility:9495```yaml96lint:97 use:98 - BASIC99 except:100 - ENUM_VALUE_PREFIX101 - ENUM_ZERO_VALUE_SUFFIX102 - FIELD_LOWER_SNAKE_CASE103 - PACKAGE_DIRECTORY_MATCH104 - PACKAGE_SAME_DIRECTORY105 - DIRECTORY_SAME_PACKAGE106```107108## Proto File Structure109110```protobuf111syntax = "proto3";112113package rippleapi;114115option go_package = "github.com/hiromaily/go-crypto-wallet/internal/infrastructure/api/xrp/xrp";116117// Service definitions118service AccountService {119 rpc GetAccountInfo(GetAccountInfoRequest) returns (GetAccountInfoResponse);120}121122// Message definitions123message GetAccountInfoRequest {124 string address = 1;125}126```127128## Auto-Generated Files129130**DO NOT EDIT** generated files:131132- `internal/infrastructure/api/xrp/xrp/*.pb.go`133134These are regenerated by `make proto`.135136## Best Practices137138### Naming139140- Use lowercase snake_case for field names141- Use PascalCase for message and service names142- Use UPPER_SNAKE_CASE for enum values143144### Versioning145146- Maintain backward compatibility147- Use `make breaking-proto` to detect breaking changes148- Consider field deprecation before removal149150### Field Numbers151152- Never reuse field numbers153- Reserve removed field numbers154155```protobuf156message Example {157 reserved 1, 2; // Previously used field numbers158 reserved "old_field"; // Previously used field names159}160```161162## Quick Checklist163164- [ ] `make proto-fmt` passes165- [ ] `make proto-breaking` passes (no unintended breaking changes)166- [ ] Field numbers are not reused167- [ ] Backward compatibility maintained168- [ ] Code regenerated after changes (`make proto` or `make proto-all`)169- [ ] `make check-build` passes after generation170171## Related Documentation172173- @buf.yaml - Buf configuration174- @buf.gen.yaml - Code generation configuration175- @proto/rippleapi/ - Proto source files176177## Related Skills178179- `go-development` - Go verification after generation180
Also in hiromaily/go-crypto-wallet
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/agent-files.mdc · 126 | Cursor rules | lint-formatarchdo-notagent-behaviour | 77/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/documentation-language.mdc · 126 | Cursor rules | archdo-notdocs | 36/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/general.mdc · 126 | Cursor rules | buildtestarchgit+2 | 83/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/github-actions.mdc · 126 | Cursor rules | stylearchgitperformance+4 | 77/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/security.mdc · 126 | Cursor rules | archsecuritydo-notagent-behaviour | 76/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/shell-script.mdc · 126 | Cursor rules | setupteststylearch+1 | 73/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/ssot.mdc · 126 | Cursor rules | stylearchtypesdo-not+2 | 84/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/task-context-loading.mdc · 126 | Cursor rules | archtypesdatabasedo-not+1 | 93/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/yaml.mdc · 126 | Cursor rules | lint-formatstylearchtypes+3 | 84/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.github/copilot-instructions.md · 126 | Copilot instructions | teststylearchsecurity+1 | 56/100 | 3 days ago | |
| hiromaily/go-crypto-walletAGENTS.md · 126 | AGENTS.md | archtypesdo-notagent-behaviour+1 | 79/100 | 3 days ago | |
| hiromaily/go-crypto-walletCLAUDE.md · 126 | CLAUDE.md | archtypesdo-notagent-behaviour+1 | 79/100 | 3 days ago | |
| hiromaily/go-crypto-walletpkg/AGENTS.md · 126 | AGENTS.md | stylearchdo-not | 80/100 | 3 days ago |
Diff against .cursor/rules/agent-files.mdc Diff against .cursor/rules/documentation-language.mdc Diff against .cursor/rules/general.mdc Diff against .cursor/rules/github-actions.mdc Diff against .cursor/rules/security.mdc Diff against .cursor/rules/shell-script.mdc Diff against .cursor/rules/ssot.mdc Diff against .cursor/rules/task-context-loading.mdc Diff against .cursor/rules/typescript.mdc Diff against .cursor/rules/yaml.mdc Diff against .github/copilot-instructions.md Diff against AGENTS.md Diff against CLAUDE.md Diff against pkg/AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
