pi-baton 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +2 -1
- package/package.json +1 -1
- package/docs/examples.md +0 -49
- package/docs/github-template.md +0 -63
- package/docs/repository-settings.md +0 -43
- package/docs/template-checklist.md +0 -140
- package/docs/typescript.md +0 -77
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
This project follows semantic versioning.
|
|
6
6
|
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
- Add Buy Me a Coffee sponsor button to README and native GitHub funding link via `.github/FUNDING.yml`.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Merged Dependabot PR #14: bump `@earendil-works/pi-ai` devDependency from 0.78.1 to 0.80.2 (type-check clean, 57/57 tests passing).
|
|
14
|
+
- Removed leftover template scaffolding (`prompts/`, `themes/`, `skills/`).
|
|
15
|
+
- Deleted stale template bootstrap docs (`docs/examples.md`, `docs/github-template.md`, `docs/repository-settings.md`, `docs/typescript.md`, `docs/template-checklist.md`) that shipped to npm consumers describing non-existent commands.
|
|
16
|
+
- Updated ROADMAP.md to reflect current version (0.7.1), test count (57), and seed completion status for S-101, S-102, S-103, S-105.
|
|
17
|
+
|
|
7
18
|
## [0.7.1] - 2026-06-27
|
|
8
19
|
|
|
9
20
|
### Changed
|
|
@@ -128,3 +139,4 @@ This project follows semantic versioning.
|
|
|
128
139
|
- Initial Pi package template.
|
|
129
140
|
- Example extension, Agent Skill, prompt, and theme.
|
|
130
141
|
- CI and npm Trusted Publishing workflow.
|
|
142
|
+
|
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
[](LICENSE)
|
|
12
12
|
[](https://pi.dev/packages)
|
|
13
13
|
[](docs/release.md)
|
|
14
|
+
<a href="https://buymeacoffee.com/ekawano114m"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" width="217" height="60"></a>
|
|
14
15
|
|
|
15
16
|
> Run YAML-defined review loops in Pi with per-step model switching and isolated step context.
|
|
16
17
|
|
|
@@ -134,7 +135,7 @@ steps:
|
|
|
134
135
|
| `agents/` | Builtin `worker` and `reviewer` subagent definitions |
|
|
135
136
|
| `workflows/` | Builtin `default-review-loop.yaml` |
|
|
136
137
|
| `assets/` | README / package branding assets |
|
|
137
|
-
| `docs/` | Release and maintainer
|
|
138
|
+
| `docs/` | Release and maintainer documentation |
|
|
138
139
|
|
|
139
140
|
## Development
|
|
140
141
|
|
package/package.json
CHANGED
package/docs/examples.md
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Examples
|
|
2
|
-
|
|
3
|
-
This template ships one minimal example for each Pi package resource type.
|
|
4
|
-
|
|
5
|
-
## Extension
|
|
6
|
-
|
|
7
|
-
`extensions/hello.ts` registers:
|
|
8
|
-
|
|
9
|
-
- `/template-hello`
|
|
10
|
-
- a small session status indicator
|
|
11
|
-
|
|
12
|
-
Try it with:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
pi -e .
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Then run:
|
|
19
|
-
|
|
20
|
-
```txt
|
|
21
|
-
/template-hello YourName
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Agent Skill
|
|
25
|
-
|
|
26
|
-
`skills/example-skill/SKILL.md` demonstrates a minimal Agent Skill.
|
|
27
|
-
|
|
28
|
-
Replace it with your real workflow instructions.
|
|
29
|
-
|
|
30
|
-
## Prompt template
|
|
31
|
-
|
|
32
|
-
`prompts/example.md` demonstrates a tiny prompt template with one variable.
|
|
33
|
-
|
|
34
|
-
## Theme
|
|
35
|
-
|
|
36
|
-
`themes/example-theme.json` is a placeholder theme. Replace it or remove `themes/` if your package does not ship themes.
|
|
37
|
-
|
|
38
|
-
## Typed custom tool
|
|
39
|
-
|
|
40
|
-
`extensions/index.ts` registers:
|
|
41
|
-
|
|
42
|
-
- `/template-info`
|
|
43
|
-
- `template_greet` custom tool
|
|
44
|
-
|
|
45
|
-
The tool demonstrates:
|
|
46
|
-
|
|
47
|
-
- TypeBox object parameters
|
|
48
|
-
- a string enum schema via `StringEnum`
|
|
49
|
-
- shared logic imported from `lib/greeting.ts`
|
package/docs/github-template.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# GitHub Template Repository
|
|
2
|
-
|
|
3
|
-
> **Template bootstrap doc.** Use while setting up a new repo from this template. Delete this file or merge any project-specific steps into README / Vault notes once setup is done, unless it still adds maintainer value.
|
|
4
|
-
|
|
5
|
-
## Recommended development flow
|
|
6
|
-
|
|
7
|
-
After generating a repo from this template, use this default order:
|
|
8
|
-
|
|
9
|
-
```txt
|
|
10
|
-
Vault notes -> PRD -> Issues -> implement -> ci/check -> release -> save learnings
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
In practice:
|
|
14
|
-
|
|
15
|
-
1. Create Vault notes under `4_Project/<ProjectName>/`.
|
|
16
|
-
2. Add `CONTEXT.md`, `README.md`, `ROADMAP.md`, `Docs/`, `Issues/`, and `Progress/`.
|
|
17
|
-
3. Write the PRD in `Docs/`.
|
|
18
|
-
4. Split approved issue files into `Issues/`.
|
|
19
|
-
5. Implement in the OSS repo created from this template.
|
|
20
|
-
6. Run CI and package checks before release.
|
|
21
|
-
7. Save release notes and follow-up decisions back to the Vault project.
|
|
22
|
-
|
|
23
|
-
Enable template mode on the source repository:
|
|
24
|
-
|
|
25
|
-
```txt
|
|
26
|
-
GitHub repo → Settings → General → Template repository
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Create a public repository from the template:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
gh repo create OWNER/new-pi-extension \
|
|
33
|
-
--public \
|
|
34
|
-
--template OWNER/pi-extension-template \
|
|
35
|
-
--clone
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Create a private repository from the template:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
gh repo create OWNER/new-pi-extension \
|
|
42
|
-
--private \
|
|
43
|
-
--template OWNER/pi-extension-template \
|
|
44
|
-
--clone
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Include all branches if needed:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
gh repo create OWNER/new-pi-extension \
|
|
51
|
-
--public \
|
|
52
|
-
--template OWNER/pi-extension-template \
|
|
53
|
-
--include-all-branches \
|
|
54
|
-
--clone
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
After creation:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
cd new-pi-extension
|
|
61
|
-
npm install
|
|
62
|
-
npm run ci
|
|
63
|
-
```\n
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Repository Settings
|
|
2
|
-
|
|
3
|
-
> **Template bootstrap doc.** Use while configuring GitHub About, topics, and branch protection after generating a repo. Delete this file or merge needed settings into README once setup is done, unless it still adds maintainer value.
|
|
4
|
-
|
|
5
|
-
Use this file after creating a real repository from the template.
|
|
6
|
-
|
|
7
|
-
## GitHub About
|
|
8
|
-
|
|
9
|
-
Suggested fields:
|
|
10
|
-
|
|
11
|
-
- Description: one-line pitch for the Pi package
|
|
12
|
-
- Website: npm package URL or project docs URL
|
|
13
|
-
- Topics:
|
|
14
|
-
- `pi`
|
|
15
|
-
- `pi-package`
|
|
16
|
-
- `agent-skill`
|
|
17
|
-
- `typescript`
|
|
18
|
-
|
|
19
|
-
## Template mode
|
|
20
|
-
|
|
21
|
-
If this repository itself should be reusable as a template:
|
|
22
|
-
|
|
23
|
-
```txt
|
|
24
|
-
Settings → General → Template repository
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Branch protection
|
|
28
|
-
|
|
29
|
-
Recommended for public packages:
|
|
30
|
-
|
|
31
|
-
- Require pull request before merging
|
|
32
|
-
- Require status checks to pass
|
|
33
|
-
- Require `CI` workflow
|
|
34
|
-
- Block force pushes on the default branch
|
|
35
|
-
|
|
36
|
-
## npm package page
|
|
37
|
-
|
|
38
|
-
After first publish:
|
|
39
|
-
|
|
40
|
-
- Confirm README renders correctly
|
|
41
|
-
- Confirm package provenance appears
|
|
42
|
-
- Confirm package contents are intentional
|
|
43
|
-
- Add npm URL to GitHub About and README
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
# Template Setup Checklist
|
|
2
|
-
|
|
3
|
-
このテンプレートから新しい Pi 拡張OSSを作った後に埋めること。
|
|
4
|
-
|
|
5
|
-
## Recommended flow
|
|
6
|
-
|
|
7
|
-
- [ ] Vault project notes を `4_Project/<ProjectName>/` に作る
|
|
8
|
-
- [ ] `CONTEXT.md` / `README.md` / `ROADMAP.md` / `Docs/` / `Issues/` / `Progress/` を揃える
|
|
9
|
-
- [ ] PRD を `4_Project/<ProjectName>/Docs/` に置く
|
|
10
|
-
- [ ] approved issue を `4_Project/<ProjectName>/Issues/` に切る
|
|
11
|
-
- [ ] OSS repo 側で実装する
|
|
12
|
-
- [ ] `npm run ci` / `npm test` / `npm pack --dry-run` を通す
|
|
13
|
-
- [ ] release 後に Vault へ learnings / release notes を戻す
|
|
14
|
-
|
|
15
|
-
## Repository
|
|
16
|
-
|
|
17
|
-
- [ ] GitHub repository name を決める
|
|
18
|
-
- [ ] GitHub About 欄を書く
|
|
19
|
-
- [ ] GitHub topics を設定する
|
|
20
|
-
- [ ] `pi`
|
|
21
|
-
- [ ] `pi-package`
|
|
22
|
-
- [ ] `agent-skill`
|
|
23
|
-
- [ ] `typescript`
|
|
24
|
-
- [ ] GitHub Settingsで `Template repository` をONにする
|
|
25
|
-
- [ ] Repository URL を `package.json` に反映する
|
|
26
|
-
- [ ] README の `OWNER/REPO` を実リポジトリに置き換える
|
|
27
|
-
|
|
28
|
-
## Package metadata
|
|
29
|
-
|
|
30
|
-
- [ ] `package.json` の `name` を変更する
|
|
31
|
-
- [ ] `description` を書く
|
|
32
|
-
- [ ] `author` を入れる
|
|
33
|
-
- [ ] `repository.url` を埋める
|
|
34
|
-
- [ ] `bugs.url` を埋める
|
|
35
|
-
- [ ] `homepage` を埋める
|
|
36
|
-
- [ ] `keywords` を見直す
|
|
37
|
-
- [ ] `LICENSE` の年・名前を更新する
|
|
38
|
-
|
|
39
|
-
## README placeholders
|
|
40
|
-
|
|
41
|
-
- [ ] `PACKAGE_DISPLAY_NAME` を置き換える
|
|
42
|
-
- [ ] `PACKAGE_NAME` を置き換える
|
|
43
|
-
- [ ] `OWNER/REPO` を置き換える
|
|
44
|
-
- [ ] one-line pitch を書く
|
|
45
|
-
- [ ] feature list を書く
|
|
46
|
-
- [ ] quick start command を実コマンドにする
|
|
47
|
-
- [ ] npm URL を確認する
|
|
48
|
-
- [ ] GitHub URL を確認する
|
|
49
|
-
|
|
50
|
-
## Pi package manifest
|
|
51
|
-
|
|
52
|
-
- [ ] `pi.extensions` に公開する拡張だけを残す
|
|
53
|
-
- [ ] `pi.skills` に公開する skill だけを残す
|
|
54
|
-
- [ ] 不要なら `prompts/` を消す
|
|
55
|
-
- [ ] 不要なら `themes/` を消す
|
|
56
|
-
- [ ] サンプル名を実名に変える
|
|
57
|
-
|
|
58
|
-
## Documentation
|
|
59
|
-
|
|
60
|
-
`docs/` は固定6ファイル必須ではない。README を正とし、価値がある doc だけ残す。
|
|
61
|
-
|
|
62
|
-
### Required root files (public)
|
|
63
|
-
|
|
64
|
-
- [ ] `README.md` — GitHub/npm の入口。Install / Quick start / Release / Security を含める
|
|
65
|
-
- [ ] `LICENSE`
|
|
66
|
-
- [ ] `SECURITY.md`
|
|
67
|
-
- [ ] `CHANGELOG.md`
|
|
68
|
-
- [ ] Release 手順が README と workflow で明確(Trusted Publishing 設定含む)
|
|
69
|
-
|
|
70
|
-
### Recommended public docs (keep when useful)
|
|
71
|
-
|
|
72
|
-
- [ ] `docs/examples.md` — 例が README に載り切らないとき
|
|
73
|
-
- [ ] `docs/release.md` — Trusted Publishing や release 手順の詳細が README だけでは足りないとき
|
|
74
|
-
- [ ] `docs/usage.md` — 使い方が README に載り切らないとき(必要なら新規作成)
|
|
75
|
-
|
|
76
|
-
### Optional maintainer docs
|
|
77
|
-
|
|
78
|
-
- [ ] `docs/template-checklist.md` — このファイル。成熟 repo では README からの主ナビにしない。不要なら削除可
|
|
79
|
-
|
|
80
|
-
### Post-generation cleanup (delete or merge template setup docs)
|
|
81
|
-
|
|
82
|
-
テンプレート生成直後の bootstrap 用。プロジェクト固有の価値がなければ削除し、必要な内容は README / `docs/release.md` / `docs/examples.md` に統合する。
|
|
83
|
-
|
|
84
|
-
- [ ] `docs/github-template.md` を削除するか、固有の手順だけ README / Vault に移す
|
|
85
|
-
- [ ] `docs/repository-settings.md` を削除するか、About/topics など必要分だけ README に移す
|
|
86
|
-
- [ ] `docs/typescript.md` を削除するか、TypeScript 方針は README Development に要約する
|
|
87
|
-
- [ ] README の Docs 節から、削除したファイルへのリンクを外す
|
|
88
|
-
- [ ] `package.json` の `files` から、削除した `docs/` パスを外す(残す doc だけ明示する)
|
|
89
|
-
|
|
90
|
-
## TypeScript
|
|
91
|
-
|
|
92
|
-
- [ ] `extensions/index.ts` を実装に合わせて更新する
|
|
93
|
-
- [ ] `extensions/hello.ts` が不要なら削除する
|
|
94
|
-
- [ ] 共通ロジックを `lib/` に切り出す
|
|
95
|
-
- [ ] `strict: true` を維持する
|
|
96
|
-
- [ ] custom tool parameters は TypeBox schema で定義する
|
|
97
|
-
- [ ] string choices は `StringEnum` helper を使う
|
|
98
|
-
- [ ] runtime dependency は `dependencies`、Pi提供packageは `peerDependencies` に置く
|
|
99
|
-
- [ ] `package.json.files` に公開対象だけを入れる
|
|
100
|
-
- [ ] 詳細はセットアップ中だけ `docs/typescript.md` を参照し、不要なら post-generation cleanup で削除
|
|
101
|
-
|
|
102
|
-
## GitHub Template repo
|
|
103
|
-
|
|
104
|
-
- [ ] `gh repo create --template OWNER/pi-extension-template` で作成できることを確認する
|
|
105
|
-
- [ ] public/privateどちらの作成例もdocsに載せる(`docs/github-template.md` を残す場合)
|
|
106
|
-
|
|
107
|
-
## CI / Release
|
|
108
|
-
|
|
109
|
-
- [ ] `npm run ci` が通る
|
|
110
|
-
- [ ] `npm pack --dry-run` が通る
|
|
111
|
-
- [ ] npm Trusted Publishing を設定する
|
|
112
|
-
- [ ] npm Trusted Publisher の workflow filename が `publish.yml` になっている
|
|
113
|
-
- [ ] `NPM_TOKEN` を使っていないことを確認する
|
|
114
|
-
- [ ] `auto-release.yml` が `main` の version bump から tag/release を作ることを確認する
|
|
115
|
-
- [ ] `publish.yml` が `workflow_dispatch` と `release.published` に対応していることを確認する
|
|
116
|
-
- [ ] 初回リリースで npm provenance が付いているか確認する
|
|
117
|
-
|
|
118
|
-
### Workflow handoff guard
|
|
119
|
-
|
|
120
|
-
- [ ] `.github/workflows/auto-release.yml` exists before first release
|
|
121
|
-
- [ ] `.github/workflows/publish.yml` exists before first release
|
|
122
|
-
- [ ] `auto-release.yml` has `permissions: actions: write` and `contents: write`
|
|
123
|
-
- [ ] `publish.yml` has `permissions: id-token: write` for npm Trusted Publishing
|
|
124
|
-
- [ ] Auto release explicitly hands off to publish: `gh workflow run publish.yml --ref "$TAG" -f ref="$TAG"`, or `publish.yml` has an equivalent `workflow_run` / `repository_dispatch` trigger
|
|
125
|
-
- [ ] Do not rely only on `push.tags` or `release.published` when the tag/release is created by `GITHUB_TOKEN`; that can leave npm unchanged after merge
|
|
126
|
-
|
|
127
|
-
## npm page
|
|
128
|
-
|
|
129
|
-
- [ ] npm package URL を README に追加する
|
|
130
|
-
- [ ] npm description が適切に表示されるか確認する
|
|
131
|
-
- [ ] provenance が付いているか確認する
|
|
132
|
-
- [ ] 不要なファイルが package に含まれていないか確認する(`npm pack --dry-run` で `docs/` の残し方も確認)
|
|
133
|
-
|
|
134
|
-
## Before first release
|
|
135
|
-
|
|
136
|
-
- [ ] サンプルコードを実機 Pi でロードする
|
|
137
|
-
- [ ] `pi install git:github.com/OWNER/REPO` を試す
|
|
138
|
-
- [ ] `pi -e .` を試す
|
|
139
|
-
- [ ] README のコマンドがコピペで動くか確認する
|
|
140
|
-
- [ ] CHANGELOG に `0.1.0` を書く
|
package/docs/typescript.md
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# TypeScript Guide
|
|
2
|
-
|
|
3
|
-
> **Template bootstrap doc.** Use while learning this template's TypeScript layout and dependency rules. Delete this file or summarize the policies you keep in README Development once setup is done, unless it still adds maintainer value.
|
|
4
|
-
|
|
5
|
-
This is a TypeScript-first Pi package template.
|
|
6
|
-
|
|
7
|
-
## Layout
|
|
8
|
-
|
|
9
|
-
```txt
|
|
10
|
-
extensions/*.ts Pi extension entrypoints
|
|
11
|
-
lib/*.ts Shared TypeScript helpers
|
|
12
|
-
skills/*/SKILL.md Agent Skills
|
|
13
|
-
prompts/*.md Prompt templates
|
|
14
|
-
themes/*.json Themes
|
|
15
|
-
tests/*.test.mjs Smoke tests
|
|
16
|
-
tests/*.test.ts Optional TypeScript tests if you add a TS test runner
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Pi loads TypeScript extensions directly, so no build step is required for normal use.
|
|
20
|
-
|
|
21
|
-
## Strict mode
|
|
22
|
-
|
|
23
|
-
`tsconfig.json` keeps `strict: true`. Prefer fixing types over loosening compiler options.
|
|
24
|
-
|
|
25
|
-
## Extension entrypoints
|
|
26
|
-
|
|
27
|
-
Two entrypoint styles are shown:
|
|
28
|
-
|
|
29
|
-
- `extensions/hello.ts`: single-file extension
|
|
30
|
-
- `extensions/index.ts`: index-style extension that imports shared code from `lib/`
|
|
31
|
-
|
|
32
|
-
For larger packages, keep entrypoints thin and put reusable logic in `lib/`.
|
|
33
|
-
|
|
34
|
-
## TypeBox schemas
|
|
35
|
-
|
|
36
|
-
Use TypeBox schemas for custom tool parameters.
|
|
37
|
-
|
|
38
|
-
```ts
|
|
39
|
-
import { Type } from "typebox";
|
|
40
|
-
|
|
41
|
-
const parameters = Type.Object({
|
|
42
|
-
name: Type.String({ description: "Name to greet" }),
|
|
43
|
-
});
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## String enums
|
|
47
|
-
|
|
48
|
-
For string choices, use the local `StringEnum` helper from `lib/schema.ts`.
|
|
49
|
-
|
|
50
|
-
```ts
|
|
51
|
-
import { StringEnum } from "../lib/schema.ts";
|
|
52
|
-
|
|
53
|
-
const mode = StringEnum(["short", "friendly"], {
|
|
54
|
-
description: "Greeting style",
|
|
55
|
-
});
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
This emits a JSON Schema `enum`, which is friendlier to model providers than a union of string literals.
|
|
59
|
-
|
|
60
|
-
## Runtime dependencies vs peer dependencies
|
|
61
|
-
|
|
62
|
-
Pi bundles core packages for extension authors. Keep Pi-provided packages as `peerDependencies` and also install them as `devDependencies` for local typechecking.
|
|
63
|
-
|
|
64
|
-
Use `peerDependencies` for:
|
|
65
|
-
|
|
66
|
-
- `@earendil-works/pi-coding-agent`
|
|
67
|
-
- `@earendil-works/pi-ai`
|
|
68
|
-
- `@earendil-works/pi-tui`
|
|
69
|
-
- `typebox`
|
|
70
|
-
|
|
71
|
-
Use `dependencies` for runtime packages your extension imports that Pi does not provide.
|
|
72
|
-
|
|
73
|
-
Use `devDependencies` for local-only tools such as TypeScript, test runners, and linters.
|
|
74
|
-
|
|
75
|
-
## Package contents
|
|
76
|
-
|
|
77
|
-
Control npm package contents with `package.json` `files`. Prefer this over `.npmignore` so the published package stays explicit.
|