{"slug": "auto-fix-broken-links-in-your-docs-with-jamdesk", "title": "Auto-Fix Broken Links in Your Docs With Jamdesk", "summary": "Jamdesk added an Auto-fix mode to its AI Fixes feature that commits repairs for broken anchor links, missing page titles and missing page descriptions to a docs branch after each build, with every run reversible via an Undo button in Build History. The mode is enabled in Settings or through the `jamdesk ai-fix auto` command added in CLI 1.1.229, and Jamdesk never auto-fixes the build its own commit started, so the process cannot loop. Each run produces one commit authored by autofix@jamdesk.com with the message `docs: auto-fix N issues (via Jamdesk)`, and undone fixes are added to an ignore list; `jamdesk fix --json` lets Claude Code or another agent apply the link and description fixes instead.", "body_md": "# Auto-Fix Broken Links in Your Docs With Jamdesk\n\nJamdesk can now fix your docs build warnings for you. Set **AI Fixes** to **Auto-fix**, and after each build Jamdesk commits fixes for broken anchor links, missing page titles and missing page descriptions to your docs branch. Every run has an **Undo** button, and nothing changes until you switch it on.\n\n## The Short Version\n\n- Auto-fix commits [three kinds of fix](https://www.jamdesk.com/docs/builds/fix-with-ai?utm_source=blog&utm_medium=article&utm_campaign=fix-broken-links-documentation-ai#what-it-fixes) after each build: broken anchor links, missing titles and missing descriptions.\n- You turn it on in **Settings** or with`jamdesk ai-fix auto` , added in CLI 1.1.229.\n- Each run can be undone from Build History, and an undone fix goes on your ignore list so it doesn’t come back.\n- Jamdesk never auto-fixes the build its own commit started, so it can’t loop.\n- If you’d rather have Claude Code or another agent apply them, [`jamdesk fix --json`](https://www.jamdesk.com/docs/cli/fix-broken-links?utm_source=blog&utm_medium=article&utm_campaign=fix-broken-links-documentation-ai#use-with-an-ai-agent) gives it the link and description fixes.\n\nYou rename a heading, push, and the next build warns you about three anchor links (links to a heading on another page) that now point nowhere. Until now, you fixed them by opening the **Fix with AI** modal, reading the list and clicking **Apply**. Jamdesk can now make that commit on its own, and I’ll show what it changes and how to take a run back.\n\n## How Do You Turn On Auto-Fix?\n\nOpen your project, click **Settings** in the sidebar, and pick a mode on the **AI Fixes** card under **General**. Auto-fix starts with the next build after you save.\n\n| Mode | What happens | \n|---|---|\n| **Off** | Jamdesk doesn't scan builds. The Fix with AI button is hidden. | \n| **Review first** | Jamdesk suggests fixes. You review and apply them in the modal. This is the default. | \n| **Auto-fix** | Jamdesk commits fixes after each build. You can undo each run. | \n\nAuto-fix applies the same fixes as the modal, AI-written page descriptions included, and skips anything you’ve ignored. Each description also becomes the line next to its page in your `llms.txt`, which is what an agent reads to pick a page. I wrote more about that in [Designing Docs for AI Agents](https://www.jamdesk.com/blog/designing-docs-for-ai-agents?utm_source=blog&utm_medium=article&utm_campaign=fix-broken-links-documentation-ai).\n\nFrom the terminal, CLI 1.1.229 adds `jamdesk ai-fix`. Run it with no argument to see the current setting, or pass `off`, `review` or `auto`:\n\n```\nnpm install -g jamdesk\njamdesk ai-fix auto\n✓ AI Fixes set to Auto-fix\nJamdesk commits fixes to main after the next build. Pull before you push. Undo runs from the dashboard.\n```\n\nRun `jamdesk login` first. The command uses the `projectId` in your `docs.json`, or the project you pass with `--project <id>`. The [CLI reference](https://www.jamdesk.com/docs/cli/overview?utm_source=blog&utm_medium=article&utm_campaign=fix-broken-links-documentation-ai) lists every option.\n\n## What Does an Auto-Fix Change, and How Do You Undo It?\n\nEach run is one commit to your build branch, authored by `autofix@jamdesk.com` with the message `docs: auto-fix N issues (via Jamdesk)`. In the run below, Jamdesk fixed two broken anchors in one commit. The build gets an **Auto-fixed** badge in Build History, and its **Auto-fix** section lists the changes with a link to the commit on GitHub.\n\nBecause Jamdesk writes to your branch, pull before you push, unless you enjoy merge conflicts with a robot. Each auto-fix commit also runs whatever CI you have on that branch. If your docs [don’t live on GitHub](https://www.jamdesk.com/docs/setup/without-github?utm_source=blog&utm_medium=article&utm_campaign=fix-broken-links-documentation-ai), Jamdesk saves the fixes to your docs directly.\n\nTo take a run back, click **Undo** on it, then **Undo auto-fix**. Jamdesk commits the previous version of each file with the message `docs: undo Jamdesk auto-fix (via Jamdesk)`. If you edited a file after the auto-fix, Jamdesk leaves that file alone and lists it for you to undo by hand.\n\nUndone fixes go on your ignore list, so the next build doesn’t apply them again. You can restore them under **Ignored** in the Fix with AI modal.\n\nThe obvious worry with a bot that commits to your repo is a loop of commits fixing commits fixing commits. The auto-fix commit and an undo each start a new build, and Jamdesk never auto-fixes those. If one still has fixable warnings, it’s marked **Needs review** and waits for you. Each fix is also applied only once, so if you revert one by hand, your revert sticks.\n\nAuto-fix pauses when a [branch protection rule](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) blocks its commit, such as one that requires a reviewed pull request, or when the Jamdesk GitHub App loses write access. The Settings card shows **Paused** until you fix the cause and save **Auto-fix** again.\n\n## Can an AI Agent Apply the Fixes Instead?\n\nYes. Leave the mode on **Review first** and let Claude Code or another agent make the edits in your own checkout. The **Copy for your AI agent** button in the Fix with AI modal copies a plain-text prompt with each fix, its file and line, and the issues to fix by hand.\n\nFrom the terminal, `jamdesk fix --json` prints a matching plan from your local files as one JSON document, covering links and descriptions but not titles. It writes no files and asks no questions, so an agent can run it on its own:\n\n```\n{\n  \"version\": 1,\n  \"fixes\": [\n    {\n      \"type\": \"broken_link\",\n      \"file\": \"fr/ai/overview.mdx\",\n      \"line\": 9,\n      \"oldText\": \"/fr/ai/selectors#ai-strategies\",\n      \"newText\": \"/fr/ai/selectors#stratégies-ia\",\n      \"resolvedBy\": \"deterministic\"\n    }\n  ],\n  \"unfixable\": [],\n  \"notes\": []\n}\n```\n\nA prompt that works well: “Run `jamdesk fix --json`, apply the link fixes, and show me the descriptions before you add them.” The JSON format is in [Use with an AI agent](https://www.jamdesk.com/docs/cli/fix-broken-links?utm_source=blog&utm_medium=article&utm_campaign=fix-broken-links-documentation-ai#use-with-an-ai-agent).\n\n## Should You Turn On Auto-Fix?\n\nTurn it on if you push docs straight to a branch and would rather review a commit than a modal. Stay on **Review first** if every change goes through a reviewed pull request, since Auto-fix pauses when a protection rule blocks its commit anyway, or if each commit starts slow CI. The same goes if you want to read every AI-written description before it ships.\n\nAuto-fix doesn’t fix everything a build reports. It skips any warning without one clear fix, such as a link to a page that doesn’t exist, and leaves it under **Can’t be fixed automatically** for you. A project also gets [1,000 AI requests a day](https://www.jamdesk.com/docs/builds/fix-with-ai?utm_source=blog&utm_medium=article&utm_campaign=fix-broken-links-documentation-ai#what-it-fixes), and a run that hits the limit skips some fixes and says so.\n\nTo try it, run `jamdesk ai-fix auto` in your docs repo and push a change. The [Fix with AI docs](https://www.jamdesk.com/docs/builds/fix-with-ai?utm_source=blog&utm_medium=article&utm_campaign=fix-broken-links-documentation-ai#choose-what-happens) cover every rule.\n\n*Checked against Jamdesk CLI 1.1.229 and the Fix with AI docs on November 1, 2026. Jamdesk wrote this post about its own feature, so if anything here is wrong, email contact@jamdesk.com and we’ll fix it.*", "url": "https://wpnews.pro/news/auto-fix-broken-links-in-your-docs-with-jamdesk", "canonical_source": "https://www.jamdesk.com/blog/fix-broken-links-documentation-ai", "published_at": "2026-11-01 22:12:42+00:00", "updated_at": "2026-11-01 22:19:24.108973+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["Jamdesk", "Claude Code", "GitHub", "autofix@jamdesk.com"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/auto-fix-broken-links-in-your-docs-with-jamdesk", "markdown": "https://wpnews.pro/news/auto-fix-broken-links-in-your-docs-with-jamdesk.md", "text": "https://wpnews.pro/news/auto-fix-broken-links-in-your-docs-with-jamdesk.txt", "jsonld": "https://wpnews.pro/news/auto-fix-broken-links-in-your-docs-with-jamdesk.jsonld"}}