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.04771 | $0.04771 |
| Opus 5 | $0.02386 | $0.02386 |
| Sonnet 5 | $0.00954 | $0.00954 |
| Haiku 4.5 | $0.00477 | $0.00477 |
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 yesterday.
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 — 92 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+ (engines pins 24.18.0) / 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,133 test files / ~13,000 cases, 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.
- yesterday Changed b9a536c2b4d2
- 11d 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 (591 stars, last pushed today), licensed Apache-2.0. It adds 4,771 tokens to every session, about $0.0239 per session on Opus 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
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.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
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).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
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 oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).