@polycode-projects/the-mechanical-code-talker 2.5.0 → 2.5.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 +4 -4
- package/bin/tmct.mjs +1 -1
- package/corpus/README.md +3 -3
- package/package.json +4 -4
- package/src/domain/grammar/lexicon-core.json +1 -1
- package/src/services/chat.mjs +2 -2
- package/src/services/init.mjs +2 -2
- package/src/surfaces/web/memory-ask-browser.bundle.js +1 -1
- package/ROADMAP.md +0 -130
package/README.md
CHANGED
|
@@ -193,7 +193,7 @@ under a guard that proves the protected spans came through byte-for-byte.
|
|
|
193
193
|
|
|
194
194
|
A frozen regression suite plays out full multi-turn dialogues built from these
|
|
195
195
|
phrasings, from a single question up to a messy, typo-ridden real user.
|
|
196
|
-
Tier-by-tier detail is in `HANDOVER.md
|
|
196
|
+
Tier-by-tier detail is in `HANDOVER.md`.
|
|
197
197
|
|
|
198
198
|
## How it guides you
|
|
199
199
|
|
|
@@ -994,7 +994,7 @@ bench-smoke lane replays:
|
|
|
994
994
|
```bash cwd=repo
|
|
995
995
|
node chatbench/run.mjs --stamp smoke --only g-a1-naming-1 --out /tmp/chatbench-smoke
|
|
996
996
|
node infbench/generate-cases.mjs --out /tmp/infbench-cases.jsonl
|
|
997
|
-
node infbench/run.mjs --cases /tmp/infbench-cases.jsonl --only inf-
|
|
997
|
+
node infbench/run.mjs --cases /tmp/infbench-cases.jsonl --only inf-1-lookup-subClassOf-001 --stamp smoke --out /tmp/infbench-smoke
|
|
998
998
|
node agentbench/run.mjs --stamp smoke --driver stub --only ab-a0-describe-widget --out /tmp/agentbench-smoke
|
|
999
999
|
```
|
|
1000
1000
|
|
|
@@ -1023,8 +1023,8 @@ cross-version-stable fact-id contract has exactly one definition.
|
|
|
1023
1023
|
tmct began as a whole-package lift of the seonix chat surface (v0.1.0, then
|
|
1024
1024
|
published as `@polycode-projects/mct`), and was then reshaped. The LLM
|
|
1025
1025
|
fallback, the code-extraction stack, and the MCP server were all removed. The
|
|
1026
|
-
naming, license, and memory model were reset to the vision above. See
|
|
1027
|
-
`
|
|
1026
|
+
naming, license, and memory model were reset to the vision above. See the
|
|
1027
|
+
`PLAN_*.md` design docs for what's planned next.
|
|
1028
1028
|
|
|
1029
1029
|
## Standards and bibliography
|
|
1030
1030
|
|
package/bin/tmct.mjs
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
// tmct began as a whole-package lift of an earlier chat surface (see README
|
|
27
27
|
// provenance): internal module filenames and symbols were kept to preserve the
|
|
28
28
|
// shape and the green test suite. See README.md for what tmct is and
|
|
29
|
-
// deliberately is NOT, and
|
|
29
|
+
// deliberately is NOT, and the PLAN_*.md docs for where it is going.
|
|
30
30
|
|
|
31
31
|
// The verb list itself is data (src/domain/cli-verbs.mjs) and both the Usage
|
|
32
32
|
// block below and the unknown-invocation line read it, so a new verb is one
|
package/corpus/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# corpus/ — committed corpus data
|
|
2
2
|
|
|
3
|
-
The corpuses tmct ships so that an **empty** tmct still has a vocabulary
|
|
4
|
-
|
|
3
|
+
The corpuses tmct ships so that an **empty** tmct still has a vocabulary.
|
|
4
|
+
Everything here is plain, diffable data; the loaders live
|
|
5
5
|
in `src/adapters/corpus/`. Related committed data lives in `data/` (response templates
|
|
6
|
-
+ the SE phrase book
|
|
6
|
+
+ the SE phrase book).
|
|
7
7
|
|
|
8
8
|
## The tiering policy (tier-1 / tier-2 / tier-3)
|
|
9
9
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polycode-projects/the-mechanical-code-talker",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
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.",
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
"!src/domain/schemaorg/turtle.mjs",
|
|
64
64
|
"!src/domain/version-stamp.mjs",
|
|
65
65
|
"README.md",
|
|
66
|
-
"ROADMAP.md",
|
|
67
66
|
"LICENSE",
|
|
68
67
|
"corpus/",
|
|
69
68
|
"!corpus/wordnet/generate.mjs",
|
|
@@ -133,6 +132,7 @@
|
|
|
133
132
|
"audit": "npm audit --audit-level=high",
|
|
134
133
|
"audit:fix": "npm audit fix",
|
|
135
134
|
"demo:build": "node scripts/build-demo-site.mjs",
|
|
135
|
+
"roll": "node scripts/roll.mjs",
|
|
136
136
|
"build:ask-bundle": "node scripts/build-ask-bundle.mjs",
|
|
137
137
|
"build:demo-graph": "node scripts/build-demo-graph.mjs",
|
|
138
138
|
"build:demo-memory": "node scripts/build-demo-memory.mjs",
|
|
@@ -144,8 +144,8 @@
|
|
|
144
144
|
"extract:facts": "node bin/tmct.mjs extract"
|
|
145
145
|
},
|
|
146
146
|
"devDependencies": {
|
|
147
|
-
"esbuild": "
|
|
148
|
-
"ink-testing-library": "
|
|
147
|
+
"esbuild": "0.28.1",
|
|
148
|
+
"ink-testing-library": "4.0.0",
|
|
149
149
|
"playwright": "1.61.1",
|
|
150
150
|
"publint": "0.3.21",
|
|
151
151
|
"yaml": "2.9.0"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"comment": "tmct's starter lexicon
|
|
2
|
+
"comment": "tmct's starter lexicon, now covering BOTH the original software domain and the default 'human-world' persona's everyday people/places/objects/nature/time/body/mind vocabulary. Every word the ACE-OWL sub-fragment parser (src/domain/grammar/ace.mjs) is allowed to understand is DECLARED here — tmct never guesses a word's category. Nouns may declare a possessive property typing ('data' or 'object', pattern 7) or an irregular 'plural' (WordNet-sourced human nouns like 'man'/'child' need this — the morphology fold only handles regular -s/-ies/-es endings); adjectives MUST declare a type ('subclass' forms a class, 'data' asserts a boolean-ish datatype property, pattern 8); verbs may declare a preposition ('depend' + 'on' → dependsOn). The human-domain additions are flat and simple (breadth over depth — no gender/kinship taxonomy, no formal role hierarchy), matching corpus/tier2/generate.mjs's CORPUSES.human.lexicon sub-key, which --verify drift-checks against. Extend via loadLexicon(extra) with this same shape.",
|
|
3
3
|
"nouns": {
|
|
4
4
|
"module": {},
|
|
5
5
|
"class": {},
|
package/src/services/chat.mjs
CHANGED
|
@@ -10519,8 +10519,8 @@ async function runCommand(line, { config, source, graph, focus, memoryDir, trace
|
|
|
10519
10519
|
return mk(`narrate mode ${next ? "on" : "off"}.`, { narrateNext: next });
|
|
10520
10520
|
}
|
|
10521
10521
|
|
|
10522
|
-
// /memory [verbose] — what tmct remembers, as text (the
|
|
10523
|
-
//
|
|
10522
|
+
// /memory [verbose] — what tmct remembers, as text (the same renderer
|
|
10523
|
+
// serves the `tmct memory` CLI).
|
|
10524
10524
|
if (name === "memory") {
|
|
10525
10525
|
note(trace, "goal: inspect tmct's memory store (facts/utterances/sessions)");
|
|
10526
10526
|
if (!memoryDir) return mk("no memory store here — /memory works inside a repo session.", { miss: true });
|
package/src/services/init.mjs
CHANGED
|
@@ -85,7 +85,7 @@ export function renderTomlConfig(config = defaultConfig()) {
|
|
|
85
85
|
const base = `# tmct.toml — the mechanical code talker, project configuration.
|
|
86
86
|
# Written by \`tmct init\`. An ABSENT file means shipped defaults (this file
|
|
87
87
|
# just makes them explicit and editable). Documented in the repository-interface
|
|
88
|
-
# onboarding surface
|
|
88
|
+
# onboarding surface.
|
|
89
89
|
|
|
90
90
|
# Where the code-graph JSON artifact lives, relative to this file. The
|
|
91
91
|
# TMCT_GRAPH_FILE environment variable overrides it at runtime.
|
|
@@ -99,7 +99,7 @@ ${Array.isArray(c.graphFiles) && c.graphFiles.length ? `
|
|
|
99
99
|
graph_files = ${JSON.stringify(c.graphFiles)}
|
|
100
100
|
` : ""}
|
|
101
101
|
[corpus]
|
|
102
|
-
# Corpus-tiering policy
|
|
102
|
+
# Corpus-tiering policy. The $0-offline default is inviolable;
|
|
103
103
|
# higher tiers are ADDITIVE and never required to answer.
|
|
104
104
|
# "tier1" — committed slice only. Offline, $0. The default.
|
|
105
105
|
# "tier2" — also fetch growable corpora at seed time (network, once, cached).
|
|
@@ -10919,7 +10919,7 @@ ${codeblock}`, options);
|
|
|
10919
10919
|
var init_lexicon_core = __esm({
|
|
10920
10920
|
"src/domain/grammar/lexicon-core.json"() {
|
|
10921
10921
|
lexicon_core_default = {
|
|
10922
|
-
comment: "tmct's starter lexicon
|
|
10922
|
+
comment: "tmct's starter lexicon, now covering BOTH the original software domain and the default 'human-world' persona's everyday people/places/objects/nature/time/body/mind vocabulary. Every word the ACE-OWL sub-fragment parser (src/domain/grammar/ace.mjs) is allowed to understand is DECLARED here \u2014 tmct never guesses a word's category. Nouns may declare a possessive property typing ('data' or 'object', pattern 7) or an irregular 'plural' (WordNet-sourced human nouns like 'man'/'child' need this \u2014 the morphology fold only handles regular -s/-ies/-es endings); adjectives MUST declare a type ('subclass' forms a class, 'data' asserts a boolean-ish datatype property, pattern 8); verbs may declare a preposition ('depend' + 'on' \u2192 dependsOn). The human-domain additions are flat and simple (breadth over depth \u2014 no gender/kinship taxonomy, no formal role hierarchy), matching corpus/tier2/generate.mjs's CORPUSES.human.lexicon sub-key, which --verify drift-checks against. Extend via loadLexicon(extra) with this same shape.",
|
|
10923
10923
|
nouns: {
|
|
10924
10924
|
module: {},
|
|
10925
10925
|
class: {},
|
package/ROADMAP.md
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
# ROADMAP — tmct's current shape and what's next
|
|
2
|
-
|
|
3
|
-
Forward-looking at a **feature level**: what tmct is capable of right now, and what's planned next.
|
|
4
|
-
No session narrative, no dated diary, no "shipped/DONE" history — that's what git log and the
|
|
5
|
-
`archive/`/`BENCHMARK_*.md`/`CAPABILITIES_*.md` records are for. For **task-level** pickup (specific
|
|
6
|
-
open items, session-scoped), see `HANDOVER.md` instead — this file doesn't duplicate that list.
|
|
7
|
-
|
|
8
|
-
## What tmct is
|
|
9
|
-
|
|
10
|
-
A tolerant, ELIZA/PARRY-style chat surface over a codebase, obsessed with software the way PARRY was
|
|
11
|
-
obsessed with the mafia — deterministic, zero-cost, **no LLM anywhere in the product path**. Guides a
|
|
12
|
-
user toward precision queries rather than guessing; every answer is grounded, restates every genuine
|
|
13
|
-
reading it finds in full, or is an honest miss when nothing grounds it at all. Its visual surfaces —
|
|
14
|
-
the ledger explorer with its in-browser chat (`tmct viz`), the animated plan page
|
|
15
|
-
(`chat --prompt … --render blocks`), and the Pages homepage hero — are the same graph read out loud:
|
|
16
|
-
same engine, same provenance, no LLM.
|
|
17
|
-
|
|
18
|
-
## Ambition
|
|
19
|
-
|
|
20
|
-
Declared, forward-looking goals — not yet achieved, stated here so they steer future work instead of
|
|
21
|
-
getting silently traded away by inherited caution:
|
|
22
|
-
|
|
23
|
-
- **Reach for Llama-3-level natural language fluency.** by growing rich
|
|
24
|
-
template/surface-realization variety, so an answer shape has many valid phrasings instead of one
|
|
25
|
-
fixed slot-fill.
|
|
26
|
-
- **Resolve ambiguity breadth-first, always.** Every genuinely valid reading gets its own real answer
|
|
27
|
-
restated in full, never a bare "could mean X or Y — try rephrasing" punt, bounded only by existing
|
|
28
|
-
clipping/pagination limits. L
|
|
29
|
-
- **Paraphrase alongside the original, verified, never instead of it.** A surface-realization variant
|
|
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/domain/syllogise.mjs`)
|
|
32
|
-
against both the original and the paraphrase: they must entail the same conclusions, and neither may
|
|
33
|
-
contradict the other sentence-by-sentence..
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## What's next (feature-shaped — see `HANDOVER.md` for the current task-level list)
|
|
37
|
-
|
|
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.
|
|
54
|
-
- **`PLAN_AGENTS.md`** — the governing plan for tmct's broader multi-repo arc (marginalia, seonix,
|
|
55
|
-
a pluggable LLM rung for Claude Code/Bedrock/Copilot). Check its own sequencing table for current
|
|
56
|
-
phase status, not this file.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## Research horizon
|
|
60
|
-
|
|
61
|
-
*(2026-07-08 research pass — a direction recorded so it isn't re-discovered from scratch, not a
|
|
62
|
-
committed build plan. Nothing below is scheduled.)*
|
|
63
|
-
|
|
64
|
-
**Before the horizon — known-how, no research risk**, just scheduling: `PLAN_CODE.md` Tracks 2-4
|
|
65
|
-
(mutation search/repair, JS/HTML/CSS synthesis — APR and CEGIS are established techniques);
|
|
66
|
-
RETE/incremental forward-chaining (`PLAN_SYLLOGIST.md` §2 — Forgy 1982, a citable algorithm not yet
|
|
67
|
-
ported); contingent/conformant planning under initial-state uncertainty (Bonet & Geffner 2000,
|
|
68
|
-
Hoffmann & Brafman 2006, Petrick & Bacchus 2002 all have working algorithms, none yet applied here).
|
|
69
|
-
|
|
70
|
-
**After the horizon — genuinely unsolved in the field**, named as real research targets with
|
|
71
|
-
citations, not stop signs:
|
|
72
|
-
- **The frame problem / relevance realization** (open-world planning boundary). McCarthy & Hayes
|
|
73
|
-
1969 named it; Jaeger, Riedl, Djedovic, Vervaeke & Walsh (2024) argue it may not be algorithmically
|
|
74
|
-
solvable in the general case. Speculative angle: bounded (N+1) goal recognition — recognize
|
|
75
|
-
declared goal 1..N, or reject to an explicit "escalate" class, via parse-shape membership.
|
|
76
|
-
- **Bounded, incremental, trust-tiered, retraction-safe justification tracking** — `PLAN_SYLLOGIST.md`
|
|
77
|
-
§3. Doyle's JTMS (1979) and de Kleer's ATMS (1986) solve retraction; DRed/RDFox's Backward-Forward
|
|
78
|
-
solve incremental Datalog maintenance; nobody's published the combination with tmct's
|
|
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).
|
|
82
|
-
- **A shared ~2M-word cross-domain ontology** (general-English + technical/scientific/programming).
|
|
83
|
-
Merging collides senses of lexically-shared words (`class`, `cache`, `thread`, `field`, `state`)
|
|
84
|
-
across registers; knowledge-based WSD is real but weaker than supervised/neural WSD (Lesk 1986;
|
|
85
|
-
Raganato, Camacho-Collados & Navigli, EACL 2017). BabelNet proves cross-resource sense merging is
|
|
86
|
-
achievable at scale but solves the cross-*lingual*, not cross-*domain*, axis, and carries a
|
|
87
|
-
non-commercial licence. Speculative angle: mutual disambiguation from already-resolved neighbouring
|
|
88
|
-
terms in tmct's own closed graph (a bounded reading of Gale/Church/Yarowsky's "one sense per
|
|
89
|
-
discourse" regularity) — not published anywhere found for this application. Fresh live instance
|
|
90
|
-
(2026-07-11): `"tail"` (Unix process vs. animal body part) collides under `normFactTerm`'s
|
|
91
|
-
cross-corpus flattening, `src/adapters/memory/core.mjs:1109-1134`.
|
|
92
|
-
|
|
93
|
-
**Tier-4: learn-on-miss acquisition**. The strongest
|
|
94
|
-
miss signal tmct can emit: lexicon term recognized, query built cleanly, zero matches anywhere — the
|
|
95
|
-
question was well-formed and the knowledge is simply absent. Web search on the resolved term → clean
|
|
96
|
-
the fetched text into the ACE-OWL controlled grammar → store with source provenance → answer the
|
|
97
|
-
original question, citing what was just learned. Strictly opt-in, offline default inviolable.
|
|
98
|
-
Prerequisites: the provenance-trust policy must extend to `via:"learned:web"`, never silently
|
|
99
|
-
blending web-sourced facts with graph/operator facts.
|
|
100
|
-
|
|
101
|
-
## Design docs
|
|
102
|
-
|
|
103
|
-
Every substantial design lives in its own `PLAN_*.md` at the repo root; `archive/` holds the shipped
|
|
104
|
-
and closed ones. This file points to them, it doesn't repeat their content. Each plan states its own
|
|
105
|
-
status in its opening lines — read it there, because a status quoted here would rot.
|
|
106
|
-
|
|
107
|
-
| Plan | What it's for |
|
|
108
|
-
| --- | --- |
|
|
109
|
-
| [PLAN_ADVENTURE.md](PLAN_ADVENTURE.md) | a text adventure as an architectural stretch: imperative command grammar, NPC turn scheduler, room-look digest |
|
|
110
|
-
| [PLAN_AGENTS.md](PLAN_AGENTS.md) | the governing plan for the multi-repo arc (marginalia, seonix, a pluggable LLM rung), with its own phase sequencing |
|
|
111
|
-
| [PLAN_CHILD_CORPUS.md](PLAN_CHILD_CORPUS.md) | a wider default seed corpus, chosen by age of acquisition |
|
|
112
|
-
| [PLAN_CLASS_QUERY.md](PLAN_CLASS_QUERY.md) | "list/count all X of class Y", reconciled against what already shipped |
|
|
113
|
-
| [PLAN_CODE.md](PLAN_CODE.md) | program synthesis over tmct's closed DSLs, plus JS/HTML/CSS fragments and goal-directed program repair |
|
|
114
|
-
| [PLAN_CONSISTENCY_CHECK.md](PLAN_CONSISTENCY_CHECK.md) | tmct as a consistency service for an LLM tool loop |
|
|
115
|
-
| [PLAN_DIALOGUE_ACTS.md](PLAN_DIALOGUE_ACTS.md) | naming tmct's turn types to ISO 24617-2 dialogue acts, deterministically |
|
|
116
|
-
| [PLAN_EMBEDDINGS.md](PLAN_EMBEDDINGS.md) | the semantic-similarity axis, and the way back to it |
|
|
117
|
-
| [PLAN_GRAPH_SCAN.md](PLAN_GRAPH_SCAN.md) | seed and query cost at `init:xl`/`init:xxl` corpus scale |
|
|
118
|
-
| [PLAN_GUESS_NUMBER.md](PLAN_GUESS_NUMBER.md) | closed-loop planning over hidden state, via belief-interval bisection |
|
|
119
|
-
| [PLAN_MUD.md](PLAN_MUD.md) | persistent, shared tmct worlds over a `server:` memory backend |
|
|
120
|
-
| [PLAN_NLU_BENCHMARKS.md](PLAN_NLU_BENCHMARKS.md) | scoring tmct on the CLINC150 and HWU64 intent sets |
|
|
121
|
-
| [PLAN_OPEN_ITEMS.md](archive/PLAN_OPEN_ITEMS.md) | delivered — the 2.0.3-cycle build order, archived |
|
|
122
|
-
| [PLAN_PARAPHRASE_VERIFICATION.md](PLAN_PARAPHRASE_VERIFICATION.md) | checking a paraphrase against the graph before it prints |
|
|
123
|
-
| [PLAN_PURGE.md](archive/PLAN_PURGE.md) | delivered — promoted the load-bearing code, deleted the dead weight, archived |
|
|
124
|
-
| [PLAN_REPO_INDEX.md](PLAN_REPO_INDEX.md) | tmct grows its own code parsers, ported from seonix |
|
|
125
|
-
| [PLAN_SYLLOGIST.md](PLAN_SYLLOGIST.md) | the reasoning engine's incrementality and retraction horizon |
|
|
126
|
-
| [PLAN_SYLLOGIST_EL_DL.md](PLAN_SYLLOGIST_EL_DL.md) | beyond OWL 2 RL: an EL classifier, then a DL tableau prover |
|
|
127
|
-
|
|
128
|
-
`SKILL_*.md` docs specify the repeatable measurement and build cycles (the benchmarks, the capability
|
|
129
|
-
audit, the background strategy advisor, plain-prose writing). `HANDOVER.md` is the single
|
|
130
|
-
current-open-items list.
|