omp packages

@cpzombie/pi-write-prose0.1.1

pi coding agent extension: write_prose tool that delegates human-facing prose (READMEs, docs, changelogs, emails, copy) to a dedicated writer model

GitHub Actions Published 5 days ago GPL-3.0 ~0 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-write-prose

Thumbnail

A pi extension providing a write_prose tool that delegates human-facing prose (READMEs, docs, guides, changelogs, release notes, emails, marketing copy, UI strings) to a dedicated writer model.

Install

pi install npm:@cpzombie/pi-write-prose

Configuration

The writer model used defaults to omnissiah-writer/Writer (my personal one) and can be overridden by the PI_WRITER_MODEL environment variable (provider/modelId).

Reasoning is always enabled for the writer (it makes up facts without it): medium by default, thorough raises it to xhigh for prose you will publish or that must be exactly right.

Usage

Ask pi to write something for humans to read (e.g. "write a README.md for this repo" or "make the docs human-readable").

The model should invoke write_prose with parameters such as:

  • task: What to write, and who it's for
  • format: What format to output (e.g., "markdown", "single paragraph")
  • paths: Files to read for source material
  • source_material: Direct text to use as source material
  • output_path: Where to output the resulting prose
  • previous: The current text when revising instead of writing from scratch
  • previous_path: File containing the current text when revising instead of writing from scratch
  • notes: Changes to make when revising an existing piece of text (previous or previous_path)
  • thorough: Use xhigh reasoning for important text
  • words: Word limit for the prose

Behavior

  • Everything the writer needs goes through paths or source_material; this isn't a full subagent.
  • Every paths entry must be a readable text file or the tool call hard-fails. Binary files, directories, missing files, and a total over 400000 bytes in up to 24 files are all treated as errors.
  • The prose written by the tool is returned inline unless it exceeds 20000 bytes, in which case it is written to a temp file instead (assuming it wasn't already directed to save to a file).
  • The tool retries the writer call once if the model reasons to an empty output.

Development

Unit tests: ./tests/run.sh (against a stubbed writer model: no network, no API key, no model). Typecheck: ./typecheck.sh.