Skip to main content

One post tagged with "docs"

View All Tags

Turn Your Codebase Into Clear How‑Tos (Fast)

· 4 min read
Topias
Wallu's Developer

Many teams don’t have a polished FAQ. Many have “documentation by archaeology” scattered across frontend components, API javadocs, READMEs, and comments in code/config files. However, there are some good news! You can use agent-style coding tools (Claude Code, Cursor agents, Copilot, Gemini CLI - many with free plans) to sweep your repo and auto-write actionable, searchable “how‑to” docs in minutes.

The simple workflow

  1. Pick a tool you already have access to (Claude Code, Cursor agent, Copilot Chat, or Gemini CLI).
  2. Point it at a concrete scope first (for example your frontend/src/ or resources/config/ directory, or your api/ code).
  3. Ask it to produce a single plain‑text file named wallu_docs.txt containing many “how‑to” entries. Each entry must be exactly one paragraph, with no internal line breaks, and entries must be separated by two newlines. (This is the optimal format for the search and AI).
  4. Ask it to repeat: “scan again, find missing tasks, extend wallu_docs.txt without duplicates.” Do this a couple of times until coverage feels complete.

Here’s a prompt you can paste (adapt wording to your stack and to how your users use your product and what they commonly ask):

Scan the following directory and related files I open for you. Extract as many as possible practical tasks a user would want to do with our product.
Write a `wallu_docs.txt` file with many concise how‑to entries.
Rules: each how‑to is exactly one paragraph with full sentences and clear explanation; no internal newlines; separate entries with two newlines; prefer concrete steps and filenames over vague advice; cover UI flows (e.g., exact page names, titles and buttons to click) and API methods; make sure it's all they need to complete the step.

Then ask:

After writing, scan again and add missing topics without duplicating.

until it seems like it has included everything useful.

For example, with Wallu it would produce a file like this:

To prevent the bot from answering certain messages, go to the "Bot Settings" page and look for the "When not to answer" section. Here you can configure the bot to avoid off-topic questions, ignore messages from staff members unless mentioned, and add specific roles or users to an ignore list. This helps to ensure that the bot only responds in appropriate situations.


To set the primary language for your FAQs and documents, go to the "Bot Settings" page. You can choose between "Only in English" and "In other/multiple languages". Selecting the multilingual option is important if your content is not in English or if your users are likely to ask questions in other languages, as it ensures the bot can properly understand and respond.


To configure the bot's behavior in ticket channels, go to the "Bot Settings" page and scroll down to the "Ticket System Mode" section. Here you can set the bot to be silent when a staff member sends a message, include a summary when escalating tickets, and integrate with other ticket bots to automatically analyze and respond to new tickets.


To manage who has access to the bot's control panel, go to the "Manage Access" page. Here you can set the required permissions for accessing the panel, such as "Administrators" or "Members with 'Manage Server'". This ensures that only authorized users can make changes to your bot's configuration.

...

When this is especially useful

  • Your API is “documented in code,” types, or comments, not in a handbook.
    • Or your API docs are very technical and describe components but lack example usage for people to get started
  • Frontend props and flows live across many components and are hard to summarize.
    • You basically just convert your frontend code into a user guide.
  • Existing docs imported into Wallu didn’t yield good answers - tasks weren’t explicit enough.
    • You have a lot of code, API docs, or config files you wanted to import but it couldn't use them very well.

Make it iterative

Run 2–4 passes: ask the agent to “re‑scan for missing topics,” then “expand areas with too few steps,” then “merge duplicates and keep the clearest version.” You can always re‑run after a release to update flows.

Ship it

Save/export the file as plain text (wallu_docs.txt) and upload it to Wallu as a knowledge source. The double‑newline boundaries help both search and AI understand each task cleanly, so the bot answers with clear, actionable steps instead of vague summaries.