shimen (CLI)
师门 standalone CLI — multi-agent research collaboration that actually calls every agent.
Plugin 版(prose-based)在 opencode / CodeWhale 里有个根本问题:LLM 会偷懒、跳过严师、不真并行调多 agent。这个 CLI 绕开它——orchestrator 是 Python 代码,agent 的调用顺序和并行都写死,LLM 没机会跳过。
安装
pip install shimen
需要 Python 3.10+。
快速开始
两层配置,一次全局 + 每个项目一次:
# === 全局配置 (装完跑一次) ===
shimen setup # 选 provider, 写 ~/.shimen/profile.yaml
export DEEPSEEK_API_KEY=sk-... # 设 API key
shimen check # 烟雾测试 API 通了
# === 项目初始化 (每个论文项目都跑一次) ===
cd ~/papers/my-paper # cd 到你的论文目录
shimen init # 写 ./.shimen/project.yaml
# 问: 标题 / 方向 / 目标期刊 / frozen 词表
# frozen 词表 = paper-polisher 绝不会动的词
# 比如你的专有名词 / 缩写 / 变量符号
# === 跑 ===
shimen auto paper.docx # 端到端 audit → polish, 浏览器自动开
第一次跑 shimen init 时, 如果还没配过全局 provider, 会自动先弹一遍 setup。
Provider 支持
| Provider | 默认模型 | 严师专用 (reasoner) | 成本 ($/M in / out) |
|---|---|---|---|
| deepseek | deepseek-chat | deepseek-reasoner | 0.27 / 1.10 |
| xiaomi-mimo | mimo-chat | — | ~ deepseek |
| openai | gpt-4o-mini | o1-mini | 2.5 / 10 |
所有 provider 都用 OpenAI-compatible API,配 base_url 即可。
命令
| 命令 | 作用 |
|---|---|
shimen setup |
全局配置 provider / API key / 默认期刊。装完跑一次 |
shimen init |
项目初始化, 写 ./.shimen/project.yaml (含 frozen vocabulary) |
shimen check |
烟雾测试 API |
shimen auto-start IDEA |
★ 端到端: ideate → simulate scaffold → draft → audit → polish → typeset |
shimen ideate "想法" |
选题: arXiv+CrossRef 真实扫文献 → 师姐 brainstorm → 严师可行性 → 审稿人 impact。出 topic_proposal.md |
shimen scout "query" |
单独扫 arXiv + CrossRef, 看相关工作 |
shimen simulate topic.md [--run] |
生成 sim_skeleton.py; --run 自动跑出 results.json + fig_main.pdf |
shimen figure results.json "Fig 2: DOCP vs Cn^2" |
数据 + 自然语言描述 → matplotlib 代码自动跑 → fig_main.pdf |
shimen draft outline.md |
从 outline / topic 起草 docx_v0 (自动注入 results.json 的真实数字) |
shimen audit FILE.docx |
claim-auditor framing 审计 (1 次调用) |
shimen polish FILE.docx |
11 agent polish 全循环 |
shimen auto FILE.docx |
audit + polish 链 (中等粒度入口) |
shimen read paper.pdf [...] |
读 PDF 入 literature-ledger |
shimen typeset polished.docx |
LaTeX → final.pdf |
shimen dashboard --cwd . |
浏览器看历史 sandbox |
shimen version |
显示版本 |
端到端 — 一条命令搞定整篇
shimen auto-start 硅光 深度学习 # 多领域融合, 师姐自己找方向
内部依次跑(每阶段产物保存可恢复):
1. ideate 师姐 brainstorm + 学生拟 2 候选 + 严师可行性 + 审稿人 impact
→ topic_proposal.md (灌水主题硬拒绝)
2. simulate 生成 sim_skeleton.py + sim_skeleton.md (用户自己跑, 回填 results.json)
3. draft paper-polisher 从 topic 展开 6 节 prose
→ <project>_v0.docx
4. audit claim-auditor framing 检查
MAJOR_REFRAME 默认停 (--force 强行继续)
5. polish 12 agent full loop
→ <project>_v0_polished.docx
6. typeset LaTeX → final.pdf (需要 xelatex, 无则跳过)
中途任何阶段都能从中间起:
shimen auto-start --from-topic topic_proposal.md # 跳过 ideate
shimen auto-start --from-outline outline.md # 跳过 ideate
shimen auto-start --from-docx my_existing.docx # 只跑 audit + polish + typeset
shimen auto-start "想法" --skip-sim --skip-typeset # 只跑 ideate + draft + polish
或者分步走(每步看一眼再决定):
shimen read ref1.pdf ref2.pdf # 入 ledger
shimen ideate "我的想法" # 选题
shimen simulate topic_proposal.md # 生成仿真骨架
python sim_skeleton.py # 你跑仿真, 回填 results.json
shimen draft topic_proposal.md # 起草 docx
shimen audit my_paper_v0.docx # 审 framing
shimen polish my_paper_v0.docx # 全 loop
shimen typeset my_paper_v0_polished.docx # 出 PDF
跑通完整 auto-start 花费(用 deepseek 或 mimo-v2.5)大约 ¥3-5 一篇论文。
推荐工作流(一键端到端):
shimen auto paper.docx --venue "Nature Photonics"
# 内部:
# Phase 1/2 → audit (claim-auditor 1 次调用)
# verdict = ACCEPT_AS_IS → 自动接 Phase 2
# verdict = MINOR_REFRAME → 自动接 Phase 2 (跑完看 audit 报告做小调整)
# verdict = MAJOR_REFRAME → 停 (手动改 framing 再来, 或 --force 硬上)
# Phase 2/2 → polish (11 agents full loop, 浏览器实时看对话)
# 输出:
# paper_audit.md framing 报告
# paper_polished.docx
# _shimen_auto_<ts>/events.jsonl 两阶段全部对话流
如果想分步走 (debug / 想看 audit 后再决定要不要 polish),用单独的 shimen audit + shimen polish。
Agents(写死的调用顺序)
每段每一轮按这个顺序跑(Python 代码强制,LLM 跳不掉):
1. student-liaison — 翻译严师指令为可执行病灶
2. strict-mentor — 诊断 P0/P1/P2(用 reasoner model 如可用)
3. citation-verifier — 仅当段内有 [N] 才触发 (Introduction / Discussion 高频)
4. paper-polisher — 出 REVISED,遇到 SUSPICIOUS 引用标 [NEEDS_USER_CONFIRM]
5. integrity-sentinel — PASS/FLAG/HARD-STOP(HARD-STOP 回滚整轮)
6. ┌ peer-reviewer (温和派, lenient) ┐ ← asyncio.gather 真并行
└ peer-reviewer-strict (严厉派) ┘
7. conflict-arbitrator — 仅当 |lenient - strict| ≥ 1.5 才触发
8. Gate: 接受阈值 ? 接受 : 下一轮
跑完所有轮数仍未达标 →
9. postmortem-agent — 根因诊断, 不再 polish
全 doc 跑完 →
10. style-learner — 归纳本次 polish 用户偏好, 写 ~/.shimen/style-ledger.md
用户实时干预:浏览器 inject 表单提交后,orchestrator 在下一轮 agent 调用前
读 <sandbox>/intervention.jsonl,把 pending 消息拼到 user prompt 前面。
applied 之后写到 .intervention-applied.txt。
协议
events.jsonl 协议与插件版完全兼容,沙盒目录里的文件可以喂给插件的 tools/shimen-dashboard.py 看。详见 references/events-jsonl-protocol.md。
License
CC-BY-NC-4.0
Metadata
Release files for shimen 0.27.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shimen-0.27.3-py3-none-any.whl | Python 3 | none | any | Details for shimen-0.27.3-py3-none-any.whl |
Release files / shimen-0.27.3-py3-none-any.whl
| Download URL | shimen-0.27.3-py3-none-any.whl |
|---|---|
| Size | 397.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f2e3bb433de1d05ce73631f1f4f71050009d3f660d2e9230a10b7d587469065
|
|
BLAKE2b-256 checksum How to use checksums |
7ad54f37b589a4cebbb7087269a9631ad8667bb6a01bc60636ade64f2776a719
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 28, 2026.
Transparency logSecurity for shimen 0.27.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for shimen-0.27.3-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.