planr 1.8.0 → 1.9.0

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.
@@ -0,0 +1,164 @@
1
+ # Pi Integration Contract v1
2
+
3
+ Status: frozen for implementation
4
+
5
+ Frozen: 2026-07-27
6
+
7
+ Upstream source probes:
8
+
9
+ - `earendil-works/pi` `main` commit
10
+ `a597371bda2af70372d1323d550483b5f4a0ae36` (2026-07-27).
11
+ - Pi release `v0.82.1` commit
12
+ `b4f293684bba718d59cc1157679bcf6157b3a7f5` (2026-07-27).
13
+ - `nicobailon/pi-subagents` `main` commit `73fb2fc` (2026-07-27).
14
+
15
+ The Pi repository currently publishes release tags ahead of the fetched
16
+ `main` version line, so this contract records both: `main` is the requested
17
+ source probe, while `v0.82.1` is the latest released runtime/API baseline.
18
+
19
+ This contract is the implementation boundary for first-class Pi support.
20
+ It follows Pi's native extension model instead of treating every coding agent
21
+ as an MCP host. Pi core deliberately ships without MCP, subagents, plan mode,
22
+ or permission popups. It natively discovers Agent Skills and can run their CLI
23
+ workflows through its built-in `bash` tool.
24
+
25
+ ## Frozen artifact and discovery policy
26
+
27
+ `planr install pi` owns exactly the repository paths in the executable
28
+ contract below. Workflow files are copied byte-for-byte from the canonical
29
+ `plugins/planr/skills` sources. Pi-specific role bodies exist only because
30
+ `pi-subagents` frontmatter is not interchangeable with Claude/Cursor role
31
+ frontmatter: it uses `thinking`, explicit tool/skill inheritance controls, and
32
+ project agents under `.pi/agents/**/*.md`.
33
+
34
+ Pi loads `.pi/skills/` only after the repository is trusted. Interactive Pi
35
+ asks for trust; non-interactive `-p`, JSON, and RPC runs ignore untrusted
36
+ project resources by default. A headless operator who has deliberately chosen
37
+ to trust the repository passes `--approve` for that run. Planr never writes
38
+ Pi's user trust store or `.pi/settings.json`.
39
+
40
+ `pi-subagents` is optional. When installed, it discovers both Planr roles.
41
+ Without it, the role files are inert and the same Planr skills remain usable
42
+ in the parent Pi session or separate Pi processes.
43
+
44
+ ```json
45
+ {
46
+ "contract_version": 1,
47
+ "pi_main_revision": "a597371bda2af70372d1323d550483b5f4a0ae36",
48
+ "pi_release": {
49
+ "tag": "v0.82.1",
50
+ "revision": "b4f293684bba718d59cc1157679bcf6157b3a7f5"
51
+ },
52
+ "pi_subagents_revision": "73fb2fc",
53
+ "artifacts": [
54
+ {"target": ".pi/agents/planr-reviewer.md", "source": "plugins/planr/agents/pi/planr-reviewer.md", "kind": "agent"},
55
+ {"target": ".pi/agents/planr-worker.md", "source": "plugins/planr/agents/pi/planr-worker.md", "kind": "agent"},
56
+ {"target": ".pi/skills/planr-goal/SKILL.md", "source": "plugins/planr/skills/planr-goal/SKILL.md", "kind": "skill"},
57
+ {"target": ".pi/skills/planr-loop/SKILL.md", "source": "plugins/planr/skills/planr-loop/SKILL.md", "kind": "skill"},
58
+ {"target": ".pi/skills/planr-loop/agents/planr-reviewer.md", "source": "plugins/planr/skills/planr-loop/agents/planr-reviewer.md", "kind": "skill_asset"},
59
+ {"target": ".pi/skills/planr-loop/agents/planr-worker.md", "source": "plugins/planr/skills/planr-loop/agents/planr-worker.md", "kind": "skill_asset"},
60
+ {"target": ".pi/skills/planr-loop/references/host-dispatch.md", "source": "plugins/planr/skills/planr-loop/references/host-dispatch.md", "kind": "skill_asset"},
61
+ {"target": ".pi/skills/planr-loop/references/recovery-and-verification.md", "source": "plugins/planr/skills/planr-loop/references/recovery-and-verification.md", "kind": "skill_asset"},
62
+ {"target": ".pi/skills/planr-plan/SKILL.md", "source": "plugins/planr/skills/planr-plan/SKILL.md", "kind": "skill"},
63
+ {"target": ".pi/skills/planr-review/SKILL.md", "source": "plugins/planr/skills/planr-review/SKILL.md", "kind": "skill"},
64
+ {"target": ".pi/skills/planr-status/SKILL.md", "source": "plugins/planr/skills/planr-status/SKILL.md", "kind": "skill"},
65
+ {"target": ".pi/skills/planr-summary/SKILL.md", "source": "plugins/planr/skills/planr-summary/SKILL.md", "kind": "skill"},
66
+ {"target": ".pi/skills/planr-task-graph/SKILL.md", "source": "plugins/planr/skills/planr-task-graph/SKILL.md", "kind": "skill"},
67
+ {"target": ".pi/skills/planr-verify-web/SKILL.md", "source": "plugins/planr/skills/planr-verify-web/SKILL.md", "kind": "skill"},
68
+ {"target": ".pi/skills/planr-work/SKILL.md", "source": "plugins/planr/skills/planr-work/SKILL.md", "kind": "skill"},
69
+ {"target": ".pi/skills/planr/SKILL.md", "source": "plugins/planr/skills/planr/SKILL.md", "kind": "skill"}
70
+ ],
71
+ "mcp": {"supported": false, "artifacts": []},
72
+ "extensions": {"emitted": false, "artifacts": []},
73
+ "hooks": {"supported": false, "artifacts": []},
74
+ "settings": {"emitted": false, "artifacts": []},
75
+ "trust": {
76
+ "project_resources_require_trust": true,
77
+ "interactive": "Pi prompts the operator",
78
+ "headless": "pass --approve only after choosing to trust the repository"
79
+ },
80
+ "observed_client": {
81
+ "environment": "PI_CODING_AGENT",
82
+ "accepted_value": "true",
83
+ "stored_value": "pi",
84
+ "advisory_only": true
85
+ },
86
+ "client_all_includes_pi": false,
87
+ "headless": {
88
+ "command": "pi --approve --model <provider/model> --thinking <level> -p \"<prompt>\""
89
+ }
90
+ }
91
+ ```
92
+
93
+ ## Pi role contract
94
+
95
+ Both role files use `pi-subagents` project-agent frontmatter:
96
+
97
+ - `name` is exactly `planr-worker` or `planr-reviewer`;
98
+ - `systemPromptMode: replace`;
99
+ - `inheritProjectContext: true`;
100
+ - `inheritSkills: false`;
101
+ - `skills` names exactly `planr-work` or `planr-review`;
102
+ - the worker tool allowlist includes read/search, `bash`, `edit`, and `write`;
103
+ - the reviewer tool allowlist includes read/search and mutation-capable `bash`,
104
+ but omits the `edit` and `write` tools;
105
+ - the reviewer declares `acceptanceRole: read-only` and
106
+ `completionGuard: false`, so pi-subagents treats the bash-enabled validator
107
+ as non-implementation work without changing its tool access;
108
+ - no role pins `model`, `thinking`, `fallbackModels`, provider credentials, or
109
+ extensions.
110
+
111
+ Model and thinking selection remain external host policy. Operators can use
112
+ Pi or `pi-subagents` settings/overrides, while Planr records only requested and
113
+ observed evidence.
114
+
115
+ ## Merge and overwrite policy
116
+
117
+ - Missing target: write the canonical packaged source.
118
+ - Existing identical content: unchanged.
119
+ - Existing different content: preserve without `--force`; replace only that
120
+ target with `--force`.
121
+ - `--no-mcp` and `--no-hooks` are accepted for install-command parity but
122
+ change no Pi path because the v1 artifact set contains neither.
123
+ - Dry-run enumerates the same paths the corresponding write reconciles.
124
+ - `project init --client pi` provisions the same skills and roles without
125
+ writing any other Pi artifact.
126
+ - `--client all` remains the legacy Codex, Claude Code, and Cursor expansion.
127
+
128
+ ## Runtime observation boundary
129
+
130
+ Pi documents that commands launched by its built-in tools receive
131
+ `PI_CODING_AGENT=true`. Planr accepts only that exact value as advisory
132
+ `runs.observed_client=pi`. Other values and other ambient `PI_*` variables are
133
+ ignored. The marker is not authentication, authorization, proof of model,
134
+ proof of `pi-subagents`, or worker identity.
135
+
136
+ Pi has no Planr hook in v1. Run `planr prime` manually after startup or
137
+ compaction when a fresh state block is useful. Agent Skills remain the primary
138
+ entry point: `/skill:planr` explicitly loads the router, while natural-language
139
+ requests may trigger Pi's skill discovery.
140
+
141
+ ## Security and CI boundary
142
+
143
+ Planr installation must not read or write:
144
+
145
+ - `~/.pi`, Pi auth files, provider keys, OAuth tokens, sessions, transcripts,
146
+ prompts, responses, model catalogs, package caches, or trust decisions;
147
+ - `.pi/settings.json`, `.pi/extensions/`, `.pi/prompts/`, or an MCP config;
148
+ - global `pi install`, `pi config`, package enablement, or user settings.
149
+
150
+ Release and CI workflows do not install/invoke Pi, `pi-subagents`, a provider,
151
+ or a live model. Deterministic tests parse the frozen contract, compile/write
152
+ assets into disposable repositories, and validate CLI/docs output.
153
+
154
+ ## Sources
155
+
156
+ - `packages/coding-agent/README.md` at Pi `v0.82.1`: project trust, skills,
157
+ extensions, packages, philosophy, CLI, and `PI_CODING_AGENT`.
158
+ - `packages/coding-agent/docs/skills.md` at Pi `v0.82.1`.
159
+ - `nicobailon/pi-subagents` README at `73fb2fc`: project agent discovery,
160
+ prompt assembly, frontmatter, and model overrides.
161
+ - `nicobailon/pi-subagents` `test/unit/agent-frontmatter.test.ts` and
162
+ `test/unit/path-resolution.test.ts` at `73fb2fc`.
163
+ - https://github.com/earendil-works/pi
164
+ - https://github.com/nicobailon/pi-subagents
@@ -4,14 +4,14 @@ This is the canonical inventory that maps shipped public surfaces to repository
4
4
 
