asmundwien-pi-kit

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

pi-kit

A small kit of utility commands for the pi CLI.

Install

From npm

pi install npm:@asmundwien/pi-kit

From git

pi install git:github.com/asmundwien/pi-kit

From a local checkout

pi install /absolute/path/to/pi-kit

To try it without installing:

pi -e ./extensions/code.ts

Agent tools

collect_decisions

Lets the agent collect multiple dependent human decisions through an interactive one-topic-at-a-time TUI. Each topic shows a concise problem, suggested answers, and an option to write a custom answer. Answered choices are marked with ; custom answers are shown inline next to the custom option. Press Esc to pause and return partial answers plus pending decisions to the agent. When resumed, previous answers can be prefilled so the full decision collection remains navigable.

Use case: replacing a wall of clarification questions with a navigable decision collection.

Skills

collect-decisions

Loads behavioral guidance for agents that are about to present multiple human decisions, clarification questions, options, or trade-offs. The skill tells the agent to use the collect_decisions tool for multi-item decision lists so the user answers one topic at a time instead of receiving a wall of questions.

harden

Loads behavioral guidance for hardening code, docs, designs, or agent-produced changes before completion. The workflow reviews from multiple angles, fixes safe in-scope issues, verifies the result, and escalates decisions that need human judgment.

Commands

/harden [target and criteria]

Asks the agent to load the harden skill and harden the requested target. By default, safe in-scope findings are fixed automatically; product, UX, architecture, security posture, public-contract, and scope decisions are escalated. If the agent is busy, the request is queued as a follow-up, so state-sensitive targets such as "current diff" are evaluated when the follow-up runs.

Examples:

/harden current diff against the requested behavior
/harden docs/ARCHITECTURE.md for consistency with this change

/picock [color|style|reset]

Colors the Pi input editor border so the current project is easy to identify when several Pi windows are open. The identity is persisted in .pi/picock.json for the project.

  • /picock opens an action selector for color, style, or reset.
  • /picock color chooses a favorite color with live preview while navigating.
  • /picock style chooses a border character preset with live preview: minimal, heavy, double, or block.
  • /picock reset removes the project identity and restores the default editor border.

The selected color is shown through the top and bottom border lines. The centered label shows values only, such as project, model, and thinking level.

/code [args...]

Runs the VS Code code CLI and forwards arguments.

Examples:

/code .
/code --new-window "path with spaces"

/open [args...]

Opens files, directories, or URLs with the OS default opener and forwards arguments.

Uses open on macOS, xdg-open on Linux, and start through cmd on Windows.

Examples:

/open .
/open https://github.com/asmundwien/pi-kit
/open "path with spaces"

Development

This project uses pnpm.

pnpm install
pnpm run check
pnpm run pack:dry-run

pnpm run check runs deterministic checks:

  • Biome format check
  • Biome lint
  • TypeScript typecheck

The same checks run in the pre-commit hook and GitHub Actions.

Governance

Contributing

See CONTRIBUTING.md.