Used to query or process existing approval instances and approval tasks. Use when users mention approval to-dos, agree, pass, complete, reject, return, withdraw or cancel an instance, retrieve for reconsideration, edit approval forms, submit after filling, change handler, add sign-off node, remind, mark an approval carbon-copy task as read, reply, task details, progress, or approval instances.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Approval Runtime Skill?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/fsxiaoke-approval-runtime-skill)
---
name: "approval-runtime-skill"
description: "Used to query or process existing approval instances and approval tasks. Use when users mention approval to-dos, agree, pass, complete, reject, return, withdraw or cancel an instance, retrieve for reconsideration, edit approval forms, submit after filling, change handler, add sign-off node, remind, mark an approval carbon-copy task as read, reply, task details, progress, or approval instances."
apiName: "approval_runtime_skill"
---
# Approval Flow Runtime
## Goal
Enable the Agent to query or process existing approval runtime targets accurately and verifiably: uniquely match the operation and reference, obtain only the minimum trusted facts required by that operation, then report the real result. Sending a command is not success; confirm a write only when `success == true && code == 'OK'`. A query must not escalate into a write.
## What I Need From You
- **Operation and target**: Provide a clear query or processing intent and a target that can be reliably bound by `taskId`, `instanceId`, `entityId + objectId`, a task selected in the current session, or information that can uniquely locate the target through an allowed read-only path.
- **Operation-specific facts**: Provide the new field values, handlers, approval comment, reject target, reply content, or other data required by the selected reference. Personnel values must be real user IDs; a business number, name, or title is not a record `_id`.
- **When information is missing**: First perform the narrowest read-only query allowed by the current reference. When the target cannot be uniquely bound, required data is missing, or results conflict, stop and state the gap; do not guess or fill values. A Non-Read operation needs an explicit affirmative in a subsequent message after its complete business preview.
## When to Use
- Use for existing approval task or instance details, progress, buttons, activity feeds, or rejectable-target queries; and for agreeing, completing, rejecting, canceling, retrieving, editing forms, changing handlers, adding sign-off nodes, reminding, marking as read, or replying on existing approval tasks.
- Use when a user supplies a task/instance ID, or a business object and record, and asks to query or process its related approval runtime target.
- Do not use for creating, editing, publishing, enabling, disabling, or deleting approval definitions, nodes, layouts, rules, or other configuration; or for ordinary CRM-record reads or field changes unrelated to approval runtime.
## Scope
Only handles existing approval instances, approval tasks, and runtime data; does not handle approval definitions, nodes, layouts, publishing, enabling/disabling, or configuration deletion.
The current Skill only handles explicitly identified tasks, instances, business objects, and activity feeds; do not guess to-do query commands, and do not treat details, activity feeds, or progress as a to-do list.
## Tools List
| Command family | Purpose | Key parameters | Usage rule |
| --- | --- | --- | --- |
| `sharecrm approval runtime <operation>` | Approval runtime queries, validation, and processing | Target: `--taskId <task-id>`, `--instanceId <instance-id>`, `--workflowInstanceId <instance-id>`, `--todoId <todo-id>`, `--entityId <object-api-name>` + `--objectId <record-id>`, or `--dataId <record-id>`; reads: `--workflowId <workflow-id>`, `--activityId <activity-id>`, `--detailEntityId <detail-entity-id>`; action: `--actionType <agree\|reject>`, `--opinion <opinion>`, `--reason <reason>`; specialized targets: `--currentTaskId <task-id>`, `--rejectToTaskId <task-id>`, `--previousTaskId <task-id>`; personnel, `replyMessage`, `freeApprovalDef`, `extraNodeAssignee`, `remindPersons`, and other arrays, objects, or nested values use `--data <json>` as required by the reference. | First select one reference from Operation Routing. This column lists common critical parameters, not a generic payload; the subcommand, flags, JSON structure, and prerequisites in that reference are authoritative. |
| `sharecrm semantic object-data-query` | Lightweight task location or task/instance-state verification | `--data <json>`, `--raw`; the query plan contains `object_api_name`, `select_fields`, and `filters` | Use only the fixed plans under "Lightweight State Verification" and always pass `--raw`. Read only returned record fields and query-window metadata; never treat display or masked fields as identifiers. |
| `sharecrm data record get-by-id` | Trusted business-record snapshot for flow-layout editing | `--objectApiName <object-api-name>`, `--recordId <record-id>`, `--raw` | Use only when `task-edit.md` requires `version` or an original snapshot, and always pass `--raw`. |
Before calling a CLI, run `--help` for the command in the selected reference to verify the actual subcommand, flags, and parameter types. When `--help` conflicts with the reference, follow `--help` and stop the Non-Read operation.
## Operation Routing
First select a unique primary operation from the table below, then read the corresponding `references/<file>.md` under the current `approval-runtime-skill/references/`. Only when the primary operation reference explicitly requires the narrowest read-only prerequisite query may you additionally read and execute that read-only reference; this must not auto-escalate to a write. Same-named references may exist in the BPM or stage accelerator directories and must not be used as substitutes.
### Task-Detail Read Boundary
`get-task-detail` must not be the default verification after any Non-Read operation succeeds. Call it only when the user explicitly asks to view a task, form, or approval activity feed; a required pre-write fact can only be confirmed from task details, such as a trusted free-approval configuration, `feedId`, `replyId`, or reply ownership; or the user explicitly asks to verify complete approval routing, sign-off order, free-approval configuration, or activity-feed content. Use "Lightweight State Verification" when only locating active tasks, verifying state, candidates, or subsequent tasks.
### Layout Identification Before Editing, Completion, or Rejection
When the user asks to edit, save an approval form, agree, pass, complete, or reject an approval task, always read the matching button's form context with these steps. Even when task details, progress, or another read result contains a same-named layout field, it must not replace ExtraData returned with matching `buttonType`.
1. **Determine buttonType and actionType**: `buttonType` selects the ExtraData handler and form context only; `actionType` represents the final approval action only, and they must not substitute for each other. When the final action is rejection, use `REJECT_BUTTON` for ExtraData and use `reject` where the write requires `actionType`. For editing, agreeing, passing, or completing, reuse `executionType` only when a trusted value already exists in the current context; do not read task details to obtain it. Use `COMPLETE_BUTTON` only when it explicitly equals `update`; for every other value, including a missing value, use `AGREE_BUTTON` directly, and use `agree` where the write requires `actionType`. Missing `executionType` is not a blocker and must not trigger another query. When the current operation context already contains a trusted, explicit `buttonType` for the same `taskId`, `instanceId`, and target action, use it verbatim; do not derive, override, or query it again. Immediately call `get-task-extra-data` once after determining the value, and do not use other read results to re-evaluate or change it. When no trusted `buttonType` is provided and the action has no confirmed mapping, do not guess. `task-get-task-buttons.md` verifies button availability only; do not pass its returned `AGREE_BUTTON`, `REJECT_BUTTON`, or `COMPLETE_BUTTON` as write `actionType`.
2. **Execute get-task-extra-data**: The API allows omitting `buttonType`, but it is semantically required when reading `approvalForm`, identifying the layout, reading opinion configuration or layout rules, or obtaining button-specific data. Without it, only the Unknown fallback's basic data (`triggerType`, `unCompletedPersons`, `candidateIds`) may be read, and that result must not be used for layout identification.
3. **Check default-layout required fields, then route by whether data is saved and final action**: Before agree, pass, complete, or reject, reuse this operation's ExtraData with matching `buttonType`: inspect current values of fields that are explicitly required and currently visible and editable only when it returns `approvalForm.objectFlowLayoutExists == false`. When any such default-layout field is missing, stop without displaying a write preview or requesting secondary confirmation, and request all missing values together. When `objectFlowLayoutExists == true`, do not block, request fields, or construct data because of flow-layout required markers. Only when a default layout has no unfilled required fields, or a flow layout is confirmed and the current operation does not save data, may agree, pass, or complete use `task-complete.md` directly with `actionType=agree`; reject and end flow may use `task-complete.md` directly with `actionType=reject`. For saving only, route only from `approvalForm.objectFlowLayoutExists` returned with matching `buttonType`: `true` uses `task-edit.md` and `false` uses `task-update-approval-content.md`. When completion needs to save data and the result is `true`, edit then agree, pass, or complete first uses `task-edit.md` with `actionType=agree` and then `task-complete.md` with `actionType=agree`; when it is `false`, use `task-update-and-complete.md` with `actionType=agree`. For edit then reject and end the flow, `true` first uses `task-edit.md` with `actionType=reject` and then `task-complete.md` with `actionType=reject`; `false` uses `task-update-and-complete.md` with `actionType=reject`. For edit then reject to a specified task, `true` first uses `task-edit.md` with `actionType=reject` and then `task-reject-to-before-task.md` without form data; `false` directly uses `task-reject-to-before-task.md` and may pass default-layout form data. A valid ExtraData result for the same `taskId`, `instanceId`, and matching `buttonType` completes layout identification and default-layout required-field checking; the subsequently selected reference must reuse it and must not re-read task details, re-derive `executionType`, or call ExtraData again. When returned `approvalForm` has an absent, non-boolean, or conflicting layout field, stop; do not guess from routing-table order, task name, or other detail.
**Flow-layout required-field capability boundary**: Available flow-layout ExtraData cannot reliably identify which fields are required or whether their values are missing. Therefore, do not perform this required-field check for a flow layout or use it to request user input, block an operation, or construct data; this does not mean that a flow layout has no required fields.
4. **Read-only boundary**: This layout identification may execute directly and does not authorize a write.
| User Intent | Reference | Type | Primary Target | Specific Prerequisites | On-Demand Verification |
| --- | --- | --- | --- | --- | --- |
| Direct agree, pass, or complete (no form/business data save in this operation) | `task-complete.md` with `actionType=agree` | Non-Read | `taskId` + `objectId` | ExtraData has been queried with matching agree-side `buttonType`; a default layout has no unfilled current visible, editable required field, a flow layout does not check such fields, and the current operation is trustworthily confirmed not to save data | Server write response; lightweight state verification on demand |
| Agree, pass, or complete (data save required, flow layout) | First read `task-get-task-extra-data.md` with `AGREE_BUTTON` or the confirmed `COMPLETE_BUTTON`; when `objectFlowLayoutExists == true`, save via `task-edit.md`, then complete via `task-complete.md`; both steps use `actionType=agree` | Non-Read | `taskId` + `instanceId` + `objectId` | First use ExtraData with matching `buttonType` to confirm flow layout and task-required data | `task-get-task-extra-data.md` |
| Agree, pass, or complete (data save required, default layout) | First read `task-get-task-extra-data.md` with `AGREE_BUTTON` or the confirmed `COMPLETE_BUTTON`; when `objectFlowLayoutExists == false`, use `task-update-and-complete.md` with `actionType=agree` | Non-Read | `taskId` + `entityId` + `objectId` | First use ExtraData with matching `buttonType` to confirm default layout and task-required data | `task-get-task-extra-data.md` |
| Default layout: edit fields, then agree, pass, or complete | `task-update-and-complete.md` with `actionType=agree` | Non-Read | `taskId` + `entityId` + `objectId` | First query ExtraData with the matching agree-side `buttonType` and strictly require `approvalForm.objectFlowLayoutExists == false`; required default-layout form/business data must be complete, valid, and non-empty. A flow layout instead uses `task-edit.md` followed by `task-complete.md` | `task-get-task-extra-data.md` |
| Only save flow-layout form data | `task-edit.md` (`ApprovalTaskFormEdit`) | Non-Read | `taskId` | `approvalForm.objectFlowLayoutExists == true`; field-level changes and original snapshot | `task-get-task-extra-data.md` |
| Only save default-layout form data | `task-update-approval-content.md` (`ApprovalTaskDefaultFormEdit`) | Non-Read | `taskId` + `entityId` + `objectId` | `approvalForm.objectFlowLayoutExists == false`; field-level changes and original data | `task-get-task-extra-data.md` |
| View task or activity feed details | `task-feed-detail.md` | Read | `taskId` / `todoId` / `workflowInstanceId` | None | This operation's result |
| View complete instance information | `instance-get-detail-by-instance-id.md` | Read | `instanceId` | None | This operation's result |
| View business record approval progress | `instance-progress.md` | Read | `entityId` + `dataId` | None | This operation's result |
| View available buttons | `task-get-task-buttons.md` | Read | `taskIds` | None | This operation's result |
| View task extra data | `task-get-task-extra-data.md` | Read | `taskId` + `instanceId` | None | This operation's result |
| Query associated instance ID | `instance-get-instance-id-by-object-id.md` | Read | `entityId` + `objectId` | None | This operation's result |
| View instance detail changes | `instance-get-detail-change.md` | Read | `instanceId` + `detailEntityId` | None | This operation's result |
| Preview tasks to be generated | `instance-get-preview-tasks.md` | Read | `workflowId` + `activityId` + `objectId` | None | This operation's result |
| Query rejectable targets | `task-get-can-refuse-tasks.md` | Read | `instanceId` + `taskId` | None | This operation's result |
| Reject to specified task | First query rejectable targets and ExtraData with `REJECT_BUTTON`; use `task-reject-to-before-task.md` directly for a default layout, or use `task-edit.md` with `actionType=reject` before rejection for a flow layout | Non-Read | `currentTaskId` + `rejectToTaskId` | `rejectToTaskId` must come from the rejectable-targets query; the rejection reference receives no form data for a flow layout | Lightweight state verification; read details/progress only when the user explicitly asks for complete reject routing |
| Direct reject and end flow (no form/business data save in this operation) | `task-complete.md` with `actionType=reject` | Non-Read | `taskId` + `objectId` | ExtraData has been queried with `REJECT_BUTTON`; a default layout has no unfilled current visible, editable required field, a flow layout does not check such fields, and the current operation is trustworthily confirmed not to save data | Server write response; lightweight state verification on demand |
| Edit fields, then reject and end flow (data save required) | First query ExtraData with `REJECT_BUTTON`; use `task-update-and-complete.md` with `actionType=reject` for a default layout, or `task-edit.md` then `task-complete.md`, both with `actionType=reject`, for a flow layout | Non-Read | `taskId` + `instanceId` + `objectId` | First confirm rejection action and layout; flow-layout save must succeed first. Rejecting to a specified preceding task instead uses `task-reject-to-before-task.md` | `task-get-task-extra-data.md` |
| Check if retrievable | `task-retrieve-check.md` | Read | `instanceId` + `currentTaskId` | None | This operation's result |
| Retrieve approval task for reconsideration | `task-retrieve.md` | Non-Read | `instanceId` + `currentTaskId` + `previousTaskId` | First query ExtraData with `RETRIEVE_BUTTON` to obtain the retrieval target, then execute retrieval check | Lightweight state verification; read details/progress only when the user explicitly asks for complete instance routing, historical opinions, or activity feeds |
| Withdraw or cancel approval instance | `instance-cancel.md` | Non-Read | `instanceId` or `entityId` + `objectId` | Reason and instance-level impact | Instance details or progress |
| Retry ungenerated subsequent tasks | `instance-retry-task.md` | Non-Read | `instanceId` | Retry scope and impact | Lightweight state verification (query active tasks by instance) |
| Change regular task handler | `task-change-task-handler.md` | Non-Read | `taskId` + `persons` | User ID, replacement scope, and personnel changes | Lightweight state verification (query candidates by task ID) |
| Change free approval handler | `task-change-free-task-handler.md` | Non-Read | `instanceId` + `freeApprovalDef` | Existing definition and personnel differences | Lightweight state verification; read details only when trusted `freeApprovalDef` is missing or the user explicitly asks to view the free-approval configuration |
| Add front sign-off node | `task-add-extra-node.md` | Non-Read | `taskId` + `extraNodeAssignee` | User ID, reason, sequential or parallel mode, and routing impact | Lightweight state verification (compare active tasks before and after); read details only when the user explicitly asks for order or complete routing |
| Re-analyze handler | `task-reanalysis-task-processor.md` | Non-Read | `taskId` | Recalculation impact | Lightweight state verification (query candidates by task ID) |
| Send reminder | `task-remind.md` | Non-Read | `taskId` + `remindPersons` | Recipients, content, and outbound impact | Server write result; read details only when the user explicitly asks to view reminder activity |
| Mark approval carbon-copy task as read | `task-carbon-copy.md` | Non-Read | `taskId` + trusted `replyMessage.feedId` | Current user's target carbon-copy task, target feed, and read-status change | Server write result; read details only when trusted `feedId` is missing or the user explicitly asks to view activity |
| Reply to approval comment | `task-reply.md` | Non-Read | `instanceId` + `taskId` + `replyMessage` | Target feed, body, attachments, source, and outbound impact | Server write result; read details only when trusted `feedId` is missing or the user explicitly asks to view activity |
| Delete approval reply | `task-delete-reply.md` | Non-Read | `replyId` + ownership context | Trusted reply ID, ownership, and irreversible impact | Server write result; read details only when trusted `replyId`/ownership is missing or the user explicitly asks to view activity |
### Semantics of Withdraw, Cancel, and Retrieve
- When the user explicitly says "retrieve," "retrieve for reconsideration," or "take it back from the current handler and return it to the previous step for reprocessing," first execute `task-get-task-extra-data.md` with `RETRIEVE_BUTTON` to obtain `previousTaskId`, then run `task-retrieve-check.md`; use `task-retrieve.md` after both read results are valid and the user confirms.
- When the user says "withdraw" or "cancel the approval/approval instance," use `instance-cancel.md` to terminate the whole approval instance; do not run `retrieve-check` or `retrieve`.
## Execution Flow
1. Select a unique primary operation from the table above and read its reference. For approval-form editing or approval-task agree, pass, completion, or rejection, first determine `buttonType` according to "Layout Identification Before Editing, Completion, or Rejection". For form editing, use `AGREE_BUTTON` directly when `executionType` is missing; do not query task details specifically to obtain it. After determining the value, execute `task-get-task-extra-data.md` once with the `buttonType` matching the target operation, identify the layout, then check current visible, editable required fields only in a default layout before selecting the one edit or completion path. Only when that reference explicitly requires the narrowest read-only prerequisite query may you read and execute the corresponding read-only reference; do not auto-escalate to a write based on query results.
2. First bind the unique target, then obtain missing or conflicting narrowest read-only facts per the primary operation reference. Reuse facts already confirmed in this operation; do not re-query for subsequent writes. When only `instanceId` is available and current in-progress tasks must be located or listed, run the instance query in "Lightweight State Verification"; when only `entityId + objectId` is available and a current in-progress task must be located, run the business-object query in that section only after `objectId` has been confirmed as the real business-record `_id`. A business number, name, or title supplied by the user cannot be used directly as `objectId`; first resolve it to one real `_id` through an allowed business-record read path, otherwise stop and request the missing value. Both queries are only for task location, task summaries, or state verification and must not replace forms, activity feeds, layouts, buttons, or complete-routing queries. When `task-edit.md` edits the main business record and requires `version` or an original snapshot, you must run `sharecrm data record get-by-id --objectApiName <object-api-name> --recordId <record-id> --raw`. The default response, `get-task-extra-data`, and `object-data-query` are not valid sources of `version`; copy the value and its JSON type verbatim from the raw response. `task-update-approval-content.md` for a default layout must not reuse that raw path; reuse a trusted pre-edit `version` and original snapshot only when they are present and attributable to the same record in already-read task/instance details, and stop when they are missing or conflicting.
3. Before executing each primary operation or its allowed prerequisite read-only reference CLI, run that reference's CLI `--help` to verify subcommands, flags, and parameter types. When `--help` conflicts with the reference, `--help` takes precedence; stop the Non-Read operation and report that the documentation needs correction.
4. Pass arrays and objects as valid JSON strings per the reference; pass strings as text; pass booleans as `true` or `false`. Omit unused optional parameters' CLI flags entirely; do not pass the literal `null`; stop when a required parameter is missing or a required collection/object is empty. Read operations may be executed directly and must not auto-escalate to writes; Non-Read operations must first collect complete parameters, then follow the secondary confirmation below.
5. After writing, only perform the narrowest read-only verification when necessary and supported by the reference; do not chain a second write because of verification. Only the confirmed flow-layout completion sequence in "Completion Decision" may execute `task-edit.md` followed by `task-complete.md`.
6. Only `success == true && code == 'OK'` means success. `NEED_CONFIRM`, `INVALID_ARGUMENT`, `EXECUTE_FAILED`, asynchronous acceptance, or any other status is not success; when you cannot independently confirm the final business status, state so truthfully.
## Lightweight State Verification
When only locating active tasks, verifying task/instance state, current candidates, or whether subsequent tasks were generated, use `sharecrm semantic object-data-query --data '<query-plan>' --raw` from Tools List and do not call `get-task-detail` or `instance-detail`. Each of the four fixed plans explicitly specifies `object_api_name`, `select_fields`, and exact `filters`; read IDs such as `workflow_instance_id` and `current_candidate_ids` only from raw returned record field API names and values, never infer them from localized display labels, associated-record names, masked fields, or query metadata:
- **By task ID**: `sharecrm semantic object-data-query --data '{"object_api_name":"ApprovalTaskObj","select_fields":["state","activity_id","current_candidate_ids","workflow_instance_id"],"filters":[{"field":"_id","operator":"EQ","values":["<task-id>"]}]}' --raw`
- **By instance ID**: `sharecrm semantic object-data-query --data '{"object_api_name":"ApprovalInstanceObj","select_fields":["state","current_candidate_ids"],"filters":[{"field":"_id","operator":"EQ","values":["<instance-id>"]}]}' --raw`
- **Active tasks by instance ID**: `sharecrm semantic object-data-query --data '{"object_api_name":"ApprovalTaskObj","select_fields":["state","activity_id","current_candidate_ids","workflow_instance_id","task_name"],"filters":[{"field":"workflow_instance_id","operator":"EQ","values":["<instance-id>"]},{"field":"state","operator":"EQ","values":["in_progress"]}]}' --raw`
- **Active tasks by business object**: `sharecrm semantic object-data-query --data '{"object_api_name":"ApprovalTaskObj","select_fields":["state","activity_id","current_candidate_ids","workflow_instance_id","task_name","object_data_id"],"filters":[{"field":"object_data_id","operator":"EQ","values":["<object-id>"]},{"field":"object_api_name","operator":"EQ","values":["<entity-id>"]},{"field":"state","operator":"EQ","values":["in_progress"]}]}' --raw`
For a task-ID or instance-ID state query, use only `_id`, `state`, `current_candidate_ids`, and a task record's `workflow_instance_id`; ignore relation displays, personnel details, language fields, and query metadata. Use task `workflow_instance_id` as `instanceId` for a subsequent instance query only when the one returned record's `_id` equals the input `taskId`. Stop when zero or multiple records are returned, or the ID differs.
For an active-task query by instance ID, zero, one, or multiple records are valid. Use only each record's `_id`, `task_name`, `state`, `activity_id`, `current_candidate_ids`, and `workflow_instance_id`; every `workflow_instance_id` must equal the input instance ID. When only proving that subsequent tasks were generated, report the count and task summaries directly. To execute on one task, bind `taskId` automatically only for one result; when multiple results are returned, show task names and IDs and require the user to select.
For an active-task query by `entityId + objectId`, `entityId` must be the business object API name and `objectId` must be the real system `_id` of the business record. `object_data_id` is an exact ID match: never pass a business number, name, title, or display value. When the user provides only such a business identifier, first resolve it to one real `_id` through an allowed business-record read path, then run this query. An `object_data_id` obtained from a trusted task or to-do query result is already that real `_id` and may be reused directly. Use only each record's `_id`, `task_name`, `state`, `activity_id`, `current_candidate_ids`, `workflow_instance_id`, and `object_data_id`; every `object_data_id` must equal the input `objectId`. For zero records, state that no approval task is in progress in the current semantic-query scope. For one record, bind its `taskId` and `workflow_instance_id`; for multiple records, require the user to select and do not guess from task name, order, or candidate.
Do not use these queries to obtain forms, activity feeds, replies, attachments, buttons, `actionType`, layout, opinion configuration, node configuration, complete routing, rejectable targets, retrieval conditions, original snapshots, or complete subsequent-task details; use the specialized query specified by the current operation reference when those facts are needed.
## Non-Read Secondary Confirmation
1. Before each Non-Read operation, you must display the final desensitized preview and ask a question, then wait for the user to provide an explicit affirmative for that same unchanged operation in a subsequent message; do not call a Non-Read CLI in the turn requesting confirmation.
2. The CLI, reference, raw flags, JSON, internal IDs, layout type, ExtraData, required-field checking process, and internal values such as `actionType` and `buttonType` are for Agent verification and execution only; do not display them to the user unless the user explicitly asks to inspect the command or diagnose parameters. Do not narrate the matched routing-table entry, reference name, scenario classification, whether data is saved, layout-identification result, or internal reason for selecting an operation. The user-facing preview only states the business action, recognizable approval/business target, field or personnel/object-collection changes, comment, approval impact scope, and risk. Field modifications show field differences; personnel or object collection modifications show difference summaries. Only when a default layout has a missing required field, request the field's display name and value directly without explaining the internal check.
3. An initial request (even with complete parameters), parameter or identity confirmation, read-only results, the preview/question itself, and a generic "continue" do not constitute authorization. Any change to the target, ID type, CLI/reference, action, any key parameter, personnel/data/object collection, comment, scope, action type, or risk marker invalidates the confirmation; you must re-preview and wait for a subsequent explicit affirmative.
4. After receiving valid authorization consistent with the preceding preview, you must execute that Non-Read operation once; do not re-display the preview or ask for confirmation again. The final preview for flow-layout completion must explicitly state "save, then complete"; that closed two-step sequence for the same task and unchanged parameters counts as one operation: execute `task-edit.md` first, execute `task-complete.md` only after it succeeds, and stop without completing if the first step fails. Authorization is invalidated only when the user explicitly cancels or corrects the operation, or when any fact described in step 3 changes, requiring re-preview and re-confirmation.
5. By default, process only one task or instance at a time. Multiple targets must be presented as a closed collection with the same action in the preview, and the user must explicitly affirm each item or the whole.
6. You may retry only after the user explicitly corrects parameters; each retry requires re-preview and re-confirmation.
## Target and Data Contract
- Task, instance, business record, to-do, activity feed, reply, opinion, and personnel IDs are not interchangeable. `currentTaskId` is only used for rejecting/retrieving the current task; `rejectToTaskId` must come from the rejectable targets query; `previousTaskId` must come only from `RETRIEVE_BUTTON` ExtraData for the same `instanceId` and `currentTaskId`; `replyId` must come from a trusted detail source.
- `instanceId` is used for instance operations; `workflowInstanceId` is only used in task detail contexts that support it. `entityId + objectId` represents the business object and record; `entityId + dataId` is only used for progress. Personnel parameters must use actual user IDs only.
- When the user selects by "item N," you may only bind the most recently displayed to-do item of the same type in the current session; when the target is missing, the type is unclear, or the candidate is not unique, first query read-only and ask for selection.
- For complete, update-and-complete, or operations requiring `actionType`, first bind the same `taskId`, `instanceId`, and real button. `buttonType` and `actionType` are independent values: `buttonType` is determined by the ExtraData mapping for the confirmed action or by button-availability verification and selects the ExtraData handler; `actionType` is determined by the confirmed final approval action and is used for the final write. Agree, pass, and complete use `agree`; rejection uses `reject`. Do not pass `AGREE_BUTTON`, `REJECT_BUTTON`, or `COMPLETE_BUTTON` returned by button query as `actionType`. Both must correspond to the same task and target action, and neither may be guessed from button text. Before agree, pass, completion, or rejection, query ExtraData with matching `buttonType`; inspect a current visible, editable field that is explicitly required only when `approvalForm.objectFlowLayoutExists == false`. Do not inspect such fields for a flow layout. Omitting `buttonType` only returns the Unknown fallback's basic data and cannot identify layout or required fields.
- When the completion must save form or business data, it must use `approvalForm.objectFlowLayoutExists` from ExtraData for the same task and target button `buttonType`: when `true`, save flow-layout data and then complete; when `false`, update and complete. Stop when the field is absent, non-boolean, or conflicting; do not guess. Only when a default layout has no unfilled current visible, editable required field, or a flow layout is confirmed and the operation does not save data, may `task-complete.md` be used directly; `task-update-and-complete.md` is only for default-layout save-and-complete.
- When `task-edit.md` updates the main business object in a flow layout, `objectData` contains only the `_id` of the current associated record and the real field API names with new values explicitly provided by the user. Do not pass a full-record snapshot in `originalData` by default. Only when the current task, form contract, or object service requires original data, pass the smallest trusted original subset from the same record: `_id`, the verbatim `version` when available, and the pre-edit values of the fields being changed. When the server explicitly requires other original fields, follow that contract; do not guess, fabricate, pass unmodified fields, or bypass validation. Other edit references continue to follow their own data contracts.
## Completion Decision
| Trusted Current Task Facts | Operation |
| --- | --- |
| Agree, pass, or complete: default-layout ExtraData shows no unfilled current visible, editable required field, or a flow layout is confirmed and the current operation does not save approval-form or business data | `task-complete.md` with `actionType=agree` |
| Agree, pass, or complete: default-layout ExtraData shows a current visible, editable required field without a value | Stop and request all missing field values from the user together; do not display a write preview, request secondary confirmation, guess, or construct data |
| Reject and end flow: default-layout ExtraData shows no unfilled current visible, editable required field, or a flow layout is confirmed and the current operation does not save approval-form or business data | `task-complete.md` with `actionType=reject` |
| Reject and end flow: default-layout ExtraData shows a current visible, editable required field without a value | Stop and request all missing field values from the user together; do not display a write preview, request secondary confirmation, guess, or construct data |
| `approvalForm.objectFlowLayoutExists == true` and the required flow-layout data is complete and valid | Preview "save, then complete"; after confirmation run `task-edit.md`, then run `task-complete.md` only on success |
| `approvalForm.objectFlowLayoutExists == false` and the required default-layout data is complete, valid, and non-empty | `task-update-and-complete.md` |
| Saving data is confirmed as required, but the layout field is absent, non-boolean, or conflicting, or data required by the current layout cannot be provided per its reference | Stop; do not guess, downgrade to another completion CLI, or auto-redirect to Web UI |
## Specific Prerequisites
- Before rejecting, you must query rejectable targets and have the user select; before retrieving for reconsideration, you must first query ExtraData with `RETRIEVE_BUTTON` for a non-empty `previousTaskId`, then execute the retrieval check. Withdrawing or canceling an instance does not use the retrieval check.
- Adding sign-off nodes and changing handlers only use user IDs; `freeApprovalDef` must be converted from the current free-approval task's trusted `freeTasks`: retain only `assignee`, generate `order` in real array order, and remove `state`. Marking an approval carbon-copy task as read is not outbound: confirm only the current user's target task, target feed, and read-status change, not recipients, carbon-copy scope, or a body. Replies and attached messages are outbound; confirm the target feed, body, and side effects. Deleting a reply also requires confirming ownership and irreversible impact.
- Do not pass `ignoreNoBlockValidate`, `notValidate`, `removeVersion`, or other parameters that bypass validation or version control by default.
## Reference Usage Rules
A single reference is the sole basis for an operation's CLI, parameters, types, requiredness, JSON structure, specific prerequisites, and boundaries. Completion has only three permitted reference patterns: use `task-complete.md` alone when the current operation does not save data; use `task-update-and-complete.md` alone when a default layout is confirmed and data must be saved; when a flow layout is confirmed and data must be saved, use `task-edit.md` followed by `task-complete.md`. Other operations must not combine multiple Non-Read references. When a unique reference is missing, the target ID type is unclear, the status conflicts, parameters are missing, or permissions are insufficient, stop and explain the gap; do not fabricate commands, flags, payloads, `actionType`, `type`, or `freeApprovalDef`.
## Output
- **Query or validation**: Return business results directly relevant to the request. State an empty result, an ambiguous target, or an unverifiable state truthfully; do not broaden the query or perform a write.
- **Missing information**: State all missing business facts and the actionable next step together. Do not expose internal CLI, reference, routing, layout, or raw JSON unless the user explicitly requests diagnosis.
- **Non-Read preview and result**: The preview shows only the business action, recognizable target, field or personnel changes, comment, impact scope, and risk. After execution, report success only when `success == true && code == 'OK'`; otherwise state the known failure, accepted-but-unverified status, or missing condition.
**Query or validation format**: `Target: <business target>; Result: <state or conclusion>; Key facts: <facts relevant to the request only>; Next step: <when needed>.`
**Non-Read preview format**: `Action: <business action>; Target: <recognizable task/instance>; Changes: <field or personnel summary>; Comment: <when present>; Impact: <scope and risk>. Confirm execution?`
**Result format**: `Success: <completed business action>.`, `Failed: <known reason>; Next step: <actionable recommendation>.`, or `Accepted; final state not verified: <reason>.`
## Resources
The complete CLI, parameter types, JSON structures, prerequisites, and boundaries for every operation are in this Skill's `references/` directory. The `reference` column in Operation Routing is the sole navigation entry: first match one primary operation, then read only that file and the narrowest read-only prerequisite reference it explicitly requires. `instance-*.md` files cover instance operations and `task-*.md` files cover task operations; do not substitute a same-named reference from BPM or stage-advancer directories.