@polycode-projects/the-mechanical-code-talker 5.0.15 → 5.0.17

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 (99) hide show
  1. package/README.md +12 -3
  2. package/bin/tmct.mjs +52 -3
  3. package/corpus/LICENSES.json +3 -3
  4. package/corpus/domains/code/LICENSE-NOTICE +43 -0
  5. package/corpus/{seon → domains/code}/README.md +22 -24
  6. package/corpus/domains/code/vocab.json +43 -0
  7. package/corpus/reference/manifest.json +126 -126
  8. package/corpus/reference/shards/ref-00.jsonl.gz +0 -0
  9. package/corpus/reference/shards/ref-01.jsonl.gz +0 -0
  10. package/corpus/reference/shards/ref-02.jsonl.gz +0 -0
  11. package/corpus/reference/shards/ref-03.jsonl.gz +0 -0
  12. package/corpus/reference/shards/ref-04.jsonl.gz +0 -0
  13. package/corpus/reference/shards/ref-05.jsonl.gz +0 -0
  14. package/corpus/reference/shards/ref-06.jsonl.gz +0 -0
  15. package/corpus/reference/shards/ref-07.jsonl.gz +0 -0
  16. package/corpus/reference/shards/ref-08.jsonl.gz +0 -0
  17. package/corpus/reference/shards/ref-09.jsonl.gz +0 -0
  18. package/corpus/reference/shards/ref-0a.jsonl.gz +0 -0
  19. package/corpus/reference/shards/ref-0b.jsonl.gz +0 -0
  20. package/corpus/reference/shards/ref-0c.jsonl.gz +0 -0
  21. package/corpus/reference/shards/ref-0d.jsonl.gz +0 -0
  22. package/corpus/reference/shards/ref-0e.jsonl.gz +0 -0
  23. package/corpus/reference/shards/ref-0f.jsonl.gz +0 -0
  24. package/corpus/reference/shards/ref-10.jsonl.gz +0 -0
  25. package/corpus/reference/shards/ref-11.jsonl.gz +0 -0
  26. package/corpus/reference/shards/ref-12.jsonl.gz +0 -0
  27. package/corpus/reference/shards/ref-13.jsonl.gz +0 -0
  28. package/corpus/reference/shards/ref-14.jsonl.gz +0 -0
  29. package/corpus/reference/shards/ref-15.jsonl.gz +0 -0
  30. package/corpus/reference/shards/ref-16.jsonl.gz +0 -0
  31. package/corpus/reference/shards/ref-17.jsonl.gz +0 -0
  32. package/corpus/reference/shards/ref-18.jsonl.gz +0 -0
  33. package/corpus/reference/shards/ref-19.jsonl.gz +0 -0
  34. package/corpus/reference/shards/ref-1a.jsonl.gz +0 -0
  35. package/corpus/reference/shards/ref-1b.jsonl.gz +0 -0
  36. package/corpus/reference/shards/ref-1c.jsonl.gz +0 -0
  37. package/corpus/reference/shards/ref-1d.jsonl.gz +0 -0
  38. package/corpus/reference/shards/ref-1e.jsonl.gz +0 -0
  39. package/corpus/reference/shards/ref-1f.jsonl.gz +0 -0
  40. package/corpus/reference/shards/ref-20.jsonl.gz +0 -0
  41. package/corpus/reference/shards/ref-21.jsonl.gz +0 -0
  42. package/corpus/reference/shards/ref-22.jsonl.gz +0 -0
  43. package/corpus/reference/shards/ref-23.jsonl.gz +0 -0
  44. package/corpus/reference/shards/ref-24.jsonl.gz +0 -0
  45. package/corpus/reference/shards/ref-25.jsonl.gz +0 -0
  46. package/corpus/reference/shards/ref-26.jsonl.gz +0 -0
  47. package/corpus/reference/shards/ref-27.jsonl.gz +0 -0
  48. package/corpus/reference/shards/ref-28.jsonl.gz +0 -0
  49. package/corpus/reference/shards/ref-29.jsonl.gz +0 -0
  50. package/corpus/reference/shards/ref-2a.jsonl.gz +0 -0
  51. package/corpus/reference/shards/ref-2b.jsonl.gz +0 -0
  52. package/corpus/reference/shards/ref-2c.jsonl.gz +0 -0
  53. package/corpus/reference/shards/ref-2d.jsonl.gz +0 -0
  54. package/corpus/reference/shards/ref-2e.jsonl.gz +0 -0
  55. package/corpus/reference/shards/ref-2f.jsonl.gz +0 -0
  56. package/corpus/reference/shards/ref-30.jsonl.gz +0 -0
  57. package/corpus/reference/shards/ref-31.jsonl.gz +0 -0
  58. package/corpus/reference/shards/ref-32.jsonl.gz +0 -0
  59. package/corpus/reference/shards/ref-33.jsonl.gz +0 -0
  60. package/corpus/reference/shards/ref-34.jsonl.gz +0 -0
  61. package/corpus/reference/shards/ref-35.jsonl.gz +0 -0
  62. package/corpus/reference/shards/ref-36.jsonl.gz +0 -0
  63. package/corpus/reference/shards/ref-37.jsonl.gz +0 -0
  64. package/corpus/reference/shards/ref-38.jsonl.gz +0 -0
  65. package/corpus/reference/shards/ref-39.jsonl.gz +0 -0
  66. package/corpus/reference/shards/ref-3a.jsonl.gz +0 -0
  67. package/corpus/reference/shards/ref-3b.jsonl.gz +0 -0
  68. package/corpus/reference/shards/ref-3c.jsonl.gz +0 -0
  69. package/corpus/reference/shards/ref-3d.jsonl.gz +0 -0
  70. package/corpus/reference/shards/ref-3e.jsonl.gz +0 -0
  71. package/corpus/reference/shards/ref-3f.jsonl.gz +0 -0
  72. package/corpus/tier2/vocab-empty.json +6 -0
  73. package/data/templates/responses.jsonl +3 -0
  74. package/package.json +19 -1
  75. package/src/adapters/corpus/conceptnet.mjs +7 -3
  76. package/src/adapters/corpus/courtesy.mjs +129 -0
  77. package/src/adapters/corpus/research-source.mjs +137 -0
  78. package/src/adapters/corpus/wikidata-live.mjs +262 -0
  79. package/src/adapters/corpus/wikipedia-live.mjs +83 -116
  80. package/src/domain/cli-verbs.mjs +2 -0
  81. package/src/domain/codegraph.mjs +10 -2
  82. package/src/domain/grammar/lexicon-core.json +1 -0
  83. package/src/domain/reference-pack.mjs +61 -9
  84. package/src/services/chat-page-viz.mjs +9 -6
  85. package/src/services/chat-session.mjs +65 -9
  86. package/src/services/chat.mjs +395 -121
  87. package/src/services/extensions.mjs +203 -3
  88. package/src/services/init.mjs +27 -6
  89. package/src/services/lane-vocab-data.mjs +56 -0
  90. package/src/services/research.mjs +36 -14
  91. package/src/surfaces/web/claims-browser-entry.mjs +26 -0
  92. package/src/surfaces/web/memory-ask-browser.bundle.js +130 -128
  93. package/src/surfaces/web/planner-instances.mjs +152 -0
  94. package/src/tools/handlers/tmct-untested.mjs +2 -2
  95. package/src/tools/server.mjs +9 -4
  96. package/corpus/seon/LICENSE-NOTICE +0 -37
  97. /package/corpus/{seon → domains/code}/concepts.jsonl +0 -0
  98. /package/corpus/{seon → domains/code}/definitions.jsonl +0 -0
  99. /package/corpus/{seon → domains/code}/relations.jsonl +0 -0
