Code and API impact
These files changed. These pages describe them, and here is why.
Code and API impact
Section titled “Code and API impact”Impact answers one question: something changed in the product, so which pages describe it?
From an API change
Section titled “From an API change”When an OpenAPI document changes between syncs, Staleless diffs it and grades every change:
| Class | Meaning |
|---|---|
| Additive | A new operation, a new optional field. |
| Potentially breaking | A changed parameter, a changed response. |
| Breaking | A removed operation, a new required field, a changed auth scheme. |
Then it finds the pages affected:
PR #284 added POST /teams/:id/inviteHigh confidence documentation impact: - Teams > MembersMedium confidence: - Getting Started > CollaborationConfidence is a named rule, not a guess
Section titled “Confidence is a named rule, not a guess”Four rules. Each either matched or did not, and the text it matched travels with it as evidence:
| Rule | What it matched |
|---|---|
exact-path | The page names the exact path. |
operation-id | The page names the operationId. |
tag | The page covers the operation’s tag. |
resource | The page names the resource noun. |
A page naming /teams/{id}/invite is more affected than one naming “teams”, and
the rule names say so. You can disagree with the rule rather than only with the
result.
From a code change
Section titled “From a code change”In your build, on every pull request:
npx staleless impact --changed src/api/teams.ts,src/api/members.tsIt reads the relationship graph and answers with the pages that describe anything
in those files, and the line on each page that matched. See
impact.
Two ways to run it
Section titled “Two ways to run it”In CI, on every pull request. This works today, and it is why impact
shipped before the rest.
From a connected repository. Where a code repository is connected, the workspace compares what it last saw on a scan.
What it does with the answer
Section titled “What it does with the answer”An impact finding becomes an inbox item and, where a page is
clearly affected, a Pulse outdated signal on that page. It is evidence, so it
reaches outdated rather than only review.
Generated pages
Section titled “Generated pages”A page written by staleless document records the commit and the exact files and
lines it came from. When those files change, the page is marked for review.
Documentation generated from code that knows when the code moved is the point. Without the provenance it is a plausible page nobody can trust.