trustwiki 0.1.0-alpha.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.
Files changed (42) hide show
  1. package/README.md +87 -0
  2. package/README.zh.md +82 -0
  3. package/SKILL.md +76 -0
  4. package/cli/bin.js +29 -0
  5. package/cli/citations.js +45 -0
  6. package/cli/config.js +52 -0
  7. package/cli/engine.js +99 -0
  8. package/cli/frontmatter.js +33 -0
  9. package/cli/links.js +12 -0
  10. package/cli/report.js +24 -0
  11. package/cli/resolve.js +25 -0
  12. package/cli/rules/citation-malformed.js +12 -0
  13. package/cli/rules/citation-target-missing.js +21 -0
  14. package/cli/rules/frontmatter-fields.js +39 -0
  15. package/cli/rules/frontmatter-required.js +12 -0
  16. package/cli/rules/index.js +19 -0
  17. package/cli/rules/link-broken.js +22 -0
  18. package/cli/rules/link-index-missing.js +30 -0
  19. package/cli/rules/link-type-mismatch.js +16 -0
  20. package/cli/rules/page-orphan.js +14 -0
  21. package/cli/rules/placeholder-present.js +17 -0
  22. package/cli/rules/provenance-contradicted.js +31 -0
  23. package/cli/rules/provenance-excess-inferred.js +21 -0
  24. package/cli/rules/provenance-low-confidence.js +15 -0
  25. package/cli/walk.js +19 -0
  26. package/docs/method.md +69 -0
  27. package/docs/method.zh.md +61 -0
  28. package/package.json +31 -0
  29. package/proof/STATS.md +18 -0
  30. package/schema/spec.md +110 -0
  31. package/schema/spec.zh.md +103 -0
  32. package/templates/demo-vault/.trustwiki.json +6 -0
  33. package/templates/demo-vault/index.md +7 -0
  34. package/templates/demo-vault/notes/conflict-a.md +13 -0
  35. package/templates/demo-vault/notes/conflict-b.md +12 -0
  36. package/templates/demo-vault/notes/honest-page.md +13 -0
  37. package/templates/demo-vault/notes/sloppy-page.md +20 -0
  38. package/templates/demo-vault/sources/tea.md +12 -0
  39. package/templates/starter-vault/.trustwiki.json +5 -0
  40. package/templates/starter-vault/index.md +4 -0
  41. package/templates/starter-vault/notes/first-note.md +11 -0
  42. package/templates/starter-vault/sources/example-source.md +12 -0
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: Honest Page
3
+ created: 2026-09-05
4
+ updated: 2026-09-05
5
+ type: note
6
+ tags: [demo]
7
+ ---
8
+
9
+ # Honest page
10
+
11
+ Everything here is cited.^[sources/tea.md] Ranges work too.^[sources/tea.md:1-2]
12
+
13
+ Links out: [[notes/conflict-a]] and [[notes/sloppy-page]]. The method itself.^[sources/tea.md]
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: Sloppy Page
3
+ created: 2026-09-05
4
+ updated: 2026-09-05
5
+ type: note
6
+ tags: [demo]
7
+ confidence: 0.3
8
+ ---
9
+
10
+ # Sloppy page
11
+
12
+ This paragraph asserts things with a broken citation.^[sources/ghost.md]
13
+
14
+ This paragraph claims facts but has no citation at all and rambles on long enough to be real prose without any source.
15
+
16
+ TODO: finish this section
17
+
18
+ See [[notes/dead-ref]] someday.
19
+
20
+ Broken range cite.^[sources/tea.md:99-10]
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: Tea
3
+ created: 2026-09-05
4
+ updated: 2026-09-05
5
+ type: source
6
+ tags: [demo]
7
+ source_url: https://example.com/tea
8
+ ingested: 2026-09-05
9
+ sha256: 0000000000000000000000000000000000000000000000000000000000000000
10
+ ---
11
+
12
+ Brewing temperatures vary by style.
@@ -0,0 +1,5 @@
1
+ {
2
+ "roots": ["notes", "sources"],
3
+ "index": "index.md",
4
+ "sourceDir": "sources"
5
+ }
@@ -0,0 +1,4 @@
1
+ # My vault
2
+
3
+ - [[notes/first-note]] — what this vault is for
4
+ - [[sources/example-source]] — first raw source
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: First Note
3
+ created: 2026-09-05
4
+ updated: 2026-09-05
5
+ type: note
6
+ tags: [starter]
7
+ ---
8
+
9
+ What this source claims.^[sources/example-source.md] Add your own reading of it in a second cited paragraph — synthesis is welcome, unattributed claims are not. Source page: [[sources/example-source]].
10
+
11
+ As the vault grows, weave in more links to other notes. This page currently links only to its source, which lint flags as an orphan *warning* — warnings are debt you can see, not errors you must fix right now.^[sources/example-source.md]
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: Example Source
3
+ created: 2026-09-05
4
+ updated: 2026-09-05
5
+ type: source
6
+ tags: [starter]
7
+ source_url: https://example.com/article
8
+ ingested: 2026-09-05
9
+ sha256: 0000000000000000000000000000000000000000000000000000000000000000
10
+ ---
11
+
12
+ This raw page holds the source's own words. Never paraphrase here — this page is evidence.