# Tianshu Harness

> Open-source coding agent runtime that adds a supervision layer to keep AI models verifying work and delivering with evidence.

Tianshu Harness (天枢) is an open-source AI coding agent from developer huiliyi37 that reads code, edits files, runs commands and verifies results inside a real project, then reports what was done. The terminal CLI, desktop app and VS Code extension share one agent kernel. The latest release listed is v3.36.1, published under Apache-2.0.

## What It Is

Tianshu is a TypeScript coding-agent runtime. It places a Cognitive Virtual Machine (CVM) between the model and the real world, moving goals, state, evidence, permissions and termination conditions out of the chat history so the runtime manages them. The project says this targets common model behaviours such as giving in when challenged, looping on one idea, or claiming completion without verification.

## How the CVM Works

- A per-task contract records goal, scope, constraints and success criteria.
- Completion passes a deliver_task gate that requires evidence such as tests, diffs or verification commands.
- Runtime hook modules run across five stages of each turn, alongside Sensorium state sensing and loop detection.
- The README describes four layers: a belief constitution in the prompt, a Courage Hook, Sensorium, and the RuntimeHookPipeline.
- The project reports a small A/B pilot (5 tasks, one model, LLM review) and real-session prefix-cache figures; these are vendor-published results.

## Working Modes and Tools

- 16 "star domains" switch the prompt, tool scope and decision thresholds for different work postures; the default is 启明.
- Multi-agent commands include /plan, /council, /team, /scout and /galaxy.
- Plan mode, /goal autonomous continuation, /handoff, rewind, and cross-session project memory support long projects.
- Built-in tools, LSP diagnostics, MCP servers and Skills extend it, plus headless mode for scripts and CI.
- Three permission modes (supervise, auto, full-auto), path boundaries, a project trust gate, sandboxing and checkpoints constrain actions.

## Setup Path

Install the CLI with npm (Node.js 24+) and run tianshu; a /connect wizard configures a provider and API key. Desktop installers are offered for macOS, Windows and Linux. The README lists 25 provider presets, including DeepSeek, Claude, Codex, Gemini, GLM and Grok, plus any OpenAI-compatible endpoint such as Ollama or vLLM.

## Features
- Evidence-gated delivery via deliver_task
- Task contracts for goals, scope and success criteria
- Runtime hook pipeline with Sensorium state sensing
- Prefix-cache engine for long sessions
- 16 star domains as switchable work postures
- Multi-agent commands (/plan, /council, /team, /scout, /galaxy)
- Plan mode and /goal autonomous continuation
- Project memory, /handoff and rewind
- LSP diagnostics integration
- MCP and Skills extensibility
- Three permission modes with sandbox and checkpoints
- Headless mode for scripts and CI
- 25 provider presets and OpenAI-compatible endpoints

## Integrations
DeepSeek, Claude, Codex (OpenAI), Gemini, GLM, Grok, MiniMax, SiliconFlow, OpenRouter, Ollama, vLLM, MCP, VS Code, Language Server Protocol

## Platforms
WINDOWS, MACOS, LINUX, ANDROID, API, VSC_EXTENSION, CLI

## Pricing
Open Source, Free tier available

## Version
v3.36.1

## Links
- Website: https://tianshuharness.com/
- Documentation: https://tianshuharness.com/docs/getting-started
- Repository: https://github.com/huiliyi37/Tianshu-harness
- EveryDev.ai: https://www.everydev.ai/tools/tianshu-harness
