Skip to content

momo-land/PHD-management-skills / skills/phd-manager

phd-manager

Verified

在 PHD-management-skills 中管理科研工作台,直接响应当前 AI 对话里的“一键更新”“一键导入”“更新论文进度”“更新实验进度”“生成周报”等短口令。读取当前对话与本地记录,执行相应技能并同步网页,也支持初始化和梳理研究下一步。

references/batch-workflow.md

View on GitHub
# 对话更新与材料导入的批量写入

遵循 [本地操作约定](local-workflow.md)。批次内容由当前 AI 根据用户授权和实际材料生成,不依赖模型 API 或某个客户端专属指令。

## 操作协议

```text
node cli.mjs batch --file <json-file> --dry-run
node cli.mjs batch --file <json-file>
```

`--file -` 可接收标准输入。顶层对象仅需 `operations`,含 1–100 个顺序执行的操作:

```json
{
  "operations": [
    {
      "action": "create",
      "collection": "tasks",
      "data": {
        "id": "new-task-id",
        "projectId": "existing-project-id",
        "title": "用户明确要求登记的任务",
        "status": "todo",
        "origin": "user"
      }
    },
    {
      "action": "update",
      "collection": "papers",
      "id": "existing-paper-id",
      "data": { "version": 3, "status": "revising" }
    }
  ]
}
```

示例中的 ID/version 必须替换为真实上下文。先 list 定位已有记录,移除无变化操作,合并同一记录的多次改动为一次 update,保留原 notes、关联数组及未变字段。不得把已有记录作为 create 再导入。

- 支持 `create` 和 `update`,不含删除。create 的 `data.id` 可省略;后项要引用新记录时,应先生成合法、未占用的稳定 ID,显式写入前项 `data.id`。
- 仅可引用已有记录或当前批次前面已创建的记录,不支持前向引用。新建项目、会议等父记录排在关联记录之前;论文和实验需要双向关联时先建论文,再建实验,再以 version 1 更新该新论文的关联。
- update 的 `id` 是操作级字段,`data.version` 是刚读取的版本;同批 create 初始 version 为 1。不要把版本当作能任意递增的冲突绕过手段。
- 一次批次的数据库变更整体成功或全部回滚,包括活动日志;事务不包含稿件等文件操作。若候选超过 100 项,可按依赖拆成多批,但多批之间不是一个事务;保存前备份,逐批回读并报告准确完成范围,不能宣称全部材料原子导入。

## 预检不是提交

预检成功返回 `{ok:true,dryRun:true,applied:0,results:[...]}`;正式成功返回 `dryRun:false` 及实际 `applied` 数。`results` 含每项 index/action/collection/record。预检回滚所有写入,临时生成的随机 ID 和时间不会保留,因此不要拿预检自动分配的 ID 去构建后项或向用户报告“已保存”。

用户已要求一键更新/导入时,事实明确部分在预检通过后直接正式执行,无需重复批准。版本在正式执行时仍会重新检查;遇冲突先回读并判断变化,不能把预检成功视为无条件提交许可。错误会说明失败项,整批均未保存。

正式成功后,通过 list/state 回读核对变化、来源和关联。回读失败时说明提交返回的结果与当前核验限制,勿直接重试 create;先查明已有落地情况。网页已打开时会自动刷新共享状态,CLI 无需等待服务器运行。
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall