chore(ci): copilot-instructions: specify content paths, related repositories, and additional guidelines

pull/5922/head
Jason Stirnaman 2025-03-21 11:21:36 -05:00
parent a0dfc1c9be
commit 3d3de0fab0
1 changed files with 118 additions and 62 deletions

View File

@ -1,90 +1,146 @@
# GitHub Copilot Instructions for InfluxData Documentation
GitHub Copilot should assist with writing and styling InfluxData documentation according to the following guidelines:
## Purpose and Scope
## Documentation Overview
GitHub Copilot should help document InfluxData products by creating clear, accurate technical content with proper code examples, frontmatter, and formatting.
- Documentation covers InfluxDB and associated products (Telegraf, client libraries)
- Primary documentation site: https://docs.influxdata.com
- Source repository: https://github.com/influxdata/docs-v2
- Hugo static site generator is used to build the documentation
## Documentation Structure
## Products and Query Languages
- **Products**:
- InfluxDB OSS 1.x
- Documentation source path: `/content/influxdb/v1`
- Code repository: https://github.com/influxdata/influxdb
- InfluxDB OSS 2.x
- Documentation source path: `/content/influxdb/v2`
- Code repository: https://github.com/influxdata/influxdb
- InfluxDB 3 Core
- Documentation source path: `/content/influxdb3/core`
- Code repositories: https://github.com/influxdata/influxdb, https://github.com/influxdata/influxdb3_core
- InfluxDB Enterprise v1 (1.x)
- Documentation source path: `/content/influxdb/enterprise_influxdb`
- Code repository: https://github.com/influxdata/influxdb
- InfluxDB Cloud v2 (TSM)
- Documentation source path: `/content/influxdb/cloud`
- Code repository: https://github.com/influxdata/idpe
- InfluxDB 3 Cloud Dedicated
- Documentation source path: `/content/influxdb3/cloud-dedicated`
- Code repository: https://github.com/influxdata/influxdb
- InfluxDB 3 Cloud Serverless
- Documentation source path: `/content/influxdb3/cloud-serverless`
- Code repository: https://github.com/influxdata/idpe
- InfluxDB 3 Clustered
- Documentation source path: `/content/influxdb3/clustered`
- Code repository: https://github.com/influxdata/influxdb
- Telegraf
- Documentation source path: `/content/telegraf/v1`
- Code repository: https://github.com/influxdata/telegraf
- Kapacitor
- Documentation source path: `/content/kapacitor/v1`
- Code repository: https://github.com/influxdata/kapacitor
- Chronograf
- Documentation source path: `/content/chronograf/v1`
- Code repository: https://github.com/influxdata/chronograf
- Flux
- Documentation source path: `/content/flux/v0`
- Code repository: https://github.com/influxdata/flux
- **InfluxData-supported tools**:
- InfluxDB API client libraries
- Code repositories: https://github.com/InfluxCommunity
- InfluxDB 3 processing engine plugins
- Code repository: https://github.com/influxdata/influxdb3_plugins
- **Query Languages**: SQL, InfluxQL, Flux (use appropriate language per product version)
- **Documentation Site**: https://docs.influxdata.com
- **Repository**: https://github.com/influxdata/docs-v2
- **Framework**: Hugo static site generator
When working with product-specific content, identify the appropriate product from:
- InfluxDB OSS (1.x, 2.x, 3 Core)
- InfluxDB Enterprise
- InfluxDB Cloud variants (TSM, Dedicated, Serverless)
- InfluxDB 3 Clustered
- Telegraf
Identify appropriate query language (SQL, InfluxQL, Flux) based on product version.
## Style Standards
## Style Guidelines
- Follow Google Developer Documentation style guidelines
- For REST API references, follow YouTube Data API style
- Use semantic line feeds (one sentence per line) for easier diff comparison
- For API references, follow YouTube Data API style
- Use semantic line feeds (one sentence per line)
- Use only h2-h6 headings in content (h1 comes from frontmatter)
- Image naming format: `project/version-context-description.png`
- Use sentence case for headings
- Use GitHub callout syntax
- Image naming: `project/version-context-description.png`
- Use appropriate product names and versions consistently
- Follow InfluxData vocabulary guidelines
## Markdown Conventions
## Markdown and Shortcodes
- Use standard Markdown for most content
- Include proper frontmatter for each page (title, description, weight, etc.)
- Use available shortcodes for notes, warnings, tabbed content, and other special formatting
- Observe semantic line feeds (one sentence per line)
- Use proper heading hierarchy (h2-h6 only)
- Include proper frontmatter for each page:
## Shortcodes
```yaml
title: # Page title (h1)
seotitle: # SEO title
list_title: # Title for article lists
description: # SEO description
menu:
product_version:
weight: # Page order (1-99, 101-199, etc.)
```
Help use the following shortcodes appropriately:
- Use provided shortcodes correctly:
- Notes/warnings: `{{% note %}}`, `{{% warn %}}`
- Product-specific: `{{% enterprise %}}`, `{{% cloud %}}`
- Tabbed content: `{{< tabs-wrapper >}}`, `{{% tabs %}}`, `{{% tab-content %}}`
- Version links: `{{< latest >}}`, `{{< latest-patch >}}`
- API endpoints: `{{< api-endpoint >}}`
- Required elements: `{{< req >}}`
- Navigation: `{{< page-nav >}}`
- Diagrams: `{{< diagram >}}`, `{{< filesystem-diagram >}}`
- Notes and warnings: `{{% note %}}` and `{{% warn %}}`
- Product-specific content: `{{% enterprise %}}`, `{{% cloud %}}`
- Tabbed content: `{{< tabs-wrapper >}}`, `{{% tabs %}}`, `{{% tab-content %}}`
- Latest version links: `{{< latest >}}`, `{{< latest-patch >}}`
- API endpoints: `{{< api-endpoint >}}`
- Required elements: `{{< req >}}`
- Navigation: `{{< page-nav >}}`
- Diagrams: `{{< diagram >}}`, `{{< filesystem-diagram >}}`
## Code Examples and Testing
## Page Frontmatter
Assist with creating appropriate frontmatter that includes:
```yaml
title: # Title of the page (h1)
seotitle: # Page title for SEO
list_title: # Title for article lists
description: # Page description for SEO
menu:
product_version:
weight: # Page sort order (follow level structure: 1-99, 101-199, etc.)
```
## Testing Code Blocks
When writing code examples, add appropriate testing annotations:
- Provide complete, working examples with proper testing annotations:
```python
print("Hello, world!")
```
<!--pytest-codeblocks:expected-output-->
```
Hello, world!
```
## InfluxDB-specific Conventions
- CLI command example:
- Use appropriate product names and versions consistently
- Link to canonical documentation where appropriate
- Follow InfluxData vocabulary and terminology guidelines
```sh
influx query 'from(bucket:"example") |> range(start:-1h)'
```
## Pre-commit hooks
<!--pytest-codeblocks:expected-output-->
- Assist with Vale.sh linter configurations
- Assist with Dockerfile and Docker Compose files
- Assist with using pytest and pytest-codeblocks
```
Table: keys: [_start, _stop, _field, _measurement]
_start:time _stop:time _field:string _measurement:string _time:time _value:float
------------------------------ ------------------------------ ---------------------- ---------------------- ------------------------------ ----------------------------
```
- Include necessary environment variables
- Show proper credential handling for authenticated commands
## API Documentation
- Follow OpenAPI specification patterns
- Match REST API examples to current implementation
- Include complete request/response examples
- Document required headers and authentication
## Versioning and Product Differentiation
- Clearly distinguish between different InfluxDB versions (1.x, 2.x, 3.x)
- Use correct terminology for each product variant
- Apply appropriate UI descriptions and screenshots
- Reference appropriate query language per version
## Development Tools
- Vale.sh linter for style checking
- Docker for local development and testing
- pytest and pytest-codeblocks for validating code examples
- Pre-commit hooks for quality assurance
## Related repositories
- **Internal dcumentation assistance requests**: https://github.com/influxdata/DAR/issues