Instruction file imported from QuickerHub/quicker-rpc (
.cursor/rules/qkrpc.mdc). Copyright stays with the author.
qkrpc agent rules
Canonical file — copied to workspace .cursor/rules/ via scripts/Sync-QkrpcAgentRules.ps1 and to Cursor plugin via qkrpc agent setup --cursor-plugin.
Scope gate
Apply this rule only when:
- the user is editing Quicker actions / subprograms, or
- files under the qkrpc disk root (
.quicker/), or - you are calling
qkrpc_*MCP /qkrpcCLI for authoring
Do not treat QuickerOrg/Quicker (or other product repos) as QKRPC_WORKSPACE_ROOT. Disk edits belong in the configured workspace (usually quicker-workspace). Prefer project .cursor/mcp.json over a user-global Cursor plugin.
Before editing
docsaction=get topicoverview, thenauthoring-workflow- Subprograms:
subprogram-workflow - Disk layout:
docstopicworkspace-editingor MCP resourcequicker://workspace/readme
Task routing
| Goal | MCP (preferred) | CLI (--json) |
|---|---|---|
| Local edit action / global subprogram | qkrpc_action_get / qkrpc_subprogram_get → edit .quicker/ → workspace_program action=patch |
action get / subprogram get → edit → apply |
| Remote publish action (动作库) | — | action publish / action update (--changelog on update) |
| Remote publish subprogram (子程序库) | — | subprogram publish / subprogram update (--changelog on update) |
| Run / debug with step output | qkrpc_action mode=debug |
action run --trace |
On trace failure read failureLocation, stackTrace, logExcerpt (auto tail from quicker.log). See tools/qkrpc/docs/agent-action-debug-workflow.md.
| Step inputs schema | qkrpc_step_runner_search → qkrpc_step_runner_get | step-runner search → step-runner get |
| Icons (WPF / WebView) | qkrpc_fa | fa search / fa resolve |
| Connectivity | qkrpc_health → on failure qkrpc_wait | health / wait |
Never action publish / action update for subprograms (wrong API). Never guess inputs without step-runner get.
data.json wire (write): short names only — key / inputs / outputs. Never stepKey. Legacy long names are read-compatible only. Domain topics (form-spec, icons, context-menu) stay in docs — do not invent formDef without form-spec.
MCP output (compact)
MCP tools return flat compact JSON — not { ok, data: { action, payload } }. Fields like actionId, editVersion, compressed sit at the top level. workspaceSync is only { ok, projectDir, editVersion }; read files from disk under projectDir. Verbose legacy: QKRPC_MCP_VERBOSE=1. See tools/qkrpc/docs/mcp-output-contract.md.
Hard rules
- Disk edit: get → host file tools → patch; no inline patch JSON; deprecated
qkrpc_sync - After patch: trust
editVersion; no verify re-get - Connectivity:
qkrpc_waiton failure — no repeated shell ping/probe - Prefer MCP
qkrpc_*when configured; else shellqkrpcCLI - Remote library upload: ask user first; subprogram update requires
--changelog - Destructive:
qkrpc_action_delete,qkrpc_subprogram_deleteneed user confirmation
Scope
Cursor MCP: headless authoring (workspace_program, step-runner, run/debug). QuickerAgent or Quicker Designer: visual editor, embedded browser, shell automation.
quicker-workspace
- Disk root: repo
.quicker/(QKRPC_WORKSPACE_ROOT= workspace root) - Human/agent map: workspace root
docs/qkrpc-agent-usage.md - Developing
tools/qkrpc/: after changes runbuild.ps1 -t(plugin reload + CLI install to user PATH);-SkipInstallonly when user asks - Stuck: skill
quicker-rpc-knowledge(tools/qkrpc/docs/skills/quicker-rpc-knowledge/)
