omp packages

pi-chef-recipe-pstack0.2.1

Optional pi-chef recipe: the chef and every cook work by the pstack principles.

GitHub Actions Published 7 days ago MIT ~484 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-chef-recipe-pstack

An optional recipe for pi-chef. With it, the chef and every cook work by the principles of pstack, the agent plugin by Lauren Tan. The add-on vendors the 24 principle-* skills from pstack into principles/, under pstack's MIT license (principles/LICENSE). principles/SOURCE.md names the upstream commit.

pi-chef has no recipe of its own. You install the add-on of each recipe that you want, and you select a recipe in the kitchen config.json with recipe, as a default and per project (see the pi-chef README, "Configuration"). This is the pstack recipe, with the name pstack. Another recipe follows the contract in docs/design.md, "Recipes".

The add-on adds a block with the heading # Recipe: pstack to the system prompt of two roles:

  • A cook gets the cook rules, for example "reproduce a bug first and fix the root cause" and "verify on the real artifact before you report done". The block follows the cook contract.
  • The chef gets the chef rules, for example "every brief names the check that proves done" and "a cook's report is not proof". The chef gets the block only while chef mode is on.

Each block also has an index of all 24 principles: the name, when the principle applies, and the absolute path of its file. The model reads a file in full before it applies that principle. A normal Pi session gets no block, and the vendored files are not listed as skills.

Install

Install pi-chef first. Then install this add-on:

pi install npm:pi-chef-recipe-pstack

To use the add-on from main, install its directory as a local package, because Pi git sources take no subdirectory. When you installed pi-chef from git, the checkout is under your Pi agent directory, for example ~/.pi/agent/git/github.com/bpauli/pi-chef/addons/recipe-pstack.

Cooks load your installed Pi packages, so each cook also loads this add-on. To give the principles only to cooks of one kitchen, do not install the add-on. Put "cookArgs": ["-e", "<path to pi-chef>/addons/recipe-pstack/index.ts"] in the kitchen config.json instead.

How it works

At the start of each turn, the add-on asks pi-chef for the role of its Pi process with the role query on pi.events (pi-chef:role:v1, see docs/design.md, "Integration events"). For chef or cook it appends that role's block to the system prompt, unless the answer selects another recipe or none. For no role it adds nothing. Because it asks at each turn, /chef, /chef off, and an edit of recipe in config.json change the next turn. The add-on also answers the recipe discovery event (pi-chef:recipes:v1) with pstack, so the chef can warn when you select a recipe that is not installed.

Update the vendored principles

Clone cursor/plugins. Then, from the pi-chef checkout, run:

node addons/recipe-pstack/sync-pstack.mjs <path to the cursor/plugins checkout>

The script replaces the vendored principles, copies the license, and writes principles/SOURCE.md. A second run changes nothing. Do not edit the files in principles/ by hand.

License

MIT. The vendored pstack principles in principles/ keep their own MIT license, see principles/LICENSE.