Skip to content

About

OMP plugin: ponytail minimality doctrine — YAGNI-ladder prompt injection with a PONYTAIL: PASS exit gate

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

omp-ponytail

An Oh My Pi plugin that injects a minimality doctrine ("ponytail") into every agent's system prompt and enforces a one-shot compliance check at the end of every agent — the chief via session_stop, subagents via a tool_call gate on the hidden yield tool.

What it does

Ponytail is a lifecycle plugin, not a tool — it never appears in an agent's tool list. It hooks three OMP events:

  • before_agent_start — appends two blocks to the outgoing system prompt: PONYTAIL_DOCTRINE (the YAGNI ladder: does this need to exist at all → standard library → native platform feature → an already-installed dependency → one line → minimum code that works, plus rules against unrequested abstractions and a reminder that validation, error handling, security, and accessibility are never fair game for cutting) and PONYTAIL_MANDATE (instructs the agent to review its own diff against that ladder before yielding, and to report PONYTAIL: PASS plus what it cut, or confirm nothing needed cutting).
  • session_stop — fires only for the chief (subagents never trigger session_stop). It inspects the last assistant message; if it doesn't contain a PONYTAIL: PASS marker (case-insensitive), the handler returns { continue: true, additionalContext: PONYTAIL_STOP_REMINDER } to give the agent one more turn to self-review and report compliance. The stop_hook_active !== false guard ensures this fires only once — the reminder never re-triggers itself, so the session always settles on the next stop regardless of what the agent does with the nudge. It never blocks or wedges the session.
  • tool_call — covers subagents, which never trigger session_stop. When a non-UI agent (!ctx.hasUI) calls the hidden yield tool, the handler checks the yield payload and, failing that, the agent's last assistant message (via ctx.sessionManager.getBranch()) for the PONYTAIL: PASS marker. If it's missing, it returns { block: true, reason: PONYTAIL_STOP_REMINDER } once per session (tracked by ctx.sessionManager.getSessionId()) to force the subagent to redo its ending, then lets the yield through unconditionally on the next attempt — mirroring the chief's one-shot session_stop behavior. The chief is never blocked here; its enforcement stays on session_stop.

How it works

index.ts is the plugin entry point (default-exports function (pi) { ... }, registers the three pi.on(...) handlers). doctrine.ts holds the three prompt-text constants (PONYTAIL_DOCTRINE, PONYTAIL_MANDATE, PONYTAIL_STOP_REMINDER) as plain string exports. No third-party dependencies, no tools registered.

Install

omp plugin install github:gyoz-ai/omp-ponytail

This 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.

Local development (symlink)

Clone this repo, then symlink it into your OMP extensions directory so the directory itself becomes the extension:

git clone https://github.com/gyoz-ai/omp-ponytail.git
ln -s "$(pwd)/omp-ponytail" ~/.omp/agent/extensions/ponytail

OMP auto-discovers any top-level subdirectory of ~/.omp/agent/extensions/ (or <project>/.omp/extensions/) containing an index.ts as a single plugin, and hot-reloads it on file change — no restart needed.

Uninstall

rm ~/.omp/agent/extensions/ponytail

(This only removes the symlink, not the cloned repo.)

About

OMP plugin: ponytail minimality doctrine — YAGNI-ladder prompt injection with a PONYTAIL: PASS exit gate

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages