tdd-guardian
Strict test-driven development workflows and automated quality gates for pi
Package details
Install tdd-guardian from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:tdd-guardian- Package
tdd-guardian- Version
0.9.0- Published
- Aug 22, 2026
- Downloads
- 151/mo · 151/wk
- Author
- gizamo
- License
- ISC
- Types
- extension, skill, prompt
- Size
- 457.1 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./extensions/tdd-guardian.ts"
],
"skills": [
"./skills"
],
"prompts": [
"./prompts/*.md"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
TDD Guardian for pi
A git-installable pi package port of xiaolai/tdd-guardian-for-claude. It provides strict TDD workflows, test-lane gates, coverage merging, mutation testing guidance, critical-path thresholds, adversarial specification review, and red receipts.
Pi resources
- Extension: blocks stale
git commit/git pushBash calls through pi'stool_callevent and runs enabled task-completion gates afteragent_end. - 11 prompt templates:
/tdd-guardian-init,/tdd-guardian-workflow,/tdd-guardian-plan,/tdd-guardian-design-tests,/tdd-guardian-implement,/tdd-guardian-gate,/tdd-guardian-probe,/tdd-guardian-status,/tdd-guardian-audit-coverage,/tdd-guardian-audit-mutation, and/tdd-guardian-review. - 10 skills: policy, lane selection, test matrices, tooling catalog, coverage, mutation, review, initialization, workflow, and specialist roles.
- Tool:
tdd_guardian_receiptrecords and verifies red-test evidence without needing to know the installed package path.
Install
From npm (the source indexed by the pi package gallery):
pi install npm:tdd-guardian
Or directly from GitHub:
pi install git:github.com/joqk12345/tdd-guardian-for-pi
Try a local checkout without permanently installing it:
pi -e ./extensions/tdd-guardian.ts
For local package development:
pi install ./tdd-guardian-for-pi
Then open a target project and run:
/tdd-guardian-init
Initialization writes project state under .pi/tdd-guardian/. Enforcement is opt-in: enforceOnTaskCompleted and blockCommitWithoutFreshGate both default to false.
Publish to the pi package gallery
The gallery indexes npm packages, not GitHub repositories directly. Publish this package publicly to npm:
npm login --registry=https://registry.npmjs.org/
npm publish
The pi-package keyword makes it discoverable by pi.dev/packages. After npm publication and gallery indexing, install it with pi install npm:tdd-guardian.
Lifecycle mapping
The upstream engine retains the config token taskCompleted for compatibility. In this port it means pi's post-agent gate (agent_end). A failing post-agent gate is displayed and queued into context for the next turn. Commit/push enforcement is synchronous and can block the Bash tool call.
Development
npm test
The runtime gate engine has no third-party dependencies. Pi supplies the extension peer dependencies.
Provenance and license
Imported from upstream version 0.9.0, commit 4e6e3c20069125e6d81cc7ca7227876e3911f1b4. See UPSTREAM.md and LICENSE.