5
5
  ## Published route inventory
6
6
 
7
- The site currently owns 62 MDX routes. Next.js also emits the landing page and framework support routes during the production build.
7
+ The site currently owns 63 MDX routes. Next.js also emits the landing page and framework support routes during the production build.
8
8
 
9
9
  | Section | Published routes |
10
10
  | --- | --- |
11
11
  | Documentation | `/docs` |
12
12
  | Getting started | `/docs/getting-started`, `/docs/getting-started/why-planr`, `/docs/getting-started/installation`, `/docs/getting-started/quickstart`, `/docs/getting-started/full-lifecycle`, `/docs/getting-started/choose-your-interface` |
13
13
  | For Agents | `/docs/agents`, `/docs/agents/quickstart`, `/docs/agents/prompt-recipes`, `/docs/agents/skills` |
14
- | Integrations | `/docs/integrations`, `/docs/integrations/codex`, `/docs/integrations/claude-code`, `/docs/integrations/cursor`, `/docs/integrations/grok-build`, `/docs/integrations/generic-mcp`, `/docs/integrations/cli-only` |
14
+ | Integrations | `/docs/integrations`, `/docs/integrations/codex`, `/docs/integrations/claude-code`, `/docs/integrations/cursor`, `/docs/integrations/grok-build`, `/docs/integrations/pi`, `/docs/integrations/generic-mcp`, `/docs/integrations/cli-only` |
15
15
  | Plugins | `/docs/plugins`, `/docs/plugins/switchloom` |
