planr 1.7.0 → 1.7.2
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 +47 -22
- package/docs/ARCHITECTURE.md +3 -2
- package/docs/RELEASE.md +50 -7
- package/docs/SWITCHLOOM_COMPATIBILITY.md +46 -0
- package/docs/documentation/CONTRACT.md +7 -7
- package/docs/documentation/COVERAGE.md +5 -3
- package/docs/documentation/INFORMATION_ARCHITECTURE.md +5 -2
- 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 -55
- package/docs/CLAUDE_CODE.md +0 -52
- package/docs/CLI_REFERENCE.md +0 -170
- 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 -23
- package/docs/INSTALL.md +0 -115
- package/docs/MCP_CONTRACT.md +0 -78
- 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 -519
- 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 -68
- 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 -145
- package/docs/planr-spec/UX_FLOWS.md +0 -235
- package/docs/release-candidates/planr-v1.5.2.md +0 -156
- /package/docs/{planr-spec → contracts}/EVAL_CONTRACT_V1.md +0 -0
- /package/docs/{planr-spec → contracts}/V1_1_DIFFERENTIATION_CONTRACT.md +0 -0
package/docs/GOALS.md
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
# Long-Running Goals
|
|
2
|
-
|
|
3
|
-
Planr makes long-running, autonomous goal runs durable. A loop driver — Codex `/goal`, Claude Code `/goal` or `/loop`, an automation, or a human re-dispatching a skill — supplies continuation pressure: "do not stop until the goal holds." Planr supplies everything such a run loses between sessions: the plan, the task map, picks, evidence logs, review gates, approvals, and recovery.
|
|
4
|
-
|
|
5
|
-
This is complementary, not competing. `/goal` stays the orchestrator; Planr is the state layer underneath it. Without a native loop primitive you lose only automatic re-prompting — never state, evidence, or recovery.
|
|
6
|
-
|
|
7
|
-
## Division Of Labor
|
|
8
|
-
|
|
9
|
-
| Concern | Owner |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Continuation pressure, re-prompting, session autonomy | loop driver (`/goal`, automation, human) |
|
|
12
|
-
| Scope, acceptance criteria, verification contract | Planr plan (`planr plan new/check`) |
|
|
13
|
-
| Task state, dependencies, what is next | Planr map (`planr map`, `planr pick`) |
|
|
14
|
-
| Stop condition that survives compaction | Planr context (`--tag goal-contract`) |
|
|
15
|
-
| Proof the work happened and runs | Planr logs (`planr log`, `planr done`) |
|
|
16
|
-
| Maker/checker separation | Planr reviews (`planr review`) + subagent roles |
|
|
17
|
-
| Recovery after session loss or host switch | Planr map + stored contract, from zero chat context |
|
|
18
|
-
|
|
19
|
-
## The Workflow
|
|
20
|
-
|
|
21
|
-
### 1. Prep — `$planr-goal` (once, interactive)
|
|
22
|
-
|
|
23
|
-
```text
|
|
24
|
-
$planr-goal Add CSV export to the reports page, should work in the browser
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
The skill compiles the goal and stops — no implementation:
|
|
28
|
-
|
|
29
|
-
- creates and checks a feature-scoped plan (`planr plan new` -> `plan check`; strict, empty sections fail),
|
|
30
|
-
- builds the map and links execution order (`planr map build` is idempotent; `planr link add ... --type blocks`),
|
|
31
|
-
- stores the goal contract durably in Planr:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
planr context add "GOAL CONTRACT pl-csv-export: DONE when every in-scope map item is closed with log evidence, all reviews closed with verdict complete, no open approvals in scope, and a live browser verification log exists for the export flow. Iteration budget: 10." --tag goal-contract
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
- prints the exact starter command for your host.
|
|
38
|
-
|
|
39
|
-
### 2. Execute — the loop driver runs `$planr-loop`
|
|
40
|
-
|
|
41
|
-
```text
|
|
42
|
-
/goal Use $planr-loop on plan pl-csv-export. 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.
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
The autonomy clause matters on long runs: deep into a session, frontier models occasionally end a turn with a statement of intent instead of the corresponding action, or pause to ask permission they already have. Stating the operating mode up front prevents both.
|
|
46
|
-
|
|
47
|
-
Each iteration follows the `$planr-loop` protocol:
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
1. planr plan audit <plan-id> one-call contract verdict; holds -> exit
|
|
51
|
-
2. $planr-work pick exactly one ready item, implement, finish with planr done --review
|
|
52
|
-
3. live verify run the platform verification, log it with planr log add --kind verification --cmd
|
|
53
|
-
4. $planr-review independent audit; complete -> review close --close-target,
|
|
54
|
-
findings -> fix items become the next ready items
|
|
55
|
-
5. repeat
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
`plan audit` replaces the hand-rolled final audit: it checks `items_settled`, `reviews_complete`, `approvals_clear`, and `verification_logged` clause by clause with evidence, includes the stored goal contract, and answers `holds: true/false` in one command.
|
|
59
|
-
|
|
60
|
-
The per-item path is three commands since v1.1.6:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
planr pick --json --plan <plan-id> # flat work packet, leased only from the goal's plan
|
|
64
|
-
planr done <item-id> --summary "..." --cmd "..." --review --next
|
|
65
|
-
planr review close <review-id> --verdict complete --reviewer <id> --close-target
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
`--plan` keeps the lease inside the goal contract: when several plans share the board (a parallel feature, leftovers from an aborted prep run), a plan-scoped goal run never picks work outside its own plan. A pick that finds nothing in scope never widens silently: it reports `reason: "nothing_ready"` when nothing is ready at all, or `reason: "ready_items_excluded_by_filter"` with the excluded items, the cause per item, and the exact `repair` pick commands when ready work exists outside the filter.
|
|
69
|
-
|
|
70
|
-
`done`/`close`/`review close` responses and the pick packet include a `remaining` snapshot (`counts` with explicit zeros for every status, `settled`, `total`), so the orchestrator evaluates the stop condition straight from the completion output — no extra `map status` round-trip. The same responses list what each settlement `unlocked`, so the loop sees its next work without re-reading the map. `--next` never hands a worker its own freshly created review, so maker and checker stay separate even in compact loops. The review verdict records `review_mode` (`single_agent` or `independent`) automatically from worker identity — no ceremony note needed. The contract's "all reviews closed" clause audits review items that exist; an item closed with plain `done` satisfies the contract without a review gate, so low-signal reviews can be skipped without blocking `plan audit`.
|
|
71
|
-
|
|
72
|
-
### 3. Finish
|
|
73
|
-
|
|
74
|
-
When the contract holds, the loop exits through `$planr-summary`: an evidence-backed account of what shipped, which commands proved it, and what (if anything) stayed blocked.
|
|
75
|
-
|
|
76
|
-
## Recovery
|
|
77
|
-
|
|
78
|
-
The defining property of a long-running goal: the session will die before the goal does. With Planr that costs nothing. Start a new session — same host or a different one — with the same starter line:
|
|
79
|
-
|
|
80
|
-
```text
|
|
81
|
-
/goal Use $planr-loop on plan pl-csv-export. The loop contract is stored in planr context (tag: goal-contract).
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Iteration 1 reads the map and the stored contract: items already settled stay settled, open reviews stay open, the next ready item is picked. No chat history needed. `planr recover sweep` handles stale picks from interrupted workers.
|
|
85
|
-
|
|
86
|
-
## Per-Host Setup
|
|
87
|
-
|
|
88
|
-
### Codex with `/goal`
|
|
89
|
-
|
|
90
|
-
Install the plugin and initialize the repository. Optional routing declarations are repository-local and may be edited directly or managed by an external tool such as [Switchloom v0.2.1](https://github.com/instructa/switchloom/releases/tag/v0.2.1) before the run:
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
codex plugin marketplace add instructa/planr
|
|
94
|
-
codex plugin add planr@planr
|
|
95
|
-
planr project init "My Product"
|
|
96
|
-
planr agents check
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Then:
|
|
100
|
-
|
|
101
|
-
```text
|
|
102
|
-
$planr-goal <your goal> # prep: plan, map, contract, starter command
|
|
103
|
-
/goal Use $planr-loop on plan <plan-id>. The loop contract is stored in planr context (tag: goal-contract).
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
When repository routing declarations exist, the `/goal` PM treats them as advisory dispatch input. The external routing owner decides exact models, effort, role names, fallback policy, and lifecycle; Planr only carries the resulting opaque route in pick packets and records observed evidence when workers provide it. Codex Automations use the same starter line.
|
|
107
|
-
|
|
108
|
-
### Claude Code
|
|
109
|
-
|
|
110
|
-
Same shape via the plugin (`/plugin install planr@planr`), which registers the `planr-worker` and `planr-reviewer` subagents automatically:
|
|
111
|
-
|
|
112
|
-
```text
|
|
113
|
-
/planr:planr-goal <your goal>
|
|
114
|
-
/goal Use $planr-loop on plan <plan-id>. The loop contract is stored in planr context (tag: goal-contract).
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
`/loop` works for fixed-cadence runs instead of goal-conditioned ones. The registered worker subagent pins a cheaper model tier; see [Cost Tiering](#cost-tiering).
|
|
118
|
-
|
|
119
|
-
### Cursor
|
|
120
|
-
|
|
121
|
-
No `/goal` primitive, but full subagent support. Install once:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
planr install cursor # writes .cursor/mcp.json, .cursor/agents/planr-worker.md + planr-reviewer.md, and the skills
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Then run the identical protocol with the human (or an automation) as the re-dispatcher:
|
|
128
|
-
|
|
129
|
-
```text
|
|
130
|
-
Use $planr-goal: <your goal>
|
|
131
|
-
Use $planr-loop on plan <plan-id>. The loop contract is stored in planr context (tag: goal-contract).
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
`$planr-loop` iterates within the session under its own budget, dispatching `/planr-worker` and `/planr-reviewer` per item — the provisioned subagents preload the work and review protocols, so dispatches stay one line. If the session ends before the contract holds, dispatch the same line again — recovery is identical to the `/goal` case. Parallelism, background subagents, and worktree caveats: [Cursor](CURSOR.md).
|
|
135
|
-
|
|
136
|
-
### Hosts without a loop primitive
|
|
137
|
-
|
|
138
|
-
Identical protocol; the human (or a background agent) is the re-dispatcher, and worker/reviewer run as separate sequential dispatches when the host has no subagents.
|
|
139
|
-
|
|
140
|
-
### Plain MCP clients
|
|
141
|
-
|
|
142
|
-
Any MCP-capable agent uses the same flow over `planr mcp`. Every session starts with map state, so the loop is resumable by construction.
|
|
143
|
-
|
|
144
|
-
## Cost Tiering
|
|
145
|
-
|
|
146
|
-
A goal run has distinct roles with different intelligence needs. Planr represents those decisions as opaque profiles and routes; it does not choose providers, models, effort levels, fallback chains, or host-native role names.
|
|
147
|
-
|
|
148
|
-
An optional external routing tool can map planning, exploration, implementation, mechanical work, and independent review onto different cost or quality tiers. If [Switchloom v0.2.1](https://github.com/instructa/switchloom/releases/tag/v0.2.1) or another repository-local process writes routing declarations or host roles, follow that tool's generated instructions outside Planr and verify effective child metadata because declarations alone are not proof. The Core contract is documented in [Model Routing](MODEL_ROUTING.md).
|
|
149
|
-
|
|
150
|
-
## Coming From Other Goal Tools
|
|
151
|
-
|
|
152
|
-
If you already run goal workflows with other tools, the concepts map directly:
|
|
153
|
-
|
|
154
|
-
| Elsewhere | In Planr |
|
|
155
|
-
| --- | --- |
|
|
156
|
-
| Goal charter file (`goal.md`) | product/build plan (`planr plan new`, rich scope + verification) |
|
|
157
|
-
| Board/state file (`state.yaml`) | the map (`planr map show`, authoritative item state) |
|
|
158
|
-
| One active task | `planr pick` (single owner, heartbeat, stale recovery) |
|
|
159
|
-
| Task receipts | `planr log` / `planr done` (files, commands, results) |
|
|
160
|
-
| Goal oracle / completion proof | goal contract + live verification log |
|
|
161
|
-
| Scout/Judge/Worker roles | worker/reviewer subagents + `$planr-status` for honest reads |
|
|
162
|
-
| Final audit before done | `$planr-review` with `review close --verdict complete` |
|
|
163
|
-
|
|
164
|
-
Using such tools for intake or visualization alongside Planr is fine — keep one rule: the Planr map stays the single source of truth for item status, links, picks, reviews, approvals, and completion.
|
|
165
|
-
|
|
166
|
-
## Rules That Keep Goal Runs Honest
|
|
167
|
-
|
|
168
|
-
- Never weaken a stored goal contract mid-run; scope changes go through `$planr-plan` and the user.
|
|
169
|
-
- "Done" means the feature ran (live verification log), not that it compiles.
|
|
170
|
-
- The maker never closes its own review; single-agent hosts record `review-mode` honestly.
|
|
171
|
-
- Two iterations without map-state movement -> stop and report instead of grinding.
|
|
172
|
-
- Destructive or out-of-repo side effects always go behind `planr approval request`.
|
|
173
|
-
- Lessons that should outlive the iteration (a confirmed approach, a correction, a dead end) go into `planr context add "..." --tag lesson` — the next iteration or a fresh session recovers them with `planr context list --tag lesson`, not from chat history.
|
|
174
|
-
|
|
175
|
-
See also: [Skills](SKILLS.md), [Operating Model](OPERATING_MODEL.md), [Task Graph Model](TASK_GRAPH_MODEL.md), [Codex](CODEX.md), [Claude Code](CLAUDE_CODE.md), [Cursor](CURSOR.md).
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# Handoffs And Stories
|
|
2
|
-
|
|
3
|
-
Planr separates live state from narrative memory.
|
|
4
|
-
|
|
5
|
-
- Live state belongs in the map.
|
|
6
|
-
- Completion proof belongs in logs.
|
|
7
|
-
- Searchable decisions belong in contexts.
|
|
8
|
-
- Long-form narrative belongs in story logs.
|
|
9
|
-
|
|
10
|
-
## Handoff Logs
|
|
11
|
-
|
|
12
|
-
Use `planr log add` whenever another agent, reviewer, or future session must know what happened:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
planr log add --item <item-id> \
|
|
16
|
-
--summary "Implemented release dry-run checks" \
|
|
17
|
-
--files scripts/build-release.sh,docs/RELEASE.md \
|
|
18
|
-
--cmd "scripts/build-release.sh" \
|
|
19
|
-
--cmd "cargo test"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
A useful handoff log names:
|
|
23
|
-
|
|
24
|
-
- changed files;
|
|
25
|
-
- commands run;
|
|
26
|
-
- test results;
|
|
27
|
-
- assumptions kept;
|
|
28
|
-
- decisions made;
|
|
29
|
-
- known remaining risk.
|
|
30
|
-
|
|
31
|
-
Do not paste private source files, secrets, tokens, or full transcripts into logs.
|
|
32
|
-
|
|
33
|
-
## Context Entries
|
|
34
|
-
|
|
35
|
-
Use context for durable discoveries:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
planr context add "Release dry-runs must not edit global agent configuration." --tag constraint
|
|
39
|
-
planr context add "Use project-scoped MCP config for client examples." --tag decision
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Prefer context when the fact may influence multiple future items.
|
|
43
|
-
|
|
44
|
-
## Task Notes
|
|
45
|
-
|
|
46
|
-
Use notes for local item discussion:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
planr note add "Reviewer asked for an extra npm pack dry-run before closure." --item <item-id>
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Prefer notes when the fact is not project-wide and should stay near one item.
|
|
53
|
-
|
|
54
|
-
## Story Logs
|
|
55
|
-
|
|
56
|
-
Use story logs only when map items, contexts, and logs are too thin to preserve the decision chain.
|
|
57
|
-
|
|
58
|
-
Create a story log for:
|
|
59
|
-
|
|
60
|
-
- a large architecture or ownership change;
|
|
61
|
-
- a multi-round review/fix sequence;
|
|
62
|
-
- a discovery that invalidates earlier assumptions;
|
|
63
|
-
- a release or schema-upgrade path that future agents must understand;
|
|
64
|
-
- interruption-prone work where the "why" matters as much as the status.
|
|
65
|
-
|
|
66
|
-
Recommended location for repo-versioned product stories:
|
|
67
|
-
|
|
68
|
-
```text
|
|
69
|
-
.planr/stories/
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Recommended location for private operator-only stories:
|
|
73
|
-
|
|
74
|
-
```text
|
|
75
|
-
~/.planr/<project>/stories/
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Do not create `todo`, `in-progress`, or `finished` story folders. Status belongs to the map.
|
|
79
|
-
|
|
80
|
-
## Story Template
|
|
81
|
-
|
|
82
|
-
```markdown
|
|
83
|
-
# <Story Title>
|
|
84
|
-
|
|
85
|
-
Project: <project name>
|
|
86
|
-
Related items: <item ids>
|
|
87
|
-
Updated: <YYYY-MM-DD>
|
|
88
|
-
|
|
89
|
-
## Problem
|
|
90
|
-
|
|
91
|
-
## Current State
|
|
92
|
-
|
|
93
|
-
## Key Discoveries
|
|
94
|
-
|
|
95
|
-
## Decisions
|
|
96
|
-
|
|
97
|
-
## Rejected Alternatives
|
|
98
|
-
|
|
99
|
-
## Implementation Or Review History
|
|
100
|
-
|
|
101
|
-
## Verification
|
|
102
|
-
|
|
103
|
-
## Open Risks
|
|
104
|
-
|
|
105
|
-
## Next Likely Steps
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Keep the story focused on narrative. Do not duplicate the full map.
|
|
109
|
-
|
|
110
|
-
## Recovery Order
|
|
111
|
-
|
|
112
|
-
When resuming work:
|
|
113
|
-
|
|
114
|
-
1. `git status --short`
|
|
115
|
-
2. `planr map show --json`
|
|
116
|
-
3. `planr trace item <item-id>`
|
|
117
|
-
4. `planr log list --item <item-id>`
|
|
118
|
-
5. `planr context list --item <item-id>`
|
|
119
|
-
6. read a relevant story log only if the trace and logs do not explain why the work exists
|
|
120
|
-
|
|
121
|
-
The story log may explain direction, but it must not override the map.
|
package/docs/HOOKS.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Host Hooks
|
|
2
|
-
|
|
3
|
-
`planr install codex|claude|cursor` wires Planr into the host's native hook system **by default** — skip it with `--no-hooks`. The hooks solve one problem: loop state must survive the moments context is created or destroyed. Every new session and every context compaction gets the map state injected automatically via `planr prime`, so recovery stops being discipline and becomes mechanism.
|
|
4
|
-
|
|
5
|
-
## What gets installed
|
|
6
|
-
|
|
7
|
-
| Host | File | Events | Runs |
|
|
8
|
-
| --- | --- | --- | --- |
|
|
9
|
-
| Cursor | `.cursor/hooks.json` | `sessionStart` | `planr prime --cursor-json` |
|
|
10
|
-
| | | `subagentStop` | `.cursor/hooks/planr-evidence-guard.sh` |
|
|
11
|
-
| Claude Code | `.claude/settings.json` | `SessionStart` (matcher `startup\|resume\|compact`) | `planr prime --hook-json` |
|
|
12
|
-
| Codex CLI | `.codex/hooks.json` | `SessionStart` | `planr prime` |
|
|
13
|
-
|
|
14
|
-
`planr prime` prints one compact, bounded state block (project, map counts, your held items with log status, the goal contract, registry presence, and the next command) — deterministic and read-only. `--hook-json` wraps it in the Claude Code SessionStart envelope (`hookSpecificOutput.additionalContext`); `--cursor-json` emits Cursor's `additional_context` shape.
|
|
15
|
-
|
|
16
|
-
Only session-start events are wired, deliberately: they are the one place all three hosts inject hook output as context, and Claude's `compact` source plus post-compaction session starts cover the compaction case. Pre/post-compaction events (`preCompact`, `PreCompact`, `PostCompact`) cannot restore model context and are not used.
|
|
17
|
-
|
|
18
|
-
The evidence guard is advisory and identity-scoped: a Cursor subagent that stops while *its own* pick (matched via `PLANR_WORKER_ID`/`PLANR_SESSION_ID`) has no completion log gets one follow-up message naming the item and the two ways out (`planr done ...` or `planr pick release ...`). Without an explicit worker identity it stays silent rather than steering the wrong agent toward foreign items. It never blocks.
|
|
19
|
-
|
|
20
|
-
## Design rules
|
|
21
|
-
|
|
22
|
-
- **Fail open, always.** Every hook command ends in `|| true` with a 10-second timeout; a missing, broken, or uninitialized planr never blocks a session. In a repo without a Planr database, `planr prime` exits silently and creates nothing.
|
|
23
|
-
- **Additive merge, planr owns only its own entries.** Existing hook files keep every foreign entry; planr entries are reconciled on re-install (current ones untouched, outdated ones upgraded in place, entries under retired events removed) — so `planr install <client>` after an update also refreshes the hooks. A file planr cannot parse as a JSON object is left untouched with a note in the install output — add the snippet manually in that case.
|
|
24
|
-
- **Default, not mandatory.** `--no-hooks` skips hook installation entirely; deleting the planr entries from the hook files removes the behavior with no other effect.
|
|
25
|
-
|
|
26
|
-
## Codex trust model
|
|
27
|
-
|
|
28
|
-
Codex requires reviewing hooks before they run: after installing, open `/hooks` in the Codex TUI once and trust the planr entries. Codex records trust against the hook definition's hash, so if a future planr version changes the hook commands, Codex will ask again — that is the host working as intended.
|
|
29
|
-
|
|
30
|
-
## Removing hooks
|
|
31
|
-
|
|
32
|
-
Delete the planr entries from `.cursor/hooks.json` / `.claude/settings.json` / `.codex/hooks.json` (and `.cursor/hooks/planr-evidence-guard.sh`). Nothing else depends on them.
|
|
33
|
-
|
|
34
|
-
See also: [Model Routing](MODEL_ROUTING.md), [Goals](GOALS.md), [CLI Reference](CLI_REFERENCE.md).
|
package/docs/IMPORT.md
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Planr Packages
|
|
2
|
-
|
|
3
|
-
```bash
|
|
4
|
-
planr project init "New Project"
|
|
5
|
-
planr export --include-plans --include-logs --template-name "API backend slice" --tag api --out planr-package.json
|
|
6
|
-
planr import planr-package.json --preview
|
|
7
|
-
planr import planr-package.json --confirm
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
Planr packages are local-first JSON files created by `planr export`. They carry graph items, links, contexts, optional logs, optional eval evidence refs, optional plan file snapshots, and review artifacts.
|
|
11
|
-
|
|
12
|
-
Imports are preview-first. Preview reports package metadata, create counts, and conflicting item ids before mutating the current project.
|
|
13
|
-
|
|
14
|
-
Eval evidence exports only when logs are included. Packages carry immutable eval suite snapshots, runs, case results, raw samples, comparisons, invalidations, and evidence refs so imported refs resolve to local eval records and comparison verdicts can be reproduced from restored run evidence. Import preflights the whole eval graph before inserting package rows: duplicate immutable ids inside the package must be byte/field-identical, suite/run/comparison/invalidation/ref dependencies must resolve, case sample ids must match nested samples, and eval refs must have `closure_authority: false`. Existing immutable eval ids are accepted only when their stored content exactly matches the package, and imported eval timestamps/provenance are preserved. Review refs must point at a real `work_type=review` item linked to the claimed item. Restoring audit provenance never closes work or changes map ownership.
|
|
15
|
-
|
|
16
|
-
Planr packages are local-first JSON. For encrypted sharing, review the JSON locally and encrypt the file with your team's standard tool, for example:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
age -o planr-backup.json.age -r <recipient> planr-backup.json
|
|
20
|
-
gpg -c planr-backup.json
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Planr does not require a hosted share service for V1.1.
|
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,78 +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
|
-
- eval suite check, run, show, compare, gate, invalidate, rescore, and evidence refs
|
|
45
|
-
- trace item, log add, and log read (including three-stage route observations)
|
|
46
|
-
- provider-neutral agent registry reads and route overrides
|
|
47
|
-
- review annotate, ingest, artifact, evidence, and close
|
|
48
|
-
- item close, context create, and search
|
|
49
|
-
|
|
50
|
-
`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.
|
|
51
|
-
|
|
52
|
-
## Review Contract
|
|
53
|
-
|
|
54
|
-
Review feedback ingestion is advisory:
|
|
55
|
-
|
|
56
|
-
- `planr_review_annotate` stores item-linked annotation context.
|
|
57
|
-
- `planr_review_ingest` stores hook-compatible feedback and never auto-closes or auto-approves work.
|
|
58
|
-
- `planr_review_artifact` writes a privacy-minimized review artifact.
|
|
59
|
-
- `planr_review_evidence` returns Git/PR evidence scoped to files named by item logs or artifacts, and treats unrelated dirty files as non-owned.
|
|
60
|
-
- `planr_review_close` records the final verdict, writes a review artifact, and creates fix/follow-up review work when the verdict is not clean.
|
|
61
|
-
|
|
62
|
-
HTTP mirrors the same rule: `GET /v1/reviews/:id/artifact` is read-only; `POST /v1/reviews/:id/artifact` writes an artifact explicitly.
|
|
63
|
-
|
|
64
|
-
## Eval Evidence Contract
|
|
65
|
-
|
|
66
|
-
`planr_eval_evidence_ref` mirrors `planr eval evidence-ref`: it attaches an eval run or comparison id to an existing log, review item, or artifact. The returned eval envelope records `closure_authority: false`; eval verdicts are audit evidence only and never close, approve, or otherwise mutate map item status.
|
|
67
|
-
|
|
68
|
-
## Install Contract
|
|
69
|
-
|
|
70
|
-
`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:
|
|
71
|
-
|
|
72
|
-
- 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
|
|
73
|
-
- 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
|
|
74
|
-
- Cursor: the CLI writes `.cursor/mcp.json`, both `.cursor/agents/` roles, all ten `.cursor/skills/` skill copies, and `.cursor/hooks.json`
|
|
75
|
-
|
|
76
|
-
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.
|
|
77
|
-
|
|
78
|
-
`--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
|
-
```
|