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,932 @@
1
+ # Tasks
2
+
3
+ These tasks are implementation-ready work items for coding agents. They intentionally avoid storypoints and timelines.
4
+
5
+ ## V1.1 Differentiation
6
+
7
+ These tasks implement `V1_1_DIFFERENTIATION_CONTRACT.md`. They are Planr-owned product work and must not introduce public references to local comparison products.
8
+
9
+ ### TASK-V11-001: Establish V1.1 Gap Contract
10
+
11
+ Goal:
12
+ Create the executable V1.1 contract before coding.
13
+
14
+ Context:
15
+ Supports every REQ-V11-* requirement in `V1_1_DIFFERENTIATION_CONTRACT.md`.
16
+
17
+ Requirements:
18
+ - Define graph intelligence, pick recall, recovery, local browser review, scoped Git review, distribution, templates, docs, and E2E acceptance criteria.
19
+ - Use Planr vocabulary only.
20
+ - Keep the contract specific enough that coding agents can work each slice without hidden context.
21
+
22
+ Files or areas likely involved:
23
+ - `docs/planr-spec/V1_1_DIFFERENTIATION_CONTRACT.md`.
24
+ - `docs/planr-spec/TASKS.md`.
25
+ - `docs/planr-spec/README.md`.
26
+
27
+ Acceptance criteria:
28
+ - Contract exists with stable requirement ids.
29
+ - Public docs contain no local comparison-product names.
30
+ - Downstream implementation tasks can map directly to requirement ids.
31
+
32
+ Tests:
33
+ - Forbidden-reference scrub over README, docs, src, tests, examples, scripts, skills, `.github`, package metadata, and `.planr/project`.
34
+
35
+ Dependencies:
36
+ - V1 final validation gate.
37
+
38
+ Do not do:
39
+ - Do not implement feature code in this contract task.
40
+
41
+ ### TASK-V11-002: Implement Graph Intelligence
42
+
43
+ Goal:
44
+ Make Planr map analysis mathematically useful for agents and operators.
45
+
46
+ Context:
47
+ Supports REQ-V11-GRAPH-001 through REQ-V11-GRAPH-006.
48
+
49
+ Requirements:
50
+ - Compute critical path across blocking edges.
51
+ - Compute transitive pressure and direct blocker counts.
52
+ - Diagnose cycles before readiness and path output mislead agents.
53
+ - Share one effect engine across close, cancel, insert, replan, and dependency previews.
54
+ - Expose consistent results in CLI, MCP, HTTP, and JSON.
55
+
56
+ Files or areas likely involved:
57
+ - `src/app/repository.rs`.
58
+ - `src/app/commands.rs`.
59
+ - `src/app/http.rs`.
60
+ - `src/app/mcp.rs`.
61
+ - `tests/e2e.rs`.
62
+
63
+ Acceptance criteria:
64
+ - Branched and deep graph fixtures prove longest-path behavior.
65
+ - Transitive bottleneck fixtures prove downstream impact ranking.
66
+ - Cycle fixtures produce actionable diagnostics.
67
+
68
+ Tests:
69
+ - Focused unit tests for graph algorithms.
70
+ - CLI/MCP/HTTP E2E coverage for critical path, pressure, lookahead, and previews.
71
+
72
+ Dependencies:
73
+ - TASK-V11-001.
74
+
75
+ Do not do:
76
+ - Do not treat priority sorting as critical-path analysis.
77
+
78
+ ### TASK-V11-003: Implement Automatic Pick Recall
79
+
80
+ Goal:
81
+ Make every pick return the context an agent needs to start safely.
82
+
83
+ Context:
84
+ Supports REQ-V11-RECALL-001 through REQ-V11-RECALL-005.
85
+
86
+ Requirements:
87
+ - Rank relevant contexts, plans, logs, and review summaries.
88
+ - Include upstream handoffs, linked plan references, review/fix history, blockers, unlocks, possible file conflicts, and deeper-read commands.
89
+ - Keep responses size-bounded and privacy-safe.
90
+ - Share behavior across CLI, MCP, and HTTP pick routes.
91
+
92
+ Files or areas likely involved:
93
+ - `src/app/inspection.rs`.
94
+ - `src/app/repository.rs`.
95
+ - `src/app/commands.rs`.
96
+ - `src/app/http.rs`.
97
+ - `src/app/mcp.rs`.
98
+ - `tests/e2e.rs`.
99
+
100
+ Acceptance criteria:
101
+ - Relevant historical decisions appear in pick output without a separate search.
102
+ - Irrelevant contexts rank below relevant ones.
103
+ - Prompt transcripts, source contents, secrets, and large artifacts are omitted by default.
104
+
105
+ Tests:
106
+ - Ranking fixture tests.
107
+ - Pick output E2E tests across CLI, MCP, and HTTP.
108
+
109
+ Dependencies:
110
+ - TASK-V11-001.
111
+
112
+ Do not do:
113
+ - Do not dump all project context into every pick.
114
+
115
+ ### TASK-V11-004: Implement Recovery Automation
116
+
117
+ Goal:
118
+ Make interruption recovery deterministic and inspectable.
119
+
120
+ Context:
121
+ Supports REQ-V11-RECOVERY-001 through REQ-V11-RECOVERY-006.
122
+
123
+ Requirements:
124
+ - Add sweeper command/API with dry-run or preview-first behavior.
125
+ - Add timeout and retry/backoff fields and transitions.
126
+ - Reclaim stale picks only through explicit recovery behavior.
127
+ - Surface preconditions and postconditions in pick, trace, review, and close preview.
128
+ - Report all closure blockers in one gate report.
129
+
130
+ Files or areas likely involved:
131
+ - `src/storage/schema.rs`.
132
+ - `src/model.rs`.
133
+ - `src/app/repository.rs`.
134
+ - `src/app/commands.rs`.
135
+ - `src/app/http.rs`.
136
+ - `src/app/mcp.rs`.
137
+ - `tests/e2e.rs`.
138
+
139
+ Acceptance criteria:
140
+ - Interrupted work can be diagnosed, released, and safely re-picked.
141
+ - Retryable failure returns to ready only after documented policy allows it.
142
+ - Unsatisfied conditions block or warn exactly as documented.
143
+
144
+ Tests:
145
+ - Timeout and stale-pick tests.
146
+ - Retry/backoff tests.
147
+ - Close-preview condition tests.
148
+
149
+ Dependencies:
150
+ - TASK-V11-001.
151
+
152
+ Do not do:
153
+ - Do not silently mutate or reclaim active work by default.
154
+
155
+ ### TASK-V11-005: Build Local Browser Review Workspace
156
+
157
+ Goal:
158
+ Give reviewers a first-class local visual review workflow.
159
+
160
+ Context:
161
+ Supports REQ-V11-REVIEW-UI-001 through REQ-V11-REVIEW-UI-005.
162
+
163
+ Requirements:
164
+ - Serve a local review workspace from Planr.
165
+ - Show plan/package review, plan diff, item detail, review evidence, annotations, and approve/request-changes actions.
166
+ - Use existing review APIs to write annotations, artifacts, and follow-up work.
167
+ - Keep the workspace local-first with no hosted dependency.
168
+
169
+ Files or areas likely involved:
170
+ - `src/app/http.rs`.
171
+ - `src/app/review.rs`.
172
+ - `src/app/surfaces.rs`.
173
+ - `docs/`.
174
+ - `tests/e2e.rs`.
175
+
176
+ Acceptance criteria:
177
+ - Browser smoke opens the workspace and exercises annotation flow.
178
+ - Review feedback creates map-native fix/follow-up review work.
179
+ - Clean review can write an artifact and close according to gate rules.
180
+
181
+ Tests:
182
+ - HTTP route tests.
183
+ - Browser or HTML smoke tests.
184
+ - Review artifact E2E tests.
185
+
186
+ Dependencies:
187
+ - TASK-V11-001.
188
+
189
+ Do not do:
190
+ - Do not require a cloud account or hosted paste service.
191
+
192
+ ### TASK-V11-006: Implement Scoped Git And Review Evidence
193
+
194
+ Goal:
195
+ Ground reviews in exact local source-change evidence.
196
+
197
+ Context:
198
+ Supports REQ-V11-GIT-001 through REQ-V11-GIT-005.
199
+
200
+ Requirements:
201
+ - Detect worktree, branch, commit, dirty state, and changed files.
202
+ - Distinguish item evidence from unrelated dirty files.
203
+ - Add file/line capable review evidence without storing full source contents by default.
204
+ - Document local-only PR behavior or implement verified optional PR URL support.
205
+
206
+ Files or areas likely involved:
207
+ - `src/app/review.rs`.
208
+ - `src/app/inspection.rs`.
209
+ - `src/app/surfaces.rs`.
210
+ - `tests/e2e.rs`.
211
+ - `docs/OPERATING_MODEL.md`.
212
+
213
+ Acceptance criteria:
214
+ - Unrelated dirty files do not become agent-owned evidence.
215
+ - Review artifacts list considered and excluded files.
216
+ - File and line annotations survive export/import.
217
+
218
+ Tests:
219
+ - Git fixture tests.
220
+ - Dirty-worktree review tests.
221
+
222
+ Dependencies:
223
+ - TASK-V11-001.
224
+
225
+ Do not do:
226
+ - Do not store full private source content by default.
227
+
228
+ ### TASK-V11-007: Harden Distribution And Client Setup
229
+
230
+ Goal:
231
+ Make Planr installable and configurable as a polished user product.
232
+
233
+ Context:
234
+ Supports REQ-V11-DIST-001 through REQ-V11-DIST-006.
235
+
236
+ Requirements:
237
+ - Keep release curl install as the primary user path.
238
+ - Add Homebrew-ready path or explicit tap-publication condition.
239
+ - Keep Cargo/source as maintainer workflow.
240
+ - Add or document client setup for Codex, Claude Code, Cursor, and generic MCP.
241
+ - Add prompt/config output for CLI, MCP, and HTTP workflows.
242
+ - Document checksum verification.
243
+
244
+ Files or areas likely involved:
245
+ - `README.md`.
246
+ - `docs/INSTALL.md`.
247
+ - `docs/RELEASE.md`.
248
+ - `src/app/commands.rs`.
249
+ - `src/integrations.rs`.
250
+ - `scripts/`.
251
+
252
+ Acceptance criteria:
253
+ - Fresh users can follow public release install docs.
254
+ - Supported clients have documented setup.
255
+ - Package dry-run contains only intentional files.
256
+
257
+ Tests:
258
+ - Install dry-run tests.
259
+ - Package dry-run.
260
+ - CLI prompt/config tests.
261
+
262
+ Dependencies:
263
+ - TASK-V11-001.
264
+
265
+ Do not do:
266
+ - Do not present npm or Cargo as the primary normal-user install path unless native binaries ship through that channel.
267
+
268
+ ### TASK-V11-008: Implement Templates And Review Packages
269
+
270
+ Goal:
271
+ Make proven Planr work reusable and portable.
272
+
273
+ Context:
274
+ Supports REQ-V11-TEMPLATE-001 through REQ-V11-TEMPLATE-005.
275
+
276
+ Requirements:
277
+ - Export/import graph items, links, plans, contexts, logs, review artifacts, and metadata.
278
+ - Add package requirements metadata and preview-before-import.
279
+ - Preserve review annotations, findings, artifacts, and file references.
280
+ - Define or implement a local-first encrypted bundle strategy.
281
+
282
+ Files or areas likely involved:
283
+ - `src/app/inspection.rs`.
284
+ - `src/app/repository.rs`.
285
+ - `src/planpack.rs`.
286
+ - `docs/IMPORT.md`.
287
+ - `tests/e2e.rs`.
288
+
289
+ Acceptance criteria:
290
+ - Fresh project can import a proven decomposition and pick work.
291
+ - Review annotations survive export/import.
292
+ - Conflicts are reported before mutation.
293
+
294
+ Tests:
295
+ - Export/import E2E tests.
296
+ - Package requirement and conflict tests.
297
+
298
+ Dependencies:
299
+ - TASK-V11-001.
300
+
301
+ Do not do:
302
+ - Do not rely on a hosted service for core package portability.
303
+
304
+ ### TASK-V11-009: Update Documentation And Public Copy
305
+
306
+ Goal:
307
+ Make docs match V1.1 behavior exactly.
308
+
309
+ Context:
310
+ Supports REQ-V11-DOCS-001 through REQ-V11-DOCS-005.
311
+
312
+ Requirements:
313
+ - Update README, CLI reference, MCP contract, operating model, task graph model, install docs, testing docs, and spec files.
314
+ - Regenerate `docs/planr-spec.zip`.
315
+ - Update fixtures that validate CLI/MCP/doc drift.
316
+ - Scrub public repo paths for forbidden comparison-product names.
317
+
318
+ Files or areas likely involved:
319
+ - `README.md`.
320
+ - `docs/`.
321
+ - `docs/fixtures/mcp-contract.json`.
322
+ - `docs/planr-spec.zip`.
323
+
324
+ Acceptance criteria:
325
+ - Docs, fixtures, CLI help, MCP tools, and tests agree.
326
+ - Forbidden-reference scrub is clean.
327
+
328
+ Tests:
329
+ - Drift tests.
330
+ - Forbidden-reference scrub.
331
+
332
+ Dependencies:
333
+ - TASK-V11-002 through TASK-V11-008.
334
+
335
+ Do not do:
336
+ - Do not document features that are not implemented or explicitly marked future scope.
337
+
338
+ ### TASK-V11-010: Run Full V1.1 E2E Verification
339
+
340
+ Goal:
341
+ Prove V1.1 works in-repo and as a fresh consumer install.
342
+
343
+ Context:
344
+ Uses the End-To-End Verification Contract in `V1_1_DIFFERENTIATION_CONTRACT.md`.
345
+
346
+ Requirements:
347
+ - Run all required repository checks.
348
+ - Run fresh consumer E2E in `~/projects/planr-test`.
349
+ - Include MCP, HTTP/SSE, browser review workspace, package export/import, and docs examples.
350
+ - Convert any failure into fix and re-review tasks.
351
+
352
+ Files or areas likely involved:
353
+ - `tests/`.
354
+ - `scripts/`.
355
+ - `docs/TESTING.md`.
356
+ - `~/projects/planr-test`.
357
+
358
+ Acceptance criteria:
359
+ - Every required command passes.
360
+ - Consumer project evidence exists outside the source repo.
361
+ - Final review has enough evidence to audit every V1.1 requirement.
362
+
363
+ Tests:
364
+ - Full command list from the V1.1 contract.
365
+
366
+ Dependencies:
367
+ - TASK-V11-009.
368
+
369
+ Do not do:
370
+ - Do not use narrow smoke tests as proof of broad V1.1 completion.
371
+
372
+ ## Foundation
373
+
374
+ ### TASK-FND-001: Create New Planr Product Skeleton
375
+
376
+ Goal:
377
+ Create a clean Planr codebase skeleton with owned command names, docs, and implementation boundaries.
378
+
379
+ Context:
380
+ Supports REQ-PROD-002 and ADR-001.
381
+
382
+ Requirements:
383
+ - Create package metadata for `planr`.
384
+ - Create source-owned Planr files only through explicit Planr commands.
385
+ - Add README sections for product direction, local-first data, and supported agents.
386
+
387
+ Files or areas likely involved:
388
+ - `Cargo.toml` or equivalent package manifest.
389
+ - `README.md`.
390
+ - `src/`.
391
+
392
+ Acceptance criteria:
393
+ - `planr --help` runs from source.
394
+ - README no longer presents the product as Codex-only.
395
+ - No unnecessary runtime dependency owns core coordination behavior.
396
+
397
+ Tests:
398
+ - Build command for chosen stack.
399
+ - `planr --help`.
400
+
401
+ Dependencies:
402
+ - None.
403
+
404
+ Do not do:
405
+ - Do not copy unowned source code, docs, images, or command vocabulary.
406
+
407
+ ### TASK-FND-002: Implement CLI Command Skeleton
408
+
409
+ Goal:
410
+ Add the primary command groups and stable output conventions.
411
+
412
+ Context:
413
+ Supports CLIENT_IMPLEMENTATION_SPEC.md.
414
+
415
+ Requirements:
416
+ - Add command groups: project, plan, map, item, pick, log, review, close, context, search, doctor, mcp.
417
+ - Add `--json`, no-color behavior, and stable error model.
418
+
419
+ Files or areas likely involved:
420
+ - `src/cli.rs`.
421
+ - `src/app/commands.rs`.
422
+
423
+ Acceptance criteria:
424
+ - Each top-level command has help output.
425
+ - Unknown commands and invalid arguments return machine-readable errors in JSON mode.
426
+
427
+ Tests:
428
+ - CLI golden help tests.
429
+ - JSON error tests.
430
+
431
+ Dependencies:
432
+ - TASK-FND-001.
433
+
434
+ Do not do:
435
+ - Do not implement business logic in command parsing.
436
+
437
+ ### TASK-FND-003: Create `.planr` Project Pack Initializer
438
+
439
+ Goal:
440
+ Create a repo-local Markdown project pack with product, ownership, flows, state SSOT, constraints, and quality checks.
441
+
442
+ Context:
443
+ Creates the durable project context layer for Planr.
444
+
445
+ Requirements:
446
+ - `planr project init` creates `.planr/project/*.md`.
447
+ - Existing files are not overwritten unless `--force`.
448
+ - Starter text makes graph-vs-Markdown ownership explicit.
449
+
450
+ Files or areas likely involved:
451
+ - `src/planpack/`.
452
+ - `.planr/` templates.
453
+
454
+ Acceptance criteria:
455
+ - Empty repo gets a complete `.planr` pack.
456
+ - Existing `.planr` pack remains intact by default.
457
+
458
+ Tests:
459
+ - Init fixture tests.
460
+
461
+ Dependencies:
462
+ - TASK-FND-002.
463
+
464
+ Do not do:
465
+ - Do not add a second file-based graph SSOT beside SQLite.
466
+
467
+ ## Data And Graph
468
+
469
+ ### TASK-DATA-001: Implement SQLite Schema And Upgrades
470
+
471
+ Goal:
472
+ Create the local map database schema.
473
+
474
+ Context:
475
+ Supports API_AND_DATA_MODEL.md and ADR-002.
476
+
477
+ Requirements:
478
+ - Implement tables for projects, items, links, plans, source_links, contexts, runs, logs, artifacts, events.
479
+ - Store schema version.
480
+ - Enable WAL and foreign keys.
481
+
482
+ Files or areas likely involved:
483
+ - `src/storage/schema.rs`.
484
+ - `src/storage/mod.rs`.
485
+
486
+ Acceptance criteria:
487
+ - Fresh database initializes.
488
+ - Re-running init is idempotent.
489
+ - Schema version is queryable.
490
+
491
+ Tests:
492
+ - Schema upgrade tests.
493
+ - Fresh/open existing database tests.
494
+
495
+ Dependencies:
496
+ - TASK-FND-001.
497
+
498
+ Do not do:
499
+ - Do not store source file contents by default.
500
+
501
+ ### TASK-DATA-002: Implement Item State Machine And Atomic Picking
502
+
503
+ Goal:
504
+ Implement item lifecycle, link-based promotion, and concurrent-safe picks.
505
+
506
+ Context:
507
+ This is the core graph product.
508
+
509
+ Requirements:
510
+ - Centralize valid state transitions.
511
+ - Promote ready items after link changes and item closure.
512
+ - Implement atomic pick with pick token and automatically derived worker id.
513
+ - Prevent parent closure while review/fix follow-ups remain open.
514
+
515
+ Files or areas likely involved:
516
+ - `src/core/state_machine.rs`.
517
+ - `src/core/readiness.rs`.
518
+ - `src/core/graph.rs`.
519
+
520
+ Acceptance criteria:
521
+ - Two agents cannot pick the same item.
522
+ - Closing upstream item unlocks downstream item.
523
+ - Parent remains incomplete until required review items pass.
524
+
525
+ Tests:
526
+ - Concurrent pick integration test.
527
+ - State transition unit tests.
528
+
529
+ Dependencies:
530
+ - TASK-DATA-001.
531
+
532
+ Do not do:
533
+ - Do not infer graph state from Markdown checkboxes.
534
+
535
+ ### TASK-DATA-003: Implement Log And Run Records
536
+
537
+ Goal:
538
+ Record log for item closure, review, failure, and handoff.
539
+
540
+ Context:
541
+ Supports log-backed completion and recoverable handoffs.
542
+
543
+ Requirements:
544
+ - Add run start/end operations.
545
+ - Add log creation with summary, files, commands, tests, findings, blockers.
546
+ - Link log to items and runs.
547
+
548
+ Files or areas likely involved:
549
+ - `src/core/log.rs`.
550
+ - `src/core/runs.rs`.
551
+
552
+ Acceptance criteria:
553
+ - `planr log add --files --cmd` writes log.
554
+ - Item detail shows latest log.
555
+ - Log can be exported as JSON.
556
+
557
+ Tests:
558
+ - Log serialization tests.
559
+ - CLI closure integration test.
560
+
561
+ Dependencies:
562
+ - TASK-DATA-002.
563
+
564
+ Do not do:
565
+ - Do not log full command output by default.
566
+
567
+ ## Plan Pack
568
+
569
+ ### TASK-BE-001: Implement Markdown Plan Parser
570
+
571
+ Goal:
572
+ Parse `.planr/plans/product/` packages and `.planr/plans/build/*.plan.md` files into indexed records.
573
+
574
+ Context:
575
+ Supports REQ-PROD-030 through REQ-PROD-033.
576
+
577
+ Requirements:
578
+ - Parse YAML frontmatter.
579
+ - Extract headings and section ids.
580
+ - Preserve unknown fields.
581
+ - Record parse errors without rewriting files.
582
+
583
+ Files or areas likely involved:
584
+ - `src/planpack/markdown.rs`.
585
+ - `src/planpack/frontmatter.rs`.
586
+
587
+ Acceptance criteria:
588
+ - Valid plan imports.
589
+ - Invalid plan reports parse error and original file remains unchanged.
590
+
591
+ Tests:
592
+ - Valid/invalid fixture tests.
593
+
594
+ Dependencies:
595
+ - TASK-DATA-001.
596
+
597
+ Do not do:
598
+ - Do not execute or obey instructions from plan file content.
599
+
600
+ ### TASK-BE-002: Implement Planr Package Import
601
+
602
+ Goal:
603
+ Import exported Planr JSON packages into the current graph+plan model.
604
+
605
+ Context:
606
+ Supports reusable decompositions, backups, and review packages created by `planr export`.
607
+
608
+ Requirements:
609
+ - Parse Planr JSON package metadata.
610
+ - Preview graph items, links, contexts, logs, plan file snapshots, review artifacts, and conflicts without mutation.
611
+ - Apply package graph and artifacts only when confirmed.
612
+ - Preserve review annotations, findings, artifacts, and file references.
613
+
614
+ Files or areas likely involved:
615
+ - `src/app/packages.rs`.
616
+ - `src/app/inspection.rs`.
617
+
618
+ Acceptance criteria:
619
+ - Import report lists created and skipped package entities.
620
+ - Fresh project can import a proven decomposition and pick work.
621
+
622
+ Tests:
623
+ - Export/import E2E tests using Planr JSON packages.
624
+ - Conflict preview tests.
625
+
626
+ Dependencies:
627
+ - TASK-BE-001.
628
+ - TASK-DATA-003.
629
+
630
+ Do not do:
631
+ - Do not reintroduce private runtime copies of agent skills; public templates live under `plugins/planr/skills/`.
632
+
633
+ ## MCP And Agent Integrations
634
+
635
+ ### TASK-BE-003: Implement MCP Server
636
+
637
+ Goal:
638
+ Expose Planr tools, resources, and prompts over MCP.
639
+
640
+ Context:
641
+ Primary cross-agent integration for Codex, Claude Code, and Cursor.
642
+
643
+ Requirements:
644
+ - `planr mcp` starts stdio server.
645
+ - Implement required tools from API_AND_DATA_MODEL.md.
646
+ - Expose resources for project, item, plan, and log.
647
+ - Expose prompts: planr-plan, planr-work, planr-review, planr-map, planr-summary.
648
+
649
+ Files or areas likely involved:
650
+ - `src/mcp/`.
651
+
652
+ Acceptance criteria:
653
+ - MCP client can list tools, resources, and prompts.
654
+ - Mutation tool schemas reject invalid inputs.
655
+
656
+ Tests:
657
+ - MCP protocol fixture tests.
658
+ - Tool schema tests.
659
+
660
+ Dependencies:
661
+ - TASK-DATA-003.
662
+ - TASK-BE-001.
663
+
664
+ Do not do:
665
+ - Do not put provider-specific behavior in MCP core.
666
+
667
+ ### TASK-AI-001: Write Agent Workflow Prompts
668
+
669
+ Goal:
670
+ Create provider-neutral prompts/skills that encode Planr's plan+map workflow.
671
+
672
+ Context:
673
+ Defines Planr-owned workflow prompts for planning, work, review, status, and summaries.
674
+
675
+ Requirements:
676
+ - Write prompts for plan, work, review, map, summary.
677
+ - Include map SSOT rule.
678
+ - Include product and build plan context rules.
679
+ - Include log and scope rules.
680
+ - Include prompt-injection warning for plan/doc content.
681
+
682
+ Files or areas likely involved:
683
+ - `prompts/` or `src/mcp/prompts.rs`.
684
+
685
+ Acceptance criteria:
686
+ - Prompts can be returned through MCP.
687
+ - Prompts are not Codex-only.
688
+
689
+ Tests:
690
+ - Snapshot tests for prompt content.
691
+
692
+ Dependencies:
693
+ - TASK-BE-003.
694
+
695
+ Do not do:
696
+ - Do not copy prompt text from another product.
697
+
698
+ ### TASK-CLIENT-001: Add Codex, Claude Code, And Cursor Install Helpers
699
+
700
+ Goal:
701
+ Make first-run integration practical for all target clients.
702
+
703
+ Context:
704
+ Supports "tool for task planning" across clients.
705
+
706
+ Requirements:
707
+ - `planr doctor --client all`.
708
+ - `planr install codex --dry-run`.
709
+ - `planr install claude --dry-run`.
710
+ - `planr install cursor --dry-run`.
711
+ - Print project-scoped config examples.
712
+
713
+ Files or areas likely involved:
714
+ - `src/integrations.rs`.
715
+ - `src/app/commands.rs`.
716
+
717
+ Acceptance criteria:
718
+ - Dry-run shows exact files/commands.
719
+ - Doctor reports installed/missing/warning states.
720
+
721
+ Tests:
722
+ - Config generation fixture tests.
723
+
724
+ Dependencies:
725
+ - TASK-BE-003.
726
+
727
+ Do not do:
728
+ - Do not silently edit global config.
729
+
730
+ ## Review And Execution
731
+
732
+ ### TASK-AI-002: Implement Review/Fix Commands
733
+
734
+ Goal:
735
+ Make review findings a map-native workflow.
736
+
737
+ Context:
738
+ Implements ADR-004.
739
+
740
+ Requirements:
741
+ - `planr review request <item>`.
742
+ - `planr review annotate <item> --message ...`.
743
+ - `planr review ingest <item> --from ...` for hook-compatible JSON feedback.
744
+ - `planr review artifact <review-item>` writes `.planr/reviews/*.review.md`.
745
+ - `planr review close <item> --verdict ...`.
746
+ - Create fix and follow-up review work from findings, linked to the reviewed target.
747
+ - Never auto-close or auto-approve work from ingested feedback alone.
748
+ - Keep parent incomplete until review passes.
749
+
750
+ Files or areas likely involved:
751
+ - `src/app/review.rs`.
752
+ - `src/app/commands.rs`.
753
+
754
+ Acceptance criteria:
755
+ - Review pass completes review item.
756
+ - Review findings create fix/follow-up review chain.
757
+ - Review close writes a review artifact and registers it in artifacts.
758
+ - Parent remains blocked until clean review.
759
+
760
+ Tests:
761
+ - Review/fix loop integration tests.
762
+
763
+ Dependencies:
764
+ - TASK-DATA-002.
765
+ - TASK-DATA-003.
766
+
767
+ Do not do:
768
+ - Do not use `failed` for ordinary review churn.
769
+
770
+ ### TASK-CLIENT-002: Add Optional Codex Runner Wrapper
771
+
772
+ Goal:
773
+ Provide a first-class Codex execution path without making Codex mandatory.
774
+
775
+ Context:
776
+ This is a product differentiator for Codex users.
777
+
778
+ Requirements:
779
+ - `planr codex run [--workers N]`.
780
+ - Use `planr pick` to pick items.
781
+ - Invoke `codex exec` with bounded item context.
782
+ - Record runs and log.
783
+ - Support `codex review` integration where configured.
784
+
785
+ Files or areas likely involved:
786
+ - `src/agents/codex.rs`.
787
+
788
+ Acceptance criteria:
789
+ - One item can be picked, run through Codex, and recorded.
790
+ - Failed Codex run leaves item recoverable.
791
+
792
+ Tests:
793
+ - Mock Codex command tests.
794
+
795
+ Dependencies:
796
+ - TASK-DATA-003.
797
+ - TASK-AI-001.
798
+
799
+ Do not do:
800
+ - Do not require Codex for Claude/Cursor users.
801
+
802
+ ## Security, Observability, Release
803
+
804
+ ### TASK-SEC-001: Implement Content-Safe Logging And Scrubbing
805
+
806
+ Goal:
807
+ Prevent accidental storage of secrets or private content in logs.
808
+
809
+ Context:
810
+ Supports SAFETY_PRIVACY_SECURITY.md.
811
+
812
+ Requirements:
813
+ - Redact likely API keys/tokens.
814
+ - Keep prompt/response logging disabled by default.
815
+ - Add `planr scrub`.
816
+
817
+ Files or areas likely involved:
818
+ - `src/security/`.
819
+ - `src/observability/`.
820
+
821
+ Acceptance criteria:
822
+ - Secret-like strings are flagged in contexts/log.
823
+ - Debug bundle excludes forbidden content by default.
824
+
825
+ Tests:
826
+ - Secret scrubbing tests.
827
+
828
+ Dependencies:
829
+ - TASK-DATA-003.
830
+
831
+ Do not do:
832
+ - Do not promise perfect secret detection.
833
+
834
+ ### TASK-ANA-001: Implement Doctor And Debug Bundle
835
+
836
+ Goal:
837
+ Provide local diagnostics for installation, database, MCP, and agent clients.
838
+
839
+ Context:
840
+ Supports production operability.
841
+
842
+ Requirements:
843
+ - `planr doctor`.
844
+ - `planr debug bundle`.
845
+ - Redacted output by default.
846
+
847
+ Files or areas likely involved:
848
+ - `src/doctor/`.
849
+ - `src/observability/`.
850
+
851
+ Acceptance criteria:
852
+ - Doctor reports database, `.planr`, Git, MCP, Codex, Claude Code, Cursor.
853
+ - Debug bundle is reviewable before sharing.
854
+
855
+ Tests:
856
+ - Doctor fixture tests.
857
+
858
+ Dependencies:
859
+ - TASK-CLIENT-001.
860
+ - TASK-SEC-001.
861
+
862
+ Do not do:
863
+ - Do not include source files or plan bodies in debug bundles by default.
864
+
865
+ ### TASK-QA-001: Build Acceptance Test Suite
866
+
867
+ Goal:
868
+ Create the test suite described in QA_ACCEPTANCE_TESTS.md.
869
+
870
+ Context:
871
+ Prevents graph, package, and schema regressions.
872
+
873
+ Requirements:
874
+ - State machine tests.
875
+ - Concurrent pick tests.
876
+ - Plan parser tests.
877
+ - MCP tests.
878
+ - Schema upgrade tests.
879
+ - Security/logging tests.
880
+
881
+ Files or areas likely involved:
882
+ - `tests/`.
883
+
884
+ Acceptance criteria:
885
+ - Acceptance suite runs locally.
886
+ - CI can run it without external agent clients.
887
+
888
+ Tests:
889
+ - This task is itself the test suite.
890
+
891
+ Dependencies:
892
+ - TASK-BE-003.
893
+ - TASK-BE-002.
894
+ - TASK-SEC-001.
895
+
896
+ Do not do:
897
+ - Do not rely on live Codex/Claude/Cursor for core CI tests.
898
+
899
+ ### TASK-REL-001: Package And Release V1
900
+
901
+ Goal:
902
+ Ship Planr as installable local CLI.
903
+
904
+ Context:
905
+ Supports RELEASE_READINESS.md.
906
+
907
+ Requirements:
908
+ - Build release binaries.
909
+ - Generate checksums.
910
+ - Add install docs.
911
+ - Add package import/export docs.
912
+ - Add MCP integration docs.
913
+
914
+ Files or areas likely involved:
915
+ - `.github/workflows/`.
916
+ - `docs/`.
917
+ - release scripts.
918
+
919
+ Acceptance criteria:
920
+ - Fresh user can install and run `planr project init`.
921
+ - Checksums are published.
922
+ - Release notes list known limitations.
923
+
924
+ Tests:
925
+ - Packaging smoke test on macOS and Linux.
926
+
927
+ Dependencies:
928
+ - TASK-QA-001.
929
+ - TASK-ANA-001.
930
+
931
+ Do not do:
932
+ - Do not ship install script that silently edits global agent config.