oarisur/Knowledge Diff

Detect rationale drift between code changes and project documentation. Comments on PRs when code changes contradict your docs.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit May 27, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: oarisur/knowledge-diff@4cd02977a9930baf7009cdd5a282925c849d8fe7 # v1.0.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
github-tokenGitHub token for posting comments and reading PR data.yes
openai-api-keyOpenAI API key. Required if llm-provider is 'openai' (the default).no""
anthropic-api-keyAnthropic API key. Required if llm-provider is 'anthropic'.no""
gemini-api-keyGoogle Gemini API key. Required if llm-provider is 'gemini'.no""
llm-providerLLM provider to use for drift detection. Options: 'openai', 'anthropic', 'gemini'.noopenai
llm-modelOverride the default model. Defaults: openai→gpt-4o, anthropic→claude-3-5-sonnet-20241022, gemini→gemini-2.5-flash.no""
doc-filesComma-separated glob patterns of documentation files to check against.noREADME.md,ARCHITECTURE.md,CLAUDE.md,docs/**/*.md
code-extensionsComma-separated list of file extensions to treat as code.nots,tsx,js,jsx,py,go,rs,java,cpp,c,rb,php,swift,kt
sensitivityHow aggressively to flag drift. Options: 'low' (only clear contradictions), 'medium', 'high' (also flags ambiguities).nomedium
auto-patchIf true, open a follow-up PR with suggested documentation updates when drift is detected.nofalse
comment-modeHow to post comments. 'update' edits the existing comment on each push; 'new' always posts a fresh comment.noupdate
max-files-per-runMaximum number of changed code files to analyse per PR run (to control LLM costs).no20
namedescription
drift-detected'true' if at least one drift issue was found above the sensitivity threshold, 'false' otherwise.
drift-countNumber of drift issues detected.
patch-pr-urlURL of the auto-generated documentation patch PR. Empty string if auto-patch is disabled or no patchable drift was found.