@henryqw/pi-prompt-creator 3.1.6 → 3.2.0

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 (2) hide show
  1. package/README.md +31 -33
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,19 +1,17 @@
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 Prompt Candidate. Main and the user control Prompt Review and the save.
3
+ Turn repeated requests or corrections in the Current Conversation into a reviewed global Pi prompt. A child with no tools drafts one Prompt Candidate. Main and the user control Prompt Review and the save.
4
4
 
5
- Automatic analysis only prepares a candidate. The extension never saves it without your approval.
5
+ Automatic analysis only prepares a Prompt Candidate. The extension never saves it without your approval.
6
6
 
7
7
  ## Install
8
8
 
9
- This package requires Pi 1.1.0 or later in the 1.x series. Older Pi releases are no longer supported.
10
-
11
9
  ```bash
12
10
  pi install npm:@henryqw/pi-task-models
13
11
  pi install npm:@henryqw/pi-prompt-creator
14
12
  ```
15
13
 
16
- Run `/task-models` before analysis. Assign a model to `fast`, or override `pi-prompt-creator/draft`. Open `/task-models` again and verify the saved route or task assignment.
14
+ Run `/task-models` before analysis. Assign a model to `fast`, or override `pi-prompt-creator/draft`. Open `/task-models` again. Verify the saved route or task assignment.
17
15
 
18
16
  ## Works with
19
17
 
