@henryqw/pi-prompt-creator 3.2.1 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # `@henryqw/pi-prompt-creator`
2
2
 
3
- Turn repeated requests or corrections in the Current Conversation into a global Pi prompt. A child with no tools prepares one Prompt Candidate. Review it with Main and approve it before saving.
3
+ Turn repeated requests or corrections in the Current Conversation into a global Pi prompt. Review the Prompt Candidate with Main and approve it before saving.
4
4
 
5
5
  ## Install
6
6
 
@@ -9,7 +9,7 @@ pi install npm:@henryqw/pi-task-models
9
9
  pi install npm:@henryqw/pi-prompt-creator
10
10
  ```
11
11
 
12
- Run `/task-models` before analysis. Assign a model to `fast`, or override `pi-prompt-creator/draft`. Reopen `/task-models` to verify the saved route and thinking level.
12
+ Configure `fast` in `/task-models`, or override `pi-prompt-creator/draft`.
13
13
 
14
14
  ## Works with
15
15
 
@@ -35,7 +35,7 @@ The extension creates `~/.pi/agent/prompts/<name>.md` and reloads Pi resources,
35
35
 
36
36
  ## Flow
37
37
 
38
- ![Automatic analysis waits for candidate display, Main review, and approval; manual candidates appear immediately.](./docs/prompt-lifecycle.svg)
38
+ ![Draft outcomes: a candidate proceeds to Main review and approval, null clears the widget, and failure shows a status; manual candidates appear immediately.](./docs/prompt-lifecycle.svg)
39
39
 
40
40
  ### Analysis
41
41
 
@@ -47,7 +47,7 @@ Manual and automatic analysis send Pi's current model-visible session context to
47
47
 
48
48
  The payload includes the active compaction or branch summary, user text, completed assistant text, and effective prompt names and descriptions. It excludes tool traffic, thinking, images, custom messages, and inactive branches. The child has no tools, user extensions, Skills, saved session, project context files, or prompt templates. It returns one JSON response.
49
49
 
50
- New input does not stop analysis. Branch navigation discards the old result without stopping the child. Background work does not interrupt the conversation. Manual candidates appear immediately, without the diagram's WAIT stage. Automatic candidates stay behind `Prompt ready — /promptor` until you show them with `/promptor` or discard them with `/promptor dismiss`.
50
+ New input does not stop analysis. Branch navigation discards the old result without stopping the child. Background work does not interrupt the conversation. Manual candidates appear immediately. Automatic candidates stay behind `Prompt ready — /promptor` until you show them with `/promptor` or discard them with `/promptor dismiss`.
51
51
 
52
52
  ### Review safeguards
53
53
 
@@ -74,7 +74,7 @@ Invalid or misspelled `automatic` disables automatic analysis for the session. F
74
74
 
75
75
  Only `/promptor automatic on` and `/promptor automatic off` write config. Each toggle rereads the file and preserves its current `inputThreshold`, including changes from another session. For a file with problems, it reports them, keeps usable values, and removes unknown keys. If another session changes that file before replacement, the toggle writes nothing.
76
76
 
77
- The extension owns no model config. At session start and before analysis, it reports each shared task-model config problem once per session.
77
+ The extension owns no model config.
78
78
 
79
79
  ## State and storage
80
80
 
@@ -90,5 +90,3 @@ Pending candidates and input counters stay in memory only. Only automatic mode a
90
90
  | Child runtime | Two-minute idle timeout and five-minute hard timeout. |
91
91
 
92
92
  No candidate clears the running widget without a notice. Invalid output or child failure shows `Prompt analysis failed — /promptor`. Analysis never retries automatically; run `/promptor` or `/promptor analyze` to try again. The next non-empty user input clears the failure widget.
93
-
94
- This package does not create Skills or project-local runtime state.
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <svg width="1280" height="720" viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="prompt-lifecycle-title prompt-lifecycle-desc" id="prompt-lifecycle-root">
3
3
  <title id="prompt-lifecycle-title">Automatic analysis path to a saved prompt</title>
4
- <desc id="prompt-lifecycle-desc">Automatic candidates wait for /promptor, while manual candidates display immediately; both require a valid Main review and explicit user approval before saving a new prompt file.</desc>
4
+ <desc id="prompt-lifecycle-desc">The draft child uses up to three turns: a candidate proceeds to review, null clears the widget, and invalid output or child failure shows a failure status; automatic candidates wait for /promptor, manual candidates display immediately, and both require Main review and user approval before saving.</desc>
5
5
  <defs>
6
6
  <style>@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&amp;family=Geist:wght@400;500;600&amp;family=Geist+Mono:wght@400;500;600&amp;family=Noto+Serif:ital@0;1&amp;family=Noto+Sans+KR:wght@400;500;600&amp;family=Noto+Serif+KR:wght@400&amp;family=Noto+Sans+TC:wght@400;500;600&amp;family=Noto+Serif+TC:wght@400&amp;display=swap');
7
7
  #prompt-lifecycle-root { --paper: #f0eee9;
@@ -53,7 +53,7 @@
53
53
  <!-- Role lanes -->
54
54
  <rect x="40" y="140" width="1200" height="144" fill="#101828" fill-opacity="0.018"/>
55
55
  <rect x="40" y="428" width="1200" height="144" fill="#101828" fill-opacity="0.018"/>
56
- <g fill="none" stroke="#101828" stroke-opacity="0.14" stroke-width="0.8">
56
+ <g fill="none" stroke="#101828" stroke-width="0.8" stroke-opacity="0.14">
57
57
  <line x1="40" y1="140" x2="1240" y2="140"/>
58
58
  <line x1="40" y1="284" x2="1240" y2="284"/>
59
59
  <line x1="40" y1="428" x2="1240" y2="428"/>
@@ -71,17 +71,27 @@
71
71
  <g fill="none" stroke="#4c5665" stroke-width="1" marker-end="url(#prompt-lifecycle-arrow)">
72
72
  <path d="M324 212 H412 Q420 212 420 220 V308"/>
73
73
  <path d="M676 500 H764 Q772 500 772 492 V404"/>
74
- <path d="M852 356 H940 Q948 356 948 348 V260" stroke-dasharray="5,4"/>
74
+ <path d="M772 308 V220 Q772 212 780 212 H868" stroke-dasharray="5,4"/>
75
+ <path d="M556 452 V404"/>
76
+ <path d="M676 532 H940 Q948 532 948 524 V404"/>
75
77
  <path d="M1028 212 H1116 Q1124 212 1124 220 V308"/>
76
78
  </g>
77
- <path d="M500 356 H588 Q596 356 596 364 V452" fill="none" stroke="#1d4ed8" stroke-width="1.2" marker-end="url(#prompt-lifecycle-arrow-accent)"/>
78
- <rect x="604" y="400" width="72" height="16" rx="2" fill="#f0eee9"/>
79
- <text x="640" y="412" fill="#1d4ed8" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" text-anchor="middle" letter-spacing="0.8">CONTEXT</text>
79
+ <path d="M420 404 V476 Q420 484 428 484 H516" fill="none" stroke="#1d4ed8" stroke-width="1.2" marker-end="url(#prompt-lifecycle-arrow-accent)"/>
80
+ <rect x="432" y="460" width="72" height="16" rx="2" fill="#f0eee9"/>
81
+ <text x="468" y="472" fill="#1d4ed8" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" text-anchor="middle" letter-spacing="0.8">CONTEXT</text>
82
+ <g fill="#4c5665" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" text-anchor="middle">
83
+ <rect x="564" y="420" width="40" height="16" rx="2" fill="#f0eee9"/>
84
+ <text x="584" y="432">NULL</text>
85
+ <rect x="780" y="436" width="64" height="16" rx="2" fill="#f0eee9"/>
86
+ <text x="812" y="448">CANDIDATE</text>
87
+ <rect x="820" y="508" width="64" height="16" rx="2" fill="#f0eee9"/>
88
+ <text x="852" y="520">FAILURE</text>
89
+ </g>
80
90
 
81
91
  <!-- Nodes: name text remains 12px; technical text remains 8px. -->
82
92
  <g>
83
93
  <rect x="164" y="164" width="160" height="96" rx="8" fill="#f0eee9"/>
84
- <rect x="164" y="164" width="160" height="96" rx="8" fill="#4c5665" fill-opacity="0.10" stroke="#6a7282"/>
94
+ <rect x="164" y="164" width="160" height="96" rx="8" fill="#4c5665" stroke="#6a7282" fill-opacity="0.10"/>
85
95
  <rect x="176" y="176" width="32" height="16" rx="2" fill="#4c5665" fill-opacity="0.14"/>
86
96
  <text x="192" y="188" fill="#4c5665" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" font-weight="600" text-anchor="middle">YOU</text>
87
97
  <text x="244" y="212" fill="#101828" font-family="'Geist', system-ui, sans-serif" font-size="12" font-weight="600" text-anchor="middle">Conversation</text>
@@ -98,11 +108,11 @@
98
108
  </g>
99
109
  <g>
100
110
  <rect x="516" y="452" width="160" height="96" rx="8" fill="#f0eee9"/>
101
- <rect x="516" y="452" width="160" height="96" rx="8" fill="#1d4ed8" fill-opacity="0.08" stroke="#1d4ed8" stroke-width="1.2"/>
111
+ <rect x="516" y="452" width="160" height="96" rx="8" fill="#1d4ed8" stroke="#1d4ed8" stroke-width="1.2" fill-opacity="0.08"/>
102
112
  <rect x="528" y="464" width="32" height="16" rx="2" fill="#1d4ed8" fill-opacity="0.14"/>
103
113
  <text x="544" y="476" fill="#1d4ed8" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" font-weight="600" text-anchor="middle">CHD</text>
104
- <text x="596" y="500" fill="#101828" font-family="'Geist', system-ui, sans-serif" font-size="12" font-weight="600" text-anchor="middle">One-turn draft</text>
105
- <text x="596" y="520" fill="#4c5665" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" text-anchor="middle">tool-free · isolated</text>
114
+ <text x="596" y="500" fill="#101828" font-family="'Geist', system-ui, sans-serif" font-size="12" font-weight="600" text-anchor="middle">Draft child</text>
115
+ <text x="596" y="520" fill="#4c5665" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" text-anchor="middle">up to 3 turns · tool-free</text>
106
116
  <text x="596" y="536" fill="#6a7282" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" text-anchor="middle">candidate JSON | null</text>
107
117
  </g>
108
118
  <g>
@@ -115,7 +125,7 @@
115
125
  </g>
116
126
  <g>
117
127
  <rect x="868" y="164" width="160" height="96" rx="8" fill="#f0eee9"/>
118
- <rect x="868" y="164" width="160" height="96" rx="8" fill="#4c5665" fill-opacity="0.10" stroke="#6a7282"/>
128
+ <rect x="868" y="164" width="160" height="96" rx="8" fill="#4c5665" stroke="#6a7282" fill-opacity="0.10"/>
119
129
  <rect x="880" y="176" width="32" height="16" rx="2" fill="#4c5665" fill-opacity="0.14"/>
120
130
  <text x="896" y="188" fill="#4c5665" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" font-weight="600" text-anchor="middle">YOU</text>
121
131
  <text x="948" y="212" fill="#101828" font-family="'Geist', system-ui, sans-serif" font-size="12" font-weight="600" text-anchor="middle">Review with Main</text>
@@ -124,7 +134,7 @@
124
134
  </g>
125
135
  <g>
126
136
  <rect x="1044" y="308" width="160" height="96" rx="8" fill="#f0eee9"/>
127
- <rect x="1044" y="308" width="160" height="96" rx="8" fill="#101828" fill-opacity="0.05" stroke="#4c5665"/>
137
+ <rect x="1044" y="308" width="160" height="96" rx="8" fill="#101828" stroke="#4c5665" fill-opacity="0.05"/>
128
138
  <rect x="1056" y="320" width="32" height="16" rx="2" fill="#101828" fill-opacity="0.10"/>
129
139
  <text x="1072" y="332" fill="#4c5665" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" font-weight="600" text-anchor="middle">FILE</text>
130
140
  <text x="1124" y="356" fill="#101828" font-family="'Geist', system-ui, sans-serif" font-size="12" font-weight="600" text-anchor="middle">Saved prompt</text>
@@ -132,12 +142,29 @@
132
142
  <text x="1124" y="392" fill="#6a7282" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" text-anchor="middle">prompts/&lt;name&gt;.md · new file</text>
133
143
  </g>
134
144
 
145
+ <!-- Null and failure stop analysis without a candidate. -->
146
+ <g>
147
+ <rect x="516" y="308" width="160" height="96" rx="8" fill="#ffffff" stroke="#101828"/>
148
+ <rect x="528" y="320" width="32" height="16" rx="2" fill="#101828" fill-opacity="0.08"/>
149
+ <text x="544" y="332" fill="#101828" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" font-weight="600" text-anchor="middle">EXT</text>
150
+ <text x="596" y="356" fill="#101828" font-family="'Geist', system-ui, sans-serif" font-size="12" font-weight="600" text-anchor="middle">Clear widget</text>
151
+ <text x="596" y="376" fill="#4c5665" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" text-anchor="middle">no candidate</text>
152
+ </g>
153
+ <g>
154
+ <rect x="868" y="308" width="160" height="96" rx="8" fill="#ffffff" stroke="#101828"/>
155
+ <rect x="880" y="320" width="32" height="16" rx="2" fill="#101828" fill-opacity="0.08"/>
156
+ <text x="896" y="332" fill="#101828" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" font-weight="600" text-anchor="middle">EXT</text>
157
+ <text x="948" y="356" fill="#101828" font-family="'Geist', system-ui, sans-serif" font-size="12" font-weight="600" text-anchor="middle">Failure status</text>
158
+ <text x="948" y="376" fill="#4c5665" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" text-anchor="middle">Prompt analysis failed</text>
159
+ <text x="948" y="392" fill="#4c5665" font-family="'Geist Mono', ui-monospace, monospace" font-size="8" text-anchor="middle">— /promptor</text>
160
+ </g>
161
+
135
162
  <!-- Manual analysis skips WAIT, but does not skip review or approval. -->
136
163
  <text x="164" y="608" fill="#101828" font-family="'Geist', system-ui, sans-serif" font-size="12">Manual analysis displays its candidate immediately. Both paths require Main review and your approval before saving.</text>
137
164
  <text x="164" y="628" fill="#4c5665" font-family="'Geist Mono', ui-monospace, monospace" font-size="8">/promptor dismiss discards a pending automatic candidate. Saving never replaces an existing file.</text>
138
165
 
139
166
  <!-- Horizontal bottom legend; all content stays inside the 40px safe area. -->
140
- <line x1="40" y1="644" x2="1240" y2="644" stroke="#101828" stroke-opacity="0.14" stroke-width="0.8"/>
167
+ <line x1="40" y1="644" x2="1240" y2="644" stroke="#101828" stroke-width="0.8" stroke-opacity="0.14"/>
141
168
  <g fill="#4c5665" font-family="'Geist Mono', ui-monospace, monospace" font-size="8">
142
169
  <text x="40" y="672" letter-spacing="1.2">LEGEND</text>
143
170
  <path d="M144 668 H176" fill="none" stroke="#4c5665" marker-end="url(#prompt-lifecycle-arrow)"/>
@@ -146,7 +173,7 @@
146
173
  <text x="416" y="672">ISOLATED ANALYSIS</text>
147
174
  <path d="M596 668 H628" fill="none" stroke="#4c5665" stroke-dasharray="5,4" marker-end="url(#prompt-lifecycle-arrow)"/>
148
175
  <text x="640" y="672">WAIT FOR USER DISPLAY</text>
149
- <rect x="864" y="660" width="24" height="16" rx="2" fill="#101828" fill-opacity="0.05" stroke="#4c5665"/>
176
+ <rect x="864" y="660" width="24" height="16" rx="2" fill="#101828" stroke="#4c5665" fill-opacity="0.05"/>
150
177
  <text x="900" y="672">SAVED AFTER APPROVAL</text>
151
178
  </g>
152
179
  </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-prompt-creator",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "Turn current Pi conversation signals into user-approved prompt templates.",
5
5
  "keywords": [
6
6
  "pi-package",