truthmark 1.6.1 → 2.2.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 +116 -107
- package/README.es.md +133 -124
- package/README.md +55 -46
- package/README.ru.md +105 -96
- package/README.zh.md +104 -97
- package/dist/main.js +2092 -1047
- package/dist/main.js.map +1 -1
- package/package.json +4 -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
|
|
@@ -179,6 +179,14 @@ Ask your agent to split the broad route into actual product, service, domain, or
|
|
|
179
179
|
/truthmark-structure split the broad repository area into auth, billing, and notifications
|
|
180
180
|
```
|
|
181
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
|
+
|
|
182
190
|
After that, use your AI coding agent normally.
|
|
183
191
|
|
|
184
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.
|
|
@@ -188,7 +196,7 @@ When the agent changes functional code, Truth Sync acts as the finish-time guard
|
|
|
188
196
|
| Capability | What it does |
|
|
189
197
|
| --- | --- |
|
|
190
198
|
| Git-native truth | Keeps repository truth in committed Markdown and config. |
|
|
191
|
-
| Branch-scoped
|
|
199
|
+
| Branch-scoped documentation | Truth moves with the branch instead of living in a private session. |
|
|
192
200
|
| Human CLI | Gives maintainers setup, refresh, validation, and inspection commands. |
|
|
193
201
|
| AI-facing workflows | Gives agents host-native workflows for sync, documentation, structure, preview, realization, and audit. |
|
|
194
202
|
| Explicit routing | Maps code areas to canonical truth docs. |
|
|
@@ -229,10 +237,10 @@ It is useful when you need:
|
|
|
229
237
|
- less documentation drift
|
|
230
238
|
- better handoffs
|
|
231
239
|
- branch-specific product truth
|
|
232
|
-
- durable architecture and API
|
|
240
|
+
- durable architecture and API documentation
|
|
233
241
|
- explicit ownership between docs and code
|
|
234
242
|
- safer agent write boundaries
|
|
235
|
-
- reviewable
|
|
243
|
+
- reviewable documentation instead of hidden memory
|
|
236
244
|
- AI workflows that still work from committed repo files
|
|
237
245
|
|
|
238
246
|
## Where Truthmark fits
|
|
@@ -248,7 +256,7 @@ It gives those workflows a durable place to land in Git.
|
|
|
248
256
|
| Plan-first feature work | Spec workflow |
|
|
249
257
|
| Branch-scoped truth that travels with code | Truthmark |
|
|
250
258
|
| Validating behavior correctness | Tests and review |
|
|
251
|
-
| Reviewing AI-assisted
|
|
259
|
+
| Reviewing AI-assisted documentation changes | Truthmark plus Git review |
|
|
252
260
|
|
|
253
261
|
Truthmark’s lane is narrow by design:
|
|
254
262
|
|
|
@@ -329,7 +337,7 @@ They are used by agents or agent hosts during repository work. They are not top-
|
|
|
329
337
|
| Truth Preview | read-only | The agent needs to preview likely routing before edits. | Reads only. Does not authorize writes. |
|
|
330
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. |
|
|
331
339
|
| Truth Check | audit-first | A reviewer or agent needs to audit repository truth health. | Audits and reports. |
|
|
332
|
-
| 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. |
|
|
333
341
|
|
|
334
342
|
### Important distinction
|
|
335
343
|
|
|
@@ -365,12 +373,16 @@ Direct invocation is still useful for troubleshooting, forcing an early sync, or
|
|
|
365
373
|
|
|
366
374
|
## Existing behavior without docs
|
|
367
375
|
|
|
368
|
-
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.
|
|
369
377
|
|
|
370
378
|
```text
|
|
371
|
-
/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
|
|
372
380
|
```
|
|
373
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
|
+
|
|
374
386
|
Truth Document inspects implementation, tests, route files, and existing docs as evidence.
|
|
375
387
|
|
|
376
388
|
It writes truth docs and routing only.
|
|
@@ -382,7 +394,7 @@ It must not change functional code.
|
|
|
382
394
|
Use Truth Realize when a product or architecture decision starts in docs and code should be updated to match.
|
|
383
395
|
|
|
384
396
|
```text
|
|
385
|
-
/truthmark-realize realize docs/truth/authentication/session-timeout.md into code
|
|
397
|
+
/truthmark-realize realize docs/truthmark/truth/authentication/session-timeout.md into code
|
|
386
398
|
```
|
|
387
399
|
|
|
388
400
|
Truth Realize is doc-first.
|
|
@@ -429,7 +441,7 @@ Most maintainers start with three commands.
|
|
|
429
441
|
| `truthmark init` | Install or refresh configured workflow surfaces from the reviewed config. |
|
|
430
442
|
| `truthmark check` | Validate configuration, authority, routing, decision-bearing docs, frontmatter, internal links, branch scope, generated surfaces, freshness, and coverage diagnostics. |
|
|
431
443
|
|
|
432
|
-
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.
|
|
433
445
|
|
|
434
446
|
They are not sources of truth.
|
|
435
447
|
|
|
@@ -450,16 +462,16 @@ It is deliberately separate from the core truth workflow:
|
|
|
450
462
|
- Markdown truth docs remain canonical.
|
|
451
463
|
- Generated Portal HTML is presentation only.
|
|
452
464
|
- Portal is manual-only; it does not run as a completion gate, Truth Sync step, `truthmark check` step, or automatic post-change hook.
|
|
453
|
-
- Portal writes stay inside the
|
|
465
|
+
- Portal writes stay inside the fixed Truthmark-derived output directory.
|
|
454
466
|
- Generated pages should use local assets, source provenance, and a visible Markdown-canonical disclaimer.
|
|
455
467
|
|
|
456
468
|
Enable it with the namespaced config block:
|
|
457
469
|
|
|
458
470
|
```yaml
|
|
459
|
-
truthmark
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
471
|
+
truthmark:
|
|
472
|
+
generated:
|
|
473
|
+
portal:
|
|
474
|
+
enabled: true
|
|
463
475
|
```
|
|
464
476
|
|
|
465
477
|
Then rerun:
|
|
@@ -498,14 +510,11 @@ Important config areas include:
|
|
|
498
510
|
| --- | --- |
|
|
499
511
|
| `version` | Config contract version. |
|
|
500
512
|
| `platforms` | Agent hosts that should receive platform-specific generated surfaces. |
|
|
501
|
-
| `
|
|
502
|
-
| `
|
|
503
|
-
|
|
|
504
|
-
|
|
|
505
|
-
| `
|
|
506
|
-
| `docs.routing.max_delegation_depth` | Current maximum route delegation depth. |
|
|
507
|
-
| `truthmark-portal` | Optional manual presentation workflow settings: `enabled`, `output`, and `template`. |
|
|
508
|
-
| `authority` | Ordered canonical docs and globs used as repository truth authority. |
|
|
513
|
+
| `truthmark.workspace` | Truthmark-owned workspace for routes, truth docs, templates, and generated presentation output. |
|
|
514
|
+
| Fixed routes | Routes live under `routes/areas.md` and `routes/areas/` inside `truthmark.workspace`; the default area is `repository` and delegation depth is `1`. |
|
|
515
|
+
| Fixed truth lanes | Product truth lives under `product/` and engineering truth under `engineering/` inside `truthmark.workspace`. |
|
|
516
|
+
| Fixed templates | Truth-doc templates live under `templates/` inside `truthmark.workspace`. |
|
|
517
|
+
| `truthmark.generated.portal` | Optional manual presentation workflow enablement: `enabled`. |
|
|
509
518
|
| `instruction_targets` | Files that receive shared managed instruction blocks, such as `AGENTS.md`. |
|
|
510
519
|
| `frontmatter.required` | Metadata fields that produce error diagnostics when missing. |
|
|
511
520
|
| `frontmatter.recommended` | Metadata fields that produce review diagnostics when missing. |
|
|
@@ -518,8 +527,8 @@ Truthmark maps code surfaces to truth docs.
|
|
|
518
527
|
The main routing files are:
|
|
519
528
|
|
|
520
529
|
```text
|
|
521
|
-
docs/truthmark/areas.md
|
|
522
|
-
docs/truthmark/areas/**/*.md
|
|
530
|
+
docs/truthmark/routes/areas.md
|
|
531
|
+
docs/truthmark/routes/areas/**/*.md
|
|
523
532
|
```
|
|
524
533
|
|
|
525
534
|
A route tells the agent:
|
|
@@ -549,7 +558,7 @@ It does this in four layers:
|
|
|
549
558
|
|
|
550
559
|
- configuration and routing for ownership boundaries
|
|
551
560
|
- canonical truth docs and starter templates
|
|
552
|
-
- compact managed instruction blocks for repository-wide agent
|
|
561
|
+
- compact managed instruction blocks for repository-wide agent instructions
|
|
553
562
|
- host-native workflow packages, commands, prompts, and verifier agents for the platforms enabled in config
|
|
554
563
|
|
|
555
564
|
Truthmark preserves manual content outside managed instruction blocks.
|
|
@@ -633,7 +642,7 @@ truthmark check
|
|
|
633
642
|
### Document implemented behavior
|
|
634
643
|
|
|
635
644
|
```text
|
|
636
|
-
/truthmark-document document the implemented password reset flow under docs/truth/authentication
|
|
645
|
+
/truthmark-document document the implemented password reset flow under docs/truthmark/truth/authentication
|
|
637
646
|
```
|
|
638
647
|
|
|
639
648
|
### Sync after code changes
|
|
@@ -645,7 +654,7 @@ truthmark check
|
|
|
645
654
|
### Realize a doc-first decision
|
|
646
655
|
|
|
647
656
|
```text
|
|
648
|
-
/truthmark-realize realize docs/truth/billing/invoice-retry-policy.md into code
|
|
657
|
+
/truthmark-realize realize docs/truthmark/truth/billing/invoice-retry-policy.md into code
|
|
649
658
|
```
|
|
650
659
|
|
|
651
660
|
### Audit truth health from the terminal
|
|
@@ -654,13 +663,13 @@ truthmark check
|
|
|
654
663
|
truthmark check
|
|
655
664
|
```
|
|
656
665
|
|
|
657
|
-
### Generate branch-impact
|
|
666
|
+
### Generate branch-impact summary
|
|
658
667
|
|
|
659
668
|
```bash
|
|
660
669
|
truthmark impact --base main
|
|
661
670
|
```
|
|
662
671
|
|
|
663
|
-
### Generate workflow
|
|
672
|
+
### Generate a workflow ContextPack
|
|
664
673
|
|
|
665
674
|
```bash
|
|
666
675
|
truthmark context --workflow truth-sync --base main --format markdown
|
|
@@ -669,10 +678,10 @@ truthmark context --workflow truth-sync --base main --format markdown
|
|
|
669
678
|
### Enable the optional Portal workflow
|
|
670
679
|
|
|
671
680
|
```yaml
|
|
672
|
-
truthmark
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
681
|
+
truthmark:
|
|
682
|
+
generated:
|
|
683
|
+
portal:
|
|
684
|
+
enabled: true
|
|
676
685
|
```
|
|
677
686
|
|
|
678
687
|
```bash
|
|
@@ -737,7 +746,7 @@ Useful scripts:
|
|
|
737
746
|
| `npm run check` | Run lint, typecheck, tests, and build. |
|
|
738
747
|
| `npm run release:check` | Run release-oriented validation. |
|
|
739
748
|
|
|
740
|
-
When changing Truthmark itself, see [
|
|
749
|
+
When changing Truthmark itself, see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
741
750
|
|
|
742
751
|
## Documentation
|
|
743
752
|
|
|
@@ -746,11 +755,11 @@ The README is the fast path for evaluation and setup.
|
|
|
746
755
|
Detailed current behavior lives under `docs/`:
|
|
747
756
|
|
|
748
757
|
- [Docs index](docs/README.md)
|
|
749
|
-
- [Architecture overview](docs/architecture/overview.md)
|
|
750
|
-
- [API and CLI contracts](docs/truth/contracts.md)
|
|
751
|
-
- [Init and scaffold behavior](docs/truth/init-and-scaffold.md)
|
|
752
|
-
- [Check diagnostics](docs/truth/check-diagnostics.md)
|
|
753
|
-
- [Installed workflows](docs/truth/workflows/overview.md)
|
|
758
|
+
- [Architecture overview](docs/truthmark/truth/architecture/overview.md)
|
|
759
|
+
- [API and CLI contracts](docs/truthmark/truth/contracts.md)
|
|
760
|
+
- [Init and scaffold behavior](docs/truthmark/truth/init-and-scaffold.md)
|
|
761
|
+
- [Check diagnostics](docs/truthmark/truth/check-diagnostics.md)
|
|
762
|
+
- [Installed workflows](docs/truthmark/truth/workflows/overview.md)
|
|
754
763
|
- [Repository truth maintenance guide](docs/standards/maintaining-repository-truth.md)
|
|
755
764
|
|
|
756
765
|
## Design boundaries
|
|
@@ -787,7 +796,7 @@ Teams should still:
|
|
|
787
796
|
- review generated workflow-surface diffs after upgrades
|
|
788
797
|
- keep human ownership over product and architecture decisions
|
|
789
798
|
|
|
790
|
-
Truthmark makes agent
|
|
799
|
+
Truthmark makes agent-facing repository truth visible. It does not replace human judgment.
|
|
791
800
|
|
|
792
801
|
## Roadmap direction
|
|
793
802
|
|
|
@@ -807,7 +816,7 @@ The center of gravity stays the same:
|
|
|
807
816
|
repository truth
|
|
808
817
|
agent-native workflows
|
|
809
818
|
Git review
|
|
810
|
-
branch-scoped
|
|
819
|
+
branch-scoped documentation
|
|
811
820
|
```
|
|
812
821
|
|
|
813
822
|
## License
|