@milanglacier/pi-plan-mode 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,99 @@
1
+ # `@milanglacier/pi-plan-mode`
2
+
3
+ > Structured planning mode for pi — think before you code.
4
+
5
+ ## Fork notice
6
+
7
+ This repository is a standalone fork of
8
+ [`@ifi/pi-plan`](https://github.com/ifiokjr/oh-pi/tree/main/packages/plan),
9
+ originally created by [Ifiok Jr.](https://github.com/ifiokjr). The initial
10
+ source was imported from
11
+ [`ifiokjr/oh-pi@7ef2e7b`](https://github.com/ifiokjr/oh-pi/commit/7ef2e7b073198665fc2492498a085fa3e1eeaced).
12
+
13
+ The original project remains the canonical upstream. Its copyright and MIT
14
+ license terms continue to apply.
15
+
16
+ ## Why use this?
17
+
18
+ Direct implementation works for small tasks, but complex features benefit from planning first:
19
+
20
+ - **Avoid rework:** Plan the architecture before writing code
21
+ - **Capture decisions:** The plan file documents _why_ you made certain choices
22
+ - **Resume later:** Planning state persists across sessions
23
+
24
+ Plan mode turns planning into a first-class pi workflow with its own tools, banners, and file management.
25
+
26
+ ## What planning feels like
27
+
28
+ ```
29
+ /plan
30
+
31
+ ┌─ Start Plan Mode ──────────────────────────┐
32
+ │ │
33
+ │ Empty branch Start a new planning │
34
+ │ branch from scratch │
35
+ │ │
36
+ │ Current branch Continue from where the │
37
+ │ conversation left off │
38
+ │ │
39
+ └─────────────────────────────────────────────┘
40
+ ```
41
+
42
+ While active, a banner stays visible:
43
+
44
+ ```
45
+ ┌ PLAN MODE ─ /home/user/projects/app/session-abc.plan.md ─────┐
46
+ │ [plan-mode tools are active: request_user_input, set_plan] │
47
+ └───────────────────────────────────────────────────────────────┘
48
+ ```
49
+
50
+ Exiting plan mode shows a summary:
51
+
52
+ ```
53
+ Plan mode ended.
54
+ Plan saved to: /home/user/projects/app/session-abc.plan.md
55
+ ```
56
+
57
+ ## Installation
58
+
59
+ ```bash
60
+ pi install npm:@milanglacier/pi-plan-mode
61
+ ```
62
+
63
+ ## Commands
64
+
65
+ | Command | Action |
66
+ | ------------------- | --------------------------------------------------- |
67
+ | `/plan` | Enter plan mode (or show actions if already active) |
68
+ | `/plan [file-path]` | Use a specific file as the plan file |
69
+ | `/plan [directory]` | Create a timestamped plan file in that directory |
70
+
71
+ ## Shortcut
72
+
73
+ `Alt+P` — toggle plan mode without typing `/plan`.
74
+
75
+ ## Tools available in plan mode
76
+
77
+ Only while plan mode is active, these tools are exposed:
78
+
79
+ | Tool | Purpose |
80
+ | -------------------- | ------------------------------------------------------ |
81
+ | `request_user_input` | Ask you clarifying questions with optional choices |
82
+ | `set_plan` | Overwrite the plan file with the latest full plan text |
83
+
84
+ When plan mode ends, these tools disappear.
85
+
86
+ ## Customization
87
+
88
+ The default plan-mode prompt lives at `prompts/PLAN.prompt.md`. Override it globally by creating `~/.pi/agent/PLAN.prompt.md`. If the override file is missing or blank, the bundled prompt is used.
89
+
90
+ ## Plan file management
91
+
92
+ - Default plan file: replaces the session extension with `.plan.md` in the session directory
93
+ - Plan files persist after exiting — resume later with `/plan`
94
+ - While active, `/plan <location>` moves the current plan file
95
+
96
+ ## Notes
97
+
98
+ - Ships raw TypeScript — no build step needed
99
+ - Plan mode does not automatically trigger implementation — it's for thinking, not coding