README.md

  1<!--
  2SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
  3
  4SPDX-License-Identifier: CC0-1.0
  5-->
  6
  7# pi-extensions
  8
  9[![Licensed under MutuaL-1.2](https://img.shields.io/badge/License-MutuaL--1.2-af2e1a?style=flat&labelColor=110402&link=https%3A%2F%2Fcodeberg.org%2FMutualism%2FMutualist-License)](https://codeberg.org/Mutualism/Mutualist-License)
 10[![REUSE status](https://api.reuse.software/badge/git.secluded.site/pi-extensions)](https://api.reuse.software/info/git.secluded.site/pi-extensions)
 11[![scratchanitch.dev badge](https://img.shields.io/badge/scratchanitch-dev-FFC4B5)](https://scratchanitch.dev)
 12[![Liberapay donation status](https://img.shields.io/liberapay/receives/Amolith.svg?logo=liberapay)](https://liberapay.com/Amolith/)
 13
 14A collection of [Pi] extensions.
 15
 16[Pi]: https://github.com/earendil-works/pi/
 17
 18## `@amolith/pi-handoff`
 19
 20[![pi-handoff on NPM](https://img.shields.io/npm/v/@amolith/pi-handoff)](https://www.npmjs.com/package/@amolith/pi-handoff)
 21
 22Get to the end of the thing you're doing, then use a subagent to extract
 23relevant bits from the current session and create a new one from them with
 24`/handoff thorough goal description`. You can tell Pi to hand something off
 25because it has a handoff tool too.
 26
 27After extraction, whether triggered by you or Pi, the draft handoff goes in the
 28new session's prompt editor and an auto-submit countdown starts that's cancelled
 29by pressing most any key.
 30
 31```sh
 32pi install npm:@amolith/pi-handoff
 33```
 34
 35More info in the package's [README](packages/handoff/README.md)
 36
 37> Based on [handoff.ts] and [session-query.ts] by Petr Baudis, licensed MIT
 38> accordingly. Reworked so the subagent calls a tool instead of expecting it to
 39> produce well-formed JSON, added an auto-submit countdown, and made the
 40> extraction model configurable.
 41
 42[handoff.ts]: https://github.com/pasky/pi-amplike/blob/main/extensions/handoff.ts
 43[session-query.ts]: https://github.com/pasky/pi-amplike/blob/main/extensions/session-query.ts
 44
 45## `@amolith/pi-personas`
 46
 47[![pi-personas on NPM](https://img.shields.io/npm/v/@amolith/pi-personas)](https://www.npmjs.com/package/@amolith/pi-personas)
 48
 49Code with a grumpy senior today and work with a patient tutor tomorrow. Switch
 50between them with `/persona`. The active one persists across sessions until
 51changed. Setting a persona prior to startup appends it to the system prompt.
 52Changing it mid-session sends the persona content as a steering message.
 53
 54```sh
 55pi install npm:@amolith/pi-personas
 56```
 57
 58More info in the package's [README](packages/personas/README.md)
 59
 60> All mine :)
 61
 62## Development
 63
 64Prerequisites: [mise] (installs Node and npm automatically).
 65
 66[mise]: https://mise.jdx.dev/
 67
 68```sh
 69# Install dependencies
 70npm install
 71
 72# Format, lint, and type-check everything
 73mise run check
 74```
 75
 76## Contributing
 77
 78Patch requests are in [amolith/llm-projects] on [pr.pico.sh]. You don't need a
 79new account to contribute, you don't need to fork this repo, you don't need to
 80fiddle with `git send-email`, you don't need to faff with your email client to
 81get `git request-pull` working...
 82
 83You just need:
 84
 85- Git
 86- SSH
 87- An SSH key
 88
 89```bash
 90# Clone this repo, make your changes, and commit them
 91# Create a new patch request with
 92git format-patch origin/main --stdout | ssh pr.pico.sh pr create amolith/llm-projects
 93# After potential feedback, submit a revision to an existing patch request with
 94git format-patch origin/main --stdout | ssh pr.pico.sh pr add {prID}
 95# List patch requests
 96ssh pr.pico.sh pr ls amolith/llm-projects
 97```
 98
 99See "How do Patch Requests work?" on [pr.pico.sh]'s home page for a more
100complete example workflow.
101
102[amolith/llm-projects]: https://pr.pico.sh/r/amolith/llm-projects
103[pr.pico.sh]: https://pr.pico.sh