# Fix the gaps

A fix is one change that should move a gap: a page that compares the team with a rival, schema markup, a robots.txt that lets AI crawlers in, an llms.txt, a meta fix, or getting mentioned on a page the engines cite.

1. `rank_fixes {"siteId": "..."}` works the fixes out from the latest gap report and audit and ranks them. It costs no credits, and a fix already there keeps its status and draft. Measure first, or there is nothing to rank.
2. `list_fixes {"siteId": "..."}` reads them, most important first. Each has a `why` and its evidence: `measured` comes from answers or the audit, `weak` is a good practice with thin proof (an llms.txt). Say which is which.
3. `draft_fix {"fixId": "..."}` writes the top one copy-ready. A comparison page is a model call paid in credits (about 20 to 50 each time): it is refused with needs_credits unless you pass `useCredits: true`, so ask first and pass it only after a yes. The other kinds are free. The plan allows a number of drafts a month; past it the call refuses with plan_limit_fixes.
4. Show the draft to the person. If they want it on the site, ask: `ship_fix {"fixId": "..."}` (CLI: `ignaru fix <id> ship --target github`). Optional `path` (where the file goes in the repo, like public/robots.txt) and `repo` (owner/name, one an Admin already connected). It queues the exact change and returns `request.approveUrl`. Give the person that link and say it is waiting for an Admin. Asking again returns the same request.
5. Nothing has shipped yet. An Admin opens the link, approves it in the Ignaru app, and the pull request opens on their repo; Ignaru never merges it. You cannot approve or ship, and a key that tries gets a 403. To let a developer review first, `ignaru fix <id> diff` prints the exact change against the file in the repo as a patch.
6. `ship_fix` refuses with `not_drafted` until the fix is drafted, `copy_only` for a kind or plan that is copied by hand (schema, meta, citations, listings) and `site_actions_off` while shipping is not switched on for the team. Say so and hand over the draft to paste.
7. When they say the pull request is merged, `set_fix_status {"fixId": "...", "status": "done"}`. Use `dismissed` for one that is not for this team, and `open` to bring it back. This records the state only.
8. Once it is set to done, Ignaru keeps a baseline and asks the same questions again on day 3, 7 and 14. `get_fix_proof {"fixId": "..."}` shows, per engine, the questions that moved to named minus how far a few control questions drifted by themselves, with the answer's words before and after. It is free and measures nothing. If `caveats` says few questions, call a small move a hint, not a result. `get_before_after {"siteId": "..."}` shows every question day 0 against the latest and the fixes marked in between.
9. Each gap in `get_gaps` carries `repeat` (seen in N of the last M runs, and steady, mixed or once): say so, and treat a once gap as a hint.
10. Measure again a week later and read the gaps to see whether the share moved.
