Pipeline Architecture - cprima-forks/uipath-ai-skills GitHub Wiki

Pipeline Architecture

The skill generates UiPath Studio projects through four sequential layers. Each layer has a single responsibility and a defined handoff point.

The Four Layers

1. JSON Spec → generate_workflow.py

The agent writes a JSON spec describing the workflow — its class name, arguments, variables, and an ordered list of activities. Each activity has a gen key (the generator name) and an args dict.

This is the entry point for the LLM. JSON is used as the intermediate format deliberately: LLMs produce reliable JSON but produce unreliable XAML. The spec describes what the workflow should do; the generator handles the how.

python3 scripts/generate_workflow.py spec.json Workflows/MyApp/MyApp_Login.xaml --project-dir <project>

2. Deterministic Generators → XAML

generate_workflow.py dispatches each activity spec to a Python generator function. Generators are deterministic: the same spec always produces identical XAML. They encode the exact attribute names, enum values, child element structure, and namespace prefixes required by Studio 24.10.

The 94 generator functions live in scripts/generate_activities/. The central dispatch table is _REGISTRY in generate_workflow.py. See Generator Dispatch for how dispatch works.

3. Lint Validation → validate_xaml

The generated XAML is passed through 71 lint rules in scripts/validate_xaml/. Rules are organised into modules targeting specific failure categories:

Module Targets
lints_hallucinations.py Non-existent properties, invalid enum values, placeholder paths
lints_activities.py Activity-specific property correctness
lints_ui.py Selector hierarchy, NApplicationCard scope rules
lints_framework.py REFramework architectural rules
lints_project.py Cross-file checks, missing Object Repository

Lint errors feed back to the generator — the agent corrects the spec and regenerates before proceeding.

python3 scripts/validate_xaml <project> --lint
python3 scripts/validate_xaml <project> --lint --fix   # auto-fix common issues

4. Framework Wiring

After XAML files are generated and pass lint, three scripts complete the project:

  • modify_framework.py — inserts InvokeWorkflowFile calls into framework files, injects variables, replaces scaffold markers, chains UiElement arguments
  • generate_object_repository.py — builds the .objects/ directory tree from selectors.json, producing Reference and ContentHash attributes that link activities to the Object Repository
  • resolve_nuget.py — resolves live package versions from the UiPath NuGet feed

Why Each Layer Exists

Layer Failure mode it prevents
JSON spec LLM writing XAML directly — wrong namespaces, hallucinated activity names, broken selectors
Lint Generator output that passes XML syntax but violates UiPath runtime rules
Framework wiring Structurally valid XAML that isn't connected into a runnable project

Layer Boundaries

The layers are independent scripts, not a single pipeline function. The agent orchestrates them in sequence, inspecting lint output between generator and wiring steps. This means each layer can be run independently for debugging or partial regeneration.

⚠️ **GitHub.com Fallback** ⚠️