Skip to content
Latchkey home
Documentation menu

AI Insight

How AI Insight turns nightly deterministic analysis into quantified findings, each carrying exactly one action Latchkey can take for you.

In short

  1. Self-heal fixes it. Insight decides it. Deterministic detectors run nightly over data Latchkey already stores; there is no button to press.
  2. Every finding is quantified and carries exactly one action Latchkey can take for you, so you approve rather than configure.
  3. Sections appear only when non-empty: Cost, Security, Reliability, and Get more from Latchkey.
  4. Applying opens a pull request on a latchkey/insight-* branch; owners and admins apply, one finding at a time or Apply all.
  5. The Self-heal outcome report shows what was already fixed autonomously; nothing in it needs your approval.
app.latchkey.dev / acme / insights

The AI Insight page, Cost insights. A cost card for acme/api reads Downsize 6 over-provisioned runner pools that finish in under a minute, with Latchkey analysis: these jobs peak at 1.2 GB and 1 vCPU on latchkey-large, and latchkey-small runs them in the same time. The figure is $1,549 /mo saved. Preview opens the exact change for .github/workflows/lint.yml: runs-on: latchkey-large is removed and runs-on: latchkey-small is added, and 5 more workflows change the same way. Apply shows Applying, then the card's action reads PR #419 opened.

FIG. 2.5-AApplying a cost finding: Preview shows the exact change first, Apply opens it as a pull request, and the card ends on the PR it opened. Your branches do not change until you merge that PR, but its branch runs your CI like any branch.

The AI Insight page is built on one division of labor: self-heal fixes it, Insight decides it. Failures that can be repaired safely are fixed on the runner without you; everything that deserves human judgment, spend tradeoffs, security hygiene, reliability patterns, arrives here as a finding with a number on it and one action Latchkey can take for you. You approve; Latchkey does the work.

How findings are made#

01
Nightly scan
Deterministic detectors run over the run history, cost data, and workflow configs Latchkey already stores
02
Quantified finding
Only findings with a real number attached (dollars, hours, or a counted risk) surface
03
Latchkey analysis
A thin AI layer writes the one-paragraph explanation on each card
04
You approve
Each finding carries exactly one action; Preview shows the exact change first
05
PR opened
Latchkey opens the pull request; you review and merge on GitHub

There is no button to press and no agent to babysit: the page's meta line reads "Refreshed nightly", and findings appear when the detectors find something worth your attention. The explanation paragraph on each card is prefixed "Latchkey analysis"; it exists to tell you why this happened and why it matters, not to pad the page. When no finding is open, the page reads "Nothing needs your yes. Latchkey checks nightly."

The hero: fixed versus waiting#

Self-heal · last 30 days
  • Failures repaired on the runner, badged Autonomous
  • Counted over the same 30 days as the self-heal outcome report
  • "Nothing here needs approval": it already happened
Insight · ready to apply
  • How many findings Apply all would open as pull requests (or their dollars a month); the chip counts every open finding
  • Each finding is one decision with one action
  • Apply all N opens the PRs one by one (owners and admins)

The Apply all N button in the Insight · ready to apply cell first lists every open finding with an apply action under Open N pull requests, with Cancel; a finding whose change you read before approving stays out of Apply all, and you approve it from its card. Your yes opens the pull requests one at a time with a running "Applying X of Y" progress state, then "All PRs opened" when it finishes. Like individual applies, it is available to owners and admins.

The Self-heal outcome report#

Below the hero, one card reports what self-heal did on its own:

  • Healed on the runner: failures self-heal fixed on the runner in the last 30 days, on jobs Latchkey served, with no human in the loop.
  • Re-runs avoided and Not spent · list rate: the minutes of re-runs those heals avoided, and what those minutes would have cost at list rate. Bars under the figures count the heals by category.
  • Left for you: failures self-heal could not fix across the patterns Latchkey flagged, linking to the reliability insights below when a finding for them is listed there.

The four sections#

Findings are grouped into four sections, rendered in this order and only when non-empty:

