-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.cursor
97 lines (82 loc) · 3.73 KB
/
.cursor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Cursor AI Instructions
## Project Context
This is the main Tailpipe application that orchestrates data collection, transformation, and processing. It manages the plugin ecosystem, handles data flow between components, and provides the core infrastructure for data collection and processing pipelines. For more information about Tailpipe's capabilities and usage, see the [official documentation](https://tailpipe.io/docs).
## Related Repositories and Dependencies
- tailpipe-plugin-core: Core plugin functionality
- tailpipe-plugin-sdk: SDK for building plugins
- pipe-fittings: Data transformation components
- DuckDB: Used for SQL operations and data transformations
- Go standard library: Core functionality
- Other dependencies as specified in go.mod
## Test Table Configuration
When writing tests that require custom tables, follow these guidelines. For detailed information about custom tables, see the [custom tables documentation](https://github.com/turbot/tailpipe-plugin-sdk/blob/6ad65a6b68b3bcb4ae9e62e204939e6d2b8d430c/docs/custom_tables.md).
### Best Practices
- Keep test data minimal but representative
- Use descriptive names for test tables and columns
- Document any assumptions about data format
- Include both positive and negative test cases
- Clean up test data after tests complete
- Test both static and dynamic table scenarios
- Verify index performance with appropriate test data
- Include tests for connection handling
## Response Behavior
- NEVER make code changes without explicit user request
- ONLY write code or make changes when specifically asked
- For questions, provide explanations and guidance without making changes
- When asked about code, explain the current implementation without modifying it
- If code changes are needed, wait for explicit request before proceeding
- Always explain proposed changes before implementing them
- Get confirmation before making any code modifications
## Code Style Guidelines
- Follow Go best practices and idioms
- Use clear, descriptive variable and function names
- Include comments for complex logic
- Write comprehensive tests for new functionality
- Keep functions focused and single-purpose
## Testing Guidelines
- Write table-driven tests for multiple scenarios
- Test both success and error cases
- Use descriptive test case names
- Include edge cases in test coverage
- Test with realistic data formats and schemas
## Documentation Requirements
- Add comments for exported functions and types
- Include examples in documentation where appropriate
- Document any assumptions or limitations
- Keep documentation up to date with code changes
## Error Handling
- Return meaningful errors with context
- Use custom error types when appropriate
- Handle edge cases gracefully
- Log errors with sufficient detail for debugging
## Performance Considerations
- Optimize for large datasets
- Minimize memory allocations
- Consider streaming for large files
- Profile code for performance bottlenecks
## Security Guidelines
- Never expose sensitive data in logs or errors
- Validate all input data
- Use secure defaults
- Follow security best practices for data handling
## Response Format
- Provide clear, concise explanations
- Include code examples when relevant
- Format responses in markdown
- Use backticks for code references
- Break down complex solutions into steps
## File Organization
- Keep related code together
- Use appropriate package structure
- Follow Go project layout conventions
- Maintain clear separation of concerns
## Version Control
- Write clear commit messages
- Keep commits focused and atomic
- Update tests with code changes
- Document breaking changes
## Review Process
- Self-review code before submitting
- Ensure all tests pass
- Check for linting issues
- Verify documentation is complete