@polycode-projects/the-mechanical-code-talker 2.11.9 → 2.11.10
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 +52 -51
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,14 +124,14 @@ page answers codebase questions live, and eight more pages each ground their
|
|
|
124
124
|
own domain: a full chat seeded with 32,646 facts (the same nine bands as
|
|
125
125
|
`npm run init:xl`, capped to a 38.7 MB download, 2.1 MB on the wire), the
|
|
126
126
|
**memory ledger** (every fact as a readable sentence; drill by clicking the
|
|
127
|
-
terms inside), the **code explorer** (the same ledger UI refocused on a
|
|
128
|
-
graph, with a hint rail of suggested next questions)
|
|
129
|
-
turns pasted or dropped text into grounded facts and downloads them
|
|
130
|
-
canonical JSONL
|
|
131
|
-
spider-and-fly and text-adventure games, and a sprite gallery
|
|
132
|
-
answers from 1,033 generated sprite facts. The chat page and
|
|
133
|
-
the same paste-or-drop text in place; every page that holds
|
|
134
|
-
exports it as JSONL.
|
|
127
|
+
terms inside), and the **code explorer** (the same ledger UI refocused on a
|
|
128
|
+
code graph, with a hint rail of suggested next questions). An **ingest
|
|
129
|
+
page** turns pasted or dropped text into grounded facts and downloads them
|
|
130
|
+
as canonical JSONL. The rest are a Towers-of-Hanoi plan replayed move by
|
|
131
|
+
move, the spider-and-fly and text-adventure games, and a sprite gallery
|
|
132
|
+
whose chat dock answers from 1,033 generated sprite facts. The chat page and
|
|
133
|
+
the ledger take the same paste-or-drop text in place; every page that holds
|
|
134
|
+
a fact store exports it as JSONL.
|
|
135
135
|
The site hosts its own copy of wink-nlp, ships its assets precompressed,
|
|
136
136
|
and a service worker precaches the big ones, so a second visit works
|
|
137
137
|
offline. `tmct chat --render spider-fly|adventure|sprites [--output <path>]`
|
|
@@ -168,13 +168,14 @@ The same ledger UI, refocused on a code graph, also runs as a desktop app. It
|
|
|
168
168
|
reads a `graph.json` (or a repo's `.tmct/` folder), shows every import, call and
|
|
169
169
|
`contains` edge as a plain sentence around a focus symbol, and docks a live chat
|
|
170
170
|
over the same graph. A hint rail suggests the next question from what the graph
|
|
171
|
-
actually holds
|
|
172
|
-
functions"
|
|
171
|
+
actually holds: "what does X import", "which functions call Y", "list
|
|
172
|
+
functions". Every suggestion resolves to a real answer.
|
|
173
173
|
|
|
174
|
-
The identical page also runs as a plain hosted page
|
|
175
|
-
graph
|
|
176
|
-
|
|
177
|
-
exploring your own repo or graph, which the
|
|
174
|
+
The identical page also runs as a plain hosted page over the demo code
|
|
175
|
+
graph, with nothing to install:
|
|
176
|
+
**[try it live →](https://polycode-projects.gitlab.io/the-mechanical-code-talker/code.html)**.
|
|
177
|
+
The desktop build below is for exploring your own repo or graph, which the
|
|
178
|
+
hosted page cannot reach.
|
|
178
179
|
|
|
179
180
|
Electron is a dev-only dependency and never ships in the npm package. Because
|
|
180
181
|
`.npmrc` sets `ignore-scripts=true`, installing it does not fetch the runtime
|
|
@@ -188,8 +189,8 @@ npm run electron # open the code explorer on the demo gra
|
|
|
188
189
|
```
|
|
189
190
|
|
|
190
191
|
Open a graph or a repo from the window's title bar to explore your own code.
|
|
191
|
-
The UI is channel-agnostic
|
|
192
|
-
`electron/preload.cjs`) is desktop-specific
|
|
192
|
+
The UI is channel-agnostic. Only the Electron shell (`electron/main.mjs` +
|
|
193
|
+
`electron/preload.cjs`) is desktop-specific. The same page stays servable as a
|
|
193
194
|
plain web page. `npm run test:electron` runs the shell smoke via Playwright and
|
|
194
195
|
skips cleanly when the binary is absent.
|
|
195
196
|
|
|
@@ -226,8 +227,8 @@ resolves to a real graph traversal or declines cleanly:
|
|
|
226
227
|
(*because/although/while*), conditionals, and false-premise flags ("why
|
|
227
228
|
does X still import Y" when it no longer does).
|
|
228
229
|
|
|
229
|
-
The full catalog with measured coverage lives in `
|
|
230
|
-
|
|
230
|
+
The full catalog with measured coverage lives in the `BENCHMARK_*.md`
|
|
231
|
+
reports.
|
|
231
232
|
|
|
232
233
|
**Response finishing.** Before an answer prints, it is segmented into typed
|
|
233
234
|
spans: prose versus *protected* entities, paths, numbers, code, provenance,
|
|
@@ -310,7 +311,7 @@ planner over the same read-only graph-query tools chat/serve use
|
|
|
310
311
|
step in order with a provable causal-link proof chain, and folds the results
|
|
311
312
|
into one answer. A request neither the planner nor a single lookup can ground
|
|
312
313
|
escalates to a closed-world goal-reasoner, which deduces maintenance goals
|
|
313
|
-
(coverage gaps, change-coupling risk) straight from the graph
|
|
314
|
+
(coverage gaps, change-coupling risk) straight from the graph, never from
|
|
314
315
|
keywords in your question. Anything none of that grounds is an honest "no plan
|
|
315
316
|
found", the same "grounded or an honest miss" rule as everywhere else in tmct.
|
|
316
317
|
|
|
@@ -344,7 +345,7 @@ composed answer (4): src/handlers/base.mjs, src/handlers/users.mjs, src/server/a
|
|
|
344
345
|
```
|
|
345
346
|
|
|
346
347
|
tmct planned two calls (`tmct_impact` then `tmct_untested`), ran both against the
|
|
347
|
-
real graph, and intersected the results itself
|
|
348
|
+
real graph, and intersected the results itself. You get the four modules that
|
|
348
349
|
are both downstream of the change AND missing coverage, not two separate lists
|
|
349
350
|
you'd have to cross-reference by hand.
|
|
350
351
|
|
|
@@ -361,7 +362,7 @@ composed answer (1): src/lib/http.mjs
|
|
|
361
362
|
|
|
362
363
|
It deduced the goal ("an impactful module must be tested"), gathered every
|
|
363
364
|
untested module, ranked each by blast radius, and named the one worth testing
|
|
364
|
-
first
|
|
365
|
+
first: `src/lib/http.mjs`, the module with the widest reach.
|
|
365
366
|
|
|
366
367
|
`--tools tmct_impact,tmct_untested` restricts which capabilities the planner is
|
|
367
368
|
allowed to use; `--json` prints the full machine-readable loop result (calls,
|
|
@@ -372,9 +373,9 @@ flag reference.
|
|
|
372
373
|
## Teach it a game, then ask it to plan
|
|
373
374
|
|
|
374
375
|
The planner above works over a fixed toolset. This one works over rules you
|
|
375
|
-
teach. A game definition is a plain-text file of controlled English
|
|
376
|
+
teach. A game definition is a plain-text file of controlled English: the
|
|
376
377
|
classes, the pieces, the ordering, and the legal moves as taught action
|
|
377
|
-
rules
|
|
378
|
+
rules, with `#` comment lines carrying example prompts. `tmct init`
|
|
378
379
|
scaffolds one at `.tmct/imports/games/hanoi-3.txt`, and
|
|
379
380
|
`tmct import --file` teaches it sentence by sentence, reporting every line
|
|
380
381
|
and refusing (exit 1) if any sentence declines.
|
|
@@ -402,8 +403,8 @@ Goal (inferred): Plan a move sequence from the current state to the goal (7 move
|
|
|
402
403
|
facts stamped with the step that produced them ("disk-1@step1 rests on peg-c",
|
|
403
404
|
sourced to the plan). The final step re-reads the store and confirms the goal
|
|
404
405
|
from those written facts, never assuming success. The stamp is what makes each
|
|
405
|
-
step a separate record
|
|
406
|
-
rest?", "is disk-1 clear?") reads the current board
|
|
406
|
+
step a separate record. A question about the piece itself ("where does disk-1
|
|
407
|
+
rest?", "is disk-1 clear?") reads the current board: the latest step's facts,
|
|
407
408
|
not every step at once. The search is
|
|
408
409
|
domain-general: the test
|
|
409
410
|
suite teaches Towers of Hanoi purely as sentences for 1 to 8 disks and
|
|
@@ -417,17 +418,17 @@ the plan as a self-contained animated page (see "Two more surfaces" above).
|
|
|
417
418
|
Three games run inside an ordinary chat session, no setup.
|
|
418
419
|
|
|
419
420
|
**Guess the number.** Say `I'm thinking of a number between 1 and 100` and
|
|
420
|
-
tmct guesses by narrowing an interval
|
|
421
|
+
tmct guesses by narrowing an interval: answer `higher`, `lower`, or
|
|
421
422
|
`correct`. It finds any number in at most 7 guesses, and if your answers
|
|
422
423
|
contradict each other it names the contradicting pair and stops rather than
|
|
423
424
|
guessing on. Say `think of a number` to swap seats: tmct commits to a secret
|
|
424
|
-
and answers your guesses
|
|
425
|
-
its own record if you claim it already said `correct`. The
|
|
426
|
-
pinned by `test/corpus/games/guess-number.jsonl`.
|
|
425
|
+
and sticks to it. It answers your guesses, reveals the number on request, and
|
|
426
|
+
corrects you from its own record if you claim it already said `correct`. The
|
|
427
|
+
behaviour is pinned by `test/corpus/games/guess-number.jsonl`.
|
|
427
428
|
|
|
428
429
|
**A text adventure.** Say `start the adventure` (or `play ashcombe hall`)
|
|
429
430
|
and tmct loads a small country-house mystery from a lazily-fetched worlds
|
|
430
|
-
pack (`corpus/worlds/`) into the session's ordinary memory graph
|
|
431
|
+
pack (`corpus/worlds/`) into the session's ordinary memory graph: rooms,
|
|
431
432
|
objects and people become graph facts, and the verbs (`go`, `take`, `open`,
|
|
432
433
|
`unlock`, `look`…) are taught action rules, not hard-wired code. Every move
|
|
433
434
|
writes per-turn snapshot facts, `look` is an extractive digest of the graph,
|
|
@@ -436,30 +437,30 @@ schedule whether you are there to see it or not. The full worked mystery is
|
|
|
436
437
|
pinned step by step in `test/corpus/games/adventure.jsonl`.
|
|
437
438
|
|
|
438
439
|
**Two agents, planning against each other.** Say `play spider and fly` (or
|
|
439
|
-
`watch the spider and the fly`) and tmct runs both sides itself
|
|
440
|
+
`watch the spider and the fly`) and tmct runs both sides itself. Neither is
|
|
440
441
|
player-controlled. A spider hunts a fly across a 10×10 web; each side only
|
|
441
442
|
believes what it can currently see (`vision_radius`, tunable), a fly wanders
|
|
442
443
|
when nothing threatens it and evades when something does, a spider avoids
|
|
443
444
|
other spiders, chases what it believes it sees, and builds a web when it
|
|
444
445
|
holds position. Mass is real: both sides waste away each turn they don't
|
|
445
446
|
eat, and a spider gains exactly the mass of what it catches. You can address
|
|
446
|
-
either side directly (`@spider the fly is east`) to feed it a belief
|
|
447
|
-
or false
|
|
447
|
+
either side directly (`@spider the fly is east`) to feed it a belief, true
|
|
448
|
+
or false, and watch a wrong assertion mislead it for as long as the real
|
|
448
449
|
target stays out of sight. `tmct.toml`'s `[games.spider-fly]` table tunes
|
|
449
450
|
every rate; the full mechanic is pinned in `test/corpus/games/spider-fly.jsonl`.
|
|
450
451
|
|
|
451
452
|
## Learning on a miss
|
|
452
453
|
|
|
453
|
-
A question tmct cannot ground is still an honest miss
|
|
454
|
-
kind of miss (a recognised word, a clean parse, simply no facts anywhere) it
|
|
454
|
+
A question tmct cannot ground is still an honest miss. But on the cleanest
|
|
455
|
+
kind of miss (a recognised word, a clean parse, simply no facts anywhere), it
|
|
455
456
|
now consults two shipped, lazily-loaded packs before giving up:
|
|
456
457
|
|
|
457
|
-
- `corpus/child
|
|
458
|
+
- `corpus/child/`: 93k everyday-world triples filtered from ConceptNet by a
|
|
458
459
|
child-concept seed. Asked `what is a kettle` cold, tmct loads the term's
|
|
459
460
|
triples into memory (provenance `child:conceptnet:kettle`, ranked below
|
|
460
461
|
anything you teach) and answers from them; the next ask answers from
|
|
461
462
|
memory directly.
|
|
462
|
-
- `corpus/reference
|
|
463
|
+
- `corpus/reference/`: 3,887 Simple English Wikipedia summaries. When the
|
|
463
464
|
triples cannot answer, a matching article answers as a cited read-out
|
|
464
465
|
(`source: reference article "Otter"…, CC BY-SA 4.0`).
|
|
465
466
|
|
|
@@ -495,7 +496,7 @@ by cleaned session logs:
|
|
|
495
496
|
relevance rather than loaded wholesale.
|
|
496
497
|
|
|
497
498
|
Every session also writes its own human-readable transcript,
|
|
498
|
-
`.tmct/session-<id>.md
|
|
499
|
+
`.tmct/session-<id>.md`, a glow-friendly Markdown file with one heading per
|
|
499
500
|
turn, the question as a blockquote, the reply in a fenced block. The
|
|
500
501
|
browser chat page's "export .md" button writes the same shape.
|
|
501
502
|
|
|
@@ -538,7 +539,7 @@ Teaching isn't limited to the ACE grammar's fixed shapes. Tell tmct an
|
|
|
538
539
|
arbitrary fact, like "margo really eats ribs", and it mints a fact you can
|
|
539
540
|
ask about directly: "what does margo eat". New vocabulary compounds as you
|
|
540
541
|
teach: "redis is a cache" mints "redis" even though it was never in the
|
|
541
|
-
built-in lexicon, as long as one side of the sentence is already grounded
|
|
542
|
+
built-in lexicon, as long as one side of the sentence is already grounded.
|
|
542
543
|
tmct never mints a fact between two totally ungrounded terms; it declines and
|
|
543
544
|
nudges you to ground one side first. Quantified teaching stores the
|
|
544
545
|
quantifier ("some functions are risky" … "how many functions are risky" →
|
|
@@ -553,13 +554,13 @@ rather than the code graph. A taught class answers both shapes too: after
|
|
|
553
554
|
|
|
554
555
|
When you ask about a term, the read-back shows each "is a kind of" object with
|
|
555
556
|
its own superclass chain: "what is rover" answers "rover is a kind of dog →
|
|
556
|
-
canine → mammal → animal". If one label carries two unrelated senses
|
|
557
|
-
taught "rover is a dog" and a corpus row says "rover is a scout"
|
|
557
|
+
canine → mammal → animal". If one label carries two unrelated senses (you
|
|
558
|
+
taught "rover is a dog" and a corpus row says "rover is a scout"), the answer
|
|
558
559
|
groups by concept ("rover, the dog:" / "rover, the scout:") instead of listing
|
|
559
560
|
two unrelated lines as if they were one thing. The split is deterministic over
|
|
560
561
|
the stored hierarchy: two senses part when a stored disjointness separates
|
|
561
562
|
their ancestors, when their chains never meet, or when they meet only at the
|
|
562
|
-
very top. When the evidence is thin the answer stays a flat list
|
|
563
|
+
very top. When the evidence is thin the answer stays a flat list. Grouping is
|
|
563
564
|
presentation, and it never retracts or reranks a fact.
|
|
564
565
|
|
|
565
566
|
Teaching doesn't have to be typed, either. `tmct extract` runs a plain text
|
|
@@ -586,14 +587,14 @@ carries an `extracted:<file>` provenance tag at its own trust tier.
|
|
|
586
587
|
recognizer skips: a copula or a known relation verb flanked by two nouns
|
|
587
588
|
becomes a candidate triple, stored under its own `optimistic-extract:<file>`
|
|
588
589
|
provenance (prior 0.35, below every curated pack) with no operator tag riding
|
|
589
|
-
alongside
|
|
590
|
+
alongside, so a fuzzy guess can never corroborate a curated fact. It is an
|
|
590
591
|
attempt, not full NLU: a sentence with no clean pair yields nothing.
|
|
591
592
|
`--canonical` prints each grounded fact as a triple, noting how each endpoint
|
|
592
593
|
already links into the store.
|
|
593
594
|
|
|
594
595
|
The same pipeline is one library seam, `ingestText(text, options)` (exported
|
|
595
596
|
as `@polycode-projects/the-mechanical-code-talker/ingest`), and one cold tool,
|
|
596
|
-
`tmct_ingest
|
|
597
|
+
`tmct_ingest`. A browser page, a script, or a tool-calling agent can ground
|
|
597
598
|
text without the CLI.
|
|
598
599
|
|
|
599
600
|
### Provenance and trust
|
|
@@ -754,7 +755,7 @@ already set up. Its `--graph` flag works differently from the others: it appends
|
|
|
754
755
|
```
|
|
755
756
|
|
|
756
757
|
`tmct extract` is the document route into memory described under "Teach it"
|
|
757
|
-
above
|
|
758
|
+
above: the same teach recognizer, reading a file instead of your typing:
|
|
758
759
|
|
|
759
760
|
```output:help:extract
|
|
760
761
|
tmct extract <text-file> read a plain text file's sentences through the chat's own
|
|
@@ -787,7 +788,7 @@ inference" above:
|
|
|
787
788
|
retractable entailed facts (never on the chat path)
|
|
788
789
|
```
|
|
789
790
|
|
|
790
|
-
`tmct viz` renders the memory graph as the ledger explorer
|
|
791
|
+
`tmct viz` renders the memory graph as the ledger explorer, a single,
|
|
791
792
|
self-contained HTML file you can open in a browser:
|
|
792
793
|
|
|
793
794
|
```output:help:viz
|
|
@@ -867,7 +868,7 @@ aws/python/java) into ~7,380 facts on the default sqlite backend, a working
|
|
|
867
868
|
example to copy from. `init:xl` starts from the large persona tier and adds
|
|
868
869
|
the wordnet-xl corpus (~72,000 facts); `init:xxl` swaps wordnet-xl for the
|
|
869
870
|
full WordNet slice plus namenet (~239,000 facts, the biggest committed
|
|
870
|
-
vocabulary
|
|
871
|
+
vocabulary, so expect its imports to take a minute). The xl chain, spelled out:
|
|
871
872
|
|
|
872
873
|
```bash e2e heavy
|
|
873
874
|
npx tmct init --persona-size large # npm run init:xl runs this whole chain from a clone
|
|
@@ -1171,12 +1172,12 @@ The full tables, judge scores, and transcripts are in the linked write-ups.
|
|
|
1171
1172
|
|
|
1172
1173
|
| What it does | Result (2.7.12) | Read the number with this | Method |
|
|
1173
1174
|
|---|---|---|---|
|
|
1174
|
-
| Multi-hop entailment | 379/379 chat cases and 100/100 kernel cases, 0% fabrication, all bands pass | The case set is unchanged from 2.6.0 (same templates, same counts)
|
|
1175
|
-
| Tool-call planning | 68/68 cases, 100% plan-completion, 100% result-completion, 0% hallucination, every rung A0→C2 | Goal driver. 2.6.0 gated at TOOL-7 (62/66, 94%)
|
|
1175
|
+
| Multi-hop entailment | 379/379 chat cases and 100/100 kernel cases, 0% fabrication, all bands pass | The case set is unchanged from 2.6.0 (same templates, same counts). The one real move this cycle is INF-4's ceiling-graded count dropping 35→30: five cases that now pass as genuine capability instead of against the declared honest-miss floor. | `BENCHMARK_INFERENCE_2.7.12.md` |
|
|
1176
|
+
| Tool-call planning | 68/68 cases, 100% plan-completion, 100% result-completion, 0% hallucination, every rung A0→C2 | Goal driver. 2.6.0 gated at TOOL-7 (62/66, 94%). This cycle's router uplift (a guarded RECOVER step, a tied-candidate composer) cleared it: a real capability move, not a ruler change. | `BENCHMARK_AGENT_2.7.12.md` |
|
|
1176
1177
|
| Groundedness | Every answer carries a source, and an empty graph reports itself empty. Judge-scored mean 1.809/2 over 138 cases, 5 hard fails, 136/138 tier-1. | Judged (`claude-haiku-4-5-20251001`, `judge-prompt-v2`) at N=1. The judge prompt moved v1→v2 since 2.6.0, so this is a measurement, not a clean lever comparison against the prior cycle. The judge runs in the offline eval harness, never in the product. | `BENCHMARK_CEFR_ENGLISH_2.7.12.md` |
|
|
1177
1178
|
| Abstention (the honest miss) | 0% fabrication across 479 inference rows (379 chat + 100 kernel) and 0% hallucination across 272 agent rows | Structural, not a tuned threshold. tmct abstains because nothing matched, so the rows test a property of a no-model design rather than a score. | `BENCHMARK_INFERENCE_2.7.12.md`, `BENCHMARK_AGENT_2.7.12.md` |
|
|
1178
|
-
| Determinism | Byte-identical on rerun
|
|
1179
|
-
| Dialogue robustness (persona sweep) | A 6-persona sweep (textbook logician, casual newcomer, new developer, adversarial sceptic, returning user, planning user) fixed 25 of the prior cycle's 29 routed findings (21 clean, 4 with a residual noted); 4 remain broken, 2 in a shape distinct from the original complaint | Free exploration across all six personas surfaced roughly 60 fresh findings beyond the ratchet check
|
|
1179
|
+
| Determinism | Byte-identical on rerun: a 379-case `--replay` clean across 2 runs, no LLM, no network, $0 per turn | A property of the no-model pipeline. | `BENCHMARK_INFERENCE_2.7.12.md` |
|
|
1180
|
+
| Dialogue robustness (persona sweep) | A 6-persona sweep (textbook logician, casual newcomer, new developer, adversarial sceptic, returning user, planning user) fixed 25 of the prior cycle's 29 routed findings (21 clean, 4 with a residual noted); 4 remain broken, 2 in a shape distinct from the original complaint | Free exploration across all six personas surfaced roughly 60 fresh findings beyond the ratchet check. The single highest-signal pattern: tmct's own suggested repair text was itself frequently broken when followed verbatim (since fixed, see `NEXT.md`). | `BENCHMARK_CONVERSATION_2.7.11.md` |
|
|
1180
1181
|
|
|
1181
1182
|
Three offline benchmark rigs live in a clone (they are not in the npm
|
|
1182
1183
|
package). Each replays a committed case set through the real product and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polycode-projects/the-mechanical-code-talker",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The Mechanical Code Talker (tmct) — a tolerant, offline, $0 chat surface that guides you toward precision queries about a software repository. ELIZA/PARRY-style but domain-obsessed with code. No model calls; no codebase index of its own.",
|