メインコンテンツまでスキップ

AI Workflow

What This Chapter Covers​

This chapter explains the AI Workflow: a graph of nodes that takes a project from its input documents through design, AUTOSAR export and code generation, user code, tests, the build, a run in the vECU and a verification report. You place nodes, connect them, set their parameters and run the graph. Each AI node runs a Claude session that writes files in the project; the other nodes run PAIO's own tools.

  • Readers: users who want PAIO to carry a project through several steps at once.
  • Prerequisites: an open project, an active license, a Claude account for the AI nodes (21.11), and Docker with a PRTE vECU image for the nodes that build or run code (21.2).

What a workflow writes is a draft. PAIO checks what a node writes and sends defects back to the node that caused them, but it does not decide whether the design is the right one. Review the results in the editors and in the 14. Validation panel before you rely on them.

The AI chat is a separate feature: the provider you choose in 15. AI Assistant does not apply to the AI Workflow.

21.1 What the AI Workflow Does​

A workflow is a directed graph. Each node does one step and hands its result to the nodes connected to its outputs. The usual chain is:

  1. Input Analysis reads the project's documents, model files and code and builds a knowledge base under workflow/knowledge/.
  2. The design nodes write the design under design/.
  3. AUTOSAR Export writes the ECU Extract, and AUTOSAR Code Generation runs the PRTE (CP) or PARA (AP) generator.
  4. User Code Implementation and Test Code Implementation write the user code and the tests.
  5. Compile/Build, Test Execution and Runtime Check build and run the code in the vECU, and Verification Report writes the requirement traceability table.

A node that finds defects can send them back through its Rejected output to an earlier node, which runs again (21.8.4). Every project has exactly one workflow document, workflow/WORKFLOW.io.workflow.

21.2 Prerequisites​

You need an open project, an active license, a Claude account for every AI node (21.11), and Docker with a local PRTE vECU image for the build and run nodes. PAIO pulls no image itself; see 17.3 vECU Containers (Docker).

21.3 Opening the Editor and Its Layout​

  1. Click the Workflow icon, the third icon of the rail. The editor tab Workflow opens.
  2. In a new project the canvas is empty; the first Ctrl+S creates workflow/WORKFLOW.io.workflow.

The editor has the node palette on the left, the canvas in the center with the run log under it, and the inspector on the right. Double-clicking WORKFLOW.io.workflow in the Explorer opens a read-only JSON viewer, not the editor.

21.4 Node Palette and Node Types​

21.4.1 The Palette​

The palette lists the node types by category. Type in Search nodes to filter, and drag an item onto the canvas to add a node. Clicking an item adds nothing.

21.4.2 The Node Card​

A card shows the node name and its type label. (OFF) marks a disabled node, and the markers START, END and PINNED show the settings of 21.5.3. During a run a status badge shows whether the node is running, finished or failed.

21.4.3 Node Types​

The nodes cover requirements, design, generation, implementation, build and verification, and control (Approval, Condition Branch, Sticky Note). Every input port is required.

21.5 Building the Workflow​

21.5.1 Connecting Nodes​

Drag from an output port (right edge of a node) to an input port (left edge of another node). One output may feed several nodes. A loop is allowed only as a feedback edge, drawn dashed: from a Rejected port back to an earlier node, or back into the START node.

21.5.2 Selecting and Moving​

Click a node to select it and show its settings; click the empty canvas to show the workflow settings. Drag the empty canvas to pan and use Ctrl+wheel to zoom.

21.5.3 Context Menus​

Right-click a node to disable it, run from it, pin its output, or make it the START or END node of the run.

21.5.4 Sticky Notes​

Right-click the empty canvas and choose Add Sticky Note. Select the note and type its text in the NOTE field of the inspector.

21.5.5 The Floating Toolbar​

The toolbar at the bottom-left of the canvas has Run Workflow, Cancel Run, Auto Layout, Templates and Show/Hide Run Log.

21.5.6 Templates​

A template is a whole workflow graph kept in a library on this computer, shared by every project. Use Save as Template to save the current graph, and Load: <name> (<n> nodes) to replace the graph with a template.

21.5.7 Saving and Undo​

Ctrl+S saves workflow/WORKFLOW.io.workflow. Ctrl+Z undoes and Ctrl+Y redoes.

21.6 The Inspector​

21.6.1 Workflow Settings​

Click the empty canvas to show the Workflow settings.

  • RUN MODE › NEXT RUN decides what the next run does with the existing results: UPDATE (default), REBUILD or RESET. It applies to one run only.
  • AI DEFAULTS sets the Claude model and effort of every AI node.
  • PER-ECU NODES › PARALLEL ECUS sets how many ECUs some nodes handle at the same time.

RESET first deletes design/ (every design document, hand-made ones included) and other folders. The deletion cannot be undone.

21.6.2 Node Settings​

Select a node to show its settings, such as ENABLED, NAME, AI SETTINGS, PARAMETERS (21.7) and LAST RUN (21.9.1).

21.6.3 Settings Shared by Many Nodes​

Several fields appear on many nodes: ADDITIONAL INSTRUCTIONS, INSUFFICIENT INFORMATION, FEASIBILITY CHECK, CONNECT TO VECU and TARGET ECU / TARGET ECUS.

21.6.4 The PRTE vECU Image​

One PRTE vECU image applies to the whole workflow. The list is read from the local docker images, and the default is the newest local image at run time. Nothing is pulled automatically.

21.7 Node Settings Reference​

Each node has its own fields under PARAMETERS. The subsections below say what each node's settings decide.

