pi-verify
v0.1.1
Published
Pi extension that runs configurable, staged code verification checks.
Maintainers
Readme
pi-verify
Pi extension that adds one configurable verification tool for staged code checks. It replaces the Claude Code verify and check-di skills with an npm-installable Pi extension.
Install
pi install npm:pi-verifyFor project-local installation:
pi install -l npm:pi-verifyDuring local development in this repository:
npm install
npm run build
pi -e /absolute/path/to/pi-verifyTool
verify_code— detects the project/profile and runs configured conditional stages.
verify_code accepts optional paths. If omitted, it uses git changed/untracked files. Use mode: "all" for full project verification. To run a single configured stage, pass stage, for example "go.di".
Built-in profiles
Go (go.mod)
go test ./... -count=1go build ./...go vet ./...
Python (pyproject.toml)
uv run pytestuv buildwhen[project]or[build-system]existsuv run ruff check .uv run mypy .when[tool.mypy]exists
Frontend (package.json)
Uses Bun, pnpm, Yarn, or npm based on the lockfile:
- package-manager
run testwhenscripts.testexists - package-manager
run buildwhenscripts.buildexists - package-manager
run lintwhenscripts.lintexists
Java Maven (pom.xml)
mvn testmvn checkstyle:checkwhen checkstyle is configured
Configuration
Place config in either:
.pi-verify.json.pi/verify.json
User profiles merge with built-ins by id. A stage with the same id overrides built-in fields; a new stage is appended. Set top-level replaceDefaults: true to disable built-ins.
Each stage may define files and condition; the tool picks matching stages automatically and executes them sequentially.
See examples/.pi-verify.json.
Config shape
{
"version": 1,
"defaults": {
"stopOnFailure": true,
"timeoutMs": 120000,
"outputMaxLines": 400,
"outputMaxBytes": 16384
},
"profiles": [
{
"id": "go",
"label": "Go",
"markers": ["go.mod"],
"files": ["**/*.go", "go.mod", "go.sum"],
"stages": [
{
"id": "test",
"label": "Go tests",
"command": "go",
"args": ["test", "./...", "-count=1"],
"timeoutMs": 600000
},
{
"id": "build",
"label": "Go build",
"command": "go",
"args": ["build", "./..."],
"timeoutMs": 600000
},
{
"id": "lint",
"label": "go vet",
"command": "go",
"args": ["vet", "./..."],
"timeoutMs": 300000
}
]
}
]
}A stage can use either command + args or run:
{ "id": "lint", "run": "pnpm eslint ." }Supported stage conditions:
{
"condition": {
"exists": ["pyproject.toml"],
"contains": { "path": "pyproject.toml", "regex": "^\\s*\\[tool\\.mypy\\]", "flags": "m" },
"command": { "command": "test", "args": ["-f", "some-file"] }
}
}Also supported: all, any, and not nested conditions.
Publishing
npm version patch
npm publishThe package manifest contains:
{
"keywords": ["pi-package"],
"pi": { "extensions": ["./dist/index.js"] }
}