diff --git a/docs.json b/docs.json index 377cc667..5eb86429 100644 --- a/docs.json +++ b/docs.json @@ -76,7 +76,18 @@ "platform/verification/check-results" ] }, - "platform/insights", + { + "group": "Code Insights", + "icon": "chart-line", + "root": "platform/insights", + "pages": [ + "platform/insights/findings", + "platform/insights/repository-health", + "platform/insights/trends", + "platform/insights/dependencies", + "platform/insights/pr-checks" + ] + }, "platform/wiki", "platform/memory", "platform/learning", diff --git a/images/platform/insights/findings-light.png b/images/platform/insights/findings-light.png new file mode 100644 index 00000000..efbc6282 Binary files /dev/null and b/images/platform/insights/findings-light.png differ diff --git a/images/platform/insights/pr-checks-light.png b/images/platform/insights/pr-checks-light.png new file mode 100644 index 00000000..369d6e05 Binary files /dev/null and b/images/platform/insights/pr-checks-light.png differ diff --git a/images/platform/insights/repository-health-light.png b/images/platform/insights/repository-health-light.png new file mode 100644 index 00000000..361d1362 Binary files /dev/null and b/images/platform/insights/repository-health-light.png differ diff --git a/images/platform/insights/trends-light.png b/images/platform/insights/trends-light.png new file mode 100644 index 00000000..d63f42e2 Binary files /dev/null and b/images/platform/insights/trends-light.png differ diff --git a/llms.txt b/llms.txt index bc053875..a61e9fd4 100644 --- a/llms.txt +++ b/llms.txt @@ -56,7 +56,7 @@ Use when explaining how the graph answers questions about code, and how to read ## Graphify: Features -Use when the user asks about a hosted feature: Ask, graphs, reviews, verification, Wiki, Memory, or connectors. +Use when the user asks about a hosted feature: Ask, graphs, reviews, verification, Code Insights, Wiki, Memory, or connectors. - [Console tour: the Graphify web app](https://docs.graphify.com/platform/console.md): A tour of the Graphify web app at app.graphify.com: Overview, repository graphs, pull request reviews, formal verification, Wiki, memory and connectors. - [Ask your codebase: answers with citations](https://docs.graphify.com/platform/ask.md): Ask your codebase plain-language questions. Graphify answers from the graph or the wiki, handles PR questions, and abstains when it has no answer. @@ -69,6 +69,11 @@ Use when the user asks about a hosted feature: Ask, graphs, reviews, verificatio - [Formal verification: prove behavior is kept](https://docs.graphify.com/platform/verification.md): Graphify proves changed functions behave like the previous version, or shows the input that differs. What a pass means, languages and limits. - [Read a formal verification check on GitHub](https://docs.graphify.com/platform/verification/check-results.md): Each Graphify verification check title and verdict: Behavior changed, Proven same, No change found, Not checked, Couldn't run, and what to do next. - [Code Insights: codebase health from your code graph](https://docs.graphify.com/platform/insights.md): Find unused code, copies out of sync, architecture changes, dependency version drift and PR checks, with the evidence behind each one. +- [Findings: unused code, duplicates, and PR issues](https://docs.graphify.com/platform/insights/findings.md): Review unused code, matching function bodies and pull request findings, with evidence and a fix prompt for your agent. +- [Repository health in Code Insights](https://docs.graphify.com/platform/insights/repository-health.md): See code that lost its last caller, copies that drifted apart, and how architecture changes after each index. +- [Trends in Code Insights](https://docs.graphify.com/platform/insights/trends.md): Chart code files, coupling, unused symbols and other measurements after each index, and export them as CSV or JSON. +- [Dependencies in Code Insights](https://docs.graphify.com/platform/insights/dependencies.md): See every declared package and where the same library is pinned to different versions across repositories. +- [PR checks in Code Insights](https://docs.graphify.com/platform/insights/pr-checks.md): See how many merged pull requests had a Graphify check on the final commit, or merged with a confirmed issue still open. - [Wiki: generated docs for every repository](https://docs.graphify.com/platform/wiki.md): Read, search, and ask questions about the wiki Graphify generates for each repository from its code knowledge graph, with a confidence trail on every page. - [Agent memory for coding agents](https://docs.graphify.com/platform/memory.md): Explore the facts your coding agents remember about a repository, organized by code entity, with provenance and graph anchors behind every fact. - [Learning: tune AI code review findings](https://docs.graphify.com/platform/learning.md): Teach Graphify which review findings matter with @graphify wrong, good, and suppress. Learning reduces noise and never changes verification results. diff --git a/platform/insights.mdx b/platform/insights.mdx index 0d880b7b..62c302d2 100644 --- a/platform/insights.mdx +++ b/platform/insights.mdx @@ -2,7 +2,7 @@ title: "Code Insights: codebase health from your code graph" sidebarTitle: "Code Insights" description: "Find unused code, copies out of sync, architecture changes, dependency version drift and PR checks, with the evidence behind each one." -keywords: ["code insights", "graphify code insights", "codebase health", "code health metrics", "engineering health", "unused code", "dead code detection", "find dead code", "retired code", "no longer used", "duplicate code", "duplicate functions", "copies out of sync", "divergent copies", "copy paste bugs", "architecture drift", "dependency cycles", "circular dependencies", "change reach", "propagation cost", "cross-module dependencies", "dependency inventory", "dependency version skew", "different versions in use", "verified change share", "ai written code checks", "agent pull requests", "pr checks", "metric history", "code metrics trends", "code findings", "pr findings", "insights", "insight", "copy fix prompt"] +keywords: ["code insights", "graphify code insights", "codebase health", "code health metrics", "engineering health", "insights", "insight"] surface: "cloud" icon: "chart-line" --- @@ -19,178 +19,37 @@ import { StartFreeCta } from '/snippets/start-free-cta.mdx'; ## Before you start - A Graphify account at [app.graphify.com](https://app.graphify.com?utm_source=docs&utm_medium=link&utm_campaign=platform-insights). You can create one for free. -- At least one indexed repository. Pull request findings and **PR checks** also need [reviews](/platform/reviews) on that repository. +- At least one indexed repository. Pull request findings and [PR checks](/platform/insights/pr-checks) also need [reviews](/platform/reviews) on that repository. Open **Code Insights** in the sidebar, between **Reviews** and **Formal Verification**. It lives at `app.graphify.com//insights`. Code Insights is available on every plan, including Free. See [Plans and pricing](/platform/support/pricing). -## What each tab shows +## What's in Code Insights -| Tab | Answers | Built from | -| --- | --- | --- | -| **Findings** | What should we look at first? | Repository scans and pull request reviews | -| **Repository health** | What stopped being used, which copies drifted apart, and how the structure changed | The code graph, compared build to build | -| **Trends** | Is the codebase growing, getting more tangled, or getting cleaner? | A measurement after each index | -| **Dependencies** | Which packages do we use, and where are versions different? | The dependency files in each repository | -| **PR checks** | How many merged pull requests had real checks behind them? | Graphify reviews and formal verification on merged pull requests | - -**How the numbers are made.** Repository health, Trends and Dependencies come from the code graph and Git history. No model reads your code to produce them, so the same code gives the same result. Pull request findings come from [reviews](/platform/reviews) and carry the review's evidence level. - -## Findings - -**Findings** is the default tab. It lists every finding as a card in two groups: **Repository findings** and **Pull requests**. A group count such as **Pull requests (20+)** means another page is available. Use **Next PR findings** or **More repository findings** to load it. - -If some repository scans didn't finish, a banner at the top reads **Some checks incomplete**, then the first reason, for example "Duplicate code: the scan reached its time limit", and how many other incomplete checks there are. Open the banner to see each check and **View indexing activity**. - -| Finding type | What you see on the card | What to check | -| --- | --- | --- | -| **Unused code** | A type badge with a count such as "1 symbol", a title, and a description such as "No recorded callers were found in the completed usage checks." The card also shows the repository and the file. | Dynamic or outside use, such as reflection, config, or another service. | -| **Duplicate code** | A type badge with a count such as "3 locations", a title, a description of the match, the repository and the file. | Compare their callers before you change one of them. | -| Pull request findings | A severity word (**Critical**, **High**, **Medium**, or **Low**), **PR #n**, the evidence label when the finding was confirmed, a relative time, the path and line, and the title and description. | The evidence, then the code. | - -Every card has **Copy fix prompt for my agent**. - - - - Pick **All findings**, **Repository scans**, or **Pull requests**. - - - Use **Search findings by title or file path**. Open **Filters** to narrow the list. - - - Select a card to open its side panel. A repository finding offers **Open file**. A pull request finding offers **Open full report**. - - - -| Filter | Options | -| --- | --- | -| Show | **Current findings**, **Earlier analysis**, **Hidden by me** | -| Sort | **Newest first**, **Oldest first**, **Highest priority (PRs)** | -| PR category | **All review findings**, **Bugs**, **Improvements** | -| PR evidence | **Any evidence**, **Not yet verified**, **Supported by code**, **Confirmed by test** | -| PR priority | `P0` to `P3`. Cards show the same levels as **Critical**, **High**, **Medium**, and **Low**. `P0` is **Critical**. | - -On a pull request card, confirmed evidence reads **Checked against the code** or **Confirmed by a test**. The Filters popover uses **Supported by code** and **Confirmed by test** for the same levels. **Not yet verified** is a claim nobody has checked yet. **Checked against the code** means the review traced the problem in the source. **Confirmed by a test** means a test reproduced it. - -### Decide as a team, or hide for yourself - -| | Team decision | Hide this finding | -| --- | --- | --- | -| Who sees it | Everyone in the workspace | Only you | -| Choices | **Open**, **Acknowledged**, **Fix proposed**, **Dismissed** | **Not useful**, **Intentional behavior**, **Finding appears incorrect** | -| Effect on evidence | None. The app confirms with **Team decision saved. Verification is unchanged.** | None. **Undo hide** brings it back. | - -To see what you hid, set **Show** to **Hidden by me**. - -## Repository health - -**Repository health** shows one repository at a time, in three sections: **No longer used**, **Copies out of sync**, and **Architecture**. A status line at the top says whether the insights are current. It may read **Updated 2 hours ago**, or **Didn't finish** with a sentence such as "No longer used, Copies out of sync, Architecture and Trends didn't finish for the latest index. They run again after the next index. Earlier results are still shown." That line can name **Trends** even though Trends has its own tab. Earlier results stay on screen. - -When a section has nothing to show yet, **No longer used** and **Copies out of sync** read "Not checked yet. This runs a few minutes after the repository is indexed." **Architecture** reads "No architecture snapshot yet. One is taken a few minutes after each index." - -### No longer used - -**What it means.** A symbol that had a real caller, lost it in a specific commit, and has stayed unused since. The card says it in one line, for example: "`_legacy_tax()` lost its last caller in commit a1b2c3d on Oct 3, 2026." - -**How it's worked out.** - -1. Graphify compares each indexed build with the one before it and records the commit where a private symbol's last real use was removed. -2. The symbol must then stay unused for at least 45 days and at least two more indexed builds. Until then it counts as waiting, and the section says how many are waiting. -3. Before a symbol is listed, Graphify rules out common hidden uses: the name appearing elsewhere in the code as text, names built at runtime, decorators, framework and test hooks, route handlers, overrides of outside classes, and dynamic attribute access. -4. Code that never had a caller is not listed here. It shows as **Unused code** in **Findings**. - -**Evidence you see.** The symbol, its file and lines, the commit where it lost its last caller, and the date. - -**What to do.** Open the commit to see which use was removed and confirm nothing replaced it. Check for dynamic or outside use, such as another service or a plugin, before you remove it. Then hand it to your agent with **Copy fix prompt for my agent**. - - -If part of a repository's graph is incomplete, this section shows **Not checked** with "Part of this repository's code graph was incomplete, so unused code couldn't be confirmed." Graphify does not report unused code from a partial graph. It checks again after the next index. - - -### Copies out of sync - -**What it means.** Two or more copies of the same function, where one copy changed and the others did not. This is how a bug gets fixed in one place and stays in another. The card reads, for example: "`parse_date` changed in `api/dates.py`, but its copy in `worker/dates.py` did not." - -**How it's worked out.** Graphify tracks groups of matching function bodies from build to build. When one member of a group changes and the others stay the same, Graphify opens an entry. If only the comments changed, the card says so. - -**Evidence you see.** When a copy is listed, the card shows the file that changed (**Changed**), the files that did not (**Not changed**), and when Graphify found it. - -**What to do.** Read the change. If it fixed a bug, port the fix to each copy, or replace the copies with one shared function and update the callers. - -### Architecture - -**What it means.** How the files in a repository depend on each other, measured after each index. - -| Number | What it measures | -| --- | --- | -| **Files in cycles** | Files that sit in a dependency cycle, with the number of cycles and the size of the largest. | -| **Cross-module** | The share of file dependencies that cross from one module to another. | -| **Change reach** | The share of files one change can affect through dependencies, also called propagation cost. Lower means changes stay local. | -| **Modules** | How many modules Graphify finds, and how many module cycles connect them. | - -**Recent changes** lists each indexed commit with what changed, for example "6 new dependencies (2 across modules) · 3 removed · 1 cycle closed". Open **New cross-module dependencies** to see each file pair and the modules it crosses. - -**What to do.** When a commit adds a dependency across modules that you didn't intend, copy the fix prompt and ask your agent to trace why. Watch **Change reach** and **Files in cycles** over time on **Trends**. - -## Trends - -**Trends** charts one measurement over time for the **Whole workspace**, a repository group, or one repository. Choose a **Metric**, a **Scope**, and a **Date range** of 30, 90 or 180 days. The default is 90 days. - -| Metric | What it counts | -| --- | --- | -| **Code files** | Code files in the index | -| **Lines of code** | Lines of code | -| **Modules** | Modules in the code graph | -| **Code symbols** | Functions, classes and other definitions | -| **Cross-module share** | File dependencies that cross modules, as a share | -| **File coupling edges** | Dependencies between files | -| **Matching function-body groups** | Groups of duplicate function bodies | -| **Reportable unused symbols** | Unused symbols Graphify reports | - -Each chart shows **Latest**, **Change** (the amount and a percentage), and **Range**, labelled "Lowest and highest in 90 days" when the range is 90 days, plus **Show as table**. A short note under the title says how the metric is computed, for example "Computed from the build's graph and checkout (graph-metrics/1)." Measurements are added a few minutes after each index, so a new repository starts with one point. A point marked "Not every repository reported" covers only part of the scope. "Measured differently from here" marks a change in how the metric is measured, so compare values on each side of it with care. - -**Export.** When a chart has data, **CSV** and **JSON** download exactly what the chart shows. - -## Dependencies - -**Dependencies** lists every package your repositories declare, read from their dependency files on each index. - -- **Different versions in use** lists packages pinned to different versions in different repositories, with that sentence under the title. Each row reads like "requests is on 3 versions across 5 repositories" and has **Copy fix prompt for my agent**. This is version skew: the same library can behave differently from one service to the next. -- **All dependencies** lists every package and version, plus the manifest or lockfile and line where it's declared. Use **Search packages by name**, or pick one repository. **More** loads the next page. - -**What to do.** Start with **Different versions in use**. Agree on one version, then ask your agent to update each repository and run its tests. - -## PR checks - -**PR checks** shows, for the pull requests merged in a period, which ones Graphify checked and which ones merged with a confirmed issue still open. Choose the **Whole workspace** or one repository, and the last 7, 14 or 30 days. - -**Checks on merged pull requests** is a table. Under the title it says "Each check is counted on its own, split by whether an agent opened the pull request. A check is evidence, not proof." A status line then gives the merged count and date range, for example "12 pull requests merged, Dec 1, 2026 to Dec 3, 2026. 4 more still being counted." - -Each row is one kind of evidence: - -| Row | Counts a merged pull request when | -| --- | --- | -| **Formal verification** | [Formal verification](/platform/verification) bounded-checked at least one changed function. | -| **Tests on the final commit** | A Graphify review or formal verification run finished on the exact commit that was merged, not an earlier one. | -| **Review issues confirmed** | The final Graphify review found at least one issue that is **Supported by code** or **Confirmed by test**, and nobody dismissed it. | - -The first two rows are coverage: higher is better. The third row is risk: these pull requests merged with a confirmed issue still open. - -Each column is a group of pull requests, split by agent signal: **Opened by an agent account** and **No agent detected**. "No agent detected" means Graphify found no agent signal. It does not mean a person wrote the change. - -**How to read it.** - -- Every cell reads "x of N merged", then a percentage when the group is large enough. A pull request can count in more than one row, so a column does not add up to its total. -- Percentages show once a group has 30 merged pull requests. Below that, you see counts only. -- A pull request is counted after it settles, about a day after merge. Until then the column says how many are still being counted. -- A check is evidence, not proof. Formal verification checks behavior up to a set bound. + + + Unused code, matching function bodies, and pull request findings, with a fix prompt for your agent. + + + Code that lost its last caller, copies that drifted apart, and architecture changes after each index. + + + Chart measurements over time and export them as CSV or JSON. + + + Every declared package, and where the same library is pinned to different versions. + + + How many merged pull requests had a Graphify check, or merged with a confirmed issue still open. + + -**What to do.** Compare the agent column with the other one. If agent pull requests merge with fewer checks on the final commit, ask for `@graphify review` after the last push, before you merge. Open the pull requests counted under **Review issues confirmed** and fix or dismiss each issue. +**How the numbers are made.** [Repository health](/platform/insights/repository-health), [Trends](/platform/insights/trends) and [Dependencies](/platform/insights/dependencies) come from the code graph and Git history. No model reads your code to produce them, so the same code gives the same result. Pull request findings come from [reviews](/platform/reviews) and carry the review's evidence level. ## Hand an insight to your agent -Every card in **Findings** and **Repository health**, and each row in **Different versions in use**, has **Copy fix prompt for my agent**. Paste it into Claude Code, Cursor, Codex or any coding agent. The prompt includes: +Every card in [Findings](/platform/insights/findings) and [Repository health](/platform/insights/repository-health), and each row in [Different versions in use](/platform/insights/dependencies), has **Copy fix prompt for my agent**. Paste it into Claude Code, Cursor, Codex or any coding agent. The prompt includes: - the repository, and the Git revision that was analyzed - the file, lines and commit behind the insight @@ -229,40 +88,43 @@ See [What your agent can do](/agents/capabilities) for the tools behind this. No. A linter checks rules inside one file. Code Insights reads the code graph across files and repositories, and compares builds over time, so it can say when code lost its last caller, or that one copy of a function changed and another didn't. - Not for **Repository health**, **Trends** or **Dependencies**. They come from the code graph and Git history, so the same code gives the same result. Pull request findings come from [reviews](/platform/reviews). + Not for [Repository health](/platform/insights/repository-health), [Trends](/platform/insights/trends) or [Dependencies](/platform/insights/dependencies). They come from the code graph and Git history, so the same code gives the same result. Pull request findings come from [reviews](/platform/reviews). - Graphify calls it **No longer used**. It records the commit where a private symbol lost its last real caller, waits at least 45 days and two more indexed builds, and rules out hidden uses such as decorators, route handlers and names built at runtime. Code that never had a caller shows as **Unused code** in **Findings**. + Graphify calls it **No longer used**. It records the commit where a private symbol lost its last real caller, waits at least 45 days and two more indexed builds, and rules out hidden uses such as decorators, route handlers and names built at runtime. Code that never had a caller shows as **Unused code** in [Findings](/platform/insights/findings). - Check first. Graphify rules out common hidden uses, but it can't see code outside your indexed repositories, such as a plugin or another team's service. Open the commit, search for dynamic use, and run the tests. **Copy fix prompt for my agent** asks your agent to investigate before it changes anything. + Check first. Graphify rules out common hidden uses, but it can't see code outside your indexed repositories, such as a plugin or another team's service. Open the commit, search for dynamic use, and run the tests. **Copy fix prompt for my agent** asks your agent to investigate before it changes anything. See [Repository health](/platform/insights/repository-health). **Duplicate code** means function bodies match today. **Copies out of sync** means they used to match and one changed while the others didn't, which is often a fix that reached only one copy. - The share of files that one change can affect through dependencies, also called propagation cost. A lower number means changes stay local. Track it on **Trends**. + The share of files that one change can affect through dependencies, also called propagation cost. A lower number means changes stay local. Track it on [Trends](/platform/insights/trends). - No. It counts merged pull requests by the evidence behind them: formal verification, a Graphify check on the final commit, or confirmed review issues left open. Each count is split by whether an agent account opened the pull request. "No agent detected" doesn't mean a person wrote it. + No. It counts merged pull requests by the evidence behind them: formal verification, a Graphify check on the final commit, or confirmed review issues left open. Each count is split by whether an agent account opened the pull request. "No agent detected" doesn't mean a person wrote it. See [PR checks](/platform/insights/pr-checks). Yes. Code Insights is available on every plan, including Free. See [Plans and pricing](/platform/support/pricing). - Yes, from **Trends**. When a chart has data, **CSV** and **JSON** download what it shows. + Yes, from [Trends](/platform/insights/trends). When a chart has data, **CSV** and **JSON** download what it shows. No. Findings and insights are advisory. To fail the Graphify check on serious review findings, see [Fail on confirmed P0/P1](/platform/reviews). - No. Hiding is personal. A team decision is shared, and neither one changes the evidence. + No. Hiding is personal. A team decision is shared, and neither one changes the evidence. See [Findings](/platform/insights/findings). ## What's next + + Unused code, matching function bodies, and pull request findings. + Where pull request findings and PR checks come from. @@ -272,9 +134,6 @@ See [What your agent can do](/agents/capabilities) for the tools behind this. Callers, impact and tests over MCP. - - Stop agents from adding another copy. - Connect a repository and Graphify measures it after the first index. diff --git a/platform/insights/dependencies.mdx b/platform/insights/dependencies.mdx new file mode 100644 index 00000000..7e202fb8 --- /dev/null +++ b/platform/insights/dependencies.mdx @@ -0,0 +1,28 @@ +--- +title: "Dependencies in Code Insights" +sidebarTitle: "Dependencies" +description: "See every declared package and where the same library is pinned to different versions across repositories." +keywords: ["dependency inventory", "dependency version skew", "different versions in use", "all dependencies", "package versions"] +surface: "cloud" +icon: "package" +--- + +**Dependencies** in [Code Insights](/platform/insights) lists every package your repositories declare, read from their dependency files on each index. + +- **Different versions in use** lists packages pinned to different versions in different repositories, with that sentence under the title. Each row reads like "requests is on 3 versions across 5 repositories" and has **Copy fix prompt for my agent**. This is version skew: the same library can behave differently from one service to the next. +- **All dependencies** lists every package and version, plus the manifest or lockfile and line where it's declared. Use **Search packages by name**, or pick one repository. **More** loads the next page. + +**What to do.** Start with **Different versions in use**. Agree on one version, then ask your agent to update each repository and run its tests. The fix prompt tells the agent to investigate first and not to change code until you say so. See [Hand an insight to your agent](/platform/insights#hand-an-insight-to-your-agent). + +If the tab says dependencies aren't available yet, wait for the next index, or check the build on [Repositories](/platform/repositories). + +## What's next + + + + Checks behind merged pull requests. + + + Chart measurements after each index. + + diff --git a/platform/insights/findings.mdx b/platform/insights/findings.mdx new file mode 100644 index 00000000..8b4c68ec --- /dev/null +++ b/platform/insights/findings.mdx @@ -0,0 +1,73 @@ +--- +title: "Findings: unused code, duplicates, and PR issues" +sidebarTitle: "Findings" +description: "Review unused code, matching function bodies and pull request findings, with evidence and a fix prompt for your agent." +keywords: ["code findings", "unused code", "dead code detection", "duplicate code", "duplicate functions", "pr findings", "copy fix prompt", "checked against the code"] +surface: "cloud" +icon: "list" +--- + +**Findings** is the default tab in [Code Insights](/platform/insights). It lists every finding as a card in two groups: **Repository findings** and **Pull requests**. A group count such as **Pull requests (20+)** means another page is available. Use **Next PR findings** or **More repository findings** to load it. + +If some repository scans didn't finish, a banner at the top reads **Some checks incomplete**, then the first reason, for example "Duplicate code: the scan reached its time limit", and how many other incomplete checks there are. Open the banner to see each check and **View indexing activity**. + +Code Insights Findings tab with unused and duplicate code cards, filters, and Copy fix prompt for my agent + +| Finding type | What you see on the card | What to check | +| --- | --- | --- | +| **Unused code** | A type badge with a count such as "1 symbol", a title, and a description such as "No recorded callers were found in the completed usage checks." The card also shows the repository and the file. | Dynamic or outside use, such as reflection, config, or another service. | +| **Duplicate code** | A type badge with a count such as "3 locations", a title, a description of the match, the repository and the file. | Compare their callers before you change one of them. | +| Pull request findings | A severity word (**Critical**, **High**, **Medium**, or **Low**), **PR #n**, the evidence label when the finding was confirmed, a relative time, the path and line, and the title and description. | The evidence, then the code. | + +Every card has **Copy fix prompt for my agent**. Paste it into your coding agent. The prompt tells the agent to investigate first and not to change code until you say so. See [Hand an insight to your agent](/platform/insights#hand-an-insight-to-your-agent). + + + + Pick **All findings**, **Repository scans**, or **Pull requests**. + + + Use **Search findings by title or file path**. Open **Filters** to narrow the list. + + + Select a card to open its side panel. A repository finding offers **Open file**. A pull request finding offers **Open full report**. + + + +| Filter | Options | +| --- | --- | +| Show | **Current findings**, **Earlier analysis**, **Hidden by me** | +| Sort | **Newest first**, **Oldest first**, **Highest priority (PRs)** | +| PR category | **All review findings**, **Bugs**, **Improvements** | +| PR evidence | **Any evidence**, **Not yet verified**, **Supported by code**, **Confirmed by test** | +| PR priority | `P0` to `P3`. Cards show the same levels as **Critical**, **High**, **Medium**, and **Low**. `P0` is **Critical**. | + +On a pull request card, confirmed evidence reads **Checked against the code** or **Confirmed by a test**. The Filters popover uses **Supported by code** and **Confirmed by test** for the same levels. **Not yet verified** is a claim nobody has checked yet. **Checked against the code** means the review traced the problem in the source. **Confirmed by a test** means a test reproduced it. + +Code that never had a caller shows here as **Unused code**. Code that had a caller, lost it in a known commit, and has stayed unused is listed under **No longer used** in [Repository health](/platform/insights/repository-health). Matching function bodies show as **Duplicate code**. Copies that later drifted apart are in **Copies out of sync** on that same page. + +## Decide as a team, or hide for yourself + +| | Team decision | Hide this finding | +| --- | --- | --- | +| Who sees it | Everyone in the workspace | Only you | +| Choices | **Open**, **Acknowledged**, **Fix proposed**, **Dismissed** | **Not useful**, **Intentional behavior**, **Finding appears incorrect** | +| Effect on evidence | None. The app confirms with **Team decision saved. Verification is unchanged.** | None. **Undo hide** brings it back. | + +To see what you hid, set **Show** to **Hidden by me**. + +## If a check didn't finish + +When the banner says **Some checks incomplete**, findings may be missing. Open it for each check's reason, such as "the scan reached its time limit", or look again after the next index. If you see "PR findings are not available on this deployment yet," use **Repository scans**. + +Findings are advisory. They don't block a merge. To fail the Graphify check on a confirmed P0 or P1, see [Fail on confirmed P0/P1](/platform/reviews). + +## What's next + + + + Code that lost its last caller, and copies that drifted apart. + + + Where pull request findings come from. + + diff --git a/platform/insights/pr-checks.mdx b/platform/insights/pr-checks.mdx new file mode 100644 index 00000000..87583284 --- /dev/null +++ b/platform/insights/pr-checks.mdx @@ -0,0 +1,48 @@ +--- +title: "PR checks in Code Insights" +sidebarTitle: "PR checks" +description: "See how many merged pull requests had a Graphify check on the final commit, or merged with a confirmed issue still open." +keywords: ["pr checks", "verified change share", "agent pull requests", "checks on merged pull requests", "tests on the final commit", "review issues confirmed"] +surface: "cloud" +icon: "clipboard-list" +--- + +**PR checks** in [Code Insights](/platform/insights) shows, for the pull requests merged in a period, which ones Graphify checked and which ones merged with a confirmed issue still open. Choose the **Whole workspace** or one repository, and the last 7, 14 or 30 days. + +**Checks on merged pull requests** is a table. Under the title it says "Each check is counted on its own, split by whether an agent opened the pull request. A check is evidence, not proof." A status line then gives the merged count and date range, for example "12 pull requests merged, Dec 1, 2026 to Dec 3, 2026. 4 more still being counted." + +Code Insights PR checks tab for the whole workspace over the last 30 days, with Formal verification, Tests on the final commit, and Review issues confirmed + +Each row is one kind of evidence: + +| Row | Counts a merged pull request when | +| --- | --- | +| **Formal verification** | [Formal verification](/platform/verification) bounded-checked at least one changed function. | +| **Tests on the final commit** | A Graphify review or formal verification run finished on the exact commit that was merged, not an earlier one. | +| **Review issues confirmed** | The final Graphify review found at least one issue that is **Supported by code** or **Confirmed by test**, and nobody dismissed it. | + +The first two rows are coverage: higher is better. The third row is risk: these pull requests merged with a confirmed issue still open. + +Each column is a group of pull requests, split by agent signal: **Opened by an agent account** and **No agent detected**. "No agent detected" means Graphify found no agent signal. It does not mean a person wrote the change. + +**How to read it.** + +- Every cell reads "x of N merged", then a percentage when the group is large enough. A pull request can count in more than one row, so a column does not add up to its total. +- Percentages show once a group has 30 merged pull requests. Below that, you see counts only. +- A pull request is counted after it settles, about a day after merge. Until then the column says how many are still being counted. +- A check is evidence, not proof. Formal verification checks behavior up to a set bound. + +**What to do.** Compare the agent column with the other one. If agent pull requests merge with fewer checks on the final commit, ask for `@graphify review` after the last push, before you merge. Open the pull requests counted under **Review issues confirmed** and fix or dismiss each issue. + +**Tests on the final commit** is not a count of CI tests. It counts a Graphify review or formal verification run that finished on the merged commit. + +## What's next + + + + How a review runs and how to read a finding. + + + Individual pull request findings and their evidence. + + diff --git a/platform/insights/repository-health.mdx b/platform/insights/repository-health.mdx new file mode 100644 index 00000000..8c213b72 --- /dev/null +++ b/platform/insights/repository-health.mdx @@ -0,0 +1,75 @@ +--- +title: "Repository health in Code Insights" +sidebarTitle: "Repository health" +description: "See code that lost its last caller, copies that drifted apart, and how architecture changes after each index." +keywords: ["repository health", "no longer used", "retired code", "dead code", "copies out of sync", "divergent copies", "architecture drift", "change reach", "files in cycles", "cross-module"] +surface: "cloud" +icon: "heart-pulse" +--- + +**Repository health** in [Code Insights](/platform/insights) shows one repository at a time, in three sections: **No longer used**, **Copies out of sync**, and **Architecture**. A status line at the top says whether the insights are current. It may read **Updated 2 hours ago**, or **Didn't finish** with a sentence such as "No longer used, Copies out of sync, Architecture and Trends didn't finish for the latest index. They run again after the next index. Earlier results are still shown." That line can name **Trends** even though Trends has its own tab. Earlier results stay on screen. + +When a section has nothing to show yet, **No longer used** and **Copies out of sync** read "Not checked yet. This runs a few minutes after the repository is indexed." **Architecture** reads "No architecture snapshot yet. One is taken a few minutes after each index." + +Code Insights Repository health tab with No longer used, Copies out of sync, and Architecture numbers for Files in cycles, Cross-module, Change reach, and Modules + +Each listed item has **Copy fix prompt for my agent**. See [Hand an insight to your agent](/platform/insights#hand-an-insight-to-your-agent). + +## No longer used + +**What it means.** A symbol that had a real caller, lost it in a specific commit, and has stayed unused since. The card says it in one line, for example: "`_legacy_tax()` lost its last caller in commit a1b2c3d on Oct 3, 2026." + +**How it's worked out.** + +1. Graphify compares each indexed build with the one before it and records the commit where a private symbol's last real use was removed. +2. The symbol must then stay unused for at least 45 days and at least two more indexed builds. Until then it counts as waiting, and the section says how many are waiting. +3. Before a symbol is listed, Graphify rules out common hidden uses: the name appearing elsewhere in the code as text, names built at runtime, decorators, framework and test hooks, route handlers, overrides of outside classes, and dynamic attribute access. +4. Code that never had a caller is not listed here. It shows as **Unused code** in [Findings](/platform/insights/findings). + +**Evidence you see.** The symbol, its file and lines, the commit where it lost its last caller, and the date. + +**What to do.** Open the commit to see which use was removed and confirm nothing replaced it. Check for dynamic or outside use, such as another service or a plugin, before you remove it. Then hand it to your agent with **Copy fix prompt for my agent**. + + +If part of a repository's graph is incomplete, this section shows **Not checked** with "Part of this repository's code graph was incomplete, so unused code couldn't be confirmed." Graphify does not report unused code from a partial graph. It checks again after the next index. + + +## Copies out of sync + +**What it means.** Two or more copies of the same function, where one copy changed and the others did not. This is how a bug gets fixed in one place and stays in another. The card reads, for example: "`parse_date` changed in `api/dates.py`, but its copy in `worker/dates.py` did not." + +**How it's worked out.** Graphify tracks groups of matching function bodies from build to build. When one member of a group changes and the others stay the same, Graphify opens an entry. If only the comments changed, the card says so. + +**Evidence you see.** When a copy is listed, the card shows the file that changed (**Changed**), the files that did not (**Not changed**), and when Graphify found it. + +**What to do.** Read the change. If it fixed a bug, port the fix to each copy, or replace the copies with one shared function and update the callers. + +Matching function bodies that have not drifted apart show as **Duplicate code** in [Findings](/platform/insights/findings). + +## Architecture + +**What it means.** How the files in a repository depend on each other, measured after each index. + +| Number | What it measures | +| --- | --- | +| **Files in cycles** | Files that sit in a dependency cycle, with the number of cycles and the size of the largest. | +| **Cross-module** | The share of file dependencies that cross from one module to another. | +| **Change reach** | The share of files one change can affect through dependencies, also called propagation cost. Lower means changes stay local. | +| **Modules** | How many modules Graphify finds, and how many module cycles connect them. | + +**Recent changes** lists each indexed commit with what changed, for example "6 new dependencies (2 across modules) · 3 removed · 1 cycle closed". Open **New cross-module dependencies** to see each file pair and the modules it crosses. + +**What to do.** When a commit adds a dependency across modules that you didn't intend, copy the fix prompt and ask your agent to trace why. Watch **Change reach** and **Files in cycles** over time on [Trends](/platform/insights/trends). + +If you see "Part of the repository couldn't be read, so these numbers may be low," fix the build on [Repositories](/platform/repositories), then reindex. + +## What's next + + + + Track architecture and unused-code measurements over time. + + + Unused symbols and matching function bodies from the latest scan. + + diff --git a/platform/insights/trends.mdx b/platform/insights/trends.mdx new file mode 100644 index 00000000..ffaad6f8 --- /dev/null +++ b/platform/insights/trends.mdx @@ -0,0 +1,40 @@ +--- +title: "Trends in Code Insights" +sidebarTitle: "Trends" +description: "Chart code files, coupling, unused symbols and other measurements after each index, and export them as CSV or JSON." +keywords: ["code metrics trends", "metric history", "code files", "lines of code", "cross-module share", "file coupling edges", "csv export", "json export"] +surface: "cloud" +icon: "trending-up" +--- + +**Trends** in [Code Insights](/platform/insights) charts one measurement over time for the **Whole workspace**, a repository group, or one repository. Choose a **Metric**, a **Scope**, and a **Date range** of 30, 90 or 180 days. The default is 90 days. + +| Metric | What it counts | +| --- | --- | +| **Code files** | Code files in the index | +| **Lines of code** | Lines of code | +| **Modules** | Modules in the code graph | +| **Code symbols** | Functions, classes and other definitions | +| **Cross-module share** | File dependencies that cross modules, as a share | +| **File coupling edges** | Dependencies between files | +| **Matching function-body groups** | Groups of duplicate function bodies | +| **Reportable unused symbols** | Unused symbols Graphify reports | + +Each chart shows **Latest**, **Change** (the amount and a percentage), and **Range**, labelled "Lowest and highest in 90 days" when the range is 90 days, plus **Show as table**. A short note under the title says how the metric is computed, for example "Computed from the build's graph and checkout (graph-metrics/1)." Measurements are added a few minutes after each index, so a new repository starts with one point. A point marked "Not every repository reported" covers only part of the scope. "Measured differently from here" marks a change in how the metric is measured, so compare values on each side of it with care. + +**Export.** When a chart has data, **CSV** and **JSON** download exactly what the chart shows. + +Code Insights Trends tab for Code files, with Latest, Change, and Range, plus CSV and JSON export and Show as table + +The status line on [Repository health](/platform/insights/repository-health) can name **Trends** when a measurement didn't finish for the latest index. Earlier results stay on screen, and the chart updates after the next index. + +## What's next + + + + Every declared package, and version skew across repositories. + + + Architecture numbers from the latest index. + + diff --git a/platform/reviews.mdx b/platform/reviews.mdx index 4d9e1a8d..e63a15e4 100644 --- a/platform/reviews.mdx +++ b/platform/reviews.mdx @@ -187,7 +187,7 @@ Advisory review findings and formal verification results answer different questi Use the [Formal Verification](/platform/verification) view for the run history and per-function verdicts. Do not interpret a completed review as proof that all changed functions preserve behavior. -To see across merged pull requests how many had a Graphify check on the final commit, or merged with a confirmed issue still open, open **PR checks** in [Code Insights](/platform/insights#pr-checks). +To see across merged pull requests how many had a Graphify check on the final commit, or merged with a confirmed issue still open, open [PR checks](/platform/insights/pr-checks) in Code Insights. ## Improve future reviews diff --git a/scripts/build-llms-txt.py b/scripts/build-llms-txt.py index ffa13ce1..b03453b5 100644 --- a/scripts/build-llms-txt.py +++ b/scripts/build-llms-txt.py @@ -38,7 +38,7 @@ ("Get Started", None): "Start here for an overview of Graphify.", ("Graphify", "Get started"): "Use when setting up hosted Graphify: a Graphify account (create one for free while connecting), an indexed repository, and an agent on Graphify MCP.", ("Graphify", "Core concepts"): "Use when explaining how the graph answers questions about code, and how to read its edges.", - ("Graphify", "Features"): "Use when the user asks about a hosted feature: Ask, graphs, reviews, verification, Wiki, Memory, or connectors.", + ("Graphify", "Features"): "Use when the user asks about a hosted feature: Ask, graphs, reviews, verification, Code Insights, Wiki, Memory, or connectors.", ("Graphify", "Workspace"): "Use for repository indexing and sync, connected agents, contributors and profiles.", ("Graphify", "Support"): "Use for errors, rate limits, pricing, security, or moving from Graphify CLI to hosted Graphify.", ("Open Source", "Get started"): "Use only when the user wants open-source Graphify on their machine: install graphifyy, build a graph, or serve it over MCP.",