An Oh My Pi plugin that enforces a fixed set of session-wide engineering rules — dispatch discipline for the chief agent, a comment ban, a test skip-marker ban, a Cargo.lock guard, and a mandatory post-task verification checklist.
Bash-command filtering (hard blocks, ask-first prompts, per-project-kind blocks) has moved to the companion omp-bash-guard plugin. Install both together if you want the full governance surface.
The plugin hooks four lifecycle events:
before_agent_start— injects<top_priority_rules>(the 8 absolute rules: no commits, no unapproved comments, no weakened tests, no lazy/skip-marker tests, no low-utility abstractions, no inline fully-qualified paths, ask before mutating commands, search memory first),<adhd_output_style>(10 rules for ADHD-friendly output, adapted from ayghri/i-have-adhd: lead with the next action, number steps, end with one next action, suppress tangents, restate state, give concrete time estimates, surface wins, matter-of-fact errors, cap lists at 5, no preamble/recap/closers), and<technical_writing_style>(12 rules for written documentation/prose, following ASD-STE100 Simplified Technical English Issue 9 Jan 2025: one word per meaning, one verb per action, active voice, imperative instructions, present tense, short sentences, one instruction per sentence, no subordinate-clause padding or decorative language, keep articles, no ambiguous pronouns) into every agent's system prompt. The chief additionally gets<chief_delegation>(dispatch-only framing); subagents get<executor_checklist>(format/test/fix-before-yield framing).tool_call— four checks, each returning{ block: true, reason }to deny the call:- Chief dispatch-only gating: when
ctx.hasUIis true (the chief), onlytask,todo,ask,irc,job,resolve,memorysearch,search_tool_bm25are allowed. Every other tool is blocked at the tool layer, forcing the chief to delegate. - Memory-search-first: the chief's first
taskdispatch each session is blocked unlessmemorysearchhas already been called. - Comment ban:
write/editcalls that add new comment lines (//,/* */,///,#,--) to a code file (.rs,.ts,.tsx,.js,.jsx,.mjs,.cjs) are blocked. - Test-marker ban:
write/editcalls touching a test file (tests/,__tests__/,*.test.*,*.spec.*) that introduceTODO,FIXME,for now,will do later,skip, ortbdare blocked. - Cargo.lock guard: any
write/edittargeting a path ending inCargo.lockis blocked; callers are told to usecargo update/cargo add/cargo checkinstead.
- Chief dispatch-only gating: when
tool_result— after everytasktool result, appends aMANDATORY SUBAGENT VERIFICATIONchecklist (8 items: was format/test actually run, were skip-markers added, were tests weakened, was a commit made, is the diff minimal, did it delegate further, low-utility abstractions, inline fully-qualified paths) so the chief audits subagent output before trusting it.
All state (whether memorysearch has been called, the outstanding task call stack) is reset on session_start.
omp plugin install github:gyoz-ai/omp-governanceThis runs bun install against ~/.omp/plugins, symlinks the package into node_modules, and validates that index.ts resolves and exports a plugin factory before enabling it.
Symlink the repo directory itself into the extensions folder — the loader treats any top-level subdirectory of ~/.omp/agent/extensions/ containing an index.ts as one plugin:
ln -s "$(pwd)" ~/.omp/agent/extensions/governanceOr for a project-local install:
ln -s "$(pwd)" <project>/.omp/extensions/governanceThe extension loads at startup and live-reloads on file changes — no restart needed after pulling updates.
index.ts— plugin entry point, registers the lifecycle hooks.rules.ts— the prompt text blocks (COMMON_RULES,ADHD_OUTPUT_STYLE,STE_TECHNICAL_ENGLISH,CHIEF_DELEGATION,EXECUTOR_CHECKLIST,VERIFICATION_CHECKLIST).tool-guards.ts— pure helpers for thetool_callchecks (allowed-tool set, comment/marker detection, edit-input parsing).lib/code-files.ts— vendored copy of the sharedisCodeFile/isRustFile/isTsLikeFilehelpers.