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.
- package/LICENSE.md +21 -0
- package/README.md +150 -0
- package/docs/ARCHITECTURE.md +75 -0
- package/docs/CI.md +54 -0
- package/docs/CLAUDE_CODE.md +33 -0
- package/docs/CLI_REFERENCE.md +126 -0
- package/docs/CODEX.md +48 -0
- package/docs/CURSOR.md +30 -0
- package/docs/GOALS.md +155 -0
- package/docs/HANDOFFS_AND_STORIES.md +121 -0
- package/docs/IMPORT.md +21 -0
- package/docs/INSTALL.md +113 -0
- package/docs/MCP_CONTRACT.md +70 -0
- package/docs/MCP_GUIDE.md +40 -0
- package/docs/NPM.md +40 -0
- package/docs/OPERATING_MODEL.md +250 -0
- package/docs/RELEASE.md +140 -0
- package/docs/SECURITY.md +8 -0
- package/docs/SKILLS.md +278 -0
- package/docs/TASK_GRAPH_MODEL.md +222 -0
- package/docs/TESTING.md +87 -0
- package/docs/TROUBLESHOOTING.md +26 -0
- package/docs/fixtures/mcp-contract.json +92 -0
- package/docs/planr-spec/ADRS.md +160 -0
- package/docs/planr-spec/AI_SPEC.md +138 -0
- package/docs/planr-spec/ANALYTICS_OBSERVABILITY_SPEC.md +124 -0
- package/docs/planr-spec/API_AND_DATA_MODEL.md +517 -0
- package/docs/planr-spec/BACKEND_IMPLEMENTATION_SPEC.md +178 -0
- package/docs/planr-spec/CLIENT_IMPLEMENTATION_SPEC.md +119 -0
- package/docs/planr-spec/DESIGN_SYSTEM_SPEC.md +102 -0
- package/docs/planr-spec/PRODUCT_SPEC.md +193 -0
- package/docs/planr-spec/QA_ACCEPTANCE_TESTS.md +146 -0
- package/docs/planr-spec/README.md +67 -0
- package/docs/planr-spec/REFERENCES.md +29 -0
- package/docs/planr-spec/RELEASE_READINESS.md +95 -0
- package/docs/planr-spec/SAFETY_PRIVACY_SECURITY.md +169 -0
- package/docs/planr-spec/TASKS.md +932 -0
- package/docs/planr-spec/TECH_ARCHITECTURE.md +143 -0
- package/docs/planr-spec/UX_FLOWS.md +235 -0
- package/docs/planr-spec/V1_1_DIFFERENTIATION_CONTRACT.md +177 -0
- package/docs/planr-spec.zip +0 -0
- package/npm/bin/planr.js +54 -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 +27 -8
- package/plugins/planr/.claude-plugin/plugin.json +11 -0
- package/plugins/planr/.codex-plugin/plugin.json +25 -0
- package/plugins/planr/agents/planr-reviewer.md +12 -0
- package/plugins/planr/agents/planr-worker.md +10 -0
- package/plugins/planr/skills/planr/SKILL.md +52 -0
- package/plugins/planr/skills/planr-goal/SKILL.md +69 -0
- package/plugins/planr/skills/planr-loop/SKILL.md +114 -0
- package/plugins/planr/skills/planr-loop/agents/planr-reviewer.toml +17 -0
- package/plugins/planr/skills/planr-loop/agents/planr-worker.toml +14 -0
- package/plugins/planr/skills/planr-plan/SKILL.md +58 -0
- package/plugins/planr/skills/planr-review/SKILL.md +51 -0
- package/plugins/planr/skills/planr-status/SKILL.md +50 -0
- package/plugins/planr/skills/planr-summary/SKILL.md +28 -0
- package/plugins/planr/skills/planr-task-graph/SKILL.md +228 -0
- package/plugins/planr/skills/planr-verify-web/SKILL.md +76 -0
- package/plugins/planr/skills/planr-work/SKILL.md +68 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Technical Architecture
|
|
2
|
+
|
|
3
|
+
## Architecture Goals
|
|
4
|
+
|
|
5
|
+
- REQ-ARCH-001: Keep item state, picks, worker runtime state, approval gates, links, log, reviews, and events in one local SQLite source of truth.
|
|
6
|
+
- REQ-ARCH-002: Keep rich product and build plan context in repo-local Markdown files that remain useful without Planr installed.
|
|
7
|
+
- REQ-ARCH-003: Support CLI, MCP, and optional HTTP/SSE as lenses over the same core engine.
|
|
8
|
+
- REQ-ARCH-004: Make Codex, Claude Code, Cursor, and generic MCP clients first-class integration targets.
|
|
9
|
+
- REQ-ARCH-005: Avoid provider-specific logic in the core graph engine.
|
|
10
|
+
|
|
11
|
+
## System Context Diagram
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
Developer
|
|
15
|
+
-> planr CLI
|
|
16
|
+
-> Core engine
|
|
17
|
+
-> SQLite graph database
|
|
18
|
+
-> .planr Markdown project
|
|
19
|
+
-> Git repository
|
|
20
|
+
|
|
21
|
+
Agent clients
|
|
22
|
+
-> MCP stdio / MCP HTTP
|
|
23
|
+
-> Core engine
|
|
24
|
+
-> SQLite graph database
|
|
25
|
+
-> .planr Markdown project
|
|
26
|
+
|
|
27
|
+
Optional dashboard
|
|
28
|
+
-> Local HTTP/SSE server
|
|
29
|
+
-> Core engine
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Component Boundaries
|
|
33
|
+
|
|
34
|
+
- `core`: map graph operations, state machine, item readiness, worker runtime state, approval gates, log, reviews, contexts, search.
|
|
35
|
+
- `storage`: SQLite schema, schema upgrades, transactions, FTS indexes.
|
|
36
|
+
- `planpack`: `.planr` project pack, plan parsing, Markdown frontmatter, review artifacts.
|
|
37
|
+
- `cli`: user commands and deterministic output.
|
|
38
|
+
- `mcp`: tools, resources, prompts, capability negotiation.
|
|
39
|
+
- `server`: optional local REST/SSE API.
|
|
40
|
+
- `agents`: integration helpers for Codex, Claude Code, Cursor, and generic clients.
|
|
41
|
+
- `git`: worktree, branch, diff, and changed-file log.
|
|
42
|
+
- `recovery`: stale-pick detection, timeout handling, retry policy, and manual condition reporting.
|
|
43
|
+
- `review_workspace`: local browser review HTML and workspace JSON projection.
|
|
44
|
+
- `packages`: reusable JSON export/import packages with plan snapshots, logs, contexts, and review artifacts.
|
|
45
|
+
|
|
46
|
+
## Client Architecture
|
|
47
|
+
|
|
48
|
+
- CLI is the primary client and must be scriptable.
|
|
49
|
+
- TUI/dashboard are optional clients over the same API.
|
|
50
|
+
- MCP clients must receive concise, structured responses optimized for LLM context.
|
|
51
|
+
- All client layers must call core services, not mutate database or Markdown directly.
|
|
52
|
+
|
|
53
|
+
## Backend Architecture
|
|
54
|
+
|
|
55
|
+
V1 is a local backend packaged into the CLI binary:
|
|
56
|
+
|
|
57
|
+
- SQLite database at `.planr/planr.sqlite` by default.
|
|
58
|
+
- WAL mode enabled for concurrent readers and serialized writers.
|
|
59
|
+
- Local service optional for dashboards and long-running agent orchestration.
|
|
60
|
+
- Local review workspace is served from the same localhost HTTP boundary as the REST/SSE API.
|
|
61
|
+
- No cloud backend in V1.
|
|
62
|
+
|
|
63
|
+
## Data Architecture
|
|
64
|
+
|
|
65
|
+
- Map state, worker heartbeats, progress, stale ownership data, and approval gates: SQLite.
|
|
66
|
+
- Rich product plans, build plans, and project context: `.planr/*.md`.
|
|
67
|
+
- Live status summaries: SQLite.
|
|
68
|
+
- Search: SQLite FTS over items, contexts, plan metadata/frontmatter/headings, logs, and review summaries.
|
|
69
|
+
- Large artifacts: paths and metadata by default; inline content only for small explicitly provided artifacts.
|
|
70
|
+
|
|
71
|
+
## AI Architecture
|
|
72
|
+
|
|
73
|
+
Planr does not call model providers by default. It guides external agents through:
|
|
74
|
+
|
|
75
|
+
- MCP tools for map, plan, log, and review operations.
|
|
76
|
+
- MCP prompts for `plan`, `work`, `review`, `map`, and `summary` workflows.
|
|
77
|
+
- Client-specific install snippets for Codex, Claude Code, and Cursor.
|
|
78
|
+
- Optional runner wrappers for local Codex/Claude/Cursor CLIs when explicitly configured.
|
|
79
|
+
|
|
80
|
+
## Auth And Identity
|
|
81
|
+
|
|
82
|
+
- V1 local mode uses OS user access and file permissions.
|
|
83
|
+
- Worker identity is an explicit `worker_id` string, not an auth boundary.
|
|
84
|
+
- HTTP server binds to localhost by default.
|
|
85
|
+
- Remote HTTP mode is post-V1 and must require authentication.
|
|
86
|
+
|
|
87
|
+
## Integrations
|
|
88
|
+
|
|
89
|
+
- Codex: CLI instructions, MCP registration, optional `codex exec` runner, optional `codex review` integration.
|
|
90
|
+
- Claude Code: `.mcp.json` or CLI-based MCP registration guidance.
|
|
91
|
+
- Cursor: `.cursor/mcp.json` project config and global config guidance.
|
|
92
|
+
- Generic MCP: stdio first; streamable HTTP optional.
|
|
93
|
+
- Git: worktree isolation and scoped diff log.
|
|
94
|
+
|
|
95
|
+
## Security Architecture
|
|
96
|
+
|
|
97
|
+
- No shell hooks by default.
|
|
98
|
+
- Any command runner must show command, cwd, environment policy, and worker id.
|
|
99
|
+
- Secrets must not be stored in database, plans, logs, or analytics.
|
|
100
|
+
- MCP tools that mutate state must be separated from read-only resources/prompts.
|
|
101
|
+
- Destructive graph operations require preview or explicit flags.
|
|
102
|
+
|
|
103
|
+
## Privacy Architecture
|
|
104
|
+
|
|
105
|
+
- Local-only by default.
|
|
106
|
+
- No provider telemetry by default.
|
|
107
|
+
- No content logging by default.
|
|
108
|
+
- Export and delete commands must remove Planr database state and `.planr` artifacts when requested.
|
|
109
|
+
|
|
110
|
+
## Observability
|
|
111
|
+
|
|
112
|
+
- Local structured event log in SQLite.
|
|
113
|
+
- Optional JSONL debug log with content scrubbing.
|
|
114
|
+
- `planr doctor` for installation, database, MCP, and client integration checks.
|
|
115
|
+
- `planr trace item <id>` for item lifecycle debugging.
|
|
116
|
+
|
|
117
|
+
## Deployment Environments
|
|
118
|
+
|
|
119
|
+
- Local development: source checkout and debug binary.
|
|
120
|
+
- Local production: installed binary via package manager or release asset.
|
|
121
|
+
- CI: headless CLI mode with explicit db/path.
|
|
122
|
+
- Hosted/team: out of scope for V1.
|
|
123
|
+
|
|
124
|
+
## Failure Modes
|
|
125
|
+
|
|
126
|
+
- Database locked: retry bounded writes, then return actionable diagnostic.
|
|
127
|
+
- Corrupt Markdown plan: preserve file, mark parse status degraded, keep map usable.
|
|
128
|
+
- Missing MCP client support: print manual CLI instructions.
|
|
129
|
+
- Agent run interrupted: keep item picked/running with heartbeat timeout and release/re-pick command.
|
|
130
|
+
- Recovery sweep interrupted: preview is non-mutating; apply mutates only listed recoverable work and records events.
|
|
131
|
+
- Review fails: create fix item chain instead of closing the parent.
|
|
132
|
+
- Package import cancelled: preview leaves database and `.planr` files unchanged.
|
|
133
|
+
|
|
134
|
+
## Scalability Assumptions
|
|
135
|
+
|
|
136
|
+
- V1 target: hundreds of projects, tens of thousands of items, thousands of plan files per machine.
|
|
137
|
+
- SQLite and FTS are sufficient for V1.
|
|
138
|
+
- Remote multi-user concurrency is post-V1.
|
|
139
|
+
|
|
140
|
+
## Open Technical Decisions
|
|
141
|
+
|
|
142
|
+
- OD-ARCH-001: Whether to implement worktree management in core V1 or as an extension.
|
|
143
|
+
- OD-ARCH-002: Whether dashboard uses server-rendered HTML, TUI, or a small SPA.
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# UX Flows
|
|
2
|
+
|
|
3
|
+
## Navigation Model
|
|
4
|
+
|
|
5
|
+
Planr V1 is CLI-first with optional TUI/dashboard. Public commands use Planr-native vocabulary:
|
|
6
|
+
|
|
7
|
+
- `planr project`: setup and integration.
|
|
8
|
+
- `planr plan`: reviewable Markdown plans for product specs, build contracts, and review packages.
|
|
9
|
+
- `planr map`: live graph inspection and mutation.
|
|
10
|
+
- `planr item`: item creation and detail.
|
|
11
|
+
- `planr pick`: atomically pick the next ready item.
|
|
12
|
+
- `planr log`: record files, commands, tests, and handoff proof.
|
|
13
|
+
- `planr review`: review/fix/approval loop.
|
|
14
|
+
- `planr close`: close an item with log.
|
|
15
|
+
- `planr doctor`: diagnostics.
|
|
16
|
+
|
|
17
|
+
## Screen Map
|
|
18
|
+
|
|
19
|
+
### CLI
|
|
20
|
+
|
|
21
|
+
- Project status.
|
|
22
|
+
- Item detail.
|
|
23
|
+
- Ready queue.
|
|
24
|
+
- Critical lane.
|
|
25
|
+
- Plan list/detail.
|
|
26
|
+
- Map summary.
|
|
27
|
+
- Log detail.
|
|
28
|
+
- Doctor report.
|
|
29
|
+
|
|
30
|
+
### Optional TUI/Dashboard
|
|
31
|
+
|
|
32
|
+
- Project overview.
|
|
33
|
+
- Graph view.
|
|
34
|
+
- Ready/running/blocked map lanes.
|
|
35
|
+
- Plan viewer.
|
|
36
|
+
- Item detail.
|
|
37
|
+
- Log/review panel.
|
|
38
|
+
- Agent runs panel.
|
|
39
|
+
- Diagnostics panel.
|
|
40
|
+
|
|
41
|
+
## State Machine
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
NO_PROJECT -> INITIALIZED
|
|
45
|
+
Trigger: planr project init
|
|
46
|
+
Guard: repo path writable
|
|
47
|
+
Side effects: create database and .planr pack
|
|
48
|
+
Failure behavior: report blocked path and no partial overwrite
|
|
49
|
+
|
|
50
|
+
INITIALIZED -> PRODUCT_PLANNED
|
|
51
|
+
Trigger: planr plan new
|
|
52
|
+
Guard: project exists
|
|
53
|
+
Side effects: create product plan package
|
|
54
|
+
Failure behavior: show validation errors
|
|
55
|
+
|
|
56
|
+
PRODUCT_PLANNED -> BUILD_PLANNED
|
|
57
|
+
Trigger: planr plan split
|
|
58
|
+
Guard: product plan has selectable slice
|
|
59
|
+
Side effects: create focused build plan
|
|
60
|
+
Failure behavior: show missing decisions
|
|
61
|
+
|
|
62
|
+
BUILD_PLANNED -> MAPPED
|
|
63
|
+
Trigger: planr map build --from <plan>
|
|
64
|
+
Guard: plan acceptance criteria are parseable
|
|
65
|
+
Side effects: create linked map items
|
|
66
|
+
Failure behavior: show unmapped requirements
|
|
67
|
+
|
|
68
|
+
MAPPED -> ITEM_PICKED
|
|
69
|
+
Trigger: planr pick
|
|
70
|
+
Guard: at least one ready item
|
|
71
|
+
Side effects: atomic pick, start run context
|
|
72
|
+
Failure behavior: show blockers or no-ready status
|
|
73
|
+
|
|
74
|
+
ITEM_PICKED -> EVIDENCE_RECORDED
|
|
75
|
+
Trigger: planr log add
|
|
76
|
+
Guard: log fields valid
|
|
77
|
+
Side effects: write log and attach to item/run
|
|
78
|
+
Failure behavior: keep item running/blocked with diagnostic
|
|
79
|
+
|
|
80
|
+
EVIDENCE_RECORDED -> ITEM_CLOSED
|
|
81
|
+
Trigger: planr close
|
|
82
|
+
Guard: required log and reviews are satisfied
|
|
83
|
+
Side effects: close item, promote downstream items
|
|
84
|
+
Failure behavior: keep item running/blocked with diagnostic
|
|
85
|
+
|
|
86
|
+
ITEM_CLOSED -> REVIEW_READY
|
|
87
|
+
Trigger: review policy requires review
|
|
88
|
+
Guard: code item completed
|
|
89
|
+
Side effects: create or unlock review item
|
|
90
|
+
Failure behavior: parent stays incomplete
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Onboarding Flow
|
|
94
|
+
|
|
95
|
+
1. User runs `planr project init`.
|
|
96
|
+
2. Planr detects repo, Git state, old `.planr` artifacts, and available agent clients.
|
|
97
|
+
3. Planr creates project pack and database.
|
|
98
|
+
4. Planr offers integration commands:
|
|
99
|
+
- Codex MCP/config.
|
|
100
|
+
- Claude Code MCP config.
|
|
101
|
+
- Cursor `.cursor/mcp.json`.
|
|
102
|
+
5. User runs `planr doctor --client all`.
|
|
103
|
+
|
|
104
|
+
Acceptance criteria:
|
|
105
|
+
|
|
106
|
+
- REQ-UX-001: Init output must clearly distinguish created files, detected files, and skipped files.
|
|
107
|
+
- REQ-UX-002: Doctor output must show each agent integration as pass, fail, warning, or not installed.
|
|
108
|
+
|
|
109
|
+
## Product Plan Flow
|
|
110
|
+
|
|
111
|
+
1. User runs `planr plan new "App idea"`.
|
|
112
|
+
2. Planr captures product intent, platform, users, data sensitivity, AI, monetization, integrations, and launch constraints.
|
|
113
|
+
3. Planr creates a Markdown plan package: product spec, UX, architecture, ADRs, safety/privacy/security, API/data model, implementation specs, QA, release, and task checklist.
|
|
114
|
+
4. Planr marks assumptions and open decisions explicitly.
|
|
115
|
+
5. User runs `planr plan check`.
|
|
116
|
+
|
|
117
|
+
Acceptance criteria:
|
|
118
|
+
|
|
119
|
+
- REQ-UX-010: A created plan must include product, UX, architecture, safety/privacy/security, data/API, QA, release, and task files unless explicitly scoped down.
|
|
120
|
+
- REQ-UX-011: Plan checks must report missing required sections, open decisions, and validation warnings.
|
|
121
|
+
|
|
122
|
+
## Implementation Plan Flow
|
|
123
|
+
|
|
124
|
+
1. User or agent runs `planr plan split <plan> --slice "MVP backend"`.
|
|
125
|
+
2. Planr creates a focused Markdown plan with source, scope decision, ownership target, phases, verification, and acceptance criteria.
|
|
126
|
+
3. Planr links the build plan to source product plan requirement IDs.
|
|
127
|
+
4. User runs `planr plan check`.
|
|
128
|
+
|
|
129
|
+
Acceptance criteria:
|
|
130
|
+
|
|
131
|
+
- REQ-UX-012: A build plan must be narrow enough to seed executable map items.
|
|
132
|
+
- REQ-UX-013: Plan linking must show source plan id, requirement ids, derived plan path, and relationship.
|
|
133
|
+
|
|
134
|
+
## Map Seeding Flow
|
|
135
|
+
|
|
136
|
+
1. User runs `planr map build --from <plan>`.
|
|
137
|
+
2. Planr creates candidate map items and links.
|
|
138
|
+
3. User accepts, edits, or rejects candidates.
|
|
139
|
+
4. Accepted items enter the map as pending/ready.
|
|
140
|
+
|
|
141
|
+
Acceptance criteria:
|
|
142
|
+
|
|
143
|
+
- REQ-UX-014: Plan work lists must not silently become live map work without acceptance.
|
|
144
|
+
- REQ-UX-015: Seeded items must retain links to their source product or build plan requirements.
|
|
145
|
+
|
|
146
|
+
## Agent Execution Flow
|
|
147
|
+
|
|
148
|
+
1. Agent calls `planr_pick_item` or `planr pick`.
|
|
149
|
+
2. Planr returns item, linked plan context, upstream handoff, relevant contexts, and conflicts.
|
|
150
|
+
3. Agent works in repo.
|
|
151
|
+
4. Agent records log.
|
|
152
|
+
5. Agent closes the item when log and reviews allow it.
|
|
153
|
+
6. Planr promotes downstream items.
|
|
154
|
+
7. If review is required, a review item becomes ready.
|
|
155
|
+
|
|
156
|
+
Acceptance criteria:
|
|
157
|
+
|
|
158
|
+
- REQ-UX-020: The pick response must fit in an LLM context window by default and include links for deeper reads.
|
|
159
|
+
- REQ-UX-021: Closure must show unlocked items and remaining blockers.
|
|
160
|
+
- REQ-UX-022: Agents must treat parent gate items as completion gates and work executable child items when a child implementation or test item exists.
|
|
161
|
+
|
|
162
|
+
## Parent Gate Flow
|
|
163
|
+
|
|
164
|
+
1. User or agent creates a parent item for the material change.
|
|
165
|
+
2. User or agent breaks the parent into implementation or test child work with `planr item breakdown`.
|
|
166
|
+
3. User or agent requests review on the implementation or test child after evidence exists.
|
|
167
|
+
4. Downstream top-level work depends on the parent gate when review cleanliness matters.
|
|
168
|
+
5. Parent closes only after child work closes and review findings have either passed or been converted into fix/follow-up review work.
|
|
169
|
+
|
|
170
|
+
Acceptance criteria:
|
|
171
|
+
|
|
172
|
+
- REQ-UX-025: Parent item detail must make clear whether open children or reviews block closure.
|
|
173
|
+
- REQ-UX-026: Recovery views must show the child implementation, review, logs, and blockers needed to continue safely.
|
|
174
|
+
|
|
175
|
+
## Review/Fix Flow
|
|
176
|
+
|
|
177
|
+
1. Review item is picked.
|
|
178
|
+
2. Reviewer inspects linked plan, log, and scoped Git diff.
|
|
179
|
+
3. Reviewer returns verdict:
|
|
180
|
+
- complete;
|
|
181
|
+
- not complete with findings;
|
|
182
|
+
- unclear/partially verified.
|
|
183
|
+
4. Findings create fix item and follow-up review item.
|
|
184
|
+
5. Parent closes only when review chain passes.
|
|
185
|
+
|
|
186
|
+
Acceptance criteria:
|
|
187
|
+
|
|
188
|
+
- REQ-UX-030: Review findings must be visible in item detail and log detail.
|
|
189
|
+
- REQ-UX-031: Parent completion must explain which review item blocks it.
|
|
190
|
+
|
|
191
|
+
## Handoff And Story Flow
|
|
192
|
+
|
|
193
|
+
1. Agent records proof with `planr log add`.
|
|
194
|
+
2. Agent records reusable discoveries with `planr context add`.
|
|
195
|
+
3. Agent records task-local coordination with `planr note add`.
|
|
196
|
+
4. If the decision chain is too long for logs and contexts, the operator creates or updates a story log.
|
|
197
|
+
|
|
198
|
+
Acceptance criteria:
|
|
199
|
+
|
|
200
|
+
- REQ-UX-035: Logs must remain the proof surface for closure.
|
|
201
|
+
- REQ-UX-036: Context entries must be searchable and safe to expose to future agents.
|
|
202
|
+
- REQ-UX-037: Story logs must be documented as narrative memory and must not override map state.
|
|
203
|
+
|
|
204
|
+
## Error, Empty, Offline, Loading States
|
|
205
|
+
|
|
206
|
+
- No project: show `planr project init`.
|
|
207
|
+
- No ready item: show blockers and critical lane.
|
|
208
|
+
- Database locked: show retry and owning process if known.
|
|
209
|
+
- Plan parse error: show file path, line if available, and keep graph usable.
|
|
210
|
+
- MCP client missing: show manual config.
|
|
211
|
+
- Agent command failed: record failed run and keep task recoverable.
|
|
212
|
+
|
|
213
|
+
## Settings, Export, Delete, Account Flows
|
|
214
|
+
|
|
215
|
+
- No account settings in V1.
|
|
216
|
+
- Settings live in `.planr/config.toml` or user config.
|
|
217
|
+
- Export includes database dump, plan files, reviews, and references.
|
|
218
|
+
- Delete requires explicit project id or path and confirmation.
|
|
219
|
+
|
|
220
|
+
## Accessibility Behavior
|
|
221
|
+
|
|
222
|
+
- CLI output must support `--json` and no-color mode.
|
|
223
|
+
- TUI/dashboard must support keyboard navigation, visible focus, screen-reader labels, and reduced motion.
|
|
224
|
+
|
|
225
|
+
## Localization Behavior
|
|
226
|
+
|
|
227
|
+
- V1 command output is English.
|
|
228
|
+
- User-authored plan content may be any language.
|
|
229
|
+
- Error codes are stable and machine-readable.
|
|
230
|
+
|
|
231
|
+
## Acceptance Criteria
|
|
232
|
+
|
|
233
|
+
- REQ-UX-900: Every primary flow must be executable without a web UI.
|
|
234
|
+
- REQ-UX-901: Every mutation must have a JSON mode for automation.
|
|
235
|
+
- REQ-UX-902: Every blocked state must show the next actionable command or reason.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# V1.1 Differentiation Contract
|
|
2
|
+
|
|
3
|
+
Generated: 2026-06-09
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This contract defines the Planr-owned V1.1 acceptance baseline. It turns the remaining product gaps into implementation-ready requirements without relying on external product names, copied command vocabulary, or hidden context.
|
|
8
|
+
|
|
9
|
+
V1.1 is complete only when Planr can prove these capabilities from its own CLI, MCP, HTTP, local review workspace, docs, tests, and real consumer usage.
|
|
10
|
+
|
|
11
|
+
## Product Outcome
|
|
12
|
+
|
|
13
|
+
Planr V1.1 must feel like one coherent product:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
idea -> product plan -> build plan -> map -> pick -> work -> log -> review -> recover -> close
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The map remains the source of truth for execution state. Markdown plans remain the source of rich product and implementation context. Review and recovery must be evidence-backed, not optimistic.
|
|
20
|
+
|
|
21
|
+
## Capability Requirements
|
|
22
|
+
|
|
23
|
+
### Graph Intelligence
|
|
24
|
+
|
|
25
|
+
- REQ-V11-GRAPH-001: `planr map lane --critical` must compute a real critical path across blocking graph edges, not just sort open items by priority.
|
|
26
|
+
- REQ-V11-GRAPH-002: `planr map pressure` must report transitive downstream impact, direct blockers, and why each item matters.
|
|
27
|
+
- REQ-V11-GRAPH-003: Map reads must detect and report cycles with enough edge detail for a user or agent to repair the graph.
|
|
28
|
+
- REQ-V11-GRAPH-004: Unlock and lookahead views must explain what becomes ready after closure, what remains blocked, and which blockers are still active.
|
|
29
|
+
- REQ-V11-GRAPH-005: Mutation previews must share one effect engine for close, cancel, insert, replan, and dependency rewires.
|
|
30
|
+
- REQ-V11-GRAPH-006: CLI, MCP, HTTP, and JSON responses must use the same graph-analysis results.
|
|
31
|
+
|
|
32
|
+
Acceptance:
|
|
33
|
+
|
|
34
|
+
- A branched fixture with deep dependencies returns the mathematically longest open blocking path.
|
|
35
|
+
- A transitive bottleneck ranks above a shallow item that only blocks one direct child.
|
|
36
|
+
- A cyclic graph is refused or diagnosed before readiness or critical-path output becomes misleading.
|
|
37
|
+
|
|
38
|
+
### Automatic Pick Recall
|
|
39
|
+
|
|
40
|
+
- REQ-V11-RECALL-001: `planr pick` and `planr_pick_item` must return a compact task-start package.
|
|
41
|
+
- REQ-V11-RECALL-002: The package must include ranked relevant project contexts, upstream logs or handoffs, linked plan references, active blockers or unlocks, review/fix history, and deeper-read commands.
|
|
42
|
+
- REQ-V11-RECALL-003: Recall ranking must search item title, description, linked plan metadata, contexts, logs, and review summaries.
|
|
43
|
+
- REQ-V11-RECALL-004: Pick recall must be size-bounded and avoid source file content, prompt transcripts, secret-looking values, and large artifacts by default.
|
|
44
|
+
- REQ-V11-RECALL-005: Possible file conflicts must be surfaced from recent logs, artifacts, and active picked/running work when enough path evidence exists.
|
|
45
|
+
|
|
46
|
+
Acceptance:
|
|
47
|
+
|
|
48
|
+
- A task with relevant historical decisions receives those decisions without the user running a separate search.
|
|
49
|
+
- Irrelevant contexts are omitted or ranked below relevant ones.
|
|
50
|
+
- The response remains compact enough for an agent handoff and includes deeper-read commands for full detail.
|
|
51
|
+
|
|
52
|
+
### Recovery Automation
|
|
53
|
+
|
|
54
|
+
- REQ-V11-RECOVERY-001: Planr must provide a sweeper command and API that inspect interrupted work without silently mutating by default.
|
|
55
|
+
- REQ-V11-RECOVERY-002: Timeouts must be stored on items and evaluated consistently for CLI, MCP, and HTTP flows.
|
|
56
|
+
- REQ-V11-RECOVERY-003: Retry policy must support max attempts, retry count, fixed or exponential delay, and clear terminal state when retries are exhausted.
|
|
57
|
+
- REQ-V11-RECOVERY-004: Stale picks must be reclaimable only through explicit recovery action or a documented sweeper mode.
|
|
58
|
+
- REQ-V11-RECOVERY-005: Item preconditions and postconditions must be visible in pick, trace, review, and close-preview outputs.
|
|
59
|
+
- REQ-V11-RECOVERY-006: Close preview must show unsatisfied conditions, missing evidence, open reviews, open child work, and approval blockers in one gate report.
|
|
60
|
+
|
|
61
|
+
Acceptance:
|
|
62
|
+
|
|
63
|
+
- An interrupted picked item is diagnosed, optionally released, and then picked by a later worker without duplicate ownership.
|
|
64
|
+
- A failed retryable item returns to ready only after the documented delay.
|
|
65
|
+
- A postcondition appears in review and close-preview output before the item closes.
|
|
66
|
+
|
|
67
|
+
### Local Browser Review Workspace
|
|
68
|
+
|
|
69
|
+
- REQ-V11-REVIEW-UI-001: Planr must ship a local browser workspace reachable from the local HTTP server or an explicit CLI command.
|
|
70
|
+
- REQ-V11-REVIEW-UI-002: The workspace must support plan/package review, plan revision diff, item review detail, inline annotations, and approve/request-changes feedback.
|
|
71
|
+
- REQ-V11-REVIEW-UI-003: When Git evidence is available, the workspace must show scoped file changes or a clear explanation of missing diff context.
|
|
72
|
+
- REQ-V11-REVIEW-UI-004: Feedback must write Planr review annotations, review artifacts, and map-native fix/follow-up review items through existing review rules.
|
|
73
|
+
- REQ-V11-REVIEW-UI-005: The workspace must remain local-first and must not require a hosted account or network service.
|
|
74
|
+
|
|
75
|
+
Acceptance:
|
|
76
|
+
|
|
77
|
+
- A reviewer can open a local URL, annotate a plan or item, request changes, and see the map create follow-up work.
|
|
78
|
+
- A clean review can write an artifact and close the review item through Planr state.
|
|
79
|
+
- Browser smoke tests prove the workspace renders and can exercise the annotation flow.
|
|
80
|
+
|
|
81
|
+
### Scoped Git And PR Review
|
|
82
|
+
|
|
83
|
+
- REQ-V11-GIT-001: Planr must detect the current Git worktree and record branch, commit, dirty state, and changed-file scope in review evidence.
|
|
84
|
+
- REQ-V11-GIT-002: Review flows must distinguish agent-owned evidence from unrelated dirty files.
|
|
85
|
+
- REQ-V11-GIT-003: Item logs and artifacts must be able to reference changed files and line-level findings without storing full source contents by default.
|
|
86
|
+
- REQ-V11-GIT-004: Optional PR URL review may be implemented when a provider can be queried safely; otherwise V1.1 must clearly document local-only behavior and future PR support.
|
|
87
|
+
- REQ-V11-GIT-005: Review output must tie findings to item id, file path, optional line, evidence source, and next action.
|
|
88
|
+
|
|
89
|
+
Acceptance:
|
|
90
|
+
|
|
91
|
+
- A dirty worktree with unrelated files does not let an agent claim broad ownership.
|
|
92
|
+
- Review artifacts show which files were considered and which were excluded.
|
|
93
|
+
- File and line annotations survive export/import.
|
|
94
|
+
|
|
95
|
+
### Distribution And Client Setup
|
|
96
|
+
|
|
97
|
+
- REQ-V11-DIST-001: README and install docs must make GitHub Release curl installation the normal user path.
|
|
98
|
+
- REQ-V11-DIST-002: Homebrew instructions must be present as soon as a tap or formula path exists; until then docs must state the release condition clearly.
|
|
99
|
+
- REQ-V11-DIST-003: Cargo and source build instructions must be maintainer/developer paths, not the primary user install story.
|
|
100
|
+
- REQ-V11-DIST-004: `planr install` or equivalent setup commands must cover Codex, Claude Code, Cursor, and generic MCP without editing global configuration unexpectedly.
|
|
101
|
+
- REQ-V11-DIST-005: `planr prompt` or an equivalent command must expose ready-to-use CLI, MCP, and HTTP instructions.
|
|
102
|
+
- REQ-V11-DIST-006: Release artifacts must have checksums and documented verification steps.
|
|
103
|
+
|
|
104
|
+
Acceptance:
|
|
105
|
+
|
|
106
|
+
- A fresh machine can install from release assets using only documented commands.
|
|
107
|
+
- A project can configure each supported client from Planr docs or CLI output.
|
|
108
|
+
- Package dry-runs show only intentional files.
|
|
109
|
+
|
|
110
|
+
### Templates And Review Packages
|
|
111
|
+
|
|
112
|
+
- REQ-V11-TEMPLATE-001: Export/import must support map items, links, plans, contexts, logs, review artifacts, and metadata.
|
|
113
|
+
- REQ-V11-TEMPLATE-002: Templates must include package requirements metadata, Planr version, creation timestamp, source project name, and optional tags.
|
|
114
|
+
- REQ-V11-TEMPLATE-003: Import must preview what will be created or skipped before mutating existing projects.
|
|
115
|
+
- REQ-V11-TEMPLATE-004: Review packages must preserve annotations, findings, artifacts, and file references.
|
|
116
|
+
- REQ-V11-TEMPLATE-005: Encrypted local bundle sharing may be implemented without hosted infrastructure; if not implemented in V1.1, docs must capture the accepted local-first format and explicit future scope.
|
|
117
|
+
|
|
118
|
+
Acceptance:
|
|
119
|
+
|
|
120
|
+
- A proven decomposition can be exported, imported into a fresh project, and picked without losing dependencies.
|
|
121
|
+
- Review annotations survive package export/import.
|
|
122
|
+
- Imports are idempotent or explain conflicts before mutation.
|
|
123
|
+
|
|
124
|
+
### Documentation And Public Copy
|
|
125
|
+
|
|
126
|
+
- REQ-V11-DOCS-001: README, CLI reference, MCP contract, operating model, task graph model, install docs, testing docs, and spec files must match implemented V1.1 behavior.
|
|
127
|
+
- REQ-V11-DOCS-002: `docs/planr-spec.zip` must be regenerated after spec changes.
|
|
128
|
+
- REQ-V11-DOCS-003: Docs must use Planr vocabulary: plan, map, item, pick, log, review, context, recovery, package.
|
|
129
|
+
- REQ-V11-DOCS-004: Repo-visible docs and public copy must not mention local comparison products or imply Planr is a fork of another task graph or review tool.
|
|
130
|
+
- REQ-V11-DOCS-005: New commands and APIs must have examples and JSON contract notes where agents rely on them.
|
|
131
|
+
|
|
132
|
+
Acceptance:
|
|
133
|
+
|
|
134
|
+
- Docs, fixtures, CLI help, MCP tools, and tests do not drift.
|
|
135
|
+
- A forbidden-reference scrub over public repo paths returns no matches for comparison-product names.
|
|
136
|
+
|
|
137
|
+
## End-To-End Verification Contract
|
|
138
|
+
|
|
139
|
+
V1.1 final verification must run from the current worktree and a fresh consumer project at `~/projects/planr-test`.
|
|
140
|
+
|
|
141
|
+
Required repository checks:
|
|
142
|
+
|
|
143
|
+
- `cargo fmt --check`
|
|
144
|
+
- `cargo clippy --all-targets -- -D warnings`
|
|
145
|
+
- `cargo test`
|
|
146
|
+
- `scripts/build-release.sh`
|
|
147
|
+
- checksum verification for release assets and packaged files
|
|
148
|
+
- `npm pack --dry-run` when the npm wrapper remains present
|
|
149
|
+
- `scripts/ci-local.sh`
|
|
150
|
+
- MCP stdio contract smoke
|
|
151
|
+
- HTTP/SSE smoke
|
|
152
|
+
- local browser review workspace smoke
|
|
153
|
+
- forbidden-reference scrub over public repo paths
|
|
154
|
+
|
|
155
|
+
Required consumer checks in `~/projects/planr-test`:
|
|
156
|
+
|
|
157
|
+
- install or invoke the built Planr binary without relying on source-tree paths except for the selected test binary
|
|
158
|
+
- initialize a project
|
|
159
|
+
- create a product plan or build plan
|
|
160
|
+
- build map items
|
|
161
|
+
- pick one item
|
|
162
|
+
- log files, commands, and tests
|
|
163
|
+
- request review
|
|
164
|
+
- annotate or ingest review feedback
|
|
165
|
+
- close review and target item according to gate rules
|
|
166
|
+
- export and import a package/template
|
|
167
|
+
- run documented examples that are meant to work for users
|
|
168
|
+
|
|
169
|
+
The final V1.1 review must treat missing, stale, narrow, or indirect evidence as incomplete.
|
|
170
|
+
|
|
171
|
+
## Out Of Scope For V1.1 Unless Explicitly Added
|
|
172
|
+
|
|
173
|
+
- Hosted accounts, billing, hosted sync, or team permission models.
|
|
174
|
+
- Uploading private plans, source files, prompts, responses, or review content to a hosted service by default.
|
|
175
|
+
- Full project-management SaaS workflows unrelated to coding-agent execution.
|
|
176
|
+
- Silent global agent-client configuration edits.
|
|
177
|
+
- Claiming PR-provider support that was not verified with a real provider or documented local capability boundary.
|
|
Binary file
|
package/npm/bin/planr.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import os from "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
|
|
8
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const packageRoot = path.resolve(here, "..", "..");
|
|
10
|
+
|
|
11
|
+
function platformTarget() {
|
|
12
|
+
const osName = { darwin: "darwin", linux: "linux" }[os.platform()];
|
|
13
|
+
const arch = { arm64: "arm64", x64: "x86_64" }[os.arch()];
|
|
14
|
+
if (!osName || !arch) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return `${osName}-${arch}`;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const target = platformTarget();
|
|
21
|
+
const candidates = [
|
|
22
|
+
process.env.PLANR_NATIVE_BIN,
|
|
23
|
+
// Published package: per-platform binaries bundled at release time.
|
|
24
|
+
target && path.join(here, "..", "native", target, "planr"),
|
|
25
|
+
// Repository checkout: local cargo builds.
|
|
26
|
+
path.join(packageRoot, "target", "release", "planr"),
|
|
27
|
+
path.join(packageRoot, "target", "debug", "planr"),
|
|
28
|
+
].filter(Boolean);
|
|
29
|
+
|
|
30
|
+
const binary = candidates.find(candidate => fs.existsSync(candidate));
|
|
31
|
+
|
|
32
|
+
if (!binary) {
|
|
33
|
+
if (!target) {
|
|
34
|
+
console.error(`Planr has no native binary for ${os.platform()}-${os.arch()}.`);
|
|
35
|
+
console.error("Supported platforms: darwin-arm64, darwin-x86_64, linux-x86_64, linux-arm64.");
|
|
36
|
+
} else {
|
|
37
|
+
console.error("Planr native binary was not found.");
|
|
38
|
+
console.error("Build it with: cargo build --release");
|
|
39
|
+
console.error("Or set PLANR_NATIVE_BIN=/absolute/path/to/planr");
|
|
40
|
+
}
|
|
41
|
+
process.exit(127);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const result = spawnSync(binary, process.argv.slice(2), {
|
|
45
|
+
stdio: "inherit",
|
|
46
|
+
env: process.env,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
if (result.error) {
|
|
50
|
+
console.error(result.error.message);
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
process.exit(result.status ?? 0);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "planr",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"license": "
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
"version": "1.1.16",
|
|
4
|
+
"description": "Local-first planning and execution coordination for coding agents.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/instructa/planr.git"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"bin": {
|
|
12
|
+
"planr": "npm/bin/planr.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"npm/bin/planr.js",
|
|
16
|
+
"npm/native",
|
|
17
|
+
"plugins",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE.md",
|
|
20
|
+
"docs"
|
|
21
|
+
],
|
|
9
22
|
"scripts": {
|
|
10
|
-
"
|
|
11
|
-
|
|
23
|
+
"build:native": "cargo build --release",
|
|
24
|
+
"test": "cargo test",
|
|
25
|
+
"pack:check": "npm pack --dry-run"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=18"
|
|
29
|
+
},
|
|
30
|
+
"packageManager": "pnpm@11.5.3+sha512.7ac1c919341c213a34dc0d02afb7143c5c26ac26ee8c4782deea821b8ac64d2134a081fd8941dae6e29bbb48f58dfc2b7fbceeccc07cb2f09d219d342a4969ed"
|
|
12
31
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "planr",
|
|
3
|
+
"description": "Skill-driven planning and execution loop for coding agents: one planr entry point, an autonomous planr-loop, and evidence-backed task graph skills powered by the planr CLI.",
|
|
4
|
+
"version": "1.1.16",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "instructa"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/instructa/planr",
|
|
9
|
+
"repository": "https://github.com/instructa/planr",
|
|
10
|
+
"license": "MIT"
|
|
11
|
+
}
|