Skip to content
Merged
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
78 changes: 78 additions & 0 deletions .cursor/rules/cursor-rules-location.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
description: Cursor Rules Location and Creation
globs:
alwaysApply: false
---

# Cursor Rules Location

Rules for placing and organizing Cursor rule files in the repository.

<rule>
name: cursor_rules_location
description: Standards for placing Cursor rule files in the correct directory
filters:
# Match any .mdc files
- type: file_extension
pattern: "\\.mdc$"
# Match files that look like Cursor rules
- type: content
pattern: "(?s)<rule>.*?</rule>"
# Match file creation events
- type: event
pattern: "file_create"

actions:
- type: reject
conditions:
- pattern: "^(?!\\.\\/\\.cursor\\/rules\\/.*\\.mdc$)"
message: "Cursor rule files (.mdc) must be placed in the .cursor/rules directory"

- type: suggest
message: |
When creating Cursor rules:

1. Always place rule files in PROJECT_ROOT/.cursor/rules/:
```
.cursor/rules/
├── your-rule-name.mdc
├── another-rule.mdc
└── ...
```

2. Follow the naming convention:
- Use kebab-case for filenames
- Always use .mdc extension
- Make names descriptive of the rule's purpose

3. Directory structure:
```
PROJECT_ROOT/
├── .cursor/
│ └── rules/
│ ├── your-rule-name.mdc
│ └── ...
└── ...
```

4. Never place rule files:
- In the project root
- In subdirectories outside .cursor/rules
- In any other location

examples:
- input: |
# Bad: Rule file in wrong location
rules/my-rule.mdc
my-rule.mdc
.rules/my-rule.mdc

# Good: Rule file in correct location
.cursor/rules/my-rule.mdc
output: "Correctly placed Cursor rule file"

metadata:
priority: high
version: 1.0
</rule>

6 changes: 3 additions & 3 deletions .cursor/rules/faro-protocol.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ This Flutter SDK implements:

## Additional Resources

- [Grafana Faro Documentation](https:/grafana.com/docs/grafana-cloud/faro-web-sdk)
- [Grafana Alloy Documentation](https:/grafana.com/docs/alloy/latest)
- [Faro Receiver Component](https:/grafana.com/docs/alloy/latest/reference/components/faro/faro.receiver)
- [Grafana Faro Documentation](mdc:https:/grafana.com/docs/grafana-cloud/faro-web-sdk)
- [Grafana Alloy Documentation](mdc:https:/grafana.com/docs/alloy/latest)
- [Faro Receiver Component](mdc:https:/grafana.com/docs/alloy/latest/reference/components/faro/faro.receiver)
78 changes: 78 additions & 0 deletions .cursor/rules/plan-it-mode.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
description: A structured approach to task planning and execution for PlanIt tasks
globs:
alwaysApply: false
---

# This rule is automatically applied when a prompt begins with "PlanIt:"
# and implements a structured approach to task planning and execution.

prompt: |
IMPORTANT: When a user message starts with "PlanIt:", ALWAYS follow this exact sequence:

0. STOP AND PLAN FIRST
- When you see "PlanIt:", this is a signal to STOP and PLAN before taking any action
- Do NOT start implementing anything until you have completed steps 1-3
- CRITICAL: Do NOT write ANY code until the user has explicitly approved the plan

1. Initial Prompt Refinement:
- Review and analyze the initial prompt for clarity and completeness
- Suggest improvements if needed
- Seek confirmation before proceeding with any suggested revisions

2. Thoughtful Analysis Phase:
Before taking any action:
- Analyze task requirements thoroughly
- Review relevant parts of the codebase
- Document understanding and assumptions
- Confirm understanding with user before proceeding

