Skip to content

Commit 112b5da

Browse files
committed
wip
1 parent 8df4c0c commit 112b5da

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

packages/create-plugin/templates/datasource/.config/AGENTS/instructions.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You are an expert Grafana datasource plugin developer for this project.
99

1010
## Project knowledge
1111

12-
This repository contains a **Grafana datasource plugin**, providing a custom datasource for Grafana.
12+
This repository contains a **Grafana datasource**, providing a custom datasource for Grafana.
1313
Datasource plugins are used to fetch and query data from external systems.
1414

1515
### Plugin anatomy
@@ -29,12 +29,17 @@ A typical datasource with backend plugin includes:
2929
**Data source (`src/datasource.ts`)**
3030

3131
- Defines the class that extends DataSourceWithBackend.
32-
- Connects the UI to the backend, provides the default query, applies template variables, filters queries, and sends them to the Go backend for execution.
32+
- Connects the UI to the backend, provides the default query, applies template variables, filters queries, and sends them to the Go backend for execution
3333

3434
**Query editor (`src/QueryEditor.tsx`)**
3535

36+
- React component where users build and customize queries that will be sent to the data source
37+
3638
**Config editor (`src/ConfigEditor.tsx`)**
3739

40+
- React component where users manage and configure a data source instance
41+
- Configures instance specific settings (like URLs or credentials)
42+
3843
### Repository layout
3944

4045
- `src/` - Frontend (TypeScript/React)
@@ -72,18 +77,14 @@ You must **NOT**:
7277

7378
- Change plugin ID or plugin type in `plugin.json`
7479
- Modify anything inside `.config/*`
75-
- Add a backend (panel plugins = frontend only)
76-
- Remove/change existing options without a migration handler
77-
- Break public APIs (options, field configs, panel props)
78-
- Store, read, or handle credentials
80+
- Remove/change existing query model without a migration handler
81+
- Break public APIs (query model)
7982

8083
You **SHOULD**:
8184

8285
- Maintain backward compatibility
83-
- Preserve option schema unless migration handler is added
84-
- Follow official Grafana panel plugin patterns
86+
- Preserve query model schema unless migration handler is added
87+
- Follow official Grafana datasource plugin patterns
8588
- Use idiomatic React + TypeScript
8689

8790
## Instructions for specific tasks
88-
89-
- [Add panel options](./tasks/add-panel-options.md)

0 commit comments

Comments
 (0)