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>
12 KiB
Requirements Document
Introduction
This document defines the requirements for the complete reconstruction of the Visual Workflow Builder (VWB) frontend. The project aims to create a modern, intuitive, and accessible user interface for creating RPA automation workflows, building on the existing working backend.
The system will provide a French-language interface for creating visual workflows using drag-and-drop interactions, with vision-based element selection and real-time execution feedback.
Glossary
- VWB: Visual Workflow Builder - The visual workflow editor
- Canvas: Main workspace where users build their workflows
- Step: Action element in a workflow (equivalent to "Node" in English)
- Connection: Link between two steps defining execution order (equivalent to "Edge")
- Palette: Toolbox containing available step types
- Properties_Panel: Interface for configuring step parameters
- Workflow: Automation scenario composed of connected steps
- Backend_VWB: Existing Flask API that handles workflow persistence and execution
- Visual_Selector: Element selection interface based on vision and embeddings
- ScreenCapturer: Existing screen capture service from RPA Vision V3 system
- Visual_Embedding: Vector representation of a visual element for recognition
- Frontend_VWB: The React-based user interface application
- Validator: Component responsible for workflow validation and error checking
- Executor: Component responsible for workflow execution and status tracking
- Workflow_Manager: Component responsible for workflow persistence operations
- Variable_Manager: Component responsible for workflow variable management
- Interface: The complete user interface system
Requirements
Requirement 1: Modern Frontend Architecture
User Story: As a developer, I want a modern and maintainable frontend architecture, so that I can easily develop and maintain the application.
Acceptance Criteria
- THE Frontend_VWB SHALL use React 18+ with TypeScript for development
- THE Frontend_VWB SHALL use Material-UI v6+ as the primary design system
- THE Frontend_VWB SHALL use @xyflow/react v12+ for visual workflow rendering
- THE Frontend_VWB SHALL implement an architecture based on reusable components
- THE Frontend_VWB SHALL use Redux Toolkit for global state management
- THE Frontend_VWB SHALL support hot-reload for development
Requirement 2: Main Canvas Interface
User Story: As a user, I want an intuitive visual workspace, so that I can create my workflows through drag-and-drop.
Acceptance Criteria
- WHEN the user opens the application, THE Canvas SHALL display an empty workspace with alignment grid
- WHEN the user drags a step from the palette, THE Canvas SHALL allow dropping it at the desired position
- WHEN the user clicks on a step, THE Canvas SHALL select it visually
- WHEN the user drags a step, THE Canvas SHALL move it in real-time
- WHEN the user connects two steps, THE Canvas SHALL create a visual connection
- THE Canvas SHALL display a minimap for navigation in large workflows
Requirement 3: French Step Palette
User Story: As a French user, I want a toolbox with clear action names in French, so that I can easily understand the available functionalities.
Acceptance Criteria
- THE Palette SHALL organize steps in French categories (Web Actions, Logic, Data, Control)
- WHEN the user hovers over a step, THE Palette SHALL display an explanatory tooltip in French
- WHEN the user types in the search, THE Palette SHALL filter steps by French name
- THE Palette SHALL use intuitive icons for each step type
- THE Palette SHALL allow drag-and-drop to the Canvas
Requirement 4: Step Configuration
User Story: As a user, I want to easily configure the parameters of each step, so that I can customize their behavior.
Acceptance Criteria
- WHEN the user selects a step, THE Properties_Panel SHALL display its configurable parameters
- WHEN the user modifies a parameter, THE Properties_Panel SHALL validate the input in real-time
- WHEN a required parameter is missing, THE Properties_Panel SHALL display an error indicator
- THE Properties_Panel SHALL adapt the interface according to parameter type (text, number, list, boolean)
- THE Properties_Panel SHALL allow screen element selection for interaction steps
Requirement 5: Vision-Based Visual Element Selector
User Story: As a user, I want to select elements purely visually on a screenshot, so that I can easily configure interaction steps without using CSS or XPath selectors.
Acceptance Criteria
- WHEN the user clicks "Select an element", THE Visual_Selector SHALL capture the screen via the existing ScreenCapturer API
- WHEN the user hovers over an area of the capture, THE Visual_Selector SHALL display a preview of the selectable area
- WHEN the user clicks on an area, THE Visual_Selector SHALL create a visual embedding of that area
- WHEN the selection is confirmed, THE Visual_Selector SHALL store the embedding and reference image for the step
- THE Visual_Selector SHALL allow visualization of the selected element with its visual context
Requirement 6: Variable Management
User Story: As a user, I want to create and use variables in my workflows, so that I can make my automations flexible and reusable.
Acceptance Criteria
- THE Variable_Manager SHALL allow creating, modifying and deleting variables
- WHEN the user creates a variable, THE Variable_Manager SHALL validate name uniqueness
- WHEN the user types ${variable_name}, THE Properties_Panel SHALL provide autocompletion
- THE Variable_Manager SHALL support different types (text, number, boolean, list)
- THE Variable_Manager SHALL allow defining default values
Requirement 7: Validation and Visual Feedback
User Story: As a user, I want to be notified of errors in my workflow, so that I can correct problems before execution.
Acceptance Criteria
- WHEN a step has missing parameters, THE Validator SHALL display a red indicator on the step
- WHEN the workflow has disconnected steps, THE Validator SHALL highlight them in orange
- WHEN the workflow contains cycles, THE Validator SHALL display a warning
- THE Validator SHALL prevent execution if critical errors exist
- THE Validator SHALL display an error summary in a dedicated panel
Requirement 8: Real-Time Execution and Feedback
User Story: As a user, I want to see the execution state of my workflow in real-time, so that I can understand what is happening and identify problems.
Acceptance Criteria
- WHEN the user starts execution, THE Executor SHALL send the workflow to Backend_VWB
- WHEN a step executes, THE Canvas SHALL highlight it in blue
- WHEN a step succeeds, THE Canvas SHALL display it in green
- WHEN a step fails, THE Canvas SHALL display it in red with the error message
- THE Executor SHALL display an execution summary (duration, success rate)
Requirement 9: Save and Load Operations
User Story: As a user, I want to save my workflows and reload them later, so that I don't lose my work.
Acceptance Criteria
- WHEN the user clicks "Save", THE Workflow_Manager SHALL send the data to Backend_VWB
- WHEN the user opens an existing workflow, THE Workflow_Manager SHALL load it from Backend_VWB
- THE Workflow_Manager SHALL display the list of available workflows
- THE Workflow_Manager SHALL allow renaming and deleting workflows
- THE Workflow_Manager SHALL handle save conflicts (multiple versions)
Requirement 10: French Internationalization
User Story: As a French user, I want an interface entirely in French with accessible terminology, so that I can easily understand all functionalities.
Acceptance Criteria
- THE Interface SHALL use exclusively French terminology (Step, Connection, Workspace)
- THE Interface SHALL provide explanatory tooltips in French for all elements
- THE Interface SHALL display error messages in clear and understandable French
- THE Interface SHALL use universal icons complemented by French text
- THE Interface SHALL include an accessible glossary of technical terms
Requirement 11: Accessibility and Ergonomics
User Story: As a user, I want an accessible and ergonomic interface, so that I can use the application efficiently even without technical expertise.
Acceptance Criteria
- THE Interface SHALL support complete keyboard navigation
- THE Interface SHALL comply with WCAG 2.1 level AA standards
- THE Interface SHALL provide keyboard shortcuts for frequent actions
- THE Interface SHALL adapt element sizes for different screen resolutions
- THE Interface SHALL include a contextual help mode for new users
Requirement 12: Performance and Responsiveness
User Story: As a user, I want a fluid and responsive interface, so that I can work efficiently even with complex workflows.
Acceptance Criteria
- THE Interface SHALL maintain 60fps when moving steps
- THE Interface SHALL load a workflow of 100 steps in less than 2 seconds
- THE Interface SHALL use virtualization for long lists
- THE Interface SHALL implement debouncing for expensive operations
- THE Interface SHALL optimize rendering to avoid unnecessary re-renders
Requirement 13: Backend Integration
User Story: As a system, I want seamless integration with the existing backend, so that I can ensure data and functionality consistency.
Acceptance Criteria
- THE Frontend_VWB SHALL use the Backend_VWB REST API for all CRUD operations
- THE Frontend_VWB SHALL handle backend communication errors gracefully
- THE Frontend_VWB SHALL implement a retry system for failed requests
- THE Frontend_VWB SHALL validate data client-side before sending to backend
- THE Frontend_VWB SHALL maintain data format consistency with the backend
Requirement 14: Vision-Based Testing and Quality
User Story: As a developer, I want complete test coverage using only real visual approaches, so that I can ensure reliability without depending on synthetic captures.
Acceptance Criteria
- THE Frontend_VWB SHALL have at least 80% unit test coverage for business logic
- THE Frontend_VWB SHALL include integration tests using only real screenshots
- THE Frontend_VWB SHALL use property-based tests for visual embedding validation
- THE Frontend_VWB SHALL pass all TypeScript and ESLint linting tests
- THE Frontend_VWB SHALL test integration with existing ScreenCapturer API without synthetic data
Requirement 15: Interactive Documentation Tabs
User Story: As a user, I want accessible documentation for each tool and module directly in the interface, so that I can understand how to use each feature without leaving the application.
Acceptance Criteria
- THE Interface SHALL include a documentation tab for each major tool and module
- WHEN the user opens a documentation tab, THE Interface SHALL display contextual help for that specific tool
- THE Documentation SHALL include step-by-step guides with visual examples for each feature
- THE Documentation SHALL be available in French with clear terminology
- THE Documentation SHALL include interactive examples that users can try directly
Requirement 16: Documentation and Maintenance
User Story: As a developer, I want complete and up-to-date documentation, so that I can easily maintain and evolve the application.
Acceptance Criteria
- THE Documentation SHALL be centralized in the docs/ directory of the project
- THE Documentation SHALL include a development guide with architecture and conventions
- THE Documentation SHALL include a user guide with screenshots
- THE Code SHALL include comments in French for complex parts
- THE Documentation SHALL be automatically updated when API changes occur