Polycode projects · pure JS · no LLM · offline · $0

tmct  

Ask tmct a question and you get an answer you can check. Every fact it gives you names where it came from. When it doesn't know, it says so. Nothing calls a model, and it costs nothing to run.

$ npm install -g @polycode-projects/the-mechanical-code-talker

nine demonstrations

The real engine, in the page

This is the same chat engine as the CLI, running entirely in the browser: teach it something, ask it something, or run a scripted demo, and every answer names its source. The shot here is a real exchange with it; open the full page to try your own.

open chat.html → (opens in a new tab)
tmct chat page: the question 'what is a dog' answered with three facts, each naming its corpus source (opens in a new tab)
Plate I · chat.html

Multiple competing planning agents

A spider waits in its web. A fly drifts onto the board and loses strength the longer it stays. Neither is played by you. Each one plans its own next move over the same graph, seeing only part of the board. You can only tell one of them something by typing to it. The spider's live plan is drawn as a thread, because a plan here already is one.

open spider-fly.html → (opens in a new tab)
tmct spider and fly page: a spider and a fly on a partly-hidden grid, with each agent's live plan status shown alongside (opens in a new tab)
Plate II · spider-fly.html

It plans, and shows the work

Teach it a game's rules, then ask it to solve one. The planner replays every move it made, one by one, and a side panel shows the plan as a PDDL artifact and as OWL facts, so you can read exactly what it searched over. Change the disk count and it solves again, live.

open plan.html → (opens in a new tab)
tmct plan page: a Tower of Hanoi board mid-solve, with the move list and the PDDL plan artifact alongside (opens in a new tab)
Plate III · plan.html

A room drawn from the text

Ashcombe Hall is a small manor built from its own facts. The room view shows exactly what the text says is there, and nothing else. An auto-player explores the house, infers its own goal, and plays toward it with the same planner the other pages use.

open adventure.html → (opens in a new tab)
tmct adventure page: a room of Ashcombe Hall drawn from its facts, with the map and satchel alongside (opens in a new tab)
Plate IV · adventure.html

The memory ledger

Browse the taught graph. Every fact shows its provenance and its trust tier, and every term inside a fact is a link, so you can drill from any answer down to what it rests on. A chat dock lets you teach and ask against the same store.

open ledger.html → (opens in a new tab)
tmct memory ledger page: fact counts, a predicate breakdown, and the taught facts for the term 'peg' (opens in a new tab)
Plate V · ledger.html

Ask it about a codebase

Point it at a code graph and ask about the code: imports, calls and members around any symbol, with suggested next questions. It also holds a thread. Ask about something, then ask "what calls it?", and tmct still knows what "it" means.

open code.html → (opens in a new tab)
tmct code explorer page: imports, calls and members around a symbol of the demo code graph, with a chat dock alongside (opens in a new tab)
Plate VI · code.html
Live demo: the real engine, running right now in your browser
tmct>
wink-nlp: loading…
This box asks a real question of a small fixture repo's code graph (examples/mini-webapp) using the exact same query engine the CLI ships. It runs live, client-side. Nothing is precomputed on a server (GitLab Pages doesn't have one). The same question against a real repo, from a terminal:

      

It keeps only what it can ground

Bring your own text. Paste or drop it and watch each sentence ground into a fact. A sentence the engine cannot ground gets a refusal rather than a guess. Download the result as canonical JSONL.

open ingest.html → (opens in a new tab)
tmct ingest page: pasted text grounding sentence by sentence into facts (opens in a new tab)
Plate VII · ingest.html

The sprite library

Every shape the sprite library can draw, mapped to the real ontology class it belongs to. A term without a sprite of its own borrows its nearest ancestor's, so a poodle draws as a dog.

poodledoganimal doganimal spiderarachnidanimal flyinsectanimal
open sprites.html → (opens in a new tab)
tmct sprite library page: sprite shapes mapped to the ontology classes they belong to (opens in a new tab)
Plate VIII · sprites.html

Grow the graph, then ask it

One memory graph, grown three ways: research a term over Simple English Wikipedia, teach a plain fact, or ingest a paragraph. Watch what it just learned and which terms it connects. Then ask a question scoped to only the sources you check: taught, ingested, researched, or the seed corpus. Uncheck a source and its facts stop answering.

open research.html → (opens in a new tab)
tmct research page: one graph grown by research, teaching and ingest, with a source-scoped ask (opens in a new tab)
Plate IX · research.html

Run the chat yourself

npm install -g @polycode-projects/the-mechanical-code-talker

Point it at a repo's graph and ask about the code. This runs against examples/mini-webapp, which ships in the repo:

tmct> what talks to store.mjs?
src/handlers/tasks.mjs and src/handlers/users.mjs.
tmct> which modules do not import logger?
…
tmct> /exit

Or start with nothing. tmct bootstraps an empty memory and remembers what you tell it. Use tmct chat --repo /path/to/repo to point it at your own.

tmct init         # scaffold .tmct/, tmct.toml, seed the default persona + provenance
tmct viz          # write the ledger page — see the link below
tmct syllogise    # offline: pre-derive entailed facts (a maintenance job)

A chatbot in the ELIZA/PARRY lineage, obsessed with software the way PARRY was obsessed with the mafia. Interpretation is mechanical and memory is an OWL-labelled graph on disk. It starts stocked with an everyday vocabulary. Point it at a codebase and it reasons over that too.

Use it as a library

The chat surface is a function. Feed it lines, read the answers, and the same grounding and provenance rules apply.

import { Readable } from "node:stream";
import { runChat } from "@polycode-projects/the-mechanical-code-talker";

await runChat({
  repoPath: "./my-repo",
  input: Readable.from([
    "ahab is the father of john\n",
    "who is the father of john\n",
    "/exit\n",
  ]),
  output: process.stdout,
});

Full feature list, the detailed-answer pipeline, and the rest of the library API in the README.

the project family

Polycode projects

tmct grew out of two sibling Polycode projects, and the wider family is taking up the tmct library in return.