Skip to content

fix(uipath-maestro-case): one entryWhen call per SDD rule row, array means AND - #5013

Open
rockymadden wants to merge 2 commits into
mainfrom
fix/case-entrywhen-or-rows
Open

rockymadden wants to merge 2 commits into
mainfrom
fix/case-entrywhen-or-rows

Conversation

@rockymadden

Copy link
Copy Markdown
Collaborator

What

One paragraph and a two-line example in skills/uipath-maestro-case/SKILL.md, after the minimal shape: an array in one entryWhen/exitWhen/completeWhen call ANDs its rules, each call is another OR condition, so each SDD Entry/Exit Rule row gets its own call and a row's IF expression is that rule's expression.

The studioweb flavor inherits it (the text sits outside every skill-flavor block; the flavor overrides nothing near it).

Why

Live coder evals of #4903 (round 8), Studio Web e2e_expense_runnable: the SDD stage had two entry rows ("case entered", "Manager Approval exited with Return"). The agent wrote .entryWhen([rule('case-entered'), rule('selected-stage-exited', { ..., expression })]). It compiled to one entry condition, AND(CaseEntered, StagesExited and expr). The stage could never be entered, and the case sat at trigger_1 for 580 s. contract_execution "Return for corrections" made the same mistake (two rules ANDed where the SDD row is one rule with an IF expression). The claude-code run wrote separate calls and passed. validate --strict accepts both shapes.

Builder SDK semantics, from typescript/sdk/src/case/case-sdk.ts (ruleGroups): one rule or an array is one AND-group, a nested array is an OR-of-AND grid, each call pushes another condition. The SDK is correct and documented; the skill never said it.

Testing

  • npm run skills:validate, skills:build, skills:check-links: pass. Built default and studioweb trees both contain the paragraph.
  • node --test tests/scripts/studioweb-flavor-contract.test.mjs tests/scripts/compose-skill-flavor.test.mjs: 91 pass.
  • Coder evals (e2e_expense_runnable, contract_execution), studio-web and claude-code harness: see comment.

Not verified

Follow-up

builder-sdk check lint for an AND-group that mixes case-entered with a rule on a later event (cannot fire), next to the rules in check-rule-semantics.ts.

🤖 Generated with Claude Code

rockymadden and others added 2 commits November 19, 2026 13:37
…means AND

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rockymadden
rockymadden requested review from a team, dmetzgar and tmatup as code owners November 19, 2026 20:38
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @rockymadden's task in 53s —— View job


Summary

Adds one paragraph and a two-line example after the minimal shape in skills/uipath-maestro-case/SKILL.md. They say that an array in one entryWhen/exitWhen/completeWhen call ANDs its rules, that each extra call adds an OR condition, and that each SDD Entry/Exit Rule row therefore needs its own call. This fixes the case where an AND of case-entered and a later rule could never fire, so the stage was never entered.

Change-by-Change Review

1. skills/uipath-maestro-case/SKILL.md:104-109: AND/OR semantics paragraph and example

OK, with one Low note.

  • Correct and well placed. The text sits right after the shape that agents copy and before the validation-loop flavor block, outside every skill-flavor marker, so studioweb inherits it unchanged. I checked this against the file: no override touches the area.
  • Fills a real gap. No reference or example in the skill showed the AND-vs-OR meaning of arrays versus separate calls. Every example uses one rule per call, so there's no duplication and no contradiction. references/case-runtime.md:245 ("use a separate expression-gated exit") points the same way.
  • Prose follows the house style. It's prescriptive and tells the agent how to map SDD rows to calls. It also names the failure: [rule('case-entered'), <later rule>] can never fire.
  • The inline // Entry Rule 1/2 comments are worth keeping. They tie each call to an SDD row instead of repeating the code, so they pass the comment-stripping rule in token-optimization.md.
  • Low: 'Manager Approval' is ambiguous (SKILL.md:108). In the minimal shape 10 lines above, Manager Approval is a task (SKILL.md:91). The new snippet passes it to selected-stage-exited as a stage. An agent reading top to bottom could take this as a sign that stage-exit rules take task names. Use a name that is clearly a stage and doesn't clash with the shape, for example stage: 'Approval', or reuse 'Review', which is a stage in the shape.
    Fix this →

What's Missing

  • No regression task (Low/optional). The PR relies on the existing e2e evals (e2e_expense_runnable, contract_execution). A small smoke task would guard this directly: give an SDD stage with two entry rows, then use run_command/file_contains to assert that the plan has two separate entryWhen calls (or two entry conditions after compile). That would catch a regression without needing the 580 s live run. validate --strict accepts both shapes, so nothing else catches it today.
  • Nested-array OR-of-AND grids are left out. That's fine: one call per row is the simpler rule to teach. Just confirm the omission is intentional.

Area Ratings

Area Status Notes
Frontmatter OK Untouched
E2E Tests OK No new capability; evals cited. An optional smoke task is suggested above
Skill Body OK Low: stage/task name ambiguity at line 108
References & Assets OK No links added; no duplication with references/case-runtime.md
Repo Hygiene OK Scoped to one skill; no secrets or paths; flavor markers untouched

Issues for Manual Review

  • Check with the builder-sdk owners that rule('selected-stage-exited', { stage, expression }) is the exact rule id and option name. The skill defers rule signatures to dist/api-members.md, so I couldn't confirm them from this repo.
  • The claim that "case-entered holds only at case start" is runtime semantics. It matches the eval evidence in the PR body, but it's worth confirming with the Maestro runtime owners.

Conclusion

Approve. A small, accurate fix for an expensive mistake that agents actually made. The 'Manager Approval' stage name is the only thing I'd change before merge, and it's optional.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant