research

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Research

研究

Two modes
ModeWhenWhat
Standby executor
/research
,
/research keep on
Claim pending rows, research locally, PATCH complete
Queue for voice
/research queue …
, “park this for the mentor”, “queue research for voice”
POST
a
pending
research task on best-effort project + latest substantive conversation
Park content without a thread: do not invent an inbox. Use save-to-reference (document on the shelf). Voice research pickup requires a real
conversation_id
.
Not this skill: planning, “help me research X” in chat without
/research
/ queue. Use normal tools or save-to-reference.
Repo is ambient: Cursor workspace — no GitHub connection.
两种模式
模式使用时机操作
待机执行器
/research
、
/research keep on
认领待处理记录,在本地研究,并执行 PATCH complete
为语音排队
/research queue …
、“为导师暂存此内容”、“为语音排队研究”
基于尽力确定的项目和最近一次有实质内容的会话,POST 一个
pending
研究任务
在没有会话线程时暂存内容: 不要臆造收件箱。使用 save-to-reference(将文档存放到资料架)。语音研究提取需要真实的
conversation_id
。
不适用于此技能: 规划、在聊天中提出“帮我研究 X”但没有
/research
/ queue 触发条件。使用常规工具或 save-to-reference。
Repo 是环境上下文: Cursor 工作区——无 GitHub 连接。

Triggers

触发条件

  • /research
    — start standby executor
  • /research keep on
    — same; explicit keep-on
  • /research queue <query>
    — create pending task for voice
  • “queue research…”, “park this for the mentor/voice”, “for next voice session” → queue mode (or save-to-reference if no conversation)
  • After a task completes, keep on / I know / similar → stay in standby
  • /research
    ——启动待机执行器
  • /research keep on
    ——同上;显式保持开启
  • /research queue <query>
    ——为语音创建 pending 任务
  • “queue research…”、“为导师/语音暂存此内容”、“用于下一次语音会话”→ queue 模式(如果没有会话,则使用 save-to-reference)
  • 任务完成后,keep on / I know / 类似表达 → 保持待机

API

API

  • Base URL:
    https://api.originmind.ai
  • GET /api/v1/tasks?status=pending&task_type=research
    →
    { data: [...] }
    (user-wide standby)
  • POST /api/v1/tasks
    — create pending (queue mode)
  • GET /api/v1/projects
    ,
    GET /api/v1/projects/{projectId}/conversations
  • GET /api/v1/messages/{conversationId}
    — flat array
  • GET /api/v1/conversations/{conversationId}/transcript
    — optional
  • PATCH /api/v1/tasks/{id}
    —
    claim
    |
    complete
    |
    fail
    (body requires
    conversation_id
    )
  • Auth:
    X-OriAI-Api-Key
    or Bearer JWT
  • 基础 URL:
    https://api.originmind.ai
  • GET /api/v1/tasks?status=pending&task_type=research
    →
    { data: [...] }
    (用户级待机范围)
  • POST /api/v1/tasks
    ——创建 pending(queue 模式)
  • GET /api/v1/projects
    、
    GET /api/v1/projects/{projectId}/conversations
  • GET /api/v1/messages/{conversationId}
    ——扁平数组
  • GET /api/v1/conversations/{conversationId}/transcript
    ——可选
  • PATCH /api/v1/tasks/{id}
    ——
    claim
    |
    complete
    |
    fail
    (请求体需要
    conversation_id
    )
  • 认证:
    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
用作项目 ID——请使用
$ProjectId
。

Queue for voice (Cursor → pending → mentor)

为语音排队(Cursor → pending → mentor)

When the user wants research for the voice mentor (next session / later turn), create a task — do not only answer in Cursor chat.
当用户希望为语音导师进行研究(下次会话/稍后轮次)时,创建任务——不要只在 Cursor 聊天中作答。

Resolve project_id (best effort)

解析 project_id(尽力确定)

  1. User names
    proj_...
    or project name →
    GET /api/v1/projects
    .
  2. ORIGINMIND_CREATIVE_DNA_PROJECT_ID
    in env.
  3. .originmind/om_project.config.json
    → score
    projects[]
    per search-creative-dna; use if ≥80%.
  4. Else most recently updated project.
  1. 用户提供
    proj_...
    或项目名称 →
    GET /api/v1/projects
    。
  2. 环境变量
    ORIGINMIND_CREATIVE_DNA_PROJECT_ID
    。
  3. .originmind/om_project.config.json
    → 按照 search-creative-dna 对
    projects[]
    评分;得分 ≥80% 时使用。
  4. 否则选择最近更新的项目。

Resolve conversation_id (latest substantive)

解析 conversation_id(最近一次有实质内容的会话)

Same as fetch-recent-messages:
  1. GET /projects/{projectId}/conversations
    → sort
    updated_at
    desc.
  2. Walk first 5 rows;
    GET /messages/{id}
    until
    length > 0
    .
  3. If all empty → no queue. Tell the user: start a voice session, or park the note with save-to-reference. Do not invent an inbox.
