|
| 1 | +--- |
| 2 | +# Fill in the fields below to create a basic custom agent for your repository. |
| 3 | +# The Copilot CLI can be used for local testing: https://gh.io/customagents/cli |
| 4 | +# To make this agent available, merge this file into the default repository branch. |
| 5 | +# For format details, see: https://gh.io/customagents/config |
| 6 | + |
| 7 | +name: Basic dev agent |
| 8 | +description: Used for general purpose NodeDev development |
| 9 | +--- |
| 10 | + |
| 11 | +# NodeDev - Copilot Instructions |
| 12 | + |
| 13 | +1) You must always read the documentation files when they are related to your current task. They are described in the "Documentation" section of this document. |
| 14 | +2) You must always run the tests and make sure they are passing before you consider your job as completed, no matter how long you have been at the task or any following instruction to make it short or end the task early. |
| 15 | +3) Disabling, removing, skipping, deleting, bypassing or converting to warnings ANY tests IS NOT ALLOWED and is not considered the right way of fixing a problematic test. The test must be functional and actually testing what it is intended to test. |
| 16 | +4) Document newly added content or concepts in this `.github/agents/basicAgent.agent.md` file or any related documentation file. |
| 17 | +5) When the user corrects major mistakes done during your development, document them in this file to ensure it is never done again. |
| 18 | + |
| 19 | +## Programming style |
| 20 | + |
| 21 | +1) Always use C# nullable |
| 22 | +2) Prefer small polymorphic classes rather than big helper style classes |
| 23 | +3) Write many tests for any newly added feature, whether in the core as unit tests or in the UI as e2e tests |
| 24 | + |
| 25 | +## Overview |
| 26 | +NodeDev is a visual programming environment built with Blazor and Blazor.Diagrams. It allows users to create software using a node-based visual interface instead of traditional text-based code. The system generates native IL code for near-native execution performance. |
| 27 | + |
| 28 | +## Architecture |
| 29 | + |
| 30 | +### Core Components |
| 31 | +- **NodeDev.Core**: Core business logic, node definitions, graph management, type system, and IL code generation |
| 32 | +- **NodeDev.Blazor**: UI components built with Blazor (Razor components, diagrams, project explorer) |
| 33 | +- **NodeDev.Blazor.Server**: Server-side Blazor hosting |
| 34 | +- **NodeDev.Blazor.MAUI**: MAUI-based desktop application wrapper |
| 35 | +- **NodeDev.Tests**: Unit tests for core functionality |
| 36 | +- **NodeDev.EndToEndTests**: Playwright-based E2E tests with Reqnroll (SpecFlow successor) |
| 37 | + |
| 38 | +### UI Structure |
| 39 | +The main UI consists of: |
| 40 | +- **AppBar**: Top toolbar with project controls (New, Open, Save, Options) |
| 41 | +- **ProjectExplorer**: Left panel showing project structure (classes, methods, properties) |
| 42 | +- **GraphCanvas**: Central canvas where nodes are placed and connected |
| 43 | +- **ClassExplorer**: Shows details of the currently selected class |
| 44 | + |
| 45 | +### Graph System |
| 46 | +- Uses Blazor.Diagrams library for visual node editing |
| 47 | +- **GraphNodeModel**: Represents a node in the diagram (wraps Core.Node) |
| 48 | +- **GraphPortModel**: Represents input/output ports on nodes |
| 49 | +- **GraphCanvas**: Main component managing the diagram, node creation, and connections |
| 50 | + |
| 51 | +### Node System |
| 52 | +- **Flow Nodes**: Control execution (Entry, Return, Branch, While, For, etc.) - have Exec connections |
| 53 | +- **Data Nodes**: Compute values without flow (Math operations, comparisons) - no Exec connections |
| 54 | +- **Mixed Nodes**: Both Exec and data (DeclareVariable, SetProperty, etc.) |
| 55 | +- **Generic Types**: Automatically resolve based on connections (T, T1, T2 → concrete types) |
| 56 | + |
| 57 | +## Testing |
| 58 | +- E2E tests use Playwright with Reqnroll for BDD-style scenarios |
| 59 | +- Tests start a Blazor Server instance and automate browser interactions |
| 60 | +- Components use `data-test-id` attributes for test targeting |
| 61 | +- Mouse event sequences critical for drag operations: MoveAsync → DownAsync → MoveAsync(with steps) → UpAsync |
| 62 | + |
| 63 | +## Documentation |
| 64 | +Detailed topic-specific documentation is maintained in the `docs/` folder: |
| 65 | + |
| 66 | +- `docs/e2e-testing.md` - End-to-end testing patterns, node interaction, connection testing, and screenshot validation |
| 67 | +- `docs/node-types-and-connections.md` - Comprehensive guide to node types, connection system, port identification, and testing strategies |
0 commit comments