execute

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Execute

Execute

/execute
≡
/build
— familiar synonym; arbitrary cross-use is fine. One standby loop. Canonical API
task_type
is always
execute
(never
build
).
Not this skill:
/create
(pull latest thread + DNA and work from conversation).
/research
(investigation tasks). Do not invent a third name.
Repo is ambient: Cursor workspace — no GitHub connection.
/execute
≡
/build
——常用同义词;可任意交叉使用。仅有一个待机循环。规范 API
task_type
始终为
execute
(绝不为
build
)。
不适用于此 skill:
/create
(拉取最新 thread + DNA 并从 conversation 开展工作)。
/research
(调查任务)。不要自创第三个名称。
仓库是环境上下文: Cursor 工作区——无 GitHub 连接。

Triggers

触发条件

  • /execute
    or
    /build
    — start standby executor
  • /execute keep on
    or
    /build keep on
    — same; explicit keep-on
  • After a task completes, keep on / I know / similar → stay in standby
  • /execute
    或
    /build
    ——启动待机执行器
  • /execute keep on
    或
    /build keep on
    ——同上;显式保持开启
  • 任务完成后,keep on / I know 或类似表达 → 保持待机

API

API

  • Base URL:
    https://api.originmind.ai
  • GET /api/v1/tasks?status=pending&task_type=execute
    →
    { data: [...] }
    (user-wide standby)
  • PATCH /api/v1/tasks/{id}
    —
    claim
    |
    complete
    |
    fail
    (body requires
    conversation_id
    )
  • Content kind also:
    POST /api/v1/creations
    —
    { project_id, title, content, status: "saved" }
  • Auth:
    X-OriAI-Api-Key
    or Bearer JWT
  • 基础 URL:
    https://api.originmind.ai
  • GET /api/v1/tasks?status=pending&task_type=execute
    →
    { data: [...] }
    (用户范围待机)
  • PATCH /api/v1/tasks/{id}
    ——
    claim
    |
    complete
    |
    fail
    (请求体需要
    conversation_id
    )
  • content
    类型还包括:
    POST /api/v1/creations
    ——
    { project_id, title, content, status: "saved" }
  • 身份验证:
    X-OriAI-Api-Key
    或 Bearer JWT

Bootstrap

初始化

Once per shell. Walk upward from cwd for
.env
then
.env.local
.
powershell
. ./skills/create/scripts/bootstrap-originmind-env.ps1
bash
source ./skills/create/scripts/bootstrap-originmind-env.sh
User install:
. "$HOME/.cursor/skills/create/scripts/bootstrap-originmind-env.ps1"
MISSING_KEY
→ OAuth:
. ./skills/create/scripts/setup-oauth.ps1
, or app.originmind.ai → API key. Do not Read
.env
in chat.
Never print full keys. PowerShell: never use
$pid
for project id — use
$ProjectId
.

每个 shell 会话执行一次。从 cwd 向上查找
.env
,然后查找
.env.local
。
powershell
. ./skills/create/scripts/bootstrap-originmind-env.ps1
bash
source ./skills/create/scripts/bootstrap-originmind-env.sh
用户安装:
. "$HOME/.cursor/skills/create/scripts/bootstrap-originmind-env.ps1"
MISSING_KEY
→ OAuth:
. ./skills/create/scripts/setup-oauth.ps1
,或 app.originmind.ai → API key。不要在聊天中 Read
.env
。
绝不打印完整密钥。PowerShell:绝不要将
$pid
用作 project id——请使用
$ProjectId
。

Standby executor

待机执行器

  1. Bootstrap.
  2. Echo: standby, poll 10s, scope = all projects (user-wide pending execute), triggers =
    /execute
    ≡
    /build
    .
  3. Enter poll loop. Do not invent a default project for listing.
Optional filter only when user names
task_id
/
conversation_id
/
project_id
.
  1. 初始化。
  2. 输出:待机,每 10 秒轮询一次,范围 = 所有项目(用户范围的待处理 execute),触发器 =
    /execute
    ≡
    /build
    。
  3. 进入轮询循环。列出任务时,不要自创默认项目。
