OpenWiki --init ignores Spanish instruction and generates docs in English

Hi everyone,

I’m using OpenWiki to generate documentation for a large set of Git repositories, and I’m having trouble getting the initial documentation generated in Spanish.

My setup:

  • OpenWiki version: v0.0.4
  • Provider: OpenRouter
  • Model: z-ai/glm-5.2
  • Command used:

openwiki --init “Genera la documentación OpenWiki de este repositorio en español técnico claro. Todo el contenido Markdown visible debe quedar en español: títulos, párrafos, tablas, listas y descripciones. También usa nombres de archivos Markdown en español y actualiza enlaces internos. No traduzcas código, comandos, rutas, endpoints, clases, paquetes, variables ni nombres técnicos.”

The above means:

openwiki --init “Generate the OpenWiki documentation for this repository in clear technical Spanish. All visible Markdown content must be in Spanish: titles, paragraphs, tables, lists, and descriptions. Also use Spanish Markdown file names and update internal links. Do not translate code, commands, paths, endpoints, classes, packages, variables, or technical names.”

The issue is that even though the prompt explicitly asks for Spanish documentation, OpenWiki still generates most of the documentation in English. This includes both the content and file names, for example:

  • quickstart.md
  • architecture.md
  • data-layer.md
  • workflows.md

As a workaround, we had to run openwiki --init first and then perform a separate translation/normalization step afterward: translating the Markdown content, renaming files to Spanish, and fixing internal links.

Has anyone else experienced this with OpenWiki, OpenRouter, or this model? Is there a recommended way to force the documentation language during --init, or is this currently model/provider-dependent?

Thanks!

Hi @aleoterob

I dug into the OpenWiki source to trace what happens with that instruction. A few findings:

  1. Your Spanish instruction is not dropped. The text after --init is appended to the end of the generated prompt as Additional user instruction (src/agent/prompt.ts, appendUserMessage). The problem is that it competes with a large hard-coded English system prompt plus all the English tool results from reading your repo. That is classic language drift in long agentic runs, and how well a model resists it is model-dependent - glm-5.2 reading an English codebase is exactly where it shows up.

  2. The reliable fix needs an upgrade. Since v0.1.x OpenWiki supports a repository wiki brief in openwiki/INSTRUCTIONS.md, which is read on every init and update run and injected into the prompt as a Wiki brief section. I checked tag 0.0.4 and this mechanism does not exist there, so on your version the CLI text was the only channel. Upgrade to 0.1.2, then put a short imperative rule at the top of openwiki/INSTRUCTIONS.md, e.g.: Escribe TODO el contenido visible de la documentación en español técnico (es-ES): títulos, párrafos, tablas, listas y descripciones. No traduzcas los nombres de archivo ni las rutas. Unlike the CLI argument, the brief also persists across --update runs and the scheduled GitHub Actions workflow, which never sees your CLI text at all.

  3. One warning about your renaming workaround: the English file names are by design. The prompt hard-codes /openwiki/quickstart.md as the required entrypoint, update runs read the Backlog section from that exact path, and metadata lives in openwiki/.last-update.json. If you renamed quickstart.md, the next --update will likely regenerate it in English. Better to keep canonical file names and localize only the content.

  4. Provider vs model: OpenWiki does nothing language-specific, so this is mostly the model. Note that OpenRouter can route the same model slug to different upstream providers or quantizations between runs, which affects instruction adherence - pinning provider routing in OpenRouter settings helps consistency. If you set a LangSmith key during onboarding, the runs are traced to a project named openwiki, so you can confirm the instruction was in the final prompt and see where the output flipped to English.

There is no first-class language setting today, so a feature request on the openwiki repo for a language option in the brief or onboarding would be reasonable - your thread is a good motivating example imo.

Hi @pawel-twardziak

Thank you very much for the guidance. Updating OpenWiki solved the issue for us.

Our successful flow was:

  1. We updated OpenWiki to 0.2.0.
  2. We configured the provider as OpenRouter.
  3. We used the model z-ai/glm-5.2.
  4. We ran:
openwiki code --init "Genera la documentación OpenWiki de este repositorio en español técnico claro. Todo el contenido Markdown visible debe quedar en español: títulos, párrafos, tablas, listas y descripciones. Mantén los nombres de archivo canónicos que use OpenWiki, como quickstart.md, architecture.md, workflows.md, operations.md y testing.md, pero escribe su contenido en español. Actualiza enlaces internos para que funcionen. No traduzcas código, comandos, rutas, endpoints, clases, paquetes, variables, claves de configuración, nombres de producto ni identificadores técnicos. No resumas ni elimines información técnica relevante. Conserva tablas, listas, encabezados y estructura Markdown."
  1. OpenWiki generated openwiki/INSTRUCTIONS.md.
  2. After a couple of confirmations, we edited that file and reinforced the instruction with:
Escribe TODO el contenido visible de la documentacion en espanol tecnico claro: titulos, parrafos, tablas, listas y descripciones. No traduzcas nombres de archivo, rutas, comandos, endpoints, clases, paquetes, variables, claves de configuracion, nombres de producto ni identificadores tecnicos. No resumas ni elimines informacion tecnica relevante. Conserva tablas, listas, encabezados y estructura Markdown.
  1. Then we continued the generation, and the documentation was generated correctly in Spanish.

So the key differences compared with our previous attempts were the update to OpenWiki 0.2.0, using openwiki code --init, and reinforcing the language requirement through openwiki/INSTRUCTIONS.md.

Thanks again for pointing us in the right direction!