Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agent/hooks/pre-invocation-anchor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi

if [ -n "$BRANCH" ] && [ "$BRANCH" != "$DEF" ] && [ "$BRANCH" != "main" ] && [ "$BRANCH" != "master" ]; then
cat <<EOF
{"injectSteps":[{"ephemeralMessage":"[SYSTEM CONTEXT: Branche active: '$BRANCH' | État: Code / PR Review Loop. Applique toute correction ou retour de test directement sur cette branche. Ne PAS créer de nouvelle issue ni de nouvelle branche.]"}]}
{"injectSteps":[{"ephemeralMessage":"[SYSTEM CONTEXT: Active branch: '$BRANCH' | State: Code / PR Review Loop. Apply all fixes or test feedback directly on this branch. Do NOT create a new issue or branch.]"}]}
EOF
else
echo '{"injectSteps":[]}'
Expand Down
62 changes: 31 additions & 31 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
name: 🐛 Bug Report / Rapport d'Anomalie
description: Signaler un dysfonctionnement, une régression ou un problème de synchronisation
name: 🐛 Bug Report
description: Report a malfunction, regression, or synchronization issue
title: "fix(<scope>): <short descriptive bug title>"
labels: ["type:bug"]
body:
- type: markdown
attributes:
value: |
### 🔍 Signalement d'anomalie Agentic Android Kernel
Merci de détailler le comportement inattendu pour faciliter le diagnostic et la correction.
### 🔍 Agentic Android Kernel Bug Report
Please detail the unexpected behavior to facilitate diagnosis and resolution.
- type: dropdown
id: scope
attributes:
label: Périmètre / Domaine affecté
description: Choisissez le domaine principal où le bug se produit.
label: Scope / Affected Domain
description: Choose the primary domain where the bug occurs.
options:
- tasks (Création, édition, suppression, complétion de charge)
- matrix (Affichage ou interaction matrice Eisenhower)
- duo (Synchronisation en temps réel, association couple)
- analytics (Calcul de jauge, tendances, graphiques)
- auth (Connexion Google, sessions)
- sync (Firestore, Room, hors-ligne)
- ui (Affichage, glitch visuel, animation)
- ai (Classification Gemini, timeout API)
- tasks (Creation, editing, deletion, mental load completion)
- matrix (Eisenhower matrix display or interaction)
- duo (Real-time synchronization, duo pairing)
- analytics (Gauge calculation, trends, charts)
- auth (Google Sign-In, sessions)
- sync (Firestore, Room, offline)
- ui (Display, visual glitch, animation)
- ai (Gemini classification, API timeout)
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Description du Bug
description: Description claire et concise de l'anomalie rencontrée.
placeholder: "Exemple : Lors du changement d'onglet vers Duo, l'état de chargement reste figé..."
label: Bug Description
description: Clear and concise description of the issue encountered.
placeholder: "Example: When switching to the Duo tab, the loading state remains stuck..."
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Étapes pour Reproduire
description: Quelles sont les actions exactes menant au problème ?
label: Steps to Reproduce
description: What are the exact steps leading to the problem?
placeholder: |
1. Ouvrir l'application
2. Aller sur l'onglet 'Matrice'
3. Glisser une tâche vers le quadrant 'Déléguer'
4. Observer l'erreur...
1. Open the application
2. Go to the 'Matrix' tab
3. Drag a task to the 'Delegate' quadrant
4. Observe the error...
validations:
required: true
- type: textarea
id: expected-vs-actual
attributes:
label: Comportement Attendu vs Comportement Observé
description: Qu'aurait-il dû se passer et que s'est-il passé ?
placeholder: "Attendu : La tâche change de quadrant avec une animation fluide.\nObservé : Crash ou tâche inchangée."
label: Expected vs. Actual Behavior
description: What should have happened, and what actually occurred?
placeholder: "Expected: Task moves to target quadrant with smooth animation.\nActual: Crash or task remains unchanged."
validations:
required: true
- type: input
id: environment
attributes:
label: Environnement de Test
description: Appareil, version d'Android, version de l'application.
placeholder: "Pixel 8 Pro - Android 14 / Émulateur API 34 - v0.1.0"
label: Test Environment
description: Device model, Android OS version, application version.
placeholder: "Pixel 8 Pro - Android 14 / Emulator API 34 - v0.1.0"
validations:
required: false
- type: textarea
id: logs-and-stacktrace
attributes:
label: Logs / Stacktrace (Optionnel)
description: Collez ici les logs Android Studio / Logcat pertinents.
label: Logs / Stacktrace (Optional)
description: Paste relevant Android Studio / Logcat logs here.
placeholder: "Logcat / Stacktrace..."
validations:
required: false
62 changes: 31 additions & 31 deletions .github/ISSUE_TEMPLATE/feature_idea.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
name: 💡 Feature Proposal / Idée de Fonctionnalité
description: Proposer une nouvelle fonctionnalité ou amélioration pour Agentic Android Kernel
name: 💡 Feature Proposal
description: Propose a new feature or improvement for Agentic Android Kernel
title: "feat(<scope>): <short descriptive title>"
labels: ["type:feature"]
body:
- type: markdown
attributes:
value: |
### 🧠 Proposition d'évolution Agentic Android Kernel
Merci de contribuer à la réduction de la charge mentale ! Veuillez remplir ce formulaire pour structurer la fonctionnalité selon la démarche Spec-Driven (4 Piliers).
### 🧠 Feature Proposal for Agentic Android Kernel
Thank you for contributing to mental load reduction! Please fill out this form to structure your feature following the Spec-Driven (4 Pillars) framework.
- type: dropdown
id: scope
attributes:
label: Périmètre / Domaine fonctionnel
description: Choisissez le domaine principal concerné par cette fonctionnalité.
label: Scope / Functional Domain
description: Choose the primary domain affected by this feature.
options:
- tasks (Gestion des charges, récurrence, cycles)
- matrix (Matrice Eisenhower, priorisation 4 quadrants)
- duo (Mode Couple, rotation, synchronisation partagée)
- analytics (Graphiques de tendances, équilibre mental, jauges)
- core (Base de données locale Room, synchronisation Firestore, Auth)
- ai (Gemini classification automatique, suggestions intelligentes)
- ui (Composants visuels, animations sereines, Thème)
- tasks (Mental load management, recurrence, cycles)
- matrix (Eisenhower matrix, 4-quadrant prioritization)
- duo (Couple mode, task rotation, shared synchronization)
- analytics (Trend charts, mental balance, gauges)
- core (Local Room database, Firestore synchronization, Auth)
- ai (Gemini automated classification, smart suggestions)
- ui (Visual components, serene animations, Theme)
validations:
required: true
- type: textarea
id: problem-context
attributes:
label: Contexte & Problématique Charge Mentale
description: Quel est le problème réel ou la friction vécue par l'utilisateur ou le duo ? En quoi cela alourdit-il la charge mentale ?
placeholder: "Exemple : Les tâches ménagères récurrentes sont souvent réassignées manuellement, provoquant des frictions et une asymétrie de charge..."
label: Context & Mental Load Problem Statement
description: What is the real problem or friction experienced by the user or duo? How does it increase mental load?
placeholder: "Example: Recurring household tasks are often manually reassigned, causing friction and asymmetric load..."
validations:
required: true
- type: textarea
id: proposed-solution
attributes:
label: Solution Proposée & Expérience Utilisateur (UX)
description: Décrivez précisément la solution souhaitée, les interactions utilisateur et le résultat attendu.
placeholder: "Exemple : Introduire une règle de rotation alternée automatique à chaque complétion d'une charge récurrente..."
label: Proposed Solution & User Experience (UX)
description: Describe precisely the desired solution, user interactions, and expected outcome.
placeholder: "Example: Introduce an automatic alternating rotation rule upon completion of each recurring task..."
validations:
required: true
- type: textarea
id: impact-analytics
attributes:
label: Mesure d'impact & Analytics souhaités
description: Quels événements télémétriques (event_name, paramètres) ou métriques d'usage permettront de mesurer l'adoption et le succès de cette fonctionnalité ?
placeholder: "Exemple :\n- event_name: 'recurring_task_created' (params: frequency, is_duo_rotating, area)\n- event_name: 'duo_rotation_assigned' (params: frequency, rotation_role, cycle_count)"
label: Desired Impact Metrics & Telemetry
description: Which telemetry events (event_name, parameters) or usage metrics will measure adoption and success?
placeholder: "Example:\n- event_name: 'recurring_task_created' (params: frequency, is_duo_rotating, area)\n- event_name: 'duo_rotation_assigned' (params: frequency, rotation_role, cycle_count)"
validations:
required: false
- type: textarea
id: technical-architecture
attributes:
label: Pistes Techniques & Architecture (Optionnel)
description: Éléments pressentis pour l'implémentation (Room Schema, StateFlow, ViewModel, Jetpack Compose, Gemini, Firestore).
placeholder: "Exemple : Ajout d'un champ `rotationRule` dans MentalLoadItem, mise à jour de SecondBrainRepository..."
label: Technical Architecture & Implementation Notes (Optional)
description: Anticipated implementation details (Room Schema, StateFlow, ViewModel, Jetpack Compose, Gemini, Firestore).
placeholder: "Example: Add 'rotationRule' field to MentalLoadItem, update SecondBrainRepository..."
validations:
required: false
- type: checkboxes
id: quality-commitments
attributes:
label: Engagements Qualité & Guidelines
description: Critères obligatoires de validation pour l'implémentation future.
label: Quality Commitments & Guidelines
description: Mandatory validation criteria for future implementation.
options:
- label: Respect de l'architecture MVI / Clean Kotlin (ViewModel, StateFlow, Room / Firestore)
- label: Adherence to MVI / Clean Kotlin architecture (ViewModel, StateFlow, Room / Firestore)
required: true
- label: UI 100% Jetpack Compose conforme aux principes Serene UI (animations douces, zéro friction)
- label: 100% Jetpack Compose UI compliant with Serene UI principles (gentle animations, zero friction)
required: true
- label: Contrat d'Analytics & Observabilité formalisé
- label: Formalized Analytics & Observability contract
required: true
- label: Tests unitaires & Robolectric (100% passing sur `./scripts/quality-check.sh`)
- label: Unit tests & Robolectric (100% passing on './scripts/quality-check.sh')
required: true
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ Autonomous AI coding agents often derail when given unbounded write access to pr
```mermaid
flowchart TD
subgraph Inception["Phase 1 · Inception Consortium"]
P1["P1: Product Planner\nAnti-duplication & User Stories Gherkin"] --> P2["P2: Design Lead\nTokens M3, UI Matrix 4 états"]
P2 --> P3["P3: Privacy & Data\nZero-PII, Taxonomie analytique, RGPD"]
P3 --> P4["P4: System Architect\nClean MVI, Boundaries, Découpage DAG Epics"]
P1["P1: Product Planner\nAnti-duplication & Gherkin User Stories"] --> P2["P2: Design Lead\nM3 Tokens, 4-State UI Matrix"]
P2 --> P3["P3: Privacy & Data\nZero-PII, Analytics Taxonomy, GDPR"]
P3 --> P4["P4: System Architect\nClean MVI, Boundaries, Epic DAG Decomposition"]
P4 --> Spec["Dual-Write Spec\nGitHub Issue Comment + implementation_plan.md"]
end

Spec --> Gate14{"🛑 GATE 1.4 : Inception Halt\nApprobation explicite écrite\n(Branch Guard actif sur main/master)"}
Spec --> Gate14{"🛑 GATE 1.4 : Inception Halt\nExplicit Written Approval\n(Branch Guard active on default branch)"}

subgraph Delivery["Phase 2 · Delivery"]
Gate14 -->|Validation explicite| Branch["Création de branche dédiée\n<type>/issue-<id>-<slug>"]
Branch --> P5["P5: Software Engineer\nImplémentation TDD & Compose strict\nZéro chaîne en dur (strings.xml)"]
Gate14 -->|Explicit approval| Branch["Dedicated Feature Branch\n<type>/issue-<id>-<slug>"]
Branch --> P5["P5: Software Engineer\nTDD & Strict Compose Implementation\nZero Hardcoded Strings (strings.xml)"]
P5 --> Airbag["🛡️ Quality Airbag\n./scripts/quality-check.sh\n(codeSanityCheck + Lint + Roborazzi)"]
end

subgraph Release["Phase 3 · Release"]
Airbag -->|Vérifications 100% vertes| P6["P6: Release Manager\nPush git & Ouverture PR Walkthrough"]
P6 --> Gate35{"🔒 GATE 3.5 : Auto-Merge Lock\nAttente formelle du développeur\n('Tu peux merger')"}
Gate35 -->|Confirmation écrite| Merge["Squash Merge & Dual-Sync\nClôture Kanban & Pruning local"]
Airbag -->|100% green checks| P6["P6: Release Manager\nGit Push & Open PR Walkthrough"]
P6 --> Gate35{"🔒 GATE 3.5 : Auto-Merge Lock\nHuman Authorization Required\n('Tu peux merger')"}
Gate35 -->|Written confirmation| Merge["Squash Merge & Dual-Sync\nKanban Closure & Branch Pruning"]
end

style Gate14 fill:#ff4d4f,stroke:#333,stroke-width:2px,color:#fff
Expand Down
37 changes: 18 additions & 19 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
# 🛠️ Scripts d'Automatisation — Agentic Android Kernel
# 🛠️ Automation Scripts — Agentic Android Kernel

Ce dossier contient l'ensemble des **scripts atomiques** et des **orchestrateurs** du projet **Agentic Android Kernel**.
This directory contains all **atomic scripts** and **orchestrators** for the **Agentic Android Kernel** project.

> 📖 **Documentation Complète & Architecture Détaillée :**
> Consultez [**`docs/scripts-reference.md`**](../docs/scripts-reference.md) pour les fiches exhaustives, les options CLI, et la matrice de composition.
> 📖 **Comprehensive Documentation & Detailed Architecture:**
> See [**`docs/scripts-reference.md`**](../docs/scripts-reference.md) for exhaustive reference sheets, CLI options, and the composition matrix.

---

## ⚡ Index Rapide des Scripts
## ⚡ Quick Script Index

| Script | Langage | Description Synthétique | Commande |
| Script | Language | Concise Description | Command |
|---|---|---|---|
| [`validate-docs.sh`](validate-docs.sh) | Bash | Valide la présence et la conformité des contrats de spécifications (`DESIGN.md`, playbooks, skills, règles) | `./scripts/validate-docs.sh` |
| [`quality-check.sh`](quality-check.sh) | Bash | Exécute la suite complète de compilation Kotlin/Java, Lint Android et tests unitaires/UI | `./scripts/quality-check.sh` |
| [`test-firestore-rules.mjs`](test-firestore-rules.mjs) | Node.js | Exécute 16 assertions de sécurité et de non-régression sur `firestore.rules` | `node scripts/test-firestore-rules.mjs` |
| [`deploy-firestore-rules.mjs`](deploy-firestore-rules.mjs) | Node.js | Déploie et publie `firestore.rules` via l'API REST avec JWT compte de service | `node scripts/deploy-firestore-rules.mjs` |
| [`deploy-app-distribution.sh`](deploy-app-distribution.sh) | Bash | Compile et déploie l'APK sur Firebase App Distribution avec multiplicateur de version (x100) | `./scripts/deploy-app-distribution.sh` |
| [`generate-screenshots.sh`](generate-screenshots.sh) | Bash | Génère les captures d'écran Roborazzi pour le Design System | `./scripts/generate-screenshots.sh` |
| [`upload-screenshots.py`](upload-screenshots.py) | Python | Valide et mappe les captures Roborazzi sur les écrans Google Stitch | `python3 scripts/upload-screenshots.py --check-only` |
| [`cleanup-e2e-firestore.mjs`](cleanup-e2e-firestore.mjs) | Node.js | Purge les documents de sondes de test dans la collection Firestore `/users` | `node scripts/cleanup-e2e-firestore.mjs` |
| [`inspect-ide.sh`](inspect-ide.sh) | Bash | Exécute les inspections Android Studio / IntelliJ en mode headless | `./scripts/inspect-ide.sh` |
| [`validate-docs.sh`](validate-docs.sh) | Bash | Validates presence and contract conformance of specifications (`DESIGN.md`, playbooks, skills, rules) | `./scripts/validate-docs.sh` |
| [`quality-check.sh`](quality-check.sh) | Bash | Executes the complete Kotlin/Java compilation, Android Lint, and unit/UI test suite | `./scripts/quality-check.sh` |
| [`test-runtime-guardrails.mjs`](test-runtime-guardrails.mjs) | Node.js | Runs 18 security assertions on runtime guardrails (`branch-guard.mjs`, `plan-guard.mjs`) | `node scripts/test-runtime-guardrails.mjs` |
| [`install-hooks.sh`](install-hooks.sh) | Bash | Binds local Git hooks to `.agent/hooks/` and enables the pre-commit airbag | `./scripts/install-hooks.sh` |
| [`deploy-app-distribution.sh`](deploy-app-distribution.sh) | Bash | Builds and deploys APK to Firebase App Distribution with monotonic version multiplier (x100) | `./scripts/deploy-app-distribution.sh` |
| [`generate-screenshots.sh`](generate-screenshots.sh) | Bash | Generates Roborazzi screenshots for the Design System | `./scripts/generate-screenshots.sh` |
| [`upload-screenshots.py`](upload-screenshots.py) | Python | Validates and maps Roborazzi screenshots to Google Stitch screens | `python3 scripts/upload-screenshots.py --check-only` |
| [`inspect-ide.sh`](inspect-ide.sh) | Bash | Runs Android Studio / IntelliJ inspections in headless mode | `./scripts/inspect-ide.sh` |

---

## 🎯 Composition par Compétences Sémantiques ([`.agent/skills/`](../.agent/skills/))
## 🎯 Composition by Semantic Skills ([`.agent/skills/`](../.agent/skills/))

Chaque script remplit une responsabilité unique. Les enchaînements sont pilotés par les compétences sémantiques natives de l'agent :
- **`quality-airbag`** (`/quality-check`) ➔ `validate-docs.sh` + `quality-check.sh` + `test-firestore-rules.mjs`
Each script fulfills a single responsibility. End-to-end workflows are driven by the agent's native semantic skills:
- **`quality-airbag`** (`/quality-check`) ➔ `validate-docs.sh` + `quality-check.sh` + `test-runtime-guardrails.mjs`
- **`sync-stitch`** (`/sync-stitch`) ➔ `validate-docs.sh` + `generate-screenshots.sh` + `upload-screenshots.py`
- **`distribute-local`** (`/distribute-local`) ➔ `quality-check.sh` + `deploy-app-distribution.sh`
- **`open-pr`** (`/open-pr`) ➔ `quality-check.sh` + Walkthrough & PR creation
- **`triage-feedback`** (`/triage-feedback`) ➔ 100% MCP natif (`GitHubMCP` : `search_issues`, `add_issue_comment`, `create_issue`)
- **`triage-feedback`** (`/triage-feedback`) ➔ 100% native MCP (`GitHubMCP`: `search_issues`, `add_issue_comment`, `create_issue`)
Loading
Loading