docs(agents): clarify agent guide and share it across AI assistants (#1035)

* ci: disable header-max-length commit rule

Signed-off-by: Andy Lee <andy.lee@suse.com>

* docs(agents): clarify agent guide and share it across AI assistants

- Symlink CLAUDE.md and GEMINI.md to AGENTS.md so Claude Code, Copilot
  and Gemini read the same guidance
- Use the full conventional-commit format with scope in the guide
- Clarify Vue SFC block order and the feature-flag development steps
- Bump the documented Node.js requirement to v24

Signed-off-by: Andy Lee <andy.lee@suse.com>

---------

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee 2026-07-20 15:51:12 +08:00 committed by GitHub
parent 1c3b40b631
commit 3d39626b93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 41 additions and 38 deletions

View File

@ -28,9 +28,7 @@ You are an expert Senior Software Engineer specializing in Vue.js and TypeScript
- Run `yarn lint:fix` before commits. - Run `yarn lint:fix` before commits.
- Use conventional commit format: - Use conventional commit format:
``` ```
<type>: <type>(<scope>): <description>
<description>
``` ```
- Follow existing naming conventions (PascalCase for components, camelCase for functions). - Follow existing naming conventions (PascalCase for components, camelCase for functions).
- After changing a Vue, JS, or TS file, make sure it's automatically formatted with ESLint. - After changing a Vue, JS, or TS file, make sure it's automatically formatted with ESLint.
@ -130,8 +128,8 @@ To get started, follow the `Development Setup` section.
- `Vue.js`: - `Vue.js`:
- Composition API components are preferred over Options API. - Composition API components are preferred over Options API.
- Large pages with lots of code and styles should be avoided by breaking the page up into smaller Vue components. - Large pages with lots of code and styles should be avoided by breaking the page up into smaller Vue components.
- Place source tag above template above style. - Order the Single File Component blocks as `<script>`, then `<template>`, then `<style>`.
- style tag should contain `lang='scss' scoped`. - The `<style>` tag should include `lang="scss" scoped`.
- `Linting`: Follow the ESLint configuration in the root. - `Linting`: Follow the ESLint configuration in the root.
- **File Structure:** - **File Structure:**
@ -163,24 +161,26 @@ To get started, follow the `Development Setup` section.
## Harvester UI Extension Development Guide ## Harvester UI Extension Development Guide
1. Backward Compatibility ### Backward Compatibility
The Harvester UI Extension supports earlier cluster versions (e.g., UI Ext v1.8.0 works with clusters v1.7.0 and v1.6.0). It uses Feature Flags defined in pkg/config/feature-flags to ensure the UI matches the cluster's specific version.
The Harvester UI Extension supports earlier cluster versions (e.g., UI Ext v1.8.0 works with clusters v1.7.0 and v1.6.0). It uses Feature Flags defined in `pkg/harvester/config/` to ensure the UI matches the cluster's specific version.
### Implementation Steps for New Features
2. Implementation Steps for New Features
To add a feature in a new release, follow these steps: To add a feature in a new release, follow these steps:
Register: Add a unique [Feature Name] to the corresponding release array in the configuration. 1. **Register**: Add a unique `[Feature Name]` to the corresponding release array in the configuration.
2. **Check**: Use the following getter to verify if the feature is enabled for the current version:
Check: Use the following getter to verify if the feature is enabled for the current version: ```js
```
computed: { computed: {
newFeatureEnabled() { newFeatureEnabled() {
return this.$store.getters['harvester-common/getFeatureEnabled']('[Feature Name]'); return this.$store.getters['harvester-common/getFeatureEnabled']('[Feature Name]');
}, },
}, },
``` ```
Render: Use the result of the check to conditionally render the UI components.
3. **Render**: Use the result of the check to conditionally render the UI components.
## E2E Tests (Cypress) ## E2E Tests (Cypress)

1
CLAUDE.md Symbolic link
View File

@ -0,0 +1 @@
./AGENTS.md

1
GEMINI.md Symbolic link
View File

@ -0,0 +1 @@
./AGENTS.md

View File

@ -25,7 +25,7 @@ For Harvester UI extension installation instructions, please refer to the page *
## Development Setup ## Development Setup
Ensure **Node.js v20 or later** is installed for development and debugging. Ensure **Node.js v24 or later** is installed for development and debugging.
### Standalone Mode ### Standalone Mode

View File

@ -32,6 +32,7 @@ module.exports = {
'subject-empty': [2, 'never'], 'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'], 'subject-full-stop': [2, 'never', '.'],
'subject-max-length': [0, 'never'], 'subject-max-length': [0, 'never'],
'header-max-length': [0, 'always', 100],
'body-leading-blank': [2, 'always'], 'body-leading-blank': [2, 'always'],
'body-max-line-length': [0, 'always', 100], 'body-max-line-length': [0, 'always', 100],
'footer-leading-blank': [2, 'always'], 'footer-leading-blank': [2, 'always'],

View File

@ -6,9 +6,7 @@
- Run `yarn lint:fix` before commits. - Run `yarn lint:fix` before commits.
- Use conventional commit format: - Use conventional commit format:
``` ```
<type>: <type>(<scope>): <description>
<description>
``` ```
- Follow existing naming conventions (PascalCase for components, camelCase for functions). - Follow existing naming conventions (PascalCase for components, camelCase for functions).
- After changing a Vue, JS, or TS file, make sure it's automatically formatted with ESLint. - After changing a Vue, JS, or TS file, make sure it's automatically formatted with ESLint.

View File

@ -16,8 +16,8 @@ To get started, follow the `Development Setup` section.
- `Vue.js`: - `Vue.js`:
- Composition API components are preferred over Options API. - Composition API components are preferred over Options API.
- Large pages with lots of code and styles should be avoided by breaking the page up into smaller Vue components. - Large pages with lots of code and styles should be avoided by breaking the page up into smaller Vue components.
- Place source tag above template above style. - Order the Single File Component blocks as `<script>`, then `<template>`, then `<style>`.
- style tag should contain `lang='scss' scoped`. - The `<style>` tag should include `lang="scss" scoped`.
- `Linting`: Follow the ESLint configuration in the root. - `Linting`: Follow the ESLint configuration in the root.
- **File Structure:** - **File Structure:**
@ -49,22 +49,24 @@ To get started, follow the `Development Setup` section.
## Harvester UI Extension Development Guide ## Harvester UI Extension Development Guide
1. Backward Compatibility ### Backward Compatibility
The Harvester UI Extension supports earlier cluster versions (e.g., UI Ext v1.8.0 works with clusters v1.7.0 and v1.6.0). It uses Feature Flags defined in pkg/config/feature-flags to ensure the UI matches the cluster's specific version.
The Harvester UI Extension supports earlier cluster versions (e.g., UI Ext v1.8.0 works with clusters v1.7.0 and v1.6.0). It uses Feature Flags defined in `pkg/harvester/config/` to ensure the UI matches the cluster's specific version.
### Implementation Steps for New Features
2. Implementation Steps for New Features
To add a feature in a new release, follow these steps: To add a feature in a new release, follow these steps:
Register: Add a unique [Feature Name] to the corresponding release array in the configuration. 1. **Register**: Add a unique `[Feature Name]` to the corresponding release array in the configuration.
2. **Check**: Use the following getter to verify if the feature is enabled for the current version:
Check: Use the following getter to verify if the feature is enabled for the current version: ```js
```
computed: { computed: {
newFeatureEnabled() { newFeatureEnabled() {
return this.$store.getters['harvester-common/getFeatureEnabled']('[Feature Name]'); return this.$store.getters['harvester-common/getFeatureEnabled']('[Feature Name]');
}, },
}, },
``` ```
Render: Use the result of the check to conditionally render the UI components.
3. **Render**: Use the result of the check to conditionally render the UI components.

View File

@ -1,4 +1,4 @@
> This `./AGENTS.md` file is generated by running `yarn agents:generate`. > This `./AGENTS.md` file is generated by running `yarn agents:generate`. `CLAUDE.md` and `GEMINI.md` are symlinks to this file so Claude Code, GitHub Copilot and Gemini all read the same content.
# Project Overview # Project Overview