Kind
implement
Goal
Integrate human.md with Pi through an extension that observes lifecycle events and enforces pre-tool decisions.
Non-goals
- Supporting the Pi desktop surface.
- Modifying Pi's policy or settings files outside the extension boundary.
- Duplicating policy logic inside the extension.
Invariants
- The adapter only translates Pi events to the neutral contract.
- Deny decisions prevent the tool call; advisory decisions remain visible.
- Session state is namespaced and cleaned up on session end.
- Extension load failure has an explicit documented mode.
Behavioral contract / States
Register Pi lifecycle and tool-call hooks, emit normalized events, apply the engine response, and report reason/message to the user. Unknown Pi events are logged as diagnostics without changing policy state.
Scope surface
Pi extension entrypoint, installer registration, fixtures, and adapter tests.
Acceptance
- Install the extension in a temporary Pi home and verify session start/end.
- Verify an allowed tool proceeds, a denied tool is blocked, and advisory output is shown.
- Run: python3 -m pytest tests/test_guard.py -v and the adapter-specific Pi test command documented in the repository.
- Add a smoke-test command that exits non-zero when the extension is not loaded.
Split triggers
- Pi's stable extension API cannot express blocking pre-tool decisions.
- Pi desktop exposes a different lifecycle than the CLI.
Dependencies / Parent
Blocked by: #1, #2, #3
Parent Epic: #15
Kind
implement
Goal
Integrate human.md with Pi through an extension that observes lifecycle events and enforces pre-tool decisions.
Non-goals
Invariants
Behavioral contract / States
Register Pi lifecycle and tool-call hooks, emit normalized events, apply the engine response, and report reason/message to the user. Unknown Pi events are logged as diagnostics without changing policy state.
Scope surface
Pi extension entrypoint, installer registration, fixtures, and adapter tests.
Acceptance
Split triggers
Dependencies / Parent
Blocked by: #1, #2, #3
Parent Epic: #15