@counterposition/skill-pi 0.1.1 → 0.65.1

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/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  Single-skill npm package for installing the `pi` skill with `pi install`.
4
4
 
5
+ Package versions track the Pi coding agent release that the bundled skill
6
+ documentation targets.
7
+
5
8
  ## Install
6
9
 
7
10
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@counterposition/skill-pi",
3
- "version": "0.1.1",
3
+ "version": "0.65.1",
4
4
  "description": "Pi skill package for pi install",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -1,44 +1,48 @@
1
1
  # Pi Skill
2
2
 
3
- Reference skill for the Pi coding agent.
3
+ > Knowing others is intelligence; knowing yourself is true wisdom.
4
+ >
5
+ > — Lao Tzu, *Tao Te Ching*
4
6
 
5
- - Use when working on Pi extensions, skills, settings, packages, SDK usage, providers, sessions, or compaction.
6
- - Good trigger terms: `.pi/`, `SKILL.md`, `models.json`, `pi-ai`, `pi-tui`, `pi-agent-core`, `pi-coding-agent`.
7
- - Not for Raspberry Pi hardware or the math constant.
7
+ A coding agent that cannot reason about its own architecture will invent APIs that don't exist, hallucinate configuration formats, and give confident wrong answers about its own internals. The failure mode is subtle: the answers *sound* right, because the agent knows how systems like it tend to work. But Pi is specific, and the details matter.
8
+
9
+ This skill gives Pi self-knowledge. It injects task-specific reference documentation into context so that Pi reasons from grounded facts — about its extensions, settings, providers, sessions, and SDK — rather than from plausible fictions.
10
+
11
+ Without this skill, Pi guesses about itself. With it, Pi *knows*.
8
12
 
9
13
  ## Install
10
14
 
11
15
  ```bash
12
- # multi-skill repo
16
+ # as a skill
13
17
  npx skills add counterposition/pi --skill pi
14
18
 
15
- # pi install from npm
19
+ # as a Pi package
16
20
  pi install npm:@counterposition/skill-pi
17
21
  ```
18
22
 
19
- Maintainer smoke tests:
23
+ ### Maintainer Paths
20
24
 
21
25
  ```bash
22
- # canonical skill from a local checkout
26
+ # from a local checkout
23
27
  npx skills add /absolute/path/to/pi --skill pi
24
28
 
25
- # packaged Pi install from the monorepo root
29
+ # packaged install from monorepo root
26
30
  pi install ./packages/skill-pi
27
31
  ```
28
32
 
29
- If you are developing inside this repo, Pi already loads the canonical skill via `.pi/settings.json`, so you usually do not need `pi install`.
33
+ If you develop inside this repo, Pi already loads the skill via `.pi/settings.json`.
34
+
35
+ ## What this covers
30
36
 
31
- ## Covers
37
+ Pi's architecture and package layout. Skill authoring, discovery, and routing. Extensions, tools, and UI hooks. Settings, models, providers, and packages. Sessions, forks, and compaction. The SDK and RPC interface.
32
38
 
33
- - Pi architecture and package layout
34
- - Skill authoring and discovery
35
- - Extensions, tools, and UI hooks
36
- - Settings, models, providers, and packages
37
- - Sessions, forks, and compaction
39
+ The reference material lives in `references/` as task-specific documents — not a single monolith, but pieces sized for injection into a conversation when relevant.
38
40
 
39
41
  ## Files
40
42
 
41
- - `SKILL.md` - trigger description and routing
42
- - `LICENSE.md` - bundled GPLv3 license text
43
- - `references/` - task-specific Pi docs
44
- - `evals/evals.json` - example eval cases
43
+ | Path | Purpose |
44
+ |---|---|
45
+ | `SKILL.md` | Trigger rules and routing description |
46
+ | `references/` | Task-specific Pi reference documents |
47
+ | `evals/evals.json` | Example evaluation cases |
48
+ | `LICENSE.md` | GPLv3 license text |
@@ -7,13 +7,13 @@ compatibility: "Pi-specific guidance for agents that support Agent Skills"
7
7
 
8
8
  # Pi Coding Agent
9
9
 
10
- Pi is a minimal, extensible terminal coding agent. It ships four default tools (read, write, edit, bash) and four execution modes (interactive TUI, print/JSON, RPC, SDK). Everything else — sub-agents, plan mode, permission popups, MCP — is added through extensions.
10
+ Pi is a minimal terminal coding harness. It ships four default tools (`read`, `write`, `edit`, `bash`) and four execution modes (interactive TUI, print, JSON/RPC, SDK). Features like sub-agents, plan mode, permission flows, and MCP are intentionally left to extensions and Pi packages.
11
11
 
12
12
  Pi's philosophy: **adapt Pi to your workflows, not the other way around**. Users extend it via TypeScript extensions, skills, prompt templates, themes, and shareable Pi packages.
13
13
 
14
14
  ## Architecture at a Glance
15
15
 
16
- Pi is a monorepo with four core packages:
16
+ The coding-agent stack centers on four core packages. The monorepo also includes adjacent packages such as `pi-web-ui`, `pi-mom`, and `pi-pods`.
17
17
 
18
18
  | Package | npm | Purpose |
19
19
  |---------|-----|---------|
@@ -76,6 +76,12 @@ Bundles of extensions, skills, prompts, and themes distributed via npm, git, or
76
76
 
77
77
  Read `references/packages.md` for the package structure, `pi` manifest field, installation, and publishing.
78
78
 
