PolicyEngine / PolicyEngine/policyengine-claude
complete plugin's Write|Edit prompt hooks halt turn continuation on every non-matching edit
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 32
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
The complete plugin (3.23.0) ships three prompt-type hooks matched on Write|Edit:
- PostToolUse "ARCHITECTURE ENFORCEMENT (Cosilico repos only)"
- PostToolUse "MULTI-ZONE ADVISORY" (Next.js zone-app config files)
- PreToolUse "PRE-WRITE CHECK (Cosilico repos only)"
Because they are prompt hooks with no path pre-filter, every Write/Edit in ANY repo runs an LLM evaluation, and the evaluation's "condition does not apply" verdict surfaces as PostToolUse:Edit hook stopped continuation: This is not a Next.js config file… — halting the agent's turn after each edit. In a long engineering session tonight (populace release work, dozens of edits to Python files), every single edit stopped the turn and required a manual nudge to resume. Same family as the known Cosilico .rac hook misfire.
Fix: gate each prompt hook behind a cheap command-type path guard (jq the file_path, exit 0 fast when the path is outside Cosilico repos / isn't a next.config.*), or convert the repo/path condition into the hook matcher layer, so the LLM evaluation only runs when the file could actually match. The prompt evaluations should also return an explicit allow/continue rather than a bare condition-not-met explanation.
Workaround applied locally: "complete@policyengine-claude": false in enabledPlugins.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the complete plugin's three Write/Edit prompt hooks and their matchers, especially the Next.js zone-app condition and the Cosilico repository checks. Reproduce an edit outside those conditions, then trace the command-type path guard using jq. Done means non-matching edits continue without an LLM evaluation while matching files still receive an explicit allow/continue result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100