tdd-guardian
v0.9.0
Published
Strict test-driven development workflows and automated quality gates for pi
Maintainers
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-guardianOr directly from GitHub:
pi install git:github.com/joqk12345/tdd-guardian-for-piTry a local checkout without permanently installing it:
pi -e ./extensions/tdd-guardian.tsFor local package development:
pi install ./tdd-guardian-for-piThen open a target project and run:
/tdd-guardian-initInitialization 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 publishThe 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 testThe 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.