21.7.1 Input Analysis​

Chooses the sources to analyze (documents, model files, code) and whether to run the Feasibility Check, build the knowledge base and write the operating scenarios.

21.7.2 System Design​

Sets the system name, the communication scope, and what happens to each ECU / HPC node.

21.7.3 Diagnostic Design​

TARGET ECU / HPC names the nodes to design; empty means every ECU and HPC.

21.7.4 SWC Design​

Sets the target ECUs, what happens to existing SW-Cs, the design mode, and whether existing interfaces may change.

21.7.5 BSW Config​

Sets the target ECUs, the Base Set (PRTE or Other Vendor) and how the modules are chosen.

21.7.6 SWC + BSW Integration and Functional Cluster Config​

Both have a target list (TARGET ECU / TARGET HPC).

21.7.7 AA Design​

TARGET COMPOSITION names the composition. The node does not run in this version (21.12).

21.7.8 Design Review​

REVIEWER is AI (default) or HUMAN; HUMAN pauses the run until a person approves or rejects (21.8.3).

21.7.9 AUTOSAR Code Generation​

Sets the target ECUs and how generator findings are fixed.

21.7.10 User Code Implementation​

Sets the platform, the targets, the code scope, the MISRA C:2025 check and how existing code is handled.

21.7.11 Test Code Implementation​

TEST LEVEL is Unit (default) or Integration.

21.7.12 Compile/Build​

Sets warnings as errors, the AI auto fix and the parallel jobs.

21.7.13 Runtime Check​

Sets the run times, the bus, the fix mode and the expected behaviour to check.

21.7.14 Test Execution and Verification Report​

Test Execution has a timeout and an AI failure analysis; Verification Report has an AI summary.

21.7.15 Approval and Condition Branch​

Approval has APPROVAL MESSAGE, the text shown while the run waits. Condition Branch has CONDITION but does not run in this version (21.12).

21.8 Running a Workflow​

21.8.1 Starting a Run​

  1. Click Run Workflow in the toolbar. The document runs as it is shown, unsaved edits included.
  2. To start part way, right-click a node and choose Run from Here. Upstream values come from the newest recorded run.

Only one run per project at a time.

21.8.2 Execution Order​

Nodes whose inputs are ready run in parallel. A node with several inputs waits until all of them arrive. A disabled node passes its inputs through.

21.8.3 Nodes That Wait for You​

A Design Review with REVIEWER HUMAN and an Approval node pause the run.

  1. Select the node. LAST RUN reads Waiting for response….
  2. Type an optional comment in Comment (optional).
  3. Click the check (Approve) or the cross (Reject).

A node that needs information it cannot get from the project asks Waiting for user input: <question>; do what it asks, then press Approve.

21.8.4 Rejected Loops​

When a node reports defects on its Rejected port and that port is wired back to an earlier node, the run runs that node again with the findings, then the nodes after it. If nothing is wired back, the run stops there.

21.8.5 Following a Run​

The run log under the canvas shows one line per step. A run continues in the background when you close the editor tab, and a toast reports when it ends.

21.8.6 Cancelling and Closing​

Cancel Run in the toolbar stops the run and rolls back every file it wrote. Closing the tab or the window during a run behaves differently.

21.8.7 Resuming an Interrupted Run​

If PAIO quit during a run, reopening the editor asks Interrupted Workflow Run. Resume reuses the completed nodes and runs the rest; Discard drops the record.

21.9 Run Results and Where They Go​

21.9.1 Last Run​

Select a node to see LAST RUN: its status, then rows such as the designed elements, the findings and the changed files. It shows the runs of the current session only.

21.9.2 Comparing Before and After​

In LAST RUN, Compare before/after of this run opens a read-only side-by-side comparison of a file before the run and now.

21.9.3 Where the Results Are Written​

The nodes write under workflow/, doc/, design/, export/ and code/. The reports go to doc/report/.

21.9.4 The Run Folder​

Every run is recorded in <project>/.paio/workflow-runs/<runId>/, with the backup used for rollback and the diff. The .paio folder is hidden in the Explorer by default.

21.10 The Knowledge View​

Input Analysis with BUILD KNOWLEDGE (LLM WIKI) builds pages under workflow/knowledge/, and every later node works from them. Click KNOWLEDGE above the canvas to see the knowledge graph, and WORKFLOW to return. Click a page to preview it; on a requirement page you can set how the requirement is verified.

21.11 Connecting the Claude Account (AI Account)​

Workflow AI nodes always use Claude through the Claude Code runtime bundled with PAIO. By default they use this computer's Claude Code login.

  1. Open the user avatar on the right of the top bar › AI Account (3.3).
  2. Check the status line. Not connected means AI nodes cannot run.
  3. Click Connect to sign in through the browser, or Paste Token to paste a token.

21.12 Limits and Nodes That Are Not Implemented​

  • AA Design and Condition Branch can be placed but do not run in this version. Disable them or leave them out.
  • Runtime Check › BUS = REAL BUS and User Code Implementation › PLATFORM = AP are not available yet.
  • Only one run per project at a time.

21.13 Running a Workflow in an SSH Window​

In a window connected over SSH (17. Remote Development), a run works on a copy of the server project on your PC, and each node's files are written to the server when the node finishes.

  • User Code Implementation, Test Code Implementation, Compile/Build, Test Execution and Runtime Check do not run there: they build and run in a vECU.
  • Close Connection during a run asks first; closing cancels the run without rolling back its files.
  • The run records stay on your PC.

You can also build or change the workflow graph from AI chat (15. AI Assistant).