16
16
  | Concepts | `/docs/concepts`, `/docs/concepts/local-first-model`, `/docs/concepts/plans-and-map`, `/docs/concepts/graph-and-readiness`, `/docs/concepts/picks-and-leases`, `/docs/concepts/evidence-and-context`, `/docs/concepts/reviews-and-approvals`, `/docs/concepts/recovery-packages-and-closure` |
17
17
  | Guides | `/docs/guides`, `/docs/guides/daily-worker-loop`, `/docs/guides/parallel-coordination`, `/docs/guides/handoff-and-resume`, `/docs/guides/review-and-fix-loops`, `/docs/guides/recover-interrupted-work`, `/docs/guides/packages-and-reuse`, `/docs/guides/recipes` |
@@ -65,6 +65,7 @@ The executable and schema sources decide exact inventory. Editorial pages explai
65
65
  | Claude Code | Claude manifest, generated role/install assets | `/docs/integrations/claude-code` |
66
66
  | Cursor | Cursor manifest, role/skill/install assets | `/docs/integrations/cursor` |
67
67
  | Grok Build | Native role/skill assets and portable project MCP config | `/docs/integrations/grok-build` |
68
+ | Pi | Native Agent Skills, optional pi-subagents roles, and CLI-backed dispatch | `/docs/integrations/pi` |
68
69
  | Generic stdio MCP | MCP server and fixture | `/docs/integrations/generic-mcp` |
