unknown-knowledge 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.
Files changed (147) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +5 -0
  3. package/README.md +167 -0
  4. package/cli/.gitkeep +0 -0
  5. package/cli/commands/init-copy.js +90 -0
  6. package/cli/commands/init.js +386 -0
  7. package/cli/init-copy.js +24 -0
  8. package/cli/init.js +24 -0
  9. package/cli/kit.manifest.yaml +256 -0
  10. package/cli/lib/copy-payload.js +334 -0
  11. package/cli/lib/generate-wrappers.js +162 -0
  12. package/package.json +36 -0
  13. package/payload/adapter-fixtures/README.md +53 -0
  14. package/payload/adapter-fixtures/html/EXPECTED.yaml +50 -0
  15. package/payload/adapter-fixtures/html/sample.html +38 -0
  16. package/payload/adapter-fixtures/md/EXPECTED.yaml +65 -0
  17. package/payload/adapter-fixtures/md/sample.md +32 -0
  18. package/payload/adapter-fixtures/pdf/EXPECTED.yaml +45 -0
  19. package/payload/adapter-fixtures/pdf/sample.pdf +0 -0
  20. package/payload/adapter-fixtures/txt/EXPECTED.yaml +31 -0
  21. package/payload/adapter-fixtures/txt/sample.txt +18 -0
  22. package/payload/docs/README.md +102 -0
  23. package/payload/docs/boundaries.md +60 -0
  24. package/payload/docs/ci-wiring.md +109 -0
  25. package/payload/docs/steward-guide.md +238 -0
  26. package/payload/engine/audit.js +34 -0
  27. package/payload/engine/commands/audit.js +289 -0
  28. package/payload/engine/commands/derive.js +334 -0
  29. package/payload/engine/commands/ingest.js +124 -0
  30. package/payload/engine/commands/log-entry.js +85 -0
  31. package/payload/engine/commands/phoenix.js +206 -0
  32. package/payload/engine/commands/preflight.js +530 -0
  33. package/payload/engine/commands/resolve.js +1678 -0
  34. package/payload/engine/commands/survey-map.js +351 -0
  35. package/payload/engine/commands/validate-values.js +315 -0
  36. package/payload/engine/commands/validate.js +1426 -0
  37. package/payload/engine/derive.js +34 -0
  38. package/payload/engine/ingest.js +34 -0
  39. package/payload/engine/lib/anchor-signatures.js +126 -0
  40. package/payload/engine/lib/boot.js +39 -0
  41. package/payload/engine/lib/call-numbers.js +133 -0
  42. package/payload/engine/lib/cli.js +147 -0
  43. package/payload/engine/lib/coverage.js +849 -0
  44. package/payload/engine/lib/decomposition.js +225 -0
  45. package/payload/engine/lib/derived.js +494 -0
  46. package/payload/engine/lib/engine-refusal.js +40 -0
  47. package/payload/engine/lib/exit-codes.js +14 -0
  48. package/payload/engine/lib/extractor-kinds.js +955 -0
  49. package/payload/engine/lib/format-adapters.js +802 -0
  50. package/payload/engine/lib/id-grammars.js +178 -0
  51. package/payload/engine/lib/iso-date.js +55 -0
  52. package/payload/engine/lib/kit-root.js +101 -0
  53. package/payload/engine/lib/load-stores.js +1624 -0
  54. package/payload/engine/lib/log-entry.js +196 -0
  55. package/payload/engine/lib/phoenix.js +628 -0
  56. package/payload/engine/lib/scoring.js +150 -0
  57. package/payload/engine/lib/suppressions.js +172 -0
  58. package/payload/engine/lib/time-verdicts.js +282 -0
  59. package/payload/engine/lib/usage-error.js +14 -0
  60. package/payload/engine/lib/validate-record.js +504 -0
  61. package/payload/engine/log-entry.js +34 -0
  62. package/payload/engine/phoenix.js +39 -0
  63. package/payload/engine/preflight.js +34 -0
  64. package/payload/engine/resolve.js +34 -0
  65. package/payload/engine/survey-map.js +34 -0
  66. package/payload/engine/validate-values.js +34 -0
  67. package/payload/engine/validate.js +34 -0
  68. package/payload/extractor-fixtures/.gitkeep +0 -0
  69. package/payload/extractor-fixtures/README.md +29 -0
  70. package/payload/extractor-fixtures/swift/strings-keys/EXPECTED.yaml +8 -0
  71. package/payload/extractor-fixtures/swift/strings-keys/sample.strings +15 -0
  72. package/payload/extractor-fixtures/swift/swift-const-array/EXPECTED.yaml +7 -0
  73. package/payload/extractor-fixtures/swift/swift-const-array/sample.swift +21 -0
  74. package/payload/extractor-fixtures/swift/swift-enum/EXPECTED.yaml +8 -0
  75. package/payload/extractor-fixtures/swift/swift-enum/sample.swift +30 -0
  76. package/payload/extractor-fixtures/swift/yaml-keys/EXPECTED.yaml +6 -0
  77. package/payload/extractor-fixtures/swift/yaml-keys/sample.yaml +23 -0
  78. package/payload/extractor-fixtures/swift/yaml-map-keys/EXPECTED.yaml +7 -0
  79. package/payload/extractor-fixtures/swift/yaml-map-keys/sample.yaml +15 -0
  80. package/payload/extractor-fixtures/ts/dir-modules/EXPECTED.yaml +12 -0
  81. package/payload/extractor-fixtures/ts/dir-modules/sample-modules/alpha.widget.ts +1 -0
  82. package/payload/extractor-fixtures/ts/dir-modules/sample-modules/beta.widget.ts +1 -0
  83. package/payload/extractor-fixtures/ts/dir-modules/sample-modules/gamma.widget.ts +1 -0
  84. package/payload/extractor-fixtures/ts/dir-modules/sample-modules/helpers/format.ts +3 -0
  85. package/payload/extractor-fixtures/ts/dir-modules/sample-modules/widgets.test.ts +2 -0
  86. package/payload/extractor-fixtures/ts/json-keys/EXPECTED.yaml +7 -0
  87. package/payload/extractor-fixtures/ts/json-keys/sample.json +5 -0
  88. package/payload/extractor-fixtures/ts/json-map-keys/EXPECTED.yaml +7 -0
  89. package/payload/extractor-fixtures/ts/json-map-keys/sample.json +13 -0
  90. package/payload/extractor-fixtures/ts/ts-const-array/EXPECTED.yaml +6 -0
  91. package/payload/extractor-fixtures/ts/ts-const-array/sample.ts +13 -0
  92. package/payload/extractor-fixtures/ts/ts-enum/EXPECTED.yaml +7 -0
  93. package/payload/extractor-fixtures/ts/ts-enum/sample.ts +11 -0
  94. package/payload/extractor-fixtures/ts/ts-object-keys/EXPECTED.yaml +6 -0
  95. package/payload/extractor-fixtures/ts/ts-object-keys/sample.tsx +23 -0
  96. package/payload/extractor-fixtures/ts/ts-union/EXPECTED.yaml +5 -0
  97. package/payload/extractor-fixtures/ts/ts-union/sample.ts +9 -0
  98. package/payload/hooks/pre-commit +37 -0
  99. package/payload/hooks/reverse-lookup +66 -0
  100. package/payload/package.json +3 -0
  101. package/payload/protocol/.gitkeep +0 -0
  102. package/payload/protocol/AGENTS.md +239 -0
  103. package/payload/protocol/derived-layer.md +174 -0
  104. package/payload/protocol/new-kind-pipeline.md +179 -0
  105. package/payload/protocol/registry-warrant.md +162 -0
  106. package/payload/protocol/skills/kb-build.md +303 -0
  107. package/payload/protocol/skills/knowledge-audit.md +183 -0
  108. package/payload/protocol/skills/knowledge-bootstrap.md +229 -0
  109. package/payload/protocol/skills/knowledge-reflect.md +397 -0
  110. package/payload/schemas/catalog.schema.json +32 -0
  111. package/payload/schemas/decision-entry.schema.json +122 -0
  112. package/payload/schemas/finding.schema.json +77 -0
  113. package/payload/schemas/gap.schema.json +52 -0
  114. package/payload/schemas/graduation-categories.schema.json +64 -0
  115. package/payload/schemas/knowledge-leaf.schema.json +194 -0
  116. package/payload/schemas/miss.schema.json +45 -0
  117. package/payload/schemas/ontology-concept.schema.json +115 -0
  118. package/payload/schemas/phoenix-event.schema.json +76 -0
  119. package/payload/schemas/registry.schema.json +57 -0
  120. package/payload/schemas/rules.schema.json +14 -0
  121. package/payload/schemas/survey-scope.schema.json +23 -0
  122. package/payload/templates/decisions/_catalog.yaml +7 -0
  123. package/payload/templates/decisions/_registries/graduation-categories.yaml +42 -0
  124. package/payload/templates/decisions/phoenix-event.yaml +74 -0
  125. package/payload/templates/decisions/reflect-mint-proposal.yaml +100 -0
  126. package/payload/templates/decisions/registry-minting.yaml +58 -0
  127. package/payload/templates/decisions/trust-graduation.yaml +120 -0
  128. package/payload/templates/decisions/trust-revocation.yaml +106 -0
  129. package/payload/templates/knowledge/_catalog.yaml +9 -0
  130. package/payload/templates/knowledge/_registries/anchor.yaml +42 -0
  131. package/payload/templates/knowledge/_registries/authority-tiers.yaml +32 -0
  132. package/payload/templates/knowledge/_registries/domains.yaml +43 -0
  133. package/payload/templates/knowledge/_registries/form.yaml +38 -0
  134. package/payload/templates/knowledge/_registries/jurisdictions.yaml +20 -0
  135. package/payload/templates/knowledge/_registries/operations.yaml +18 -0
  136. package/payload/templates/knowledge/_registries/stage.yaml +53 -0
  137. package/payload/templates/knowledge/_rules.yaml +6 -0
  138. package/payload/templates/new-kind/README.md +107 -0
  139. package/payload/templates/new-kind/descriptor.example.yaml +18 -0
  140. package/payload/templates/new-kind/fixture/EXPECTED.yaml +6 -0
  141. package/payload/templates/new-kind/fixture/demo-anchor.list +2 -0
  142. package/payload/templates/new-kind/fixture/sample.list +7 -0
  143. package/payload/templates/new-kind/parser.example.js +98 -0
  144. package/payload/templates/ontology/_catalog.yaml +6 -0
  145. package/payload/templates/ontology/_rules.yaml +6 -0
  146. package/payload/wrappers/cursor.mdc +15 -0
  147. package/payload/wrappers/pointer.md +10 -0
