Skip to content

Commit 35bf44c

Browse files
github-actions[bot]RaduAna-Mariaclaude
authored
fix(uipath-planner): keep requested case drafts on the template; one SLA trigger per entry row (#4924) (#4931)
* fix(uipath-planner): keep requested case drafts on the template; one SLA trigger per entry row Codex runs (2026-11-16, 2026-11-18) failed five planner tasks: - A requested `sdd.draft.md` ("keep it compact, don't polish") was written as a free-form summary with stages in one table, so stage blocks and the >$5M gate condition were missing. sdd-writing-guide Step 0 now says a draft sets depth, not shape. - "ONE sla-status-change entry" read as "merge them": five phase SLAs were OR-joined into one WHEN cell. case-product-guide and case-data-and-time-guide now say one entry row per SLA. - A legacy `Tasks file` handoff row made the agent write `*-tasks.md` beside the genome. genome-from-sdd-guide now says to ignore it. Graders: - finalize_from_draft_loan Rule 13 matched `rm sdd.md.orig sdd.md.rej` (patch leftovers); the operand must now end at `.md`. - check_procurement_sla_interrupts counted only the first sla-status-change per line; it now counts every call and names an OR-joined WHEN cell instead of reporting the other phases as unrouted. * test(uipath-planner): drop the legacy Tasks file row from planner SDD fixtures The planner stopped writing the `Tasks file` handoff row in #4330, so the only remaining source of a `*-tasks.md` reference was the test inputs. Remove the row from the sdd_build_routing, genome_from_sdd and genome_from_solution_sdd_case_child fixtures instead of teaching the skill to ignore it, and re-pin the case child SDD hash. * fix(uipath-planner): make the draft-keeps-template rule product-neutral Any effort-limiting SDD request (draft, first pass, compact, outline) keeps every template block; Case Management is no longer singled out. --------- Co-authored-by: RaduAna-Maria <80031810+RaduAna-Maria@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 1b48836 commit 35bf44c

13 files changed

Lines changed: 44 additions & 17 deletions

File tree

‎skills/uipath-planner/references/design/case-data-and-time-guide.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ ONE checklist. Settle every item before the Phase 2 Step 5 review and re-walk it
234234

235235
**Blocking — the design is unbuildable or unreviewable until fixed:**
236236

237-
1. **Other-path trigger source** — every modeled path's entry shape matches its trigger source ([case-product-guide.md](case-product-guide.md) § Secondary-lane entry shapes); interrupting flags set on the stage AND on every entry row; terminal `exit-only` vs returning `return-to-origin` chosen; a warning-only escalation stays a notification; an SLA response needing case work carries ONE `sla-status-change` entry with declared target + titles; never duplicate a global-event entry or exit across primary stages.
237+
1. **Other-path trigger source** — every modeled path's entry shape matches its trigger source ([case-product-guide.md](case-product-guide.md) § Secondary-lane entry shapes); interrupting flags set on the stage AND on every entry row; terminal `exit-only` vs returning `return-to-origin` chosen; a warning-only escalation stays a notification; an SLA response needing case work carries ONE `sla-status-change` entry row per SLA, with declared target + titles — one trigger per WHEN cell, never `OR`-joined; never duplicate a global-event entry or exit across primary stages.
238238
2. **Reachability walk** — every stage reachable from a trigger or SLA source: walk entries forward, and walk every conditional entry's FALSE branch too. A stage that does not enter never completes, so a downstream stage keying solely off its completion is unreachable on that branch — when a rule SKIPS a stage and the case continues, the bypass is an explicit extra entry row on the downstream stage (its own condition, negated); when the rule ENDS the case, that branch needs a terminal lane. Never write that a skipped stage "auto-completes" or "counts as complete" — that is an assertion, not a route, and the path stays dead. Every primary stage's completion consumed downstream, referenced by another entry, or feeding a lane; ≥ 1 primary stage `Required: Yes`; `adhoc` never a stage entry. Decision-reachable lanes and duplicate-entry ambiguity per § Secondary-lane entry shapes.
239239
3. **Entry producer** — every non-start entry names its concrete producer (source stage/task, connector event, paired `wait-for-user` exit, declared SLA reference); at-risk rows name the escalation, breach rows the SLA alone.
240240
4. **Decision-routing closure** — every decision outcome routes somewhere: no dead-end status values; an outcome targeting a lane keys that lane's entry; every routing button's variable+value is consumed downstream or a declared terminal; a fully-orphaned decision variable on a decision task is blocking.

‎skills/uipath-planner/references/design/case-product-guide.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Entry shape follows the lane's trigger source:
191191
|---|---|
192192
| A person launches it | `user-selected-stage`, paired with an upstream `wait-for-user` exit |
193193
| External / global event | ONE `wait-for-connector` entry on the destination lane — never duplicated per origin stage |
194-
| SLA response | ONE `sla-status-change` entry ([Layer 4](case-data-and-time-guide.md#layer-4--time-slas--escalations)) |
194+
| SLA response | ONE `sla-status-change` entry row per SLA the lane answers ([Layer 4](case-data-and-time-guide.md#layer-4--time-slas--escalations)) — five phase SLAs into one lane are five rows on that lane, never one WHEN cell joined with `OR` |
195195
| Decision / signal divert | The origin stage carries a gated diverting exit — `Marks Stage Complete: No`, WHEN `selected-tasks-completed("<decider task>")`, `IF` on the signal, exit target → the lane — and the origin's completion exit carries the exact inverse `IF`. The lane enters via `selected-stage-exited("<origin>")` + the same `IF`. |
196196

197197
Omitting the diverting exit makes a decision path dual-fire (ungated completion → the next stage AND the lane both enter) or deadlock (gated completion with no alternative exit). Only a `selected-stage-exited` lane entry needs a diverting exit; a `selected-stage-completed("<origin>")` + `IF` lane keys off the origin's normal completion — guard only.

‎skills/uipath-planner/references/design/sdd-writing-guide.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Phase 3 of `design` writes the full SDD to disk incrementally, resolves the SME
2121

2222
**Write the file to disk now, before generating any Phase 3 section.** This is an action, not advice: Step 1 does not begin until a file write has created the SDD file (Step 2 item 7 resolves the path and the Solution-scope file set). Do NOT hold the entire SDD in context and write only at the very end.
2323

24+
**A lighter request keeps the template's shape.** A request that limits effort — a draft (`*.draft.md`), a first pass, "a version to review", "keep it compact", "just the outline", "don't polish or validate it yet" — sets how much detail each block carries, never which blocks exist. Write every heading, table and per-item block the product template defines, one block per item it inventories (each project, step, stage, task, gateway, integration), and every trigger, entry, exit and business rule as the executable condition the template asks for; missing detail is shorter prose or an `[SME REVIEW]` marker inside its block. Never merge per-item blocks into one summary table, drop a section because it is thin (one with nothing to record says so), or leave a rule only in prose: every later step — finalize, the template check, the genome — adds detail to the structure the SDD already has and cannot rebuild a structure it never had.
25+
2426
**First, run the collision check — the skeleton write is the write that can clobber.** Before writing anything, apply the re-run handling in Step 2 item 6: if a target file already exists, resolve it with that structured question (keep / regenerate / resume / write as `-v2-`) and honour the answer here. "Keep the existing SDD and stop" ends `design` with no write at all; "Resume generation" patches the existing draft instead of overwriting it. Only "Regenerate" and the no-file-exists case write a fresh skeleton. Item 6 then has nothing left to ask. A caller's `existing-output: replace` is the answer "Regenerate": ask nothing ([caller-request-guide.md](caller-request-guide.md)).
2527

2628
The skeleton write contains, in this order:

‎tests/tasks/uipath-planner/case/case_finalize_draft_loan/finalize_from_draft_loan.yaml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@ success_criteria:
152152
tool_name: "Bash"
153153
# mv/rm must be a standalone command word with the SDD as one of its own
154154
# operands: a bare `rm\b` matched "platform" and `[^\n]*` spans the whole
155-
# JSON-serialized command, so prose in a heredoc tripped it.
156-
command_pattern: '(^|[\s;&|("''`]|\\n)(mv|rm)[ \t]+([^\s;&|\\]+[ \t]+)*[^\s;&|\\]*sdd(\.draft)?\.md'
155+
# JSON-serialized command, so prose in a heredoc tripped it. The operand
156+
# must END at `.md`: `rm sdd.md.orig sdd.md.rej` (patch leftovers) is not
157+
# a delete of the SDD.
158+
command_pattern: '(^|[\s;&|("''`]|\\n)(mv|rm)[ \t]+([^\s;&|\\]+[ \t]+)*[^\s;&|\\]*sdd(\.draft)?\.md($|[\s;&|)"''`]|\\)'
157159
weight: 1.0
158160
pass_threshold: 1.0
159161

‎tests/tasks/uipath-planner/case/design_delegation_procurement/check_procurement_sla_interrupts.py‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,17 @@ def sla_references(sdd: str) -> list[tuple[int, list[str]]]:
150150
"""(line number, quoted args) for every sla-status-change(...) in the SDD."""
151151
references = []
152152
for line_no, line in enumerate(sdd.splitlines(), 1):
153-
call = re.search(r"sla-status-change\s*\(([^)]*)\)", line, re.IGNORECASE)
154-
if call:
153+
# One trigger per WHEN cell (case SDD template): an OR-joined cell is
154+
# not an entry rule the build can emit, so name it instead of letting
155+
# only its first call count and reporting the rest as unrouted.
156+
if line.lstrip().startswith("|"):
157+
for cell in line.split("|"):
158+
if re.search(r"sla-status-change\s*\([^)]*\)\s+OR\s+sla-status-change", cell):
159+
fail(
160+
f"sdd.md:{line_no}: one WHEN cell OR-joins several "
161+
"sla-status-change triggers; write one entry row per SLA"
162+
)
163+
for call in re.finditer(r"sla-status-change\s*\(([^)]*)\)", line, re.IGNORECASE):
155164
args = re.findall(r"[\"']([^\"']+)[\"']", call.group(1))
156165
# Zero quoted args means summary-table / prose shorthand, not an
157166
# executable reference; real rule coverage is enforced per stage +

‎tests/tasks/uipath-planner/case/design_delegation_procurement/test_check_procurement_sla_interrupts.py‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,27 @@ def test_sla_references_skip_prose_shorthand_without_quoted_args():
7272
assert references == [(4, ["Intake", "Intake SLA"])]
7373

7474

75+
def test_sla_references_count_every_call_on_a_line():
76+
"""A rollup row naming two SLAs yields both, not only the first."""
77+
sdd = '| S2 | sla-status-change("Intake","Intake SLA"), sla-status-change("Close","Close SLA") |\n'
78+
79+
assert sla_references(sdd) == [
80+
(1, ["Intake", "Intake SLA"]),
81+
(1, ["Close", "Close SLA"]),
82+
]
83+
84+
85+
def test_sla_references_reject_or_joined_when_cell():
86+
"""One trigger per WHEN cell: an OR-joined cell is named, not half-counted."""
87+
sdd = (
88+
'| sla-status-change("Intake","Intake SLA") OR '
89+
'sla-status-change("Close","Close SLA") | — | Yes | Any phase breach |\n'
90+
)
91+
92+
with pytest.raises(SystemExit, match="OR-joins several sla-status-change"):
93+
sla_references(sdd)
94+
95+
7596
def test_stage_heading_variants_are_recognized():
7697
sdd = """
7798
### Primary Stage 1: Intake

‎tests/tasks/uipath-planner/genome_from_sdd/fixtures/customer-address-sync-sdd.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
| **Delivery model** | cloud |
1818
| **SDD scope** | single-product |
1919
| **Project list section** | §10 + §11 |
20-
| **Tasks file** | `customer-address-sync-tasks.md` |
2120
| **Generated by** | uipath-planner |
2221
| **Generation date** | <GENERATION_DATE> |
2322
| **Template validation** | passed |

‎tests/tasks/uipath-planner/genome_from_solution_sdd_case_child/fixtures/supplier-onboarding-case-sdd.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
| **Project SDD role** | child |
2828
| **Independently executable** | no — built only through the Solution root |
2929
| **Project list section** | §2: Stages & Tasks + §4: Integrations |
30-
| **Tasks file** | `supplier-onboarding-tasks.md` (written by `plan`) |
3130
| **Generated by** | uipath-planner |
3231
| **Generation date** | <GENERATION_DATE> |
3332
| **Template validation** | passed |

‎tests/tasks/uipath-planner/genome_from_solution_sdd_case_child/fixtures/supplier-onboarding-solution-sdd.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
| **Solution ID** | supplier-onboarding |
2121
| **Project SDD role** | root |
2222
| **Project list section** | Project Inventory |
23-
| **Tasks file** | `supplier-onboarding-tasks.md` |
2423
| **Generated by** | uipath-planner |
2524
| **Generation date** | <GENERATION_DATE> |
2625
| **Template validation** | passed |

‎tests/tasks/uipath-planner/genome_from_solution_sdd_case_child/fixtures/supplier-vendor-creation-sdd.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
| **Project SDD role** | child |
2222
| **Independently executable** | no |
2323
| **Project list section** | §11 |
24-
| **Tasks file** | `supplier-onboarding-tasks.md` |
2524
| **Generated by** | uipath-planner |
2625
| **Generation date** | <GENERATION_DATE> |
2726
| **Template validation** | passed |

0 commit comments

Comments
 (0)