@ramarivera/pi-prompt-maestro

Pi extension providing ergonomic prompt-box utilities, saved prompts, snippets, draft capture, and fuzzy prompt insertion workflows.

Packages

Package details

extension

Install @ramarivera/pi-prompt-maestro from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@ramarivera/pi-prompt-maestro
Package
@ramarivera/pi-prompt-maestro
Version
0.0.1
Published
Jun 14, 2026
Downloads
not available
Author
ramarivera
License
MIT
Types
extension
Size
40 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@ramarivera/pi-prompt-maestro

Prompt Maestro is a Pi coding-agent extension for prompt-box ergonomics: draft capture, sent prompt history, reusable snippets, and a fuzzy picker for inserting prompts back into the editor.

What it does

  • Captures prompt-box drafts on terminal input into a global store.
  • Converts the active draft to a confirmed prompt when the text is submitted.
  • Stores manual reusable prompts as snippet records.
  • Tracks source folder, session file, timestamps, tags, soft-delete state, and snippet lineage.
  • Opens a floating fuzzy picker with /pm, /pm ls, /pm search, or /prompt-maestro.
  • Supports inline markers like before </pm ls f:21st> after and replaces only the marker on submit.
  • Creates snippets with /pm new <content> or /pm def[:name] <content>.
  • Keeps records global, not folder-bound, while still showing the source folder in picker/detail UIs.

Prompt records live at:

~/.pi/agent/prompt-maestro/prompts.json

Commands

/pm
/pm ls [t:draft|t:confirmed|t:snippet] [f:<regex-or-fuzzy-query>]
/pm search [same filters]
/pm new[:optional-name] <prompt content>
/pm def[:optional-name] <prompt content>
/pm del [filters]
/prompt-maestro [same as /pm]

Inline marker form:

Write tests for </pm ls s f:node runner> and keep it concise.

Short type filters also work:

/pm ls d f:rough
/pm ls c f:deploy
/pm ls s f:21st

Picker keys

  • Enter inserts the selected prompt at the current editor cursor.
  • Shift+Enter replaces the editor with the selected prompt.
  • Ctrl+Enter / Cmd+Enter / Meta+Enter sends the selected prompt immediately when the terminal can report that chord.
  • / or Alt+Enter opens the action menu for the selected prompt.
  • Esc closes the current UI.

The action menu currently supports insert, replace, send, save as snippet, rename, tags, view, and soft delete.

Record model

A prompt has:

  • id
  • name (optional; nameless prompts display a content preview)
  • content
  • type: draft, confirmed, or snippet
  • active: soft-delete/default visibility flag
  • snippetId: lineage link when a draft/confirmed prompt is saved as a snippet
  • sourceCwd
  • sessionFile
  • createdAt, updatedAt, lastDraftAt, confirmedAt
  • tags

Saving a draft as a snippet sets the draft active = false and links snippetId. Saving a confirmed prompt as a snippet links snippetId but keeps the confirmed prompt active.

Install

pi install npm:@ramarivera/pi-prompt-maestro@0.0.1

Local development

This checkout is live-enabled for Pi through:

.pi/extensions/prompt-maestro/index.ts

That shim imports the package entrypoint in src/index.ts, which imports the extension factory from src/extension.ts. Tests use the same symbol so local behavior, package behavior, and manual Pi behavior do not drift.

npm install
npm run check
npm test
npm run test:e2e
npm pack --dry-run

Publishing

Publishing uses GitHub Actions trusted publishing in .github/workflows/publish.yml.

Before the first publish, configure npm trusted publishing:

  • owner/repo: ramarivera/pi-prompt-maestro
  • workflow: .github/workflows/publish.yml
  • environment: blank unless the workflow is changed to require one

No NPM_TOKEN is required for trusted publishing.