@@ -25,11 +23,11 @@ Run `/task-models` before analysis. Assign a model to `fast`, or override `pi-pr
25
23
 
26
24
  Run `/promptor` in the interactive TUI after a repeated request or correction appears:
27
25
 
28
- 1. Run `/promptor`. The completed candidate appears automatically.
29
- 2. Ask Main to refine it and return only the complete Final Prompt Draft.
30
- 3. Run `/promptor save` to save under the suggested name, or `/promptor save <name>` to rename it.
26
+ 1. Run `/promptor`. The completed Prompt Candidate appears automatically.
27
+ 2. Ask Main to refine it. Ask Main to return only the complete Final Prompt Draft.
28
+ 3. Run `/promptor save` to save under the suggested name. Alternatively, run `/promptor save <name>` to rename it.
31
29
 
32
- The prompt is created at `~/.pi/agent/prompts/<name>.md`. Then Pi reloads its resources. No selection menu or name prompt is required.
30
+ The extension creates the prompt at `~/.pi/agent/prompts/<name>.md`. Then Pi reloads its resources. You do not need a selection menu or name prompt.
33
31
 
34
32
  | Surface | Type | Purpose |
35
33
  | --- | --- | --- |
@@ -49,39 +47,39 @@ Automatic mode waits for the configured number of non-empty user inputs. The def
49
47
 
50
48
  It starts at the next idle `agent_settled` event that is not aborted. It starts at most one time per extension runtime.
51
49
 
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.
50
+ An aborted run does not start automatic analysis. It keeps the input count and permits later automatic analysis. A later normal settlement can start analysis if it meets the conditions. `aborted: false` does not prove that the provider completed successfully.
53
51
 
54
- Explicit `/promptor analyze` remains available after cancellation. A manual analysis consumes the automatic opportunity.
52
+ Explicit `/promptor analyze` remains available after cancellation. A manual analysis prevents later automatic analysis in that extension runtime.
55
53
 
56
- Branch changes reset the input counter. Automatic analysis and candidate widgets require the interactive TUI.
54
+ Branch changes reset the input counter. Automatic analysis and Prompt Candidate widgets require the interactive TUI.
57
55
 
58
- Only one analysis can run at a time. A pending candidate blocks another analysis.
56
+ Only one analysis can run at a time. A pending Prompt Candidate blocks another analysis.
59
57
 
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.
58
+ Manual and automatic analysis send Pi's current model-visible session context to the child model that you configure through `/task-models`. Analysis applies session context edits that omit or replace messages. It does not send original text that these edits removed from model context to the child. It does not include request-local `context` and `context_with_system` transformations.
61
59
 
62
- Its payload includes the active compaction or branch summary, user text, successfully completed assistant text, and effective prompt names and descriptions.
60
+ The payload includes the active compaction or branch summary, user text, successfully completed assistant text, and effective prompt names and descriptions.
63
61
 
64
- Project context files and prompt templates are disabled for the child. Tool traffic, thinking, images, custom messages, and inactive branches are excluded.
62
+ The extension disables project context files and prompt templates for the child. It excludes tool traffic, thinking, images, custom messages, and inactive branches.
65
63
 
66
- 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.
64
+ Analysis asks a child with no tools for one JSON response. The child has no user extensions, Skills, or saved session. The extension does not try failed analysis again.
67
65
 
68
66
  New user input does not stop a running child. Branch navigation discards its old result without stopping the child.
69
67
 
70
68
  ### Review and save
71
69
 
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.
70
+ A manually requested analysis displays its completed Prompt Candidate immediately. Automatic analysis shows a running widget. It then keeps a completed Prompt Candidate behind the `Prompt ready — /promptor` widget until you run `/promptor` or `/promptor dismiss`. Background work never interrupts the conversation.
73
71
 
74
- Displayed candidates are visible messages marked as untrusted.
72
+ The extension displays Prompt Candidates as visible messages that it marks as untrusted.
75
73
 
76
- Refine the candidate with Main. Ask Main to return only the complete Final Prompt Draft. Then save it with `/promptor save [name]`.
74
+ Refine the Prompt Candidate with Main. Ask Main to return only the complete Final Prompt Draft. Then save it with `/promptor save [name]`.
77
75
 
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.
76
+ You can save only after you show a Prompt Candidate and Main then completes a valid Markdown review reply. The save uses that latest retained Main reply as the entire file. You cannot save replies before the active compaction or branch summary.
79
77
 
80
- An interrupted, failed, empty, or tool-use reply cannot be saved. The extension never falls back to an older reply.
78
+ You cannot save an interrupted, failed, empty, or tool-use reply. The extension never uses an older reply instead.
81
79
 
82
- A successful save ends that review. Show another candidate and complete another Main review reply before you save again.
80
+ A successful save ends that Prompt Review. Show another Prompt Candidate. Complete another Main review reply before you save again.
83
81
 
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.
82
+ `/promptor save` uses the suggested Prompt 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. The extension rejects existing command names and prompt files.
85
83
 
86
84
  A successful save reloads Pi resources. If reload fails, the prompt remains saved and `/reload` can load it.
87
85
 
@@ -104,15 +102,15 @@ Edit either field. Then run `/reload` to apply the change. Omitted fields use th
104
102
 
105
103
  A missing file quietly uses both defaults. Startup never creates or rewrites the file.
106
104
 
107
- At session start, Pi shows a warning with the file path and each problem for an unknown key or an invalid value. Pi ignores the unknown key. A misspelled key near a missing field, such as `automatc`, counts as an invalid value of that field. An invalid `inputThreshold` uses the default `3`.
105
+ At session start, Pi shows a warning for an unknown key or an invalid value. The warning includes the file path and each problem. Pi ignores the unknown key. A misspelled key near a missing field, such as `automatc`, counts as an invalid value of that field. An invalid `inputThreshold` uses the default `3`.
108
106
 
109
- Automatic analysis stays off for the session when `automatic` is invalid or misspelled, or when the file has malformed JSON, invalid UTF-8, more than 64 KiB, a read error, or a non-object root. Startup leaves the file unchanged.
107
+ Automatic analysis stays off for the session when `automatic` is invalid or misspelled. It also stays off when the file has malformed JSON, invalid UTF-8, more than 64 KiB, a read error, or a non-object root. Startup leaves the file unchanged.
110
108
 
111
- Only `/promptor automatic on` or `/promptor automatic off` writes the config. A toggle reads the file again and keeps its current `inputThreshold`, also when another session changed it. A toggle also replaces a file with problems: it first shows the problems, then keeps the usable values and removes unknown keys. If another session changes that file before the write, the toggle stops and writes nothing.
109
+ Only `/promptor automatic on` or `/promptor automatic off` writes the config. A toggle reads the file again and keeps its current `inputThreshold`, also when another session changed it. A toggle also replaces a file with problems. It first shows the problems, then keeps the usable values and removes unknown keys. If another session changes that file before the write, the toggle stops and writes nothing.
112
110
 
113
111
  ## State and storage
114
112
 
115
- A pending candidate stays in memory only. Automatic mode persists, but counters and candidates do not.
113
+ A pending Prompt Candidate stays in memory only. The extension saves automatic mode, but not counters or Prompt Candidates.
116
114
 
117
115
  Saved prompts are at `~/.pi/agent/prompts/<name>.md`. A save never replaces an existing file.
118
116
 
@@ -122,15 +120,15 @@ The child payload stays within 30,000 characters, including its JSON envelope an
122
120
 
123
121
  It gives priority to the active summary, then to the newest complete messages. It omits excess prompt metadata before conversation context.
124
122
 
125
- Old messages can be omitted. Individual messages are never cut.
123
+ Analysis can omit old messages. It never cuts individual messages.
126
124
 
127
- Generated candidate names use lowercase kebab-case and stay within 64 ASCII characters.
125
+ Generated Prompt Candidate names use lowercase kebab-case and stay within 64 ASCII characters.
128
126
 
129
- Candidate and Final Prompt Draft Markdown must be non-empty and at most 16 KiB.
127
+ Prompt Candidate and Final Prompt Draft Markdown must be non-empty and at most 16 KiB.
130
128
 
131
- Candidate and saved Markdown reject NUL and other terminal controls. Ordinary tabs and line feeds are allowed.
129
+ The extension rejects NUL and other terminal controls in Prompt Candidate and saved Markdown. It permits ordinary tabs and line feeds.
132
130
 
133
- 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.
131
+ If analysis finds no Prompt Candidate, the running widget clears without a notice. Invalid output or child failure shows `Prompt analysis failed — /promptor`. The extension does not automatically try failed analysis again. Run `/promptor` or `/promptor analyze` to start again.
134
132
 
135
133
  The failure widget clears after the next non-empty user input. Analysis has a two-minute idle timeout and five-minute hard timeout.
136
134
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-prompt-creator",
3
- "version": "3.1.6",
3
+ "version": "3.2.0",
4
4
  "description": "Turn current Pi conversation signals into user-approved prompt templates.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -26,7 +26,7 @@
26
26
  "pack:check": "npm pack --dry-run"
27
27
  },
28
28
  "peerDependencies": {
29
- "@earendil-works/pi-coding-agent": "^1.1.0"
29
+ "@earendil-works/pi-coding-agent": "^1.3.0"
30
30
  },
31
31
  "repository": {
32
32
  "type": "git",
@@ -50,6 +50,6 @@
50
50
  "@henryqw/pi-task-models": "^9.0.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@earendil-works/pi-coding-agent": "1.1.0"
53
+ "@earendil-works/pi-coding-agent": "1.3.0"
54
54
  }
55
55
  }