| summary | read_when | system4d | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Overview and quickstart for pi-little-helpers. |
|
|
A pi extension package with utilities for code block selection, package update notifications, and conversation stashing.
pi install npm:@tryinget/pi-little-helpers| Extension | Description |
|---|---|
code-block-picker |
Interactive code block selection from assistant responses |
package-update-notify |
Checks for updates to pinned npm/git packages in pi settings |
stash |
Manage conversation stashes for context switching |
Shared utilities live in lib/package-utils.ts (used by package-update-notify).
-
Clone and install:
git clone https://github.com/tryingET/pi-little-helpers.git cd pi-little-helpers npm install -
Pi auto-discovers extensions when working in this directory.
This extension expects pi host runtime APIs and declares them as peerDependencies:
@mariozechner/pi-coding-agent@mariozechner/pi-ai
When using UI APIs (ctx.ui), guard interactive-only behavior with ctx.hasUI so pi -p non-interactive runs stay stable.
Run:
npm run checkcheck routes to quality:ci via scripts/quality-gate.sh.
It enforces structure validation, Biome lint checks, optional TypeScript typechecks, and npm pack dry-run.
- formatter/lint baseline:
- biome.jsonc
- .vscode/settings.json (Biome formatter + code actions on save for JS/TS/JSON)
- pinned local binary via
@biomejs/biomeindevDependencies
- scripts/quality-gate.sh stages:
pre-commitpre-pushci
- npm script entry points:
npm run quality:pre-commitnpm run quality:pre-pushnpm run quality:ci
- helper scripts:
npm run fix(auto-fix)npm run lint(check-only)npm run typecheck
- lane metadata:
This scaffold defaults to release-please for single-package release PR + tag flow (vX.Y.Z), npm trusted publishing via OIDC, and deterministic release artifact checks.
Included files:
- CI workflow
- release-check workflow
- release-please workflow
- publish workflow
- release-check script
- Dependabot config
- CODEOWNERS
- release-please config
- release-please manifest
- Security policy
Trusted-publishing defaults captured in this scaffold:
- release-please uses
vX.Y.Ztags (include-component-in-tag: false) to align with publish trigger logic. - release-please action is pinned to an immutable v4.4.0 SHA.
- publish workflow and release-check workflow both upgrade npm (
>=11.5.1) for consistent trusted publishing behavior. - setup-node uses
package-manager-cache: falseto avoid implicit caching behavior changes from setup-node v5+. - setup-node v6 / setup-python v6 / upload-artifact v6 require Actions Runner
>=2.327.1on self-hosted runners (GitHub-hosted runners already satisfy this). - release-check script tolerates npm
already published versiondry-run responses for post-release idempotency. - package metadata must include
repository.urlmatching the GitHub repo for npm provenance verification.
Recommended before release:
npm run release:check
# quick mode for CI / no local pi smoke
npm run release:check:quickOptional: add an executable scripts/release-smoke.sh for extension-specific smoke checks.
release-check.sh will run it with isolated PI_CODING_AGENT_DIR and PACKAGE_SPEC env vars.
Before first production release:
- Confirm/adjust owners in .github/CODEOWNERS.
- Enable branch protection on
main. - Confirm GitHub Actions repo settings:
- workflow permissions:
Read and write - allow GitHub Actions to create/approve PRs
- allowed actions policy permits marketplace actions used by workflows
- workflow permissions:
- Configure npm Trusted Publishing for this repo + publish workflow.
- If this is a brand-new npm package, perform one bootstrap token publish first, then add the trusted publisher in npm package settings.
- Merge release PR from release-please, then publish from GitHub release.
Included files:
- Bug report form
- Feature request form
- Docs request form
- Issue template config
- PR template
- Code of conduct
- Support guide
- Top-level contributing guide
Included files:
Default behavior:
- PR workflow runs on
pull_request_target(opened,reopened). require-vouch: trueandauto-close: trueare enabled by default.- Maintainers can comment
vouch,denounce, orunvouchon issues to update trust state. - Vouch actions are SHA pinned for reproducibility and supply-chain review.
Bootstrap step:
- Confirm/adjust entries in .github/VOUCHED.td before enforcing production policy.
Run:
npm run docs:list
npm run docs:list:workspace
npm run docs:list:jsonWrapper script: scripts/docs-list.sh
Resolution order:
DOCS_LIST_SCRIPT./scripts/docs-list.mjs(if vendored)~/ai-society/core/agent-scripts/scripts/docs-list.mjs
TypeScript lane reference for pi extensions:
uv tool run --from ~/ai-society/core/tech-stack-core tech-stack-core show pi-ts --prefer-repoPinned lane metadata lives in policy/stack-lane.json.
- Keep
.copier-answers.ymlcommitted. - Do not edit
.copier-answers.ymlmanually. - Run from a clean destination repo (commit or stash pending changes first).
- Use
copier update --trustwhen.copier-answers.ymlincludes_commitand update is supported. - In non-interactive shells/CI, append
--defaultsto update/recopy. - Use
copier recopy --trustwhen update is unavailable (for example local non-VCS source) or cannot reconcile cleanly. - After recopy, re-apply local deltas intentionally and run
npm run check.
- Git hooks path is configured to
.githooksby scripts/install-hooks.sh. - .githooks/pre-commit runs:
scripts/quality-gate.sh pre-commit- check-only (auto-fix with
npm run fix)
- .githooks/pre-push runs:
scripts/quality-gate.sh pre-push
- Repo-local commit workflow prompt:
Use scripts/sync-to-live.sh to copy extension entrypoints plus
shared src/ modules into ~/.pi/agent/extensions/pi-little-helpers/.
Optional flags:
--with-prompts--with-policy--all(prompts + policy)
After sync, run /reload in pi.