planr 0.0.1 → 1.1.16

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.
Files changed (63) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +150 -0
  3. package/docs/ARCHITECTURE.md +75 -0
  4. package/docs/CI.md +54 -0
  5. package/docs/CLAUDE_CODE.md +33 -0
  6. package/docs/CLI_REFERENCE.md +126 -0
  7. package/docs/CODEX.md +48 -0
  8. package/docs/CURSOR.md +30 -0
  9. package/docs/GOALS.md +155 -0
  10. package/docs/HANDOFFS_AND_STORIES.md +121 -0
  11. package/docs/IMPORT.md +21 -0
  12. package/docs/INSTALL.md +113 -0
  13. package/docs/MCP_CONTRACT.md +70 -0
  14. package/docs/MCP_GUIDE.md +40 -0
  15. package/docs/NPM.md +40 -0
  16. package/docs/OPERATING_MODEL.md +250 -0
  17. package/docs/RELEASE.md +140 -0
  18. package/docs/SECURITY.md +8 -0
  19. package/docs/SKILLS.md +278 -0
  20. package/docs/TASK_GRAPH_MODEL.md +222 -0
  21. package/docs/TESTING.md +87 -0
  22. package/docs/TROUBLESHOOTING.md +26 -0
  23. package/docs/fixtures/mcp-contract.json +92 -0
  24. package/docs/planr-spec/ADRS.md +160 -0
  25. package/docs/planr-spec/AI_SPEC.md +138 -0
  26. package/docs/planr-spec/ANALYTICS_OBSERVABILITY_SPEC.md +124 -0
  27. package/docs/planr-spec/API_AND_DATA_MODEL.md +517 -0
  28. package/docs/planr-spec/BACKEND_IMPLEMENTATION_SPEC.md +178 -0
  29. package/docs/planr-spec/CLIENT_IMPLEMENTATION_SPEC.md +119 -0
  30. package/docs/planr-spec/DESIGN_SYSTEM_SPEC.md +102 -0
  31. package/docs/planr-spec/PRODUCT_SPEC.md +193 -0
  32. package/docs/planr-spec/QA_ACCEPTANCE_TESTS.md +146 -0
  33. package/docs/planr-spec/README.md +67 -0
  34. package/docs/planr-spec/REFERENCES.md +29 -0
  35. package/docs/planr-spec/RELEASE_READINESS.md +95 -0
  36. package/docs/planr-spec/SAFETY_PRIVACY_SECURITY.md +169 -0
  37. package/docs/planr-spec/TASKS.md +932 -0
  38. package/docs/planr-spec/TECH_ARCHITECTURE.md +143 -0
  39. package/docs/planr-spec/UX_FLOWS.md +235 -0
  40. package/docs/planr-spec/V1_1_DIFFERENTIATION_CONTRACT.md +177 -0
  41. package/docs/planr-spec.zip +0 -0
  42. package/npm/bin/planr.js +54 -0
  43. package/npm/native/darwin-arm64/planr +0 -0
  44. package/npm/native/darwin-x86_64/planr +0 -0
  45. package/npm/native/linux-arm64/planr +0 -0
  46. package/npm/native/linux-x86_64/planr +0 -0
  47. package/package.json +27 -8
  48. package/plugins/planr/.claude-plugin/plugin.json +11 -0
  49. package/plugins/planr/.codex-plugin/plugin.json +25 -0
  50. package/plugins/planr/agents/planr-reviewer.md +12 -0
  51. package/plugins/planr/agents/planr-worker.md +10 -0
  52. package/plugins/planr/skills/planr/SKILL.md +52 -0
  53. package/plugins/planr/skills/planr-goal/SKILL.md +69 -0
  54. package/plugins/planr/skills/planr-loop/SKILL.md +114 -0
  55. package/plugins/planr/skills/planr-loop/agents/planr-reviewer.toml +17 -0
  56. package/plugins/planr/skills/planr-loop/agents/planr-worker.toml +14 -0
  57. package/plugins/planr/skills/planr-plan/SKILL.md +58 -0
  58. package/plugins/planr/skills/planr-review/SKILL.md +51 -0
  59. package/plugins/planr/skills/planr-status/SKILL.md +50 -0
  60. package/plugins/planr/skills/planr-summary/SKILL.md +28 -0
  61. package/plugins/planr/skills/planr-task-graph/SKILL.md +228 -0
  62. package/plugins/planr/skills/planr-verify-web/SKILL.md +76 -0
  63. package/plugins/planr/skills/planr-work/SKILL.md +68 -0
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "planr",
3
+ "version": "1.1.16",
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
+ "author": {
6
+ "name": "instructa",
7
+ "url": "https://github.com/instructa"
8
+ },
9
+ "homepage": "https://github.com/instructa/planr",
10
+ "repository": "https://github.com/instructa/planr",
11
+ "license": "MIT",
12
+ "keywords": ["planning", "task-graph", "agent-loop", "skills"],
13
+ "skills": "./skills/",
14
+ "interface": {
15
+ "displayName": "Planr",
16
+ "shortDescription": "Plan, loop, verify, and close coding work with evidence",
17
+ "longDescription": "Planr turns one product idea into a live task graph and drives features to verified completion. $planr routes any request to the right stage skill from live map state; $planr-loop runs work, live verification, and independent review until the map is clean. Requires the planr CLI (brew install instructa/tap/planr).",
18
+ "developerName": "instructa",
19
+ "category": "Productivity",
20
+ "defaultPrompt": [
21
+ "Use $planr to plan a production-ready app from my idea.",
22
+ "Use $planr-loop to ship one feature with verification until done."
23
+ ]
24
+ }
25
+ }
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: planr-reviewer
3
+ description: Independent findings-first reviewer for one Planr item. Audits evidence and closes the review with a verdict. Dispatch with the item id.
4
+ skills:
5
+ - planr-review
6
+ ---
7
+
8
+ Use the preloaded planr-review skill exactly as written for the single item id you are given.
9
+ You did not write this code; audit it like an owner. Inspect the actual diff and rerun the
10
+ logged verification commands instead of trusting the worker's summary.
11
+ Close the review with `planr review close <review-id> --verdict ...`. Findings must be specific
12
+ and actionable. Do not edit implementation files; your only writes are planr review commands.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: planr-worker
3
+ description: Implements exactly one picked Planr map item to evidence-backed completion, then requests review and stops. Dispatch with the item id.
4
+ skills:
5
+ - planr-work
6
+ ---
7
+
8
+ Use the preloaded planr-work skill exactly as written for the single item id you are given.
9
+ Implement only that item. Log changed files and the real verification commands you ran.
10
+ Request review with `planr review request <item-id>` and stop. Never close reviews or items yourself.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: planr
3
+ description: Single entry point for all Planr work. Use for any product, feature, fix, status, review, or summary request when the user has not named a specific Planr skill. Routes to the right Planr skill from live map state so the user never has to remember skill names.
4
+ ---
5
+
6
+ # Planr Router
7
+
8
+ You are the dispatcher. Do not improvise workflow prompts; route to one Planr skill and follow it exactly. Skills are the prompts.
9
+
10
+ ## Read State First
11
+
12
+ Routing is decided by live state, not by guessing:
13
+
14
+ ```bash
15
+ planr project show --json
16
+ planr map show --json
17
+ planr review list --open
18
+ planr approval list --open
19
+ ```
20
+
21
+ If no project exists, initialize before anything else:
22
+
23
+ ```bash
24
+ planr project init "Project Name" --client all
25
+ ```
26
+
27
+ Initialization happens once per repository. If a project already exists, never re-init: new features, refactors, and fixes get their own feature-scoped plan (`planr plan new "Feature"`), and `planr map build --from <build-plan-id>` extends the existing map with new linked items.
28
+
29
+ ## Routing Table
30
+
31
+ Evaluate top to bottom; pick the first row that matches both intent and state:
32
+
33
+ | Intent | State condition | Route |
34
+ | --- | --- | --- |
35
+ | "set up a goal", "prepare a /goal run", broad long-running goal not yet planned | no plan or contract for that scope | `planr-goal` (prep only, prints the loop starter) |
36
+ | "build until done", "loop", "finish this feature autonomously" | any | `planr-loop` |
37
+ | status, "what's left", "what's blocked" | any | `planr-status` |
38
+ | summary of completed scope | any | `planr-summary` |
39
+ | new idea, PRD, scope, architecture | no plan, or plan needs refinement | `planr-plan` |
40
+ | new feature, refactor, or fix on an existing project | project exists, scope has no plan yet | `planr-plan` (feature-scoped plan, then extend the map) |
41
+ | plan exists but no map / map needs structure, dependencies, breakdown | build plan checked, map missing or stale | `planr-task-graph` |
42
+ | review requested or open review exists | open review on the map | `planr-review` |
43
+ | implement, fix, continue work | ready items exist on the map | `planr-work` |
44
+ | implement, but nothing is ready | all items blocked | `planr-status`, then report blockers to the user |
45
+
46
+ ## Rules
47
+
48
+ - Route to exactly one skill per dispatch. If the request spans stages (idea -> running feature), route to `planr-loop` and let the loop sequence the stages.
49
+ - Never skip a stage: no map items without a checked build plan, no closure without review, no review verdict without log evidence.
50
+ - When delegating to a subagent, prompt it with a skill reference plus item id (for example: `Use $planr-work on item <id>`), never with a hand-written workflow prompt.
51
+ - The maker never reviews its own work. Reviews run through `planr-review` in a separate agent or subagent whenever the host supports it.
52
+ - If intent is genuinely ambiguous and state allows multiple routes, ask the user one short question instead of guessing.
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: planr-goal
3
+ description: Prepare a long-running goal for autonomous execution on Planr. Use when the user states a broad goal, wants to start a /goal run, or asks to set up a goal. Compiles intent into a checked plan, a linked map, and a durable goal contract, then prints the starter command for the host's loop driver without implementing anything.
4
+ ---
5
+
6
+ # Planr Goal
7
+
8
+ Prep only. This skill compiles a goal into durable Planr state and stops. Execution belongs to the host's loop driver — Codex or Claude Code `/goal`, an automation, or repeated `$planr-loop` dispatches. This boundary is strict: goal prep is a board compiler, not a lightweight loop.
9
+
10
+ ## Boundary
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.
13
+
14
+ ## Intake
15
+
16
+ Classify the input before creating anything:
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
26
+
27
+ ```bash
28
+ planr project show --json # init only if no project exists
29
+ planr plan new "<goal>" --platform <p>
30
+ planr plan refine <plan-id> --note "constraint, assumption, or user-provided plan fact"
31
+ planr plan check <plan-id> # strict: empty required sections fail
32
+ planr map build --from <plan-id> # idempotent: safe to re-run
33
+ ```
34
+
35
+ `plan refine` appends notes; the plan body is yours to edit. When `plan check` fails, each warning names the exact file and section — edit that file directly, fill the section with real content, and re-run the check. Scaffold sections (`## Scope Decision`, `## Verification`, `## Acceptance Criteria`) are filled by editing the plan markdown, not by more `refine` notes.
36
+
37
+ `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:
38
+
39
+ ```bash
40
+ planr link add <earlier-item> <later-item> --type blocks
41
+ ```
42
+
43
+ ## Store The Goal Contract
44
+
45
+ The contract must survive compaction, session loss, and host switches, so it lives in Planr, not in chat:
46
+
47
+ ```bash
48
+ planr context add "GOAL CONTRACT <plan-id>: 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 verification log exists for <oracle>. Iteration budget: 10." --tag goal-contract
49
+ ```
50
+
51
+ One contract per plan scope. Any agent on any host can recover it with `planr context list` or `planr search "GOAL CONTRACT"`. Never weaken a stored contract mid-run; scope changes go through `$planr-plan` and the user. During the run, workers lease with `planr pick --plan <plan-id>` so the loop never picks items outside this contract, even when other plans share the board. The loop checks the contract with `planr plan audit <plan-id>`, which evaluates exactly these clauses with evidence and answers `holds: true/false`.
52
+
53
+ ## Hand Off
54
+
55
+ Print the starter command, then stop. Do not start execution yourself; ask whether to start now, refine the plan, or stop.
56
+
57
+ With a native loop driver (Codex `/goal`, Claude Code `/goal` or `/loop`):
58
+
59
+ ```text
60
+ /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.
61
+ ```
62
+
63
+ Without one (Cursor, plain MCP clients, Codex without /goal):
64
+
65
+ ```text
66
+ Use $planr-loop on plan <plan-id>. The loop contract is stored in planr context (tag: goal-contract).
67
+ ```
68
+
69
+ 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.
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: planr-loop
3
+ description: Drive one feature or scope to verified completion without per-step human prompting. Use when the user says build until done, loop on this, or finish autonomously. Sequences plan, map, work, live verification, and independent review until the map is clean and evidence proves the feature actually runs.
4
+ ---
5
+
6
+ # Planr Loop
7
+
8
+ A closing loop: the agent prompts itself with Planr skills until a verifiable stop condition holds. The human supplies the goal at the start and reviews at the end; the map is the loop memory between iterations.
9
+
10
+ This skill is the iteration protocol, not the driver. Whoever re-prompts the next iteration — a native loop primitive like Codex `/goal`, an automation, or a human re-dispatching `$planr-loop` — acts as the orchestrator and follows this protocol verbatim. The protocol is identical on every host; only the re-dispatch mechanism differs (see Loop Drivers).
11
+
12
+ ## Loop Contract
13
+
14
+ Before iterating, pin the contract:
15
+
16
+ 1. One goal: a single feature, fix scope, or build plan. Refuse multi-goal loops; split them first.
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.
19
+
20
+ Stop condition template:
21
+
22
+ ```text
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
+ ```
27
+
28
+ Store the contract in Planr so it survives compaction, session loss, and host switches — chat memory is not loop memory:
29
+
30
+ ```bash
31
+ planr context add "GOAL CONTRACT <plan-id>: DONE when ... Iteration budget: 10." --tag goal-contract
32
+ ```
33
+
34
+ `$planr-goal` does this during prep; if the loop starts without a stored contract, store it in iteration 1 before picking. Every iteration re-reads the contract from Planr (`planr context list` or `planr search "GOAL CONTRACT"`), never from chat history. `done`, `close`, and `review close` responses and the pick packet include a `remaining` progress snapshot (`counts` with explicit zeros for every status, `settled`, `total`) plus the list of items each settlement `unlocked`, so the orchestrator can evaluate the stop condition from the completion output without an extra `map status` call.
35
+
36
+ The stop condition itself is one command: `planr plan audit <plan-id> --json` evaluates the contract clause by clause (items settled, reviews complete, approvals clear, verification logged) with evidence and answers `holds: true/false`. Use it at the top of every iteration and as the final audit — never hand-assemble the verdict from separate calls.
37
+
38
+ ## Iteration Shape
39
+
40
+ Each iteration is one dispatch through the routing skill — never a hand-written prompt:
41
+
42
+ ```text
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
+ ```
50
+
51
+ The short path per item is three commands: `planr pick --json` (one flat work packet; makers add `--work-type code`), `planr done <item-id> --summary ... --cmd ... --review [--next]`, and the reviewer's `planr --json pick --work-type review` followed by `planr review close <review-id> --verdict complete --reviewer <id> --close-target` — run exactly once. Parent gates roll up automatically. When the loop runs against one plan (every `/goal` run does), add `--plan <plan-id>` to every pick so the lease never leaves the goal contract, even when other plans share the board. A null pick explains itself: when filters excluded ready work, `reason: "ready_items_excluded_by_filter"` names each excluded item, the cause (work_type or plan mismatch), and the exact `repair` pick command — run the repair instead of guessing.
52
+
53
+ `map build` chains created items in plan order with `blocks` links automatically and prints the created items and links. In step 2, verify that chain against real execution-order dependencies and adjust with `planr link add` only where document order and execution order differ. `item breakdown` works the same way: pass one `--into` per child title (or one value with newline-separated titles), and the output lists the chained children plus the next command.
54
+
55
+ Request reviews where they carry signal: implementation slices and anything user-facing finish with `done --review`. Trivial inspection, baseline, or setup items close with plain `done` (evidence still required) — a review that can only confirm "the repo was empty" adds ceremony, not safety.
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, delegate with skill references plus an item id, nothing more:
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
+ Host wiring:
67
+
68
+ - Codex: project agents in `.codex/agents/*.toml` preload the skill via `[[skills.config]]` (TOML templates in `agents/` next to this skill). Spawn explicitly: "spawn the planr_worker agent for item X". Keep `[agents] max_depth = 1`.
69
+ - 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.
70
+ - 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.
71
+
72
+ ## Live Verification By Platform
73
+
74
+ "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:
75
+
76
+ | Platform | Verification |
77
+ | --- | --- |
78
+ | `web` | dispatch `$planr-verify-web`: discovers the host's browser capability, runs the changed flow against the dev server, logs a replayable command |
79
+ | `ios` | build and launch in the simulator (`xcodebuild` + `xcrun simctl`), exercise the changed flow |
80
+ | `cli` | execute the built binary with the real flags the feature added; assert on output |
81
+ | `api`/`backend` | start the service, hit the changed endpoints with real requests, assert responses |
82
+
83
+ ```bash
84
+ planr log add --item <item-id> --kind verification \
85
+ --summary "live verification on <platform>: <observed outcome>" \
86
+ --cmd "<exact command actually run>"
87
+ ```
88
+
89
+ `--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.
90
+
91
+ 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:
92
+
93
+ ```bash
94
+ planr context add "live verification blocked: <missing capability>" --item <item-id> --tag blocker
95
+ planr approval request <item-id> --reason "manual live verification required"
96
+ ```
97
+
98
+ ## Loop Drivers
99
+
100
+ 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:
101
+
102
+ - 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.
103
+ - Claude Code: `/goal` with the same prompt shape, or `/loop` for a fixed cadence.
104
+ - Anywhere else (Cursor, 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.
105
+
106
+ 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.
107
+
108
+ ## Hard Rules
109
+
110
+ - One picked item per iteration. Parallel work needs separate worktrees and separate loop instances.
111
+ - Every iteration must move map state (a log, a review verdict, a closed item, or a recorded blocker). Two iterations without state movement -> stop and report.
112
+ - Never weaken the stop condition mid-loop. Scope changes go through `$planr-plan` and the user.
113
+ - Destructive or out-of-repo side effects (deploys, migrations, infra) always go behind `planr approval request`.
114
+ - On exit — success or budget exhausted — finish with `$planr-summary` so the human gets an evidence-backed account.
@@ -0,0 +1,17 @@
1
+ # Copy to .codex/agents/planr-reviewer.toml (project) or ~/.codex/agents/ (user).
2
+ # Adjust the skill path to where the Planr skills are installed.
3
+ name = "planr_reviewer"
4
+ description = "Independent findings-first reviewer for one Planr item. Audits evidence and closes the review with a verdict."
5
+ sandbox_mode = "workspace-write"
6
+
7
+ developer_instructions = """
8
+ Use the planr-review skill exactly as written for the single item id you are given.
9
+ You did not write this code; audit it like an owner. Inspect the actual diff and rerun the
10
+ logged verification commands instead of trusting the worker's summary.
11
+ Close the review with `planr review close <review-id> --verdict ...`. Findings must be specific
12
+ and actionable. Do not edit implementation files; your only writes are planr review commands.
13
+ """
14
+
15
+ [[skills.config]]
16
+ path = "~/.codex/skills/planr-review/SKILL.md"
17
+ enabled = true
@@ -0,0 +1,14 @@
1
+ # Copy to .codex/agents/planr-worker.toml (project) or ~/.codex/agents/ (user).
2
+ # Adjust the skill path to where the Planr skills are installed.
3
+ name = "planr_worker"
4
+ description = "Implements exactly one picked Planr map item to evidence-backed completion, then requests review and stops."
5
+
6
+ developer_instructions = """
7
+ Use the planr-work skill exactly as written for the single item id you are given.
8
+ Implement only that item. Log changed files and the real verification commands you ran.
9
+ Request review with `planr review request <item-id>` and stop. Never close reviews or items yourself.
10
+ """
11
+
12
+ [[skills.config]]
13
+ path = "~/.codex/skills/planr-work/SKILL.md"
14
+ enabled = true
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: planr-plan
3
+ description: Create or refine Planr product plans and build plans before implementation. Use for app ideas, PRDs, architecture slices, scoped implementation contracts, and converting broad work into map-ready items.
4
+ ---
5
+
6
+ # Planr Plan
7
+
8
+ Use this when scope, ownership, acceptance criteria, or verification must be defined before implementation.
9
+
10
+ ## Workflow
11
+
12
+ ```bash
13
+ planr project show --json
14
+ planr plan new "App idea" [--platform web] [--ai] [--backend]
15
+ planr plan refine <plan-id> --note "decision, constraint, or assumption"
16
+ planr plan check <plan-id>
17
+ planr plan split <plan-id> --slice "narrow implementation slice"
18
+ planr map build --from <build-plan-id>
19
+ ```
20
+
21
+ ## Product Plan Standard
22
+
23
+ A product plan package must include:
24
+
25
+ - manifest;
26
+ - product spec;
27
+ - UX flows;
28
+ - design system;
29
+ - architecture;
30
+ - ADRs;
31
+ - AI spec when relevant;
32
+ - safety/privacy/security;
33
+ - API/data model;
34
+ - client and backend implementation specs;
35
+ - observability;
36
+ - QA;
37
+ - release readiness;
38
+ - executable tasks;
39
+ - references.
40
+
41
+ ## Build Plan Standard
42
+
43
+ A build plan must include:
44
+
45
+ - source plan;
46
+ - scope decision;
47
+ - ownership target;
48
+ - existing leverage;
49
+ - phases;
50
+ - out of scope;
51
+ - verification;
52
+ - acceptance criteria.
53
+
54
+ ## Done
55
+
56
+ Planning is complete only when `planr plan check <plan-id>` passes and the next command is clear: split further, build map, or ask the user for a blocking decision.
57
+
58
+ `plan check` rejects empty scaffolds: build plans must have content in `## Scope Decision`, `## Verification`, and `## Acceptance Criteria`; product plans must have content in `## Problem`, `## Requirements`, and `## Success Criteria` of `PRODUCT_SPEC.md`. Write those sections before checking — do not pad them to satisfy the gate.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: planr-review
3
+ description: Review a Planr item or scoped implementation against map state, plan acceptance criteria, logs, changed files, and verification evidence. Use for findings-first audits and review gates.
4
+ ---
5
+
6
+ # Planr Review
7
+
8
+ Use this when a task needs a correctness and completion audit.
9
+
10
+ ## Workflow
11
+
12
+ Export your checker identity once per session so the lease attributes to you:
13
+
14
+ ```bash
15
+ export PLANR_WORKER_ID=checker-1
16
+ planr --json pick --work-type review
17
+ ```
18
+
19
+ `--work-type review` leases only review items, so a checker never accidentally takes maker work. Add `--plan <plan-id>` when your dispatch names a plan so the lease stays inside that scope. The pick packet inlines the target item and its evidence logs under `target` — one command is enough to see what is being audited, its status (`in_review` while waiting on you), files, and verification commands. If you already hold a review id, `planr --json trace item <review-id>` returns the same packet. Use `planr log list --item <target-id>` or `planr map show --json` only for deeper reads.
20
+
21
+ Inspect the actual changed files and re-run the logged verification evidence. Then close the review exactly once:
22
+
23
+ ```bash
24
+ planr review close <review-id> --verdict complete --reviewer <your-id> --close-target
25
+ ```
26
+
27
+ `--close-target` also closes the reviewed item when the verdict is complete and a completion log exists — the worker does not need a separate close round-trip. Omit it when the worker should close explicitly. `--reviewer` records your checker identity on the log, artifact, and event so maker and checker stay distinguishable in the audit trail. A second close of the same review fails with `already_closed` — never retry a close that succeeded.
28
+
29
+ or:
30
+
31
+ ```bash
32
+ planr review close <review-id> --verdict not-complete --reviewer <your-id> --findings "specific actionable finding"
33
+ ```
34
+
35
+ ## Findings Rules
36
+
37
+ - Findings must be specific and actionable.
38
+ - Missing tests are findings when acceptance criteria need proof.
39
+ - Architecture or ownership drift is a finding when it creates duplicate policy or state owners.
40
+ - If evidence is insufficient, use `--verdict unclear` rather than complete.
41
+
42
+ ## Single-Agent Mode
43
+
44
+ When no independent reviewer instance is available (single-agent host), do not pretend a second instance reviewed the work. Re-read the diff, logs, and evidence with fresh eyes, then close normally. The review mode is recorded automatically: `review close` compares your identity against the maker's lease and stamps `review_mode: single_agent | independent | unattributed` on the close response, review log, artifact, and event. No extra context note is needed — honesty is derived from recorded identity.
45
+
46
+ Identity honesty rule: one agent instance keeps one `PLANR_WORKER_ID` for its whole session. Never export a second identity (e.g. `maker-x` and `checker-x`) inside the same instance to make a review look independent — that stamps `independent` on a review that was not, which is worse than an honest `single_agent`. `independent` is only real when a separate agent process (a subagent, another terminal, another client) picks the review under its own identity.
47
+
48
+ ## Completion Rule
49
+
50
+ The target item may close only after required review items are closed. Use the map as the source of truth.
51
+ Pending or denied approval is also a close blocker; treat an attempted close through that gate as a finding, not as completion.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: planr-status
3
+ description: Report honest Planr project, map, item, or review state without implementing changes. Use when the user asks what is done, what remains, what is blocked, what is ready, or what should be picked next.
4
+ ---
5
+
6
+ # Planr Status
7
+
8
+ Use read-only Planr commands first:
9
+
10
+ ```bash
11
+ planr project show --json
12
+ planr map show --json
13
+ planr map lane --critical
14
+ planr map pressure
15
+ ```
16
+
17
+ For one item:
18
+
19
+ ```bash
20
+ planr trace item <item-id>
21
+ planr log list --item <item-id>
22
+ ```
23
+
24
+ For active work, include runtime and approval state from `trace item`, `map status`, or:
25
+
26
+ ```bash
27
+ planr approval list --open
28
+ planr pick stale --older-than-seconds 900
29
+ ```
30
+
31
+ ## Goal Contract Check
32
+
33
+ When a loop or `/goal` run asks whether its stop condition holds, use the one-call verdict:
34
+
35
+ ```bash
36
+ planr plan audit <plan-id> --json
37
+ ```
38
+
39
+ It reads the stored contract, evaluates every clause with evidence (items settled, reviews complete, approvals clear, verification logged), and answers `holds: true/false` with the open items listed per clause. Report `contract holds` or `contract open` plus the exact unmet clauses straight from the audit output. Use `planr search "GOAL CONTRACT"` only to read the contract text itself.
40
+
41
+ ## Verdicts
42
+
43
+ Use one:
44
+
45
+ - `complete`: closed with evidence and no open required child/review/approval work.
46
+ - `in progress`: concrete work remains and the next step is available.
47
+ - `blocked`: progress needs an external decision or prerequisite.
48
+ - `unclear / partially verified`: evidence is incomplete or inconsistent.
49
+
50
+ Never treat checked Markdown boxes or optimistic summaries as proof. Map state and log evidence decide.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: planr-summary
3
+ description: Summarize a Planr scope after work, review, or status inspection. Use when the user wants what changed, why, what works now, verification evidence, and what remains.
4
+ ---
5
+
6
+ # Planr Summary
7
+
8
+ Build the summary from current Planr evidence:
9
+
10
+ ```bash
11
+ planr map show --json
12
+ planr trace item <item-id>
13
+ planr log list --item <item-id>
14
+ ```
15
+
16
+ ## Output
17
+
18
+ Include:
19
+
20
+ - scope;
21
+ - what changed;
22
+ - why;
23
+ - what works now;
24
+ - verification commands and results;
25
+ - open blockers or unverified items;
26
+ - next recommended Planr command.
27
+
28
+ If completion is not proven, say so directly and recommend `planr-status`, `planr-work`, or `planr-review`.