chore(vendor): import pi 1.3.0
Imported as a linear vendor commit so forge rebases do not replay the upstream root tree. git-subtree-dir: third_party/pi git-subtree-split: 71023aec1546d6d677a65669c5665c0927ce0dd0
This commit is contained in:
4
third_party/pi/.pi/prompts/cl.md
vendored
4
third_party/pi/.pi/prompts/cl.md
vendored
@@ -50,5 +50,5 @@ Sections (in order):
|
||||
- `### Removed` - Removed features
|
||||
|
||||
Attribution:
|
||||
- Internal: `Fixed foo ([#123](https://github.com/earendil-works/pi-mono/issues/123))`
|
||||
- External: `Added bar ([#456](https://github.com/earendil-works/pi-mono/pull/456) by [@user](https://github.com/user))`
|
||||
- Internal: `Fixed foo ([#123](https://github.com/earendil-works/pi/issues/123))`
|
||||
- External: `Added bar ([#456](https://github.com/earendil-works/pi/pull/456) by [@user](https://github.com/user))`
|
||||
|
||||
18
third_party/pi/.pi/prompts/dup.md
vendored
Normal file
18
third_party/pi/.pi/prompts/dup.md
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
description: Find potential duplicates of a GitHub issue
|
||||
argument-hint: "<issue-url>"
|
||||
---
|
||||
Look for potential duplicates of this issue in its GitHub repo: $1
|
||||
|
||||
Steps:
|
||||
1. Read the issue with `gh issue view <url> --comments` to understand the problem.
|
||||
2. Search open and closed issues and PRs in the same repo with `gh search issues` / `gh issue list --search` / `gh pr list --search`, using several keyword variations (error messages, feature names, affected components, symptoms).
|
||||
3. Read promising candidates to confirm they describe the same problem, not just similar words.
|
||||
|
||||
A duplicate reports the same problem or requests the same change: same symptom with the same likely cause, or a PR that fixes this exact issue. Sharing a component, an error message, or a related cause is not enough.
|
||||
|
||||
Output a short draft GitHub comment with a writte by AI disclosure.
|
||||
|
||||
If there are none, reply "No duplicates found."
|
||||
|
||||
Do not post, label, or close anything.
|
||||
21
third_party/pi/.pi/skills/github-work.md
vendored
Normal file
21
third_party/pi/.pi/skills/github-work.md
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
name: github-work
|
||||
description: Work on GitHub issues and pull requests of this repo. Use when asked to investigate, analyze, fix, or review an issue or PR, and when asked to wrap up such work (changelog, comment, commit, push, close).
|
||||
---
|
||||
|
||||
# Working on GitHub issues and PRs
|
||||
|
||||
The repo's prompt templates in `.pi/prompts/` (two directories above this skill) define the workflow. Read the matching template in full and follow it. Where a template says `$ARGUMENTS` or `$@`, substitute the issue or PR number or URL from the request, and any extra instructions the user gave.
|
||||
|
||||
| Request | Template |
|
||||
|---|---|
|
||||
| Investigate, analyze, or fix an issue | `.pi/prompts/is.md` |
|
||||
| Review a pull request | `.pi/prompts/pr.md` |
|
||||
| Wrap up issue or PR work: changelog, final comment, commit, push, close | `.pi/prompts/wr.md` |
|
||||
|
||||
Rules:
|
||||
|
||||
- `is.md` analyzes and proposes only. Implement only when the user asks for it, then keep following AGENTS.md (checks, tests, changelog rules).
|
||||
- `pr.md` never checks out or switches to the PR branch.
|
||||
- Run `wr.md` only when the user asks to wrap up, commit, or push. Post at most one final GitHub comment per session, ending with the exact disclaimer line it specifies.
|
||||
- When a request spans several steps, for example "fix issue X and wrap it up", read every template involved before starting.
|
||||
19
third_party/pi/.pi/skills/interactive-testing.md
vendored
Normal file
19
third_party/pi/.pi/skills/interactive-testing.md
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: interactive-testing
|
||||
description: Test and debug pi's interactive mode in a controlled tmux terminal. Use for TUI behavior checks and interactive release smoke tests.
|
||||
---
|
||||
|
||||
# Testing pi Interactive Mode with tmux
|
||||
|
||||
Run the TUI in a controlled terminal (from the repo root, two directories above this skill):
|
||||
|
||||
```bash
|
||||
tmux new-session -d -s pi-test -x 80 -y 24
|
||||
tmux send-keys -t pi-test "./pi-test.sh" Enter
|
||||
sleep 3 && tmux capture-pane -t pi-test -p # capture after startup
|
||||
tmux send-keys -t pi-test "your prompt here" Enter
|
||||
tmux send-keys -t pi-test Escape # special keys (also C-o for ctrl+o, etc.)
|
||||
tmux kill-session -t pi-test
|
||||
```
|
||||
|
||||
For release smoke tests, start the tmux session with `-c /tmp` and replace `./pi-test.sh` with the absolute path to the release binary. Test both Node and Bun binaries separately, submit a prompt, and wait for the model reply; startup alone is not a passing smoke test.
|
||||
52
third_party/pi/.pi/skills/release.md
vendored
Normal file
52
third_party/pi/.pi/skills/release.md
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
name: release
|
||||
description: Prepare, publish, verify, and recover pi releases. Use for release preparation, local release smoke tests, publishing, and failed release CI or announcements.
|
||||
---
|
||||
|
||||
# Releasing pi
|
||||
|
||||
Run repository commands from the repo root (two directories above this skill), unless instructed otherwise.
|
||||
|
||||
**Lockstep versioning**: all packages share one version; every release updates all together. `patch` = fixes + additions, `minor` = breaking changes. No major releases.
|
||||
|
||||
1. **Update CHANGELOGs**: ask the user whether they ran the `/cl` prompt on the latest commit on `main`. If not, they must run `/cl` first to audit and update each package's `[Unreleased]` section before releasing.
|
||||
|
||||
2. **Local smoke test**: build an unpublished release and smoke test from outside the repo (so it can't resolve workspace files):
|
||||
```bash
|
||||
npm run release:local -- --out /tmp/pi-local-release --force
|
||||
cd /tmp
|
||||
|
||||
# Node package install smoke tests
|
||||
/tmp/pi-local-release/node/pi --help
|
||||
/tmp/pi-local-release/node/pi --version
|
||||
/tmp/pi-local-release/node/pi --list-models
|
||||
/tmp/pi-local-release/node/pi -p "Say exactly: ok"
|
||||
/tmp/pi-local-release/node/pi
|
||||
|
||||
# Bun binary smoke tests
|
||||
/tmp/pi-local-release/bun/pi --help
|
||||
/tmp/pi-local-release/bun/pi --version
|
||||
/tmp/pi-local-release/bun/pi --list-models
|
||||
/tmp/pi-local-release/bun/pi -p "Say exactly: ok"
|
||||
/tmp/pi-local-release/bun/pi
|
||||
```
|
||||
Verify both Node and Bun startup, model/account listing, interactive startup, and at least one real prompt with the intended default provider. The bare commands `/tmp/pi-local-release/node/pi` and `/tmp/pi-local-release/bun/pi` start interactive mode; run each in tmux, submit a prompt, and wait for the model reply before considering the interactive smoke test passed. Failures are release blockers unless the user explicitly accepts the risk.
|
||||
|
||||
Load and follow [interactive-testing.md](interactive-testing.md) for the tmux workflow. Start each release binary from `/tmp`, not the repo root.
|
||||
|
||||
3. **Run the release script**:
|
||||
```bash
|
||||
PI_ALLOW_LOCKFILE_CHANGE=1 npm_config_min_release_age=0 npm run release:patch # fixes + additions
|
||||
PI_ALLOW_LOCKFILE_CHANGE=1 npm_config_min_release_age=0 npm run release:minor # breaking changes
|
||||
```
|
||||
If the test suite already passed in `npm run release:local` and only fails from machine load, `PI_RELEASE_SKIP_TESTS=1` skips `./test.sh` in the release script; checks and the packed install check still run. Use it only with the user's approval.
|
||||
|
||||
Use `npm_config_min_release_age=0` only for the release command. The repo's normal npm age gate can otherwise block the release lockfile refresh when the current workspace package version was published recently. Review any lockfile or install lock diffs the release creates before push.
|
||||
|
||||
The release script pins the newest published model catalog for Nix (`nix/model-catalog.json`) and builds the checkout with it as the Nix build does (it fails if that catalog predates main's model changes; publish one first), bumps all package versions, updates changelogs, regenerates release artifacts, runs `npm run check`, commits `Release vX.Y.Z`, tags `vX.Y.Z`, adds fresh `## [Unreleased]` changelog sections, commits `Add [Unreleased] section for next cycle`, then pushes `main` and the tag. Do not rerun the release script after a tag was pushed.
|
||||
|
||||
4. **CI verifies and announces the npm release**: pushing the `vX.Y.Z` tag triggers `.github/workflows/build-binaries.yml`. The `publish-npm` job uses npm trusted publishing through GitHub Actions OIDC with environment `npm-publish`; no local `npm publish`, `npm whoami`, OTP, or WebAuthn flow is required. After publishing, `announce-pi-dev-release` verifies every public workspace package resolves at the exact release version and that its npm tarball is available, then writes the verified release marker to R2. `pi.dev/api/latest-version` reads that marker; it must never announce a release from npm before this job succeeds.
|
||||
|
||||
5. **CI builds the Nix release**: the tag push also triggers `.github/workflows/nix.yml`, which builds the tagged flake on Linux and macOS and then fast-forwards the `stable` branch to the release commit. `nix run github:earendil-works/pi/stable` runs the latest release. If the Nix build fails, `stable` stays on the previous release; the tag cannot be fixed, so fix `main` and ship the fix in the next release.
|
||||
|
||||
6. **If CI publish or announcement fails**: inspect the failed job. The publish helper is idempotent and skips package versions already present on npm; the announcement job rechecks availability before updating the R2 marker. Rerun the failed job or workflow after fixing CI or transient npm issues. Do not rerun `npm run release:patch` or `npm run release:minor` for the same version.
|
||||
Reference in New Issue
Block a user