package/README.md CHANGED
@@ -801,11 +801,19 @@ committed vocabulary so it knows what it's talking about from turn one: an
801
801
  everyday **human-world** persona covering people, places, objects, nature,
802
802
  time and events, body and food, and mind vocabulary. It's hand-curated from
803
803
  Open English WordNet and bridged to Schema.org's top-level classes, so "what
804
- is a dog?" answers offline, from disk, on turn one. A code-domain persona (a curated **SEON**
805
- software ontology plus the whole filtered **ConceptNet slice**, CC-BY-SA 4.0)
806
- is available opt-in: `tmct init --with-persona code`. `--ephemeral` (used by
804
+ is a dog?" answers offline, from disk, on turn one. `--ephemeral` (used by
807
805
  the shipped `npm run example:*` demos) reads a graph but writes nothing back.
808
806
 
807
+ A bare install stays domain-neutral. No code vocabulary reaches any banner,
808
+ greeting, count, miss, help, or orientation text.
809
+
810
+ A **domain pack** bundles a corpus of facts, a lane vocabulary for that domain,
811
+ optional templates, and a declared grounding channel. The **code pack** is the
812
+ first shipped pack: a curated software ontology (SEON), the full filtered
813
+ ConceptNet slice (CC-BY-SA 4.0), and code-domain lane vocabulary. Activate it
814
+ with `tmct init --with-persona code` or automatically by running `tmct index`
815
+ inside a real codebase.
816
+
809
817
  The default persona also comes in three sizes: Small (~664 facts, the
810
818
  default), Medium (~1,608, `tmct init --persona-size medium`) and Large
