feat: simplify draft cli vocabulary
This commit is contained in:
@@ -18,7 +18,7 @@ low-level escape hatch or you already have a complete compiler/generated plan.
|
||||
2. Inspect one candidate with `wf cap inspect`.
|
||||
3. Call one candidate with `wf cap call` when payload shape or upstream source
|
||||
reachability is uncertain.
|
||||
4. Create a patchable draft workspace with `wf draft create-from-capability`.
|
||||
4. Create a patchable draft workspace with `wf draft create --capability`.
|
||||
5. Patch targeted fields with focused draft commands or JSON Patch.
|
||||
6. Validate with `wf draft validate`.
|
||||
7. Save an artifact with `wf draft save`, or import a complete raw plan with
|
||||
|
||||
@@ -127,8 +127,7 @@ The plan file is the low-level workflow model. It is not a draft workspace.
|
||||
|
||||
## Common Mistakes
|
||||
|
||||
- Do not use `wf draft create --capability`; current CLI command is
|
||||
`wf draft create-from-capability <workspace_id> <capability>`.
|
||||
- Use `wf draft create <workspace_id> --capability <capability>` for draft creation.
|
||||
- Do not pass draft JSON to `artifact create-from-plan`.
|
||||
- Do not omit deployment bindings for ordinary sources. Platform sources such
|
||||
as `wf.std` may be omitted or self-bound, but configured sources usually need
|
||||
|
||||
@@ -93,7 +93,7 @@ wf draft handle <workspace_id> --revision <n> --to fail --branch lookup:error --
|
||||
wf draft compile <workspace_id>
|
||||
wf draft bind <workspace_id> --revision <n> --step <step_id> --from local.<field> --to state.<field>
|
||||
wf draft bind <workspace_id> --revision <n> --step <step_id> --from input.<field> --to local.<field>
|
||||
wf draft add-step-from-capability <workspace_id> --revision <n> --step <step_id> --capability <qualified_name> --from-step <prev> --from-outcome ok --route ok=__end__ --route error=fail --input input.text=text --bind-output result=state.result
|
||||
wf draft add-step <workspace_id> --revision <n> --step <step_id> --capability <qualified_name> --from-step <prev> --from-outcome ok --route ok=__end__ --route error=fail --input input.text=text --bind-output result=state.result
|
||||
```
|
||||
|
||||
`set-input` direction: `input.text=text` means graph source `input.text` maps to
|
||||
@@ -134,7 +134,7 @@ wf draft validate <workspace_id>
|
||||
know a map, inspect the capability or run validation rather than guessing.
|
||||
|
||||
```bash
|
||||
wf draft add-step-from-capability <workspace_id> --revision <n> --step <step_id> --capability <qualified_name> --from-step <prev> --from-outcome ok --route ok=__end__ --route error=fail --input input.text=text --bind-output result=state.result
|
||||
wf draft add-step <workspace_id> --revision <n> --step <step_id> --capability <qualified_name> --from-step <prev> --from-outcome ok --route ok=__end__ --route error=fail --input input.text=text --bind-output result=state.result
|
||||
wf draft validate <workspace_id>
|
||||
```
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ Configured sources usually need explicit deployment bindings.
|
||||
Use the guided draft path when editing step-by-step:
|
||||
|
||||
```bash
|
||||
wf draft create-from-capability <workspace_id> <capability>
|
||||
wf draft create <workspace_id> --capability <capability>
|
||||
wf draft set-input ...
|
||||
wf draft set-output ...
|
||||
wf draft validate <workspace_id>
|
||||
|
||||
@@ -12,7 +12,7 @@ validated, runnable deployment.
|
||||
3. Inspect one capability.
|
||||
- CLI: `wf cap inspect <name>`
|
||||
4. Bootstrap a draft workspace.
|
||||
- CLI: `wf draft create-from-capability <workspace_id> <capability>`
|
||||
- CLI: `wf draft create <workspace_id> --capability <capability>`
|
||||
5. Inspect/patch/validate the workspace until valid.
|
||||
- Use focused CLI commands (`set-name`, `set-route`, `set-input`, `set-output`)
|
||||
for common edits.
|
||||
@@ -24,7 +24,7 @@ validated, runnable deployment.
|
||||
the binding in one revision-checked edit.
|
||||
- When adding a new capability-backed step, prefer:
|
||||
```bash
|
||||
wf draft add-step-from-capability ...
|
||||
wf draft add-step ...
|
||||
wf draft validate <workspace_id>
|
||||
```
|
||||
Use raw `wf draft patch` only when changing structure that no focused helper
|
||||
|
||||
Reference in New Issue
Block a user