approval

SkillAI & models

Set the oma approval stance (`suggest`, `auto`, `full-auto`) with explicit risk guardrails.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the approval skill

What this skill tells your AI

The instructions your AI receives, as published by sswym/oh-my-agent in skills/approval/SKILL.md and read by ahel’s review.

Approval workflow management skill.

Purpose

Manage approval workflows for service catalog requests:

  • Query pending approval items with priority analysis
  • Approve one or more requests with optional reason
  • Reject one or more requests with reason

Trigger Conditions

Use this skill when user intent is any of:

  • View pending approvals / list approvals / check what needs approval
  • Analyze one pending approval in read-only mode
  • Approve a request / approve all / batch approve
  • Reject a request / deny request / batch reject
IntentKeywords
View pending"show pending approvals", "list approvals", "what needs approval"
Analyze"analyze approval request", "review approval", "只读分析审批请求", "审批分析"
Approve"approve request", "agree request", "pass request", "approve #1", "agree 1", "同意 1", "批准 1", "通过 1", "approve all", "batch approve"
Reject"reject request", "deny request", "refuse request", "reject #1", "deny 1", "拒绝 1", "驳回 1", "batch reject"

Intent Priority

Action commands always win over detail lookup.

User intentRequired tool
approve/agree/pass + Request ID or row numbersmartcmp_approve
批准/同意/通过/审批通过 + Request ID or row numbersmartcmp_approve
reject/deny/refuse + Request ID or row numbersmartcmp_reject
拒绝/驳回 + Request ID or row numbersmartcmp_reject
analyze/evaluate/review + Request IDsmartcmp_analyze_approval_request
分析/评估/审查/只读分析 + Request IDsmartcmp_analyze_approval_request
view/show/inspect/check detail + Request IDsmartcmp_get_request_detail
查看/看下/详情 + Request IDsmartcmp_get_request_detail

Examples:

  • approve CHG20260413000011 MUST call smartcmp_approve.
  • agree RES20260505000010 MUST call smartcmp_approve.
  • pass TIC20260502000003 MUST call smartcmp_approve.
  • 批准 CHG20260413000011 MUST call smartcmp_approve.
  • reject CHG20260413000011 MUST call smartcmp_reject without a reason so the Provider returns a trace-bound input request without executing a rejection.
  • deny RES20260505000010 because it exceeds quota MUST call smartcmp_reject.
  • analyze approval request RES20260505000010 MUST call smartcmp_analyze_approval_request.
  • 只读分析审批请求 RES20260505000010 MUST call smartcmp_analyze_approval_request.
  • 查看 CHG20260413000011 的详情 MUST call smartcmp_get_request_detail.
  • show detail of CHG20260413000011 MUST call smartcmp_get_request_detail.

Handlers and helpers

All five Tool commands are co-located in scripts/adapter.py:

HandlerDescription
list_pendingList pending approval items with priority
get_request_detailRead one approval request
analyze_requestAnalyze one pending approval without executing a decision
approveApprove one or more requests
rejectReject one or more requests

scripts/_approval_object_actions.py remains separate because the embedded assistant Context resolver also calls it to build page actions. It is not a one-command forwarding script.

The Adapter receives the selected instance and Cookie/user/robot credential from AtlasClaw Context. SmartCMP Provider owns authentication resolution and all SmartCMP API calls.

Workflow

Step 1: List Pending Approvals

Call smartcmp_list_pending with optional days.

Output Format:

  • Human-readable: Markdown table sorted by latest SmartCMP update first
  • Public structured rows: request ID, name, catalog, applicant, approval step, current approver, and other compact approval evidence used to render the table
  • Machine-readable: _internal.items in the Tool result, retained by AtlasClaw workflow context

The hidden continuation metadata is intentionally smaller than each public row; it retains only the fields listed below.

_internal.items fields:

FieldDescription
indexDisplay index (1, 2, 3...) — for user selection only
request_idExact SmartCMP user-facing Request ID / request number — use this opaque value for approve/reject tool input
nameRequest name
applicantRequester name

CRITICAL: Request ID Field Selection

MUST USE request_id field for smartcmp_approve and smartcmp_reject

The list result exposes one ID field to the agent: the user-facing _internal.items[].request_id. SmartCMP Provider resolves request_id to the internal approval action identifier before calling the CMP approval API.

FieldFormat ExampleCan Use as approve/reject tool input?
request_idExact value from _internal.items[].request_id, such as SR-2026/000019YES — USE THIS
display index1, 2, 3NO — resolve row index to request_id first
invented valueplaceholder or guessed IDNO — re-list and use the returned request_id

Mapping user selection to correct ID:

User explicitly says "row 1", "approve the first row", or "同意第 1 行"
  |
  v
Find the selected item in the latest `smartcmp_list_pending` `_internal.items`
  |
  v
Extract the `request_id` field
  |
  v
Pass to `smartcmp_approve` or `smartcmp_reject`

Treat request_id as opaque: do not require a prefix, character set, or fixed length pattern. Never invent a value. If the latest list metadata is unavailable, list pending approvals again before calling approve/reject.

Step 2: Approve Requests

Call smartcmp_approve with one or more request_ids and an optional reason.

Step 3: Reject Requests

Call smartcmp_reject with one or more request_ids. A non-empty rejection reason is required before SmartCMP is changed. If the user has not supplied one, omit reason; the tool returns a trace-bound input request and performs no rejection. Call the tool again with the reason after the user provides it.

Output Parsing

Approval _internal.items entry

{
  "index": 1,
  "request_id": "RES20260505000010",
  "name": "Test Request",
  "applicant": "TestUser"
}

Quick Reference: Which ID to Use

[OK]    smartcmp_approve(request_id) <- exact value returned by the pending list
[OK]    smartcmp_reject(request_id, reason) <- exact value returned by the pending list

[OK]    smartcmp_approve("1")   <- valid when "1" is the exact returned request_id
[FAIL]  smartcmp_approve(row_index) <- resolve an explicitly selected row first
[FAIL]  smartcmp_approve(guessed-value) <- invented value, re-list pending approvals

Critical Rules

ONLY use request_id field for approve/reject tool input. SmartCMP Agent SmartCMP Provider converts it to the approval action ID internally.

A rejection reason is required before execution. When it is missing, call smartcmp_reject without reason; treat its required_input response as a clarification, not a failure. No SmartCMP write occurs on that call.

NEVER create temp files — no .py, .txt, .json. Your context IS your memory.

Always show pending list first before approve/reject operations.

Confirm with user before batch operations affecting multiple items.

Error Handling

ErrorCauseResolution
400 + activity is nullUsed an internal or stale identifier after Request ID resolutionRe-list pending approvals, verify the item is still pending, and retry with request_id
Invalid SmartCMP Request ID(s)Request ID is blank or exceeds the supported size limitRe-list pending approvals and use the exact request_id field
401 / Token expiredSelected SmartCMP session expiredRefresh the selected SmartCMP session or credential
404 / Not foundInvalid or stale Request IDVerify ID from the latest smartcmp_list_pending result
[ERROR] outputVariousReport to user immediately; do NOT self-debug

References

  • WORKFLOW.md — Detailed approval workflow documentation

Signals

GitHub stars
76
Forks
13
Last commit
Apr 2026
Advanced
Catalog kind
skill
Gateway key
approval
Source
github.com/sswym/oh-my-agent