{"_id":"@davehardy20/pi-quality-gates","_rev":"2-202a0822d49c60837e8aebecd2e16841","name":"@davehardy20/pi-quality-gates","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@davehardy20/pi-quality-gates","version":"0.1.0","keywords":["pi-package","pi-extension","quality-gates","linting","code-review","post-turn-linter","post-turn-reviewer"],"license":"MIT","_id":"@davehardy20/pi-quality-gates@0.1.0","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"homepage":"https://github.com/davehardy20/pi-quality-gates#readme","bugs":{"url":"https://github.com/davehardy20/pi-quality-gates/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"e2d6bed2b9b14b0fe081bbc902aa0ab824b1d5e4","tarball":"https://registry.npmjs.org/@davehardy20/pi-quality-gates/-/pi-quality-gates-0.1.0.tgz","fileCount":23,"integrity":"sha512-VeWgGp/JFryI/5+i/GCHE0aec6+vRalJsAbMMK9TJXwjlwAQ3fpFSBPUGNEy/e62YOSVZsbqO3PlKK+ENcIHpg==","signatures":[{"sig":"MEYCIQC17oQM+kGBb8L82jpn6WJsoXBqVLiHMMWELzBiPl/3qwIhAL2XPgl4pHE7VJLQGNky0WajeS+wNvXXEd7+T4pBAvSr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":200015},"type":"module","gitHead":"88349cee0683a8b31534bfae8a13c3a3bad955a2","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"repository":{"url":"git+https://github.com/davehardy20/pi-quality-gates.git","type":"git"},"_npmVersion":"11.12.1","description":"Pi quality-gates bundle: post-turn linting, LSP diagnostics, and automated code review.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"yaml":"^2.7.1","ignore":"^6.0.0","remark":"^15.0.1","unified":"^11.0.5","minimatch":"^10.0.0","remark-lint":"^10.0.1","markdownlint":"^0.38.0","vfile-message":"^4.0.3","vscode-jsonrpc":"^8.2.0","remark-lint-no-literal-urls":"^4.0.1","remark-preset-lint-consistent":"^6.0.1","remark-preset-lint-recommended":"^7.0.1","remark-lint-maximum-line-length":"^4.1.1","remark-lint-no-missing-blank-lines":"^4.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typebox":"^1.1.24","typescript":"^5.9.3","@types/node":"^24.7.2","@earendil-works/pi-ai":"^0.74.0","@earendil-works/pi-coding-agent":"^0.74.0"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"typebox":{"optional":false},"@earendil-works/pi-ai":{"optional":false},"@earendil-works/pi-tui":{"optional":true},"@earendil-works/pi-coding-agent":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pi-quality-gates_0.1.0_1779016877016_0.4888975614207369","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@davehardy20/pi-quality-gates","version":"0.1.1","description":"Pi quality-gates bundle: post-turn linting, LSP diagnostics, and automated code review.","type":"module","keywords":["pi-package","pi-extension","quality-gates","linting","code-review","post-turn-linter","post-turn-reviewer"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/davehardy20/pi-quality-gates.git"},"bugs":{"url":"https://github.com/davehardy20/pi-quality-gates/issues"},"homepage":"https://github.com/davehardy20/pi-quality-gates#readme","publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit"},"dependencies":{"ignore":"^6.0.0","markdownlint":"^0.38.0","minimatch":"^10.0.0","remark":"^15.0.1","remark-lint":"^10.0.1","remark-lint-maximum-line-length":"^4.1.1","remark-lint-no-literal-urls":"^4.0.1","remark-lint-no-missing-blank-lines":"^4.0.1","remark-preset-lint-consistent":"^6.0.1","remark-preset-lint-recommended":"^7.0.1","unified":"^11.0.5","vfile-message":"^4.0.3","vscode-jsonrpc":"^8.2.1","yaml":"^2.7.1"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","typebox":"*"},"peerDependenciesMeta":{"@earendil-works/pi-coding-agent":{"optional":false},"@earendil-works/pi-ai":{"optional":false},"@earendil-works/pi-tui":{"optional":true},"typebox":{"optional":false}},"devDependencies":{"@earendil-works/pi-coding-agent":"^0.74.0","@earendil-works/pi-ai":"^0.74.0","@types/node":"^24.7.2","typebox":"^1.1.24","typescript":"^5.9.3","vitest":"^3.2.4"},"pi":{"extensions":["./src/index.ts"]},"gitHead":"88349cee0683a8b31534bfae8a13c3a3bad955a2","_id":"@davehardy20/pi-quality-gates@0.1.1","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-v4rCAYQ4SvFWZ7Mx6pyuBBlXVq3qlv2qoMnpxgoggX/p9nmlsQMhmSSiwVepn3PuUWeIOPFvhiKNi3+1CpnnkQ==","shasum":"d03c369d2e0182519147745700538d32dc61a205","tarball":"https://registry.npmjs.org/@davehardy20/pi-quality-gates/-/pi-quality-gates-0.1.1.tgz","fileCount":23,"unpackedSize":200015,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIChzzNLB78NkLkattiC5DMQeoSAvOsYg3yCguIM7u+eDAiEAynK9KY67JLJOFzvOo8PzNFM3b0fS4UKL2lq9P3Vt+bk="}]},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"directories":{},"maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-quality-gates_0.1.1_1779019894430_0.7433677455593031"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-17T11:21:16.841Z","modified":"2026-05-17T12:11:35.065Z","0.1.0":"2026-05-17T11:21:17.153Z","0.1.1":"2026-05-17T12:11:34.630Z"},"bugs":{"url":"https://github.com/davehardy20/pi-quality-gates/issues"},"license":"MIT","homepage":"https://github.com/davehardy20/pi-quality-gates#readme","keywords":["pi-package","pi-extension","quality-gates","linting","code-review","post-turn-linter","post-turn-reviewer"],"repository":{"type":"git","url":"git+https://github.com/davehardy20/pi-quality-gates.git"},"description":"Pi quality-gates bundle: post-turn linting, LSP diagnostics, and automated code review.","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"readme":"# @davehardy20/pi-quality-gates\n\nPi quality-gates bundle: post-turn linting, LSP diagnostics, and automated code review.\n\n## What it adds\n\n### Post-Turn Linter\n\n- Automatically runs lint checks on files modified during each agent turn\n- Supports: markdownlint, biome, ruff, cppcheck, tflint, cargo clippy\n- Optional LSP diagnostics integration (typescript-language-server, pyright, etc.)\n- Auto-fix follow-up turns for findings\n- `/post-turn-linter-run` — Run linter now (optionally pass file paths)\n- `/post-turn-linter-fix` — Start a fix turn for the latest findings\n- `/post-turn-linter-status` — Show current linter state\n\n### Post-Turn Reviewer\n\n- After the linter reports clean, spawns a headless Pi child process to review changes\n- 7-domain checklist: task completion, correctness, error handling, security, quality, testing, documentation\n- Severity levels: CRITICAL (auto-fix loop), WARNING (advisory), NIT (info only)\n- Re-review after fixes with configurable max passes\n- `/reviewer-status` — Show reviewer state machine\n- `/reviewer-run` — Manually trigger a review\n- `/reviewer-model` — Switch review model mid-session\n- `/reviewer-toggle` — Enable or disable the reviewer\n\n### Workflow\n\n```\nAgent modifies files → turn_end fires\n  → Post-turn-linter runs (mechanical checks)\n    → findings → auto-fix turn → linter re-runs (loop)\n    → clean   → triggers post-turn-reviewer\n      → PASS       → done\n      → CRITICAL   → fix-up turn → linter → reviewer re-runs (max 1 loop)\n      → WARNING    → advisory message\n      → max loops  → escalate to user\n```\n\n## Install\n\nFrom a local checkout during development:\n\n```bash\npi install /Users/dave/tools/pi-quality-gates\n```\n\nFrom git:\n\n```bash\npi install git:github.com/davehardy20/pi-quality-gates\n```\n\nFor one run only:\n\n```bash\npi -e /Users/dave/tools/pi-quality-gates\n```\n\n## Configuration\n\n### Linter\n\nCreate `.pi/linter.config.json` in your project root:\n\n```jsonc\n{\n  \"cooldownMs\": 15000,\n  \"reportMode\": \"auto-follow-up\",\n  \"lsp\": {\n    \"enabled\": false,\n    \"settleMs\": 500,\n    \"minSeverity\": \"warning\"\n  }\n}\n```\n\n### Reviewer\n\nCreate `.pi/reviewer.config.json` in your project root:\n\n```jsonc\n{\n  \"model\": null,\n  \"enabled\": true,\n  \"minChangedLines\": 5,\n  \"maxChangedLines\": 500,\n  \"maxReReviewPasses\": 1,\n  \"autoFixThreshold\": \"critical\",\n  \"timeoutMs\": 120000,\n  \"respectGitignore\": true,\n  \"skipFile\": \".pi/reviewer.skip\",\n  \"reviewDelayMs\": 10000\n}\n```\n\nCreate `.pi/reviewer.skip` (gitignore format) to exclude files from review:\n\n```gitignore\n*.generated.ts\ndist/\nvendor/**\n```\n\n## Notes\n\n- The reviewer spawns a child Pi process with `--no-extensions` and read-only tools only.\n- LSP diagnostics are optional and disabled by default. Enable via linter config.\n- If commands appear twice, Pi is probably loading both this package and the old local extension files. Disable or remove the old local extensions before testing.\n- Both extensions share package-local copies of LSP helpers — they do not reach back into `~/.pi/agent/extensions/shared/*`.\n\n## Update flow\n\n1. Update the package repo\n2. Push to GitHub\n3. Run `pi update --extensions` or reinstall the package\n4. Run `/reload`\n\n`/reload` alone does not fetch newer package commits.\n\n## Troubleshooting\n\n- Run `/post-turn-linter-status` to check linter state\n- Run `/reviewer-status` to check reviewer state\n- Check `~/.pi/lsp-config.yaml` for LSP server configuration\n\n## Build and test\n\n```bash\nnpm run typecheck\nnpm run test\nnpm run build\n```\n","readmeFilename":"README.md"}