feat: replay E2E fonctionnel — 25/25 actions, 0 retries, SomEngine via serveur

Validé sur PC Windows (DESKTOP-58D5CAC, 2560x1600) :
- 8 clics résolus visuellement (1 anchor_template, 1 som_text_match, 6 som_vlm)
- Score moyen 0.75, temps moyen 1.6s
- Texte tapé correctement (bonjour, test word, date, email)
- 0 retries, 2 actions non vérifiées (OK)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dom
2026-03-31 14:04:41 +02:00
parent 5e0b53cfd1
commit a7de6a488b
79542 changed files with 6091757 additions and 1 deletions

View File

@@ -0,0 +1,262 @@
# Document d'Exigences: Visual Workflow Builder
## Introduction
Le Visual Workflow Builder est une interface graphique qui permet aux utilisateurs de créer, modifier et gérer des workflows RPA par glisser-déposer sans écrire de code. Cette fonctionnalité démocratise l'automatisation RPA en la rendant accessible aux utilisateurs non-techniques tout en conservant la puissance et la flexibilité nécessaires aux développeurs.
Le builder fournit un canvas intuitif où les utilisateurs peuvent construire visuellement des workflows en connectant des nodes d'action, configurer les paramètres via des panneaux de propriétés, tester les workflows en temps réel, et les déployer en production en un clic.
## Glossaire
- **Canvas**: L'espace de travail visuel principal où les nodes de workflow sont placés et connectés
- **Node**: Une représentation visuelle d'une action de workflow unique (clic, saisie, attente, etc.)
- **Edge**: Une connexion visuelle entre deux nodes représentant le flux d'exécution
- **Palette**: La barre latérale contenant les types de nodes déplaçables
- **Panneau de Propriétés**: L'interface de configuration pour les nodes sélectionnés
- **Workflow Graph**: La structure de données sous-jacente représentant le workflow visuel
- **Visual Builder**: L'interface graphique complète pour la création de workflows
- **Sélecteur de Cible**: L'outil interactif pour sélectionner des éléments UI à l'écran
- **Template**: Un modèle de workflow pré-construit qui peut être réutilisé
- **Sérialisation**: Le processus de conversion des workflows visuels vers/depuis le format JSON
## Exigences
### Exigence 1: Gestion du Canvas et des Nodes
**User Story:** En tant que créateur de workflow, je veux organiser visuellement les actions de workflow sur un canvas, afin de voir et comprendre le flux d'exécution d'un coup d'œil.
#### Critères d'Acceptation
1. QUAND le Visual Builder se charge, LE Visual Builder DOIT afficher un canvas vide avec un fond en grille
2. QUAND un utilisateur glisse un type de node depuis la palette, LE Visual Builder DOIT créer une nouvelle instance de node sur le canvas à la position de dépôt
3. QUAND un utilisateur sélectionne un node sur le canvas, LE Visual Builder DOIT mettre en surbrillance le node sélectionné et afficher ses propriétés dans le panneau de propriétés
4. QUAND un utilisateur déplace un node sur le canvas, LE Visual Builder DOIT mettre à jour la position du node en temps réel
5. QUAND un utilisateur supprime un node sélectionné, LE Visual Builder DOIT retirer le node et tous les edges connectés du canvas
### Exigence 2: Connexion des Nodes et Flux
**User Story:** En tant que créateur de workflow, je veux connecter les nodes pour définir l'ordre d'exécution, afin de spécifier la séquence d'actions dans mon workflow.
#### Critères d'Acceptation
1. QUAND un utilisateur glisse depuis le port de sortie d'un node vers le port d'entrée d'un autre node, LE Visual Builder DOIT créer un edge connectant les deux nodes
2. QUAND un edge est créé, LE Visual Builder DOIT valider que la connexion est valide selon les règles du workflow
3. QUAND un utilisateur clique sur un edge, LE Visual Builder DOIT mettre en surbrillance l'edge et permettre la suppression
4. QUAND un node est supprimé, LE Visual Builder DOIT automatiquement retirer tous les edges connectés à ce node
5. QUAND plusieurs edges existent depuis un node, LE Visual Builder DOIT les afficher avec des indicateurs visuels distincts pour différentes conditions
### Requirement 3: Node Configuration
**User Story:** As a workflow creator, I want to configure node parameters through a properties panel, so that I can customize each action's behavior without writing code.
#### Acceptance Criteria
1. WHEN a node is selected, THE Visual Builder SHALL display all configurable parameters for that node type in the properties panel
2. WHEN a user modifies a parameter value, THE Visual Builder SHALL validate the input and update the node configuration immediately
3. WHEN a node requires a target element, THE Visual Builder SHALL provide a target selector button that launches the interactive selection tool
4. WHEN a user saves node configuration, THE Visual Builder SHALL persist the changes to the workflow definition
5. WHERE a parameter has a default value, THE Visual Builder SHALL pre-populate the field with that default
### Requirement 4: Target Selection
**User Story:** As a workflow creator, I want to interactively select UI elements on screen, so that I can easily specify targets for actions without manually entering selectors.
#### Acceptance Criteria
1. WHEN a user clicks the target selector button, THE Visual Builder SHALL capture the current screen and enter selection mode
2. WHEN the user hovers over UI elements in selection mode, THE Visual Builder SHALL highlight the element boundaries
3. WHEN the user clicks on an element, THE Visual Builder SHALL extract the element properties and automatically configure the node target
4. WHEN target selection completes, THE Visual Builder SHALL return to normal editing mode with the target configured
5. WHEN the Visual Builder extracts element properties, THE Visual Builder SHALL include text content, position, size, and visual embedding
### Requirement 5: Workflow Serialization
**User Story:** As a workflow creator, I want my visual workflows to be saved and loaded reliably, so that I can continue working on them across sessions.
#### Acceptance Criteria
1. WHEN a user saves a workflow, THE Visual Builder SHALL serialize the canvas state to JSON format including all nodes, edges, and configurations
2. WHEN a user loads a workflow, THE Visual Builder SHALL deserialize the JSON and reconstruct the exact canvas state
3. WHEN serialization occurs, THE Visual Builder SHALL validate that all required fields are present and correctly formatted
4. WHEN a workflow is saved, THE Visual Builder SHALL generate a unique workflow identifier if one does not exist
5. WHEN deserialization fails, THE Visual Builder SHALL display an error message and prevent loading of corrupted data
### Requirement 6: Workflow Execution
**User Story:** As a workflow creator, I want to execute my visual workflows directly from the builder, so that I can test and validate my automation immediately.
#### Acceptance Criteria
1. WHEN a user clicks the run button, THE Visual Builder SHALL convert the visual workflow to a WorkflowGraph and execute it via ExecutionLoop
2. WHEN execution starts, THE Visual Builder SHALL display real-time progress by highlighting the currently executing node
3. WHEN a step completes, THE Visual Builder SHALL update the node visual state to indicate success or failure
4. WHEN execution completes, THE Visual Builder SHALL display a summary of results including duration and success rate
5. IF execution fails at any step, THEN THE Visual Builder SHALL highlight the failed node and display the error message
### Requirement 7: Node Types and Palette
**User Story:** As a workflow creator, I want access to all common RPA actions through a visual palette, so that I can build complete workflows without coding.
#### Acceptance Criteria
1. WHEN the Visual Builder loads, THE Visual Builder SHALL display a palette containing all available node types organized by category
2. WHEN a user searches the palette, THE Visual Builder SHALL filter node types based on the search query
3. WHEN a user hovers over a node type in the palette, THE Visual Builder SHALL display a tooltip with the node description and parameters
4. THE Visual Builder SHALL support at minimum these node types: Click, Type, Wait, Navigate, Extract, Condition, Loop, Variable
5. WHERE new node types are added to the system, THE Visual Builder SHALL automatically include them in the palette
### Requirement 8: Conditional Branching
**User Story:** As a workflow creator, I want to add conditional logic to my workflows, so that I can handle different scenarios based on runtime conditions.
#### Acceptance Criteria
1. WHEN a user adds a Condition node, THE Visual Builder SHALL provide configuration for the condition expression and true/false branches
2. WHEN a Condition node is connected, THE Visual Builder SHALL allow separate edges for true and false outcomes
3. WHEN a condition is evaluated during execution, THE Visual Builder SHALL follow the appropriate branch based on the result
4. WHEN displaying a Condition node, THE Visual Builder SHALL visually distinguish the true and false output ports
5. WHEN a user configures a condition, THE Visual Builder SHALL validate that the expression syntax is correct
### Requirement 9: Loop Constructs
**User Story:** As a workflow creator, I want to create loops in my workflows, so that I can repeat actions over collections or until conditions are met.
#### Acceptance Criteria
1. WHEN a user adds a Loop node, THE Visual Builder SHALL provide configuration for loop type (for-each, while, repeat) and iteration parameters
2. WHEN a Loop node is connected, THE Visual Builder SHALL allow edges for loop body and loop exit
3. WHEN a loop executes, THE Visual Builder SHALL repeat the loop body according to the configured parameters
4. WHEN displaying a Loop node, THE Visual Builder SHALL visually indicate the loop body region
5. WHEN a loop completes, THE Visual Builder SHALL continue execution from the loop exit edge
### Requirement 10: Variable Management
**User Story:** As a workflow creator, I want to define and use variables in my workflows, so that I can store and pass data between steps.
#### Acceptance Criteria
1. WHEN a user opens variable management, THE Visual Builder SHALL display all defined variables with their names, types, and default values
2. WHEN a user creates a new variable, THE Visual Builder SHALL validate that the variable name is unique and follows naming conventions
3. WHEN a user references a variable in a node parameter, THE Visual Builder SHALL use the syntax ${variable_name} and validate that the variable exists
4. WHEN a workflow executes, THE Visual Builder SHALL substitute variable references with their runtime values
5. WHEN a node produces output, THE Visual Builder SHALL allow storing the result in a variable for later use
### Requirement 11: Workflow Templates
**User Story:** As a workflow creator, I want to use pre-built workflow templates, so that I can quickly create common automation patterns without starting from scratch.
#### Acceptance Criteria
1. WHEN a user creates a new workflow, THE Visual Builder SHALL offer a selection of templates organized by use case
2. WHEN a user selects a template, THE Visual Builder SHALL load the template structure onto the canvas with all nodes and connections
3. WHEN a template is loaded, THE Visual Builder SHALL allow the user to customize all parameters before saving
4. THE Visual Builder SHALL include templates for at minimum: Login, Form Filling, Data Extraction, Navigation
5. WHERE users create workflows, THE Visual Builder SHALL allow saving them as custom templates for reuse
### Requirement 12: Validation and Error Checking
**User Story:** As a workflow creator, I want real-time validation of my workflow, so that I can identify and fix errors before execution.
#### Acceptance Criteria
1. WHEN a workflow is modified, THE Visual Builder SHALL validate the workflow structure and highlight any errors
2. WHEN a node is missing required configuration, THE Visual Builder SHALL display a warning indicator on the node
3. WHEN a workflow has disconnected nodes, THE Visual Builder SHALL display a warning message
4. WHEN a workflow has circular dependencies, THE Visual Builder SHALL detect and prevent the invalid structure
5. WHEN validation errors exist, THE Visual Builder SHALL prevent workflow execution until errors are resolved
### Requirement 13: Undo/Redo
**User Story:** As a workflow creator, I want to undo and redo my actions, so that I can experiment freely and recover from mistakes.
#### Acceptance Criteria
1. WHEN a user performs an action, THE Visual Builder SHALL add the action to the undo stack
2. WHEN a user triggers undo, THE Visual Builder SHALL revert the last action and update the canvas state
3. WHEN a user triggers redo, THE Visual Builder SHALL reapply the last undone action
4. THE Visual Builder SHALL support at minimum 50 levels of undo history
5. WHEN a new action is performed after undo, THE Visual Builder SHALL clear the redo stack
### Requirement 14: Zoom and Pan
**User Story:** As a workflow creator, I want to zoom and pan the canvas, so that I can work with large workflows comfortably.
#### Acceptance Criteria
1. WHEN a user scrolls with the mouse wheel, THE Visual Builder SHALL zoom the canvas in or out centered on the cursor position
2. WHEN a user drags on empty canvas space, THE Visual Builder SHALL pan the viewport
3. WHEN a user clicks fit-to-screen, THE Visual Builder SHALL adjust zoom and position to show the entire workflow
4. THE Visual Builder SHALL support zoom levels from 25% to 200%
5. WHEN zooming or panning, THE Visual Builder SHALL maintain smooth 60fps performance
### Requirement 15: Export and Import
**User Story:** As a workflow creator, I want to export and import workflows, so that I can share them with others and back them up.
#### Acceptance Criteria
1. WHEN a user exports a workflow, THE Visual Builder SHALL generate a JSON file containing the complete workflow definition
2. WHEN a user imports a workflow file, THE Visual Builder SHALL validate the file format and load the workflow onto the canvas
3. WHEN exporting, THE Visual Builder SHALL include all nodes, edges, variables, and metadata
4. WHEN importing, THE Visual Builder SHALL detect version incompatibilities and offer migration if needed
5. THE Visual Builder SHALL support exporting workflows in both JSON and YAML formats
### Requirement 16: Real-time Collaboration (Future)
**User Story:** As a workflow creator, I want to collaborate with team members in real-time, so that we can build workflows together efficiently.
#### Acceptance Criteria
1. WHEN multiple users open the same workflow, THE Visual Builder SHALL display presence indicators for each user
2. WHEN a user modifies the workflow, THE Visual Builder SHALL broadcast changes to all connected users in real-time
3. WHEN conflicts occur, THE Visual Builder SHALL use last-write-wins strategy with conflict notifications
4. WHEN a user's cursor moves, THE Visual Builder SHALL display the cursor position to other users
5. WHEN a user selects a node, THE Visual Builder SHALL show the selection to other users with the user's color
### Requirement 17: Keyboard Shortcuts
**User Story:** As a workflow creator, I want keyboard shortcuts for common actions, so that I can work more efficiently.
#### Acceptance Criteria
1. THE Visual Builder SHALL support Ctrl+Z for undo and Ctrl+Y for redo
2. THE Visual Builder SHALL support Delete key to remove selected nodes
3. THE Visual Builder SHALL support Ctrl+C, Ctrl+V for copy and paste of nodes
4. THE Visual Builder SHALL support Ctrl+S to save the workflow
5. THE Visual Builder SHALL support Ctrl+F to focus the palette search
### Requirement 18: Accessibility
**User Story:** As a workflow creator with accessibility needs, I want the Visual Builder to be keyboard-navigable and screen-reader friendly, so that I can create workflows independently.
#### Acceptance Criteria
1. WHEN a user navigates with Tab key, THE Visual Builder SHALL move focus between interactive elements in logical order
2. WHEN a screen reader is active, THE Visual Builder SHALL provide descriptive labels for all nodes and controls
3. WHEN a user uses keyboard navigation, THE Visual Builder SHALL provide visual focus indicators
4. THE Visual Builder SHALL support high contrast mode for users with visual impairments
5. THE Visual Builder SHALL allow all drag-and-drop operations to be performed via keyboard alternatives
### Requirement 19: Performance
**User Story:** As a workflow creator, I want the Visual Builder to remain responsive with large workflows, so that I can build complex automations without performance degradation.
#### Acceptance Criteria
1. WHEN a workflow contains up to 100 nodes, THE Visual Builder SHALL maintain 60fps rendering performance
2. WHEN a user performs an action, THE Visual Builder SHALL respond within 100ms
3. WHEN loading a workflow, THE Visual Builder SHALL display the canvas within 2 seconds
4. WHEN saving a workflow, THE Visual Builder SHALL complete the operation within 1 second
5. THE Visual Builder SHALL use virtualization for large workflows to render only visible nodes
### Requirement 20: Integration with Existing System
**User Story:** As a system administrator, I want the Visual Builder to integrate seamlessly with existing RPA Vision components, so that visual workflows have access to all system capabilities.
#### Acceptance Criteria
1. WHEN a visual workflow is executed, THE Visual Builder SHALL convert it to a WorkflowGraph compatible with ExecutionLoop
2. WHEN a workflow uses self-healing, THE Visual Builder SHALL configure nodes to enable recovery strategies
3. WHEN a workflow is executed, THE Visual Builder SHALL integrate with the Analytics system for metrics collection
4. WHEN a workflow is saved, THE Visual Builder SHALL store it in the same format as programmatically created workflows
5. WHEN existing workflows are loaded, THE Visual Builder SHALL be able to visualize and edit them if they follow the standard format