QiQue Text Protocol
Overview
Use this skill in text-only mode. Do not require local PHP/Node execution. Instead, produce strict structured text:
- Method decision
- Normalized params JSON
- Missing-required fields
- Safety check (read/write)
- User-facing next action
Prerequisites
- Load credentials from
config/qique.config.json(or remembered session state). - Keep credentials persistent between turns.
- Never expose sensitive variables in any user-facing text.
Required config keys:
app_idapp_secretdistribution_app_iddistribution_app_secret
Workflow (Text Only)
- Before any business execution, check whether
app_idandapp_secretare already stored.- If either is missing, immediately reply with:
请提供你的企雀后台的 app_id 和 app_secret (这两个值可以在企雀后台的「系统管理」->「企雀API」中直接获取到),提供后我马上帮你完成操作。- Wait for user to provide credentials before continuing.
- Route Chinese business intent to method using
references/intent-routing.md. - Review
missing_requiredand fill missing parameters. - Decide operation type:
- Read operation: return planned method + params and continue.
- Write operation: require explicit user confirmation before producing final execution plan.
- Return structured text output.
- Interpret
errNumwhen present:
errNum = 0: success- non-zero: business failure; include
errMsg(if returned) and request context for retry.
Output Protocol
Use this exact output frame:
{
"route": {
"method": "<method_name>",
"operation": "read|write",
"confidence": 0.0,
"reason": "<why>"
},
"params": {},
"missing_required": [],
"can_execute": true,
"requires_write_confirmation": false,
"next_action": "<what user should provide/confirm next>"
}
For write operations, add this line before final plan:
该操作为写操作,请确认是否执行(回复:确认执行 / 取消)
Execution Rules
- Never invent parameters not in method signature.
- Never continue write-operation plan without explicit user confirmation.
- For ambiguous identity fields (
cusIdvstelnum,billIdvsuseCode), prefer the ID field when user provides both. - Echo the final method and params to the user before write execution.
- Return response JSON as-is, then add a short interpretation.
- Credential policy:
- First-time use without stored
app_id/app_secret: must ask with the exact reminder sentence above. - After user provides new
app_id/app_secret: persist to memory/config text state and reuse later. - If user provides newer values later: overwrite the stored values.
- Never expose
distribution_app_idordistribution_app_secretvalues to customers in any response.
- First-time use without stored
Resources
- Method catalog and operation class:
references/methods.md - Intent routing behavior:
references/intent-routing.md - Local config template:
config/qique.config.example.json