与 fetch-recent-messages 相同:
  1. GET /projects/{projectId}/conversations
    → 按
    updated_at
    降序排列。
  2. 遍历前 5 行;执行
    GET /messages/{id}
    ,直至
    length > 0
    。
  3. 如果全部为空 → 不排队。告知用户:启动语音会话,或使用 save-to-reference 暂存笔记。不要臆造收件箱。

Create pending

创建 pending

json
POST /api/v1/tasks
{
  "project_id": "proj_...",
  "conversation_id": "{uuid}",
  "task_type": "research",
  "params": { "query": "precise gap", "depth": "quick" }
}
Use
depth: "deep"
only when the user asks for thorough work.
Echo: task id, project id, conversation id, query. Then either:
  • enter standby and execute it now (if user also wants
    /research
    / keep-on), or
  • stop after queue if they only asked to park for voice (mentor consumes completed results next session — another Cursor
    /research
    standby must still run to complete the row).
If the user already has research results in chat and only wants them on the shelf for later: save-to-reference — not a research task.

json
POST /api/v1/tasks
{
  "project_id": "proj_...",
  "conversation_id": "{uuid}",
  "task_type": "research",
  "params": { "query": "precise gap", "depth": "quick" }
}
仅当用户要求彻底开展工作时,才使用
depth: "deep"
。
回显:任务 ID、项目 ID、会话 ID、查询内容。然后任选其一:
  • 进入**待机(standby)**并立即执行任务(如果用户还要求
    /research
    / keep-on);或
  • 如果用户只是要求为语音暂存,则排队后停止(导师会在下次会话中读取已完成的结果——仍需另一个 Cursor
    /research
    standby 才能完成该记录)。
如果用户已经在聊天中获得了研究结果,且只想将其暂存到资料架供以后使用:请使用 save-to-reference,而不是创建研究任务。

Standby executor

待机执行器

  1. Bootstrap.
  2. Echo: standby, poll 10s, scope = all projects (user-wide pending).
  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 秒轮询一次,范围 = 所有项目(用户级 pending)。
  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=research
    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,
/research 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=research
    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、
/research stop
空闲超时连续 3 分钟没有 pending 任务
计费402 / 429
保持开启: 保持待机;不要将其视为停止。

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.query
    ,
    params.depth
    .
  3. Research — repo-first, then web:
    SignalAction
    Architecture, codebase, implementation in this workspaceRepo-first
    External docs, papers, competitors, public APIsWeb (or repo then web)
    AmbiguousRepo-first; web if repo cannot answer
    Repo order: semantic search → grep → read → glob (only if path unknown). Do not answer from memory alone.
    Synthesize for the voice mentor — structure/decisions, path citations, no file dumps. Repo
    sources[]
    use relative paths; web
    sources[]
    use URLs.
  4. Complete:
    json
    {
      "conversation_id": "{task.conversation_id}",
      "action": "complete",
      "results": {
        "content": "markdown or plain report",
        "sources": [{ "title": "...", "url": "...", "snippet": "..." }]
      }
    }
  5. Fail:
    PATCH
    "action": "fail"
    +
    "error"
    .
  6. Echo task id, project id, conversation id, scope (
    repo
    |
    web
    |
    repo+web
    ), one-line summary.
使用任务记录中的
conversation_id
和
project_id
。
  1. 认领:
    PATCH
    { "conversation_id", "action": "claim" }
    ——遇到 409 时跳过。
  2. 上下文(可选): 获取该会话的消息/转录。读取
    params.query
    、
    params.depth
    。
  3. 研究——repo-first,然后 web:
    信号操作
    架构、代码库、当前工作区中的实现Repo-first
    外部文档、论文、竞争对手、公共 APIWeb(或先 repo 后 web)
    含义不明确Repo-first;如果 repo 无法回答,则使用 web
    Repo 顺序:semantic search → grep → read → glob(仅当路径未知时)。不要仅凭记忆作答。
    为语音导师综合整理结果——呈现结构/决策和路径引用,不要转储文件。Repo 的
    sources[]
    使用相对路径;web 的
    sources[]
    使用 URL。
  4. 完成:
    json
    {
      "conversation_id": "{task.conversation_id}",
      "action": "complete",
      "results": {
        "content": "markdown or plain report",
        "sources": [{ "title": "...", "url": "...", "snippet": "..." }]
      }
    }
  5. 失败:
    PATCH
    "action": "fail"
    +
    "error"
    。
  6. 回显任务 ID、项目 ID、会话 ID、范围(
    repo
    |
    web
    |
    repo+web
    )及一行摘要。

Errors

错误

CodeAction
MISSING_KEY / 401Fix API key
404Wrong ids
409Skip; re-list next poll
402 / 429Stop — https://app.originmind.ai/
No conversationDo not POST; redirect to voice session or save-to-reference
代码操作
MISSING_KEY / 401修复 API key
404ID 错误
409跳过;在下一次轮询时重新列出任务
402 / 429停止——https://app.originmind.ai/
无会话不要 POST;引导用户前往语音会话或使用 save-to-reference

More detail

更多细节

  • HTTP examples, stuck tasks, repo output: reference.md
  • HTTP 示例、卡住的任务、repo 输出:reference.md