3. Structured Planning and Progress Tracking:
- Create a detailed action plan in `.cursor_tasks.md` using this format:
([Timestamp] should have date and time in hh:mm:ss)
```markdown
# Task: [Task Name]
Created: [Timestamp]

<Place a very detailed description of the task here. Not just a short summary.>

## Action Plan
- [ ] Step 1
- [ ] Step 2
- [ ] Substep 2.1
- [ ] Substep 2.2
- [ ] Step 3

## Progress Notes
- [Timestamp] Started implementation of...
- [Timestamp] Completed step 1...
```

- After creating the plan, STOP and ask the user: "Does this plan look good to you? Should I proceed with implementation?"
- Only proceed with implementation after explicit user approval
- Update the plan continuously as tasks progress
- Document any new steps identified during execution

4. Continuous Learning and Adaptation:
- CRITICAL! If you make a misstake or get feedback, create or update cursor rules with your corrections!
- Document learnings and improvements

Best Practices:
1. Maintain clear and specific communication
2. Provide context for all decisions
3. Use iterative refinement when needed
4. Document all significant decisions and changes
5. Keep the user informed of progress
6. Seek clarification when requirements are ambiguous
7. ALWAYS get user approval before starting implementation

Task Execution Flow:
1. Initial prompt analysis and refinement
2. Create/update `.cursor_tasks.md`
3. GET USER APPROVAL OF PLAN
4. Execute planned steps
5. Document progress and learnings
6. Update plan as needed
7. Seek user feedback at key points


5 changes: 3 additions & 2 deletions .cursor/rules/project-overview.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This is a Flutter SDK that implements the Grafana Faro protocol for mobile obser

### Main Packages

- **rum_sdk**: The core SDK that implements the Grafana Faro protocol and handles collecting and sending data
- **faro**: The core SDK that implements the Grafana Faro protocol and handles collecting and sending data

### Features

Expand Down Expand Up @@ -49,5 +49,6 @@ The SDK is designed to be integrated into Flutter applications with minimal conf

## Project Structure

- `packages/rum_sdk`: Core SDK implementation
- `packages/faro`: Core SDK implementation
- `docs/`: Documentation for usage and configuration

22 changes: 11 additions & 11 deletions .github/workflows/flutter_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ concurrency:
cancel-in-progress: true

jobs:
build-and-test-rum-sdk:
build-and-test-faro:
runs-on: ubuntu-latest
timeout-minutes: 20
name: build & test rum_sdk
name: build & test faro
defaults:
run:
working-directory: packages/rum_sdk
working-directory: packages/faro
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
Expand Down Expand Up @@ -47,10 +47,10 @@ jobs:
build-example-app:
name: build Example app
runs-on: ubuntu-latest
needs: build-and-test-rum-sdk
needs: build-and-test-faro
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
Expand All @@ -63,17 +63,17 @@ jobs:
channel: stable

- name: Install dependencies
working-directory: packages/rum_sdk/example
working-directory: packages/faro/example
run: flutter pub get

- name: Create api-config file (only for rum_sdk)
working-directory: packages/rum_sdk
- name: Create api-config file (only for faro)
working-directory: packages/faro
run: scripts/create-api-config-file.sh

- name: Analyze code
working-directory: packages/rum_sdk/example
working-directory: packages/faro/example
run: flutter analyze

- name: Build example app
working-directory: packages/rum_sdk/example
working-directory: packages/faro/example
run: flutter build apk # Replace 'apk' with 'ios', 'web', etc., as needed
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ migrate_working_dir/
.dart_tool/
.packages
build/
**/example/assets/
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "dart",
"request": "launch",
"flutterMode": "debug",
"cwd": "${workspaceFolder}/packages/rum_sdk/example/",
"cwd": "${workspaceFolder}/packages/faro/example/",
"args": [
"-t",
"lib/main.dart",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# rum_sdk
# faro

* Flutter SDK for Real User Monitoring
- Flutter SDK for Real User Monitoring

## Getting Started

Expand Down
1 change: 0 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ linter:
- non_constant_identifier_names
- null_closures
- only_throw_errors
- package_api_docs
- package_prefixed_library_names
- parameter_assignments
- prefer_adjacent_string_concatenation
Expand Down
Loading