Initial conventions for AI agents and humans: AGENTS.md, SKILLS.md, instructions.md (#8478)

Not stable yet, but initial structure
https://agents.md
https://agentskills.io/specification
https://code.visualstudio.com/docs/copilot/customization/custom-instructions
https://code.visualstudio.com/docs/copilot/customization/agent-skills
This commit is contained in:
Alexandre Alapetite
2026-02-01 13:06:53 +01:00
committed by GitHub
parent dae27ebd5d
commit 5beebfcd45
19 changed files with 417 additions and 45 deletions

View File

@@ -0,0 +1,23 @@
---
applyTo: "**"
description: General instructions
---
# FreshRSS General instructions
## KISS principle: Keep It Simple
* Prioritise simplicity, brevity, and clarity in code and documentation.
* Avoid premature abstractions or over-engineering.
* Reuse and adapt existing code where possible, avoiding duplication.
* Keep changes minimal and focused.
* Favour vanilla solutions: avoid adding third-party dependencies and frameworks.
* Overall, reduce the number of lines and quantity of code (including dependencies).
## Style and formatting
* When editing files, obey indentation and white-space as defined in [`.editorconfig`](../../.editorconfig) (some of it can be automatically fixed with `make fix-all`).
## Spelling
* Favour British English spelling and conventions in code, comments, and documentation.

View File

@@ -0,0 +1,31 @@
---
applyTo: "**/*.css"
description: Editing CSS files
---
# CSS files
* Obey formatting rules defined in [`.stylelintrc.json`](../../.stylelintrc.json)
* Automatic fixes can be done with:
```sh
npm run stylelint_fix
# or (targeting more than just CSS)
make fix-all
```
* Validation can be done with:
```sh
npm run stylelint
# or (targeting more than just CSS)
make test-all
```
## Right-to-left CSS files
* Do not edit RTL CSS `*.rtl.css` files manually.
* RTL CSS files are auto-generated from LTR CSS files using the `rtlcss` tool.
* Run the following command to regenerate the RTL files:
```sh
npm run rtlcss
# or
make rtl
```

View File

@@ -0,0 +1,55 @@
---
applyTo: "app/i18n/*/*.php"
description: Editing FreshRSS translations
---
# FreshRSS translations (i18n)
* Favour commands over manual edits to add, move, or delete translation keys:
* Use the `cli/manipulate.translation.php` script or the corresponding `make` commands.
## Commands
### Add a new translation key
To add a new translatable string across all languages:
```sh
./cli/manipulate.translation.php --action add --key 'example.of.key' --value 'Example of text'
# or
make i18n-add-key key='example.of.key' value='Example of text'
```
This will:
1. Add the key to English (`app/i18n/en/gen.php`) with the provided value
2. Add the key to all other languages marked as `// TODO` for translators
You should then:
1. Remove the `// TODO` comment in English `en/`
2. Update to `// IGNORE` comment in US English `en-US/` or adapt the string in case of regional differences
### Delete a translation key
To delete a translation key from all languages:
```sh
./cli/manipulate.translation.php --action delete --key 'old.key.path'
```
### Other commands
See all available commands with:
```sh
./cli/manipulate.translation.php -a --help
```
## Post-fixing
After manipulating translation, you should call the following to reformat and ensure consistency:
```sh
composer run-script translations
# or (targeting more than just translations)
make fix-all
```

View File

@@ -0,0 +1,21 @@
---
applyTo: "**/*.js"
description: Editing JavaScript files
---
# JavaScript files
* Obey formatting rules defined in [`eslint.config.js`](../../eslint.config.js)
* Automatic fixes can be done with:
```sh
npm run eslint_fix
# or (targeting more than just JavaScript)
make fix-all
```
* Validation can be done with:
```sh
npm run eslint
# or (targeting more than just JavaScript)
make test-all
```
* Check [`package.json`](../../package.json) scripts for details about available individual commands.

View File

@@ -0,0 +1,19 @@
---
applyTo: "**/*.md"
description: Editing Markdown
---
# Markdown files
* Obey formatting rules defined in [`.markdownlint.json`](../../.markdownlint.json)
* For fenced code blocks:
* Use language identifiers as much as possible, e.g., `php`, `js`, `css`
* Favour `sh` over `bash`
* Automatic fixes can be done with:
```sh
npm run markdownlint_fix
```
* Validation can be done with:
```sh
npm run markdownlint
```

View File

@@ -0,0 +1,37 @@
---
applyTo: "**/*.php"
description: Editing PHP files
---
# PHP files
* See minimum PHP version and available PHP extensions in [`composer.json`](../../composer.json)
* Obey formatting rules defined in [`phpcs.xml`](../../phpcs.xml)
* Automatic fixes can be done with:
```sh
composer run-script fix
# or (targeting more than just PHP)
make fix-all
```
* Validation can be done with:
```sh
composer test
# or (targeting more than just PHP)
make test-all
```
* Check [`composer.json`](../../composer.json) scripts for details about available individual commands.
* For instance, running a single unit test can be done with:
```sh
composer run-script phpunit -- tests/app/Models/SearchTest.php
```
## Autoloader
* `spl_autoload_register` is defined in [`lib/lib_rss.php`](../../lib/lib_rss.php)
Minimal example:
```php
require dirname(__DIR__) . '/constants.php';
require LIB_PATH . '/lib_rss.php'; //Includes class autoloader
```