Skip to content
Merged
2 changes: 1 addition & 1 deletion skills/uipath-rpa/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ UIA references live in two locations. Always cite by location so the reader know
3. If unchecked boxes remain because a Stop condition was hit, name the exact stop-condition item in the report.
4. If the plan is fully checked off, or execution autonomy is `interactive`, proceed to the report format below.

Then, if the harness provides persistent memory, save validated patterns per [execution-maps-guide.md § Cross-session memory](references/execution-maps-guide.md#cross-session-memory) before reporting.
Then, if the harness provides persistent memory, save the patterns that [execution-maps-guide.md § Cross-session memory](references/execution-maps-guide.md#cross-session-memory) qualifies (a first-try clean gate on card-covered activities qualifies none) — as parallel `Write`s in the same message as the report and the context files, never as their own turns. The output check is a link of the gate chain; the report is one message carrying the context-file writes, the memory writes and the text below; nothing runs after it.

When you finish a task, report to the user:
1. **What was done** — files created, edited, or deleted (list file paths)
Expand Down
6 changes: 3 additions & 3 deletions skills/uipath-rpa/agents/uipath-project-discovery-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
### Step 1: Locate the Project

1. If the user provided an explicit path, use it
2. Try `uip rpa list-instances --format json` to find an open Studio Desktop project
2. Try `uip rpa instances list --output json` to find an open Studio Desktop project
3. Fall back to current working directory
4. Verify `project.json` exists and contains UiPath dependencies before proceeding

Expand Down Expand Up @@ -233,7 +233,7 @@

Check `project.json` dependencies for UILibrary packages:
- **Naming patterns**: packages matching `*.UILibrary`, `*.ObjectRepository`, `*.Descriptors`, or `*.UIAutomation` (non-UiPath packages)
- **Inspection**: Use `uip rpa inspect-package --package-name <PackageName>` to discover apps, screens, and elements

Check warning on line 236 in skills/uipath-rpa/agents/uipath-project-discovery-agent.md

View workflow job for this annotation

GitHub Actions / skills/uipath-rpa

Possibly stale `uip rpa inspect-package` (valid prefix: `rpa`)
- **Using statement pattern**: `using <PackageName>.ObjectRepository;`

**Integration Service Connections**
Expand Down Expand Up @@ -347,8 +347,8 @@

## Quick Reference

- **Run**: `uip rpa run-file --file-path "{{MAIN_FILE}}" --project-dir "{{PROJECT_DIR}}"`
- **Validate**: `uip rpa get-errors --project-dir "{{PROJECT_DIR}}"`
- **Run**: `uip rpa run --file-path "{{MAIN_FILE}}" --project-dir "{{PROJECT_DIR}}" --output json`
- **Validate**: `uip rpa validate --file-path "{{MAIN_FILE}}" --project-dir "{{PROJECT_DIR}}" --output json`
- **Key files to read first**: {{TOP_3_FILES}}
````

Expand Down
20 changes: 10 additions & 10 deletions skills/uipath-rpa/references/execution-maps-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ One dense file, read once per build. Fixes which tool calls go in which assistan

## Gate ≠ runtime proof

A clean `validate` + `build` does NOT prove runtime behavior. Known silent failures pass BOTH: `InvokeCode` `Code` in child/CDATA form no-ops, `WriteTextFile` with explicit `Encoding` emits a BOM, a stripped UIA `N*` `Version` fails only at runtime ([xaml/common-pitfalls.md](xaml/common-pitfalls.md)). When the deliverable has observable outputs (files written, entry-point out-arguments) and runs without external systems or UI, the gate turn ends with ONE `uip rpa run --skip-build` and the report turn checks the actual outputs — see the T4/T5 rows below.
A clean `validate` + `build` does NOT prove runtime behavior. Known silent failures pass BOTH: `InvokeCode` `Code` in child/CDATA form no-ops, `WriteTextFile` with explicit `Encoding` emits a BOM, a stripped UIA `N*` `Version` fails only at runtime ([xaml/common-pitfalls.md](xaml/common-pitfalls.md)). When the deliverable has observable outputs (files written, entry-point out-arguments) and runs without external systems or UI, the gate chain ends with ONE `uip rpa run --skip-build` followed by a `cat` of every output file, and the report turn judges what that chain printed — see the T4/T5 rows below. Neither the run nor the output check is its own turn.

## Sequential gates — never batch across these

Expand All @@ -32,8 +32,8 @@ Skip the project-discovery subagent — nothing to discover yet ([environment-se
| **T1 — Scaffold + context** | ONE `Bash` chain: `uip rpa init --name "<NAME>" --location "<PARENT_DIR>" --template-id BlankTemplate --expression-language <VisualBasic\|CSharp> --target-framework <Windows\|Portable> --output json` (Rule 2a — both flags explicit) `&&` `uip rpa analyzer-rules list --project-dir "<PROJECT_DIR>" --output json` `&&` one `uip rpa packages versions --package-id <PackageId> --include-prerelease --project-dir "<PROJECT_DIR>" --output json` per request-known package ∥ parallel `Read` — ALL THREE, never a subset (skipping the pattern card re-opens per-activity discovery): [common-activity-card.md](common-activity-card.md), [common-pattern-card.md](common-pattern-card.md), [xaml/xaml-basics-and-rules.md](xaml/xaml-basics-and-rules.md) (Rule 22 — plain full Read, nothing to look up first) ∥ `Grep` `^## ` on [xaml/common-pitfalls.md](xaml/common-pitfalls.md) for its heading list (Rule 22 gate, step 1 — needs no prior output, so it rides here) ∥ memory recall (harness has memory) ∥ Rule 21 `activities find` fan-out for off-card activities |
| **T2 — Vet** | `Read` every [xaml/common-pitfalls.md](xaml/common-pitfalls.md) section whose T1 heading matches an activity, property, or feature of the planned workflow — all in parallel; unsure → read it (Rule 22 gate, step 2) ∥ `Read` `project.json` (anchors for the T3/T4 edits; skip re-reading scaffolded `Main.xaml` — the `Write` replaces it) ∥ per-entry `Read`s from [xaml/xaml-editing-catalog.md](xaml/xaml-editing-catalog.md) when the workflow needs an editing operation beyond the cards (arguments, imports, resource types) ∥ Rule 21 doc `Read`s + `get-default-xaml` for off-card activities. This is the only turn the pitfalls gate costs: the heading list already arrived in T1, so no grep→Read pair is paid per file. |
| **T3 — Author + install** | Design fork FIRST for row-processing tasks: complex bulk row processing (per-row parse + validate + branch + accumulate) escalates to code per [data-manipulation-guide.md § Code vs activity chains](data-manipulation-guide.md) — the pattern card's `ForEach` shapes cover only the simple one-`If`/`Switch` case. Then: one `Write` per workflow file — complete, all activities (Rule 18) ∥ `Edit` `project.json` (`fileInfoCollection` for test cases, Rule 10; `dependencies` stays CLI-owned via `packages install`) ∥ ONE `Bash`: `uip rpa packages install` for all needed packages at the T1-chosen versions — flag shape per [cli-reference.md § packages install](cli-reference.md#packages-install); it drifts across CLI builds, so on `Invalid packages input` re-check `uip rpa packages install --help` |
| **T4 — Gate** | ONE `Bash`: `uip rpa validate --file-path "<RELATIVE_FILE>" --project-dir "<PROJECT_DIR>" --output json` per file `&&` `uip rpa build "<PROJECT_DIR>" --output json` `&&` — when outputs are observable and no external system/UI is needed — `uip rpa run --skip-build` on the entry point (§ Gate ≠ runtime proof). `--file-path` RELATIVE to project dir — absolute paths falsely fail (separator bug, [cli-reference.md § validate](cli-reference.md#validate)) |
| **T5 — Report** | Check the T4 run's actual outputs against the request (files, out-arguments) BEFORE reporting — wrong/empty output with a clean gate is a silent-failure signature (§ Failure exits) + § Completion Output + write `project-context.md`/`AGENTS.md` + memory save ([§ Cross-session memory](#cross-session-memory)) |
| **T4 — Gate** | ONE `Bash`: `uip rpa validate --file-path "<RELATIVE_FILE>" --project-dir "<PROJECT_DIR>" --output json` per file `&&` `uip rpa build "<PROJECT_DIR>" --output json` `&&` — when outputs are observable and no external system/UI is needed — `uip rpa run --file-path "<RELATIVE_FILE>" --project-dir "<PROJECT_DIR>" --skip-build --output json` on the entry point (`--file-path` is required) `&&` `cat` of every file the workflow was asked to write (§ Gate ≠ runtime proof). The output check is a link of this chain, never its own turn. `--file-path` RELATIVE to project dir — absolute paths falsely fail (separator bug, [cli-reference.md § validate](cli-reference.md#validate)) |
| **T5 — Report** | ONE message, no shell calls. Judge the T4 chain's verdict fields and its `cat` output against the request — wrong/empty output with a clean gate is a silent-failure signature (§ Failure exits) — then emit in this same message, as parallel tool calls: `Write` `.claude/rules/project-context.md` ∥ `Write` `AGENTS.md` (paths, metadata line and markers per [environment-setup.md § Project Context Discovery](environment-setup.md) step 3: first line `<!-- discovery-metadata: cs=N xaml=N deps=N -->`; `AGENTS.md` carries the same block between `<!-- PROJECT-CONTEXT:START -->` / `<!-- PROJECT-CONTEXT:END -->`; no `Read`/`Grep` precedes these writes) ∥ every memory `Write` that [§ Cross-session memory](#cross-session-memory) qualifies (a first-try clean gate on card-covered activities qualifies none) ∥ the § Completion Output text. Nothing runs after the report |

- **T1 is ONE message — `init` plus every read.** Both cards and [xaml/xaml-basics-and-rules.md](xaml/xaml-basics-and-rules.md) are plain full `Read`s with nothing to look up first, so they all ride in T1 alongside the [xaml/common-pitfalls.md](xaml/common-pitfalls.md) heading `Grep`; only that `Grep`'s section `Read`s wait for T2. `init` reads none of them, so it never waits on a read, and the pitfalls gate is paid before authoring — never after it. Open no other reference before T3, `environment-setup.md` included.
- First chain call pays the cold Helm restore (30–90 s) — the chain hides it behind one turn; do not split to "check progress".
Expand All @@ -49,8 +49,8 @@ Skip the project-discovery subagent — nothing to discover yet ([environment-se
| **T1 — Context** | SKILL.md § Precondition context check — the skip gate first, then the discovery subagent, which writes `project-context.md` + `AGENTS.md` itself ([environment-setup.md § Project Context Discovery](environment-setup.md)) ∥ `Read` `project.json` + target `.xaml` + cards + [xaml/xaml-basics-and-rules.md](xaml/xaml-basics-and-rules.md) (Rule 22, plain full Read) ∥ `Grep` `^## ` on [xaml/common-pitfalls.md](xaml/common-pitfalls.md) for its heading list ∥ ONE `Bash`: `analyzer-rules list --project-dir "<PROJECT_DIR>" --output json` ∥ memory recall ∥ off-card `activities find` fan-out |
| **T2 — Vet** | `Read` the [xaml/common-pitfalls.md](xaml/common-pitfalls.md) sections matching the planned edit (Rule 22 gate) ∥ per-entry [xaml/xaml-editing-catalog.md](xaml/xaml-editing-catalog.md) `Read`s for the editing operations involved ∥ off-card Rule 21 doc `Read`s |
| **T3 — Edit** | Batched `Edit`s (anchor each on its own target block — same-file Edits serialize; overlapping anchors fail) ∥ `packages install` `Bash` if new dependencies |
| **T4 — Gate** | ONE `Bash`: per-file `validate` (relative `--file-path`) `&&` `build` `&&` optional `run --skip-build` per § Gate ≠ runtime proof |
| **T5 — Report** | Output check (if T4 ran) + § Completion Output + memory save |
| **T4 — Gate** | ONE `Bash`: per-file `validate` (relative `--file-path`) `&&` `build` `&&` optional `run --file-path "<RELATIVE_FILE>" --skip-build` `&&` `cat` of every output file, per § Gate ≠ runtime proof |
| **T5 — Report** | ONE message, no shell calls: judge the T4 verdict and `cat` output + § Completion Output + qualifying memory `Write`s as parallel calls. Context files were written by the discovery agent in T1 — do not read, edit, or rewrite them after the gate (the next session judges staleness by file and dependency counts, [environment-setup.md § Project Context Discovery](environment-setup.md)); if the skip gate tripped instead, write both here exactly as the greenfield T5 does |

## Journey: Greenfield coded

Expand All @@ -60,8 +60,8 @@ Skip the project-discovery subagent — nothing to discover yet ([environment-se
|---|---|
| **T1 — Scaffold + context** | ONE `Bash` chain: `init` (flags as XAML journey) `&&` `analyzer-rules list` `&&` `packages versions` per known package ∥ `Read` [assets/codedworkflow-template.md](../assets/codedworkflow-template.md) + [coded/operations-guide.md § Coding Guidelines](coded/operations-guide.md#coding-guidelines) ∥ memory recall |
| **T2 — Author + install** | `Write` each `.cs` (Rules 13–19) ∥ `Read` `project.json` ∥ `Edit` `project.json` (`entryPoints` Rule 15, `fileInfoCollection` Rule 10) ∥ `packages install` `Bash` ∥ `Read` `.local/docs/packages/<PackageId>/coded/coded-api.md` for installed services |
| **T3 — Gate** | ONE `Bash`: per-file `validate` (relative `--file-path`) `&&` `build` `&&` optional `run --skip-build` per § Gate ≠ runtime proof |
| **T4 — Report** | Output check (if T3 ran) + § Completion Output + memory save |
| **T3 — Gate** | ONE `Bash`: per-file `validate` (relative `--file-path`) `&&` `build` `&&` optional `run --file-path "<RELATIVE_FILE>" --skip-build` `&&` `cat` of every output file, per § Gate ≠ runtime proof |
| **T4 — Report** | ONE message, no shell calls — same shape as the greenfield XAML T5: judge the T3 verdict and `cat` output, then `Write` both context files ∥ qualifying memory `Write`s ∥ § Completion Output, all in this message |

## Journey: Brownfield coded edit

Expand All @@ -77,7 +77,7 @@ Budget shape: **~3 fixed turns + ~3 turns per capture-screen + 2-turn debug cycl
| **Per capture-screen** | (a) capture bundle — run the `uia-configure-target` flow for ALL of this screen's checklist elements in one pass, through OR registration; (b) ONE state advance via the interact CLI — only to reach the next screen, never to test behavior |
| **T-author — after ALL screens captured** | Scaffold/authoring prerequisites (Capture-First Fast Path order) ∥ batch-author every screen's activities in one pass (Rule 18), embed path for OR target attachment |
| **T-gate** | ONE `Bash`: per-file `validate` (relative `--file-path`) `&&` `build` |
| **Debug cycle (consent-gated, [uia-starter-guide.md § Running UI Automation Workflows](uia-starter-guide.md))** | ONE `Bash` chain: window baseline `&&` `debug start` `&&` `execution cancel` `&&` re-list windows; next turn: diff, close stray windows via the interact CLI, report |
| **Debug cycle (consent-gated, [uia-starter-guide.md § Running UI Automation Workflows](uia-starter-guide.md))** | ONE `Bash` chain: window baseline `&&` `debug start` `&&` `execution cancel` `&&` re-list windows; next turn: diff, close stray windows via the interact CLI (one `Bash`), and in that same message the report — context files, qualifying memory `Write`s and § Completion Output as parallel calls, as in the greenfield T5. The verdict is read from the chain's `debug start` envelope; never redirect it to a file and parse it in extra turns |

- Default is author-once-after-capture — all OR refs are already in conversation. Fall back to per-screen authoring interleave only on long captures (5+ screens) where context pressure is real; the `validate`/`build` gate still runs ONCE at the end either way.
- Screens after the first (same window): carry the OR screen reference from the previous capture into the next `uia-configure-target` invocation — it skips the OR screen lookup. Invocation shape and argument: the package's `uia-configure-target` invocation guide (routed from the package guide § Documentation).
Expand All @@ -102,12 +102,12 @@ Harness-conditional: engage only when the harness provides persistent memory; ot

**Recall — T1 of every journey.** Match saved entries by activity class + package `major.minor`. Hit ⇒ that activity skips the Rule 21 triple. `validate`/`build` still gate.

**Save — after project `build` is clean (the report turn).** Save only:
**Save — after project `build` is clean (the report turn).** Emit every qualifying save as a parallel `Write` inside the report message — never one memory file per turn, never a separate turn for the memory index. **A first-try clean gate on card-covered activities qualifies nothing — skip the save entirely.** Save only:

1. Validated XAML snippet per off-card activity — key: activity class + package `major.minor` + date.
2. Error→root-cause→fix triples that cost >1 validate attempt.
3. Cross-version package gotchas.

**Never save:** project-specific facts (paths, asset names, connections — belong in `project-context.md`), UIA selectors/targets/OR references (per-app), UIA CLI syntax (package-owned, co-versioned), secrets. Process-level UIA lessons (e.g., a failure mode and its fix direction) MAY be saved.
**Never save:** project-specific facts (paths, asset names, connections — belong in `project-context.md`), UIA selectors/targets/OR references (per-app), UIA CLI syntax (package-owned, co-versioned), `uip rpa` flag shapes and run/debug payload fields ([cli-reference.md](cli-reference.md) owns them — a gap there is a `/uipath-feedback` report, not a memory), secrets. Process-level UIA lessons (e.g., a failure mode and its fix direction) MAY be saved.

**Expiry:** recalled snippet fails validation → delete/overwrite that entry, fall back to Rule 21 triple.
Loading