Run this inside the Git repository you want Truthmark to manage:
```bash
cd /path/to/your-repo
npm install -g truthmark
truthmark config
```
Enable the AI host you actually use. Fresh configs are host-neutral, so add a top-level `platforms` list to `.truthmark/config.yml` before initialization:
Now try the most common adoption path: document one existing behavior from code and tests. In your AI coding host, ask the installed workflow:
```text
/truthmark-document document the implemented session timeout behavior across src/auth/session.ts and tests/auth/session.test.ts
```
After that, users should not normally invoke Truth Sync directly. Keep coding through your AI host; the installed repository instructions tell the agent to run relevant tests and perform the Truth Sync review before handoff when functional code changes. You review the resulting code diff plus truth-doc diff.
If you only want CLI validation and do not want host-specific AI workflows yet, leave `platforms` omitted and run `truthmark init && truthmark check`; you can add a platform later and rerun `truthmark init`.
AI coding agents are incredible at writing code fast. But this speed creates a dangerous new failure mode: **the repository's story drifts from reality.**
**Truthmark** installs a Git-native workflow layer into your repository. It fixes the part of AI development that usually breaks: helping the documentation stay aligned with the code.
* **✅ Trust Through Verification:** AI work becomes easier to trust because behavior-changing work includes a human-reviewable truth-doc decision or diff.
*`truthmark config` - create the initial configuration.
*`truthmark init` - install or refresh routing, truth-doc scaffolds, and AI-host instructions.
*`truthmark check` - validate the repository truth from the terminal.
### Agents follow the contract while coding
Truthmark installs repo-local instructions for supported AI coding hosts such as Codex, Claude Code, GitHub Copilot, OpenCode, Antigravity, and Cursor.
The normal loop is simple:
1. Ask your agent for a code change, or ask it to document existing behavior.
2. The installed instructions tell the agent when to test, when to update truth docs, and when to stop for human review.
3. You review ordinary Git diffs: code plus any truth-doc changes.
The user-started agent requests are intentionally few:
*`/truthmark-document` - document existing implemented behavior from code and tests.
*`/truthmark-realize` - implement code from existing truth docs.
*`/truthmark-check` - audit repository truth.
Truth Sync is not the usual way to start work; it is the finish-time review after functional code changes.
Truth Structure is not a day-to-day command; it repairs routing or ownership only when that blocks the work.
For command-by-command usage, surface comparisons, supported platform details, configuration, routing, Portal, and examples, read the [Truthmark User Guide](docs/user-guide.md).
It is not a hosted service, MCP server, vector database, hidden memory layer, CI enforcement product, or autonomous code rewrite engine. It helps repository truth stay visible; it does not replace tests, code review, or human judgment.