79
+ ### Context Files & Prompt Templates
80
+
81
+ Pi loads `AGENTS.md` or `CLAUDE.md` from the global agent dir and from `cwd` up through parent directories. `.pi/SYSTEM.md` replaces the default system prompt, and `APPEND_SYSTEM.md` appends to it. Prompt templates in `prompts/` directories become slash commands.
82
+
83
+ Read `references/settings.md` for discovery rules and config keys, and `references/packages.md` for how prompts/themes ship in packages.
84
+
79
85
  ### SDK
80
86
 
81
87
  Programmatic embedding via `createAgentSession()`. Gives full control over models, tools, extensions, sessions, and event streaming.
@@ -99,6 +105,7 @@ Read `references/patterns.md` for copy-paste-ready examples.
99
105
  Sessions are append-only JSONL files with a tree structure (entries linked by `id`/`parentId`). This allows branching without modifying history. Key operations:
100
106
 
101
107
  - **`/tree`** — Navigate the session tree, jump to any point
108
+ - **`Shift+T` in `/tree`** — Toggle timestamps on tree entry labels
102
109
  - **`/compact`** — Manually trigger context compaction
103
110
  - **`/fork`** — Branch from a specific point
104
111
  - **Auto-compaction** — Triggers when `contextTokens > contextWindow - reserveTokens`
@@ -117,7 +124,7 @@ Compaction walks backward from the newest message, keeping `keepRecentTokens` (d
117
124
  | `find` | Find files by glob pattern |
118
125
  | `ls` | List directory contents |
119
126
 
120
- **Tool presets:** `CODING_TOOLS` = [read, bash, edit, write], `READ_ONLY_TOOLS` = [read, grep, find, ls], `ALL_TOOLS` = all seven.
127
+ **Common tool sets:** `codingTools()` = `[read, bash, edit, write]`, `readOnlyTools()` = `[read, grep, find, ls]`. When you provide a custom `cwd` and explicit tools in the SDK, use `createCodingTools(cwd)` / `createReadOnlyTools(cwd)` so path resolution stays correct.
121
128
 
122
129
  ## Execution Modes
123
130
 
@@ -125,34 +132,60 @@ Compaction walks backward from the newest message, keeping `keepRecentTokens` (d
125
132
  |------|-----------|----------|
126
133
  | Interactive | `pi` | Full TUI with editor, streaming, keybindings |
127
134
  | Print | `pi -p "prompt"` | Single-shot text output |
128
- | JSON | `pi --mode json -p "prompt"` | Newline-delimited JSON events |
135
+ | JSON | `pi --mode json "prompt"` | Newline-delimited event stream |
129
136
  | RPC | `pi --mode rpc` | JSON-RPC over stdin/stdout for IDE integration |
130
137
  | SDK | `createAgentSession()` | Embed in Node.js applications |
131
138
 
132
139
  ## Quick Reference: CLI Flags
133
140
 
134
141
  ```text
135
- pi [options] [message]
136
-
137
- --model, -m <model> Model (e.g., "claude-sonnet-4-20250514")
138
- --provider <name> Provider name
139
- --api-key <key> API key override
140
- --tools <list> Comma-separated tool names
141
- --extensions, -e <path> Load extension from path
142
- --skills <path> Load skill from path
143
- --system-prompt <text> Override system prompt
144
- --thinking-level <level> off | minimal | low | medium | high | xhigh
145
- --new Start new session
146
- --resume <id> Resume session by ID
147
- --fork <id> Fork from session
148
- --continue-recent Continue most recent session
149
- --no-session Don't persist session
150
- --mode <mode> json | rpc
151
- -p Print mode (non-interactive)
152
- install <source> Install package (npm:pkg, git:url, path)
153
- remove <pkg> Remove package
154
- update Update packages
155
- list List installed packages
142
+ pi [options] [@files...] [messages...]
143
+
144
+ # package commands
145
+ install <source> [-l]
146
+ remove <source> [-l]
147
+ uninstall <source> [-l]
148
+ update [source]
149
+ list
150
+ config
151
+
152
+ # modes and output
153
+ -p, --print
154
+ --mode json|rpc
155
+ --export <in> [out]
156
+
157
+ # model selection
158
+ --provider <name>
159
+ --model <pattern>
160
+ --api-key <key>
161
+ --thinking <level>
162
+ --models <patterns>
163
+ --list-models [search]
164
+
165
+ # sessions
166
+ -c, --continue
167
+ -r, --resume
168
+ --session <path|id>
169
+ --fork <path|id>
170
+ --session-dir <dir>
171
+ --no-session
172
+
173
+ # tools and resources
174
+ --tools <list>
175
+ --no-tools
176
+ -e, --extension <source>
177
+ --skill <path>
178
+ --prompt-template <path>
179
+ --theme <path>
180
+ --no-extensions
181
+ --no-skills
182
+ --no-prompt-templates
183
+ --no-themes
184
+
185
+ # prompts and misc
186
+ --system-prompt <text>
187
+ --append-system-prompt <text>
188
+ --verbose
156
189
  ```
157
190
 
158
191
  ## How to Use This Skill
@@ -164,6 +197,7 @@ When working with Pi, read the appropriate reference file for the task at hand:
164
197
  | Writing an extension (tools, commands, events, UI) | `references/extensions.md` |
165
198
  | Creating a skill (SKILL.md authoring) | `references/skills.md` |
166
199
  | Configuring Pi (settings.json options) | `references/settings.md` |
200
+ | Context files, prompt templates, themes, and resource discovery | `references/settings.md` and `references/packages.md` |
167
201
  | Building a shareable package | `references/packages.md` |
168
202
  | Embedding Pi programmatically | `references/sdk.md` |
169
203
  | Adding LLM providers or models | `references/providers.md` |