A Small LLM Wiki for Business Central AL Context

Note: This blog is a personal notebook. I write it to record what I work on, for my own reference, not to publish it on social media or to promote myself. If a post is still useful to you, I am glad, but that is not why it exists.

This post was published on June 24, 2026. Software versions, product features, links, and tool availability may have changed since then. Always check official documentation for the latest information. Some screenshots show small details. Zoom in on the page to see them clearly.

Your AL repository holds code, but not the reason for the code. Why a field must have a value before posting lives in pull requests, chat threads, and one developer’s memory. An AI agent cannot read that part.

A small, Git-based wiki fills the gap. Andrej Karpathy wrote a short note about an LLM-maintained personal knowledge base, and I adapted the idea for one AL project.

Problem

A developer asks: “Why do we validate this field before posting?” The AL file shows the code, not the reason. An agent answers from the code alone and can guess wrong.

A better prompt helps once. The next developer and the next agent session start the same search again.

Why this matters

A small wiki turns a repeated search into one reviewed page. It works like a shift handover book: the next shift reads what the last shift learned.

  • Development. The agent reads the accepted pattern before it writes code.
  • Review. A reviewer checks against a documented rule, not against memory.
  • Onboarding. A new team member reads the map on day one.
  • Support. A past incident shows the symptom, the fix, and the proof.

Accuracy matters more than speed. A wrong page about posting or permissions points a developer to the wrong fix, so every page links to the AL source or pull request it describes.

Architecture

Keep the wiki in the same Git repository as the extension, in three parts.

Part Purpose Example
Source The evidence a page must point back to AL files, app.json, pull requests, work items
Wiki page A reviewed Markdown page that states one fact One posting rule, with its source link
Agent rule The instruction that tells the agent to read and update the wiki One line in AGENTS.md or .github/copilot-instructions.md

Start with one folder and one page:

docs/wiki/
  index.md
  purchase-posting-validation.md

Each page needs an owner, a last-checked date, a source link, and the fact itself. It states the rule and links to the AL object that enforces it, without repeating the code.

The agent drafts a page and opens a pull request. A person reviews and merges it. AL-Go for GitHub still builds and tests the AL code. The wiki adds the context that a build log cannot show.

Demo steps

Try this in a sandbox AL repository in about fifteen minutes.

  1. Create docs/wiki/index.md and one page for a posting rule you already know.
  2. Add one line to AGENTS.md: “Read docs/wiki/index.md before an architecture question. Link every new fact to its AL source.”
  3. Ask the agent: “Read the current branch diff. Update only the matching wiki page. Add a link to the changed AL file.”
  4. Review the pull request: does the source link support the claim?
  5. Merge, and note the date on the page.

What is intentionally simple

  • One folder of Markdown files in Git. No wiki platform, no vector database.
  • One or two pages for the rules you check most often, not one per AL object.
  • A source link and a date as the only quality check.

Risks and limits

A wiki page makes an old answer easy to find, not correct. Treat every page as a claim with a source.

Never put a customer name, a credential, or production data in a page. Git history keeps a mistake long after you delete the file.

Do not let the agent approve or merge its own page. A generated page needs the same review as generated AL code.

Next iteration

Add these only after the first pages hold up:

  1. One more page, for the next rule a developer asks about twice.
  2. A reminder in your pull request template: “Does this change need a wiki update?”
  3. A scheduled check for pages with no source link or an old date.

Closing note

Your AL code stays the evidence. A small wiki holds the reason behind it. Start with one page, keep the review human, and stop adding pages the day it stops being worth the time.

← Back to AI