pi-minimax-pack
v0.5.0
Published
Pi agent harness with policy gates, project detection, verification loop, drift protection, artifact validation, and runtime enforcement for weak models
Maintainers
Readme
Built by a Top 3.9% MiniMax power user — 3.15B tokens consumed and counting.
Get MiniMax Token Plan · Pi.dev Docs · Report Issue
pi-minimax-pack
Generic Pi agent harness with policy gates, project detection, verification loop, drift protection, artifact validation, memory-to-rule promotion, and installed-resource advice.
The harness is intentionally generic. Project-specific behavior lives in .pi/minimax-policy.json and profiles, not in extension code.
Why MiniMax?
This harness is designed and battle-tested with MiniMax M2.7 — a model optimized for repo-scale engineering, agent workflows, and long skill adherence. The runtime enforcement features (forced sequencing, auto-correction, context pruning, decomposition) make even weaker models perform reliably under structured constraints.
🔗 Try MiniMax Platform → — 204K context, ~60 tps standard / ~100 tps highspeed
Install
pi install git:https://github.com/adi805/pi-minimax-packAfter install, restart Pi. Works globally from any directory.
To refresh after upstream updates:
pi update git:github.com/adi805/pi-minimax-packWhat it does (automatic, no slash commands needed)
| Feature | Trigger | Behavior | |---------|---------|----------| | Contract injection | Every turn | Injects solver loop, scope control, verification contract into system prompt | | Command gate | Every bash call | Classifies risk (safe/build/test/install/destructive/deploy/database/network) and applies policy | | Read-before-write gate | edit/write tool | Blocks overwriting existing files without reading first | | Forced read-back | After every write | Auto-steers agent to read back written files | | Auto-correction loop | Verification failure | Sends evidence + hint back to model (max 3 iterations) | | Context pruning | Every LLM call | Collapses old tool results to 1-line summaries | | Decomposition | Complex prompts | Forces step-by-step execution for multi-action requests | | Skill auto-routing | Keyword detection | Injects relevant skill (incident/research/design/web/browser/multimodal) | | Status report | Every response | Auto-appends changed/verified/unverified/blocked labels | | Auto-grind | After code changes | Triggers verification commands (test/lint/build) automatically | | Drift detection | Workstream change | Alerts when task switches without approval | | Artifact validation | After BUILD success | Checks output dirs exist and are non-empty |
Skills included
| Skill | Triggers on |
|-------|-------------|
| minimax-incident-triage-harness | error, crash, bug, failed |
| minimax-deep-research | research, investigate, compare, analyze |
| minimax-anti-slop-design | ui, design, landing page, layout |
| minimax-multimodal-toolkit | image, video, audio, tts, voice |
| minimax-web-ops | web search, url, docs, latest |
| minimax-browser-ops | browser, click, screenshot, inspect |
| minimax-m2-self-evolution | refactor, optimize, iterate, improve |
| minimax-agentic-coding-guide | ambiguous/large tasks |
Prompt templates
| Command | Purpose |
|---------|---------|
| /minimax-preflight | Check project type + policy before changes |
| /minimax-diagnose | Diagnose failures with evidence-first approach |
| /minimax-verify | Run smallest relevant verification |
| /minimax-risk-fix | Apply minimal safe fix under policy constraints |
| /minimax-policy-review | Review current policy and gate behavior |
| /minimax-promote-rule | Turn correction into policy rule |
Policy
Create .pi/minimax-policy.json in any project to customize behavior:
{
"version": 1,
"commandPolicy": {
"safeRead": "allow",
"build": "preflight",
"install": "require_reason",
"destructive": "require_approval",
"unknown": "ask"
}
}See docs/POLICY_SCHEMA.md for full schema.
Development
npm run smoke # extension runtime smoke test
npm run test:policy # policy loader
npm run test:project # project detector
npm run test:command # command risk classifier
npm run test:state # task state machine
npm run test:artifact # artifact validator
npm run test:memory # memory-to-ruleLinks
- 🔗 MiniMax Platform — Get your API key and Token Plan
- 📖 Pi.dev Extensions Docs
- 🧠 MiniMax M2.7 Release Report
- 📦 Pi Packages