@@ -0,0 +1,120 @@
1
+ # Decisions-entry template — graduating a change category (UCS-1155).
2
+ #
3
+ # A graduation narrows moderation on ONE CHANGE CATEGORY from 100% inspection to
4
+ # sampling. Copy this file to decisions/entries/<id>-<slug>.yaml, fill it, and
5
+ # open ONE PR carrying the entry and — if the category is not yet declared — the
6
+ # row that declares it in decisions/_registries/graduation-categories.yaml.
7
+ #
8
+ # Autonomy is PER CATEGORY, never per leaf. "L-000117 has been right ten times"
9
+ # is not evidence about anything: the eleventh leaf is a different claim by a
10
+ # different author. "Alias additions have been approved unmodified ten cycles
11
+ # running" is evidence about a class of edit, which is why the category is the
12
+ # unit and why a graduation names one.
13
+ #
14
+ # WHAT THE ENGINE CHECKS, AND WHAT IT DOES NOT. It checks that this entry is
15
+ # well-formed, that the category it names is declared in the table, and that the
16
+ # category is not permanently gated. It does NOT compute the approved-unmodified
17
+ # count and does not decide whether the threshold was met — v1's analytics are
18
+ # MANUAL. `observed-cycles` below is YOUR record of what you counted, written
19
+ # down so a reviewer can weigh the judgment; no code asserts it. Do not read a
20
+ # green validator as agreement that the bar was cleared.
21
+ #
22
+ # The two rules this entry exists to evidence:
23
+ #
24
+ # REVOCATION IS AUTOMATIC ON ANY DEFECT. A single defect found in a graduated
25
+ # category revokes it — not "a serious defect", not "a pattern of defects".
26
+ # The whole warrant for sampling is that this class of change stopped
27
+ # producing surprises, and one surprise is the evidence that it has not.
28
+ # Record the revocation with templates/decisions/trust-revocation.yaml.
29
+ #
30
+ # CITATION SPOT-CHECKS SURVIVE EVERY GRADUATION. The sampling plan keeps
31
+ # citation spot-checks at every trust level, including the most graduated. A
32
+ # citation is a claim about the world that the store cannot check for itself,
33
+ # so no streak of clean mechanical edits is evidence that the citations are
34
+ # sound — those are different questions, and graduation only ever answers the
35
+ # first.
36
+ #
37
+ # The `id` and `date` placeholders below are DELIBERATELY not valid, so this
38
+ # file fails validation until a steward fills them — pasting the template
39
+ # unedited must never produce a Decisions entry, or moderation would narrow on a
40
+ # rationale nobody wrote.
41
+ #
42
+ # Those two are the ones that fail on their SHAPE, but they are not the whole
43
+ # edit. Every <angle-bracket> placeholder must be replaced before this entry
44
+ # says anything true, and how each unfilled one fails differs — which is worth
45
+ # knowing, because the finding you get is not always the mistake you made:
46
+ #
47
+ # - `graduation.category` is pattern-checked (lowercase kebab), so an
48
+ # unfilled `<category-name>` is a KK-02 `pattern-mismatch` at EXIT 2, not a
49
+ # graduation finding. The store fails to load rather than validating with
50
+ # findings, so the graduation checks never run at all.
51
+ # - the PROSE fields (context, decision, consequences, title, deciders,
52
+ # provenance) are free strings. Nothing rejects them, so an unfilled one
53
+ # validates green while saying nothing true. Those are the dangerous ones:
54
+ # the only check on them is a reader.
55
+ #
56
+ # The full inventory:
57
+ #
58
+ # id the provisional D-YYYY-MM-DD-<slug> (schema-rejected)
59
+ # date the real date (schema-rejected)
60
+ # title <category>
61
+ # deciders <steward>
62
+ # context the whole prose block — the count and where you read it
63
+ # decision <category>, <rate>
64
+ # consequences the whole prose block
65
+ # graduation.category <category-name> — must match a row in the table
66
+ # graduation.observed-cycles your actual count, not 0
67
+ # provenance.author <steward-or-agent>
68
+ # provenance.skill-version <skill@version>
69
+ schema-version: 1
70
+ entries:
71
+ - id: D-YYYY-MM-DD-graduate-example-category
72
+ title: "Graduate <category> to sampling"
73
+ # `trust` — this entry moves the system's own trust boundary, which is what
74
+ # the third store governs (PRD §3: rationale, ADR-style records, trust
75
+ # graduations).
76
+ category: trust
77
+ status: proposed
78
+ date: "YYYY-MM-DD"
79
+ deciders: [<steward>]
80
+ # THE EVIDENCE. Name the category, the count of consecutive approved-
81
+ # unmodified cycles you observed, and where you read it (reflect records
82
+ # per-item approval outcomes by category — that is the observable basis).
83
+ # "It feels safe by now" is the case this refuses: the count is what makes
84
+ # the judgment reviewable by someone who was not in the room.
85
+ context: >-
86
+ <Which category, how many consecutive approved-unmodified cycles it has
87
+ run, and where those cycles are recorded. Note anything that would make
88
+ the streak misleading — a quiet period with few changes is not the same
89
+ evidence as a busy one.>
90
+ # What narrows, and to what. Say the sampling rate plainly: "graduated" is
91
+ # not a synonym for "unreviewed", and the entry should say what inspection
92
+ # remains.
93
+ decision: >-
94
+ <Graduate <category> from full inspection to sampling at <rate>. Citation
95
+ spot-checks continue at this level, as at every level.>
96
+ # Say the revocation trigger out loud. A reader six months from now needs to
97
+ # know that this narrowing is conditional and how it ends.
98
+ consequences: >-
99
+ <What is no longer inspected on every change, and what still is. Any
100
+ defect found in this category revokes this graduation automatically —
101
+ recorded as its own entry, returning the category to full inspection.>
102
+ supersedes: []
103
+ # The typed block the validator reads. `category` must name a row in
104
+ # decisions/_registries/graduation-categories.yaml, and that row must not be
105
+ # permanently gated — a gated category cannot graduate however strong the
106
+ # streak, because the gate is about the KIND of judgment the change needs.
107
+ graduation:
108
+ action: graduate
109
+ category: <category-name>
110
+ # Your manual count. Recorded, not computed (see above).
111
+ observed-cycles: 0
112
+ # Who wrote this entry and with which skill revision. Not decoration: if a
113
+ # graduation later proves to have been drafted by a bad skill vintage, this
114
+ # is what makes every entry from that vintage findable rather than guessed
115
+ # at.
116
+ provenance:
117
+ author: <steward-or-agent>
118
+ skill-version: <skill@version>
119
+ relates-to:
120
+ decisions: []
@@ -0,0 +1,106 @@
1
+ # Decisions-entry template — revoking a graduation (UCS-1155).
2
+ #
3
+ # A revocation returns ONE CHANGE CATEGORY from sampling to 100% inspection.
4
+ # Copy this file to decisions/entries/<id>-<slug>.yaml, fill it, and open it as
5
+ # an ordinary PR.
6
+ #
7
+ # REVOCATION IS AUTOMATIC ON ANY DEFECT, and "automatic" is meant literally:
8
+ # the trigger is a defect found in a graduated category, not a judgment that the
9
+ # defect was bad enough. There is no severity threshold to argue about and no
10
+ # discretion to exercise. The warrant for sampling a category was that it had
11
+ # stopped producing surprises; one surprise is the evidence that it has not, and
12
+ # the response is mechanical so that it cannot be talked out of.
13
+ #
14
+ # This is deliberately the CHEAPEST entry in the store to write. Narrowing
15
+ # inspection takes a counted streak and a written rationale; restoring it takes
16
+ # noticing one defect. That asymmetry is the design — if revoking were as
17
+ # laborious as graduating, the laborious thing would quietly not get done, and
18
+ # the trust boundary would only ever move one way.
19
+ #
20
+ # Revoking is always legitimate. The validator refuses a graduation for a
21
+ # permanently gated category, but never a revocation: a revocation only narrows
22
+ # autonomy, and refusing to record one would be refusing the safe direction.
23
+ #
24
+ # After revoking, the category returns to full inspection and its streak starts
25
+ # again from zero. A previously graduated category is not owed a shorter road
26
+ # back — the earlier streak was evidence about a period that has now ended.
27
+ #
28
+ # The `id` and `date` placeholders below are DELIBERATELY not valid, so this
29
+ # file fails validation until a steward fills them — pasting the template
30
+ # unedited must never produce a Decisions entry.
31
+ #
32
+ # Those two are not the whole edit. Every <angle-bracket> placeholder must be
33
+ # replaced before this entry says anything true, and how each unfilled one
34
+ # fails differs — which is worth knowing, because the finding you get is not
35
+ # always the mistake you made:
36
+ #
37
+ # - `graduation.category` is pattern-checked (lowercase kebab) and
38
+ # `graduation.revokes` is pattern-checked (D-NNN), so leaving either
39
+ # unfilled is a KK-02 `pattern-mismatch` at EXIT 2. The store fails to load
40
+ # rather than validating with findings, so the graduation checks never run.
41
+ # - the PROSE fields (context, decision, consequences, title, deciders,
42
+ # defect, provenance) are free strings. Nothing rejects them, so an
43
+ # unfilled one validates green while saying nothing true. Those are the
44
+ # dangerous ones: the only check on them is a reader.
45
+ #
46
+ # The full inventory:
47
+ #
48
+ # id the provisional D-YYYY-MM-DD-<slug> (schema-rejected)
49
+ # date the real date (schema-rejected)
50
+ # title <category>
51
+ # deciders <steward>
52
+ # context the whole prose block — the defect, and how it surfaced
53
+ # decision <category>
54
+ # consequences the whole prose block
55
+ # graduation.category <category-name> — must match a row in the table
56
+ # graduation.revokes D-NNN — the graduation being withdrawn. DELETE this
57
+ # line if no graduation for the category exists (the
58
+ # standing-position case); leaving `D-NNN` literal is an
59
+ # unresolved ref, and omitting it when a graduation DOES
60
+ # stand is a `disconnected-revocation` finding
61
+ # graduation.defect <what went wrong>
62
+ # provenance.author <steward-or-agent>
63
+ # provenance.skill-version <skill@version>
64
+ schema-version: 1
65
+ entries:
66
+ - id: D-YYYY-MM-DD-revoke-example-category
67
+ title: "Revoke sampling for <category>"
68
+ # `trust` — like the graduation it withdraws, this entry moves the system's
69
+ # own trust boundary.
70
+ category: trust
71
+ status: proposed
72
+ date: "YYYY-MM-DD"
73
+ deciders: [<steward>]
74
+ # THE DEFECT. Name what went wrong concretely — the change, what was wrong
75
+ # with it, and how it was caught. This is the substance: a revocation whose
76
+ # context cannot name a defect is a revocation nobody can learn from, and
77
+ # the next graduation of this category will have nothing to have fixed.
78
+ context: >-
79
+ <Which defect was found, in which change, and how it surfaced — a
80
+ spot-check, a downstream correction, a reader's report. Name the graduation
81
+ entry this withdraws.>
82
+ decision: >-
83
+ <Revoke the graduation of <category>. The category returns to full
84
+ inspection immediately; its approved-unmodified streak restarts at zero.>
85
+ # What this obliges. A defect that reached the store under sampling may have
86
+ # company: say whether the material admitted while graduated needs a sweep.
87
+ consequences: >-
88
+ <What returns to full inspection, and whether changes admitted under
89
+ sampling need reviewing. If the defect suggests a bad skill revision, name
90
+ it — entry provenance makes the affected entries findable.>
91
+ supersedes: []
92
+ graduation:
93
+ action: revoke
94
+ category: <category-name>
95
+ # The graduation entry being withdrawn. Resolved like any other ref, so a
96
+ # revocation naming no graduation is an unresolved-ref error — the
97
+ # withdrawal and the thing withdrawn stay connected in the record.
98
+ revokes: D-NNN
99
+ # What went wrong, in one line. The machine-checkable half is that a
100
+ # revocation exists at all; this is the half a human reads.
101
+ defect: <what went wrong>
102
+ provenance:
103
+ author: <steward-or-agent>
104
+ skill-version: <skill@version>
105
+ relates-to:
106
+ decisions: []
@@ -0,0 +1,9 @@
1
+ # knowledge/_catalog.yaml — navigational entry point (catalog -> rules -> leaves).
2
+ # Each row names its leaf by ACCESSION id (L-NNNNNN) and locates it with `file`;
3
+ # those are two independent facts, so moving a leaf between prefix-shard
4
+ # directories updates `file` alone and invalidates no citation.
5
+ # Empty seed: init copies it; the kb-build skill fills entries as cited leaves land.
6
+ # Shape: payload/schemas/catalog.schema.json. schema-version evolves additively (§3.5).
7
+ schema-version: 1
8
+ store: knowledge
9
+ entries: []
@@ -0,0 +1,42 @@
1
+ # The anchor registry — which truth anchor a leaf's claim answers to.
2
+ #
3
+ # THE VOCABULARY IS FIXED BY D-003, BUT THE FILE STILL SHIPS EMPTY. Those are
4
+ # two different facts and both matter.
5
+ #
6
+ # Fixed: the three anchors ARE the kit's architecture (D-003 splits facts into
7
+ # three stores by truth anchor — Ontology/artifact, Knowledge/world,
8
+ # Decisions/team). A project that minted a fourth would be describing a store
9
+ # this engine does not have, so unlike domains or form, this is not a vocabulary
10
+ # to invent. Mint from the three below and no others.
11
+ #
12
+ # Empty anyway: every registry value must cite a Decisions entry that RESOLVES
13
+ # (UCS-1148), and a freshly seeded repo's decisions store is empty by design
14
+ # (D-001 — the repo is yours the moment it lands, and the kit does not write
15
+ # entries into it). Shipping values citing the kit's own D-003 would seed every
16
+ # client repo with a broken ref, and shipping them citing nothing would put a
17
+ # vocabulary change in the store that nobody signed. So the bootstrap interview
18
+ # mints these three the same way it mints everything else: this file plus one
19
+ # Decisions entry of your own, recording that you adopted D-003's split.
20
+ #
21
+ # Flat vocabulary. Value shape: lowercase kebab. Mint exactly these:
22
+ #
23
+ # values:
24
+ # - value: artifact
25
+ # gloss: The repo decides. The claim is checkable against code, config, or schema.
26
+ # warrant: <the leaf whose claim reads back to a source-of-truth pointer>
27
+ # decision: <your entry adopting the D-003 anchors>
28
+ # minted: "2026-07-07"
29
+ # - value: world
30
+ # gloss: An outside authority decides — a regulator, a vendor, a standard.
31
+ # warrant: <the leaf whose claim only a cited outside source can settle>
32
+ # decision: <your entry adopting the D-003 anchors>
33
+ # minted: "2026-07-07"
34
+ # - value: team
35
+ # gloss: The team decided. The claim is true because it was chosen, not discovered.
36
+ # warrant: <the leaf restating a team choice, which answers to the entry that made it>
37
+ # decision: <your entry adopting the D-003 anchors>
38
+ # minted: "2026-07-07"
39
+ schema-version: 1
40
+ store: knowledge
41
+ registry: anchor
42
+ values: []
@@ -0,0 +1,32 @@
1
+ # The citation authority-tiers registry — how far a cited source can be trusted.
2
+ #
3
+ # Ships EMPTY. Which tiers a project recognizes is the project's own to mint: a
4
+ # tier is a governed value, never an engine-shipped enum, because what counts as
5
+ # authoritative is a judgement about a domain rather than a fact about software.
6
+ # See protocol/registry-warrant.md.
7
+ #
8
+ # What the tier does TODAY: it is recorded and checked for membership, so every
9
+ # citation says how far its source can be trusted rather than leaving a
10
+ # regulator's text and a hallway conversation to read identically. Nothing in
11
+ # the engine compares two tiers or resolves a conflict between citations yet —
12
+ # automatic conflict ranking arrives with the resolution pipeline (UCS-1152).
13
+ # Recording the tier now is what makes that possible: a tier nobody wrote down
14
+ # cannot be ranked retroactively.
15
+ #
16
+ # Flat vocabulary. Value shape: lowercase kebab.
17
+ #
18
+ # values:
19
+ # - value: primary
20
+ # gloss: The issuing body's own published text.
21
+ # warrant: 362.1 cites the Component Kit API reference, the vendor's own text.
22
+ # decision: D-014
23
+ # minted: "2026-07-07"
24
+ # - value: secondary
25
+ # gloss: Commentary on a primary source.
26
+ # warrant: 362.2 cites a community summary of those rules.
27
+ # decision: D-014
28
+ # minted: "2026-07-07"
29
+ schema-version: 1
30
+ store: knowledge
31
+ registry: authority-tiers
32
+ values: []
@@ -0,0 +1,43 @@
1
+ # The hierarchical domains registry — the subject spine of the knowledge store.
2
+ #
3
+ # Ships EMPTY. The bootstrap interview mints the first top-level classes from
4
+ # material that already exists; nothing is pre-allocated, because a class minted
5
+ # ahead of its material is speculative shelving (see protocol/registry-warrant.md).
6
+ #
7
+ # THE TOP LEVEL IS OPEN. Adding a top-level class is an edit to this file plus a
8
+ # Decisions entry — no schema change, no engine change, no allocation table.
9
+ #
10
+ # Value shape (hierarchical): lowercase kebab segments joined by "/". A child is
11
+ # valid only when EVERY segment above it is itself minted here.
12
+ #
13
+ # `warrant` and `decision` are BOTH required on every value: the material that
14
+ # needs the term, and the Decisions entry that signed it off. The decision id is
15
+ # resolved like any other citation, so it must name a real entry.
16
+ #
17
+ # values:
18
+ # - value: design-system
19
+ # gloss: The shared design system and the rules its parts obey.
20
+ # warrant: 362.1 documents component sizing rules and needs a home.
21
+ # decision: D-014
22
+ # minted: "2026-07-07"
23
+ # - value: design-system/components
24
+ # gloss: The component library specifically.
25
+ # warrant: 362.1 states the component rules themselves.
26
+ # decision: D-014
27
+ # minted: "2026-07-07"
28
+ #
29
+ # A value that was proposed and REFUSED stays listed, marked suppressed, so the
30
+ # refusal is durable and the term cannot be quietly re-minted:
31
+ #
32
+ # - value: design-system/motion
33
+ # warrant: Proposed for 362.4; no material exists, so no warrant was found.
34
+ # status: suppressed
35
+ # decision: D-015
36
+ schema-version: 1
37
+ store: knowledge
38
+ registry: domains
39
+ # Load-bearing: this flag is what turns on segment-by-segment membership.
40
+ # Without it a whole path would be judged as one opaque string, so the engine
41
+ # refuses a flat domains registry rather than quietly obeying it.
42
+ hierarchical: true
43
+ values: []
@@ -0,0 +1,38 @@
1
+ # The form registry — what KIND of knowledge a leaf is.
2
+ #
3
+ # Ships EMPTY, for the same reason domains does: which forms a project
4
+ # recognizes is a judgement about its own material, not a fact about software.
5
+ # A store whose leaves are all reference material has no warrant for a
6
+ # `runbook` form, and minting one ahead of the first runbook is speculative
7
+ # shelving (see protocol/registry-warrant.md).
8
+ #
9
+ # Flat vocabulary. Value shape: lowercase kebab.
10
+ #
11
+ # The forms the design bench drew from, offered as a starting vocabulary rather
12
+ # than a seeded one — mint the ones your material actually needs:
13
+ #
14
+ # values:
15
+ # - value: reference
16
+ # gloss: States how something is, for lookup.
17
+ # warrant: 362.1 states the component sizing rules themselves.
18
+ # decision: D-014
19
+ # minted: "2026-07-07"
20
+ # - value: recipe
21
+ # gloss: The ordered steps for performing a task.
22
+ # warrant: 100.1 is the step list for adding an export format.
23
+ # decision: D-014
24
+ # minted: "2026-07-07"
25
+ # - value: runbook
26
+ # gloss: What to do when something is on fire.
27
+ # warrant: 121.1 is the feed-outage response procedure.
28
+ # decision: D-014
29
+ # minted: "2026-07-07"
30
+ # - value: constraint
31
+ # gloss: A rule the system must not violate.
32
+ # warrant: 133.1 states the token rounding rule.
33
+ # decision: D-014
34
+ # minted: "2026-07-07"
35
+ schema-version: 1
36
+ store: knowledge
37
+ registry: form
38
+ values: []
@@ -0,0 +1,20 @@
1
+ # The jurisdictions registry — where a knowledge leaf's claim holds.
2
+ #
3
+ # Ships EMPTY; each value is minted by literary warrant (material must exist to
4
+ # fill it) with a Decisions entry recording the minting. See
5
+ # protocol/registry-warrant.md.
6
+ #
7
+ # Flat vocabulary. Value shape: lowercase kebab. Which granularity a project
8
+ # needs — country, region, market, internal business unit — is the project's own
9
+ # to decide and record; the engine holds no opinion.
10
+ #
11
+ # values:
12
+ # - value: us
13
+ # gloss: United States.
14
+ # warrant: 362.1 states US-CA-only accessibility rules.
15
+ # decision: D-014
16
+ # minted: "2026-07-07"
17
+ schema-version: 1
18
+ store: knowledge
19
+ registry: jurisdictions
20
+ values: []
@@ -0,0 +1,18 @@
1
+ # The operations registry — the verbs a knowledge leaf lets a reader DO.
2
+ #
3
+ # Ships EMPTY; each value is minted by literary warrant (material must exist to
4
+ # fill it) with a Decisions entry recording the minting. See
5
+ # protocol/registry-warrant.md.
6
+ #
7
+ # Flat vocabulary. Value shape: lowercase kebab.
8
+ #
9
+ # values:
10
+ # - value: reconcile
11
+ # gloss: Export a component set to a published package.
12
+ # warrant: 362.1 documents the export procedure.
13
+ # decision: D-014
14
+ # minted: "2026-07-07"
15
+ schema-version: 1
16
+ store: knowledge
17
+ registry: operations
18
+ values: []
@@ -0,0 +1,53 @@
1
+ # The stage registry — where a leaf sits in its promotion lifecycle.
2
+ #
3
+ # THE VOCABULARY IS LOAD-BEARING, BUT THE FILE STILL SHIPS EMPTY. Both facts
4
+ # matter, for the same reasons the anchor registry states.
5
+ #
6
+ # Load-bearing: two engine surfaces read these values through ONE shared
7
+ # predicate (isPrePromotionStatus in engine/lib/load-stores.js). A project that
8
+ # renamed `draft` to `wip` would not be extending a vocabulary — it would be
9
+ # handing the resolver's downrank and preflight's unknown verdict two different
10
+ # answers to "is this leaf provisional yet", which is the exact divergence the
11
+ # shared predicate exists to make impossible. `draft` and `proposed` are the two
12
+ # spellings the predicate recognizes, and they match the concept lifecycle
13
+ # (ontology-concept.schema.json `status`) rather than being a parallel
14
+ # vocabulary. Mint from the four below and no others.
15
+ #
16
+ # Empty anyway: a registry value must cite a Decisions entry that RESOLVES, and
17
+ # a freshly seeded repo's decisions store is empty by design (D-001). The
18
+ # bootstrap interview mints these with an entry of your own.
19
+ #
20
+ # A leaf at `draft` or `proposed` is downranked in resolver output and verdicted
21
+ # `unknown` by preflight. Those are the same leaf, judged once.
22
+ #
23
+ # THREE VALUES, NOT FOUR. There is deliberately no `deprecated` stage yet. The
24
+ # concept lifecycle has one, and it carries real semantics there (§3.5 demotes a
25
+ # deprecated concept's pointer and value findings to warnings) — but no leaf
26
+ # surface implements the matching demotion. A `deprecated` value minted here
27
+ # with nothing behind it would rank a retired leaf ABOVE a draft one and let
28
+ # preflight verdict it `trusted`, which is worse than not offering the term:
29
+ # a vocabulary that looks governed and governs nothing. Retiring a leaf is a
30
+ # later ticket, and it lands with its semantics or not at all.
31
+ #
32
+ # Flat vocabulary. Value shape: lowercase kebab. Mint exactly these:
33
+ #
34
+ # values:
35
+ # - value: draft
36
+ # gloss: Written but not promoted — nothing certifies the claim yet.
37
+ # warrant: The default stage for every newly authored leaf.
38
+ # decision: <your entry adopting the lifecycle>
39
+ # minted: "2026-07-07"
40
+ # - value: proposed
41
+ # gloss: Put forward for promotion and awaiting a moderator.
42
+ # warrant: The second stage the pre-promotion predicate recognizes.
43
+ # decision: <your entry adopting the lifecycle>
44
+ # minted: "2026-07-07"
45
+ # - value: verified
46
+ # gloss: A moderator promoted it — the citations were checked and hold.
47
+ # warrant: <the first leaf a moderator promoted>
48
+ # decision: <your entry adopting the lifecycle>
49
+ # minted: "2026-07-07"
50
+ schema-version: 1
51
+ store: knowledge
52
+ registry: stage
53
+ values: []
@@ -0,0 +1,6 @@
1
+ # knowledge/_rules.yaml — per-store governance rules (human-only gated writes,
2
+ # citation requirements, accession-id identity). Empty seed: rule items are
3
+ # bootstrap-generated per project. Shape: payload/schemas/rules.schema.json.
4
+ schema-version: 1
5
+ store: knowledge
6
+ rules: []
@@ -0,0 +1,107 @@
1
+ # new-kind drafting template (PRD §5.2 DRAFT step)
2
+
3
+ This directory is the shipped template for drafting a new extractor kind out
4
+ of a `logs/misses/` entry. The pipeline it belongs to — SURVEY → MATCH →
5
+ DRAFT → GATE → INTEGRATE → RE-RUN — is documented in
6
+ `protocol/new-kind-pipeline.md` (client-relative; under `payload/` in the kit
7
+ repo). Read that first; in particular the
8
+ **D-005 hard rule**: validators execute only vendored, versioned,
9
+ test-covered code — a kind drafted in a session is NEVER wired into the
10
+ validator in that same session. Everything drafted from this template enters
11
+ through GATE (PR + tests + review).
12
+
13
+ The template is deliberately framework-agnostic and demonstrates the shape
14
+ with a trivial demo kind, `line-list` (one `- value` per line; lines split on
15
+ LF or CRLF; blank lines and `#` comments ignored; a value line carrying
16
+ trailing whitespace is *out of the envelope* — it would capture a value that
17
+ can never byte-match its visually identical claim, so the parser hard-errors
18
+ naming the invisible whitespace instead of guessing). The kit's
19
+ extractor-kind framework (KK-07/08) defines how merged kinds register with
20
+ the value validator; a drafted parser conforms to that at INTEGRATE time —
21
+ the contract this template teaches (pure lexical extraction, hard-error on
22
+ out-of-envelope, string values as sets) is the part that never changes.
23
+
24
+ ## What's here
25
+
26
+ Six files: this README plus the five below. Together they demonstrate the
27
+ pipeline's **three DRAFT artifacts** — the parser, the test fixture, and the
28
+ demo run:
29
+
30
+ | File | Role |
31
+ |---|---|
32
+ | `parser.example.js` | **DRAFT artifact 1, the parser** — pure function `extractValues(text)` + the demo-run CLI; hard-errors on anything outside its declared syntactic envelope |
33
+ | `fixture/sample.list` | **DRAFT artifact 2, the test fixture (input half)** — a sample anchor (D-009) |
34
+ | `fixture/EXPECTED.yaml` | **DRAFT artifact 2, the test fixture (expected half)** — the value set the parser must extract from `sample.list` |
35
+ | `fixture/demo-anchor.list` | stand-in "live anchor" for **DRAFT artifact 3, the demo run** (the recorded walkthrough below) |
36
+ | `descriptor.example.yaml` | the `enumerates` descriptor fragment the RE-RUN step validates once the kind is merged |
37
+
38
+ ## Drafting a real kind from this template
39
+
40
+ 1. Start from an **open miss**: `logs/misses/<date>-<hex8>.yaml` gives you the
41
+ anchor `path` and its `shape`. First weigh reification (principle 6) —
42
+ a registry/enum in the code often beats a bespoke parser.
43
+ 2. Copy this directory; rename the kind (lowercase/digits/hyphens); replace
44
+ the extraction logic in the parser, keeping the four contract points in
45
+ its header comment (pure/deterministic, hard-error-never-guess, declared
46
+ envelope, string values).
47
+ 3. Rebuild the fixture pair: a `fixture/` sample exercising the envelope
48
+ (including at least one adversarial-but-extractable shape) and its
49
+ `EXPECTED.yaml`.
50
+ 4. **Demo run** the parser against the live anchor the miss recorded and
51
+ capture the output for the PR.
52
+ 5. Open the GATE PR: parser + fixture + demo-run output. Transition the miss
53
+ `open → proposed` (`node engine/log-entry.js transition --file
54
+ logs/misses/<entry>.yaml --to proposed --date YYYY-MM-DD`). Resolution
55
+ (`proposed → resolved`) happens only after the merged kind's RE-RUN
56
+ passes; rejection requires a `reason`.
57
+
58
+ ## Recorded walkthrough (manual exercise, 2026-07-08)
59
+
60
+ Honest seam: this is a documented **manual** exercise of the template, not
61
+ CI. It was run once, by hand, from this directory, and its output is pasted
62
+ verbatim below — byte-honest, not condensed. (Kit CI pins the template
63
+ artifacts against each other and replays these CLI runs, so the transcripts
64
+ can't rot apart from the shipped files.)
65
+
66
+ **1. Fixture run** — the parser against its own fixture, output matching
67
+ `fixture/EXPECTED.yaml` (exit 0):
68
+
69
+ ```
70
+ $ node parser.example.js fixture/sample.list
71
+ {
72
+ "kind": "line-list",
73
+ "file": "fixture/sample.list",
74
+ "values": [
75
+ "png",
76
+ "svg",
77
+ "pdf"
78
+ ]
79
+ }
80
+ ```
81
+
82
+ **2. Demo run** — the parser against a throwaway "live anchor"
83
+ (`fixture/demo-anchor.list`, standing in for the miss entry's `path`); this
84
+ output goes on the PR (exit 0):
85
+
86
+ ```
87
+ $ node parser.example.js fixture/demo-anchor.list
88
+ {
89
+ "kind": "line-list",
90
+ "file": "fixture/demo-anchor.list",
91
+ "values": [
92
+ "grid",
93
+ "stack"
94
+ ]
95
+ }
96
+ ```
97
+
98
+ **3. Envelope hard-error** — a file with an out-of-envelope line must fail
99
+ loudly with exit 2, never emit a partial set. `/tmp/bad.list` here contains
100
+ the two lines `- rugby` and `not a value line`:
101
+
102
+ ```
103
+ $ node parser.example.js /tmp/bad.list
104
+ line-list: /tmp/bad.list:2: line is outside the line-list envelope (expected blank, "#" comment, or "- value"): "not a value line"
105
+ ```
106
+
107
+ Exit 2 — a check that never ran is a blocking defect.
@@ -0,0 +1,18 @@
1
+ # new-kind drafting template — the enumerates descriptor the RE-RUN step
2
+ # will validate once the kind has passed GATE and INTEGRATE (PRD §5.2).
3
+ #
4
+ # This is NOT a store file — it is the fragment you paste into the owning
5
+ # concept's `enumerates:` list. Field set per ontology-concept.schema.json
6
+ # ($defs/enumeratesDescriptor): kind + source + values required; symbol and
7
+ # emit only where the kind needs them (this demo kind needs neither).
8
+ #
9
+ # - `kind` names the parser that re-derives the claim (lowercase/digits/
10
+ # hyphens — the set is open: clients author later kinds through this
11
+ # template).
12
+ # - `source` must name a listed source-of-truth entry of the concept (§3.5).
13
+ # - `values` is the claim, diffed BOTH WAYS against what the parser extracts
14
+ # (value-not-in-source / source-value-missing). Strings, byte-exact,
15
+ # case-sensitive, as sets — quote YAML-1.1 traps like "no"/"on" (§3.5).
16
+ - kind: line-list
17
+ source: docs/supported-formats.list
18
+ values: [png, svg, pdf]
@@ -0,0 +1,6 @@
1
+ # Expected extraction for fixture/sample.list — the other half of the D-009
2
+ # sample-file → expected-values pair. Values are strings compared byte-exact,
3
+ # case-sensitive, as a set (§3.5): order here is presentation only.
4
+ kind: line-list
5
+ file: sample.list
6
+ values: [png, svg, pdf]
@@ -0,0 +1,2 @@
1
+ - grid
2
+ - stack
@@ -0,0 +1,7 @@
1
+ # Extractor fixture for the line-list demo kind (D-009): a sample anchor the
2
+ # parser must read, paired with fixture/EXPECTED.yaml. Blank lines and
3
+ # comments are inside the envelope; any other non-value line hard-errors.
4
+
5
+ - png
6
+ - svg
7
+ - pdf