69
70
  | CLI-only and non-first-class hosts | prompt output and CLI | `/docs/integrations/cli-only` |
70
71
  | Privacy, secret handling, localhost boundary | safety spec, `src/app/http.rs`, scrub behavior | `/docs/contributing/security-and-privacy` |
@@ -87,7 +88,7 @@ The executable and schema sources decide exact inventory. Editorial pages explai
87
88
 
88
89
  ## Audit completion checklist
89
90
 
90
- - [x] All 62 current MDX routes are explicitly inventoried.
91
+ - [x] All 63 current MDX routes are explicitly inventoried.
91
92
  - [x] Every public product, CLI, MCP, HTTP, data, client, contributor, and operations surface has a current target and canonical source owner.
92
93
  - [x] Generated CLI and MCP inventories are separated from editorial guidance and mechanically checked.
93
94
  - [x] Retired aliases are isolated in `apps/docs/redirects.mjs` and resolve to a current route.
@@ -102,13 +102,13 @@
102
102
  ]
103
103
  },
104
104
  "cli_reference_commands": [
105
- "planr install codex|claude|cursor|grok",
105
+ "planr install codex|claude|cursor|grok|pi",
106
106
  "planr prompt cli|mcp|http",
107
107
  "planr prompt routing",
108
108
  "planr agents init",
109
109
  "planr agents init --profile|--skill|--route|--default-route|--interactive",
110
110
  "planr prime",
111
- "planr install codex|claude|cursor|grok [--dry-run] [--no-mcp] [--force] [--no-hooks]",
111
+ "planr install codex|claude|cursor|grok|pi [--dry-run] [--no-mcp] [--force] [--no-hooks]",
112
112
  "planr mcp",
113
113
  "planr review annotate",
114
114
  "planr review ingest",
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "planr",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Local-first planning and execution coordination for coding agents.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -39,7 +39,6 @@
39
39
  "docs:content": "pnpm --filter @planr/docs content",
40
40
  "docs:typecheck": "pnpm --filter @planr/docs typecheck",
41
41
  "docs:lint": "pnpm --filter @planr/docs lint",
42
- "docs:verify-shell": "pnpm --filter @planr/docs verify:shell",
43
42
  "docs:verify-onboarding": "cargo build --bin planr && pnpm --filter @planr/docs verify:onboarding && pnpm --filter @planr/docs verify:agent-recipes",
44
43
  "docs:verify-agent-recipes": "cargo build --bin planr && pnpm --filter @planr/docs verify:agent-recipes",
45
44
  "docs:verify-agent-markdown": "pnpm docs:build && pnpm --filter @planr/docs verify:agent-markdown",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "planr",
3
3
  "description": "Skill-driven planning and execution loop for coding agents: one planr entry point, an autonomous planr-loop, and evidence-backed task graph skills powered by the planr CLI.",
4
- "version": "1.8.0",
4
+ "version": "1.9.0",
5
5
  "author": {
6
6
  "name": "instructa"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "planr",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Skill-driven planning and execution loop for coding agents: one $planr entry point, an autonomous $planr-loop, and evidence-backed task graph skills powered by the planr CLI.",
5
5
  "author": {
6
6
  "name": "instructa",
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: planr-reviewer
3
+ description: Reviews one Planr item against its plan, diff, logs, and verification evidence without editing implementation files.
4
+ tools: read, grep, find, ls, bash
5
+ skills: planr-review
6
+ systemPromptMode: replace
7
+ inheritProjectContext: true
8
+ inheritSkills: false
9
+ acceptanceRole: read-only
10
+ completionGuard: false
11
+ ---
12
+
13
+ Use the preloaded `planr-review` skill exactly as written for the single review
14
+ item id you are given. Inspect the actual diff and replay the logged evidence.
15
+ Do not edit implementation files. Close the review once with a specific
16
+ verdict and actionable findings when the target is incomplete.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: planr-worker
3
+ description: Implements exactly one picked Planr map item, logs replayable evidence, requests review, and stops.
4
+ tools: read, grep, find, ls, bash, edit, write
5
+ skills: planr-work
6
+ systemPromptMode: replace
7
+ inheritProjectContext: true
8
+ inheritSkills: false
9
+ ---
10
+
11
+ Use the preloaded `planr-work` skill exactly as written for the single item id
12
+ you are given. Implement only that item. Log changed files and the real
13
+ verification commands you ran. Request review and stop. Never close your own
14
+ review or claim independent verification.
@@ -5,6 +5,7 @@ Load this only when the loop has subagents and must bind a provider-neutral Plan
5
5
  - Codex: generated `.codex/config.toml` roles are native roles. Bind the exact matching `routing.profile` as `agent_type` with `fork_turns: "none"`. Do not replace binding with prose, `task_name`, or worker identity, and do not wait on an invalid default-role spawn when a generated role is required.
6
6
  - Claude Code: plugin agents preload the worker/reviewer skills; standalone installs provision `.claude/agents/`.
7
7
  - Cursor: dispatch the provisioned `.cursor/agents/planr-worker.md` and `planr-reviewer.md` roles explicitly.
8
+ - Pi: invoke the repository-native router with `/skill:planr`. If optional `pi-subagents` is already installed, dispatch `.pi/agents/planr-worker.md` and `planr-reviewer.md`; Planr does not install that package. Without it, use separate sequential Pi processes for maker and checker passes and record `single_agent` honestly. Core Pi has no Planr MCP or hooks, so run `planr prime` manually when fresh context is needed. After reviewing and trusting the project resources, exact headless process dispatch has the form `pi --approve --model <provider/model> --thinking <level> -p "Use /skill:planr-work on item <item-id>. Stop after requesting review."`
8
9
  - Single-agent hosts: use separate sequential maker/checker passes with a fresh map read; Planr records `single_agent` honestly.
9
10
 
10
11
  The driver should inspect routing with `planr pick --peek --plan <plan-id>` so the worker takes the actual lease. Host declarations are requests, never proof. Record observed profile/route evidence through worker completion metadata.