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
Natural language on the web without a backend
The same chat engine as the CLI, running in your browser. Every answer names its source.
chat.html (opens in a new tab)Competing planning agents
A spider and a fly each plan their own moves over the same graph, seeing only part of the board.
spider-fly.html (opens in a new tab)It plans, and shows the work
Tower of Hanoi solved move by move, with the plan on show as PDDL and OWL artifacts.
plan.html (opens in a new tab)Shall we play a game?
Ashcombe Hall renders exactly what its facts say is in the room, and nothing else.
adventure.html (opens in a new tab)The memory ledger
Every fact, where it came from, and how far to trust it.
ledger.html (opens in a new tab)Ask it about a codebase
Imports, calls and members around any symbol in a code graph.
code.html (opens in a new tab)Documents to Facts
Paste text. Each sentence becomes a checkable fact, or it is refused.
ingest.html (opens in a new tab)The sprite library
Every shape the site can draw, mapped to the ontology class it belongs to.
sprites.html (opens in a new tab)Grow the graph, then ask it
Research a term, teach a fact, or ingest text into one graph. Then ask a question scoped to the sources you trust.
research.html (opens in a new tab)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)
(opens in a new tab)
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)
(opens in a new tab)
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)
(opens in a new tab)
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)
(opens in a new tab)
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)
(opens in a new tab)
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)
(opens in a new tab)
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)
(opens in a new tab)
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.
open sprites.html → (opens in a new tab)
(opens in a new tab)
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)
(opens in a new tab)
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.
Seonix
seonix.polycode.co.ukOne of the two sibling projects tmct's engine was seeded out of. It is upgrading onto the tmct library now.
Marginalia
marginalia.polycode.co.ukThe other sibling project tmct was seeded out of. It will build its chat and graph engine on tmct.
Bedrock Meter
gitlab.com/polycode-projects/bedrock-meterAn AWS Bedrock cost-metering proxy for marginalia. Planning is in progress to adopt tmct as its no-LLM fallback path.