Policy in code
Keep command policy and approval checks deterministic. The model proposes work but does not authorize itself.
The alternative. A natural-language safety prompt is easier to add, but it cannot establish an execution boundary.
On its protected Pi shell routes, MAINFRAME checks proposed commands against policy and pauses approval-bound work for a person's decision. Checkpoints and status help make the work reviewable.
01The problem
A coding agent can propose useful shell work and destructive shell work through the same interface. MAINFRAME makes that boundary inspectable and keeps permission decisions outside the model.
02Architecture
The workflow below follows the main handoffs and the boundaries each one introduces.
Pi proposes a shell command or an allowlisted function call.
The package normalizes and classifies the request before any protected execution route runs.
Blocked work is refused. Approval-bound work pauses for a person's exact decision.
Bounded receipts and explicit checkpoints support inspection and later handoff.
03Decisions
Keep command policy and approval checks deterministic. The model proposes work but does not authorize itself.
The alternative. A natural-language safety prompt is easier to add, but it cannot establish an execution boundary.
Separate installed, configured and locally verified states for the running Pi environment.
The alternative. A single protected badge would be simpler and would overstate support on unverified routes.
Store selected checkpoints, discoveries and progress instead of assuming a later session has the conversation.
The alternative. Replaying entire transcripts creates more noise and a larger privacy surface.
04Operations
These are the failure cases and maintenance responsibilities that shape the implementation:
05Outcomes
06Evidence
The repository contains the Pi package, shell policy, checkpoints, tests and readiness contracts.
The README states the active Pi scope and the boundary's explicit limitations.
Want to discuss the details? Let’s talk ↗
07Further reading
These original articles examine related engineering decisions and bounded demonstrations.
Picking a model is the smallest decision in agentic coding. A fractional CTO's guide to alignment, vertical slices, token budgets and guardrails, with a checklist for founders and engineering leads.
A practical evaluation plan for code-review assistants: test the contract, count false positives, compare like with like, and make a useful comment earn its place.