Modules designed to be built by AI
built for the AI era

Modules built by AI

Because a module is one self-contained file with a tiny declared surface - no imports, no build step, no hidden globals - it's the ideal thing for a language model to generate. Describe a feature, get a working module, plug it in.

The shape an LLM loves

Generating code for a sprawling plugin API is hard: an AI has to know dozens of imports, a build configuration and the hidden conventions of a codebase. Mutka removes all of that.

A module is a single ESM file that exports defineModule({ … }). It imports nothing, needs no compilation, and reaches the system only through one host object - the same shape every built-in feature uses. There is barely any surface for the model to get wrong.

Describe it, generate it, drop it in

Tell your AI assistant what you want - "add a word-count column for .txt files" - and it can produce a complete, working module in one file. No scaffolding, no wiring, no glue.

Save the result to ~/.mutka/modules/, enable it in the manager, and it runs. Because permissions are explicit, the generated module can't quietly overreach beyond what it declared: the sandbox holds AI-written code to the same rules as human-written code.

  • One file to generate - nothing to scaffold
  • Explicit permissions keep generated code honest
  • The same shape powers every built-in feature

A prompt becomes a module

export default defineModule({
  id: "ai.wordcount",
  permissions: ["fs:read"],
  setup(host) {
    host.columns.add("Words", readWords);
  }
});

"Write a Mutka module that adds a Word count column for .txt files."

Why generated modules just work

1

Nothing to wire up

One file, zero core imports. The model writes the whole module - there's no surrounding project to misconfigure.

2

Can't overreach

Permissions are explicit and gated, so even an over-eager generation is held to what it declared.

3

Identical to built-ins

The same shape powers copy-paste and navigation, so the model is targeting a proven, well-documented API.

Frequently asked

Why are Mutka modules well suited to AI generation?

A module is a single file with no imports, no build step and a tiny declared surface - the host object. That minimal, self-contained shape is exactly what language models generate most reliably.

Is it safe to run a module an AI wrote?

The same permission sandbox applies. A generated module only gets the capabilities it declared, you review them before installing, and untrusted modules run isolated in a Web Worker.

Do I need a build step to run a generated module?

No. Modules are plain ESM files. Save the generated file to ~/.mutka/modules/ and enable it in the manager - there's nothing to compile.

Sources & further reading

Why small, self-contained targets are what code-generating models do best.

  1. 1
    Building effective agentsAnthropic

    Anthropic's engineering guidance: simple, well-scoped interfaces are what LLM-driven coding handles most reliably.

  2. 2
    GitHub Copilot documentationGitHub Docs

    The mainstream AI pair-programmer, the kind of tool a one-file module format is designed to meet halfway.

  3. 3
    JavaScript modules (ESM)MDN Web Docs

    The standard format a generated Mutka module targets: no bundler, no transpiler, no lock-in.

Generate your first module

Open the writing guide, hand it to your AI, and plug the result in.