fix(api-workflow): align skill with the CLI's actual project surface (init/build/pack)#1744
Conversation
…(init/build/pack) The skill steered agents to hand-assemble API workflow projects as `project.json` + `workflows/WF_*.json` and explicitly listed `uip api-workflow init` under "Commands That Do NOT Exist". That shape runs, validates, packs, publishes, and deploys — but Studio Web's import rejects it (`invalid_project_folder`) because it has no `.uiproj`. This was the Woolworths private-preview RCA root cause. `uip api-workflow init` (shipped uip 1.x, well before that build) scaffolds the correct Studio Web editable shape — `project.uiproj`, `Workflow.json`, `entry-points.json`, `bindings_v2.json` — and auto-registers the project in the solution `.uipx` with a fresh Id. Had the skill used it, the defect could not have occurred. Changes: - Rewrite rules 19/19a/19b to lead with `uip api-workflow init`; keep the Studio Web contract as the spec it satisfies and the verify gate as drift defense for legacy/converted projects. - Document `init`, `build`, and project-level `pack` in cli-reference (all three existed but were undocumented or claimed nonexistent). - Fix `uip solution new` -> `uip solution init` everywhere (the `new` verb was retired and now errors `unknown command 'new'`). - Correct troubleshooting: `uip api-workflow validate` exists; add the "runs/deploys but doesn't open in Studio Web" entry and safe remediation (re-scaffold via init, or in-place convert preserving the project Id — never `project remove`+`add`, which mints a new Id). - Add `scripts/verify-studio-web-shape.mjs` pre-pack gate + reference templates. - Fix package_solution.yaml description (build is project-scoped, not absent). Verified end-to-end against a local build of the CLI (1.198.0): 11/11 assertions pass (init -> register -> validate -> gate -> solution pack -> api-workflow build/pack; gate fails on the project.json shape; --skip-solution-registration standalone). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @rares-baesu-uipath's task in 2m 26s —— View job Coder-eval task lint (advisory)1 task YAML changed; verdicts: 0 Critical, 0 High, 0 Medium, 1 Low, 0 OK. Rubric: .claude/commands/lint-task.md. This check is advisory and never blocks merge. Evidence of passing run❌ High — PR body does not claim the changed coder-eval task (
Per-task lint
|
|
Claude finished @rares-baesu-uipath's task in 3m 15s —— View job PR Review: fix(api-workflow) — align skill with CLI's actual project surface
SummaryRewrites the Change-by-Change Review1.
|
| Area | Status | Notes |
|---|---|---|
| Frontmatter | OK | name matches folder, description unchanged, under 1024 chars |
| E2E Tests | Issue | Existing test updated correctly; no new task for the init command (Medium) |
| Skill Body | Issue | Duplicate anti-pattern bullets (Medium); rule 19a is long but justified |
| References & Assets | OK | New templates correct, CLI reference thorough, troubleshooting entry solid |
| Repo Hygiene | OK | CODEOWNERS covers paths, no secrets, no cross-skill deps, scoped changes |
Issues for Manual Review
- CLI command accuracy: The
init,build, andpackcommands are documented with specific output codes (ApiWorkflowInit,ApiWorkflowBuild,ApiWorkflowPack) and flag behavior. The PR author verified these against CLI v1.198.0 — worth confirming these match the shipping CLI surface exactly. entry-points.jsonfilePathconvention: The skill mandates"content/Workflow.json"(withcontent/prefix). Verify this is whatinitactually writes — thecontent/prefix is non-obvious since the file sits at the project root, not in acontent/subdirectory.
Conclusion
Strong, well-motivated fix that corrects a real production defect (runtime success hiding a wrong project shape). The documentation is thorough and internally consistent. Two actionable items before merge:
- Remove duplicate anti-pattern bullets in
SKILL.md:298-300(lines 299–300 are near-duplicates of 296 and 298). Quick fix. - Consider adding an
init-focused test task — the whole PR exists because the agent wasn't usinginit; a test that checkscommand_executedforuip api-workflow initwould close the loop. Can be a follow-up.
Overall: approve with nits — the duplicates in anti-patterns are the only thing worth fixing before merge.
…nges - SKILL.md: remove two duplicate anti-pattern bullets (Medium review finding) — they restated the kept project.json-shape and "runtime success isn't Studio Web proof" warnings verbatim. - troubleshooting.md: use the canonical `"$SKILL/scripts/..."` path for the verify gate (was a bare `scripts/...` relative path that only resolved from the skill folder). - verify-studio-web-shape.mjs: wrap readJson() so malformed JSON exits 1 with an actionable FAIL message instead of an unhandled stack trace. Verified: ran coder-eval task skill-api-workflow-package-solution locally (experiments/default.yaml) — passed, 3/3 criteria, score 1.000. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the secondary pre-pack tooling and de-duplicate prose, keeping the actual fix (lead with `uip api-workflow init`; document that init/build/ pack/validate exist; `solution new`->`solution init`; the Studio Web .uiproj contract). - Remove scripts/verify-studio-web-shape.mjs and its 4 wiring points (rule 19b, Quick Start/End-to-End gate steps, $SKILL plumbing). `init` already makes the wrong shape unproducible; the gate was belt-and- suspenders drift defense better suited to a follow-up. - Remove the project-uiproj / entry-points conversion templates; the field rules live in workflow-file-format.md's contract table. - Collapse the repeated "runtime success hides the wrong shape" explanation to one canonical spot (workflow-file-format.md); rule 19a and the references now point at it instead of restating it. Re-ran coder-eval task skill-api-workflow-package-solution against the slimmed skill — passed, 3/3 criteria, score 1.000. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…uip solution init` PR UiPath/cli#1941 renamed `solution new` -> `solution init` (response Code SolutionNew -> SolutionInit) with no backward-compat alias, so the old verb now errors `unknown command`. Update the remaining reference that still documented it: - uipath-solution/references/pack-and-deploy.md: authoring prose The uipath-api-workflow references (SKILL.md, cli-reference.md, troubleshooting.md) this commit originally also fixed were resolved upstream by #1744, which realigned the whole api-workflow CLI surface to init/build/pack and applied the same `solution new` -> `solution init` rename. On rebase those edits are dropped in favor of the more comprehensive upstream version (which also corrects the `solution init` output shape to `Status: "Created successfully"`). Left intentionally: the cross-CLI-version dual-support probes (uipath-agents, uipath-human-in-the-loop, uipath-maestro-flow), the uipath-solution rename table, and the `solution new: unknown command` diagnosis trigger. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…te`→`run`, `solution new`→`init` (UV-15159) (#1769) * docs(integration-service): replace obsolete `is resources execute` with `is resources run` (UV-15159) The `is resources execute` command group was renamed to `is resources run` (uip 1.1.0); the documented `execute` form now errors `unknown command execute`. Update all stale references to the current `run` form so the agent follows working commands. - Fix command invocations + `execute list` shorthand: 15 occurrences across 8 files (Integration Service, API Workflow, and Maestro Case skill docs). - Also correct arg order in the api-workflow docs to the canonical `run <verb> <connector-key> <object-name>` (the old text had connector-key first). - Left intentionally untouched: the cli-renames rule entry (records this rename) and the outlook_trigger_inbox test (dual-supports both legacy `execute` and renamed `run`). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(uipath-solution): update stale `uip solution new` reference to `uip solution init` PR UiPath/cli#1941 renamed `solution new` -> `solution init` (response Code SolutionNew -> SolutionInit) with no backward-compat alias, so the old verb now errors `unknown command`. Update the remaining reference that still documented it: - uipath-solution/references/pack-and-deploy.md: authoring prose The uipath-api-workflow references (SKILL.md, cli-reference.md, troubleshooting.md) this commit originally also fixed were resolved upstream by #1744, which realigned the whole api-workflow CLI surface to init/build/pack and applied the same `solution new` -> `solution init` rename. On rebase those edits are dropped in favor of the more comprehensive upstream version (which also corrects the `solution init` output shape to `Status: "Created successfully"`). Left intentionally: the cross-CLI-version dual-support probes (uipath-agents, uipath-human-in-the-loop, uipath-maestro-flow), the uipath-solution rename table, and the `solution new: unknown command` diagnosis trigger. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Why
A private-preview client reported that the
uipath-api-workflowskill does not enforce proper project structure. Root cause (confirmed against the Woolworths RCA + session logs and the CLI source): the skill steered agents to hand-assemble projects asproject.json+workflows/WF_*.jsonand listeduip api-workflow initunder "Commands That Do NOT Exist."That
project.json-only shape passes every runtime gate —validate,run,pack,publish, deploy — but Studio Web's import rejects it (invalid_project_folder) because it has no.uiproj, so the project never appears/edits in Studio Web. The defect is invisible until a human opens Studio Web.uip api-workflow init(shipped well before that build) scaffolds the correct Studio Web editable shape and auto-registers the project in the solution.uipx. Had the skill used it, the wrong shape could not have been produced.What changed
uip api-workflow init. Rewrote rules 19/19a; the Studio Web contract is framed as the specinitsatisfies —initis the one step that can't produce the wrong shape.init,build, and project-levelpacktocli-reference.md— all three exist; the skill previously claimedinit/builddid not.uip solution new→uip solution initeverywhere (thenewverb was retired and now errorsunknown command 'new').uip api-workflow validateexists (was claimed absent); added the "runs/deploys but won't open in Studio Web" entry with safe remediation (re-scaffold viainit, or in-place convert preserving the projectId— neverproject remove+add, which mints a newId).workflow-file-format.md(the.uiproj/entry-points.jsonfield rules).package_solution.yamldescription (buildis project-scoped, not absent).Verification
Built the CLI locally (
bun run build, v1.198.0) and ran the documented flow as 11 assertions — all pass:solution init→api-workflow init(registers in.uipxwithType:"Api"+project.uiproj+ freshId) →validateValid →solution pack(produces.zip) →api-workflow build→api-workflow pack(.nupkg) →init --skip-solution-registrationstandalone.Repo CLI-verb checker: 0 High / 0 Medium.
Ran the changed coder-eval task
skill-api-workflow-package-solutionlocally (experiments/default.yaml, tempdir driver) — passed, 3/3 criteria, weighted score 1.000. The agent scaffolded an API workflow and packaged it viauip solution pack --output json, producingConstantSolution_1.0.0.zip.Notes / follow-ups
uipath-api-workflow+ its test. CODEOWNERS already covers the paths.project.jsonshape into task T9) is out of scope here — recommend a follow-up inuipath-planner.🤖 Generated with Claude Code