truthmark 1.6.0 → 2.1.0
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.de.md +120 -106
- package/README.es.md +137 -123
- package/README.md +59 -45
- package/README.ru.md +109 -95
- package/README.zh.md +108 -96
- package/dist/main.js +1235 -612
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Truthmark
|
|
2
2
|
|
|
3
|
-
**Your agents write code. Truthmark
|
|
3
|
+
**Your agents write code. Truthmark maintains human-facing, Git-reviewable documentation.**
|
|
4
4
|
|
|
5
5
|
English | [Deutsch](README.de.md) | [中文](README.zh.md) | [Español](README.es.md) | [Русский](README.ru.md)
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
9
|
-
AI coding agents can change a repository faster than humans can keep its
|
|
9
|
+
AI coding agents can change a repository faster than humans can keep its documentation aligned.
|
|
10
10
|
|
|
11
11
|
Truthmark fixes the part that usually breaks after the code is written: the repository truth.
|
|
12
12
|
|
|
@@ -33,9 +33,9 @@ The implementation changes, but the repository story drifts:
|
|
|
33
33
|
- product decisions disappear after handoff
|
|
34
34
|
- reviewers see code diffs without the related truth diffs
|
|
35
35
|
- branches quietly develop different versions of “what is true”
|
|
36
|
-
- each agent session has to rediscover
|
|
36
|
+
- each agent session has to rediscover repository truth from scratch
|
|
37
37
|
|
|
38
|
-
Truthmark turns that fragile
|
|
38
|
+
Truthmark turns that fragile repository truth into committed repository infrastructure.
|
|
39
39
|
|
|
40
40
|
Instead of relying on every human and every agent to remember the right documentation habit, Truthmark installs the habit into the repository.
|
|
41
41
|
|
|
@@ -66,7 +66,7 @@ It has two distinct surfaces, and the distinction matters.
|
|
|
66
66
|
|
|
67
67
|
The CLI is for maintainers, reviewers, and automation.
|
|
68
68
|
|
|
69
|
-
Use it to configure a repository, install or refresh workflow files, validate truth artifacts, and generate optional review
|
|
69
|
+
Use it to configure a repository, install or refresh workflow files, validate truth artifacts, and generate optional review material.
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
truthmark config
|
|
@@ -155,6 +155,8 @@ This installs or refreshes:
|
|
|
155
155
|
- managed instruction blocks
|
|
156
156
|
- AI-facing workflow surfaces for configured platforms
|
|
157
157
|
|
|
158
|
+
Default truth-doc templates are justified in [Template Standards](docs/standards/template-standards.md), which maps them to recognized software engineering references such as ISO/IEC/IEEE 42010, ISO/IEC/IEEE 29148, ISO/IEC/IEEE 12207, ISO/IEC 25010, C4, arc42, OpenAPI, SemVer, Google SRE, and Diátaxis.
|
|
159
|
+
|
|
158
160
|
### Validate the setup
|
|
159
161
|
|
|
160
162
|
```bash
|
|
@@ -177,6 +179,14 @@ Ask your agent to split the broad route into actual product, service, domain, or
|
|
|
177
179
|
/truthmark-structure split the broad repository area into auth, billing, and notifications
|
|
178
180
|
```
|
|
179
181
|
|
|
182
|
+
If the project already has implemented features but missing or weak truth docs, ask the installed Truth Document workflow to document a focused scope:
|
|
183
|
+
|
|
184
|
+
```text
|
|
185
|
+
/truthmark-document document the implemented payment retry behavior in src/billing/retry.ts and related tests
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Truth Document is the common first workflow for existing projects. It inspects implementation, tests, routes, and existing docs, then creates or repairs truth docs and routing without changing functional code.
|
|
189
|
+
|
|
180
190
|
After that, use your AI coding agent normally.
|
|
181
191
|
|
|
182
192
|
When the agent changes functional code, Truth Sync acts as the finish-time guard that checks whether mapped truth docs need to change before handoff.
|
|
@@ -186,7 +196,7 @@ When the agent changes functional code, Truth Sync acts as the finish-time guard
|
|
|
186
196
|
| Capability | What it does |
|
|
187
197
|
| --- | --- |
|
|
188
198
|
| Git-native truth | Keeps repository truth in committed Markdown and config. |
|
|
189
|
-
| Branch-scoped
|
|
199
|
+
| Branch-scoped documentation | Truth moves with the branch instead of living in a private session. |
|
|
190
200
|
| Human CLI | Gives maintainers setup, refresh, validation, and inspection commands. |
|
|
191
201
|
| AI-facing workflows | Gives agents host-native workflows for sync, documentation, structure, preview, realization, and audit. |
|
|
192
202
|
| Explicit routing | Maps code areas to canonical truth docs. |
|
|
@@ -227,10 +237,10 @@ It is useful when you need:
|
|
|
227
237
|
- less documentation drift
|
|
228
238
|
- better handoffs
|
|
229
239
|
- branch-specific product truth
|
|
230
|
-
- durable architecture and API
|
|
240
|
+
- durable architecture and API documentation
|
|
231
241
|
- explicit ownership between docs and code
|
|
232
242
|
- safer agent write boundaries
|
|
233
|
-
- reviewable
|
|
243
|
+
- reviewable documentation instead of hidden memory
|
|
234
244
|
- AI workflows that still work from committed repo files
|
|
235
245
|
|
|
236
246
|
## Where Truthmark fits
|
|
@@ -246,7 +256,7 @@ It gives those workflows a durable place to land in Git.
|
|
|
246
256
|
| Plan-first feature work | Spec workflow |
|
|
247
257
|
| Branch-scoped truth that travels with code | Truthmark |
|
|
248
258
|
| Validating behavior correctness | Tests and review |
|
|
249
|
-
| Reviewing AI-assisted
|
|
259
|
+
| Reviewing AI-assisted documentation changes | Truthmark plus Git review |
|
|
250
260
|
|
|
251
261
|
Truthmark’s lane is narrow by design:
|
|
252
262
|
|
|
@@ -327,7 +337,7 @@ They are used by agents or agent hosts during repository work. They are not top-
|
|
|
327
337
|
| Truth Preview | read-only | The agent needs to preview likely routing before edits. | Reads only. Does not authorize writes. |
|
|
328
338
|
| Truth Realize | doc-first | Product or architecture truth docs lead and code should be updated to match. | Updates code only. The agent must not edit the truth docs it is realizing. |
|
|
329
339
|
| Truth Check | audit-first | A reviewer or agent needs to audit repository truth health. | Audits and reports. |
|
|
330
|
-
| Truthmark Portal | presentation-only | A human explicitly asks for a browsable static HTML Portal over repository truth docs. | Writes generated non-canonical static files only under the
|
|
340
|
+
| Truthmark Portal | presentation-only | A human explicitly asks for a browsable static HTML Portal over repository truth docs. | Writes generated non-canonical static files only under the fixed Portal output directory. |
|
|
331
341
|
|
|
332
342
|
### Important distinction
|
|
333
343
|
|
|
@@ -363,12 +373,16 @@ Direct invocation is still useful for troubleshooting, forcing an early sync, or
|
|
|
363
373
|
|
|
364
374
|
## Existing behavior without docs
|
|
365
375
|
|
|
366
|
-
Use Truth Document when the implementation already exists but the repository truth is incomplete.
|
|
376
|
+
Use Truth Document when the implementation already exists but the repository truth is incomplete. This is the normal path for established repositories adopting Truthmark after the codebase already exists.
|
|
367
377
|
|
|
368
378
|
```text
|
|
369
|
-
/truthmark-document document the implemented session timeout behavior
|
|
379
|
+
/truthmark-document document the implemented session timeout behavior across src/auth/session.ts, src/auth/middleware.ts, and tests/auth/session.test.ts
|
|
370
380
|
```
|
|
371
381
|
|
|
382
|
+
Give it the feature name, code paths, test paths, or desired truth-doc area. On OpenCode-style hosts, call the same workflow as `/skill truthmark-document ...`; on Gemini CLI, use `/truthmark:document ...`.
|
|
383
|
+
|
|
384
|
+
For a large repo that still has one broad placeholder route, run Truth Structure first, then invoke Truth Document for one bounded feature or area at a time.
|
|
385
|
+
|
|
372
386
|
Truth Document inspects implementation, tests, route files, and existing docs as evidence.
|
|
373
387
|
|
|
374
388
|
It writes truth docs and routing only.
|
|
@@ -380,7 +394,7 @@ It must not change functional code.
|
|
|
380
394
|
Use Truth Realize when a product or architecture decision starts in docs and code should be updated to match.
|
|
381
395
|
|
|
382
396
|
```text
|
|
383
|
-
/truthmark-realize realize docs/truth/authentication/session-timeout.md into code
|
|
397
|
+
/truthmark-realize realize docs/truthmark/truth/authentication/session-timeout.md into code
|
|
384
398
|
```
|
|
385
399
|
|
|
386
400
|
Truth Realize is doc-first.
|
|
@@ -427,7 +441,7 @@ Most maintainers start with three commands.
|
|
|
427
441
|
| `truthmark init` | Install or refresh configured workflow surfaces from the reviewed config. |
|
|
428
442
|
| `truthmark check` | Validate configuration, authority, routing, decision-bearing docs, frontmatter, internal links, branch scope, generated surfaces, freshness, and coverage diagnostics. |
|
|
429
443
|
|
|
430
|
-
Optional repository-intelligence helpers generate derived review
|
|
444
|
+
Optional repository-intelligence helpers generate derived review material for the active checkout, such as RepoIndex, RouteMap, ImpactSet, and bounded ContextPack artifacts. Generated workflow skill packages may also expose helper manifests and helper policies that call installed `truthmark validate ... --json` CLI validators; those helpers are accelerators, not bundled repo-local scripts or sources of truth. Standalone Copilot prompts and Gemini commands use the same CLI validator contract when the installed runner is available, and otherwise report a visible skipped helper status with manual validation.
|
|
431
445
|
|
|
432
446
|
They are not sources of truth.
|
|
433
447
|
|
|
@@ -448,16 +462,16 @@ It is deliberately separate from the core truth workflow:
|
|
|
448
462
|
- Markdown truth docs remain canonical.
|
|
449
463
|
- Generated Portal HTML is presentation only.
|
|
450
464
|
- Portal is manual-only; it does not run as a completion gate, Truth Sync step, `truthmark check` step, or automatic post-change hook.
|
|
451
|
-
- Portal writes stay inside the
|
|
465
|
+
- Portal writes stay inside the fixed Truthmark-derived output directory.
|
|
452
466
|
- Generated pages should use local assets, source provenance, and a visible Markdown-canonical disclaimer.
|
|
453
467
|
|
|
454
468
|
Enable it with the namespaced config block:
|
|
455
469
|
|
|
456
470
|
```yaml
|
|
457
|
-
truthmark
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
471
|
+
truthmark:
|
|
472
|
+
generated:
|
|
473
|
+
portal:
|
|
474
|
+
enabled: true
|
|
461
475
|
```
|
|
462
476
|
|
|
463
477
|
Then rerun:
|
|
@@ -496,14 +510,14 @@ Important config areas include:
|
|
|
496
510
|
| --- | --- |
|
|
497
511
|
| `version` | Config contract version. |
|
|
498
512
|
| `platforms` | Agent hosts that should receive platform-specific generated surfaces. |
|
|
499
|
-
| `
|
|
500
|
-
| `
|
|
501
|
-
| `
|
|
502
|
-
| `
|
|
503
|
-
| `
|
|
504
|
-
| `
|
|
505
|
-
| `truthmark
|
|
506
|
-
| `
|
|
513
|
+
| `truthmark.workspace` | Truthmark-owned workspace for routes, truth docs, templates, and generated presentation output. |
|
|
514
|
+
| `truthmark.routes.index` | Root route index path relative to `truthmark.workspace`. |
|
|
515
|
+
| `truthmark.routes.areas` | Directory for delegated child route files relative to `truthmark.workspace`. |
|
|
516
|
+
| `truthmark.routes.default_area` | Initial scaffolded child route basename. |
|
|
517
|
+
| `truthmark.routes.max_delegation_depth` | Current maximum route delegation depth. |
|
|
518
|
+
| `truthmark.truth.root` | Truth doc root relative to `truthmark.workspace`. |
|
|
519
|
+
| `truthmark.templates.root` | Truth-doc template root relative to `truthmark.workspace`. |
|
|
520
|
+
| `truthmark.generated.portal` | Optional manual presentation workflow enablement: `enabled`. |
|
|
507
521
|
| `instruction_targets` | Files that receive shared managed instruction blocks, such as `AGENTS.md`. |
|
|
508
522
|
| `frontmatter.required` | Metadata fields that produce error diagnostics when missing. |
|
|
509
523
|
| `frontmatter.recommended` | Metadata fields that produce review diagnostics when missing. |
|
|
@@ -516,8 +530,8 @@ Truthmark maps code surfaces to truth docs.
|
|
|
516
530
|
The main routing files are:
|
|
517
531
|
|
|
518
532
|
```text
|
|
519
|
-
docs/truthmark/areas.md
|
|
520
|
-
docs/truthmark/areas/**/*.md
|
|
533
|
+
docs/truthmark/routes/areas.md
|
|
534
|
+
docs/truthmark/routes/areas/**/*.md
|
|
521
535
|
```
|
|
522
536
|
|
|
523
537
|
A route tells the agent:
|
|
@@ -547,7 +561,7 @@ It does this in four layers:
|
|
|
547
561
|
|
|
548
562
|
- configuration and routing for ownership boundaries
|
|
549
563
|
- canonical truth docs and starter templates
|
|
550
|
-
- compact managed instruction blocks for repository-wide agent
|
|
564
|
+
- compact managed instruction blocks for repository-wide agent instructions
|
|
551
565
|
- host-native workflow packages, commands, prompts, and verifier agents for the platforms enabled in config
|
|
552
566
|
|
|
553
567
|
Truthmark preserves manual content outside managed instruction blocks.
|
|
@@ -631,7 +645,7 @@ truthmark check
|
|
|
631
645
|
### Document implemented behavior
|
|
632
646
|
|
|
633
647
|
```text
|
|
634
|
-
/truthmark-document document the implemented password reset flow under docs/truth/authentication
|
|
648
|
+
/truthmark-document document the implemented password reset flow under docs/truthmark/truth/authentication
|
|
635
649
|
```
|
|
636
650
|
|
|
637
651
|
### Sync after code changes
|
|
@@ -643,7 +657,7 @@ truthmark check
|
|
|
643
657
|
### Realize a doc-first decision
|
|
644
658
|
|
|
645
659
|
```text
|
|
646
|
-
/truthmark-realize realize docs/truth/billing/invoice-retry-policy.md into code
|
|
660
|
+
/truthmark-realize realize docs/truthmark/truth/billing/invoice-retry-policy.md into code
|
|
647
661
|
```
|
|
648
662
|
|
|
649
663
|
### Audit truth health from the terminal
|
|
@@ -652,13 +666,13 @@ truthmark check
|
|
|
652
666
|
truthmark check
|
|
653
667
|
```
|
|
654
668
|
|
|
655
|
-
### Generate branch-impact
|
|
669
|
+
### Generate branch-impact summary
|
|
656
670
|
|
|
657
671
|
```bash
|
|
658
672
|
truthmark impact --base main
|
|
659
673
|
```
|
|
660
674
|
|
|
661
|
-
### Generate workflow
|
|
675
|
+
### Generate a workflow ContextPack
|
|
662
676
|
|
|
663
677
|
```bash
|
|
664
678
|
truthmark context --workflow truth-sync --base main --format markdown
|
|
@@ -667,10 +681,10 @@ truthmark context --workflow truth-sync --base main --format markdown
|
|
|
667
681
|
### Enable the optional Portal workflow
|
|
668
682
|
|
|
669
683
|
```yaml
|
|
670
|
-
truthmark
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
684
|
+
truthmark:
|
|
685
|
+
generated:
|
|
686
|
+
portal:
|
|
687
|
+
enabled: true
|
|
674
688
|
```
|
|
675
689
|
|
|
676
690
|
```bash
|
|
@@ -744,11 +758,11 @@ The README is the fast path for evaluation and setup.
|
|
|
744
758
|
Detailed current behavior lives under `docs/`:
|
|
745
759
|
|
|
746
760
|
- [Docs index](docs/README.md)
|
|
747
|
-
- [Architecture overview](docs/architecture/overview.md)
|
|
748
|
-
- [API and CLI contracts](docs/truth/contracts.md)
|
|
749
|
-
- [Init and scaffold behavior](docs/truth/init-and-scaffold.md)
|
|
750
|
-
- [Check diagnostics](docs/truth/check-diagnostics.md)
|
|
751
|
-
- [Installed workflows](docs/truth/workflows/overview.md)
|
|
761
|
+
- [Architecture overview](docs/truthmark/truth/architecture/overview.md)
|
|
762
|
+
- [API and CLI contracts](docs/truthmark/truth/contracts.md)
|
|
763
|
+
- [Init and scaffold behavior](docs/truthmark/truth/init-and-scaffold.md)
|
|
764
|
+
- [Check diagnostics](docs/truthmark/truth/check-diagnostics.md)
|
|
765
|
+
- [Installed workflows](docs/truthmark/truth/workflows/overview.md)
|
|
752
766
|
- [Repository truth maintenance guide](docs/standards/maintaining-repository-truth.md)
|
|
753
767
|
|
|
754
768
|
## Design boundaries
|
|
@@ -785,7 +799,7 @@ Teams should still:
|
|
|
785
799
|
- review generated workflow-surface diffs after upgrades
|
|
786
800
|
- keep human ownership over product and architecture decisions
|
|
787
801
|
|
|
788
|
-
Truthmark makes agent
|
|
802
|
+
Truthmark makes agent-facing repository truth visible. It does not replace human judgment.
|
|
789
803
|
|
|
790
804
|
## Roadmap direction
|
|
791
805
|
|
|
@@ -805,7 +819,7 @@ The center of gravity stays the same:
|
|
|
805
819
|
repository truth
|
|
806
820
|
agent-native workflows
|
|
807
821
|
Git review
|
|
808
|
-
branch-scoped
|
|
822
|
+
branch-scoped documentation
|
|
809
823
|
```
|
|
810
824
|
|
|
811
825
|
## License
|