planr 1.6.0 → 1.7.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 +46 -22
- package/docs/ARCHITECTURE.md +12 -1
- package/docs/RELEASE.md +37 -7
- package/docs/SWITCHLOOM_COMPATIBILITY.md +46 -0
- package/docs/contracts/EVAL_CONTRACT_V1.md +2072 -0
- package/docs/documentation/CONTRACT.md +7 -7
- package/docs/documentation/COVERAGE.md +5 -3
- package/docs/documentation/INFORMATION_ARCHITECTURE.md +5 -2
- package/docs/fixtures/mcp-contract.json +12 -0
- package/npm/native/darwin-arm64/planr +0 -0
- package/npm/native/darwin-x86_64/planr +0 -0
- package/npm/native/linux-arm64/planr +0 -0
- package/npm/native/linux-x86_64/planr +0 -0
- package/package.json +5 -1
- package/plugins/planr/.claude-plugin/plugin.json +1 -1
- package/plugins/planr/.codex-plugin/plugin.json +1 -1
- package/plugins/planr/agents/planr-worker.md +1 -1
- package/plugins/planr/skills/planr-goal/SKILL.md +21 -49
- package/plugins/planr/skills/planr-loop/SKILL.md +28 -94
- package/plugins/planr/skills/planr-loop/agents/planr-worker.md +1 -1
- package/plugins/planr/skills/planr-loop/references/host-dispatch.md +10 -0
- package/plugins/planr/skills/planr-loop/references/recovery-and-verification.md +24 -0
- package/plugins/planr/skills/planr-task-graph/SKILL.md +21 -190
- package/docs/CI.md +0 -54
- package/docs/CLAUDE_CODE.md +0 -52
- package/docs/CLI_REFERENCE.md +0 -160
- package/docs/CODEX.md +0 -56
- package/docs/CURSOR.md +0 -114
- package/docs/EXAMPLE_WEBAPP.md +0 -103
- package/docs/GOALS.md +0 -175
- package/docs/HANDOFFS_AND_STORIES.md +0 -121
- package/docs/HOOKS.md +0 -34
- package/docs/IMPORT.md +0 -21
- package/docs/INSTALL.md +0 -115
- package/docs/MCP_CONTRACT.md +0 -73
- package/docs/MCP_GUIDE.md +0 -40
- package/docs/MODEL_ROUTING.md +0 -33
- package/docs/NPM.md +0 -40
- package/docs/OPERATING_MODEL.md +0 -250
- package/docs/ROUTING_BUNDLES.md +0 -15
- package/docs/SECURITY.md +0 -8
- package/docs/SKILLS.md +0 -261
- package/docs/TASK_GRAPH_MODEL.md +0 -272
- package/docs/TESTING.md +0 -87
- package/docs/TROUBLESHOOTING.md +0 -30
- package/docs/planr-spec/ADRS.md +0 -160
- package/docs/planr-spec/AI_SPEC.md +0 -138
- package/docs/planr-spec/ANALYTICS_OBSERVABILITY_SPEC.md +0 -124
- package/docs/planr-spec/API_AND_DATA_MODEL.md +0 -517
- package/docs/planr-spec/BACKEND_IMPLEMENTATION_SPEC.md +0 -178
- package/docs/planr-spec/CLIENT_IMPLEMENTATION_SPEC.md +0 -119
- package/docs/planr-spec/DESIGN_SYSTEM_SPEC.md +0 -102
- package/docs/planr-spec/PRODUCT_SPEC.md +0 -193
- package/docs/planr-spec/QA_ACCEPTANCE_TESTS.md +0 -146
- package/docs/planr-spec/README.md +0 -67
- package/docs/planr-spec/REFERENCES.md +0 -29
- package/docs/planr-spec/RELEASE_READINESS.md +0 -95
- package/docs/planr-spec/SAFETY_PRIVACY_SECURITY.md +0 -169
- package/docs/planr-spec/TASKS.md +0 -932
- package/docs/planr-spec/TECH_ARCHITECTURE.md +0 -143
- package/docs/planr-spec/UX_FLOWS.md +0 -235
- package/docs/release-candidates/planr-v1.5.2.md +0 -164
- /package/docs/{planr-spec → contracts}/V1_1_DIFFERENTIATION_CONTRACT.md +0 -0
|
@@ -4,16 +4,16 @@ Status: approved implementation contract for the Planr documentation site
|
|
|
4
4
|
Last audited: 2026-07-17
|
|
5
5
|
Scope owner: `apps/docs` (site and English product documentation)
|
|
6
6
|
|
|
7
|
-
This contract turns the current product, runtime, and repository documentation into one maintainable public documentation system. It is intentionally separate from the product specification package:
|
|
7
|
+
This contract turns the current product, runtime, and repository documentation into one maintainable public documentation system. It is intentionally separate from the product specification package: `.planr/plans/product/planr/` remains the product source of truth, while the site explains the released product to users and contributors.
|
|
8
8
|
|
|
9
9
|
## Source hierarchy
|
|
10
10
|
|
|
11
11
|
When sources disagree, authors must use this order and disclose the disagreement instead of silently choosing convenient copy:
|
|
12
12
|
|
|
13
|
-
1. **Product intent and invariants:** `AGENTS.md` and
|
|
13
|
+
1. **Product intent and invariants:** `AGENTS.md` and `.planr/plans/product/planr/`, especially `PRODUCT_SPEC.md`, `TECH_ARCHITECTURE.md`, and `API_AND_DATA_MODEL.md`.
|
|
14
14
|
2. **Released executable behavior:** compiled `planr --help` output, `src/cli.rs`, `src/app/mcp.rs`, `src/app/http.rs`, `src/model.rs`, and the tested fixture `docs/fixtures/mcp-contract.json`. Runtime sources decide whether a command, option, schema, endpoint, state, or error exists in the current release.
|
|
15
15
|
3. **Distribution contract:** `Cargo.toml`, `package.json`, `pnpm-workspace.yaml`, release workflows, installers, and release tests. These decide supported versions, artifacts, operating systems, and install commands.
|
|
16
|
-
4. **Existing explanatory material:** `README.md`, `
|
|
16
|
+
4. **Existing explanatory material:** `README.md`, `plugins/planr/skills/`, and examples. These explain and point at the site; they are not independent sources of truth.
|
|
17
17
|
5. **External references:** official upstream documentation and inspected local projects may influence structure and implementation, but never define Planr behavior.
|
|
18
18
|
|
|
19
19
|
If product intent is ahead of runtime, the public page must label the behavior as planned or omit it from executable instructions. If runtime is ahead of an older specification sentence, the public page documents the tested runtime and the discrepancy is added to the conflict register below.
|
|
@@ -83,7 +83,7 @@ Do not use `latest`, caret, tilde, or wildcard ranges for direct docs dependenci
|
|
|
83
83
|
|
|
84
84
|
### DOC-ADR-001: One first-class workspace app
|
|
85
85
|
|
|
86
|
-
Create one English documentation application at `apps/docs`. It owns the public landing page, guides, reference, search, metadata, and deployment.
|
|
86
|
+
Create one English documentation application at `apps/docs`. It owns the public landing page, guides, reference, search, metadata, and deployment. The migration completed on 2026-07-25: the flat topic guides under `docs/` were removed once the site owned their topics, so no topic has a second maintained copy. `docs/` retains only non-site material — architecture ownership, the release runbook, frozen contracts, documentation governance, and test fixtures.
|
|
87
87
|
|
|
88
88
|
### DOC-ADR-002: Next.js App Router with local MDX
|
|
89
89
|
|
|
@@ -135,10 +135,10 @@ These findings are explicit inputs to implementation and content review.
|
|
|
135
135
|
|
|
136
136
|
| ID | Finding | Resolution in the site |
|
|
137
137
|
| --- | --- | --- |
|
|
138
|
-
| GAP-001 | `docs/CLI_REFERENCE.md`
|
|
139
|
-
| GAP-002 |
|
|
138
|
+
| GAP-001 | Resolved on 2026-07-25: the flat `docs/CLI_REFERENCE.md` was removed after `/docs/reference/cli` plus the mechanically checked `/docs/reference/cli-generated` took over command coverage. | Keep command inventory generated from the binary; never reintroduce a hand-maintained command list. |
|
|
139
|
+
| GAP-002 | `.planr/plans/product/planr/PRODUCT_SPEC.md` still calls Rust and the HTTP server open decisions, but the repository ships a Rust binary and `planr serve`. | Document current released behavior; update product specs only in a separately scoped product-spec change. |
|
|
140
140
|
| GAP-003 | Resolved on 2026-07-18: `docs/ARCHITECTURE.md` now describes Planr as one Rust binary plus wrappers/docs, with provider-neutral routing declarations owned in Core and external routing lifecycle outside Planr. | Keep architecture ownership aligned with current runtime modules and do not reintroduce routing-package ownership wording. |
|
|
141
|
-
| GAP-004 |
|
|
141
|
+
| GAP-004 | Resolved on 2026-07-25: the flat install guide was removed, so `/docs/getting-started/installation` is the single install owner. | Say “Homebrew recommended on macOS”; GitHub Releases are the canonical artifact source; npm is the cross-package-manager native-binary path. |
|
|
142
142
|
| GAP-005 | The CLI npm wrapper supports Node 18, while latest Fumadocs requires Node 22. | Keep separate requirement callouts: Planr CLI Node 18; docs contributors Node 22. |
|
|
143
143
|
| GAP-006 | Product personas mention Gemini CLI and generic clients, but install helpers exist only for Codex, Claude Code, and Cursor. | Give the three supported clients first-class setup pages; route Gemini/opencode/other tools through clearly labeled generic CLI or stdio MCP instructions. Do not imply a native installer. |
|
|
144
144
|
| GAP-007 | `planr install` uses the subcommand `claude`, while product prose often says “Claude Code”. | Use “Claude Code” in headings and `planr install claude` in commands. |
|
|
@@ -4,7 +4,7 @@ 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
|
|
7
|
+
The site currently owns 61 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
|
| --- | --- |
|
|
@@ -12,6 +12,7 @@ The site currently owns 59 MDX routes. Next.js also emits the landing page and f
|
|
|
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
14
|
| Integrations | `/docs/integrations`, `/docs/integrations/codex`, `/docs/integrations/claude-code`, `/docs/integrations/cursor`, `/docs/integrations/generic-mcp`, `/docs/integrations/cli-only` |
|
|
15
|
+
| Plugins | `/docs/plugins`, `/docs/plugins/switchloom` |
|
|
15
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` |
|
|
16
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` |
|
|
17
18
|
| Reference | `/docs/reference`, `/docs/reference/cli`, `/docs/reference/cli-generated`, `/docs/reference/mcp`, `/docs/reference/mcp-schemas-generated`, `/docs/reference/http-api`, `/docs/reference/configuration-and-storage`, `/docs/reference/data-and-status`, `/docs/reference/outputs-and-errors`, `/docs/reference/support-matrix`, `/docs/reference/maintenance` |
|
|
@@ -23,7 +24,7 @@ The site currently owns 59 MDX routes. Next.js also emits the landing page and f
|
|
|
23
24
|
|
|
24
25
|
| Surface | Canonical owner | Published route(s) |
|
|
25
26
|
| --- | --- | --- |
|
|
26
|
-
| Promise, users, non-goals |
|
|
27
|
+
| Promise, users, non-goals | `.planr/plans/product/planr/PRODUCT_SPEC.md` | `/docs/getting-started/why-planr` |
|
|
27
28
|
| Install, first success, full lifecycle | manifests, installers, `src/cli.rs`, E2E tests | `/docs/getting-started/installation`, `/docs/getting-started/quickstart`, `/docs/getting-started/full-lifecycle` |
|
|
28
29
|
| Agent setup, public routing, and prompt recipes | typed client/prompt contracts and installed Planr skills | `/docs/agents`, `/docs/agents/quickstart`, `/docs/agents/prompt-recipes`, `/docs/agents/skills` |
|
|
29
30
|
| Local-first authority and boundaries | product/data specs, `src/storage/` | `/docs/concepts/local-first-model` |
|
|
@@ -59,6 +60,7 @@ The executable and schema sources decide exact inventory. Editorial pages explai
|
|
|
59
60
|
| Homebrew, install script, npm, source build | release manifests, `scripts/install.sh`, npm wrapper | `/docs/getting-started/installation` |
|
|
60
61
|
| Interface selection and client differences | integration descriptors and installers | `/docs/getting-started/choose-your-interface`, `/docs/integrations` |
|
|
61
62
|
| Agent-led setup and autonomous handoff | typed onboarding prompts and Planr goal/loop contracts | `/docs/agents/quickstart`, `/docs/agents/prompt-recipes` |
|
|
63
|
+
| Optional external plugins | external lifecycle documentation and provider-neutral routing boundaries | `/docs/plugins`, `/docs/plugins/switchloom` |
|
|
62
64
|
| Codex | Codex manifest, generated role/install assets | `/docs/integrations/codex` |
|
|
63
65
|
| Claude Code | Claude manifest, generated role/install assets | `/docs/integrations/claude-code` |
|
|
64
66
|
| Cursor | Cursor manifest, role/skill/install assets | `/docs/integrations/cursor` |
|
|
@@ -84,7 +86,7 @@ The executable and schema sources decide exact inventory. Editorial pages explai
|
|
|
84
86
|
|
|
85
87
|
## Audit completion checklist
|
|
86
88
|
|
|
87
|
-
- [x] All
|
|
89
|
+
- [x] All 61 current MDX routes are explicitly inventoried.
|
|
88
90
|
- [x] Every public product, CLI, MCP, HTTP, data, client, contributor, and operations surface has a current target and canonical source owner.
|
|
89
91
|
- [x] Generated CLI and MCP inventories are separated from editorial guidance and mechanically checked.
|
|
90
92
|
- [x] Retired aliases are isolated in `apps/docs/redirects.mjs` and resolve to a current route.
|
|
@@ -13,13 +13,14 @@ This file records the implemented route and navigation contract. Routes are publ
|
|
|
13
13
|
| worker/operator | `/docs/guides/daily-worker-loop` -> `/docs/guides/parallel-coordination` | Picks without collisions and records durable evidence. |
|
|
14
14
|
| reviewer | `/docs/concepts/reviews-and-approvals` -> `/docs/guides/review-and-fix-loops` | Closes a complete gate or creates a bounded fix chain. |
|
|
15
15
|
| client integrator | `/docs/integrations` -> one client page | Connects through a supported CLI or stdio MCP path. |
|
|
16
|
+
| plugin operator | `/docs/plugins` -> one plugin page | Uses an optional external lifecycle without confusing it with Planr Core ownership. |
|
|
16
17
|
| API toolsmith | `/docs/reference/mcp` or `/docs/reference/http-api` | Uses the current schema and transport boundary. |
|
|
17
18
|
| contributor | `/docs/contributing` -> setup/architecture/testing | Places and verifies a change without tribal knowledge. |
|
|
18
19
|
| maintainer | `/docs/operations` | Can release, deploy, diagnose, roll back, and review freshness. |
|
|
19
20
|
|
|
20
21
|
## Implemented route tree
|
|
21
22
|
|
|
22
|
-
The
|
|
23
|
+
The 61 MDX files below are the current page tree and must agree with every `meta.json` file and `COVERAGE.md`.
|
|
23
24
|
|
|
24
25
|
```text
|
|
25
26
|
/docs
|
|
@@ -39,6 +40,8 @@ The 59 MDX files below are the current page tree and must agree with every `meta
|
|
|
39
40
|
│ ├── cursor
|
|
40
41
|
│ ├── generic-mcp
|
|
41
42
|
│ └── cli-only
|
|
43
|
+
├── plugins
|
|
44
|
+
│ └── switchloom
|
|
42
45
|
├── concepts
|
|
43
46
|
│ ├── local-first-model
|
|
44
47
|
│ ├── plans-and-map
|
|
@@ -142,6 +145,6 @@ The inventory covers these retired route families:
|
|
|
142
145
|
| `/docs/reference/routing-bundles` | `/docs/reference/configuration-and-storage` |
|
|
143
146
|
| `/docs/reference/platform-support` | `/docs/reference/support-matrix` |
|
|
144
147
|
|
|
145
|
-
Repository files
|
|
148
|
+
Repository Markdown files are not former website URLs, so a Next.js redirect can never intercept a repository path. The flat topic guides that once duplicated site pages were removed on 2026-07-25; `README.md` and the remaining repository files link to the current site instead of restating it. `docs/` now keeps only what the site does not own: `docs/ARCHITECTURE.md`, `docs/RELEASE.md`, `docs/contracts/`, `docs/documentation/`, and `docs/fixtures/`.
|
|
146
149
|
|
|
147
150
|
To retire another route: add exactly one alias, choose the closest current outcome page, update this table, repair internal links, run the maintenance and browser gates, and retain the redirect while supported inbound links may exist. Never redirect an unknown path to a generic landing page merely to hide a 404.
|
|
@@ -42,6 +42,14 @@
|
|
|
42
42
|
"planr_artifact_show",
|
|
43
43
|
"planr_event_list",
|
|
44
44
|
"planr_debug_bundle",
|
|
45
|
+
"planr_eval_suite_check",
|
|
46
|
+
"planr_eval_run",
|
|
47
|
+
"planr_eval_show",
|
|
48
|
+
"planr_eval_compare",
|
|
49
|
+
"planr_eval_gate",
|
|
50
|
+
"planr_eval_invalidate",
|
|
51
|
+
"planr_eval_rescore",
|
|
52
|
+
"planr_eval_evidence_ref",
|
|
45
53
|
"planr_log_add",
|
|
46
54
|
"planr_review_annotate",
|
|
47
55
|
"planr_review_ingest",
|
|
@@ -100,6 +108,10 @@
|
|
|
100
108
|
"planr review artifact",
|
|
101
109
|
"planr review evidence",
|
|
102
110
|
"planr review close",
|
|
111
|
+
"planr eval suite-check",
|
|
112
|
+
"planr eval compare",
|
|
113
|
+
"planr eval gate",
|
|
114
|
+
"planr eval evidence-ref",
|
|
103
115
|
"planr recover sweep",
|
|
104
116
|
"planr agents list",
|
|
105
117
|
"planr agents check",
|
|
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.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "Local-first planning and execution coordination for coding agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -20,8 +20,12 @@
|
|
|
20
20
|
"docs"
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
|
+
"security:check": "sh scripts/security-local.sh",
|
|
24
|
+
"security:privacy": "sh scripts/check-repository-privacy.sh",
|
|
25
|
+
"security:staged": "node scripts/hooks/block-forbidden-staged-files.mjs",
|
|
23
26
|
"build:native": "cargo build --release",
|
|
24
27
|
"test": "cargo test",
|
|
28
|
+
"verify:release-eval-gate": "node scripts/test-release-eval-gate.mjs",
|
|
25
29
|
"pack:check": "npm pack --dry-run",
|
|
26
30
|
"docs:dev": "pnpm --filter @planr/docs dev",
|
|
27
31
|
"docs:alchemy:dev": "pnpm --filter @planr/docs alchemy:dev",
|
|
@@ -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.
|
|
4
|
+
"version": "1.7.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "instructa"
|
|
7
7
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "planr",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
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",
|
|
@@ -6,7 +6,7 @@ skills:
|
|
|
6
6
|
# Cost tiering: the pick packet bounds the worker's scope, so it runs on a
|
|
7
7
|
# cheaper tier than the driver. Aliases track the current generation; pin a
|
|
8
8
|
# full model id (e.g. claude-opus-4-8) only if you need determinism. Budget
|
|
9
|
-
# alternative: model: sonnet. See docs/
|
|
9
|
+
# alternative: model: sonnet. See https://planr.so/docs/agents/skills#cost-tiering.
|
|
10
10
|
model: opus
|
|
11
11
|
effort: medium
|
|
12
12
|
---
|
|
@@ -1,75 +1,47 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: planr-goal
|
|
3
|
-
description: Prepare a long-running
|
|
3
|
+
description: Prepare a long-running Planr goal as a checked plan, linked map, durable contract, and loop handoff without implementing it.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Planr Goal
|
|
7
7
|
|
|
8
|
-
Prep only.
|
|
8
|
+
Prep only. Compile intent into durable Planr state, then stop. During goal prep, do not implement, refactor, verify, or touch product code. Allowed work is reading Planr state, clarifying material ambiguity, creating/refining/checking plans, building/linking the map, storing the contract, and printing the loop handoff.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
During a goal-prep turn, do not implement, refactor, verify, or touch product code — even when the work looks read-only or obviously useful. That work belongs to the loop run. Allowed actions: read Planr state, ask intake questions, create/refine/check plans, build and link the map, store the goal contract, print the starter command.
|
|
10
|
+
Evaluation subcommands run only when the user explicitly requests them, the selected item's acceptance criteria require them, or the maintainer release workflow invokes them. Never invoke them as routine or opportunistic goal, loop, or task-graph work.
|
|
13
11
|
|
|
14
12
|
## Intake
|
|
15
13
|
|
|
16
|
-
Classify the
|
|
17
|
-
|
|
18
|
-
- specific: outcome and proof are clear -> compile directly.
|
|
19
|
-
- vague: ask at most two material questions (which outcome matters most? what proof would convince you it works?), then proceed with labeled assumptions recorded as `plan refine` notes.
|
|
20
|
-
- existing plan: preserve user-provided steps, files, and constraints as `plan refine` notes; validate them, do not rediscover from scratch, and do not discard them.
|
|
21
|
-
- recovery: read `planr map show --json` and `planr recover sweep` first — the board may already exist. Repair state instead of duplicating it.
|
|
22
|
-
|
|
23
|
-
Always capture the goal oracle: the observable signal that proves the outcome actually runs — a test run, a live browser flow, an executed CLI binary, real API responses. Weak proof creates weak goals. The oracle becomes the live-verification half of the stop condition and maps to the loop's platform verification (`$planr-verify-web` for web, simulator for ios, executed binary for cli, real requests for api).
|
|
24
|
-
|
|
25
|
-
## Compile The Board
|
|
14
|
+
Classify the request:
|
|
26
15
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
planr
|
|
31
|
-
planr plan check <plan-id> # strict: empty required sections fail
|
|
32
|
-
planr map build --from <plan-id> # idempotent: safe to re-run
|
|
33
|
-
```
|
|
16
|
+
- specific: compile directly;
|
|
17
|
+
- vague: ask at most two questions about outcome and proof, then record labeled assumptions;
|
|
18
|
+
- existing plan: preserve its steps, files, and constraints as refinement notes;
|
|
19
|
+
- recovery: inspect `planr map show --json` and `planr recover sweep` before creating anything.
|
|
34
20
|
|
|
35
|
-
|
|
21
|
+
Capture a goal oracle: the observable test, browser flow, executed CLI, or real API response that proves the outcome runs.
|
|
36
22
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
`map build` creates one item per plan step and chains them in plan order with `blocks` links; the output lists the created items and links. Review that chain and adjust it only where execution order differs from document order:
|
|
23
|
+
## Compile
|
|
40
24
|
|
|
41
25
|
```bash
|
|
42
|
-
planr
|
|
26
|
+
planr project show --json
|
|
27
|
+
planr plan new "<goal>" --platform <platform>
|
|
28
|
+
planr plan refine <plan-id> --note "<constraint or assumption>"
|
|
29
|
+
planr plan check <plan-id>
|
|
30
|
+
planr map build --from <plan-id>
|
|
43
31
|
```
|
|
44
32
|
|
|
45
|
-
|
|
33
|
+
Fill required plan sections directly. Replace the placeholder task with typically 4-8 independently verifiable `TASK-00n` slices before `planr map build`. Preserve real execution order with `blocks` links. When registry routes use `work_type`, annotate tasks before mapping or retag them afterward; this is prep work, not a user question.
|
|
46
34
|
|
|
47
|
-
##
|
|
35
|
+
## Durable Contract
|
|
48
36
|
|
|
49
|
-
|
|
37
|
+
Store one contract per plan:
|
|
50
38
|
|
|
51
39
|
```bash
|
|
52
|
-
planr context add "GOAL CONTRACT <plan-id>: DONE when every in-scope
|
|
40
|
+
planr context add "GOAL CONTRACT <plan-id>: DONE when every in-scope item is closed with log evidence, all reviews are complete, approvals are clear, and a live verification log proves <goal oracle>. Iteration budget: 10." --tag goal-contract
|
|
53
41
|
```
|
|
54
42
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"All reviews closed" audits review items that exist — it does not require a review gate on every item. An item closed with plain `done` (evidence still required) satisfies the contract without one; request reviews where they carry signal (implementation slices, user-facing work), not on trivial inspection or scaffold steps.
|
|
43
|
+
Never weaken it mid-run. Workers use `planr pick --plan <plan-id>`; termination uses `planr plan audit <plan-id> --json`. Reviews are required only where they add signal; evidence-backed setup work may close directly.
|
|
58
44
|
|
|
59
45
|
## Hand Off
|
|
60
46
|
|
|
61
|
-
Print the
|
|
62
|
-
|
|
63
|
-
With a native loop driver (Codex `/goal`, Claude Code `/goal` or `/loop`):
|
|
64
|
-
|
|
65
|
-
```text
|
|
66
|
-
/goal Use $planr-loop on plan <plan-id>. The loop contract is stored in planr context (tag: goal-contract). Continue until the contract holds or the iteration budget is exhausted. You are operating autonomously: the user is not watching, so never end a turn on a plan, a question, or a promise — proceed until the contract holds or you are blocked on input only the user can provide.
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Without one (Cursor, plain MCP clients, Codex without /goal):
|
|
70
|
-
|
|
71
|
-
```text
|
|
72
|
-
Use $planr-loop on plan <plan-id>. The loop contract is stored in planr context (tag: goal-contract). You are operating autonomously: never end a turn on a plan, a question, or a promise — proceed until the contract holds or you are blocked on input only the user can provide.
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Re-dispatch the same line after any session ends. The map, logs, and stored contract make every iteration resumable from zero context — nothing about the goal lives only in chat.
|
|
47
|
+
Print: `Use $planr-loop on plan <plan-id>. Recover the goal-contract from Planr and continue until its audit holds or the iteration budget is exhausted.` Ask whether to start, refine, or stop; then stop. Execution belongs to the loop driver.
|
|
@@ -1,119 +1,53 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: planr-loop
|
|
3
|
-
description: Drive one feature or scope to
|
|
3
|
+
description: Drive one Planr feature or scope autonomously to audit-backed completion through scoped work, live verification, and independent review.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Planr Loop
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
This is the iteration protocol, not the re-prompting driver. Run one goal with a checkable stop condition and an iteration budget (default 10). Refuse multi-goal loops.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Evaluation subcommands run only when the user explicitly requests them, the selected item's acceptance criteria require them, or the maintainer release workflow invokes them. Never invoke them as routine or opportunistic goal, loop, or task-graph work.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Contract And Iteration
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Recover the stored `GOAL CONTRACT <plan-id>` from Planr every iteration. If absent, store one that requires settled items with evidence, complete reviews, clear approvals, and a live oracle. Never weaken it.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
2. A stop condition that a different agent can check from map state and evidence, not from the worker's claims.
|
|
18
|
-
3. An iteration budget (default: 10 iterations). When exhausted, stop and report honestly instead of grinding.
|
|
16
|
+
Each iteration follows the Planr stage protocols:
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
1. `planr plan audit <plan-id> --json`; `holds: true` exits.
|
|
19
|
+
2. Use `$planr-plan` or `$planr-task-graph` only when scope or graph structure is missing.
|
|
20
|
+
3. Dispatch `$planr-work` for exactly one ready item scoped to `<plan-id>`; makers must use `planr pick --work-type code --plan <plan-id>`, never an unscoped pick, and finish implementation with `planr done <item-id> ... --review`.
|
|
21
|
+
4. Run the target-platform oracle and record `planr log add --item <id> --kind verification --summary ... --cmd ...`.
|
|
22
|
+
5. Dispatch `$planr-review`; findings create fix work, while `complete --close-target` settles the target.
|
|
23
|
+
6. Repeat from audit.
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
DONE when: every in-scope map item is closed with log evidence,
|
|
24
|
-
all reviews closed with verdict complete, no open approvals in scope,
|
|
25
|
-
and a live verification log exists for the feature on its target platform.
|
|
26
|
-
```
|
|
25
|
+
One picked item per iteration. Use plain `done` only for low-signal setup/inspection work. Maker and checker stay separate when the host supports another agent; a maker never self-reviews when an independent checker is available, and never manufactures independence by changing worker identity. A worker may use `done --next`, which never returns its own review.
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
Pick packets explain null results and include `remaining`; follow their repair command. Destructive or out-of-repository effects require `planr approval request`. Two iterations without map movement must stop. On success or budget exhausted, finish with `$planr-summary`.
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
planr context add "GOAL CONTRACT <plan-id>: DONE when ... Iteration budget: 10." --tag goal-contract
|
|
32
|
-
```
|
|
29
|
+
## Provider-Neutral Dispatch
|
|
33
30
|
|
|
34
|
-
|
|
31
|
+
The driver dispatches and audits; it does not implement when subagents are available. Pick packets expose provider-neutral `routing.profile`; they do not expose a host-owned `routing.agent_type`. If a generated repository role exactly matches that profile, dispatch that profile identifier as the host-native role/`agent_type`. If no matching repository role exists, keep the host's default dispatch contract and treat routing as advisory.
|
|
35
32
|
|
|
36
|
-
|
|
33
|
+
Model, effort, profile, client, and fallback fields are advisory declarations and evidence labels only. Planr chooses none of them. Never infer effective model or effort from declarations. Workers report their actual profile and attach route observations when available.
|
|
37
34
|
|
|
38
|
-
|
|
35
|
+
Dispatch messages stay minimal:
|
|
39
36
|
|
|
40
|
-
|
|
37
|
+
- maker: `Use $planr-work on item <item-id>. Stop after requesting review.`
|
|
38
|
+
- checker: `Use $planr-review on item <item-id>. Close the review with a verdict.`
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
1. planr plan audit <plan-id> --json contract holds -> exit loop ($planr-status for deeper reads)
|
|
44
|
-
2. $planr-plan / $planr-task-graph only if scope or map structure is missing
|
|
45
|
-
3. $planr-work pick exactly one ready item, implement, finish with planr done --review
|
|
46
|
-
4. live verify run the platform verification (below), log it with planr log add --kind verification
|
|
47
|
-
5. $planr-review independent audit; complete -> review close --close-target, findings -> Planr creates fix items
|
|
48
|
-
6. repeat fix items are just the next ready items
|
|
49
|
-
```
|
|
40
|
+
For generated Codex roles: The `spawn_agent` tool call itself must include `agent_type` set exactly to the matching `routing.profile`, `fork_turns: "none"`, a stable lowercase task name, and the maker/checker message. Read [host dispatch](references/host-dispatch.md) only when choosing host-specific wiring.
|
|
50
41
|
|
|
51
|
-
|
|
42
|
+
## Verification And Recovery
|
|
52
43
|
|
|
53
|
-
|
|
44
|
+
“Done” means the feature ran. For web dispatch `$planr-verify-web`; for CLI execute the built binary; for API use real requests; for iOS launch the simulator. Log the replayable command. If the capability is missing, record a blocker context, request approval, and pause—never fake proof.
|
|
54
45
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
The loop never closes its own reviews when the host supports a second agent. Maker and checker stay separate. One agent instance keeps one `PLANR_WORKER_ID` for the whole session — never export a second identity inside the same instance to make reviews look `independent`; an honest `single_agent` stamp beats a fake `independent` one.
|
|
58
|
-
|
|
59
|
-
## Skills Are The Prompts
|
|
60
|
-
|
|
61
|
-
When the host supports subagents, the driver never implements: it dispatches, audits, and synthesizes. Driver tokens go into `plan audit`, dispatch decisions, and conflict resolution — implementation and review run in host-native subagent roles (see the role files and `docs/GOALS.md` "Cost Tiering"). Pick packets expose provider-neutral `routing.profile`; they do not expose a host-owned `routing.agent_type`. If an external repository declaration has generated a host role whose identifier exactly matches `routing.profile`, dispatch that profile identifier as the host-native role/`agent_type` through the host's subagent wiring. If no matching repository role exists, keep the host's default dispatch contract and treat the profile as advisory evidence only. Model, effort, profile, client, and fallback fields are advisory declarations and evidence labels only; Planr does not choose a model, choose effort, choose a client, choose a fallback, or infer that a host honored any requested value. The host owns whether and how those declarations can be honored. As the dispatching driver, read the packet with `planr pick --peek [--plan <id>]` — it returns the same packet without leasing, so the worker picks under its own identity and the maker/checker audit stays clean (never pick-and-release as the driver). Workers report the profile they actually ran on (`done --profile <id>` or `PLANR_PROFILE`) and attach route observations when available, so host overrides show up in `planr trace item` as evidence instead of being inferred from declarations. Delegate with skill references plus an item id in the message body, nothing more; host-native dispatch arguments still carry the selected role/profile and isolation controls:
|
|
62
|
-
|
|
63
|
-
- Worker dispatch: `Use $planr-work on item <item-id>. Stop after requesting review.`
|
|
64
|
-
- Checker dispatch: `Use $planr-review on item <item-id>. Close the review with a verdict.`
|
|
65
|
-
|
|
66
|
-
A worker subagent may take several items sequentially instead of being respawned per item: `done --next` hands it the next ready work packet, keeps its context warm, and never returns its own freshly created review — maker/checker separation survives long-lived workers.
|
|
67
|
-
|
|
68
|
-
Host wiring:
|
|
69
|
-
|
|
70
|
-
- When external repository declarations supply host roles matching pick-packet `routing.profile` values, pass the matching profile identifier as the native host role/`agent_type` and follow the generated role instructions exactly. Otherwise treat the profile in the pick packet as advisory and use the host's current dispatch contract. Never infer effective model or effort from a declaration alone.
|
|
71
|
-
- Codex with native multi-agent roles (stable multi-agent or Multi-Agent v2): generated `.codex/config.toml` roles are matching repository roles. The `spawn_agent` tool call itself must include `agent_type` set exactly to the matching `routing.profile`, `fork_turns` set to `none`, a stable lowercase `task_name`, and the dispatch message above. A default-role maker/checker spawn without `agent_type` is invalid for a generated Codex role; do not wait on it or treat it as a fallback. Do not claim role binding is unavailable for generated Codex roles, and do not substitute the role name into `task_name`, prose, worker identity, or the message body as a replacement for `agent_type`; those are not native role-binding evidence.
|
|
72
|
-
- Claude Code: subagents preload via the `skills:` frontmatter field. The Planr plugin registers `planr-worker` and `planr-reviewer` automatically from its `agents/` directory; standalone installs copy them to `.claude/agents/`. The reviewer subagent is read-only except for `planr review` commands.
|
|
73
|
-
- Cursor: project subagents in `.cursor/agents/*.md` (Markdown templates in `agents/` next to this skill; `planr install cursor` provisions them). Dispatch explicitly: `/planr-worker implement item X`, `/planr-reviewer review item X`. Parallel dispatches are safe — the map's pick lease keeps one owner per item.
|
|
74
|
-
- Single-agent hosts: run worker and checker as separate sequential dispatches with a fresh read of map state in between; never carry the worker's self-assessment into the review step. The mode is recorded automatically: `review close` derives `review_mode` (`single_agent`/`independent`) from worker identity.
|
|
75
|
-
|
|
76
|
-
## Live Verification By Platform
|
|
77
|
-
|
|
78
|
-
"Done" means the feature ran, not that it compiles. Pick the verification from the plan's platform (`planr plan new ... --platform <p>`), run it inside step 4, and log the exact command and outcome:
|
|
79
|
-
|
|
80
|
-
| Platform | Verification |
|
|
81
|
-
| --- | --- |
|
|
82
|
-
| `web` | dispatch `$planr-verify-web`: discovers the host's browser capability, runs the changed flow against the dev server, logs a replayable command |
|
|
83
|
-
| `ios` | build and launch in the simulator (`xcodebuild` + `xcrun simctl`), exercise the changed flow |
|
|
84
|
-
| `cli` | execute the built binary with the real flags the feature added; assert on output |
|
|
85
|
-
| `api`/`backend` | start the service, hit the changed endpoints with real requests, assert responses |
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
planr log add --item <item-id> --kind verification \
|
|
89
|
-
--summary "live verification on <platform>: <observed outcome>" \
|
|
90
|
-
--cmd "<exact command actually run>"
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
`--kind verification` is what `plan audit` checks for its `verification_logged` clause. Log the final passing run; a transient failure you immediately fixed belongs in the summary narrative, not as a separate failure log.
|
|
94
|
-
|
|
95
|
-
If the needed capability is missing (no simulator, no browser tooling), do not fake it: log the gap as context, request human approval, and pause the loop:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
planr context add "live verification blocked: <missing capability>" --item <item-id> --tag blocker
|
|
99
|
-
planr approval request <item-id> --reason "manual live verification required"
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Loop Drivers
|
|
103
|
-
|
|
104
|
-
Prefer the host's loop primitive over a bash while-loop so a separate model checks the stop condition. The driver supplies continuation pressure; Planr supplies everything else (state, evidence, reviews, recovery), so the loop works on every host:
|
|
105
|
-
|
|
106
|
-
- Codex: `/goal Use $planr-loop on plan <plan-id>. The loop contract is stored in planr context (tag: goal-contract).` — or an Automation with the same prompt. Full workflow: `docs/GOALS.md` in the Planr repository.
|
|
107
|
-
- Claude Code: `/goal` with the same prompt shape, or `/loop` for a fixed cadence.
|
|
108
|
-
- Cursor: no /goal primitive; re-dispatch `Use $planr-loop on plan <plan-id> ...` manually or per session. Within a session the loop dispatches the provisioned `/planr-worker` and `/planr-reviewer` subagents per item.
|
|
109
|
-
- Anywhere else (plain MCP clients, hosts without /goal): re-dispatch `Use $planr-loop on plan <plan-id> ...` manually or per session. Nothing is lost except automatic re-prompting.
|
|
110
|
-
|
|
111
|
-
Recovery is the same in all cases: a fresh session starts at step 1 (`$planr-status`), reads the map and the stored goal-contract, and continues exactly where the last iteration stopped — zero chat context required.
|
|
46
|
+
Recovery starts in a fresh session with audit, map state, the stored contract, and the next scoped pick. Read [recovery and platform details](references/recovery-and-verification.md) only when that branch is active.
|
|
112
47
|
|
|
113
48
|
## Hard Rules
|
|
114
49
|
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
- On exit — success or budget exhausted — finish with `$planr-summary` so the human gets an evidence-backed account.
|
|
50
|
+
- Keep one active write item unless separate worktrees and loop instances were explicitly authorized.
|
|
51
|
+
- Scope changes go through `$planr-plan` and the user.
|
|
52
|
+
- Do not close your own review when independent review is available.
|
|
53
|
+
- Keep final claims aligned with map, logs, approvals, reviews, and oracle evidence.
|
|
@@ -3,7 +3,7 @@ name: planr-worker
|
|
|
3
3
|
description: Implements exactly one picked Planr map item to evidence-backed completion, then requests review and stops. Dispatch with the item id.
|
|
4
4
|
# Cost tiering: the pick packet bounds the worker's scope, so it can run on a
|
|
5
5
|
# cheaper tier than the driver. Replace inherit with a cheaper Cursor model id
|
|
6
|
-
# when dispatch cost matters. See docs/
|
|
6
|
+
# when dispatch cost matters. See https://planr.so/docs/agents/skills#cost-tiering.
|
|
7
7
|
model: inherit
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Host Dispatch
|
|
2
|
+
|
|
3
|
+
Load this only when the loop has subagents and must bind a provider-neutral Planr profile to host-native dispatch.
|
|
4
|
+
|
|
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
|
+
- Claude Code: plugin agents preload the worker/reviewer skills; standalone installs provision `.claude/agents/`.
|
|
7
|
+
- Cursor: dispatch the provisioned `.cursor/agents/planr-worker.md` and `planr-reviewer.md` roles explicitly.
|
|
8
|
+
- Single-agent hosts: use separate sequential maker/checker passes with a fresh map read; Planr records `single_agent` honestly.
|
|
9
|
+
|
|
10
|
+
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.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Recovery And Verification
|
|
2
|
+
|
|
3
|
+
Load this only for an interrupted item or the live-verification stage.
|
|
4
|
+
|
|
5
|
+
Recovery:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
planr plan audit <plan-id> --json
|
|
9
|
+
planr trace item <item-id> --json
|
|
10
|
+
planr log list --item <item-id> --json
|
|
11
|
+
planr context list --item <item-id> --json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Use `planr pick stale --older-than-seconds 900` before releasing abandoned ownership. Pause a legitimate wait with `planr pick pause`; resume it with `planr pick resume`.
|
|
15
|
+
|
|
16
|
+
Verification:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
planr log add --item <item-id> --kind verification \
|
|
20
|
+
--summary "verified <flow>: <observed outcome>" \
|
|
21
|
+
--cmd "<exact replayable command>"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Use browser automation for web, the built binary for CLI, real requests for API/backend, and simulator launch plus exercised flow for iOS. If tooling is unavailable, store blocker context, request approval, and pause.
|