by huiliyi37
天枢harness是一个的终端编程智能体,它要回答的核心问题是:模型何以稳定地交付——目标不漂移、完成有证据、验证有闭环,不说"应该修好了"。为此它在模型与真实世界之间建立一层认知执行环境(CVM),把目标、状态、证据、资源、权限与终止条件从对话历史中外部化,由运行时持续管理。同时对deepseek v4极度优化。
# Add to your Claude Code skills
git clone https://github.com/huiliyi37/Tianshu-harnessGuides for using ai agents skills like Tianshu-harness.
Last scanned: 8/18/2026
{
"issues": [
{
"file": "README.md",
"line": 153,
"type": "dangerous-command",
"message": "Dangerous command (disables permission prompts): \"--dangerously-skip-permissions\"",
"severity": "medium"
}
],
"status": "PASSED",
"scannedAt": "2026-08-18T04:34:10.022Z",
"npmAuditRan": false,
"pipAuditRan": true,
"promptInjectionRan": true
}See how Tianshu-harness compares with popular alternatives.
Tianshu-harness is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by huiliyi37. 天枢harness是一个的终端编程智能体,它要回答的核心问题是:模型何以稳定地交付——目标不漂移、完成有证据、验证有闭环,不说"应该修好了"。为此它在模型与真实世界之间建立一层认知执行环境(CVM),把目标、状态、证据、资源、权限与终止条件从对话历史中外部化,由运行时持续管理。同时对deepseek v4极度优化。. It has 1,344 GitHub stars.
Yes. Tianshu-harness passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/huiliyi37/Tianshu-harness" and add it to your Claude Code skills directory (see the Installation section above).
Tianshu-harness is primarily written in TypeScript. It is open-source under huiliyi37 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh Tianshu-harness against similar tools.
No comments yet. Be the first to share your thoughts!
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
模型的能力上限不等于它的运行行为。同一套权重放进真实工程会话,会被质疑就让步、只照字面执行、让局部信息压过全局目标,或者反复调用工具却没有推进,最后留下一句「应该修好了」。
天枢是一个 TypeScript 编写的编程 agent 运行时,终端 TUI、桌面端和 VS Code 插件共用同一个内核。它在模型和真实世界之间加了一层认知执行环境 CVM(Cognitive Virtual Machine),把目标、状态、证据、权限和终止条件从对话历史里拿出来,交给运行时持续管理:
TaskContract,记录目标、范围、约束和成功标准。长会话里的目标由运行时持有,不依赖模型「记得」。deliver_task 只做归属限定的安全提交——所有权、跨会话冲突、版本一致性不合格就拦下;验证缺口如实披露但不阻断、也不冒充质量背书。定向验证用 run_tests(显式范围),独立审查用 review_changes 或 /review。[!NOTE] 开发代号是 Rivet。CLI 主命令是
tianshu,rivet是同一入口的兼容别名;数据目录仍为~/.rivet。
终端 CLI(Node.js 24.x ≥ 24.22.1 或 26.x ≥ 26.12.1)
npm install -g tianshu-harness
tianshu
看到 〉 提示符即就绪。首次启动会自动打开 /connect 向导,选服务商、粘贴 API Key。
桌面端(无需 Node)
从 Releases 下载:
.dmg,Apple Silicon / Intel-setup.exe.AppImage[!WARNING] Node.js 版本硬门槛(v3.36.0 起):CLI 仅支持 Node 24.22.1+(24.x 线)或 26.12.1+(26.x 线)。 Node 22 / 23 / 25 / 27、24.x < 24.22.1、26.x < 26.12.1 会在启动时被安全闸门拒绝;
/update可能已经装上新包,但新 CLI 仍无法启动。先运行node -v,不满足时用 nvm / fnm / Volta 或 nodejs.org 升级后再安装。node -v # 需要 v24.22.1+ 或 v26.12.1+
# macOS / Linux
bash <(curl -fsSL https://raw.githubusercontent.com/huiliyi37/Tianshu-harness/main/scripts/install-tui.sh)
# Windows(PowerShell)
powershell -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/huiliyi37/Tianshu-harness/main/scripts/install-tui.ps1 | iex"
从旧包 tianshu-tui 迁移时会因 rivet 命令链接冲突报 EEXIST,先执行 npm uninstall -g tianshu-tui。一键安装脚本会自动处理。
xattr -cr /Applications/Tianshu.app。应用内自动更新不受影响。windows-repair 目录下的 repair-webview2.cmd。libwebkit2gtk-4.1 与 libgtk-3。推荐 X11 会话,Wayland 尚未验证。chmod +x Tianshu_*.AppImage 后直接运行。Android Termux、源码构建、Shell 补全和自动更新见 安装指南。
先让它只读地认识你的项目,确认读得准,再给一个多步任务:
〉 阅读这个项目,告诉我它的结构、入口在哪、以及一处最值得改进的地方
〉 修复这个项目里第一个失败的测试,并说明根因
它会自己搜索、读文件、改代码、跑测试。默认权限档是自动:低风险动作直接执行,高风险动作停下来问你。做完之后看三处:
| 看哪里 | 看什么 |
|---|---|
| 交付报告 | 交付门状态(GREEN / YELLOW / RED)、改动的文件、跑过的验证、逐条完成度审计 |
/cockpit 驾驶舱 |
8 面板运行时仪表:验证与交付、提醒台账、缓存命中与成本、风险与空转(F4) |
sensorium.jsonl |
每个回合的状态感知与 CVM 判定记录。tianshu logs 列出路径,可用 jq 复算 |
tianshu -p "解释 src/agent/loop.ts" # 单次提示
tianshu --stream-json -p "重构这个模块" # NDJSON 事件流,输出内置脱敏
tianshu --goal "修复所有类型错误" --budget 50 # 目标驱动的自主续跑
参数全表和子命令见 用户手册。
经过指令与偏好对齐的模型,在 agent 场景下会呈现相似的运行时退化,我们称之为 Cognitive Anchor Collapse:一个高显著性的局部信号让策略过度集中,全局目标和后续证据失去权重,行为向这个锚点坍缩。Prompt 是信息,不是状态,它本身也会变成新的锚点,所以这类问题靠写更好的提示词治不了。
CVM 不改权重,也不把模型变成确定性程序,而是在概率认知外面加一层确定性监督。模型在内环里推理和行动,运行时在外环里度量、把关、验证,决定继续、纠偏还是停下:
内环 · 模型认知 reason → decide → act → observe
外环 · 运行时监督 observe → measure → evaluate → gate → verify → continue / correct / halt
| 层 | 机制 | 作用 |
|---|---|---|
| 1 · 信念宪法 | 星域信念块,写入静态提示词 | 零额外推理成本,在分析和建议阶段改变倾向 |
| 2 · Courage Hook | preTurn 阶段,阈值随星域变化 |
检测到连续让步时,注入带义务语义的纠偏指令 |
| 3 · Sensorium | 每回合由已有监控信号计算,不调用 LLM | 感知动量、压力、验证覆盖、复杂度、熟悉度、稳定性六个维度 |
| 4 · RuntimeHookPipeline | 75 个 hook 模块,五个阶段,按会话条件装配 | 收敛与 doom-loop 检测、证据追踪、交付门、编辑失败恢复等 |
| 锚点 | 来源 | 典型表现 |
|---|---|---|
| 词汇锚点 | 训练数据里的词与行为相关性 | 句子里有「修复」,就无视「不要改,只解释」去改代码 |
| 语义锚点 | 局部正确的事实 | 「文件已存在」被当成整个任务的解释中心,拒绝执行 |
| 策略锚点 | RLHF / 偏好训练先验 | 一句「按你的计划执行」,分析阶段的高质量判断就被丢弃 |
| 历史锚点 | 长上下文里的早期结论 | 第 20 轮的新证据被解释成第 3 轮旧假设的附属 |
八条设计原则和开放的研究问题见 CVM:从 Transformer 共享退化到认知运行时,系统分层见 架构总览。
天枢以前缀缓存优先设计:会话内冻结前缀,只追加增量,压缩只发生在用户回合边界。上图是一个 4.2 小时的真实会话,15 次前缀重建总共只产生 383K cacheCreate,占全部 input 的 0.33%。
| 5 个真实自举会话(2026-08,DeepSeek V4) | 数值 |
|---|---|
| 请求数 / input tokens | 2,001 次 / 6.45 亿 |
| 整体缓存命中率 | 99.3–99.6% |
| 估算成本(刊例价) | 无缓存 ¥879.97 → 实际 ¥19.96,节省 97.7% |
缓存引擎对所有支持前缀缓存的模型生效,目前公开的实测只覆盖 DeepSeek。每个数字都附 jq 复算命令,见 指标观测 harness。
最典型的是 T4。面对「文件已存在」的矛盾,A 组写了 196 行复盘文档后拒绝执行,B 组判断出用户的真实意图,交付了 +162 / −20 行可用代码。
这是一个小样本试点:5 个任务、单一模型、LLM 审查。它也测出了衰减,信念在分析和建议阶段有效,到确认和执行阶段明显减弱,