Reset

From Chanw-research/claude-code-paper-writing · View interactive version

Reset is an AI agent skill from the GitHub repository Chanw-research/claude-code-paper-writing. 按 scope 重置 wiki 到干净 scaffold(wiki / raw / log / checkpoints / all)。适用于开发迭代或 setup 失败后的无痛重启。

How to use this skill

Skill file

/reset

按 scope 重置 wiki 到干净 scaffold。设计目的是开发迭代和 setup 失败恢复 — 不是日常操作。

Trigger

手动:/reset --scope wiki / --scope raw / --scope log / --scope checkpoints / --scope all。可用逗号组合多个 scope:--scope wiki,log。

Inputs

Outputs

Wiki Interaction

读取

写入

Workflow

前置条件:当前目录包含 wiki/、tools/。WIKI_ROOT=wiki/。

Step 1: 构造删除计划(dry-run)

python3 tools/reset_wiki.py --scope <scope>

该命令打印 JSON 计划,列出将要删除或重置的全部文件,不修改任何东西。按 scope 分组展示给用户(wiki entity 目录、raw 子目录、log、checkpoints)。

Step 2: 与用户确认

打印计划摘要并请求显式确认:

About to delete N files and reset M files. Continue? [y/N]

用户拒绝则退出。未经明确许可不得执行 — /reset 是破坏性操作,raw/ 的删除不可恢复。

Step 3: 执行

python3 tools/reset_wiki.py --scope <scope> --yes

工具打印 JSON 状态报告({deleted_files, reset_files})。

Step 4: 记录日志(除非已重置 log)

若执行的 scope 不包含 log,追加一条日志:

python3 tools/research_wiki.py log wiki/ "reset | scope: <scope>"

Step 5: 报告

打印结果并建议下一步:

## Reset complete — scope: <scope>

Deleted: N files
Reset:   M files

Next steps:
- /init       — 从 raw/ 引导 wiki
- /prefill    — 沉淀基础背景知识
- /ingest     — 手动添加单个来源

Constraints

Error Handling

Dependencies

工具(通过 Bash)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.