@polycode-projects/the-mechanical-code-talker 1.12.0 → 2.0.2
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.md +244 -48
- package/ROADMAP.md +23 -34
- package/bin/tmct.mjs +107 -71
- package/corpus/LICENSES.json +118 -0
- package/corpus/README.md +17 -13
- package/corpus/conceptnet/README.md +5 -5
- package/corpus/conceptnet/fetch-slice.mjs +1 -1
- package/corpus/conceptnet/filter-dump.mjs +1 -1
- package/corpus/generated/README.md +9 -10
- package/corpus/namenet/README.md +39 -0
- package/corpus/seon/README.md +2 -2
- package/corpus/tier2/generate.mjs +58 -9
- package/corpus/tier2/manifest.json +44 -0
- package/corpus/wordnet/README.md +37 -0
- package/corpus/wordnet/generate.mjs +1 -1
- package/data/templates/constructions/agent-noun-relations.toml +2 -2
- package/data/templates/grammar-rules.toml +1 -1
- package/package.json +13 -22
- package/src/{ask-nlp.mjs → adapters/ask-nlp.mjs} +1 -1
- package/src/{config.mjs → adapters/config.mjs} +1 -1
- package/src/{corpus → adapters/corpus}/conceptnet-map.toml +4 -4
- package/src/{corpus → adapters/corpus}/conceptnet.mjs +3 -3
- package/src/adapters/corpus/construction-banks.mjs +43 -0
- package/src/{corpus → adapters/corpus}/templates.mjs +1 -1
- package/src/{embed.mjs → adapters/embed.mjs} +1 -11
- package/src/{graph-build.mjs → adapters/graph-build.mjs} +6 -6
- package/src/{memory → adapters/memory}/blocks.mjs +2 -2
- package/src/{memory → adapters/memory}/core.mjs +38 -94
- package/src/adapters/prose-tokens.mjs +98 -0
- package/src/{providers → adapters/providers}/bootstrap.mjs +2 -2
- package/src/{providers → adapters/providers}/fixture.mjs +3 -3
- package/src/{providers → adapters/providers}/graph-service.mjs +9 -4
- package/src/{source-slice.mjs → adapters/source-slice.mjs} +2 -2
- package/src/{source.mjs → adapters/source.mjs} +1 -1
- package/src/{toml-config.mjs → adapters/toml-config.mjs} +1 -1
- package/src/{answer-variants.json → domain/answer-variants.json} +1 -1
- package/src/domain/answer-variants.mjs +23 -0
- package/src/{ask-vocab.mjs → domain/ask-vocab.mjs} +37 -5
- package/src/{ask.mjs → domain/ask.mjs} +216 -52
- package/src/{codegraph.mjs → domain/codegraph.mjs} +31 -315
- package/src/{completions → domain/completions}/complete.mjs +16 -10
- package/src/{completions → domain/completions}/graph-adapter.mjs +10 -4
- package/src/{completions → domain/completions}/group.mjs +14 -6
- package/src/{completions → domain/completions}/infer.mjs +57 -39
- package/src/domain/completions/injected.mjs +21 -0
- package/src/{completions → domain/completions}/rank.mjs +15 -8
- package/src/{completions → domain/completions}/search.mjs +4 -2
- package/src/{grammar → domain/grammar}/ace.mjs +3 -3
- package/src/{grammar → domain/grammar}/assert.mjs +12 -8
- package/src/{grammar → domain/grammar}/lexicon-core.json +1 -1
- package/src/{grammar → domain/grammar}/lexicon.mjs +4 -6
- package/src/domain/hash.mjs +147 -0
- package/src/{interpret → domain/interpret}/fuzzy.mjs +42 -4
- package/src/domain/interpret/nlp-registry.mjs +20 -0
- package/src/{interpret → domain/interpret}/normalize.mjs +35 -5
- package/src/{interpret → domain/interpret}/pipeline.mjs +1 -5
- package/src/{interpret → domain/interpret}/strategies/ace.mjs +1 -1
- package/src/{interpret → domain/interpret}/strategies/constructions.mjs +30 -52
- package/src/{interpret → domain/interpret}/strategies/keywords.mjs +48 -26
- package/src/domain/memory/capability.mjs +235 -0
- package/src/domain/memory/fold.mjs +54 -0
- package/src/domain/memory/session-turns.mjs +7 -0
- package/src/{memory → domain/memory}/trust.mjs +48 -0
- package/src/{paraphrase.mjs → domain/paraphrase.mjs} +2 -2
- package/src/{prose.mjs → domain/prose.mjs} +1 -1
- package/src/domain/real-word-collisions.json +1 -0
- package/src/{router → domain/router}/call-validator.mjs +1 -1
- package/src/{router → domain/router}/drive.mjs +34 -25
- package/src/{router → domain/router}/goal-reasoner.mjs +1 -1
- package/src/{router → domain/router}/guardrail.mjs +1 -1
- package/src/{router → domain/router}/planner.mjs +1 -1
- package/src/{router → domain/router}/registry.mjs +5 -5
- package/src/{router → domain/router}/resolver.mjs +16 -13
- package/src/{router → domain/router}/results.mjs +1 -1
- package/src/{router → domain/router}/set-algebra.mjs +1 -1
- package/src/{router → domain/router}/taught.mjs +10 -9
- package/src/{syllogise.mjs → domain/syllogise.mjs} +21 -4
- package/src/domain/vector.mjs +12 -0
- package/src/services/chat-session.mjs +451 -0
- package/src/{chat.mjs → services/chat.mjs} +1209 -684
- package/src/{cli-args.mjs → services/cli-args.mjs} +2 -2
- package/src/services/completions.mjs +55 -0
- package/src/{extensions.mjs → services/extensions.mjs} +7 -7
- package/src/{finish.mjs → services/finish.mjs} +2 -2
- package/src/{memory → services}/fold.mjs +0 -0
- package/src/{import-file.mjs → services/import-file.mjs} +3 -3
- package/src/{index.mjs → services/index.mjs} +21 -12
- package/src/{init.mjs → services/init.mjs} +9 -9
- package/src/{ledger-viz.mjs → services/ledger-viz.mjs} +3 -3
- package/src/{plan-viz.mjs → services/plan-viz.mjs} +98 -28
- package/src/{sentences.mjs → services/sentences.mjs} +1 -1
- package/src/{sessions.mjs → services/sessions.mjs} +4 -5
- package/src/{telemetry.mjs → services/telemetry.mjs} +1 -1
- package/src/{server-http.mjs → surfaces/http/server-http.mjs} +11 -65
- package/src/{tui → surfaces/tui}/app.mjs +3 -3
- package/src/{memory-ask-browser-entry.mjs → surfaces/web/memory-ask-browser-entry.mjs} +5 -5
- package/src/{memory-ask-browser.bundle.js → surfaces/web/memory-ask-browser.bundle.js} +9465 -6366
- package/src/tools/catalog.mjs +29 -0
- package/src/{conformance.mjs → tools/conformance.mjs} +2 -2
- package/src/tools/definitions.mjs +288 -0
- package/src/tools/graph-load.mjs +20 -0
- package/src/tools/handlers/index.mjs +54 -0
- package/src/tools/handlers/kit.mjs +33 -0
- package/src/tools/handlers/tmct-architecture.mjs +7 -0
- package/src/tools/handlers/tmct-ask.mjs +14 -0
- package/src/tools/handlers/tmct-callees.mjs +6 -0
- package/src/tools/handlers/tmct-callers.mjs +6 -0
- package/src/tools/handlers/tmct-calls.mjs +6 -0
- package/src/tools/handlers/tmct-class-history.mjs +6 -0
- package/src/tools/handlers/tmct-cochanges.mjs +6 -0
- package/src/tools/handlers/tmct-context-more.mjs +9 -0
- package/src/tools/handlers/tmct-context.mjs +163 -0
- package/src/tools/handlers/tmct-describe.mjs +15 -0
- package/src/tools/handlers/tmct-exports.mjs +9 -0
- package/src/tools/handlers/tmct-file-history.mjs +6 -0
- package/src/tools/handlers/tmct-history.mjs +6 -0
- package/src/tools/handlers/tmct-impact.mjs +9 -0
- package/src/tools/handlers/tmct-members.mjs +16 -0
- package/src/tools/handlers/tmct-method-history.mjs +6 -0
- package/src/tools/handlers/tmct-search.mjs +22 -0
- package/src/tools/handlers/tmct-signature.mjs +6 -0
- package/src/tools/handlers/tmct-snippet.mjs +37 -0
- package/src/tools/handlers/tmct-subclasses.mjs +16 -0
- package/src/tools/handlers/tmct-tests-for.mjs +6 -0
- package/src/tools/handlers/tmct-untested.mjs +7 -0
- package/src/tools/memory-fallthrough.mjs +65 -0
- package/src/{schema-docs.mjs → tools/schema-docs.mjs} +1 -1
- package/src/tools/server.mjs +61 -0
- package/src/answer-variants.mjs +0 -39
- package/src/hash.mjs +0 -24
- package/src/server.mjs +0 -501
- /package/src/{corpus → adapters/corpus}/unknown-ingest.mjs +0 -0
- /package/src/{graph-merge.mjs → adapters/graph-merge.mjs} +0 -0
- /package/src/{memory → adapters/memory}/inspect.mjs +0 -0
- /package/src/{memory → adapters/memory}/shacl.mjs +0 -0
- /package/src/{prose-nlp.mjs → adapters/prose-nlp.mjs} +0 -0
- /package/src/{repository-interface.mjs → adapters/repository-interface.mjs} +0 -0
- /package/src/{uuid.mjs → adapters/uuid.mjs} +0 -0
- /package/src/{wink-model.mjs → adapters/wink-model.mjs} +0 -0
- /package/src/{completions → domain/completions}/prune.mjs +0 -0
- /package/src/{concept.mjs → domain/concept.mjs} +0 -0
- /package/src/{domain.mjs → domain/domain.mjs} +0 -0
- /package/src/{interpret → domain/interpret}/merge.mjs +0 -0
- /package/src/{interpret → domain/interpret}/strategies/grammar.mjs +0 -0
- /package/src/{interpret → domain/interpret}/strategies/noise-strip.mjs +0 -0
- /package/src/{memory → domain/memory}/bias.mjs +0 -0
- /package/src/{planning.mjs → domain/planning.mjs} +0 -0
- /package/src/{viz-theme.mjs → services/viz-theme.mjs} +0 -0
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ the answers below, plus cleanup — see the file for the full script.)
|
|
|
56
56
|
|
|
57
57
|
Output, captured from an actual run:
|
|
58
58
|
|
|
59
|
-
```
|
|
59
|
+
```output cmd="node examples/teach-and-infer.mjs" cwd=repo
|
|
60
60
|
tmct> ahab is the father of john
|
|
61
61
|
noted — remembered: ahab fathers john
|
|
62
62
|
|
|
@@ -99,10 +99,11 @@ alias, and the ahab-is-male property, then cited all four. The `source: …`
|
|
|
99
99
|
parts are real provenance receipts. Every fact tmct stores records where it
|
|
100
100
|
came from and when (more on that below).
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
The test suite replays every runnable example in this README against the
|
|
103
|
+
live product, this transcript included. If the chat behavior ever drifts
|
|
104
|
+
from the output above, the suite fails and says so.
|
|
104
105
|
|
|
105
|
-
```
|
|
106
|
+
```session
|
|
106
107
|
$ tmct
|
|
107
108
|
tmct> what talks to the payment module?
|
|
108
109
|
…
|
|
@@ -118,13 +119,24 @@ The page leads with the **memory ledger**: every fact as a readable sentence,
|
|
|
118
119
|
drill by clicking the terms inside them, and an in-page chat whose answers
|
|
119
120
|
focus the ledger.
|
|
120
121
|
|
|
122
|
+
From a clone, two build scripts regenerate that demo so you can check it
|
|
123
|
+
offline before it deploys. The example graph, the ledger page, and the
|
|
124
|
+
engine copy land in `public/`. The in-page chat's query bundle is rebuilt
|
|
125
|
+
from the same `src/` the CLI runs:
|
|
126
|
+
|
|
127
|
+
```bash e2e cwd=repo
|
|
128
|
+
npm run demo:build # public/: demo graph, memory, ledger page, engine copy
|
|
129
|
+
npm run build:ask-bundle # the browser query bundle the in-page chat runs
|
|
130
|
+
```
|
|
131
|
+
|
|
121
132
|
Two more surfaces, both generated by tmct itself:
|
|
122
133
|
|
|
123
|
-
```bash
|
|
134
|
+
```bash e2e
|
|
124
135
|
npx tmct viz # ledger.html — your own memory as the same
|
|
125
136
|
# readable, self-contained explorer
|
|
126
137
|
npx tmct init
|
|
127
138
|
npx tmct import --file .tmct/imports/games/hanoi-3.txt
|
|
139
|
+
npx tmct viz --focus disk-1 --output disks.html # the explorer again, focused on one term
|
|
128
140
|
npx tmct chat --prompt 'disk-1 rests on disk-2. disk-2 rests on disk-3.
|
|
129
141
|
disk-3 rests on peg-a. the goal is that every disk rests on peg-c. solve it.' \
|
|
130
142
|
--render blocks --output plan.html # an animated replay of the solved plan
|
|
@@ -216,21 +228,19 @@ handful of connector words, like "defined in", "located in", or "found in".
|
|
|
216
228
|
The same fact doesn't read identically for every entity, but the same
|
|
217
229
|
question against the same entity always renders the same way.
|
|
218
230
|
|
|
219
|
-
```
|
|
231
|
+
```session cwd=repo
|
|
220
232
|
$ node bin/tmct.mjs chat --repo examples/mini-webapp --ephemeral
|
|
221
233
|
tmct> give me a detailed overview of how the Store works
|
|
222
|
-
Attribute: prose_tokens = memory record store [mgx:hasProseTokens]. Attribute:
|
|
223
|
-
doc = In-memory record store. [seon:hasDoc]. Other matches: src/core/store.mjs
|
|
224
|
-
(Module), loadStore (Function), saveStore (Function), testLoadStore (Function).
|
|
234
|
+
Attribute: prose_tokens = memory record store [mgx:hasProseTokens]. Attribute: doc = In-memory record store. [seon:hasDoc]. Other matches: src/core/store.mjs (Module), loadStore (Function), saveStore (Function), testLoadStore (Function).
|
|
225
235
|
```
|
|
226
236
|
|
|
227
237
|
Programmatically, the same pipeline is `generateCompletion()`
|
|
228
|
-
(`src/completions/complete.mjs`):
|
|
238
|
+
(`src/domain/completions/complete.mjs`):
|
|
229
239
|
|
|
230
|
-
```js
|
|
231
|
-
import { fetchEntities } from "./src/source.mjs";
|
|
232
|
-
import { parseEntities } from "./src/codegraph.mjs";
|
|
233
|
-
import { loadMemory } from "./src/memory/core.mjs";
|
|
240
|
+
```js cwd=repo
|
|
241
|
+
import { fetchEntities } from "./src/adapters/source.mjs";
|
|
242
|
+
import { parseEntities } from "./src/domain/codegraph.mjs";
|
|
243
|
+
import { loadMemory } from "./src/adapters/memory/core.mjs";
|
|
234
244
|
import { createCompletionsGraphAdapter } from "@polycode-projects/the-mechanical-code-talker/createCompletionsGraphAdapter";
|
|
235
245
|
import { generateCompletion } from "@polycode-projects/the-mechanical-code-talker/generateCompletion";
|
|
236
246
|
|
|
@@ -243,13 +253,11 @@ const { text } = await generateCompletion(dir, "Store", { query: "Store", graph,
|
|
|
243
253
|
console.log(text); // prints the same text as the chat answer above
|
|
244
254
|
```
|
|
245
255
|
|
|
246
|
-
Full pipeline design in `archive/PLAN_COMPLETIONS.md`.
|
|
247
|
-
|
|
248
256
|
## Planning across the graph
|
|
249
257
|
|
|
250
258
|
Some questions need more than one lookup. `tmct plan` is a small STRIPS/PDDL-style
|
|
251
259
|
planner over the same read-only graph-query tools chat/serve use
|
|
252
|
-
(`src/router/*`): it decomposes a compound request, resolves and executes each
|
|
260
|
+
(`src/domain/router/*`): it decomposes a compound request, resolves and executes each
|
|
253
261
|
step in order with a provable causal-link proof chain, and folds the results
|
|
254
262
|
into one answer. A request neither the planner nor a single lookup can ground
|
|
255
263
|
escalates to a closed-world goal-reasoner, which deduces maintenance goals
|
|
@@ -257,7 +265,7 @@ escalates to a closed-world goal-reasoner, which deduces maintenance goals
|
|
|
257
265
|
keywords in your question. Anything none of that grounds is an honest "no plan
|
|
258
266
|
found", the same "grounded or an honest miss" rule as everywhere else in tmct.
|
|
259
267
|
|
|
260
|
-
```
|
|
268
|
+
```session cwd=repo
|
|
261
269
|
$ node bin/tmct.mjs plan "of the modules impacted by src/lib/http.mjs, which are untested" --repo examples/mini-webapp
|
|
262
270
|
tmct plan: "of the modules impacted by src/lib/http.mjs, which are untested"
|
|
263
271
|
driver: resolver-0.8.0
|
|
@@ -294,7 +302,7 @@ you'd have to cross-reference by hand.
|
|
|
294
302
|
Leave the entity out and ask a maintenance question instead, and the goal-reasoner
|
|
295
303
|
picks up where the planner refuses:
|
|
296
304
|
|
|
297
|
-
```
|
|
305
|
+
```session cwd=repo
|
|
298
306
|
$ node bin/tmct.mjs plan "what most needs a test in this codebase" --repo examples/mini-webapp
|
|
299
307
|
tmct plan: "what most needs a test in this codebase"
|
|
300
308
|
driver: goal-0.8.1
|
|
@@ -325,9 +333,8 @@ and refusing (exit 1) if any sentence declines.
|
|
|
325
333
|
Then one message states the board and the goal, and "solve it" searches the
|
|
326
334
|
taught rules for the shortest move sequence:
|
|
327
335
|
|
|
328
|
-
```
|
|
329
|
-
tmct> disk-1 rests on disk-2. disk-2 rests on disk-3. disk-3 rests on peg-a.
|
|
330
|
-
the goal is that every disk rests on peg-c. solve it.
|
|
336
|
+
```session e2e setup="npx tmct init && npx tmct import --file .tmct/imports/games/hanoi-3.txt" cmd="npx tmct chat"
|
|
337
|
+
tmct> disk-1 rests on disk-2. disk-2 rests on disk-3. disk-3 rests on peg-a. the goal is that every disk rests on peg-c. solve it.
|
|
331
338
|
plan found — 7 moves (shortest):
|
|
332
339
|
1. move disk-1 onto peg-c
|
|
333
340
|
2. move disk-2 onto peg-b
|
|
@@ -375,7 +382,7 @@ the shipped `npm run example:*` demos) reads a graph but writes nothing back.
|
|
|
375
382
|
The default persona also comes in three sizes: Small (~664 facts, the
|
|
376
383
|
default), Medium (~1,608, `tmct init --persona-size medium`) and Large
|
|
377
384
|
(~13,609, `--persona-size large`, deep enough to chain real multi-hop
|
|
378
|
-
reasoning).
|
|
385
|
+
reasoning).
|
|
379
386
|
|
|
380
387
|
### Memory backends
|
|
381
388
|
|
|
@@ -388,6 +395,15 @@ Precedence is `--memory-backend` flag > `TMCT_MEMORY_BACKEND` env >
|
|
|
388
395
|
tmct.toml's `[memory] backend` > the default. A library caller sets the same
|
|
389
396
|
thing directly: `runChat({ memoryBackend: "sqlite" })`.
|
|
390
397
|
|
|
398
|
+
Three init presets in `package.json` wrap the common setups. What each one
|
|
399
|
+
runs (`--force` re-initializes the same directory):
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
npx tmct init --memory-backend sqlite # npm run init:sqlite
|
|
403
|
+
npx tmct init --force --with-persona human # npm run init:persona:human — the default persona, made explicit
|
|
404
|
+
npx tmct init --force --with-persona empty # npm run init:persona:empty — no seeded vocabulary at all
|
|
405
|
+
```
|
|
406
|
+
|
|
391
407
|
Teaching isn't limited to the ACE grammar's fixed shapes. Tell tmct an
|
|
392
408
|
arbitrary fact, like "margo really eats ribs", and it mints a fact you can
|
|
393
409
|
ask about directly: "what does margo eat". New vocabulary compounds as you
|
|
@@ -398,6 +414,25 @@ nudges you to ground one side first. Quantified teaching stores the
|
|
|
398
414
|
quantifier ("some functions are risky" … "how many functions are risky" →
|
|
399
415
|
"A few."), and "how many facts are there" counts the store back.
|
|
400
416
|
|
|
417
|
+
Teaching doesn't have to be typed, either. `npm run extract:facts` (from a
|
|
418
|
+
clone) runs a plain text file through the same recognizer the chat's teach
|
|
419
|
+
lane uses. Sentences the recognizer grounds become fact rows; everything
|
|
420
|
+
else is skipped and counted, never paraphrased:
|
|
421
|
+
|
|
422
|
+
```bash cwd=repo
|
|
423
|
+
printf 'We deployed redis last week. a cache is a kind of store. Why was it slow?\n' > /tmp/notes.txt
|
|
424
|
+
node scripts/extract-facts-from-text.mjs /tmp/notes.txt
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
```output
|
|
428
|
+
{"subject":"cache","predicate":"rdfs:subClassOf","object":"store","provenance":"extracted:notes.txt","quantifier":"","sentence":"a cache is a kind of store."}
|
|
429
|
+
3 sentences found, 1 recognized as fact (1 fact row), 2 skipped — not a recognized declarative shape (an honest, expected gap; this is an attempt, not full NLU).
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
Pass `--repo <path>` instead to write the recognized facts straight into
|
|
433
|
+
that repo's memory, or `--out <file.jsonl>` to save the rows. Each one
|
|
434
|
+
carries an `extracted:<file>` provenance tag at its own trust tier.
|
|
435
|
+
|
|
401
436
|
### Provenance and trust
|
|
402
437
|
|
|
403
438
|
Every fact and text block records **where it came from and when**. Sources are
|
|
@@ -421,7 +456,7 @@ stated fact, and this never runs on the chat's hot path.
|
|
|
421
456
|
|
|
422
457
|
## Install & use
|
|
423
458
|
|
|
424
|
-
```bash
|
|
459
|
+
```bash skip=network
|
|
425
460
|
npm install -g @polycode-projects/the-mechanical-code-talker
|
|
426
461
|
tmct # bare = chat (the headline)
|
|
427
462
|
tmct chat --repo /abs/path/to/repo # chat over a specific repo's graph
|
|
@@ -452,17 +487,17 @@ package or a bare user gets a working install in one command.
|
|
|
452
487
|
same output, split into one block per command with a short note on what each
|
|
453
488
|
one is for, so it is easier to scan than the raw dump.
|
|
454
489
|
|
|
455
|
-
Every subcommand shares one flag/config resolver (`src/cli-args.mjs`), which
|
|
490
|
+
Every subcommand shares one flag/config resolver (`src/services/cli-args.mjs`), which
|
|
456
491
|
is why `--repo`, `--graph`, and `--config` behave the same way everywhere.
|
|
457
492
|
|
|
458
493
|
The bare command and `tmct chat` open the interactive session:
|
|
459
494
|
|
|
460
|
-
```
|
|
495
|
+
```output:help:chat
|
|
461
496
|
Usage:
|
|
462
497
|
tmct interactive chat (the headline surface)
|
|
463
498
|
tmct chat [--repo <abs>] chat over a specific repo's graph
|
|
464
499
|
[--graph <path>] explicit graph file (repeatable — multiple graphs merge;
|
|
465
|
-
see src/graph-merge.mjs); wins over --repo/TMCT_GRAPH_FILE/tmct.toml
|
|
500
|
+
see src/adapters/graph-merge.mjs); wins over --repo/TMCT_GRAPH_FILE/tmct.toml
|
|
466
501
|
[--config <path>] an alternate tmct.toml location (a file or a directory)
|
|
467
502
|
[--ephemeral] read the graph but write nothing back (demo/read-only)
|
|
468
503
|
[--prompt "<text>"] one-shot: run the prompt's sentences as turns and print
|
|
@@ -483,7 +518,7 @@ Usage:
|
|
|
483
518
|
|
|
484
519
|
`tmct memory` is the CLI-side view of the same data the `/memory` chat command shows:
|
|
485
520
|
|
|
486
|
-
```
|
|
521
|
+
```output:help:memory
|
|
487
522
|
tmct memory [--repo <abs>] what tmct remembers: facts, utterances, sessions,
|
|
488
523
|
[--config <path>] folded blocks (the /memory chat command, from the shell)
|
|
489
524
|
[--verbose]
|
|
@@ -492,9 +527,10 @@ Usage:
|
|
|
492
527
|
`tmct init` sets up a repo for the first time: `.tmct/`, `tmct.toml`, a seed, and a
|
|
493
528
|
provenance record. Most of its flags choose what gets seeded and where config is written:
|
|
494
529
|
|
|
495
|
-
```
|
|
530
|
+
```output:help:init
|
|
496
531
|
tmct init [--repo <abs>] initialize a repo for tmct (default: cwd): .tmct/,
|
|
497
|
-
[--force] tmct.toml,
|
|
532
|
+
[--force] tmct.toml, .tmct/TOOLS.md (the cold-tool catalog),
|
|
533
|
+
tier-1 corpus seed, provenance record
|
|
498
534
|
[--corpus <id|path>] also seed a corpus — a tier-2 manifest id (aws|python|java|
|
|
499
535
|
general) or a jsonl file path — opt-in, offline, $0
|
|
500
536
|
[--ontology <name|path>] activate+seed an ontology bundle (a recognized name or a path)
|
|
@@ -521,7 +557,7 @@ provenance record. Most of its flags choose what gets seeded and where config is
|
|
|
521
557
|
already set up. Its `--graph` flag works differently from the others: it appends to
|
|
522
558
|
`tmct.toml`'s `graph_files` array instead of activating a bundle.
|
|
523
559
|
|
|
524
|
-
```
|
|
560
|
+
```output:help:import
|
|
525
561
|
tmct import [--repo <abs>] activate+seed into an ALREADY-initialized repo (any
|
|
526
562
|
[--corpus <id|path>] combination of these flags in one call). --graph is a
|
|
527
563
|
[--ontology <name|path>] DIFFERENT operation from the others: it APPENDS to
|
|
@@ -537,7 +573,7 @@ already set up. Its `--graph` flag works differently from the others: it appends
|
|
|
537
573
|
`tmct extend --validate` checks a third-party extension pack's declared resources
|
|
538
574
|
before you switch any repo's `tmct.toml` over to it:
|
|
539
575
|
|
|
540
|
-
```
|
|
576
|
+
```output:help:extend
|
|
541
577
|
tmct extend --validate <dir> validate a third-party extension pack's declared
|
|
542
578
|
[--config <path>] resources (corpus/lexicon/templates) before activating
|
|
543
579
|
it in any repo's tmct.toml; exits non-zero on failure
|
|
@@ -546,7 +582,7 @@ before you switch any repo's `tmct.toml` over to it:
|
|
|
546
582
|
`tmct syllogise` is the offline maintenance job described under "Speculative
|
|
547
583
|
inference" above:
|
|
548
584
|
|
|
549
|
-
```
|
|
585
|
+
```output:help:syllogise
|
|
550
586
|
tmct syllogise [--repo <abs>] speculative inference (offline maintenance job): forward-
|
|
551
587
|
[--depth <n>] [--budget <n>] chain the memory's rdfs:subClassOf closure, materialising
|
|
552
588
|
[--config <path>] bounded, low-trust, retractable entailed facts (never on the chat path)
|
|
@@ -555,7 +591,7 @@ inference" above:
|
|
|
555
591
|
`tmct viz` renders the memory graph as the ledger explorer — a single,
|
|
556
592
|
self-contained HTML file you can open in a browser:
|
|
557
593
|
|
|
558
|
-
```
|
|
594
|
+
```output:help:viz
|
|
559
595
|
tmct viz [--repo <abs>] write one self-contained HTML page: the memory graph as a
|
|
560
596
|
[--focus <term>] readable ledger of fact-sentences around one focus term,
|
|
561
597
|
[--term <word>] with segments, a two-hop minimap, and an in-page chat dock
|
|
@@ -569,28 +605,57 @@ self-contained HTML file you can open in a browser:
|
|
|
569
605
|
`tmct serve` runs an Anthropic Messages API-compatible HTTP endpoint over the graph,
|
|
570
606
|
so a tool-loop client can call tmct like a model, at $0:
|
|
571
607
|
|
|
572
|
-
```
|
|
608
|
+
```output:help:serve
|
|
573
609
|
tmct serve [--repo <abs>] run the Anthropic Messages API-compatible endpoint
|
|
574
610
|
[--host <h>] [--port <n>] (POST /v1/messages) over the graph — a deterministic,
|
|
575
611
|
[--graph <path>] no-LLM "model" a tool-loop client can call; $0 usage.
|
|
576
612
|
[--config <path>] Defaults: host 127.0.0.1, port 8787. Ctrl+C to stop.
|
|
577
613
|
```
|
|
578
614
|
|
|
579
|
-
|
|
615
|
+
A tool-loop client talks to it like any Messages endpoint. One round trip
|
|
616
|
+
against the example graph, end to end:
|
|
580
617
|
|
|
618
|
+
```bash e2e cwd=repo
|
|
619
|
+
node bin/tmct.mjs serve --repo examples/mini-webapp --port 8791 &
|
|
620
|
+
SERVE_PID=$!
|
|
621
|
+
until curl -s -o /dev/null http://127.0.0.1:8791/v1/messages; do sleep 0.2; done
|
|
622
|
+
curl -s http://127.0.0.1:8791/v1/messages -H 'content-type: application/json' \
|
|
623
|
+
-d '{"model":"tmct","max_tokens":256,"messages":[{"role":"user","content":"which modules import src/core/model.mjs?"}]}'
|
|
624
|
+
kill $SERVE_PID
|
|
581
625
|
```
|
|
626
|
+
|
|
627
|
+
`tmct plan` is the capability router described under "Planning across the graph" above:
|
|
628
|
+
|
|
629
|
+
```output:help:plan
|
|
630
|
+
tmct plan "<request>" the capability router: compose/execute read-only graph-
|
|
631
|
+
[--repo <abs>] query tool calls for a compound or maintenance-goal
|
|
632
|
+
[--graph <path>] request ("of the modules impacted by X, which are
|
|
633
|
+
[--config <path>] untested", "what most needs a test") — a real STRIPS/
|
|
634
|
+
[--tools <a,b,...>] PDDL planner (src/domain/router/*), never a guessed call.
|
|
635
|
+
[--json] Prints the grounded step sequence + composed answer,
|
|
636
|
+
or an honest "no plan found". --tools restricts the
|
|
637
|
+
declared toolset; --json prints the full loop result.
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
`tmct cli` is a lower-level, carry-over surface for invoking a graph tool directly:
|
|
641
|
+
|
|
642
|
+
```output:help:cli
|
|
582
643
|
tmct cli <tool> '{…}' invoke a graph tool directly (carry-over, de-emphasized)
|
|
644
|
+
[--repo <abs>] the repo to answer from; the payload's "repo_path" says
|
|
645
|
+
[--graph <path>] the same thing. --graph names the graph file outright
|
|
646
|
+
[--config <path>] (repeatable), --config an alternate tmct.toml
|
|
583
647
|
tmct cli digest '{…}' architecture map + per-module context bundles
|
|
584
648
|
```
|
|
585
649
|
|
|
586
650
|
Two precedence chains apply across every command above, in this order:
|
|
587
651
|
|
|
588
|
-
```
|
|
589
|
-
Shared graph-path precedence (chat/serve; see src/cli-args.mjs): --graph flag(s) >
|
|
652
|
+
```output:help:precedence
|
|
653
|
+
Shared graph-path precedence (chat/serve/cli; see src/services/cli-args.mjs): --graph flag(s) >
|
|
590
654
|
TMCT_GRAPH_FILE env > tmct.toml graph_file/graph_files > --repo-derived
|
|
591
|
-
<repo>/.tmct/graph.json > git-root/cwd default.
|
|
655
|
+
<repo>/.tmct/graph.json > git-root/cwd default. On the `cli` route, a payload's
|
|
656
|
+
"repo_path" fills the --repo tier when the flag is absent.
|
|
592
657
|
|
|
593
|
-
Memory-backend precedence (chat; see src/chat.mjs createSession): --memory-backend
|
|
658
|
+
Memory-backend precedence (chat; see src/services/chat.mjs createSession): --memory-backend
|
|
594
659
|
flag > TMCT_MEMORY_BACKEND env > tmct.toml [memory] backend > "default" (the flat
|
|
595
660
|
.tmct/ JSON file). Set it once with `tmct init --memory-backend <...>` and every
|
|
596
661
|
later `tmct chat` in that repo picks it up with no flag needed.
|
|
@@ -599,14 +664,27 @@ later `tmct chat` in that repo picks it up with no flag needed.
|
|
|
599
664
|
`npm run init:large` in `package.json` chains one `init` and five `import --corpus`
|
|
600
665
|
calls to combine every shipped bundle (human persona + seon + conceptnet +
|
|
601
666
|
aws/python/java) into ~7,380 facts on the default flat-JSON backend, a working
|
|
602
|
-
example to copy from.
|
|
667
|
+
example to copy from. `init:xl` starts from the large persona tier and adds
|
|
668
|
+
the wordnet-xl corpus (~72,000 facts); `init:xxl` swaps wordnet-xl for the
|
|
669
|
+
full WordNet slice plus namenet (~239,000 facts, the biggest committed
|
|
670
|
+
vocabulary — expect its imports to take a minute). The xl chain, spelled out:
|
|
671
|
+
|
|
672
|
+
```bash e2e
|
|
673
|
+
npx tmct init --persona-size large # npm run init:xl runs this whole chain from a clone
|
|
674
|
+
npx tmct import --corpus seon
|
|
675
|
+
npx tmct import --corpus conceptnet
|
|
676
|
+
npx tmct import --corpus aws
|
|
677
|
+
npx tmct import --corpus python
|
|
678
|
+
npx tmct import --corpus java
|
|
679
|
+
npx tmct import --corpus wordnet-xl # init:xxl instead ends with wordnet-full and namenet
|
|
680
|
+
```
|
|
603
681
|
|
|
604
682
|
### tmct.toml reference
|
|
605
683
|
|
|
606
684
|
`tmct init` writes a sparse `tmct.toml` with just the keys it needs. The file
|
|
607
685
|
recognizes more keys than that default covers. Below is one config with every
|
|
608
686
|
recognized key set, so you can see the full surface in one place
|
|
609
|
-
(`src/toml-config.mjs` is the source of truth; `src/extensions.mjs` defines the
|
|
687
|
+
(`src/adapters/toml-config.mjs` is the source of truth; `src/services/extensions.mjs` defines the
|
|
610
688
|
`[extensions.*]`/`[bias]` shape).
|
|
611
689
|
|
|
612
690
|
```toml
|
|
@@ -655,7 +733,7 @@ templates_path = "./vendor/my-pack/templates"
|
|
|
655
733
|
phrasebook_path = "./vendor/my-pack/phrasebook.json"
|
|
656
734
|
provenance_prefix = "corpus:my-custom-pack"
|
|
657
735
|
|
|
658
|
-
# Flat bundle-name -> weight table, consumed by src/memory/bias.mjs's ranking.
|
|
736
|
+
# Flat bundle-name -> weight table, consumed by src/domain/memory/bias.mjs's ranking.
|
|
659
737
|
[bias]
|
|
660
738
|
human = 1.0
|
|
661
739
|
seon = 0.8
|
|
@@ -706,15 +784,15 @@ one. Two ready-made example graphs live in `examples/` in this repo (clone the
|
|
|
706
784
|
repo to use them; they are not in the published npm package), so you can see
|
|
707
785
|
it answer real questions with no setup:
|
|
708
786
|
|
|
709
|
-
```bash
|
|
787
|
+
```bash cwd=repo
|
|
710
788
|
npm run example:mini # "Questboard" — a small task-tracker web app (12 modules)
|
|
711
789
|
npm run example:polyglot # one shared OWL vocabulary across Java / Python / C#
|
|
712
|
-
npm run chat:repo --
|
|
790
|
+
npm run chat:repo -- examples/mini-webapp # any repo with a .tmct/graph.json works here
|
|
713
791
|
```
|
|
714
792
|
|
|
715
793
|
Questions the **mini-webapp** graph answers:
|
|
716
794
|
|
|
717
|
-
```
|
|
795
|
+
```text
|
|
718
796
|
what classes are there
|
|
719
797
|
describe Task
|
|
720
798
|
how many modules
|
|
@@ -726,7 +804,7 @@ The **polyglot** graph shows the language-neutral idea: Java, Python and C#
|
|
|
726
804
|
entities all typed to the same `seon:Class` / `seon:Method` / `seon:Module`
|
|
727
805
|
concepts, so one query reasons across every language at once:
|
|
728
806
|
|
|
729
|
-
```
|
|
807
|
+
```text
|
|
730
808
|
how many classes # 9 — Java + Python + C# counted as one concept
|
|
731
809
|
what classes are there # Order (Java), Inventory (Python), PaymentService (C#), …
|
|
732
810
|
which modules define PaymentService
|
|
@@ -759,6 +837,90 @@ loads a repo's graph into a `{ dispatch, resolve, graph }` context,
|
|
|
759
837
|
`declaredCapabilityNames()` lists every capability a caller can declare. See
|
|
760
838
|
"Planning across the graph" above.
|
|
761
839
|
|
|
840
|
+
<!-- generated by scripts/generate-tool-docs.mjs from src/tools/definitions.mjs — do not edit by hand -->
|
|
841
|
+
|
|
842
|
+
## The tool surface
|
|
843
|
+
|
|
844
|
+
Everything above runs on the same 22 tools. Each one is read-only, answers one question in a single call, and returns bounded output. None of them calls a model. A tool that cannot ground an answer says so — the same honest miss you get everywhere else in tmct.
|
|
845
|
+
|
|
846
|
+
Three of them are **hot**: their schemas stay resident, so an agent driving tmct sees them every turn and reaches for one call instead of a Read/Grep loop.
|
|
847
|
+
|
|
848
|
+
- **`tmct_context`** — A sized edit bundle for one symbol — exemplar source, sibling signatures, registration anchor and the insertion region, in one call.
|
|
849
|
+
Arguments: `symbol` (required), `depth`.
|
|
850
|
+
- **`tmct_snippet`** — The exact source of one function, class or Class.method — its line span only, plus a one-line in-repo call hint.
|
|
851
|
+
Arguments: `symbol` (required).
|
|
852
|
+
- **`tmct_ask`** — A structural question in plain English, answered from the graph in one call — no model, and a clean miss instead of a guess.
|
|
853
|
+
Arguments: `query` (required).
|
|
854
|
+
|
|
855
|
+
### Asking in plain English
|
|
856
|
+
|
|
857
|
+
`tmct_ask` is the chat-facing tool. It takes a structural question as you would type it and resolves it to a real traversal. These are the shapes it reads:
|
|
858
|
+
|
|
859
|
+
| you type | it answers with |
|
|
860
|
+
| --- | --- |
|
|
861
|
+
| which modules import src/core/model.mjs | the imports edge, read forwards |
|
|
862
|
+
| what is imported by src/core/store.mjs | the same edge, read backwards — a passive is the opposite direction, not a synonym |
|
|
863
|
+
| what uses src/lib/http.mjs | the uses union: imports plus calls |
|
|
864
|
+
| where is saveStore defined | the definition's file and line span |
|
|
865
|
+
| when did src/core/store.mjs change | the commits that touched it, newest first |
|
|
866
|
+
|
|
867
|
+
The `<where-marker>` slot takes any of *defined*, *declared*, *located*, *implemented*. The relation verb is the part that carries the meaning, and each relation has its own vocabulary rather than one blessed keyword:
|
|
868
|
+
|
|
869
|
+
- **imports** — *couples to*, *couple to*, *depends on*, *imports*, and more
|
|
870
|
+
- **uses** — *uses*, *use*, *makes use of*, *make use of*, and more
|
|
871
|
+
- **calls** — *invokes*, *invoke*, *calls*, *call*, and more
|
|
872
|
+
- **defines** — *defines*, *define*, *declares*, *declare*, and more
|
|
873
|
+
- **contains** — *contains*, *contain*, *lives in*, *live in*, and more
|
|
874
|
+
- **tests** — *tests*, *test*, *covers*, *cover*, and more
|
|
875
|
+
- **inherits** — *inherits from*, *inherit from*, *inherits*, *inherit*, and more
|
|
876
|
+
- **touches** — *touched*, *touches*, *changed*, *change*, and more
|
|
877
|
+
- **cochange** — *changed with*, *co-changes with*, *co-change with*, *changes alongside*, and more
|
|
878
|
+
- **reexports** — *exports*, *export*, *re-exports*, *re-export*, and more
|
|
879
|
+
|
|
880
|
+
Every question in that table runs against the example graph:
|
|
881
|
+
|
|
882
|
+
```bash cwd=repo
|
|
883
|
+
node bin/tmct.mjs cli tmct_ask '{"query":"which modules import src/core/model.mjs","repo_path":"examples/mini-webapp"}'
|
|
884
|
+
node bin/tmct.mjs cli tmct_ask '{"query":"what is imported by src/core/store.mjs","repo_path":"examples/mini-webapp"}'
|
|
885
|
+
node bin/tmct.mjs cli tmct_ask '{"query":"what uses src/lib/http.mjs","repo_path":"examples/mini-webapp"}'
|
|
886
|
+
node bin/tmct.mjs cli tmct_ask '{"query":"where is saveStore defined","repo_path":"examples/mini-webapp"}'
|
|
887
|
+
node bin/tmct.mjs cli tmct_ask '{"query":"when did src/core/store.mjs change","repo_path":"examples/mini-webapp"}'
|
|
888
|
+
```
|
|
889
|
+
|
|
890
|
+
### The rest of the tools
|
|
891
|
+
|
|
892
|
+
The remaining tools are **cold**: still served, but not billed to an agent every turn. Reach one through `tmct cli <tool>`, passing its arguments as JSON:
|
|
893
|
+
|
|
894
|
+
| tool | what it answers | arguments |
|
|
895
|
+
| --- | --- | --- |
|
|
896
|
+
| `tmct_describe` | Locate one symbol and list its typed edges (both directions) with provenance. | `symbol` (required) |
|
|
897
|
+
| `tmct_signature` | One symbol's API surface (params, returns, raises/catches, flags, decorators, doc) without the body. | `symbol` (required) |
|
|
898
|
+
| `tmct_impact` | Transitive reverse closure over imports/calls — what breaks if a module changes, by depth, with tests. | `module` (required) |
|
|
899
|
+
| `tmct_search` | Free-text/ranked lookup over the code-map to find the right module or symbol. | `query`, `kind`, `decorator`, `name` |
|
|
900
|
+
| `tmct_members` | A class's methods + attributes (file:line, decorators) in one slice. | `class` (required) |
|
|
901
|
+
| `tmct_subclasses` | A class's base classes plus the transitive set of classes that extend it. | `class` (required) |
|
|
902
|
+
| `tmct_architecture` | Package/module map + the most-imported hub modules (optionally scoped to a package). | `package` |
|
|
903
|
+
| `tmct_exports` | A module's public __all__ surface, each name resolved to the module that defines it. | `module` (required) |
|
|
904
|
+
| `tmct_tests_for` | The test modules covering a symbol or module, from the typed test edges. | `symbol` (required) |
|
|
905
|
+
| `tmct_untested` | Source modules with no covering test module — a coverage-gap view (no arguments). | none |
|
|
906
|
+
| `tmct_history` | Recent commits that touched a symbol's module (newest first). | `symbol` (required) |
|
|
907
|
+
| `tmct_file_history` | Commits that touched a symbol's module, each with author / date / subject. | `symbol` (required) |
|
|
908
|
+
| `tmct_method_history` | Commits that touched a specific method symbol (fine-grained), with author / date / subject. | `symbol` (required) |
|
|
909
|
+
| `tmct_class_history` | Commits that touched a specific class symbol (fine-grained), with author / date / subject. | `symbol` (required) |
|
|
910
|
+
| `tmct_callers` | Modules that call into a symbol's module (one hop). | `symbol` (required) |
|
|
911
|
+
| `tmct_callees` | Modules a symbol's module calls into (one hop). | `symbol` (required) |
|
|
912
|
+
| `tmct_calls` | The in-repo symbols a function calls (fn→fn), each with file:line. | `symbol` (required) |
|
|
913
|
+
| `tmct_cochanges` | Modules that historically change in the same commit as a symbol's module (git co-change). | `symbol` (required) |
|
|
914
|
+
| `tmct_context_more` | The bundle sections a lean tmct_context omitted (siblings / tests / cochange / class members / re-exports). | `symbol` (required) |
|
|
915
|
+
|
|
916
|
+
Add `repo_path` to any of them to point at a repository other than the working directory. `tmct init` also writes this catalog, with a worked invocation per tool, to `.tmct/TOOLS.md` inside the repo it indexed.
|
|
917
|
+
|
|
918
|
+
```bash cwd=repo
|
|
919
|
+
node bin/tmct.mjs cli tmct_untested '{"repo_path":"examples/mini-webapp"}'
|
|
920
|
+
```
|
|
921
|
+
|
|
922
|
+
<!-- end generated tool section -->
|
|
923
|
+
|
|
762
924
|
## The repository interface
|
|
763
925
|
|
|
764
926
|
tmct is not an indexer, so it consumes a graph through a typed contract any
|
|
@@ -775,6 +937,40 @@ original relationship: tmct was lifted out of seonix, and seonix now reorients
|
|
|
775
937
|
as a *user* that imports the tmct library and exposes its graph to tmct as a
|
|
776
938
|
service. The LLM agent stays outside tmct, as the no-LLM ethos requires.
|
|
777
939
|
|
|
940
|
+
## Measuring it
|
|
941
|
+
|
|
942
|
+
Three offline benchmark rigs live in a clone (they are not in the npm
|
|
943
|
+
package). Each replays a committed case set through the real product and
|
|
944
|
+
writes graded rows you can diff between runs:
|
|
945
|
+
|
|
946
|
+
- `npm run chatbench:run` measures chat quality against CEFR-graded English
|
|
947
|
+
cases with deterministic tier-1 checks (the full tuning loop is in
|
|
948
|
+
`SKILL_BENCHMARK_CEFR_ENGLISH.md`);
|
|
949
|
+
- `npm run infbench` generates inference cases, then runs each through both
|
|
950
|
+
drive points, the reasoning kernel and the chat surface;
|
|
951
|
+
- `npm run agentbench:run` measures the tool-loop behaviour, and every
|
|
952
|
+
verdict carries a hallucination axis.
|
|
953
|
+
|
|
954
|
+
The smallest real slice of each, the same invocations the test suite's
|
|
955
|
+
bench-smoke lane replays:
|
|
956
|
+
|
|
957
|
+
```bash cwd=repo
|
|
958
|
+
node chatbench/run.mjs --stamp smoke --only g-a1-naming-1 --out /tmp/chatbench-smoke
|
|
959
|
+
node infbench/generate-cases.mjs --out /tmp/infbench-cases.jsonl
|
|
960
|
+
node infbench/run.mjs --cases /tmp/infbench-cases.jsonl --only inf-a1-lookup-subClassOf-001 --stamp smoke --out /tmp/infbench-smoke
|
|
961
|
+
node agentbench/run.mjs --stamp smoke --driver stub --only ab-a0-describe-widget --out /tmp/agentbench-smoke
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
Grading beyond tier 1 uses an LLM as judge. The offline eval harness is the
|
|
965
|
+
one place an LLM is allowed, never the product:
|
|
966
|
+
|
|
967
|
+
```bash skip=offline-eval-only
|
|
968
|
+
npm run chatbench:judge -- --product /tmp/chatbench-smoke/product.jsonl
|
|
969
|
+
```
|
|
970
|
+
|
|
971
|
+
The headline numbers and their conditions live in the `BENCHMARK_*.md`
|
|
972
|
+
write-ups.
|
|
973
|
+
|
|
778
974
|
## Security and supply chain
|
|
779
975
|
|
|
780
976
|
tmct is $0 to run and meant to be trusted offline, so the supply chain is
|
|
@@ -785,7 +981,7 @@ hardened:
|
|
|
785
981
|
- Releases are published with **npm provenance** (`--provenance`).
|
|
786
982
|
- A coordinated-disclosure `SECURITY.md` policy covers reports.
|
|
787
983
|
|
|
788
|
-
The content-address hash is single-sourced in `src/hash.mjs`, so the
|
|
984
|
+
The content-address hash is single-sourced in `src/domain/hash.mjs`, so the
|
|
789
985
|
cross-version-stable fact-id contract has exactly one definition.
|
|
790
986
|
|
|
791
987
|
## Provenance
|
package/ROADMAP.md
CHANGED
|
@@ -28,41 +28,29 @@ getting silently traded away by inherited caution:
|
|
|
28
28
|
clipping/pagination limits. L
|
|
29
29
|
- **Paraphrase alongside the original, verified, never instead of it.** A surface-realization variant
|
|
30
30
|
sits next to the literal grounded answer, never replacing it, and its accuracy is checked, not
|
|
31
|
-
assumed — by running tmct's own deterministic inference/consistency machinery (`src/syllogise.mjs`)
|
|
31
|
+
assumed — by running tmct's own deterministic inference/consistency machinery (`src/domain/syllogise.mjs`)
|
|
32
32
|
against both the original and the paraphrase: they must entail the same conclusions, and neither may
|
|
33
33
|
contradict the other sentence-by-sentence..
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
## What's next (feature-shaped — see `HANDOVER.md` for the current task-level list)
|
|
37
37
|
|
|
38
|
-
- **`
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
- **`archive/PLAN_HANOI.md`** — shipped in full, including the follow-ups: river-crossing (co-travel
|
|
55
|
-
effects, the forbidden-together constraint frame, 7-crossing oracle) and planner-side
|
|
56
|
-
consumption of `taught:` capability records (`/plan` in chat and bin). See its dated addenda.
|
|
57
|
-
- **`PLAN_GUESS_NUMBER.md`** — the closed-loop (observe-and-replan) planning domain for the same
|
|
58
|
-
kernels. Design-only.
|
|
59
|
-
- **`archive/PLAN_VIZ_LEDGER.md`** — shipped in full, including the follow-ups, all resolved by
|
|
60
|
-
operator decision 2026-07-15: the ledger IS the `tmct viz` surface (node-link page removed),
|
|
61
|
-
`factAnswer`/`factReadBack` carry the additive `goal` field the dock renders, multi-valued
|
|
62
|
-
has/can facts are exempt from `findContradictions`, and page weight is budgeted (~561 KB
|
|
63
|
-
after this batch; revisit only if outgrown). See its dated addendum.
|
|
64
|
-
- **`PLAN_CODE.md`** — small JS-function and HTML/CSS-fragment synthesis via a sandboxed headless
|
|
65
|
-
browser (Track 1, program synthesis, already shipped). Blocked on a sandbox dependency decision.
|
|
38
|
+
- **`PLAN_ADVENTURE.md`** — a text-adventure architectural stretch. Its world-state and
|
|
39
|
+
actions-as-data substrate shipped generically with the planning lane (action rule kinds,
|
|
40
|
+
per-step board snapshots, legal-move enumeration); what remains its own is the imperative
|
|
41
|
+
command grammar ("go north", "take the key"), the NPC turn scheduler, the Ashcombe Hall
|
|
42
|
+
corpus, and the room-look digest.
|
|
43
|
+
- **`PLAN_SYLLOGIST.md`** — the reasoning engine's research horizon. The single-justification
|
|
44
|
+
retraction slice shipped (`retractSubClassOf`, justification persistence and cascade across all
|
|
45
|
+
five rules); still open there: the ATMS generalization (alternate justification sets per fact),
|
|
46
|
+
incremental matching (§2), and relevance under budget (§4).
|
|
47
|
+
- **`PLAN_GUESS_NUMBER.md`** — closed-loop planning over hidden state (belief-interval bisection,
|
|
48
|
+
thinker-mode secret commitment, observation folding) on top of the shipped planner substrate.
|
|
49
|
+
Design-only.
|
|
50
|
+
- **`PLAN_CODE.md`** — small JS-function and HTML/CSS-fragment synthesis, plus goal-directed
|
|
51
|
+
program repair (tests as the goal state, mutation templates as planning actions), via a sandboxed
|
|
52
|
+
headless browser (Track 1, rule/frame synthesis, already shipped). Blocked on a sandbox
|
|
53
|
+
dependency decision.
|
|
66
54
|
- **`PLAN_AGENTS.md`** — the governing plan for tmct's broader multi-repo arc (marginalia, seonix,
|
|
67
55
|
a pluggable LLM rung for Claude Code/Bedrock/Copilot). Check its own sequencing table for current
|
|
68
56
|
phase status, not this file.
|
|
@@ -88,8 +76,9 @@ citations, not stop signs:
|
|
|
88
76
|
- **Bounded, incremental, trust-tiered, retraction-safe justification tracking** — `PLAN_SYLLOGIST.md`
|
|
89
77
|
§3. Doyle's JTMS (1979) and de Kleer's ATMS (1986) solve retraction; DRed/RDFox's Backward-Forward
|
|
90
78
|
solve incremental Datalog maintenance; nobody's published the combination with tmct's
|
|
91
|
-
multi-trust-tier, hard-budget requirement.
|
|
92
|
-
|
|
79
|
+
multi-trust-tier, hard-budget requirement. The JTMS-lite slice shipped (one persisted
|
|
80
|
+
justification per entailed fact, VERIFY-backed retraction, all five rules); the open piece is the
|
|
81
|
+
ATMS generalization — alternate justification SETS per fact (see that doc's 2026-07-15 addendum).
|
|
93
82
|
- **A shared ~2M-word cross-domain ontology** (general-English + technical/scientific/programming).
|
|
94
83
|
Merging collides senses of lexically-shared words (`class`, `cache`, `thread`, `field`, `state`)
|
|
95
84
|
across registers; knowledge-based WSD is real but weaker than supervised/neural WSD (Lesk 1986;
|
|
@@ -99,7 +88,7 @@ citations, not stop signs:
|
|
|
99
88
|
terms in tmct's own closed graph (a bounded reading of Gale/Church/Yarowsky's "one sense per
|
|
100
89
|
discourse" regularity) — not published anywhere found for this application. Fresh live instance
|
|
101
90
|
(2026-07-11): `"tail"` (Unix process vs. animal body part) collides under `normFactTerm`'s
|
|
102
|
-
cross-corpus flattening, `src/memory/core.mjs:1109-1134`.
|
|
91
|
+
cross-corpus flattening, `src/adapters/memory/core.mjs:1109-1134`.
|
|
103
92
|
|
|
104
93
|
**Tier-4: learn-on-miss acquisition**. The strongest
|
|
105
94
|
miss signal tmct can emit: lexicon term recognized, query built cleanly, zero matches anywhere — the
|
|
@@ -113,5 +102,5 @@ blending web-sourced facts with graph/operator facts.
|
|
|
113
102
|
|
|
114
103
|
Every substantial design lives in its own `PLAN_*.md` at the repo root (active) or `archive/`
|
|
115
104
|
(shipped and closed) — this file points to them, it doesn't repeat their content. `SKILL_*.md` docs
|
|
116
|
-
specify the repeatable measurement/build cycles (benchmarks,
|
|
117
|
-
|
|
105
|
+
specify the repeatable measurement/build cycles (benchmarks, the background strategy advisor,
|
|
106
|
+
plain-prose writing). `HANDOVER.md` is the single current-open-items list.
|