Tianshu Harness is a TypeScript runtime for coding agents, with terminal and desktop interfaces that share an agent core for managing goals, state, evidence, permissions, and completion checks. Developers use it to have language models carry out software tasks while the runtime verifies progress through tests, diffs, or other commands. The catalogue entries are skills and instructions for the agent's coding workflow.
Borrowing it
Nothing to install: this file belongs to huiliyi37/Tianshu-harness. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/huiliyi37/Tianshu-harness/main/CLAUDE.mdgit clone --depth 1 https://github.com/huiliyi37/Tianshu-harnessWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/huiliyi37/tianshu-harness/claude-md)<a href="https://agentmods.dev/instructions/huiliyi37/tianshu-harness/claude-md"><img src="https://agentmods.dev/badge/instructions/huiliyi37/tianshu-harness/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/huiliyi37/tianshu-harness/claude-md"><img src="https://agentmods.dev/badge/instructions/huiliyi37/tianshu-harness/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.06395 | $0.06395 |
| Opus 5.5 | $0.02558 | $0.02558 |
| Sonnet 5.5 | $0.01279 | $0.01279 |
| Haiku 4.5 | $0.00639 | $0.00639 |
Grade A, and why
Tianshu-harness CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
天枢 (Tianshu) / Rivet
Terminal coding agent optimized for DeepSeek V4 prefix cache. Node.js 24.x ≥24.22.1 or 26.x ≥26.12.1 (engines enforces patched lines) / TypeScript strict / 纯 ANSI 终端 UI(src/tui/engine/,零 React/Ink 渲染) / node:test。桌面端 desktop/(Tauri + React,闭源)与 VS Code/Cursor 插件 vscode-extension/(开源,随 sync 进公开仓)均经 src/server/ sidecar 驱动同一内核。CLI 命令仍为 rivet。插件打包/发布见 docs/VSCODE-EXTENSION-RELEASE.md。
顶层索引与运行时排查:AGENTS.md。架构总览:docs/architecture-overview.md。
Build & Test
npm install && npm run build
npm test # ~1,600 test files / ~19,000 cases(静态声明口径,2026-09-30 快照见 docs/engineering-metrics.md), node:test + node:assert/strict (runner: scripts/run-node-tests.ts,分批 spawn,末尾 tests 行只是最后一批)
npm run typecheck # 跨进程闸门:并发会话检查同一份源码时只跑一次,其余复用(秒回 = 命中缓存,不是没跑)
# 指纹 = git HEAD + 脏文件内容 hash;逃生口 typecheck:direct 或 RIVET_TYPECHECK_SHARE=0
Architecture
main.ts → AgentLoop (agent/loop.ts)
├── RuntimeHookPipeline (agent/runtime-hooks.ts) ← TUI 2.x 核心
│ 纯分阶段执行器 + 错误隔离(任一 hook 抛错只走 onError,不中断 turn)
│ 5 阶段真实调用点(非概念,已钉在 loop 主路径):
│ preTurn / afterPerception → turn-perception.ts
│ postTool → tool-execution.ts(每个工具执行后)
│ runCompaction → turn-orchestrator.ts(postTool 后、postTurn 前)
│ postTurn → turn-completion.ts
│ postSession → loop.ts(经 turn-orchestrator 调度)
│ hooks 由 createDefaultRuntimeHooks() 条件装配(create-runtime-hooks.ts),
│ 60+ 模块(src/agent/hooks/),按 deps/开关 gated。默认会话实际激活 ~18+:
│ 常驻 8(base 数组无条件):perception, signal-consumer, kick,
│ vigor×2(afterPerception+postTool), theta, stigmergy, radio
│ advisoryBus 恒构造(loop.ts) → 这批默认全开:self-verify、edit-tool-advisory、
│ lossy-observation、spec-verify-gate、typecheck-reminder、todo-reminder、
│ security-pattern(写后正则查危险模式;config agent.securityGuidance=false
│ 或 RIVET_SECURITY_GUIDANCE=0 关)、
│ context-pressure(需 token getter)、dedup-guard(需 streamedText getter)
│ deps-gated(默认多为真):playbook-reflect、anchor-break-shadow、dream/skill-distill、
│ meridian、telemetry-flush、physarum-file-access、memory-learning、courage/ccr(starSoul)
│ 默认关(opt-in):songline、constellation、hearth-observe、companion、
│ dispatcher(自动委派)、anchor-break-scout、mcts-planning/blind-exploration(antiAnchoring)
├── AgentSession (messages, usage, turn count)
├── EvidenceTracker + FileHistory
├── Stores: claim-store, stigmergy-store, playbook-store, trace-store
└── Tool dispatch → API (SSE streaming) → TUI (纯 ANSI, src/tui/engine/) / Desktop (server SSE)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago Changed · +13 tokens per session ff1edc9505d0
- 17d ago Changed · +22 tokens per session a542aa28279c
- 18d ago Changed ebbe71d54355
- 20d ago Changed · +1 lines · +350 tokens per session c860851817d9
- 28d ago Changed · +1 lines · +1,036 tokens per session 268f3d587b77
- 1mo ago Changed · +203 tokens per session a255f6f17f0f
- 1mo ago Changed b9a536c2b4d2
- 1mo ago First seen · 92 lines · 4,771 tokens per session scan A 06f49538bd99
Tianshu-harness CLAUDE.md is an instructions file published in the GitHub repository huiliyi37/Tianshu-harness (1,153 stars, last pushed 2d ago), licensed Apache-2.0. It adds 6,395 tokens to every session, about $0.0256 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.