811
819
  (~13,600, `--persona-size large`, deep enough to chain real multi-hop
@@ -1317,6 +1325,7 @@ fanout_limit = 8 # links followed per page
1317
1325
  max_depth = 3 # hops from the starting topic
1318
1326
  max_topics = 40 # topics visited in one crawl
1319
1327
  min_interval_ms = 1000 # politeness delay between fetches
1328
+ source = "wikipedia" # wikipedia | wikidata — where "research <topic>" fetches from
1320
1329
 
1321
1330
  # Discourse record (src/domain/discourse.mjs).
1322
1331
  [discourse]
package/bin/tmct.mjs CHANGED
@@ -68,6 +68,10 @@ flag > TMCT_MEMORY_BACKEND env > tmct.toml [memory] backend > sqlite (the built-
68
68
  default, .tmct/memory/graph.sqlite); "memory" keeps the store in-process only. Set it
69
69
  once with \`tmct init --memory-backend <...>\` and every later \`tmct chat\` in that
70
70
  repo picks it up with no flag needed.
71
+
72
+ Research-source precedence (chat; see src/services/chat-session.mjs createSession):
73
+ /wikipedia|/wikidata in chat > --research-source flag > tmct.toml [research] source >
74
+ wikipedia.
71
75
  `;
72
76
 
73
77
  const argv = process.argv.slice(2);
@@ -342,6 +346,7 @@ async function readConfigForRewrite(repoRoot) {
342
346
  if (raw?.extensions !== undefined) cfg.extensions = raw.extensions;
343
347
  if (raw?.bias !== undefined) cfg.bias = raw.bias;
344
348
  if (raw?.memory?.backend !== undefined) cfg.memory = { ...cfg.memory, backend: raw.memory.backend };
349
+ if (raw?.research !== undefined) cfg.research = raw.research;
345
350
  return { raw, cfg };
346
351
  }
347
352
 
@@ -700,8 +705,14 @@ async function main() {
700
705
  // shared precedence order, resolved inside createSession itself). Omitted
701
706
  // when absent so the lower tiers still apply unchanged.
702
707
  let memoryBackend;
708
+ let researchSource;
703
709
  try {
704
710
  memoryBackend = enumFlag(rest, ["--memory-backend"], ["default", "memory", "sqlite"]);
711
+ // `--research-source <wikipedia|wikidata>`: the CLI's flag tier of the
712
+ // research lane's source precedence (below /wikipedia|/wikidata in chat,
713
+ // above tmct.toml's [research] source). Omitted when absent so the
714
+ // lower tiers still apply unchanged.
715
+ researchSource = enumFlag(rest, ["--research-source"], ["wikipedia", "wikidata"]);
705
716
  } catch (e) {
706
717
  process.stderr.write(`tmct: ${e?.message || e}\n`);
707
718
  process.exit(2);
@@ -710,6 +721,7 @@ async function main() {
710
721
  if (graphPaths.length) extra.graphPaths = graphPaths;
711
722
  if (configPath) extra.configPath = configPath;
712
723
  if (memoryBackend) extra.memoryBackend = memoryBackend;
724
+ if (researchSource) extra.researchSource = researchSource;
713
725
  // `--prompt "<text>"` — one-shot mode: each sentence of the prompt runs as
714
726
  // its own turn (state teaches first, the goal/solve trigger last), the
715
727
  // FINAL turn's answer prints to stdout, and the process exits. Piped stdin
@@ -874,6 +886,18 @@ async function main() {
874
886
  process.stderr.write(`tmct init: ${e?.message || e}\n`);
875
887
  process.exit(2);
876
888
  }
889
+
890
+ // `--research-source <wikipedia|wikidata>`: written into tmct.toml's
891
+ // `[research] source` (src/services/init.mjs's renderTomlConfig), the same
892
+ // flag name `tmct chat` reads at its own precedence tier — a repo set up
893
+ // once here needs no flag on a later `tmct chat` in it.
894
+ let researchSourceVal;
895
+ try {
896
+ researchSourceVal = enumFlag(rest, ["--research-source"], ["wikipedia", "wikidata"]);
897
+ } catch (e) {
898
+ process.stderr.write(`tmct init: ${e?.message || e}\n`);
899
+ process.exit(2);
900
+ }
877
901
  // `init` takes no positional argument at all, so a bare "sqlite"/"memory"/
878
902
  // "default" here almost always means `npm run init --memory-backend X`
879
903
  // was typed without the `--` separator npm needs — npm silently drops its
@@ -966,18 +990,19 @@ async function main() {
966
990
  // before initRepo/activation run, so this repo's re-seed (if any) and
967
991
  // any --corpus/--ontology/--lexicon activation below see it.
968
992
  const forceFlag = rest.includes("--force");
969
- if (memoryBackendVal) {
993
+ if (memoryBackendVal || researchSourceVal) {
970
994
  const { access } = await import("node:fs/promises");
971
995
  const tomlPath = resolvePath(repoRoot, "tmct.toml");
972
996
  const tomlAlreadyExists = await access(tomlPath).then(() => true, () => false);
973
997
  if (tomlAlreadyExists && !forceFlag) {
974
998
  const { cfg } = await readConfigForRewrite(repoRoot);
975
- cfg.memory = { ...(cfg.memory || {}), backend: memoryBackendVal };
999
+ if (memoryBackendVal) cfg.memory = { ...(cfg.memory || {}), backend: memoryBackendVal };
1000
+ if (researchSourceVal) cfg.research = { ...(cfg.research || {}), source: researchSourceVal };
976
1001
  await writeConfig(repoRoot, cfg);
977
1002
  }
978
1003
  }
979
1004
 
980
- const res = await initRepo(repoRoot, { force: forceFlag, persona: personaPreset, memoryBackend: memoryBackendVal });
1005
+ const res = await initRepo(repoRoot, { force: forceFlag, persona: personaPreset, memoryBackend: memoryBackendVal, researchSource: researchSourceVal });
981
1006
  process.stdout.write(res.message + "\n");
982
1007
 
983
1008
  // The cold tools carry no resident schema, so the initialized repo gets the catalog
@@ -1065,6 +1090,14 @@ async function main() {
1065
1090
  anyActivation = true;
1066
1091
  }
1067
1092
 
1093
+ // `--research-source <wikipedia|wikidata>`: already WRITTEN by now — either
1094
+ // just above (pre-existing tmct.toml) or inside initRepo() itself (a fresh
1095
+ // write, `researchSource` opt) — this just reports it.
1096
+ if (researchSourceVal) {
1097
+ process.stdout.write(`research source set in tmct.toml: ${researchSourceVal}\n`);
1098
+ anyActivation = true;
1099
+ }
1100
+
1068
1101
  if (anyActivation) return;
1069
1102
 
1070
1103
  if (rest.includes("--detect")) {
@@ -1119,6 +1152,22 @@ async function main() {
1119
1152
  `indexed ${stats.modules} modules (${stats.symbols} symbols) — code questions now work in \`tmct chat\`: `
1120
1153
  + `try "which modules import <path>" or "what does <module> do".\n`,
1121
1154
  );
1155
+ // Indexing is an explicit code-domain act: activate the `code` pack in
1156
+ // this repo's tmct.toml (creating one if none exists yet) so the next
1157
+ // session's count/help/miss-recovery vocabulary is there without a
1158
+ // separate --with-persona code step. Activation only — it doesn't seed
1159
+ // the seon corpus into memory; that stays `tmct init --with-persona
1160
+ // code`'s job (or a later `tmct import --corpus seon`). Best-effort: a
1161
+ // config write failure degrades to an indexed-but-unactivated repo,
1162
+ // never a failed index.
1163
+ try {
1164
+ const { cfg } = await readConfigForRewrite(repoRoot);
1165
+ const existingCode = cfg.extensions?.code || {};
1166
+ cfg.extensions = { ...(cfg.extensions || {}), code: { ...existingCode, active: true } };
1167
+ await writeConfig(repoRoot, cfg);
1168
+ } catch (e) {
1169
+ process.stderr.write(`tmct index: WARNING could not activate the code pack in tmct.toml — ${e?.message || e}\n`);
1170
+ }
1122
1171
  }
1123
1172
  if (stats.failures?.length) {
1124
1173
  process.stderr.write(`tmct index: ${stats.failures.length} file(s) failed to parse (skipped): ${stats.failures.slice(0, 5).join(", ")}${stats.failures.length > 5 ? ", …" : ""}\n`);
@@ -10,11 +10,11 @@
10
10
  "notice": "corpus/conceptnet/LICENSE-NOTICE"
11
11
  },
12
12
  {
13
- "path": "corpus/seon/",
14
- "upstream": "first-party (hand-authored for tmct; named in homage to SEON, no SEON content copied)",
13
+ "path": "corpus/domains/code/",
14
+ "upstream": "first-party (hand-authored for tmct; named in homage to SEON, no SEON content copied — the seon bundle's own concepts/definitions/relations, plus the code domain pack's lane vocabulary, src/services/extensions.mjs)",
15
15
  "license": "MPL-2.0",
16
16
  "shareAlike": false,
17
- "notice": "corpus/seon/LICENSE-NOTICE"
17
+ "notice": "corpus/domains/code/LICENSE-NOTICE"
18
18
  },
19
19
  {
20
20
  "path": "corpus/wordnet/",
@@ -0,0 +1,43 @@
1
+ LICENSE NOTICE — corpus/domains/code/
2
+ ======================================
3
+
4
+ The files in this directory (concepts.jsonl, definitions.jsonl, relations.jsonl,
5
+ vocab.json, README.md) are ORIGINAL WORK authored by hand for
6
+ the-mechanical-code-talker (tmct), and are licensed under this repository's
7
+ license, the Mozilla Public License Version 2.0 (MPL-2.0) — the same terms as
8
+ the rest of the repository.
9
+
10
+ https://www.mozilla.org/MPL/2.0/
11
+
12
+ They are NOT derived from ConceptNet and are NOT under CC-BY-SA. Do not confuse
13
+ this directory with corpus/conceptnet/, whose slice.jsonl is a CC-BY-SA 4.0
14
+ excerpt of ConceptNet 5 (see corpus/conceptnet/LICENSE-NOTICE).
15
+
16
+ What this is
17
+ ------------
18
+
19
+ This is tmct's code domain pack: the curated tier-1 software-engineering
20
+ ontology (concepts.jsonl, definitions.jsonl, relations.jsonl) — a hand-
21
+ authored, language-neutral set of concept definitions and relation facts covering
22
+ the vocabulary declared in src/grammar/lexicon-core.json — plus the pack's own
23
+ lane vocabulary (vocab.json; count nouns, help rows, the miss-recovery pointer,
24
+ src/services/extensions.mjs). Every line was written and checked by the
25
+ project, not compiled from an external dataset.
26
+
27
+ On the name "seon"
28
+ ------------------
29
+
30
+ The ontology is named for SEON (the Software Evolution ONtologies, se-on.org),
31
+ the FAMIX-derived reference vocabulary tmct's code-graph prop tokens borrow term
32
+ IDEAS from (see ontology/tmct-core.ttl). It carries the bundle name "seon" and
33
+ the "corpus:seon" provenance prefix (src/services/extensions.mjs) regardless of
34
+ which directory it lives under. This directory does NOT redistribute SEON's
35
+ published ontology files; it is tmct's own curated ontology, named in homage to
36
+ that reference vocabulary. No SEON content is copied here.
37
+
38
+ Reuse
39
+ -----
40
+
41
+ As MPL-2.0 material, these files may be used, modified, and redistributed under
42
+ the MPL-2.0 terms. Attribution to the-mechanical-code-talker / Polycode is
43
+ appreciated but governed by the license, not by CC-BY-SA share-alike.
@@ -1,8 +1,14 @@
1
- # corpus/seon — tmct's curated tier-1 software-engineering ontology
2
-
3
- A hand-authored, **language-neutral** ontology of the software-engineering concepts
4
- tmct's grammar lexicon knows about. Its purpose, in the operator's words: *"the chat
5
- knows about what it knows about."* Every lexicon concept gets
1
+ # corpus/domains/code — tmct's code domain pack
2
+
3
+ The code domain pack: a hand-authored, **language-neutral** ontology of the
4
+ software-engineering concepts tmct's grammar lexicon knows about, plus the
5
+ pack's own lane vocabulary (count nouns, help rows, the miss-recovery pointer).
6
+ Registered as the `code` pack extension entry (`src/services/extensions.mjs`);
7
+ `--with-persona code` and `tmct index` both activate it. The ontology's own
8
+ bundle name is `seon` and its provenance prefix is `corpus:seon` — unchanged
9
+ by this directory's location (see `LICENSE-NOTICE`). Its purpose, in the
10
+ operator's words: *"the chat knows about what it knows about."* Every lexicon
11
+ concept gets
6
12
 
7
13
  1. an **English definition** — what it IS (`definitions.jsonl`), and
8
14
  2. **relation facts** — how it RELATES to other concepts (`concepts.jsonl`),
@@ -21,6 +27,7 @@ CC-BY-SA like the ConceptNet slice.
21
27
  | `concepts.jsonl` | relation facts, byte-identical shape to `corpus/conceptnet/slice.jsonl` | 399 facts |
22
28
  | `definitions.jsonl` | `{ "term", "definition", "sense": "software" }`, one per line | 288 definitions |
23
29
  | `relations.jsonl` | `{ "relation", "definition", "sense": "software" }`, one per line — what each edge kind means, so "what does imports mean" answers without per-repo seeding | 9 relations |
30
+ | `vocab.json` | the pack's lane vocabulary: `countNouns`, `classLabels`, `helpRows`, `missRecoveryPointer` — merged in by `mergedLaneVocab` (`src/services/extensions.mjs`) | — |
24
31
  | `LICENSE-NOTICE` | MPL-2.0 provenance for this directory | — |
25
32
 
26
33
  ### `concepts.jsonl` — same shape as the ConceptNet slice
@@ -94,25 +101,16 @@ A handful of facts and definitions give meta-questions real ground to stand on:
94
101
  `memory graph usedFor storing facts`; `seon isa ontology` — plus definitions for
95
102
  `tmct`, `code graph`, `memory graph`, and `seon`.
96
103
 
97
- ## How the coordinator should seed this (Wave-2 chat.mjs work — NOT wired here)
98
-
99
- This directory is **data only**; wiring it into seeding is the coordinator's
100
- `chat.mjs` / `init.mjs` change. Recommended:
101
-
102
- 1. **Seed `corpus/seon` FIRST, ahead of the ConceptNet slice**, and **exempt it from
103
- the 500-fact cap** (`SEED_LIMIT`). It is small (399 lines → 380 emitted facts) and
104
- fully curated, so the whole tier belongs in memory before any capped ConceptNet
105
- fill. Concretely: call `seedMemory(repo, { slicePath: SEON_CONCEPTS_FILE })` with
106
- **no `limit`**, then run the existing capped ConceptNet seed after it. The
107
- idempotent, content-hashed `appendFact` ids mean a term appearing in both tiers
108
- converges to one fact.
109
- 2. Keep the existing `SEED_PREFER` order
110
- (`rdfs:subClassOf`, `rdf:type`, `mgx:usedFor`, `mgx:partOf`, `mgx:capableOf`) — it
111
- already front-loads exactly this file's dominant predicates, though with no cap on
112
- the seon tier the ordering only affects the ConceptNet tail.
113
- 3. **Provenance caveat:** `toFacts` currently hard-codes the provenance string
114
- `corpus:conceptnet <rel>`. If the coordinator wants seon facts tagged as their own
115
- source (`corpus:seon`), that is a one-line parametrisation of `toFacts`
104
+ ## How this seeds
105
+
106
+ `seedMemory(repo, { slicePath: SEON_CONCEPTS_FILE, provenancePrefix: "corpus:seon" })`
107
+ seeds this ontology whole, uncapped, ahead of the capped ConceptNet band — the
108
+ `code` (or `seon`) extension entry's own activation drives it
109
+ (`src/services/extensions.mjs`'s `seedActiveCorpusEntries`). The idempotent,
110
+ content-hashed `appendFact` ids mean a term appearing in both tiers converges
111
+ to one fact. `SEED_PREFER`'s order
112
+ (`rdfs:subClassOf`, `rdf:type`, `mgx:usedFor`, `mgx:partOf`, `mgx:capableOf`)
113
+ front-loads this file's dominant predicates.
116
114
 
117
115
  ## Regenerating / extending
118
116
 
@@ -0,0 +1,43 @@
1
+ {
2
+ "countNouns": {
3
+ "class": "Class", "classes": "Class",
4
+ "function": "Function", "functions": "Function", "func": "Function", "funcs": "Function",
5
+ "module": "Module", "modules": "Module", "file": "Module", "files": "Module",
6
+ "package": "Package", "packages": "Package",
7
+ "method": "Method", "methods": "Method",
8
+ "attribute": "Attribute", "attributes": "Attribute",
9
+ "variable": "GlobalVariable", "variables": "GlobalVariable", "global": "GlobalVariable", "globals": "GlobalVariable",
10
+ "commit": "Commit", "commits": "Commit",
11
+ "session": "Session", "sessions": "Session"
12
+ },
13
+ "classLabels": {
14
+ "Class": ["class", "classes"],
15
+ "Function": ["function", "functions"],
16
+ "Module": ["module", "modules"],
17
+ "Package": ["package", "packages"],
18
+ "Method": ["method", "methods"],
19
+ "Attribute": ["attribute", "attributes"],
20
+ "GlobalVariable": ["variable", "variables"],
21
+ "Commit": ["commit", "commits"],
22
+ "Session": ["session", "sessions"]
23
+ },
24
+ "helpRows": [
25
+ ["/find <query>", "lexical search across the graph"],
26
+ ["/search <query>", "alias of /find"],
27
+ ["/context <symbol>", "the sized edit bundle for a symbol (start here to change code)"],
28
+ ["/snippet <symbol>", "exact source of one function/class/method"],
29
+ ["/describe <symbol>", "a symbol's definition, kind and relations"],
30
+ ["/signature <symbol>", "a symbol's signature only"],
31
+ ["/members <class>", "the methods/attributes of a class"],
32
+ ["/subclasses <class>", "the subclasses of a class"],
33
+ ["/impact <module>", "what a change to this module or symbol reaches (impact closure)"],
34
+ ["/callers <symbol>", "functions that call this symbol"],
35
+ ["/callees <symbol>", "functions this symbol calls"],
36
+ ["/tests <symbol>", "the tests covering this symbol"],
37
+ ["/untested", "symbols with no covering test"],
38
+ ["/history <symbol>", "the commit history of this symbol"],
39
+ ["/exports <module>", "a module's public exports"],
40
+ ["/arch [package]", "the architecture overview (optional package filter)"]
41
+ ],
42
+ "missRecoveryPointer": "for code structure, index this repo with `tmct index`, or point me at a .tmct/graph.json with --repo <path> (or try `npm run example:mini`)."
43
+ }