Cost insightscost
Money on the table. Each finding is one action, such as downsizing an oversized runner.
Security insightssecurity
Org-wide CI/CD supply-chain hygiene, not app-code scanning. Example: "N GitHub Actions pinned to a mutable tag", with a Pin to SHA action that opens the pin PR.
Reliability insightsreliability
Patterns found in your observed run history, such as a p95 run-time regression. The action, Investigate, opens the evidence.
Get more from Latchkeyadoption
Latchkey capabilities you have not switched on yet, such as self-heal or connecting a coding agent over MCP.

Anatomy of an insight card#

  • An accent label: Cost, Reliability, Regression, Security, or Adoption.
  • A quantified headline: a dollar figure, a time figure, or a counted risk. Unquantified advice does not make the page.
  • The "Latchkey analysis" paragraph: why this happened and why it matters, written by the thin AI layer.
  • The action, labeled per finding ("Pin to SHA", "Set up MCP"), plus Preview to see the exact change on a finding that opens a pull request, Evidence for the runs behind a finding whose fix is already an open pull request or behind the Enable self-heal card, and Dismiss on a finding with no fix to apply, such as one you investigate (owners and admins).

Dismiss hides the finding, and it will not resurface unless the underlying conditions change, so dismissing is a real decision, not snoozing. Where a finding proposes a fix, the card also notes whether it is "Verified by run" or a "Proposed fix, not verified by a passing run", so you know how much scrutiny the diff deserves.

Self-heal proposal findings add one more control: Stop proposing. After a confirm step, Latchkey permanently stops opening PRs for that failure class in that workflow file on that repository until you undo it under Settings, Self-healing, Declined fixes. Like applying, it is limited to owners and admins.

Applying a finding#

01
Preview the change

Preview shows exactly what Latchkey will change, and where the finding rests on past runs, View evidence there opens them. Nothing is hidden behind the button.

02
Apply

Click the finding's action. Latchkey opens a pull request on a branch named latchkey/insight-<detector>-<hex>, titled like "Latchkey insight: pin GitHub Actions to commit SHAs" or "Latchkey insight: downsize runner in <path>". Only owners and admins can apply.

03
Review and merge on GitHub

The PR is yours to review, edit, and merge like any other; nothing merges automatically. A "PR #N opened" notice with a View PR link confirms it, and the card leaves the list at the next refresh; a settings-style finding reads Enabled instead. If self-heal is off again later, the Enable self-heal card comes back at the next nightly refresh, or sooner when you enable a repository, as long as a run Latchkey served, first queued after you applied the card and in the last 30 days, has failed.

Hand a finding to your own coding agent#

Some findings are better fixed by an agent that lives in your codebase. For those, Investigate opens the evidence, and Hand off to agent there opens Hand off to your coding agent: Copy prompt gives you a ready-made prompt to paste into your agent, and First time? Connect your agent shows the claude mcp add command to connect it, with Create a key for your agent (owners and admins), which creates an API key named coding-agent and fills it into the command. The workspace-wide Set up MCP finding opens the same command. A connected agent can also find the work on its own: list_findings lists the open findings the AI Insight page shows, and get_finding reads one in full, with its evidence. See Connect your AI agent for the full MCP setup.

Staying informed#

  • New insights found: the nightly scan surfaced new savings or risks.
  • Insight applied: a pull request opened from an insight was merged.

Both are informational notification types you can toggle per channel; see Notifications.

FAQ#

Q.01Why do I have no findings yet?

Detectors run nightly, so a freshly monitored repository has nothing until the next scan completes, and a healthy, well-configured setup can legitimately sit at zero open findings. With nothing open, the page reads "Nothing needs your yes. Latchkey checks nightly."

Q.02Will Latchkey ever change my workflows without me?

No. Every apply opens a pull request that you review, edit, and merge yourself. The only thing that acts without approval is self-heal, and it acts on the runner during a run, never on your source; the outcome report on this page is where you see what it did.

Q.03What is the difference between Dismiss and Stop proposing?

Dismiss hides one finding; it stays hidden unless the underlying conditions change. Stop proposing is broader and permanent: Latchkey stops opening PRs for that failure class in that workflow file on that repository until you undo it under Settings, Self-healing, Declined fixes.

Q.04Who can apply findings?

Owners and admins, whether applying one finding or using Apply all. Everyone else can read findings, previews, and evidence.