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
package/docs/INSTALL.md
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# Install Planr
|
|
2
|
-
|
|
3
|
-
## Recommended User Install
|
|
4
|
-
|
|
5
|
-
Planr's canonical release source is:
|
|
6
|
-
|
|
7
|
-
- https://github.com/instructa/planr/releases
|
|
8
|
-
|
|
9
|
-
Install the current GitHub Release with the repo-owned installer:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
curl -fsSL https://raw.githubusercontent.com/instructa/planr/main/scripts/install.sh | sh
|
|
13
|
-
planr --version
|
|
14
|
-
planr doctor --client all
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
The installer downloads `planr-<os>-<arch>.tar.gz` from the latest GitHub Release. Override the release source with:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
PLANR_DOWNLOAD=1 PLANR_VERSION=v1.0.0 sh scripts/install.sh
|
|
21
|
-
PLANR_DOWNLOAD=1 PLANR_REPO=your-org/planr PLANR_VERSION=v1.0.0 sh scripts/install.sh
|
|
22
|
-
PLANR_DOWNLOAD=1 PLANR_TARGET=darwin-arm64 sh scripts/install.sh
|
|
23
|
-
PLANR_DOWNLOAD=1 PLANR_RELEASE_BASE_URL=https://example.com/releases sh scripts/install.sh
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Download installs verify `SHA256SUMS` from the same release location by default. Use `PLANR_SKIP_CHECKSUM=1` only for local development mirrors where the checksum file is intentionally unavailable.
|
|
27
|
-
|
|
28
|
-
## Homebrew Tap
|
|
29
|
-
|
|
30
|
-
Homebrew is the preferred day-to-day package-manager path:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
brew install instructa/tap/planr
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
The tap formula is regenerated automatically on every release.
|
|
37
|
-
|
|
38
|
-
## npm
|
|
39
|
-
|
|
40
|
-
Published npm versions bundle platform-native binaries (`darwin-arm64`, `darwin-x86_64`, `linux-x86_64`, `linux-arm64`), so no Rust toolchain is needed and nothing is downloaded at install time:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
npm install -g planr
|
|
44
|
-
planr --version
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Details and publishing flow: [npm Package](NPM.md).
|
|
48
|
-
|
|
49
|
-
## Manual GitHub Release Install
|
|
50
|
-
|
|
51
|
-
Download the matching asset from GitHub Releases:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
tar -xzf planr-darwin-arm64.tar.gz
|
|
55
|
-
PREFIX="$HOME/.local" PLANR_BIN="$PWD/planr" scripts/install.sh
|
|
56
|
-
planr --version
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Windows native release assets are not part of the current public install contract. Windows users should use WSL with the Linux release asset or build from source until a Windows asset is published.
|
|
60
|
-
|
|
61
|
-
## Client Setup
|
|
62
|
-
|
|
63
|
-
Planr does not edit global agent configuration during install. From a project, use:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
planr doctor --client all
|
|
67
|
-
planr install codex --dry-run
|
|
68
|
-
planr install claude --dry-run
|
|
69
|
-
planr install cursor --dry-run
|
|
70
|
-
planr prompt mcp
|
|
71
|
-
planr prompt cli --client codex
|
|
72
|
-
planr prompt http
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
`planr install codex` writes a project MCP snippet and project hooks; its workflow skills come from the Codex plugin, and it writes no project roles or skills. `planr install claude` writes project `.mcp.json`, standalone worker/reviewer roles, and hooks; workflow skills come from the Claude Code plugin. `planr install cursor` writes project MCP, roles, all ten skills, and hooks, then prints an optional user-level MCP deeplink. Optional model pins come from repository-local routing declarations managed outside Planr. Dry-runs print the complete repository artifact and hook-reconciliation paths without writing them; no command silently edits global user configuration.
|
|
76
|
-
|
|
77
|
-
`--no-mcp` skips only the project MCP artifact. Codex then reconciles hooks only; Claude Code writes standalone project roles and hooks but no project skills; Cursor writes project roles, skills, and hooks. Add `--no-hooks` to skip hooks as well. The Codex and Claude Code plugins remain the owners of their workflow skills.
|
|
78
|
-
|
|
79
|
-
Runtime surfaces:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
planr mcp # stdio MCP server for any MCP-capable client
|
|
83
|
-
planr serve --port 7526 # localhost HTTP/SSE
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Open `http://127.0.0.1:7526/review` after `planr serve` for the local browser review workspace.
|
|
87
|
-
|
|
88
|
-
## Agent Skills And Plugin
|
|
89
|
-
|
|
90
|
-
The repository ships a plugin under `plugins/planr` for Codex and Claude Code that bundles all ten workflow skills; Claude Code additionally registers plugin worker/reviewer agents. The Codex plugin does not register project agents. Cursor receives the ten skills and both project agents through `planr install cursor` (or its plugin manifest). Model-specific role files are optional repository-local artifacts owned by external routing lifecycle. The CLI above must be installed separately. See [Skills](SKILLS.md).
|
|
91
|
-
|
|
92
|
-
## From Source
|
|
93
|
-
|
|
94
|
-
Use Cargo when developing Planr or building from a checked-out source tree:
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
cargo build --release
|
|
98
|
-
PREFIX="$HOME/.local" scripts/install.sh
|
|
99
|
-
planr --version
|
|
100
|
-
planr doctor --client all
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
The install script copies the selected binary to `PREFIX/bin/planr`. It is idempotent and does not edit global shell or agent-client configuration.
|
|
104
|
-
|
|
105
|
-
During development, run any command directly without installing: `cargo run -- <command>` (for example `cargo run -- map show`).
|
|
106
|
-
|
|
107
|
-
## Release Artifact
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
scripts/build-release.sh
|
|
111
|
-
cat dist/planr-*/SHA256SUMS
|
|
112
|
-
cat dist/SHA256SUMS
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Release builds include a local artifact directory plus a platform tarball named `planr-<os>-<arch>.tar.gz`.
|
package/docs/MCP_CONTRACT.md
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# MCP Contract
|
|
2
|
-
|
|
3
|
-
Planr exposes a local stdio MCP server with a stable V1 contract for coding-agent clients.
|
|
4
|
-
|
|
5
|
-
## Server
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
planr --db .planr/planr.sqlite mcp
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
The server supports:
|
|
12
|
-
|
|
13
|
-
- `tools/list`
|
|
14
|
-
- `tools/call`
|
|
15
|
-
- `resources/list`
|
|
16
|
-
- `resources/read`
|
|
17
|
-
- `prompts/list`
|
|
18
|
-
- `prompts/get`
|
|
19
|
-
|
|
20
|
-
## Machine-Checkable Fixture
|
|
21
|
-
|
|
22
|
-
The canonical fixture is:
|
|
23
|
-
|
|
24
|
-
```text
|
|
25
|
-
docs/fixtures/mcp-contract.json
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Tests compare this fixture against live MCP stdio responses, install dry-run output, and CLI reference coverage.
|
|
29
|
-
|
|
30
|
-
## Tool Contract
|
|
31
|
-
|
|
32
|
-
Every tool declares a real JSON Schema: typed `properties`, explicit `required` fields, and `additionalProperties = false`. The only exception is `planr_review_ingest`, which keeps `additionalProperties = true` so arbitrary hook payload shapes can be ingested. Unknown tools return an `isError` MCP result containing a JSON error with code `not_found`.
|
|
33
|
-
|
|
34
|
-
Required groups:
|
|
35
|
-
|
|
36
|
-
- project and map reads
|
|
37
|
-
- plan creation, refinement, split, check, and link
|
|
38
|
-
- map build, preview, unlocks, lookahead, and pressure-oriented reads
|
|
39
|
-
- item create, breakdown, insert, amend, and replan
|
|
40
|
-
- pick, heartbeat, progress, pause, resume, stale inspection, and recovery sweep
|
|
41
|
-
- approval request, approve, deny, and list
|
|
42
|
-
- artifact add, list, and show
|
|
43
|
-
- event list and debug bundle preview
|
|
44
|
-
- trace item, log add, and log read (including three-stage route observations)
|
|
45
|
-
- provider-neutral agent registry reads and route overrides
|
|
46
|
-
- review annotate, ingest, artifact, evidence, and close
|
|
47
|
-
- item close, context create, and search
|
|
48
|
-
|
|
49
|
-
`planr_recover_sweep` mirrors `planr recover sweep`: it previews by default and only mutates state when `apply` is true. It returns stale picked work, timed-out work, retryable failed work, exhausted failures, and applied release/retry counts.
|
|
50
|
-
|
|
51
|
-
## Review Contract
|
|
52
|
-
|
|
53
|
-
Review feedback ingestion is advisory:
|
|
54
|
-
|
|
55
|
-
- `planr_review_annotate` stores item-linked annotation context.
|
|
56
|
-
- `planr_review_ingest` stores hook-compatible feedback and never auto-closes or auto-approves work.
|
|
57
|
-
- `planr_review_artifact` writes a privacy-minimized review artifact.
|
|
58
|
-
- `planr_review_evidence` returns Git/PR evidence scoped to files named by item logs or artifacts, and treats unrelated dirty files as non-owned.
|
|
59
|
-
- `planr_review_close` records the final verdict, writes a review artifact, and creates fix/follow-up review work when the verdict is not clean.
|
|
60
|
-
|
|
61
|
-
HTTP mirrors the same rule: `GET /v1/reviews/:id/artifact` is read-only; `POST /v1/reviews/:id/artifact` writes an artifact explicitly.
|
|
62
|
-
|
|
63
|
-
## Install Contract
|
|
64
|
-
|
|
65
|
-
`planr install <client> --dry-run` prints the complete client-owned MCP, role, skill, and hook-reconciliation paths for Codex, Claude Code, and Cursor without writing them. Non-dry install writes only repository-local files, with this ownership contract:
|
|
66
|
-
|
|
67
|
-
- Codex: the CLI writes `.planr/integrations/codex-mcp.toml` and `.codex/hooks.json`; the plugin owns all ten workflow skills; neither path writes Planr project roles or project skills
|
|
68
|
-
- Claude Code: the CLI writes `.mcp.json`, standalone `.claude/agents/` roles, and `.claude/settings.json` hooks, but no project skills; the plugin owns all ten workflow skills and its plugin agents
|
|
69
|
-
- Cursor: the CLI writes `.cursor/mcp.json`, both `.cursor/agents/` roles, all ten `.cursor/skills/` skill copies, and `.cursor/hooks.json`
|
|
70
|
-
|
|
71
|
-
The Cursor dry-run additionally prints a `cursor://anysphere.cursor-deeplink/mcp/install` link whose embedded config (`planr mcp`, no `--db`) is safe at user scope because each workspace resolves its own database. Planr does not edit global client configuration without a separate explicit operator action; the deeplink requires the operator to click it and confirm inside Cursor.
|
|
72
|
-
|
|
73
|
-
`--no-mcp` skips only the project MCP artifact: Codex reconciles hooks only; Claude Code writes standalone roles and hooks but no project skills; Cursor writes roles, all ten skills, and hooks. `--no-hooks` is the independent hook opt-out and can be combined with `--no-mcp`.
|
package/docs/MCP_GUIDE.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# MCP Guide
|
|
2
|
-
|
|
3
|
-
Planr exposes one stdio MCP server:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
planr mcp
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Core tools include project/map reads, map status/preview/unlocks/lookahead, plan creation/refinement/splitting, map build, item create/breakdown/insert/amend/replan, pick, runtime heartbeat/progress/pause/resume/stale inspection, recovery sweep, approval request/approve/deny/list, artifact add/list/show, event list, debug bundle preview, log, review annotate/ingest/artifact/evidence/close, close, context create, search, and log read.
|
|
10
|
-
|
|
11
|
-
Review feedback tools:
|
|
12
|
-
|
|
13
|
-
- `planr_review_annotate`: add item-linked review feedback with severity, optional file, line, and author.
|
|
14
|
-
- `planr_review_ingest`: ingest hook-compatible JSON feedback without auto-closing or auto-approving work.
|
|
15
|
-
- `planr_review_artifact`: write a privacy-minimized `.planr/reviews/*.review.md` artifact.
|
|
16
|
-
- `planr_review_evidence`: return scoped Git/PR review evidence without source contents.
|
|
17
|
-
- `planr_review_close`: close a review item, write a review artifact, and create fix/follow-up review work when the verdict is not clean.
|
|
18
|
-
|
|
19
|
-
Resources:
|
|
20
|
-
|
|
21
|
-
- `planr://project/map`
|
|
22
|
-
- `planr://project/context`
|
|
23
|
-
- `planr://item/{id}`
|
|
24
|
-
- `planr://plan/{id}`
|
|
25
|
-
- `planr://log/{id}`
|
|
26
|
-
|
|
27
|
-
Prompts:
|
|
28
|
-
|
|
29
|
-
- `planr-plan`
|
|
30
|
-
- `planr-work`
|
|
31
|
-
- `planr-review`
|
|
32
|
-
- `planr-map`
|
|
33
|
-
- `planr-summary`
|
|
34
|
-
|
|
35
|
-
Use `planr install <client> --dry-run` to print project-scoped config.
|
|
36
|
-
|
|
37
|
-
The stable V1 contract and checked fixture live in:
|
|
38
|
-
|
|
39
|
-
- `docs/MCP_CONTRACT.md`
|
|
40
|
-
- `docs/fixtures/mcp-contract.json`
|
package/docs/MODEL_ROUTING.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Model routing
|
|
2
|
-
|
|
3
|
-
Planr Core treats routing as optional, advisory repository data. `.planr/agents.toml` declares opaque profiles and routes; Planr resolves them into pick packets but never calls a provider or claims that a requested model actually ran.
|
|
4
|
-
|
|
5
|
-
```toml
|
|
6
|
-
[profiles.worker]
|
|
7
|
-
client = "host-a"
|
|
8
|
-
model = "model-id"
|
|
9
|
-
agent_type = "repository-role"
|
|
10
|
-
effort = "high"
|
|
11
|
-
skill = "planr-work"
|
|
12
|
-
|
|
13
|
-
[[routes]]
|
|
14
|
-
match = { work_type = "code" }
|
|
15
|
-
profile = "worker"
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Create a neutral scaffold or an explicit registry:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
planr agents init
|
|
22
|
-
planr agents init --profile worker=host-a/model-id@high#standard --route code=worker
|
|
23
|
-
planr agents check
|
|
24
|
-
planr agents list --json
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Resolution order is per-item override, work type, plan, then default route. Unknown profiles fail open to the next applicable route. Host names, model ids, role selectors, effort values, and fallback behavior are opaque to Core.
|
|
28
|
-
|
|
29
|
-
Workers may report observed routing with logs and route-audit evidence. Requested-only values never become effective proof; missing effective evidence remains explicitly unavailable.
|
|
30
|
-
|
|
31
|
-
Host-specific model policies, generated repository roles, and uninstall/application lifecycle are external to Planr. [Switchloom](https://switchloom.ai) [v0.2.1](https://github.com/instructa/switchloom/releases/tag/v0.2.1) can manage repository-local routing artifacts from its [repository](https://github.com/instructa/switchloom), [setup quickstart](https://github.com/instructa/switchloom/blob/v0.2.1/README.md#setup-from-the-website), and [repository lifecycle docs](https://github.com/instructa/switchloom/blob/v0.2.1/docs/preset-composition.md#repository-lifecycle-commands), but Planr does not install, invoke, compile, apply, or uninstall Switchloom output. After an external tool or operator changes `.planr/agents.toml` or `.planr/policy.toml`, run `planr agents check` and capture observed route evidence through `planr log add` or `planr done`.
|
|
32
|
-
|
|
33
|
-
The hard boundary is provider-neutral: Planr consumes declarations and evidence; hosts and external routing tools decide whether any requested model, effort, role, or fallback actually ran. See [External Routing Declarations](ROUTING_BUNDLES.md).
|
package/docs/NPM.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# npm Package
|
|
2
|
-
|
|
3
|
-
The npm package name is `planr`. Published versions bundle platform-native binaries under `npm/native/<os>-<arch>/planr`, so installing from npm requires no Rust toolchain:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npm install -g planr
|
|
7
|
-
planr --version
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
Supported platforms: `darwin-arm64`, `darwin-x86_64`, `linux-x86_64`, `linux-arm64`. There is no postinstall script and no network download at install time; the binaries ship inside the tarball and are checksum-verified against the GitHub Release `SHA256SUMS` before publish.
|
|
11
|
-
|
|
12
|
-
## Publishing
|
|
13
|
-
|
|
14
|
-
Publishing happens only from the `npm-publish` job in `.github/workflows/release.yml` via npm Trusted Publishing (OIDC, no long-lived token). The job runs when the repository variable `NPM_PUBLISH_ENABLED` is `true` and requires a one-time Trusted Publisher configuration on npmjs.com: package `planr` -> Settings -> Publishing access -> GitHub Actions publisher with repository `instructa/planr` and workflow `release.yml`.
|
|
15
|
-
|
|
16
|
-
## Binary Resolution
|
|
17
|
-
|
|
18
|
-
The wrapper looks for a native binary in this order:
|
|
19
|
-
|
|
20
|
-
1. `PLANR_NATIVE_BIN`;
|
|
21
|
-
2. `npm/native/<os>-<arch>/planr` (published package);
|
|
22
|
-
3. `target/release/planr` then `target/debug/planr` (repository checkout).
|
|
23
|
-
|
|
24
|
-
## Local Development
|
|
25
|
-
|
|
26
|
-
The repository checkout contains no `npm/native/` binaries; the wrapper falls back to local cargo builds:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
cargo build --release
|
|
30
|
-
npm link
|
|
31
|
-
planr --version
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
For consumer E2E testing:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
cd ~/projects/planr-test
|
|
38
|
-
npm link ../planr
|
|
39
|
-
npm run test:npm-planr
|
|
40
|
-
```
|
package/docs/OPERATING_MODEL.md
DELETED
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
# Planr Operating Model
|
|
2
|
-
|
|
3
|
-
Planr coordinates coding-agent work through two durable surfaces:
|
|
4
|
-
|
|
5
|
-
- the Markdown plan package for product, build, architecture, verification, and narrative context;
|
|
6
|
-
- the SQLite map for item state, links, picks, reviews, logs, contexts, and closure.
|
|
7
|
-
|
|
8
|
-
The map is the source of truth for live state. Markdown explains why the work exists and what good completion means.
|
|
9
|
-
|
|
10
|
-
## Operator Start
|
|
11
|
-
|
|
12
|
-
Start every session by reading the current project and graph state:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
planr project show --json
|
|
16
|
-
planr map show --json
|
|
17
|
-
planr map lane --critical
|
|
18
|
-
planr map pressure
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
If the repository has no Planr project yet:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
planr project init "Project Name" --client all
|
|
25
|
-
planr doctor --client all
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Use `--db <path>` for isolated runs and tests.
|
|
29
|
-
|
|
30
|
-
## Canonical Flow
|
|
31
|
-
|
|
32
|
-
The default product flow is:
|
|
33
|
-
|
|
34
|
-
```text
|
|
35
|
-
idea -> product plan -> build plan -> map -> pick -> log -> review/evidence -> recovery/package -> close
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Use product and build plans for broad scope:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
planr plan new "App idea" --platform web --ai --backend
|
|
42
|
-
planr plan refine <plan-id> --note "decision or assumption"
|
|
43
|
-
planr plan split <plan-id> --slice "MVP implementation"
|
|
44
|
-
planr plan check <build-plan-id>
|
|
45
|
-
planr map build --from <build-plan-id>
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Product-plan task lists are candidates. Work becomes a live commitment only after it is in the map.
|
|
49
|
-
|
|
50
|
-
## Daily Agent Loop
|
|
51
|
-
|
|
52
|
-
Agents should work one map item at a time. The short path is:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
planr pick --json
|
|
56
|
-
planr done <item-id> --summary "what changed" --files a --files b --cmd "exact verification command" --review [--next]
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
`pick --json` returns one flat work packet (item, links, logs, runtime, recovery, conditions, recall context, `remaining` progress), so no separate `trace item` call is needed. `pick --work-type review` (or `code`) keeps checker and maker leases separate, and a null pick always carries a `reason` plus the `remaining` snapshot. `done` writes the completion log, then requests review (`--review`) or closes directly, and `--next` picks the following item. Evidence logging refreshes the heartbeat, so explicit `pick heartbeat` calls are only needed during long silent stretches.
|
|
60
|
-
|
|
61
|
-
For longer work, update runtime state instead of relying on chat history:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
planr pick progress <item-id> --percent 50 --note "implementation done, tests running"
|
|
65
|
-
planr pick pause <item-id> --note "waiting for human decision"
|
|
66
|
-
planr pick resume <item-id>
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
If a previous worker disappears, inspect stale picks before taking over:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
planr pick stale --older-than-seconds 900
|
|
73
|
-
planr pick stale --older-than-seconds 900 --release
|
|
74
|
-
planr recover sweep --older-than-seconds 900
|
|
75
|
-
planr recover sweep --older-than-seconds 900 --apply
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Use `pick stale --release` for a targeted stale-claim reset. Use `recover sweep --apply` when you also want timed-out work and retryable failed work handled in the same explicit recovery pass.
|
|
79
|
-
|
|
80
|
-
Record discoveries that future work needs:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
planr context add "decision or discovery" --item <item-id> --tag discovery
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Record completion evidence before asking for review:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
planr log add --item <item-id> \
|
|
90
|
-
--summary "what changed" \
|
|
91
|
-
--files path-a,path-b \
|
|
92
|
-
--cmd "exact verification command"
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Request and close review:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
planr review request <item-id>
|
|
99
|
-
planr review annotate <item-id> --message "review note" --severity warning
|
|
100
|
-
planr review evidence <item-id> --pr-url https://example.invalid/pr/123
|
|
101
|
-
planr review ingest <item-id> --from .planr/tmp/review-feedback.json
|
|
102
|
-
planr review close <review-id> --verdict complete --close-target
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
With `--close-target` a complete verdict also closes the reviewed item (it must already carry a completion log); otherwise finish with `planr close <item-id> --summary "Verified with evidence"`.
|
|
106
|
-
|
|
107
|
-
`review evidence` records Git branch, commit, dirty state, item-scoped changed-file provenance, and optional PR URL context without treating unrelated dirty files as proof. Review ingestion records hook-compatible JSON feedback as contexts and logs only. It does not close the review, approve the item, or unblock downstream work.
|
|
108
|
-
|
|
109
|
-
For a browser-based local review pass:
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
planr serve --port 7526
|
|
113
|
-
open http://127.0.0.1:7526/review
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
The review workspace shows review queues, linked plans, item evidence, diff-safe Git evidence, annotations, and approve/request-changes actions over the same local HTTP API.
|
|
117
|
-
|
|
118
|
-
Use approvals when a human decision must block closure:
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
planr approval request <item-id> --reason "release approval"
|
|
122
|
-
planr approval approve <item-id> --by "human reviewer"
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Pending or denied approval blocks `planr close`; use `planr map preview --close <item-id>` to inspect the gate before mutating state.
|
|
126
|
-
|
|
127
|
-
If review finds issues:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
planr review close <review-id> \
|
|
131
|
-
--verdict not-complete \
|
|
132
|
-
--findings "specific actionable finding"
|
|
133
|
-
planr review artifact <review-id>
|
|
134
|
-
planr map show --json
|
|
135
|
-
planr pick --json
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Review findings create follow-up work and write a `.planr/reviews/*.review.md` artifact. Do not mark the original item complete by summarizing the finding away.
|
|
139
|
-
|
|
140
|
-
## Parent Gate Pattern
|
|
141
|
-
|
|
142
|
-
Model material changes as parent gates. The parent is not the work package; its linked children are.
|
|
143
|
-
|
|
144
|
-
```text
|
|
145
|
-
parent gate
|
|
146
|
-
`- implementation or test child
|
|
147
|
-
`- review item linked to that child
|
|
148
|
-
|- pass -> child can close -> parent gate auto-closes
|
|
149
|
-
`- findings -> fix item -> follow-up review -> ...
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Rules:
|
|
153
|
-
|
|
154
|
-
- create one parent item for the change;
|
|
155
|
-
- use `planr item breakdown <parent-id> --into "Implement, Verify"` to create child work under the parent;
|
|
156
|
-
- request review on the implementation or test child after evidence exists;
|
|
157
|
-
- if review finds issues, let Planr create fix and follow-up review work from the review verdict;
|
|
158
|
-
- downstream top-level work should depend on the parent gate, not on the first implementation child.
|
|
159
|
-
|
|
160
|
-
This keeps later work blocked until review is actually clean.
|
|
161
|
-
|
|
162
|
-
Parent gates roll up automatically: once every child is closed or cancelled, the gate becomes ready and auto-closes when no review or approval on the gate itself is open (a cancelled or partially closed child rolls up as `closed_partial`). Parent gates are never returned by `planr pick`; the children are the work.
|
|
163
|
-
|
|
164
|
-
## Notes, Contexts, Logs, And Stories
|
|
165
|
-
|
|
166
|
-
Use the smallest durable surface that fits the information:
|
|
167
|
-
|
|
168
|
-
- `planr log add`: proof that work happened, including files, commands, tests, review results, and handoff facts.
|
|
169
|
-
- `planr context add`: a project or item discovery that another future item may need.
|
|
170
|
-
- `planr note add`: a short task-local note when a human or agent needs nearby context.
|
|
171
|
-
- Story logs: longer narrative history when graph state and short contexts are too thin.
|
|
172
|
-
|
|
173
|
-
Story logs are narrative memory, not status authority. The map remains authoritative for state.
|
|
174
|
-
|
|
175
|
-
See [HANDOFFS_AND_STORIES.md](HANDOFFS_AND_STORIES.md) for file placement and contents.
|
|
176
|
-
|
|
177
|
-
## Recovery
|
|
178
|
-
|
|
179
|
-
After interruption, compaction, or agent handoff:
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
git status --short
|
|
183
|
-
planr project show --json
|
|
184
|
-
planr map show --json
|
|
185
|
-
planr map lane --critical
|
|
186
|
-
planr map pressure
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
Then inspect the current item:
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
planr trace item <item-id>
|
|
193
|
-
planr log list --item <item-id>
|
|
194
|
-
planr context list --item <item-id>
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
If ownership must be reset:
|
|
198
|
-
|
|
199
|
-
```bash
|
|
200
|
-
planr pick stale --older-than-seconds 900
|
|
201
|
-
planr pick release <item-id> --force
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
Use force only when the prior owner is gone or the operator intentionally resets the claim.
|
|
205
|
-
|
|
206
|
-
For broad interruption recovery, prefer the explicit sweeper:
|
|
207
|
-
|
|
208
|
-
```bash
|
|
209
|
-
planr recover sweep --older-than-seconds 900
|
|
210
|
-
planr recover sweep --older-than-seconds 900 --apply
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
The preview reports stale picks, timed-out work, retryable failures, retry delays, and manual pre/post conditions. The apply mode mutates only the listed recoverable work and records recovery events.
|
|
214
|
-
|
|
215
|
-
## Packages And Sharing
|
|
216
|
-
|
|
217
|
-
Use packages for local backups and reusable templates:
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
planr export --include-plans --include-logs --template-name "Backend slice" --tag api --out planr-package.json
|
|
221
|
-
planr import planr-package.json --preview
|
|
222
|
-
planr import planr-package.json --confirm
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
Import is preview-first. Confirmed import restores graph items, links, contexts, logs, plan file snapshots, and review artifacts into the current project. Encrypted sharing can wrap the JSON package with a local tool such as `age` or `gpg`; Planr does not require a hosted share service.
|
|
226
|
-
|
|
227
|
-
## Agent Prompts
|
|
228
|
-
|
|
229
|
-
Use prompt output when configuring agents without editing global config:
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
planr prompt cli --client codex
|
|
233
|
-
planr prompt mcp --client all
|
|
234
|
-
planr prompt http
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
Prompt commands print ready-to-use setup and operating instructions and report that global config was not edited.
|
|
238
|
-
|
|
239
|
-
## Completion Rule
|
|
240
|
-
|
|
241
|
-
Do not call a scope complete until all of these are true:
|
|
242
|
-
|
|
243
|
-
- required child and review items are closed;
|
|
244
|
-
- log evidence records exact files and commands;
|
|
245
|
-
- verification commands were actually run;
|
|
246
|
-
- review findings are closed or converted into follow-up work;
|
|
247
|
-
- `planr map show --json` has no in-scope blocker;
|
|
248
|
-
- the summary matches the map, logs, and review state.
|
|
249
|
-
|
|
250
|
-
For release-grade scopes, rerun the full verification ladder in [TESTING.md](TESTING.md).
|
package/docs/ROUTING_BUNDLES.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# External routing declarations
|
|
2
|
-
|
|
3
|
-
Planr Core is provider-neutral. It parses `.planr/agents.toml`, resolves routes into pick packets, records declared-versus-observed evidence, and checks `.planr/policy.toml`. It does not own a bundle format, catalog, compiler, signer, installer, or uninstaller.
|
|
4
|
-
|
|
5
|
-
The current boundary is repository-local declaration plus evidence:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
planr agents init
|
|
9
|
-
planr agents check
|
|
10
|
-
planr agents list --json
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
External tools, including Switchloom v0.2.1, may create, update, apply, or uninstall repository-local routing artifacts. Those lifecycle operations happen outside Planr. Planr only consumes the resulting provider-neutral declarations and the route observations workers attach to logs.
|
|
14
|
-
|
|
15
|
-
Because declarations are advisory, requested model values never become proof by themselves. Strong evidence keeps requested, host-resolved, and effective execution separate in route observations, with `unavailable` used when the host cannot prove what ran.
|
package/docs/SECURITY.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Security And Privacy
|
|
2
|
-
|
|
3
|
-
- Planr is local-first and stores V1 data in the configured SQLite database and `.planr` files.
|
|
4
|
-
- No content telemetry is emitted by default.
|
|
5
|
-
- Shell commands are not run by Planr unless the user explicitly runs them outside Planr or records them as evidence.
|
|
6
|
-
- HTTP binds to `127.0.0.1`.
|
|
7
|
-
- Destructive operations require confirmation or preview flags.
|
|
8
|
-
- Logs, contexts, and inline artifact content are checked by `planr scrub` for common secret-looking patterns. `planr scrub --confirm` rewrites flagged values in place with `[REDACTED]` markers, updates the search index, and records a `secret_scrubbed` event per rewritten row.
|