@henryqw/pi-prompt-creator 1.0.3 → 1.0.4
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 +51 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
# `@henryqw/pi-prompt-creator`
|
|
2
2
|
|
|
3
|
-
Turn repeated requests or corrections in the current conversation into a reviewed global Pi prompt.
|
|
3
|
+
Turn repeated requests or corrections in the current conversation into a reviewed global Pi prompt. A tool-free child drafts one candidate, while Main and the user control review and saving.
|
|
4
4
|
|
|
5
5
|
Nothing is shown or saved until you choose it.
|
|
6
6
|
|
|
7
|
-
## Why
|
|
8
|
-
|
|
9
|
-
- **Created for**: Pi users who notice the same instruction or correction returning in one conversation.
|
|
10
|
-
- **Advantage**: A tool-free child drafts one candidate, while Main and the user control review and saving.
|
|
11
|
-
|
|
12
7
|
## Install
|
|
13
8
|
|
|
14
9
|
```bash
|
|
@@ -18,17 +13,13 @@ pi install npm:@henryqw/pi-prompt-creator
|
|
|
18
13
|
|
|
19
14
|
Run `/task-models` before analysis. Assign a model to `fast`, or override `pi-prompt-creator/draft`.
|
|
20
15
|
|
|
21
|
-
##
|
|
16
|
+
## Works with
|
|
22
17
|
|
|
23
|
-
[`@henryqw/pi-task-models`](https://pi.henry.wang/extensions/pi-task-models)
|
|
18
|
+
**Required.** [`@henryqw/pi-task-models`](https://pi.henry.wang/extensions/pi-task-models) provides the isolated draft model route.
|
|
24
19
|
|
|
25
20
|
## Use
|
|
26
21
|
|
|
27
|
-
Run `/promptor` in the interactive TUI
|
|
28
|
-
|
|
29
|
-
### First prompt
|
|
30
|
-
|
|
31
|
-
After a repeated request or correction appears in the conversation:
|
|
22
|
+
Run `/promptor` in the interactive TUI after a repeated request or correction appears:
|
|
32
23
|
|
|
33
24
|
1. Choose `Analyze now`. Wait for the `Prompt ready — /promptor` widget.
|
|
34
25
|
2. Run `/promptor` again and choose `Show candidate`.
|
|
@@ -47,12 +38,54 @@ The menu adapts to the current state:
|
|
|
47
38
|
| `Dismiss candidate` | Forget the pending candidate. |
|
|
48
39
|
| `Save latest Main draft` | Save Main's newest completed review reply after you show a candidate. |
|
|
49
40
|
|
|
41
|
+
## Flow
|
|
42
|
+
|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
### Automatic analysis
|
|
46
|
+
|
|
47
|
+
Automatic mode waits for the configured number of non-empty user inputs. The default is three.
|
|
48
|
+
|
|
49
|
+
It starts at the next idle `agent_settled` event. It starts at most once per extension runtime.
|
|
50
|
+
|
|
51
|
+
A manual analysis consumes that opportunity.
|
|
52
|
+
|
|
53
|
+
Branch changes reset the input counter. Automatic analysis and candidate widgets require the interactive TUI.
|
|
54
|
+
|
|
50
55
|
Only one analysis can run at a time. A pending candidate blocks another analysis.
|
|
51
56
|
|
|
52
57
|
Analysis asks a tool-free child for one JSON response. It has no user extensions, Skills, or saved session. The extension does not retry failed analysis.
|
|
53
58
|
|
|
54
59
|
New user input does not stop a running child. Branch navigation discards its old result without stopping the child.
|
|
55
60
|
|
|
61
|
+
### Review and save
|
|
62
|
+
|
|
63
|
+
The widget shows `Prompt ready — /promptor` until you show or dismiss the completed candidate.
|
|
64
|
+
|
|
65
|
+
The extension never injects a candidate automatically. `Show candidate` adds one visible message and marks its contents as untrusted.
|
|
66
|
+
|
|
67
|
+
Refine the candidate with Main. Ask Main to return only the complete Final Prompt Draft before saving.
|
|
68
|
+
|
|
69
|
+
The save item appears only after you show a candidate and Main then completes a valid Markdown review reply.
|
|
70
|
+
|
|
71
|
+
Saving uses that latest retained Main reply as the entire file. Replies before the active compaction or branch summary cannot be saved.
|
|
72
|
+
|
|
73
|
+
An interrupted, failed, empty, or tool-use reply cannot be saved. The extension never falls back to an older reply.
|
|
74
|
+
|
|
75
|
+
A successful save ends that review. Show another candidate and complete another Main review reply before saving again.
|
|
76
|
+
|
|
77
|
+
The menu asks for a lowercase kebab-case name. A candidate name appears only as a hint.
|
|
78
|
+
|
|
79
|
+
Names start with a letter and contain at most 64 ASCII characters. Existing command names and prompt files are rejected.
|
|
80
|
+
|
|
81
|
+
A successful save reloads Pi resources. If reload fails, the prompt remains saved and `/reload` can load it.
|
|
82
|
+
|
|
83
|
+
### Model routing
|
|
84
|
+
|
|
85
|
+
The extension registers `pi-prompt-creator/draft`. Its default task profile is `fast`.
|
|
86
|
+
|
|
87
|
+
Use `/task-models` to select the model and thinking level. The extension owns no model configuration.
|
|
88
|
+
|
|
56
89
|
## Config
|
|
57
90
|
|
|
58
91
|
`~/.pi/agent/config/pi-prompt-creator/config.json`
|
|
@@ -70,11 +103,13 @@ Malformed config or unknown keys disable automatic analysis. Pi warns once and l
|
|
|
70
103
|
|
|
71
104
|
Only `Automatic On` or `Automatic Off` writes the config. Toggling preserves the configured threshold.
|
|
72
105
|
|
|
73
|
-
##
|
|
106
|
+
## State and storage
|
|
74
107
|
|
|
75
|
-
|
|
108
|
+
A pending candidate stays in memory only. Automatic mode persists, but counters and candidates do not.
|
|
109
|
+
|
|
110
|
+
Saved prompts live at `~/.pi/agent/prompts/<name>.md`. Saving never replaces an existing file.
|
|
76
111
|
|
|
77
|
-
##
|
|
112
|
+
## Data, cost, and privacy
|
|
78
113
|
|
|
79
114
|
Automatic analysis is on by default. It sends the current conversation to the child model configured through `/task-models`.
|
|
80
115
|
|