### Development environment setup and testing Source: https://github.com/alifurkangokce/driftlint/blob/main/CONTRIBUTING.md Commands to install dependencies, run the test suite, and test the CLI on a repository. ```bash npm install npm test # build + node:test suite node dist/cli.js --no-fail # try it on a real repo ``` -------------------------------- ### Install driftlint Claude Code plugin Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Commands to add and install the driftlint plugin for Claude Code. ```bash /plugin marketplace add alifurkangokce/driftlint /plugin install driftlint@driftlint ``` -------------------------------- ### Prose example showing incorrect fix for 'test:unit' command Source: https://github.com/alifurkangokce/driftlint/blob/main/CHANGELOG.md Input line that triggered a wrong fix: the text 'tests' matched the 'test' substring earlier, causing the command to be rewritten incorrectly. ```text For faster tests, run `npm run test` before pushing. ``` -------------------------------- ### Manage agent memory with propose, review, and sync Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Use these commands to propose new memory entries, review them, and sync approved entries into documentation files. ```bash driftlint memory propose --text "Auth goes through the BFF." --evidence src/auth.ts:42 # the AGENT does this driftlint memory review # the HUMAN approves/rejects, one entry at a time driftlint memory sync # approved set → a marked block in CLAUDE.md / AGENTS.md / GEMINI.md ``` -------------------------------- ### Build and release commands Source: https://github.com/alifurkangokce/driftlint/blob/main/test/fixtures/basic/CLAUDE.md Run these commands to build the project and create a release. The build command is npm run build, and the release command is make release. ```bash npm run build make release ``` -------------------------------- ### Run driftlint commands Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Use these commands to detect documentation drift, synchronize AGENTS.md into CLAUDE.md, or verify consistency in CI environments. ```bash driftlint # the twin-drift rule flags pairs that already diverged driftlint twins # mirror AGENTS.md into CLAUDE.md as a marked, idempotent block driftlint twins --check # CI mode: fail when the mirror is stale ``` -------------------------------- ### Run driftlint commands Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Use these commands to lint the repository or synchronize CLAUDE.md and AGENTS.md files. ```bash npx @alifurkangokce/driftlint # lint this repo npx @alifurkangokce/driftlint twins # keep CLAUDE.md and AGENTS.md in sync ``` -------------------------------- ### Project layout tree Source: https://github.com/alifurkangokce/driftlint/blob/main/test/fixtures/fp/CLAUDE.md Shows the project directory structure with src/, page/, types/, and utils/ directories. ```text src/ ├── page/ ├── types/ └── utils/ ``` -------------------------------- ### Configure driftlint via .driftlintrc.json Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Optional configuration file placed at the repository root to define skill budgets, ignore patterns, template paths, and rule severity. ```json { "skillBudget": 15000, "ignore": ["docs/archive/**"], "templates": [".claude/skills/**"], "rules": { "dead-command": "off", "stale-knowledge": "info" } } ``` -------------------------------- ### CLI Usage Commands Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Common CLI commands for scanning repositories, applying fixes, and generating machine-readable output. ```bash npx @alifurkangokce/driftlint # scan the current repo npx @alifurkangokce/driftlint path/to/repo # scan another repo npx @alifurkangokce/driftlint --fix # interactively apply safe fixes (--yes: all) npx @alifurkangokce/driftlint --json # machine-readable output (CI-friendly) npx @alifurkangokce/driftlint --sarif # SARIF 2.1.0 for GitHub code scanning npx @alifurkangokce/driftlint --no-fail # report but always exit 0 npx @alifurkangokce/driftlint --diff # only drift THIS change caused (vs origin/main) ``` -------------------------------- ### Restart command Source: https://github.com/alifurkangokce/driftlint/blob/main/test/fixtures/fp/CLAUDE.md Command to restart the web app by navigating to the packages/web directory and running npm run develop. ```bash cd packages/web && npm run develop ``` -------------------------------- ### Reproduce driftlint precision study Source: https://github.com/alifurkangokce/driftlint/blob/main/docs/precision.md Run driftlint on any repository with JSON output and no failure exit code. This command is used to reproduce the precision study. ```bash npx @alifurkangokce/driftlint --json --no-fail ``` -------------------------------- ### Freshness Badge Configuration Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Workflow steps to generate and display a context-freshness badge. ```yaml - uses: alifurkangokce/driftlint@main with: { badge-json: badge.json, fail: "false" } - uses: Schneegans/dynamic-badges-action@v1.7.0 with: auth: ${{ secrets.GIST_SECRET }} gistID: filename: driftlint.json contentFile: badge.json ``` ```markdown ![context freshness](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com///raw/driftlint.json) ``` -------------------------------- ### Record baseline findings Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Run this command to generate the .driftlint-baseline.json file, ensuring only new drift is reported in future CI runs. ```bash npx @alifurkangokce/driftlint --update-baseline # record today's findings ``` -------------------------------- ### Add driftlint MCP server via Claude CLI Source: https://github.com/alifurkangokce/driftlint/blob/main/mcp/README.md Use this command to add the driftlint MCP server to your Claude configuration using npx. ```bash claude mcp add driftlint -- npx -y @alifurkangokce/driftlint-mcp ``` -------------------------------- ### Pre-commit Hook Configuration Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Integration with the pre-commit framework. ```yaml repos: - repo: https://github.com/alifurkangokce/driftlint rev: v0.7.0 hooks: - id: driftlint ``` -------------------------------- ### GitHub Actions Workflow Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Configuration for running driftlint in a GitHub Actions CI pipeline. ```yaml # .github/workflows/driftlint.yml on: [pull_request] permissions: security-events: write # only needed when sarif-file is set jobs: driftlint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: { fetch-depth: 0 } # full history enables the staleness check - uses: alifurkangokce/driftlint@main with: diff: "true" # PRs: only report drift this PR caused sarif-file: driftlint.sarif # optional: findings become PR annotations ``` -------------------------------- ### reviewdog Integration Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Command to pipe driftlint output into reviewdog for PR suggestions. ```yaml - run: npx -y @alifurkangokce/driftlint --rdjsonl --no-fail | reviewdog -f=rdjsonl -reporter=github-pr-review -filter-mode=nofilter ``` -------------------------------- ### Audit project memory with driftlint memory audit Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Automatically locate and verify the memory directory for the current repository. ```bash driftlint memory audit # finds the memory dir for the current repo automatically ``` -------------------------------- ### Incorrect driftlint --fix output Source: https://github.com/alifurkangokce/driftlint/blob/main/CHANGELOG.md Output of `driftlint --fix` for the given prose, demonstrating the bug where the command was left alone but the prose was rewritten incorrectly. ```text For faster test:units, run `npm run test` before pushing. ``` -------------------------------- ### Optional LLM Verification Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Commands to enable LLM-based verification of narrative claims in documentation. ```bash npm install @anthropic-ai/sdk # optional peer dependency, only needed for --llm export ANTHROPIC_API_KEY=sk-ant-... # or `ant auth login` npx @alifurkangokce/driftlint --llm npx @alifurkangokce/driftlint --llm --llm-model claude-haiku-4-5 # budget option ``` -------------------------------- ### Suppress false positives with driftlint-ignore Source: https://github.com/alifurkangokce/driftlint/blob/main/README.md Use the driftlint-ignore comment on the same line or the line above to suppress specific false positive findings. ```markdown This mentions `hypothetical/example.ts` on purpose. ``` -------------------------------- ### Indented tree listing Source: https://github.com/alifurkangokce/driftlint/blob/main/test/fixtures/fp/CLAUDE.md Shows an indented tree listing without box-drawing characters, representing a directory structure. ```text src/ utils/ helpers/ ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.