oarisur/Knowledge Diff
Detect rationale drift between code changes and project documentation. Comments on PRs when code changes contradict your docs.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit May 27, 2026
- License
- MIT
Pinned Snippet
uses: oarisur/knowledge-diff@4cd02977a9930baf7009cdd5a282925c849d8fe7 # v1.0.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| github-token | GitHub token for posting comments and reading PR data. | yes | — |
| openai-api-key | OpenAI API key. Required if llm-provider is 'openai' (the default). | no | "" |
| anthropic-api-key | Anthropic API key. Required if llm-provider is 'anthropic'. | no | "" |
| gemini-api-key | Google Gemini API key. Required if llm-provider is 'gemini'. | no | "" |
| llm-provider | LLM provider to use for drift detection. Options: 'openai', 'anthropic', 'gemini'. | no | openai |
| llm-model | Override the default model. Defaults: openai→gpt-4o, anthropic→claude-3-5-sonnet-20241022, gemini→gemini-2.5-flash. | no | "" |
| doc-files | Comma-separated glob patterns of documentation files to check against. | no | README.md,ARCHITECTURE.md,CLAUDE.md,docs/**/*.md |
| code-extensions | Comma-separated list of file extensions to treat as code. | no | ts,tsx,js,jsx,py,go,rs,java,cpp,c,rb,php,swift,kt |
| sensitivity | How aggressively to flag drift. Options: 'low' (only clear contradictions), 'medium', 'high' (also flags ambiguities). | no | medium |
| auto-patch | If true, open a follow-up PR with suggested documentation updates when drift is detected. | no | false |
| comment-mode | How to post comments. 'update' edits the existing comment on each push; 'new' always posts a fresh comment. | no | update |
| max-files-per-run | Maximum number of changed code files to analyse per PR run (to control LLM costs). | no | 20 |
Outputs
| name | description |
|---|---|
| drift-detected | 'true' if at least one drift issue was found above the sensitivity threshold, 'false' otherwise. |
| drift-count | Number of drift issues detected. |
| patch-pr-url | URL of the auto-generated documentation patch PR. Empty string if auto-patch is disabled or no patchable drift was found. |