@henryqw/pi-prompt-creator 3.1.2 → 3.1.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 +19 -19
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# `@henryqw/pi-prompt-creator`
|
|
2
2
|
|
|
3
|
-
Turn repeated requests or corrections in the current conversation into a reviewed global Pi prompt. A tool-free child drafts one
|
|
3
|
+
Turn repeated requests or corrections in the current conversation into a reviewed global Pi prompt. A tool-free child drafts one Prompt Candidate. Main and the user control Prompt Review and the save.
|
|
4
4
|
|
|
5
|
-
Automatic analysis only prepares a candidate
|
|
5
|
+
Automatic analysis only prepares a candidate. The extension never saves it without your approval.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This package requires Pi 1.1.0 or later in the 1.x series. Older Pi releases are no longer supported.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
pi install npm:@henryqw/pi-task-models
|
|
@@ -29,25 +29,25 @@ Run `/promptor` in the interactive TUI after a repeated request or correction ap
|
|
|
29
29
|
2. Ask Main to refine it and return only the complete Final Prompt Draft.
|
|
30
30
|
3. Run `/promptor save` to save under the suggested name, or `/promptor save <name>` to rename it.
|
|
31
31
|
|
|
32
|
-
The prompt is created at `~/.pi/agent/prompts/<name>.md
|
|
32
|
+
The prompt is created at `~/.pi/agent/prompts/<name>.md`. Then Pi reloads its resources. No selection menu or name prompt is required.
|
|
33
33
|
|
|
34
34
|
| Surface | Type | Purpose |
|
|
35
35
|
| --- | --- | --- |
|
|
36
36
|
| `/promptor [analyze|dismiss|save [name]|automatic <on\|off>]` | command | For users in the interactive TUI: start or show analysis, dismiss a pending candidate, save a reviewed prompt, or control automatic analysis. |
|
|
37
|
-
| `pi-prompt-creator/draft` | task | For users
|
|
38
|
-
| Analysis status widget and candidate message | ui | Show analysis progress, readiness, or failure
|
|
37
|
+
| `pi-prompt-creator/draft` | task | For users who configure `/task-models`: choose the child model and thinking level for the draft. |
|
|
38
|
+
| Analysis status widget and candidate message | ui | Show analysis progress, readiness, or failure. A displayed candidate is marked as untrusted. |
|
|
39
39
|
|
|
40
40
|
## Flow
|
|
41
41
|
|
|
42
42
|

|
|
43
43
|
|
|
44
|
-
The diagram shows the automatic path. Manual analysis displays its candidate immediately, without the WAIT stage. Both paths require Main review and your approval before
|
|
44
|
+
The diagram shows the automatic path. Manual analysis displays its candidate immediately, without the WAIT stage. Both paths require Main review and your approval before the save.
|
|
45
45
|
|
|
46
46
|
### Automatic analysis
|
|
47
47
|
|
|
48
48
|
Automatic mode waits for the configured number of non-empty user inputs. The default is three.
|
|
49
49
|
|
|
50
|
-
It starts at the next idle `agent_settled` event that is not aborted. It starts at most
|
|
50
|
+
It starts at the next idle `agent_settled` event that is not aborted. It starts at most one time per extension runtime.
|
|
51
51
|
|
|
52
52
|
An aborted run does not start automatic analysis. It keeps the input count and the automatic opportunity, so a later eligible normal settlement can start analysis. `aborted: false` does not prove that the provider completed successfully.
|
|
53
53
|
|
|
@@ -57,7 +57,7 @@ Branch changes reset the input counter. Automatic analysis and candidate widgets
|
|
|
57
57
|
|
|
58
58
|
Only one analysis can run at a time. A pending candidate blocks another analysis.
|
|
59
59
|
|
|
60
|
-
Manual and automatic analysis send Pi's current model-visible session context to the child model configured through `/task-models`. Session context edits that omit or replace messages are honored
|
|
60
|
+
Manual and automatic analysis send Pi's current model-visible session context to the child model configured through `/task-models`. Session context edits that omit or replace messages are honored. Original text removed from model context is not sent to the child. Request-local `context` and `context_with_system` transformations are not included.
|
|
61
61
|
|
|
62
62
|
Its payload includes the active compaction or branch summary, user text, successfully completed assistant text, and effective prompt names and descriptions.
|
|
63
63
|
|
|
@@ -69,17 +69,17 @@ New user input does not stop a running child. Branch navigation discards its old
|
|
|
69
69
|
|
|
70
70
|
### Review and save
|
|
71
71
|
|
|
72
|
-
A manually requested analysis displays its completed candidate immediately. Automatic analysis shows a running widget
|
|
72
|
+
A manually requested analysis displays its completed candidate immediately. Automatic analysis shows a running widget. Then it keeps a completed candidate behind the `Prompt ready — /promptor` widget until you run `/promptor` or `/promptor dismiss`. Thus, background work never interrupts the conversation.
|
|
73
73
|
|
|
74
74
|
Displayed candidates are visible messages marked as untrusted.
|
|
75
75
|
|
|
76
|
-
Refine the candidate with Main. Ask Main to return only the complete Final Prompt Draft
|
|
76
|
+
Refine the candidate with Main. Ask Main to return only the complete Final Prompt Draft. Then save it with `/promptor save [name]`.
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
You can save only after you show a candidate and Main then completes a valid Markdown review reply. The save uses that latest retained Main reply as the entire file. Replies before the active compaction or branch summary cannot be saved.
|
|
79
79
|
|
|
80
80
|
An interrupted, failed, empty, or tool-use reply cannot be saved. The extension never falls back to an older reply.
|
|
81
81
|
|
|
82
|
-
A successful save ends that review. Show another candidate and complete another Main review reply before
|
|
82
|
+
A successful save ends that review. Show another candidate and complete another Main review reply before you save again.
|
|
83
83
|
|
|
84
84
|
`/promptor save` uses the suggested candidate name. Pass `/promptor save <name>` to choose another. Names must be lowercase kebab-case, start with a letter, and contain at most 64 ASCII characters. Existing command names and prompt files are rejected.
|
|
85
85
|
|
|
@@ -100,27 +100,27 @@ Package-owned: `~/.pi/agent/config/pi-prompt-creator/config.json`
|
|
|
100
100
|
| `automatic` | Runs automatic analysis after enough user inputs. | Boolean. | `true` |
|
|
101
101
|
| `inputThreshold` | Sets the number of non-empty user inputs before automatic analysis. | Positive safe integer (`1`–`9007199254740991`). | `3` |
|
|
102
102
|
|
|
103
|
-
Edit either field
|
|
103
|
+
Edit either field. Then run `/reload` to apply the change. Omitted fields use their defaults.
|
|
104
104
|
|
|
105
105
|
A missing file quietly uses both defaults. Startup never creates or rewrites the file.
|
|
106
106
|
|
|
107
107
|
Malformed config or unknown keys disable automatic analysis. Pi warns once and leaves the file unchanged.
|
|
108
108
|
|
|
109
|
-
Only `/promptor automatic on` or `/promptor automatic off` writes the config.
|
|
109
|
+
Only `/promptor automatic on` or `/promptor automatic off` writes the config. A toggle keeps the configured threshold.
|
|
110
110
|
|
|
111
111
|
## State and storage
|
|
112
112
|
|
|
113
113
|
A pending candidate stays in memory only. Automatic mode persists, but counters and candidates do not.
|
|
114
114
|
|
|
115
|
-
Saved prompts
|
|
115
|
+
Saved prompts are at `~/.pi/agent/prompts/<name>.md`. A save never replaces an existing file.
|
|
116
116
|
|
|
117
117
|
## Limits and recovery
|
|
118
118
|
|
|
119
119
|
The child payload stays within 30,000 characters, including its JSON envelope and prompt metadata.
|
|
120
120
|
|
|
121
|
-
It
|
|
121
|
+
It gives priority to the active summary, then to the newest complete messages. It omits excess prompt metadata before conversation context.
|
|
122
122
|
|
|
123
|
-
Old messages
|
|
123
|
+
Old messages can be omitted. Individual messages are never cut.
|
|
124
124
|
|
|
125
125
|
Generated candidate names use lowercase kebab-case and stay within 64 ASCII characters.
|
|
126
126
|
|
|
@@ -128,7 +128,7 @@ Candidate and Final Prompt Draft Markdown must be non-empty and at most 16 KiB.
|
|
|
128
128
|
|
|
129
129
|
Candidate and saved Markdown reject NUL and other terminal controls. Ordinary tabs and line feeds are allowed.
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
If analysis finds no candidate, the running widget clears without a notice. Invalid output or child failure shows `Prompt analysis failed — /promptor`. Failed analysis is not retried automatically. Run `/promptor` or `/promptor analyze` to start again.
|
|
132
132
|
|
|
133
133
|
The failure widget clears after the next non-empty user input. Analysis has a two-minute idle timeout and five-minute hard timeout.
|
|
134
134
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henryqw/pi-prompt-creator",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"description": "Turn current Pi conversation signals into user-approved prompt templates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@henryqw/pi-config-store": "^3.0.0",
|
|
49
|
-
"@henryqw/pi-subagent": "^22.0.0 || ^23.0.0 || ^24.0.0 || ^25.0.0 || ^26.0.0",
|
|
49
|
+
"@henryqw/pi-subagent": "^22.0.0 || ^23.0.0 || ^24.0.0 || ^25.0.0 || ^26.0.0 || ^27.0.0",
|
|
50
50
|
"@henryqw/pi-task-models": "^8.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|