truthmark 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -157
- package/dist/main.js +198 -44
- package/dist/main.js.map +1 -1
- package/docs/README.md +45 -33
- package/docs/assets/truthmark-workflow-mobile.svg +118 -0
- package/docs/assets/truthmark-workflow.svg +182 -0
- package/docs/readmes/README.ar.md +125 -151
- package/docs/readmes/README.de.md +127 -153
- package/docs/readmes/README.el.md +127 -153
- package/docs/readmes/README.es.md +125 -151
- package/docs/readmes/README.fr.md +125 -151
- package/docs/readmes/README.id.md +126 -152
- package/docs/readmes/README.it.md +125 -151
- package/docs/readmes/README.ja.md +126 -152
- package/docs/readmes/README.ko.md +127 -153
- package/docs/readmes/README.pl.md +125 -151
- package/docs/readmes/README.pt.md +126 -152
- package/docs/readmes/README.ru.md +124 -150
- package/docs/readmes/README.tr.md +125 -151
- package/docs/readmes/README.vi.md +126 -152
- package/docs/readmes/README.zh.md +128 -154
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,231 +1,193 @@
|
|
|
1
1
|
# Truthmark
|
|
2
2
|
|
|
3
|
-
**Your agents write code. Truthmark maintains human-facing, Git-reviewable documentation.**
|
|
3
|
+
**Your agents write code. Truthmark maintains the human-facing, Git-reviewable documentation.**
|
|
4
|
+
|
|
5
|
+
Truthmark installs Git-native workflows that let AI coding agents create new product and engineering documentation from existing code and tests, keep it current after every code change, and hand you ordinary Markdown diffs for review.
|
|
4
6
|
|
|
5
7
|
[](https://www.npmjs.com/package/truthmark)
|
|
6
8
|
[](https://github.com/merlinhu1/truthmark/actions/workflows/ci.yml)
|
|
7
9
|
[](LICENSE)
|
|
8
10
|
[](package.json)
|
|
9
11
|
|
|
10
|
-
[Website](https://merlinhu1.github.io/truthmark/)
|
|
12
|
+
[Get started](#quick-start-create-your-first-truth-document) · [Website](https://merlinhu1.github.io/truthmark/) · [User Guide](https://github.com/merlinhu1/truthmark/blob/main/docs/user-guide.md) · [GitHub](https://github.com/merlinhu1/truthmark)
|
|
13
|
+
|
|
14
|
+
<details>
|
|
15
|
+
<summary>Read this README in 16 languages</summary>
|
|
11
16
|
|
|
12
17
|
[🇺🇸 English](README.md) | [🇨🇳 简体中文](docs/readmes/README.zh.md) | [🇯🇵 日本語](docs/readmes/README.ja.md) | [🇰🇷 한국어](docs/readmes/README.ko.md) | [🇩🇪 Deutsch](docs/readmes/README.de.md) | [🇫🇷 Français](docs/readmes/README.fr.md) | [🇪🇸 Español](docs/readmes/README.es.md) | [🇧🇷 Português](docs/readmes/README.pt.md) | [🇷🇺 Русский](docs/readmes/README.ru.md) | [🇸🇦 العربية](docs/readmes/README.ar.md) | [🇮🇹 Italiano](docs/readmes/README.it.md) | [🇵🇱 Polski](docs/readmes/README.pl.md) | [🇹🇷 Türkçe](docs/readmes/README.tr.md) | [🇻🇳 Tiếng Việt](docs/readmes/README.vi.md) | [🇮🇩 Bahasa Indonesia](docs/readmes/README.id.md) | [🇬🇷 Ελληνικά](docs/readmes/README.el.md)
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
</details>
|
|
15
20
|
|
|
16
|
-
##
|
|
21
|
+
## Create the first docs. Keep them true.
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
Most documentation tools stop after generation. Truthmark gives agents a complete documentation lifecycle inside your repository:
|
|
19
24
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
- **Create new docs from working software.** Truth Document reads code and tests, then creates bounded product or engineering documentation.
|
|
26
|
+
- **Keep docs aligned automatically.** Truth Sync runs at agent handoff after functional code changes and updates repository truth before the work is finished.
|
|
27
|
+
- **Turn docs back into code.** Truth Realize implements approved truth docs while preserving a clean doc-first workflow.
|
|
28
|
+
- **Repair ownership as the codebase grows.** Truth Structure creates bounded routes and starter docs for new or overloaded areas.
|
|
29
|
+
- **Review everything in Git.** Code, decisions, contracts, architecture, operations, and behavior travel together with the branch.
|
|
30
|
+
|
|
31
|
+
No hosted knowledge base. No private agent memory. No documentation trapped in chat history.
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
## Quick Start: create your first truth document
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
**Requirements:** Node.js 24 or newer, a Git repository, and a supported AI coding host for agent workflows.
|
|
36
|
+
|
|
37
|
+
Run this inside the repository you want Truthmark to manage:
|
|
31
38
|
|
|
32
39
|
```bash
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
cd /path/to/your-repo
|
|
41
|
+
npm install -g truthmark
|
|
42
|
+
truthmark init
|
|
35
43
|
```
|
|
36
44
|
|
|
37
|
-
|
|
45
|
+
`truthmark init` lets you select Codex, Claude Code, GitHub Copilot, OpenCode, Antigravity, Cursor, or a host-neutral command-line interface setup.
|
|
38
46
|
|
|
39
|
-
Now
|
|
47
|
+
Now ask your configured agent to document one real behavior:
|
|
40
48
|
|
|
41
49
|
```text
|
|
42
50
|
/truthmark-document document the implemented session timeout behavior across src/auth/session.ts and tests/auth/session.test.ts
|
|
43
51
|
```
|
|
44
52
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
If you only want CLI validation and do not want host-specific AI workflows yet, select `none` and continue with `truthmark check`; you can rerun `truthmark init` later to select platforms.
|
|
48
|
-
|
|
49
|
-
## 💡 The Problem: The AI Documentation Gap
|
|
50
|
-
|
|
51
|
-
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.**
|
|
53
|
+
Truth Document creates a new bounded truth doc when one does not exist, updates an existing owner when it does, and updates routing when needed. It does not change functional code.
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
* Architecture documents quickly fall behind.
|
|
55
|
-
* Product decisions vanish after handoff.
|
|
56
|
-
* Code reviewers are left examining raw code diffs without understanding the "why."
|
|
57
|
-
* Every new AI session is forced to rediscover your repository's truth from scratch.
|
|
55
|
+
Review the result:
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Truthmark is not a one-shot docs generator. It is an ongoing truth-doc curation loop that keeps human-facing docs small, owned, evidence-backed, and reviewable as agents keep changing code.
|
|
66
|
-
|
|
67
|
-
### ✨ Why Truthmark is Unique
|
|
57
|
+
```bash
|
|
58
|
+
truthmark check
|
|
59
|
+
git status --short --untracked-files=all
|
|
60
|
+
git diff
|
|
61
|
+
```
|
|
68
62
|
|
|
69
|
-
|
|
63
|
+
You should now have:
|
|
70
64
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
* **✅ Trust Through Verification:** AI work becomes easier to trust because behavior-changing work includes a human-reviewable truth-doc decision or diff.
|
|
65
|
+
```text
|
|
66
|
+
docs/truthmark/engineering/behaviors/session-timeout.md
|
|
67
|
+
docs/truthmark/routes/areas/authentication.md
|
|
68
|
+
```
|
|
76
69
|
|
|
77
|
-
|
|
70
|
+
The exact paths follow your repository’s ownership structure. New files appear in `git status`; changes to tracked files appear in `git diff`.
|
|
78
71
|
|
|
79
|
-
|
|
72
|
+
Invocation varies by host. OpenCode uses `/skill truthmark-document`, Antigravity uses `@truthmark-document`, and other supported hosts use their native skill or slash-command surface. See the [platform table](https://github.com/merlinhu1/truthmark/blob/main/docs/user-guide.md#supported-agent-platforms) for exact commands.
|
|
80
73
|
|
|
81
|
-
|
|
82
|
-
2. 🧪 **Test:** Relevant tests are executed.
|
|
83
|
-
3. 🔍 **Check:** Truthmark checks mapped documentation as part of the installed finish-time review.
|
|
84
|
-
4. 📝 **Document:** Docs are updated by the agent when repository truth has changed.
|
|
85
|
-
5. 👀 **Review:** A human reviews the *code diff* + the *truth diff*.
|
|
74
|
+
For scripts and continuous integration, pass the selected platforms explicitly:
|
|
86
75
|
|
|
87
|
-
|
|
76
|
+
```bash
|
|
77
|
+
truthmark init --platform codex --platform cursor
|
|
78
|
+
truthmark init --json
|
|
79
|
+
```
|
|
88
80
|
|
|
89
|
-
|
|
81
|
+
Choose `none` interactively or run `truthmark init --clear-platforms` for a host-neutral repository. You can add agent platforms later by rerunning `truthmark init`.
|
|
90
82
|
|
|
91
|
-
|
|
83
|
+
For branch-relative freshness diagnostics, pass a Git base:
|
|
92
84
|
|
|
93
|
-
|
|
85
|
+
```bash
|
|
86
|
+
truthmark check --base <base-ref>
|
|
87
|
+
```
|
|
94
88
|
|
|
95
|
-
|
|
96
|
-
* `truthmark check` - validate the repository truth from the terminal.
|
|
97
|
-
* `truthmark uninstall --dry-run|--apply` - preview or remove generated host surfaces while preserving authored truth and configuration.
|
|
89
|
+
## How Truthmark works
|
|
98
90
|
|
|
99
|
-
|
|
91
|
+
<picture>
|
|
92
|
+
<source media="(max-width: 700px)" srcset="docs/assets/truthmark-workflow-mobile.svg">
|
|
93
|
+
<img src="docs/assets/truthmark-workflow.svg" alt="How Truthmark works" width="1440">
|
|
94
|
+
</picture>
|
|
100
95
|
|
|
101
|
-
Truthmark installs
|
|
96
|
+
The Truthmark command-line interface installs and validates the repository contract. Your coding agent performs the evidence review and documentation work through the installed host-native workflows.
|
|
102
97
|
|
|
103
|
-
|
|
98
|
+
A normal code change follows one simple loop:
|
|
104
99
|
|
|
105
|
-
1.
|
|
106
|
-
2.
|
|
107
|
-
3.
|
|
100
|
+
1. The agent changes functional code.
|
|
101
|
+
2. Relevant tests run.
|
|
102
|
+
3. Truth Sync checks the mapped documentation.
|
|
103
|
+
4. The agent creates or updates docs and routing when repository truth changed.
|
|
104
|
+
5. You review the code diff and truth diff together.
|
|
108
105
|
|
|
109
|
-
|
|
106
|
+
## Workflows
|
|
110
107
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
| Workflow | Use it when | Result |
|
|
109
|
+
| -------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
110
|
+
| **Truth Document** | Existing code needs documentation | Creates or updates evidence-backed product and engineering docs |
|
|
111
|
+
| **Truth Sync** | Functional code changed | Keeps mapped docs and routing aligned before handoff |
|
|
112
|
+
| **Truth Structure** | A new area needs ownership or existing docs are too broad | Creates bounded routes and skeletal starter docs |
|
|
113
|
+
| **Truth Realize** | An approved truth doc should become working software | Updates functional code from documentation |
|
|
114
|
+
| **Truth Check** | Repository truth needs an audit | Reports routing, ownership, evidence, and documentation issues |
|
|
115
|
+
| **Truthmark Portal** | The team wants a browsable documentation site | Generates a committed static HTML presentation from Markdown truth docs |
|
|
114
116
|
|
|
115
|
-
|
|
116
|
-
Truth Structure is not a day-to-day command; it repairs routing or ownership only when that blocks the work.
|
|
117
|
+
Truthmark installs these workflows as native repository surfaces for Codex, Claude Code, GitHub Copilot, OpenCode, Antigravity, and Cursor.
|
|
117
118
|
|
|
118
119
|
## What you get
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
| --- | --- |
|
|
122
|
-
| Git-native truth | Keeps repository truth in committed Markdown and config. |
|
|
123
|
-
| Branch-scoped documentation | Truth moves with the branch instead of living in a private session. |
|
|
124
|
-
| Human CLI | Gives maintainers setup, refresh, validation, and inspection commands. |
|
|
125
|
-
| Installed agent guidance | Tells coding agents when to document, test, sync truth, audit, or stop for review. |
|
|
126
|
-
| Explicit routing | Maps code areas to canonical truth docs. |
|
|
127
|
-
| Durable truth curation | Keeps docs bounded, evidence-backed, and reviewable instead of letting them grow into catch-all files. |
|
|
128
|
-
| Reviewable handoffs | Produces ordinary Git diffs for both code and truth docs. |
|
|
129
|
-
| Local-first operation | Requires no hosted service, daemon, database, or MCP server. |
|
|
130
|
-
| Safer write boundaries | Separates code-first, doc-first, read-only, and doc-only workflows. |
|
|
131
|
-
| Validation | Reports routing, authority, frontmatter, link, generated-surface, branch-scope, freshness, and coverage issues. |
|
|
132
|
-
| Optional Portal | Generates a committed static HTML presentation site from Markdown truth docs when explicitly enabled and requested. |
|
|
133
|
-
|
|
134
|
-
## Visual overview
|
|
135
|
-
|
|
136
|
-

|
|
137
|
-
|
|
138
|
-
**Features:** what Truthmark installs and how agents use repo-local instructions.
|
|
121
|
+
### Documentation that starts from reality
|
|
139
122
|
|
|
140
|
-
|
|
123
|
+
Truthmark can create documentation for product capabilities, implementation behavior, application programming interfaces, architecture, workflows, operations, and tests. Code and tests provide the evidence; bounded Markdown docs preserve the result.
|
|
141
124
|
|
|
142
|
-
|
|
125
|
+
### Documentation that survives the next change
|
|
143
126
|
|
|
144
|
-
|
|
127
|
+
Routes connect code areas to canonical docs. When agents change behavior, Truth Sync knows where the corresponding truth belongs and keeps the handoff reviewable.
|
|
145
128
|
|
|
146
|
-
|
|
129
|
+
### Product and engineering truth in separate lanes
|
|
147
130
|
|
|
148
|
-
|
|
131
|
+
Product truth captures user-facing promises, boundaries, decisions, and acceptance criteria. Engineering truth captures current behavior, contracts, architecture, workflows, operations, and test behavior.
|
|
149
132
|
|
|
150
|
-
|
|
133
|
+
### Git-native collaboration
|
|
151
134
|
|
|
152
|
-
|
|
135
|
+
Everything important lives in committed repository files. Truth follows the branch, works with ordinary pull requests, and remains visible to every maintainer and coding agent.
|
|
153
136
|
|
|
154
|
-
|
|
137
|
+
### Local-first operation
|
|
155
138
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
Truthmark helps teams answer that with committed files, explicit routing, and reviewable diffs.
|
|
159
|
-
|
|
160
|
-
Most AI tools can draft documentation. Truthmark keeps repository truth curated after the draft, after the next code change, and after the doc starts getting too broad.
|
|
161
|
-
|
|
162
|
-
It is useful when you need:
|
|
163
|
-
|
|
164
|
-
- less documentation drift
|
|
165
|
-
- better handoffs
|
|
166
|
-
- branch-specific product truth
|
|
167
|
-
- durable architecture and API documentation
|
|
168
|
-
- explicit ownership between docs and code
|
|
169
|
-
- safer agent write boundaries
|
|
170
|
-
- reviewable documentation instead of hidden memory
|
|
171
|
-
- agent guidance that still works from committed repo files
|
|
139
|
+
Truthmark needs no hosted service, daemon, database, vector store, or Model Context Protocol server. The repository carries its own documentation workflow.
|
|
172
140
|
|
|
173
141
|
## Where Truthmark fits
|
|
174
142
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
|
180
|
-
|
|
|
181
|
-
|
|
|
182
|
-
|
|
|
183
|
-
| Plan-first feature work | Spec workflow |
|
|
184
|
-
| Branch-scoped truth that travels with code | Truthmark |
|
|
185
|
-
| Validating behavior correctness | Tests and review |
|
|
186
|
-
| Reviewing AI-assisted documentation changes | Truthmark plus Git review |
|
|
187
|
-
|
|
188
|
-
Truthmark’s lane is narrow by design:
|
|
189
|
-
|
|
190
|
-
```text
|
|
191
|
-
make repository truth explicit
|
|
192
|
-
route it to code
|
|
193
|
-
install agent guidance around it
|
|
194
|
-
keep the result reviewable in Git
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
## Go deeper
|
|
198
|
-
|
|
199
|
-
The README is the storefront: fast context, quick start, and the core mental model.
|
|
143
|
+
| Need | Best fit |
|
|
144
|
+
| -------------------------------------------------- | -------------------------- |
|
|
145
|
+
| Better output from one agent session | Better prompt |
|
|
146
|
+
| Personal or session-level continuity | Memory tool |
|
|
147
|
+
| Plan-first feature work | Specification workflow |
|
|
148
|
+
| Branch-scoped documentation that travels with code | **Truthmark** |
|
|
149
|
+
| Behavior correctness | Tests and code review |
|
|
150
|
+
| Reviewable AI-assisted documentation | **Truthmark + Git review** |
|
|
200
151
|
|
|
201
|
-
|
|
152
|
+
Truthmark is built for maintainers and engineering teams that already use AI coding agents and want the repository to keep telling the truth as fast as the code changes.
|
|
202
153
|
|
|
203
|
-
|
|
154
|
+
## Supported hosts and command line
|
|
204
155
|
|
|
205
|
-
|
|
156
|
+
Supported agent hosts:
|
|
206
157
|
|
|
207
|
-
|
|
158
|
+
- Codex
|
|
159
|
+
- Claude Code
|
|
160
|
+
- GitHub Copilot
|
|
161
|
+
- OpenCode
|
|
162
|
+
- Antigravity
|
|
163
|
+
- Cursor
|
|
208
164
|
|
|
209
|
-
|
|
210
|
-
-
|
|
211
|
-
- route, authority, frontmatter, link, freshness, generated-surface, branch-scope, and coverage diagnostics
|
|
212
|
-
- branch-scoped truth docs and derived repository-intelligence artifacts
|
|
165
|
+
<details>
|
|
166
|
+
<summary>Command-line reference</summary>
|
|
213
167
|
|
|
214
|
-
|
|
168
|
+
| Command | Purpose |
|
|
169
|
+
| ----------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
170
|
+
| `truthmark init` | Create or refresh configuration, routing, templates, and selected host workflows |
|
|
171
|
+
| `truthmark check [--base <ref>]` | Validate repository truth and optionally run branch-freshness diagnostics |
|
|
172
|
+
| `truthmark index --json` | Inspect derived repository and routing metadata |
|
|
173
|
+
| `truthmark impact --base <ref> --json` | Map changed files to docs, owners, and nearby tests |
|
|
174
|
+
| `truthmark workflow status --workflow <id> [--base <ref>] --json` | Inspect workflow applicability and targets |
|
|
175
|
+
| `truthmark validate ...` | Validate workflow reports and write leases |
|
|
176
|
+
| `truthmark uninstall --dry-run` / `truthmark uninstall --apply` | Preview or remove generated host surfaces while preserving authored truth |
|
|
215
177
|
|
|
216
|
-
-
|
|
217
|
-
- [Docs index](docs/README.md)
|
|
218
|
-
- [Architecture overview](docs/truthmark/engineering/architecture/overview.md)
|
|
219
|
-
- [API and CLI contracts](docs/truthmark/engineering/contracts/config-route-and-check-contracts.md)
|
|
220
|
-
- [Repository truth maintenance guide](docs/standards/maintaining-repository-truth.md)
|
|
178
|
+
Structured JSON output is available throughout the command-line interface for scripts and continuous integration.
|
|
221
179
|
|
|
222
|
-
|
|
180
|
+
</details>
|
|
223
181
|
|
|
224
|
-
##
|
|
182
|
+
## Learn more
|
|
225
183
|
|
|
226
|
-
Truthmark
|
|
184
|
+
- [Truthmark User Guide](https://github.com/merlinhu1/truthmark/blob/main/docs/user-guide.md)
|
|
185
|
+
- [Documentation index](https://github.com/merlinhu1/truthmark/blob/main/docs/README.md)
|
|
186
|
+
- [Architecture overview](https://github.com/merlinhu1/truthmark/blob/main/docs/truthmark/engineering/architecture/overview.md)
|
|
187
|
+
- [Configuration, routing, and command contracts](https://github.com/merlinhu1/truthmark/blob/main/docs/truthmark/engineering/contracts/config-route-and-check-contracts.md)
|
|
188
|
+
- [Contributing](https://github.com/merlinhu1/truthmark/blob/main/CONTRIBUTING.md)
|
|
227
189
|
|
|
228
|
-
|
|
190
|
+
**Install Truthmark, select your coding host, and turn one real behavior into documentation today.**
|
|
229
191
|
|
|
230
192
|
## License
|
|
231
193
|
|