> ## Documentation Index
> Fetch the complete documentation index at: https://docs.weaveos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Code output

> How Weave measures engineering productivity — the expert-engineer time each PR represents, not lines of code or PR counts

## How it works

The output score for a PR is the answer to the question: <strong>"how long
would this PR take an expert engineer to complete?"</strong>

The result is a standard unit to quantify output. It's consistent and comparable across individuals,
teams, languages, and organizations.

Unlike flawed metrics like lines of code or number of PRs, our algorithm analyzes source code
changes. It understands the meaning and impact of every change.

| Metric | Understands code? | Measures productivity? | Correlation with effort<sup>1</sup> |
| - | :-: | :-: | :-: |
| # of PRs | <Icon icon="x" color="#ef4444" iconType="solid" /> | <Icon icon="x" color="#ef4444" iconType="solid" /> | - |
| DORA | <Icon icon="x" color="#ef4444" iconType="solid" /> | <Icon icon="x" color="#ef4444" iconType="solid" /> | - |
| Lines of code | <Icon icon="x" color="#ef4444" iconType="solid" /> | <Icon icon="x" color="#ef4444" iconType="solid" /> | 0.34 |
| Weave | <Icon icon="check" color="#157f3c" iconType="solid" /> | <Icon icon="check" color="#157f3c" iconType="solid" /> | <strong>0.94</strong> |

### Video explanation

<Frame caption="Understanding code output">
  <video controls className="w-full aspect-video rounded-xl" src="https://mintcdn.com/weave-50313446/G7fjE2xcRBR6g-xj/videos/code_output_explanation.mp4?fit=max&auto=format&n=G7fjE2xcRBR6g-xj&q=85&s=947e00aa3b77990f0a8f5c66c99f45e1" data-path="videos/code_output_explanation.mp4" />
</Frame>

## Examples

What does that look like in practice? Here are some example PRs from open source teams:

<CardGroup cols={1}>
  <Card title="PostHog/posthog#25056" icon="github" href="https://github.com/PostHog/posthog/pull/25056">
    Adds backend, frontend, and tests for a new feature

    62 commits across 2 weeks

    <br />

    Output: <strong>15.3</strong>
  </Card>

  <Card title="microsoft/vscode#222315" icon="github" href="https://github.com/microsoft/vscode/pull/222315">
    Refactors code to use a new service and adds new tests

    6 commits across 3 days

    <br />

    Output: <strong>8.4</strong>
  </Card>

  <Card title="facebook/react#27977" icon="github" href="https://github.com/facebook/react/pull/27977">
    Small change with extensive, high effort tests

    Approximately 1 day of work for expert engineer

    <br />

    Output: <strong>5.8</strong>
  </Card>
</CardGroup>

## Technical details

<AccordionGroup>
  <Accordion icon="circle-question-mark" title="How does it work?">
    Weave's code output algorithm combines the world knowledge of an LLM with
    static analysis and a custom ML model.
  </Accordion>

  <Accordion icon="braces" title="How was the model trained?">
    It was trained on a large proprietary data set of PRs, hand labelled by the
    expert engineers that wrote them.
  </Accordion>

  <Accordion icon="circle-exclamation" title="Why does my PR have a score of 0?">
    Some PRs receive a score of 0 because the changes don't register as meaningful
    code output. Common reasons include: the PR was flagged as an [ignored PR](/analysis/ignored-prs),
    all files match your [ignored paths](/settings/ignored-paths) (documentation, config, lock files,
    generated code), or all changes are file moves or renames.
  </Accordion>
</AccordionGroup>

## How output is attributed

<AccordionGroup>
  <Accordion icon="code-merge" title="Does squashing or rewriting commits change output?">
    No. Weave estimates output from the final diff of the merged PR (or GitLab MR), so squashing,
    rebasing, or rewriting commits doesn't change its score. Individual commits only decide how a
    PR's output is split between its contributors, such as commit authors, co-authors, and AI tools.
  </Accordion>

  <Accordion icon="calendar" title="Which date is output counted on?">
    Output is dated by the PR's merge date, not by when the commits were written. If you open or merge
    a PR weeks after doing the work, its output appears in the period it was merged.
  </Accordion>

  <Accordion icon="code-commit" title="Is code pushed without a PR counted?">
    Not by default. Commits pushed directly to a branch without a PR don't count toward output. For
    teams that work without PRs, Weave staff can enable commit mode on a repository, which estimates
    output from commits instead. Contact support to discuss commit mode.
  </Accordion>

  <Accordion icon="clock-rotate-left" title="How far back does output go?">
    When you connect a code platform, Weave imports PRs from about the last 6 months by default. Older
    PRs aren't included unless Weave support sets an earlier start date.
  </Accordion>
</AccordionGroup>

***

<p className="text-sm">
  <sup>1</sup> Source: Weave research, 2026
</p>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.