You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agent/rules/01_objective.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,3 +12,12 @@ $$DYNAMIC\_CONTEXT$$
12
12
3.**Docs:** Keep `README.md` and translations updated with new features and requirements.
13
13
4.**Automation:** All tests runnable via `make test-*` or specific test scripts.
14
14
5.**Goal:** Provide the most accurate and up-to-date performance tuning recommendations for MySQL-compatible databases.
15
+
16
+
**Roadmap / Evolution Paths:**
17
+
18
+
1.**Schema Validation for Rules**: Créer un script de linting pour valider que les fichiers `.agent/rules/*.md` respectent un format standard.
19
+
2.**Source Code Annotation**: Automatiser l'ajout des tags de version directement dans les commentaires des fonctions modifiées.
20
+
3.**Automated Doc-Link Check**: Ajouter un test qui vérifie que les liens de documentation insérés dans les commentaires du code (`# See: http://...`) sont toujours valides.
21
+
4.**Pre-commit Hook**: Implementer un hook Git local qui lance le pre-flight check de `/git-flow`.
22
+
5.**Automated Roadmap Tracking**: Créer un script qui extrait les points de la roadmap pour générer un rapport de progression.
23
+
6.**Perl Tidy Integration**: Ajouter une règle exigeant l'utilisation de `perltidy` avec une configuration spécifique pour garantir la lisibilité du fichier unique.
Copy file name to clipboardExpand all lines: .agent/rules/03_execution_rules.md
+20-9Lines changed: 20 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,17 @@ trigger: always_on
19
19
-**DRY (Don't Repeat Yourself)**: Avoid code duplication; extract common logic into reusable functions within the single file.
20
20
-**KISS (Keep It Simple, Stupid)**: Strive for simplicity. Avoid over-engineering.
21
21
-**Clean Code**: Write readable, self-documenting code with meaningful names and small functions.
22
-
-**Error Handling**: Implement robust error handling and logging. Use low-cardinality logging with stable message strings (e.g., `logger.info{id, foo}, 'Msg'`).
22
+
-**Perl Tidy**: Use `perltidy` with the project's specific configuration to ensure consistent formatting across the single-file architecture.
23
+
-**Error Handling**: Implement robust error handling and logging. Use low-cardinality logging with stable message strings.
24
+
25
+
#### **Core Best Practices:**
26
+
27
+
1.**Validation Multi-Version Systématique**: Tout changement dans la logique de diagnostic doit être testé contre au moins une version "Legacy" (ex: MySQL 5.7) et une version "Moderne" (ex: MariaDB 11.4) via la suite de tests Docker (`make test-it`).
28
+
2.**Résilience des Appels Système**: Chaque commande externe (`sysctl`, `ps`, `free`, `mysql`) doit impérativement être protégée par une vérification de l'existence du binaire et une gestion d'erreur (exit code non nul) pour éviter les sorties "polluées" dans le rapport final.
29
+
3.**Politique "Zéro-Dépendance" CPAN**: Interdire l'usage de modules Perl qui ne font pas partie du "Core" (distribution standard Perl) afin que `mysqltuner.pl` reste un script unique, copiable et exécutable instantanément sur n'importe quel serveur sans installation préalable.
30
+
4.**Traçabilité des Conseils (Audit Trail)**: Chaque recommandation ou conseil affiché par le script doit être documenté dans le code par un commentaire pointant vers la source officielle (Documentation MySQL/MariaDB ou KB) pour justifier le seuil choisi.
31
+
5.**Efficience Mémoire (Parsing de Log)**: Pour le traitement des fichiers de logs (souvent volumineux), privilégier systématiquement le traitement ligne par ligne plutôt que le chargement complet en mémoire, surtout lors de la récupération via `--container`.
32
+
6.**Standardisation @Changelog**: Maintenir le `@Changelog` en suivant strictement le format des _Conventional Commits_ (feat, fix, chore, docs) pour permettre une extraction automatisée et propre des notes de version lors des tags Git.
23
33
24
34
### **4.3. Output & Restitution Format**
25
35
@@ -31,11 +41,12 @@ trigger: always_on
31
41
### **4.4. Development Workflow**
32
42
33
43
1.**Validation by Proof:** All changes must be verifiable via `make test-*` or dedicated test scripts.
34
-
2.**Git Protocol:**.
35
-
/!\ NOT COMMIT, NO TAG CODE UNLESS USING /git-flow or explicit order
36
-
Use **Conventional Commits** (feat:, fix:, chore:, docs:).
37
-
WARNING: Don't increment version in changelog or script if code is not tagged and pushed
38
-
If last tag is not remotely present, don't increment version unless explicitly asked
39
-
Commit and tag should be done together
40
-
41
-
3.**Changelog:** All changes MUST be traced and documented inside `@Changelog`.
44
+
2.**Git Protocol:**
45
+
46
+
-**STRICT PROHIBITION:** No `git commit`, `git push`, or `git tag` without using `/git-flow` or an explicit user order.
47
+
-**Conventional Commits:** Use `feat:`, `fix:`, `chore:`, `docs:`.
48
+
-**Versioning & Tagging:** Reserved ONLY for the `/git-flow` workflow.
49
+
-**Atomic Operations:** Commit and tag must be synchronized via the workflow.
50
+
-**Remote Sync:** If the last tag is not present on remote, do not increment version without explicit confirmation.
51
+
52
+
1.**Changelog:** All changes MUST be traced and documented inside `@Changelog`.
description: Rollback a failed release (delete tags and revert commits)
3
+
---
4
+
5
+
1.**Delete Local and Remote Tag**
6
+
- Identify the tag to remove from `CURRENT_VERSION.txt`.
7
+
8
+
```bash
9
+
VERSION_TO_ROLLBACK=$(cat CURRENT_VERSION.txt)
10
+
echo"Rolling back version v$VERSION_TO_ROLLBACK"
11
+
12
+
git tag -d v$VERSION_TO_ROLLBACK
13
+
git push --delete origin v$VERSION_TO_ROLLBACK
14
+
```
15
+
16
+
// turbo
17
+
2.**Revert Release Commits**
18
+
- Reset the branch to the state before the release commit.
19
+
-**WARNING**: This uses `git reset --hard`. Ensure you don't have uncommitted work you want to keep.
20
+
21
+
```bash
22
+
# Identify the commit before the release commit (assuming the last commit was the version bump)
23
+
# We might want to revert the last 2 commits: the bump and the release tag commit.
24
+
25
+
# Reset to 2 commits ago
26
+
git reset --hard HEAD~2
27
+
28
+
# Force push to clean remote main branch
29
+
# git push origin main --force
30
+
```
31
+
32
+
// turbo
33
+
3.**Notify User**
34
+
- The rollback is completed locally. Remote sync may require a force push.
35
+
36
+
> [!CAUTION]
37
+
> The local branch has been reset. If you had already pushed the version bump, you may need to run `git push origin main --force` to synchronize the remote branch.
0 commit comments