fix(flow): document --parent for nesting CLI-owned nodes in a loop (canonical) - #2520
fix(flow): document --parent for nesting CLI-owned nodes in a loop (canonical)#2520rockymadden wants to merge 3 commits into
Conversation
Loop-body nodes require `parentId`, but the skill only documented the hand-authored JSON path. That path is valid for user-owned nodes (Script) yet forbidden for CLI-owned nodes (managed HTTP, connector activities and triggers) by the node-ownership rule (#9) — leaving no documented way to nest a CLI-owned node inside a loop. `uip maestro flow node add` exposes `--parent <node-id>` for exactly this ("...when authoring a loop body whose containment cannot be inferred from edges alone — typically a core.logic.loop node"), but no reference doc mentioned it. As a result, an author adds an HTTP node inside a loop without `parentId`; it executes outside the loop and every per-iteration reference to its `output` resolves to null — while `flow validate` still passes, so the defect goes unnoticed until debug/runtime. This is the root cause of the skill-flow-multi-city-weather task failure. Document `--parent` where each reader lands: - plugins/loop/impl.md — new "CLI-owned nodes inside a loop" section plus a debug-table row for the "output null every iteration" symptom - plugins/loop/planning.md — distinguish user-owned (JSON) vs CLI-owned (--parent) parentId - editing-operations-cli.md — add --parent to the node add flags table and a nesting callout - plugins/http/impl.md — add-the-node callout and a debug-table row Verified: `npm run skills:validate` OK (no new flavor replacements); `scripts/check-cli-verbs.py` reports 0 High / 0 Medium on the edited files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @rockymadden's task in 1m 45s —— View job PR Review: fix(flow): document --parent for nesting CLI-owned nodes in a loop
SummaryDocuments Change-by-Change Review1.
|
| Area | Status | Notes |
|---|---|---|
| Frontmatter | OK | No frontmatter changes |
| E2E Tests | OK | Docs-only — no new workflows to test |
| Skill Body | OK | No SKILL.md changes |
| References & Assets | OK | All four reference changes are correct, well-placed, and internally consistent |
| Repo Hygiene | OK | No secrets, no cross-skill refs, no unrelated changes, all links resolve |
Issues for Manual Review
- The PR states
--parentis recognized against theuip 1.200.0-dev.8116catalog. If this flag is only available in a dev/pre-release CLI version, confirm it will ship before agents encounter these docs in production. (Not verifiable from the repo alone.)
Conclusion
Clean, well-scoped documentation fix. All four placement points are correct — the information appears where an agent would naturally look when adding an HTTP or connector node to a loop body. Cross-references are consistent and all links resolve. No issues found; this looks good to merge.
Pull the CLI-owned-node-in-a-loop rule up to its single canonical home (author/CAPABILITY.md - Node ownership) instead of restating the rationale at every leaf. SKILL.md rule #9 gains a terse --parent clause; editing-operations-cli.md keeps the flag-table row; loop/impl.md and http/impl.md shrink to a short note plus a pointer to the canon. Also fixes a wrong relative path (../../ -> ../../../) in the loop/impl.md link to CAPABILITY.md introduced in the previous commit. Net -7 lines. Links and anchors verified; skills:validate OK; check-cli-verbs 0 High / 0 Medium. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The rule is generic to all CLI-owned nodes, not HTTP-specific — singling out http/impl.md was arbitrary (connector/impl.md has the identical concern and no such note). It is now fully covered by SKILL.md rule #9, CAPABILITY.md - Node ownership, editing-operations-cli.md, and the loop docs (whose debug row already reads 'HTTP / connector node ...'). Removes the callout and the redundant debug-table row. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jiyangzh
left a comment
There was a problem hiding this comment.
does the cli check if parent node is a loop?
What
Documents
uip maestro flow node add --parent <containerId>— the supported way to nest a CLI-owned node (managed HTTPcore.action.http.v2, connector activities/triggers) inside acore.logic.loopbody — and states it once, in the canonical Node-ownership section, with the leaves reduced to pointers.Why
Loop-body nodes require
parentId. The skill only documented settingparentIddirectly in the JSON, which is valid for user-owned nodes (Script) but forbidden for CLI-owned nodes by the node-ownership rule (#9 — don't hand-edit connector/HTTP node JSON). That left no documented path to put a CLI-owned node in a loop.The CLI already supports this via
node add --parent, whose own help text reads:…but no reference doc mentioned the flag.
Impact (root cause of a task failure)
In
skill-flow-multi-city-weather, the agent correctly parented the in-loop Script node but added the HTTP node vianode add(which lands it at top level, noparentId). The HTTP call therefore executed outside the loop, so$vars.fetchCurrentTemperature1.outputwasnullon every iteration and the aggregated results contained no city data — failing the debug check. Critically,flow validatestill passed (a missingparentIdis structurally valid), so nothing surfaced the defect until runtime.Approach — one canonical home, thin leaves
The
--parentmechanism is a corollary of node ownership (a CLI-owned node can't be hand-edited, so its containment must also come from the CLI). So the principle lives once in the canonical section; everything else points to it.references/author/CAPABILITY.md§ Node ownership--parentbullet (covers all CLI-owned node types) + note that containment is the exception to "you may still Edit …"SKILL.mdrule #9--parentclausereferences/author/references/editing-operations-cli.md--parentrow in thenode addflags table; one-line pointer to the canonplugins/loop/impl.mdnullevery iteration")plugins/loop/planning.md--parent)plugins/http/impl.mdintentionally carries no--parentnote: the rule is generic to every CLI-owned node, so special-casing HTTP would be arbitrary (connector activities/triggers have the identical concern). It's covered by rule #9, the canon, the CLI reference, and the loop debug row.Docs only — no code or skill logic changed. Also fixes a wrong relative link depth (
../../→../../../) toCAPABILITY.md.Verification
npm run skills:validate→ OK (no new flavor replacements)scripts/check-cli-verbs.pyon all edited files → 0 High / 0 Medium (node add --parentrecognized against theuip 1.200.0-dev.8116catalog)🤖 Generated with Claude Code