@spences10/pi-coding-preferences

Configurable Pi guardrails that keep agents aligned with local coding workflow preferences before bad commands run

Packages

Package details

extension

Install @spences10/pi-coding-preferences from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@spences10/pi-coding-preferences
Package
@spences10/pi-coding-preferences
Version
0.0.11
Published
Jun 17, 2026
Downloads
591/mo · 39/wk
Author
spences10
License
MIT
Types
extension
Size
14.1 KB
Dependencies
1 dependency · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./dist/index.js"
  ],
  "image": "https://raw.githubusercontent.com/spences10/my-pi/main/assets/pi-package-preview.png"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@spences10/pi-coding-preferences

built with Vite+ tested with Vitest npm version license

my-pi package preview

Keep agents aligned with your local coding standards before bad commands run. pi-coding-preferences turns workflow preferences—like using rg instead of grep—into lightweight guardrails that nudge the model toward the project’s conventions.

It ships with default workflow preferences. Add user preferences at ~/.pi/agent/coding-preferences.json and project preferences at .pi/coding-preferences.json; when either file exists, configured rules are loaded instead of the built-in defaults.

{
	"rules": [
		{
			"name": "no-npm",
			"toolNames": ["bash"],
			"target": "command",
			"pattern": "^npm\\\\b",
			"reason": "Use pnpm in this repo."
		}
	]
}

Rule targets are command, path, or input. Patterns are JavaScript regular expressions.

pi install npm:@spences10/pi-coding-preferences

This is opt-in: installing the package globally applies it to your Pi sessions, but projects and downstream users do not inherit it unless they install the package.

Development

Package scripts build transitive workspace dependencies first, then run local tools through Vite+ with vp exec.

pnpm --filter @spences10/pi-coding-preferences run check
pnpm --filter @spences10/pi-coding-preferences run test
pnpm --filter @spences10/pi-coding-preferences run build