仅当用户指定
task_id
/
conversation_id
/
project_id
时使用可选过滤条件。

Poll loop (every 10s)

轮询循环(每 10 秒)

standby:
  idle_since = now
  loop:
    GET /api/v1/tasks?status=pending&task_type=execute
    if data[] non-empty:
      idle_since = now
      for each task → Execute task
      echo one-line summary; continue (do not exit)
    else:
      if now - idle_since >= 3 minutes → exit ("idle timeout")
    if user says stop → exit
    sleep 10
ExitWhen
User stopstop, enough, quit,
/execute stop
,
/build stop
Idle timeout3 minutes with no pending tasks
Billing402 / 429
Keep-on: stay in standby; do not treat as stop.
standby:
  idle_since = now
  loop:
    GET /api/v1/tasks?status=pending&task_type=execute
    if data[] non-empty:
      idle_since = now
      for each task → Execute task
      echo one-line summary; continue (do not exit)
    else:
      if now - idle_since >= 3 minutes → exit ("idle timeout")
    if user says stop → exit
    sleep 10
退出何时
用户停止stop、enough、quit、
/execute stop
、
/build stop
空闲超时连续 3 分钟没有待处理任务
计费402 / 429
**Keep-on:**保持待机;不要视为停止。

Execute task

执行任务

Use
conversation_id
and
project_id
from the task row
.
  1. Claim:
    PATCH
    { "conversation_id", "action": "claim" }
    — 409 skip.
  2. Context (optional): messages/transcript for that conversation. Read
    params.kind
    ,
    params.instruction
    .
  3. Branch on
    params.kind
    :
    kindAction
    codeImplement in the workspace from
    instruction
    (+ optional transcript). Match repo conventions. No code dumps in the report.
    contentWrite a creative document (plan, statement, brief, etc. — not source code).
    POST /api/v1/creations
    with
    { project_id, title, content, status: "saved" }
    (same pattern as save-creation). Capture returned creation
    id
    .
  4. Complete:
    json
    {
      "conversation_id": "{task.conversation_id}",
      "action": "complete",
      "results": {
        "content": "decision-level summary of what was done — no diffs, no syntax",
        "sources": [],
        "creation_id": "{uuid — content kind only, omit for code}"
      }
    }
  5. Fail:
    PATCH
    "action": "fail"
    +
    "error"
    .
  6. Echo task id, project id, conversation id, kind (
    code
    |
    content
    ), one-line summary.
使用任务行中的
conversation_id
和
project_id
。
  1. 认领:
    PATCH
    { "conversation_id", "action": "claim" }
    ——遇到 409 时跳过。
  2. **上下文(可选):**该 conversation 的 messages/transcript。读取
    params.kind
    、
    params.instruction
    。
  3. 根据
    params.kind
    分支处理:
    kind操作
    code根据
    instruction
    (+ 可选 transcript)在工作区中实现。遵循仓库约定。报告中不要转储代码。
    content撰写创意文档(计划、声明、简介等——不是源代码)。
    POST /api/v1/creations
    ,请求体为
    { project_id, title, content, status: "saved" }
    (与 save-creation 模式相同)。获取返回的 creation
    id
    。
  4. 完成:
    json
    {
      "conversation_id": "{task.conversation_id}",
      "action": "complete",
      "results": {
        "content": "decision-level summary of what was done — no diffs, no syntax",
        "sources": [],
        "creation_id": "{uuid — content kind only, omit for code}"
      }
    }
  5. 失败:
    PATCH
    "action": "fail"
    +
    "error"
    。
  6. 输出 task id、project id、conversation id、kind(
    code
    |
    content
    )及一行摘要。

Errors

错误

CodeAction
MISSING_KEY / 401Fix API key
404Wrong ids
409Skip; re-list next poll
402 / 429Stop — https://app.originmind.ai/
Code操作
MISSING_KEY / 401修复 API key
404ids 错误
409跳过;下次轮询时重新列出
402 / 429停止——https://app.originmind.ai/

More detail

更多信息

  • HTTP examples: reference.md
  • HTTP 示例:reference.md