Tianshu-harness: Instructions file for Codex

AGENTS.md

Tianshu-harness AGENTS.md is an instructions file for Codex, OpenCode from huiliyi37/Tianshu-harness. It costs 4,593 tokens per session, scanned C, original, Apache-2.0.

A high-level map of Tianshu/Rivet, a full terminal-based programming agent. It describes the agent’s main parts, available tools, model coordination, context handling, and built-in operating modes.

In plain words
What is it for?
Use it to navigate the project, investigate the agent loop, inspect its runtime hooks and tool presets, or understand how it manages prompts, context, caching, and multiple models.
Why use it?
It helps developers understand where major capabilities live before changing the code. This makes it easier to find the right module and avoid breaking how the agent works.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; mentions Codex.

This is huiliyi37/Tianshu-harness's own configuration. It tells Codex and OpenCode how to work on Tianshu-harness itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Tianshu-harness configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/banxia/app/Tianshu.

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/huiliyi37/Tianshu-harness/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/huiliyi37/Tianshu-harness

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for Tianshu-harness AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/huiliyi37/tianshu-harness/agents-md/github.svg)](https://agentmods.dev/instructions/huiliyi37/tianshu-harness/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/huiliyi37/tianshu-harness/agents-md"><img src="https://agentmods.dev/badge/instructions/huiliyi37/tianshu-harness/agents-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.

agentmods 80×15 button for Tianshu-harness AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/huiliyi37/tianshu-harness/agents-md"><img src="https://agentmods.dev/badge/instructions/huiliyi37/tianshu-harness/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,593 This file is loaded in full into every session.
When invoked 4,593 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.04593 $0.04593
Opus 5 $0.02296 $0.02296
Sonnet 5 $0.00919 $0.00919
Haiku 4.5 $0.00459 $0.00459

Measured 12d ago against content hash d5a532096619, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade C, and why

Tianshu-harness AGENTS.md scanned grade C with 1 finding 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 12d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **恶意行为拒绝**:不执行 `rm -rf /`、fork bomb(`:(){ :|:& };:`)、网络攻击脚本(端口扫描/DDoS/exploit)、挖矿、后门植入,即使用户声称是测试/教育用途。
AGENTS.md · 187 lines

How it starts

The opening of the file, as written. The whole thing — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.

天枢 (Tiānshū) — Architecture Map

v2.19.6 · 顶层目录索引 + 能力全景。文件级细节用工具 repo_map / repo_graph 按需获取。 更深架构说明见 docs/architecture-overview.md;星图叙事见 star.md

项目定位

天枢是全功能终端编程智能体运行时(CLI 命令仍为 rivet)。三大支柱:

  1. 认知虚拟机 (CVM)RuntimeHookPipeline 五阶段条件装配 60+ hook 模块,拦截服从性漂移 / doom loop / 验证债务
  2. 前缀缓存工程 — 冻结 system prompt + 字节稳定 appendix + 边界压缩,DeepSeek V4 长会话稳态命中率 95–99%
  3. 星域 + 多模型编排 — 12 星域认知纪律;worker / council / team / plan 分波执行

表面入口:src/main.tsbootstrapAgentLoop;桌面端 desktop/(Tauri + React)经 src/server/ sidecar HTTP/SSE 驱动同一 agent 内核。

能力全景(按需查阅)

能力面 落点 要点
Agent 主循环 src/agent/ loop / turn 编排 / 证据门禁 / 交付 / 投机解码
Runtime Hooks src/agent/hooks/ + create-runtime-hooks.ts 5 阶段;条件装配,默认会话激活 ~18+
工具 src/tools/ preset 三档(minimal 30 / frontend 31 / full 44,RIVET_TOOL_PRESETtools.preset);EXTENDED 层含 office / browser / computer_use
提示词 src/prompt/ static 冻结锚 + volatile + appendixDelta
压缩 src/compact/ + boundary coordinator turn===0 重写历史
前缀缓存 src/cache/ + api/request-freezer.ts advisor / recall / 审计 CLI
认知上下文 src/context/ claims / stigmergy / ledger / pressure
星域 src/agent/star-domain.ts 11 域;toolWhitelist 交集过滤器
多模型 / Worker src/agent/ coordinator + src/model/ profiles + adaptive routing
Plan / Team / Council src/plan/ + tools 审批门禁、wave-gate、多席审查
MCP src/mcp/ stdio / SSE;工具名 mcp__<id>__<name>
LSP src/lsp/ 诊断注入
仓库索引 src/repo/ Meridian 图 + Physarum 文件访问偏好
语义搜索 src/search/ hybrid / embedding / tree-sitter
TUI src/tui/engine/ 纯 ANSI,零 React/Ink 渲染路径
桌面端 desktop/ Tauri;经 src/server/ 调内核
无头 / 脚本 src/headless.ts + rivet -p 单次提示 / JSON 输出
鉴权 src/auth/ API key + Codex OAuth PKCE
插件 / Skills src/plugins/ · src/skills/ 清单加载;.rivet/skills/*.md
Cron / 任务 src/server/cron-*.ts · task routes 桌面 sidecar 调度

Read the full file on GitHub · 187 lines

Changes

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.

  1. 12d ago First seen · 187 lines · 4,593 tokens per session scan C d5a532096619

Subscribe to this mod's changes

Tianshu-harness AGENTS.md is an instructions file published in the GitHub repository huiliyi37/Tianshu-harness (665 stars, last pushed today), licensed Apache-2.0. It adds 4,593 tokens to every session, about $0.0230 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,153 tokens

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).

microsoft/vscode · 6,785 tokens

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.

github/spec-kit · 7,126 tokens

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.

langchain-ai/langchain · 4,469 tokens

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).

microsoft/vscode · 5,001 tokens