Product code changes. Docs go stale. Usually nobody notices until users do.
change-intelligence exists to catch that in the pull request.
The right framing is not "AI docs assistant." It is an auditable PR intelligence system that knows when to stay silent.
Want the concrete evidence first:
- PROOF.md
- live proof surface:
/proofon the deployed service
The Python service under change_intelligence/ is the only production runtime.
The earlier Node implementation in src/ remains as a reference CLI and fixture harness for the ranking logic, not as a deployed server.
Most teams do not have a docs writing problem. They have a change detection problem.
Checkout changes. Auth changes. Search changes. Onboarding changes.
Somewhere in the repo, docs, setup guides, support answers, and release notes are now wrong.
This reads the diff, finds the likely blast radius, and shows the evidence.
This is not a generic docs chatbot. This is not "AI for content." This is not a noisy PR wrapper that comments on everything.
This is one narrow product:
- product code changes
- docs drift appears immediately
- the system points at the likely stale docs
- the reviewer sees why
- the system stays silent when the evidence is weak
That is enough to be useful by itself. It is also the right primitive for release notes, support updates, onboarding drift, and memory-backed learning later.
On a pull request, Change Intelligence can post a brief like:
- these docs are probably stale
- these files, symbols, routes, or API surfaces caused the match
- here is the evidence
- here is a draft follow-up when confidence is high
The point is not to auto-publish text. The point is to make docs drift visible while the PR is still open.
Example PR comment:
## Change Intelligence
Repository: `acme/app`
Pull request: #42
Confidence threshold: `60`
### Similar Historical Patterns
- `src/billing/createCheckoutSession.ts` changed -> `docs/billing.md` was accepted after merge (score: 0.9)
### Likely Stale Docs
1. `docs/billing.md`
- matched changed file path: `src/billing/createCheckoutSession.ts`
- matched symbol: `createCheckoutSession`
- matched route/API surface: `/checkout/session`
### Update Focus
- explain coupon behavior in checkout flow
- note new request fields and API behavior
- update setup or support docs if coupon support changes failure modes
---
Reply with `/ci correct`, `/ci wrong-doc`, or `/ci missed-doc`.The base product works as a deterministic scorer. Novyx Core Memory is here because over time the system should remember:
- which predicted docs were actually correct
- which suggestions reviewers rejected
- which kinds of changes tend to affect support or onboarding
- which code areas map to which docs in this repo
That turns it from a stateless checker into a repo-specific system that gets sharper over time.
The important point is governance, not decoration. Novyx gives the system memory, feedback storage, traces, and proof export so each recommendation can be inspected, challenged, and improved instead of hand-waved away as "the model thought so."
- teams with product or API docs living near the code
- repos where PRs frequently change behavior without updating docs
- teams that want evidence-first review signals before they trust anything more automatic
- Reads a unified git diff or patch file
- Extracts changed files and changed symbols
- Extracts changed routes and API surfaces from diff lines
- Scans a docs tree for matching headings and terminology
- Ranks the most likely docs pages affected
- Generates a markdown report with evidence, confidence scores, and draft patch suggestions
- Generates a structured release-note draft when recommendation confidence is strong
- Generates adjacent support-knowledge and onboarding/tour update drafts when the repo has those audience-specific docs
- Stores patterns, triples, and audit traces in Novyx so the system gets smarter over time
- Emits the same result as JSON for GitHub webhook integration
For engineering teams, the product promise is simple:
- fewer stale-doc misses during PR review
- fewer noisy bot comments than generic AI wrappers
- visible evidence for every recommendation
- an auditable learning loop instead of opaque prompt magic
If the system is not confident enough to defend a recommendation, it should not comment.
Install the runtime:
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'Run the strongest local demo:
npm run demo:pythonThat demo exercises the production Python path and shows:
- primary docs impact
- release-note draft generation
- support knowledge updates
- onboarding/tour drift detection
Run the test suite:
npm testExport proof artifacts from accepted runs:
npm run proof:exportThat writes:
proof/case-studies.mdproof/founder-digest.mdproof/metrics.json
Start the Python webhook service locally:
.venv/bin/python -m change_intelligence.serverRun the production server with credentials:
GITHUB_WEBHOOK_SECRET=dev-secret NOVYX_API_KEY=nram_your_key GITHUB_TOKEN=ghp_your_token .venv/bin/python -m change_intelligence.serverThe webhook endpoint is:
POST /webhooks/github{
"action": "opened",
"number": 42,
"repository": { "full_name": "acme/app" },
"pull_request": {
"title": "Add coupon support to checkout",
"patch": "diff --git a/src/example.ts b/src/example.ts\n..."
}
}The markdown brief includes:
- changed files
- extracted symbols
- ranked affected docs
- evidence for each match
- exact route/API surface matches when present
- recommended update focus areas
When confidence is strong enough, it can also include:
- release-note draft
- support-knowledge update draft
- onboarding or setup update draft
This repo now ships with a Fly.io deploy path for the Python webhook service.
Files:
Dockerfilebuilds the production imagefly.tomldefines the Fly app, port, and/healthcheck
Typical setup:
fly apps create change-intelligence-demo
fly secrets set GITHUB_WEBHOOK_SECRET=dev-secret NOVYX_API_KEY=nram_your_key
fly deployIf you use GitHub App auth instead of a personal token, also set:
fly secrets set GITHUB_APP_ID=123456 GITHUB_APP_PRIVATE_KEY="$(cat /path/to/private-key.pem)"Optional runtime config:
DASHBOARD_SECRETto protect/dashboardand/api/dashboardDOCS_REPOandDOCS_PATHwhen docs are fetched from another repositoryCONFIDENCE_THRESHOLDto tune when the app comments on pull requests
The repo includes a Python webhook service at POST /webhooks/github.
Current behavior:
- verifies
X-Hub-Signature-256whenGITHUB_WEBHOOK_SECRETis set - accepts GitHub pull request webhook payloads
- fetches docs directly from the GitHub repo when GitHub credentials are configured
- fetches PR file patches from GitHub when patch text is not included in the webhook payload
- separates product/code changes from docs changes
- runs the analysis engine with a default confidence threshold of
60 - upserts a marker-based PR comment on GitHub only when confidence clears the threshold
- deletes the marker comment when a rerun drops below the threshold
Dashboard endpoints:
GET /dashboardreturns a read-only internal HTML dashboardGET /api/dashboardreturns the same operational view as JSON- both surfaces expose aggregate KPIs, proof-window progress, recent analysis runs, recent feedback, and explicit Novyx partial-failure errors
- set
DASHBOARD_SECRETto require theX-Dashboard-Secretheader on both routes
Beyond the basic docs-drift detection flow, the app can also:
- recall similar historical change patterns from Novyx
- learn from merged PRs by comparing predicted docs with actual docs changed
- store mappings and memories for future ranking improvements
- create an audit trace in Novyx for every analyzed PR
- return adjacent support and onboarding update drafts when the repo contains those docs
Reviewer feedback is part of the live loop:
- every posted Change Intelligence comment includes
Reply with /ci correct, /ci wrong-doc, or /ci missed-doc feedback.ymlcaptures those commands and writes them into Novyx as explicit feedback memories- only trusted repo participants count: the feedback workflow verifies that a Change Intelligence comment exists on the PR and that the feedback came from an
OWNER,MEMBER,COLLABORATOR, or another user with GitHub write-level permission daily-metrics.ymlcomputes the proof-point KPIs from that feedback and the analysis-run records
Novyx usage in the current app:
recall()to fetch similar historical change patternstriple()to store code-to-doc mappings and rejection edges discovered during analysisremember()to save predictions and merged-PR feedback patterns for future PRstrace_create(),trace_step(), andtrace_complete()for auditable recommendation traces
What is true today:
- the app already stores patterns, traces, and feedback-linked memories
- PR comments are suppressed below the confidence bar
- the public proof page is suitable for public beta, not broad accuracy claims
- public metrics stay hidden until both the 20-run window and a minimum reviewer-feedback floor are earned
- broad lexical matches are pruned more aggressively than before
What is next:
- stronger repo-specific negative memory for "do not suggest this doc for this code area"
- pre-comment eval gating beyond the current confidence threshold
- tighter allow conditions for broad docs like
index.md,changelog.md, and generic SDK pages
GitHub auth options:
GITHUB_TOKENfor a simple bearer-token setup- or
GITHUB_APP_ID+GITHUB_APP_PRIVATE_KEY/GITHUB_APP_PRIVATE_KEY_PATHfor real GitHub App installation auth
Optional configuration:
DOCS_PATHto override the docs folder fetched from GitHub. If unset or left at the defaultdocs, Change Intelligence will auto-try common folders likedocumentation/,handbook/,guides/, andwiki/.DOC_OWNERSHIP_RULES_PATHto override the repository-to-doc ownership rules file, defaultchange_intelligence/seeds/doc_ownership.jsonGITHUB_API_URLfor GitHub Enterprise or testingCONFIDENCE_THRESHOLDto tune when the app comments, default60
Reference Node CLI usage:
node ./src/cli.js --diff ./test/fixtures/sample.patch --docs ./test/fixtures/repo/docs --code ./test/fixtures/repo/srcDoc ownership rules:
- ownership rules map repository-specific code prefixes to docs prefixes
- matching rules add deterministic ranking weight and explicit evidence to recommendations
- the default rules file ships at
change_intelligence/seeds/doc_ownership.json
Reference monitoring plan:
Public proof and setup surfaces:
/proofgives a public-facing proof page for public beta with accepted examples and conservative proof-window copy/api/proofreturns the same proof data as JSON- both public proof surfaces are intentionally sanitized and do not expose repository names, PR numbers, changed file paths, or internal Novyx/audit payloads
- top-line performance metrics remain hidden until the reviewer-feedback minimum is met, even after the run window is complete
/dashboardnow includes setup status, resolved docs source, trust metrics, and hotspot visibility/dashboardand/api/dashboardstay private behindDASHBOARD_SECRET- PR comments now include a
Trust Signalsblock so reviewers can see why a recommendation cleared the bar
Near-term:
- repo-specific negative memory from reviewer rejections
- pre-comment eval gating for borderline recommendations
- stricter suppression for broad docs unless explicit structural evidence exists
Later:
- onboarding and tour drift detection
- support knowledge updates
- product-change impact dashboard beyond the internal ops view