pupt 1.2.0 → 1.3.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 (173) hide show
  1. package/README.md +42 -489
  2. package/dist/annotations/annotation-analyzer.js +5 -5
  3. package/dist/annotations/annotation-analyzer.js.map +1 -1
  4. package/dist/cli.js +11 -50
  5. package/dist/cli.js.map +1 -1
  6. package/dist/commands/add.js +5 -5
  7. package/dist/commands/add.js.map +1 -1
  8. package/dist/commands/annotate.d.ts.map +1 -1
  9. package/dist/commands/annotate.js +8 -132
  10. package/dist/commands/annotate.js.map +1 -1
  11. package/dist/commands/history.d.ts +1 -0
  12. package/dist/commands/history.d.ts.map +1 -1
  13. package/dist/commands/history.js +50 -0
  14. package/dist/commands/history.js.map +1 -1
  15. package/dist/commands/init-refactored.d.ts.map +1 -1
  16. package/dist/commands/init-refactored.js +2 -1
  17. package/dist/commands/init-refactored.js.map +1 -1
  18. package/dist/commands/init.d.ts.map +1 -1
  19. package/dist/commands/init.js +44 -0
  20. package/dist/commands/init.js.map +1 -1
  21. package/dist/commands/install.d.ts.map +1 -1
  22. package/dist/commands/install.js +124 -29
  23. package/dist/commands/install.js.map +1 -1
  24. package/dist/commands/run.d.ts +2 -0
  25. package/dist/commands/run.d.ts.map +1 -1
  26. package/dist/commands/run.js +125 -46
  27. package/dist/commands/run.js.map +1 -1
  28. package/dist/config/config-manager.d.ts +2 -1
  29. package/dist/config/config-manager.d.ts.map +1 -1
  30. package/dist/config/config-manager.js +12 -1
  31. package/dist/config/config-manager.js.map +1 -1
  32. package/dist/config/migration.d.ts +2 -1
  33. package/dist/config/migration.d.ts.map +1 -1
  34. package/dist/config/migration.js +1 -18
  35. package/dist/config/migration.js.map +1 -1
  36. package/dist/history/enhanced-history-manager.d.ts +3 -1
  37. package/dist/history/enhanced-history-manager.d.ts.map +1 -1
  38. package/dist/history/enhanced-history-manager.js +29 -2
  39. package/dist/history/enhanced-history-manager.js.map +1 -1
  40. package/dist/history/history-manager.d.ts +3 -1
  41. package/dist/history/history-manager.d.ts.map +1 -1
  42. package/dist/history/history-manager.js +36 -13
  43. package/dist/history/history-manager.js.map +1 -1
  44. package/dist/prompts/input-types/file-prompt.d.ts +2 -2
  45. package/dist/prompts/input-types/file-prompt.d.ts.map +1 -1
  46. package/dist/prompts/input-types/file-prompt.js +0 -1
  47. package/dist/prompts/input-types/file-prompt.js.map +1 -1
  48. package/dist/prompts/input-types/file-search-prompt.d.ts +0 -1
  49. package/dist/prompts/input-types/file-search-prompt.d.ts.map +1 -1
  50. package/dist/prompts/input-types/file-search-prompt.js +0 -1
  51. package/dist/prompts/input-types/file-search-prompt.js.map +1 -1
  52. package/dist/prompts/input-types/review-file-prompt.d.ts +0 -1
  53. package/dist/prompts/input-types/review-file-prompt.d.ts.map +1 -1
  54. package/dist/prompts/input-types/review-file-prompt.js +1 -2
  55. package/dist/prompts/input-types/review-file-prompt.js.map +1 -1
  56. package/dist/prompts/prompt-manager.js +3 -3
  57. package/dist/prompts/prompt-manager.js.map +1 -1
  58. package/dist/pupt-1.3.0.tgz +0 -0
  59. package/dist/schemas/config-schema.d.ts +18 -578
  60. package/dist/schemas/config-schema.d.ts.map +1 -1
  61. package/dist/schemas/config-schema.js +6 -12
  62. package/dist/schemas/config-schema.js.map +1 -1
  63. package/dist/schemas/prompt-schema.d.ts +16 -23
  64. package/dist/schemas/prompt-schema.d.ts.map +1 -1
  65. package/dist/scripts/migrate-annotations.d.ts +11 -0
  66. package/dist/scripts/migrate-annotations.d.ts.map +1 -0
  67. package/dist/scripts/migrate-annotations.js +108 -0
  68. package/dist/scripts/migrate-annotations.js.map +1 -0
  69. package/dist/search/file-search-engine.d.ts +3 -2
  70. package/dist/search/file-search-engine.d.ts.map +1 -1
  71. package/dist/search/search-engine.js +7 -7
  72. package/dist/search/search-engine.js.map +1 -1
  73. package/dist/services/auto-annotation-service.d.ts +5 -4
  74. package/dist/services/auto-annotation-service.d.ts.map +1 -1
  75. package/dist/services/auto-annotation-service.js +332 -96
  76. package/dist/services/auto-annotation-service.js.map +1 -1
  77. package/dist/services/file-system-service.d.ts +5 -4
  78. package/dist/services/file-system-service.d.ts.map +1 -1
  79. package/dist/services/git-service.d.ts +3 -2
  80. package/dist/services/git-service.d.ts.map +1 -1
  81. package/dist/services/logging-service.d.ts +2 -3
  82. package/dist/services/logging-service.d.ts.map +1 -1
  83. package/dist/services/logging-service.js +2 -2
  84. package/dist/services/logging-service.js.map +1 -1
  85. package/dist/services/output-capture-service.d.ts +6 -3
  86. package/dist/services/output-capture-service.d.ts.map +1 -1
  87. package/dist/services/output-capture-service.js +133 -67
  88. package/dist/services/output-capture-service.js.map +1 -1
  89. package/dist/services/prompt-service.d.ts +4 -3
  90. package/dist/services/prompt-service.d.ts.map +1 -1
  91. package/dist/services/prompt-service.js +11 -11
  92. package/dist/services/prompt-service.js.map +1 -1
  93. package/dist/services/review-data-builder.d.ts.map +1 -1
  94. package/dist/services/review-data-builder.js +70 -12
  95. package/dist/services/review-data-builder.js.map +1 -1
  96. package/dist/services/ui-service.d.ts +3 -3
  97. package/dist/services/ui-service.d.ts.map +1 -1
  98. package/dist/services/ui-service.js +2 -2
  99. package/dist/services/ui-service.js.map +1 -1
  100. package/dist/template/helpers/index.d.ts.map +1 -1
  101. package/dist/template/helpers/index.js +26 -2
  102. package/dist/template/helpers/index.js.map +1 -1
  103. package/dist/template/template-context.d.ts +7 -1
  104. package/dist/template/template-context.d.ts.map +1 -1
  105. package/dist/template/template-context.js +17 -1
  106. package/dist/template/template-context.js.map +1 -1
  107. package/dist/template/template-engine.d.ts +2 -1
  108. package/dist/template/template-engine.d.ts.map +1 -1
  109. package/dist/template/template-engine.js +4 -2
  110. package/dist/template/template-engine.js.map +1 -1
  111. package/dist/types/annotations.d.ts +1 -0
  112. package/dist/types/annotations.d.ts.map +1 -1
  113. package/dist/types/config.d.ts +5 -10
  114. package/dist/types/config.d.ts.map +1 -1
  115. package/dist/types/config.js.map +1 -1
  116. package/dist/types/history.d.ts +3 -0
  117. package/dist/types/history.d.ts.map +1 -1
  118. package/dist/types/patterns.d.ts +2 -1
  119. package/dist/types/patterns.d.ts.map +1 -1
  120. package/dist/types/prompt.d.ts +1 -1
  121. package/dist/types/prompt.d.ts.map +1 -1
  122. package/dist/types/review.d.ts +8 -3
  123. package/dist/types/review.d.ts.map +1 -1
  124. package/dist/ui/console-ui.d.ts +2 -2
  125. package/dist/ui/console-ui.d.ts.map +1 -1
  126. package/dist/ui/console-ui.js +0 -1
  127. package/dist/ui/console-ui.js.map +1 -1
  128. package/dist/ui/interactive-search.js +2 -2
  129. package/dist/ui/interactive-search.js.map +1 -1
  130. package/dist/utils/annotation-migration.d.ts +12 -0
  131. package/dist/utils/annotation-migration.d.ts.map +1 -0
  132. package/dist/utils/annotation-migration.js +103 -0
  133. package/dist/utils/annotation-migration.js.map +1 -0
  134. package/dist/utils/editor.d.ts +2 -1
  135. package/dist/utils/editor.d.ts.map +1 -1
  136. package/dist/utils/errors.d.ts +4 -2
  137. package/dist/utils/errors.d.ts.map +1 -1
  138. package/dist/utils/errors.js +12 -1
  139. package/dist/utils/errors.js.map +1 -1
  140. package/dist/utils/file-utils.d.ts +3 -4
  141. package/dist/utils/file-utils.d.ts.map +1 -1
  142. package/dist/utils/file-utils.js +2 -2
  143. package/dist/utils/file-utils.js.map +1 -1
  144. package/dist/utils/git-info.d.ts +2 -1
  145. package/dist/utils/git-info.d.ts.map +1 -1
  146. package/dist/utils/gitignore.js +5 -5
  147. package/dist/utils/gitignore.js.map +1 -1
  148. package/dist/utils/platform.js +3 -3
  149. package/dist/utils/platform.js.map +1 -1
  150. package/dist/utils/tool-detection.d.ts +2 -1
  151. package/dist/utils/tool-detection.d.ts.map +1 -1
  152. package/dist/utils/trie.d.ts +2 -1
  153. package/dist/utils/trie.d.ts.map +1 -1
  154. package/package.json +14 -9
  155. package/prompts/ad-hoc-long.md +52 -0
  156. package/prompts/ad-hoc.md +23 -0
  157. package/prompts/add-summary.md +42 -0
  158. package/prompts/analyze-execution.md +181 -0
  159. package/prompts/code-review.md +97 -0
  160. package/prompts/debugging-error-message.md +75 -0
  161. package/prompts/fix-github-actions.md +55 -0
  162. package/prompts/fix-test-errors.md +66 -0
  163. package/prompts/git-commit-comment.md +54 -0
  164. package/prompts/implementation-phase.md +46 -0
  165. package/prompts/implementation-plan.md +87 -0
  166. package/prompts/new-feature.md +80 -0
  167. package/prompts/new-project.md +11 -0
  168. package/prompts/one-shot-change.md +71 -0
  169. package/prompts/pupt-prompt-improvement.md +264 -0
  170. package/prompts/simple-test.md +11 -0
  171. package/prompts/update-design.md +68 -0
  172. package/prompts/update-documentation.md +8 -0
  173. package/dist/pupt-1.2.0.tgz +0 -0
package/README.md CHANGED
@@ -1,516 +1,69 @@
1
- # Prompt Tool (pt)
1
+ [![Build Status](https://github.com/apowers313/pupt/workflows/CI/badge.svg)](https://github.com/apowers313/pupt/actions)
2
+ [![npm version](https://badge.fury.io/js/pupt.svg)](https://www.npmjs.com/package/pupt)
3
+ [![Documentation](https://img.shields.io/badge/docs-view-blue)](https://apowers313.github.io/pupt/)
4
+ [![Coverage Status](https://coveralls.io/repos/github/apowers313/pupt/badge.svg?branch=master)](https://coveralls.io/github/apowers313/pupt?branch=master)
2
5
 
3
- A powerful CLI tool for managing and using AI prompts with template support.
6
+ # PUPT (Powerful Universal Prompt Tool)
7
+
8
+ <div align="center">
9
+ <img src="./assets/pupt.png" alt="PUPT Logo" width="200">
10
+
11
+ # PUPT
12
+ **Your Faithful Prompt Companion**
13
+ </div>
14
+
15
+ A powerful CLI tool for managing and using AI prompts with template support, designed to be your faithful prompt companion.
4
16
 
5
17
  ## Features
6
18
 
7
- - 🔍 **Interactive Search** - Quickly find prompts with fuzzy search
19
+ - ✏️ **Prompt Management** - Create, edit, and organize prompts easily
8
20
  - 📝 **Template Support** - Use Handlebars templates with user input
9
- - 📁 **Multi-directory Support** - Organize prompts across multiple directories
21
+ - 🔍 **Interactive Search** - Quickly find prompts with fuzzy search
10
22
  - 🔧 **Cross-platform** - Works on Windows, macOS, and Linux
23
+ - 🚀 **Tool Integration** - Run prompts with Claude Code, Amazon Q, or any command line tool
11
24
  - 📊 **History Tracking** - Keep track of generated prompts and re-run them
12
- - 🎯 **Variable Definitions** - Define variables with types and validation
13
- - 🚀 **External Tool Integration** - Run prompts with any command-line tool
14
- - ✏️ **Prompt Management** - Create, edit, and organize prompts easily
25
+ - 📊 **Output Capture** - Capture and save command outputs (configurable)
15
26
  - 🏷️ **Annotations** - Add notes and tags to your prompt history
16
- - **Enhanced Error Messages** - Helpful suggestions and clear guidance
17
-
18
- ## Installation
19
-
20
- ```bash
21
- npm install -g cli-prompt-tool
22
- ```
27
+ - 🤖 **Auto-annotation** - Automatically analyze and annotate prompt executions
28
+ - 📋 **Review Command** - Analyze prompt usage patterns and generate improvement suggestions
29
+ - 📦 **Install Prompts** - Install and share prompts from git or npm
23
30
 
24
31
  ## Quick Start
25
32
 
26
- 1. Initialize your configuration:
27
-
28
33
  ```bash
29
- pt init
30
- ```
34
+ # Install globally
35
+ npm install -g pupt
31
36
 
32
- 2. Create your first prompt:
37
+ # Initialize configuration
38
+ pt init
33
39
 
34
- ```bash
40
+ # Create your first prompt
35
41
  pt add
36
- ```
37
42
 
38
- 3. Run the tool:
39
-
40
- ```bash
43
+ # Run the tool
41
44
  pt
42
45
  ```
43
46
 
44
- ## Commands
45
-
46
- ### `pt`
47
- Interactive prompt selection and generation. This is the default command that lets you:
48
- - Search through all your prompts with fuzzy search
49
- - Preview prompt content before selection
50
- - Fill in template variables interactively
51
- - View the generated result
52
-
53
- ### `pt init`
54
- Initialize configuration interactively. Sets up:
55
- - Prompt directories
56
- - History tracking (optional)
57
- - Annotation support (optional)
58
- - Default coding tool configuration
59
-
60
- ### `pt add`
61
- Create a new prompt interactively. Features:
62
- - Guided prompt creation with metadata
63
- - Automatic author detection from git
64
- - Label/tag support
65
- - Opens in your editor automatically
66
-
67
- ### `pt edit`
68
- Edit existing prompts in your configured editor. Features:
69
- - Interactive prompt selection
70
- - Automatic editor detection ($VISUAL or $EDITOR)
71
- - Fallback to common editors if not configured
72
-
73
- ### `pt run [tool] [args...]`
74
- Execute prompts with external tools. Examples:
75
- ```bash
76
- pt run # Use configured default tool
77
- pt run claude # Send to Claude
78
- pt run code - # Open in VS Code
79
- pt run cat # Output to terminal
80
- pt run -- --continue # Pass args to configured tool
81
- pt run -h 3 # Re-run history entry #3
82
- ```
83
-
84
- ### `pt history [options]`
85
- View prompt execution history. Options:
86
- - `-l, --limit <number>` - Number of entries to show (default: 20)
87
- - `-a, --all` - Show all history entries
88
-
89
- ### `pt annotate [history-number]`
90
- Add notes to history entries. Features:
91
- - Mark prompts as success/failure/partial
92
- - Add searchable tags
93
- - Write detailed notes in your editor
94
- - Multiple annotations per history entry
95
-
96
- ### `pt example`
97
- Generate an example prompt file to help you get started.
47
+ ## Documentation
98
48
 
99
- ## Prompt Files
49
+ For comprehensive documentation, tutorials, and examples, visit our documentation site:
100
50
 
101
- ### What is a Prompt File?
51
+ **📚 [View Full Documentation](https://apowers313.github.io/pupt/)**
102
52
 
103
- A prompt file is a markdown file that serves as a template for generating AI prompts. These files can contain:
104
- - Static text that appears in every generated prompt
105
- - Dynamic content using Handlebars template syntax
106
- - Variable definitions that specify what inputs to collect from users
107
- - Metadata to help organize and find prompts
108
-
109
- Prompt files allow you to create reusable templates for common AI interactions, ensuring consistency and saving time.
110
-
111
- ### Prompt File Structure
112
-
113
- ```markdown
114
- ---
115
- title: Your Prompt Title
116
- labels: [tag1, tag2, tag3]
117
- variables:
118
- - name: variableName
119
- type: input
120
- message: "What to ask the user"
121
- default: "Default value"
122
- ---
123
-
124
- Your prompt content goes here with {{variableName}} substitution.
125
- ```
126
-
127
- ### Frontmatter Properties
128
-
129
- The frontmatter section (between `---` markers) is optional and uses YAML format. Available properties:
130
-
131
- #### `title` (string)
132
- - **Purpose**: Display name for the prompt in the search interface
133
- - **Default**: Filename without extension
134
- - **Example**: `title: "API Documentation Generator"`
135
-
136
- #### `labels` (array of strings)
137
- - **Purpose**: Tags for categorizing and searching prompts
138
- - **Default**: Empty array
139
- - **Example**: `labels: [api, documentation, typescript]`
140
-
141
- #### `variables` (array of objects)
142
- - **Purpose**: Define user inputs required by the template
143
- - **Default**: Empty array
144
- - **Structure**: Each variable can have these properties:
145
- - `name` (required): Variable identifier used in template
146
- - `type`: Input type (`input`, `select`, `multiselect`, `confirm`, `editor`, `password`)
147
- - `message`: Question to ask the user
148
- - `default`: Default value
149
- - `choices`: Array of options (for `select` and `multiselect` types)
150
- - `validate`: Regex pattern for validation (as string)
151
-
152
- ### Complete Example Prompt File
153
-
154
- ```markdown
155
- ---
156
- title: REST API Client Generator
157
- labels: [api, client, typescript, generator]
158
- variables:
159
- - name: serviceName
160
- type: input
161
- message: "What is the name of your API service?"
162
- default: "MyAPI"
163
- validate: "^[A-Za-z][A-Za-z0-9]*$"
164
-
165
- - name: baseUrl
166
- type: input
167
- message: "What is the base URL?"
168
- default: "https://api.example.com"
169
-
170
- - name: authType
171
- type: select
172
- message: "Choose authentication type:"
173
- choices: ["none", "api-key", "bearer-token", "basic-auth"]
174
-
175
- - name: methods
176
- type: multiselect
177
- message: "Which HTTP methods will you use?"
178
- choices: ["GET", "POST", "PUT", "DELETE", "PATCH"]
179
-
180
- - name: includeTests
181
- type: confirm
182
- message: "Generate test files?"
183
- default: true
184
- ---
185
-
186
- # {{serviceName}} API Client
187
-
188
- Generate a TypeScript API client for {{serviceName}}.
189
-
190
- ## Configuration
191
- - Base URL: {{baseUrl}}
192
- - Authentication: {{authType}}
193
- - Methods: {{methods}}
194
-
195
- ## Implementation Requirements
196
-
197
- Create a fully typed TypeScript client with:
198
- 1. Type-safe request/response handling
199
- 2. Error handling with custom error classes
200
- 3. Retry logic with exponential backoff
201
- 4. Request/response interceptors
202
- {{#if includeTests}}
203
- 5. Comprehensive test suite using Jest
204
- 6. Mock server for testing
205
- {{/if}}
206
-
207
- ## Code Structure
208
-
209
- ```typescript
210
- export class {{serviceName}}Client {
211
- private baseUrl = '{{baseUrl}}';
212
-
213
- constructor(private auth: AuthConfig) {}
214
-
215
- // Implement methods for: {{methods}}
216
- }
217
- ```
218
-
219
- Generated on {{date}} at {{time}} by {{username}}
220
- ```
53
+ The documentation includes:
54
+ - **[Getting Started Guide](https://apowers313.github.io/pupt/guide/getting-started)** - Installation and first steps
55
+ - **[Prompt Templates](https://apowers313.github.io/pupt/guide/prompt-templates)** - Learn how to create dynamic prompts
56
+ - **[Command Reference](https://apowers313.github.io/pupt/commands/)** - Detailed information on all commands
57
+ - **[Configuration Guide](https://apowers313.github.io/pupt/guide/configuration)** - Customize PUPT to your needs
58
+ - **[Available Prompts](https://apowers313.github.io/pupt/prompts)** - Browse built-in prompt templates
59
+ - **[Troubleshooting](https://apowers313.github.io/pupt/guide/troubleshooting)** - Solutions to common issues
60
+ - **[Development Guide](https://apowers313.github.io/pupt/guide/development)** - Contributing and building from source
221
61
 
222
- ## Template Helpers
62
+ ## Repository
223
63
 
224
- ### Static Helpers
225
-
226
- These helpers provide system information and are evaluated when the prompt is generated:
227
-
228
- #### `{{date}}`
229
- - **Returns**: Current date in local format (e.g., "3/15/2024")
230
- - **Example**: `Generated on {{date}}`
231
-
232
- #### `{{time}}`
233
- - **Returns**: Current time in local format (e.g., "2:30:45 PM")
234
- - **Example**: `Created at {{time}}`
235
-
236
- #### `{{datetime}}`
237
- - **Returns**: Current date and time in local format
238
- - **Example**: `Timestamp: {{datetime}}`
239
-
240
- #### `{{timestamp}}`
241
- - **Returns**: Unix timestamp in milliseconds
242
- - **Example**: `Build: {{timestamp}}`
243
-
244
- #### `{{uuid}}`
245
- - **Returns**: A new UUID v4
246
- - **Example**: `Request ID: {{uuid}}`
247
-
248
- #### `{{username}}`
249
- - **Returns**: Current system username
250
- - **Example**: `Author: {{username}}`
251
-
252
- #### `{{hostname}}`
253
- - **Returns**: Machine hostname
254
- - **Example**: `Generated on {{hostname}}`
255
-
256
- #### `{{cwd}}`
257
- - **Returns**: Current working directory path
258
- - **Example**: `Project path: {{cwd}}`
259
-
260
- ### Input Helpers
261
-
262
- These helpers collect information from users interactively:
263
-
264
- #### `{{input "name" "message"}}`
265
- - **Purpose**: Collect text input
266
- - **Parameters**:
267
- - `name`: Variable name to store the value
268
- - `message` (optional): Prompt message
269
- - **Example**: `{{input "projectName" "What is your project name?"}}`
270
-
271
- #### `{{select "name" "message"}}`
272
- - **Purpose**: Single choice selection
273
- - **Parameters**:
274
- - `name`: Variable name
275
- - `message` (optional): Prompt message
276
- - **Note**: Choices come from variable definition
277
- - **Example**: `{{select "language" "Choose a language:"}}`
278
-
279
- #### `{{multiselect "name" "message"}}`
280
- - **Purpose**: Multiple choice selection
281
- - **Parameters**: Same as select
282
- - **Returns**: Comma-separated values
283
- - **Example**: `{{multiselect "features" "Select features:"}}`
284
-
285
- #### `{{confirm "name" "message"}}`
286
- - **Purpose**: Yes/no question
287
- - **Parameters**: Same as input
288
- - **Returns**: `true` or `false`
289
- - **Example**: `{{confirm "useTypeScript" "Use TypeScript?"}}`
290
-
291
- #### `{{editor "name" "message"}}`
292
- - **Purpose**: Open text editor for multi-line input
293
- - **Parameters**: Same as input
294
- - **Example**: `{{editor "description" "Enter description:"}}`
295
-
296
- #### `{{password "name" "message"}}`
297
- - **Purpose**: Masked password input
298
- - **Parameters**: Same as input
299
- - **Note**: Values are masked in history
300
- - **Example**: `{{password "apiKey" "Enter API key:"}}`
301
-
302
- ### Variable Substitution
303
-
304
- Once a variable is defined (either through frontmatter or input helpers), it can be referenced anywhere in the template:
305
-
306
- ```markdown
307
- Project: {{projectName}}
308
- Path: /src/{{projectName}}/index.ts
309
- Welcome to {{projectName}}!
310
- ```
311
-
312
- Variables are cached, so asking for the same variable multiple times will reuse the first value.
313
-
314
- ## Configuration File
315
-
316
- ### Overview
317
-
318
- The configuration file (`.pt-config.json`, `.pt-config.yaml`, or `.pt-config.js`) controls how the prompt tool behaves. The tool searches for configuration files in:
319
- 1. Current directory and all parent directories
320
- 2. Your home directory
321
- 3. Platform-specific config directories
322
-
323
- Multiple config files are merged, with closer files taking precedence.
324
-
325
- ### Configuration Format
326
-
327
- ```json
328
- {
329
- "promptDirs": ["./.prompts", "~/my-prompts"],
330
- "historyDir": "~/.pt/history",
331
- "annotationDir": "~/.pt/history",
332
- "codingTool": "claude",
333
- "codingToolArgs": ["--model", "claude-3"],
334
- "codingToolOptions": {
335
- "Continue with context?": "--continue",
336
- "Use verbose output?": "--verbose"
337
- },
338
- "partials": {
339
- "header": {
340
- "type": "inline",
341
- "value": "Generated by {{username}} on {{date}}"
342
- },
343
- "footer": {
344
- "type": "file",
345
- "path": "~/.pt/partials/footer.md"
346
- }
347
- },
348
- "version": "2.0.0"
349
- }
350
- ```
351
-
352
- ### Configuration Fields
353
-
354
- #### `promptDirs` (array of strings)
355
- - **Purpose**: Directories to search for prompt files
356
- - **Default**: `["./.prompts"]`
357
- - **Notes**:
358
- - Searches recursively for `.md` files
359
- - Supports `~` for home directory
360
- - Relative paths are resolved from config file location
361
- - **Example**: `["./.prompts", "~/global-prompts", "/usr/share/pt/prompts"]`
362
-
363
- #### `historyDir` (string, optional)
364
- - **Purpose**: Directory to save generated prompts history
365
- - **Default**: None (history disabled)
366
- - **Notes**:
367
- - Creates timestamped files with metadata
368
- - Sensitive values (passwords, API keys) are automatically masked
369
- - Supports `~` for home directory
370
- - **Example**: `"~/.pt/history"`
371
-
372
- #### `annotationDir` (string, optional)
373
- - **Purpose**: Directory to save annotations for history entries
374
- - **Default**: None (annotations disabled)
375
- - **Notes**:
376
- - Requires history to be enabled
377
- - Stores notes, tags, and success/failure status
378
- - Supports `~` for home directory
379
- - **Example**: `"~/.pt/history"`
380
-
381
- #### `codingTool` (string, optional)
382
- - **Purpose**: Default tool to use with `pt run`
383
- - **Default**: `"claude"`
384
- - **Notes**:
385
- - Can be any command-line tool that accepts stdin
386
- - Override with `pt run <tool>`
387
- - **Example**: `"claude"`, `"gpt"`, `"code -"`
388
-
389
- #### `codingToolArgs` (array of strings, optional)
390
- - **Purpose**: Default arguments for the coding tool
391
- - **Default**: `[]`
392
- - **Notes**:
393
- - Always passed to the tool
394
- - Additional args can be added with `pt run -- <args>`
395
- - **Example**: `["--model", "claude-3-opus"]`
396
-
397
- #### `codingToolOptions` (object, optional)
398
- - **Purpose**: Interactive options to prompt for when running
399
- - **Default**: `{ "Continue with last context?": "--continue" }`
400
- - **Structure**: Object where keys are questions and values are arguments
401
- - **Notes**:
402
- - User is prompted for each option
403
- - Arguments added only if user answers "yes"
404
- - **Example**:
405
- ```json
406
- {
407
- "Continue with context?": "--continue",
408
- "Use verbose output?": "--verbose",
409
- "Enable debug mode?": "--debug"
410
- }
411
- ```
412
-
413
- #### `partials` (object, optional)
414
- - **Purpose**: Define reusable template fragments
415
- - **Default**: None
416
- - **Structure**: Object where keys are partial names and values define the partial:
417
- - `type`: Either "inline" or "file"
418
- - `value`: Template content (for inline type)
419
- - `path`: Path to file (for file type)
420
- - **Usage**: Reference in templates with `{{> partialName}}`
421
- - **Example**:
422
- ```json
423
- {
424
- "partials": {
425
- "copyright": {
426
- "type": "inline",
427
- "value": "Copyright (c) {{year}} {{company}}"
428
- },
429
- "header": {
430
- "type": "file",
431
- "path": "~/.pt/partials/header.md"
432
- }
433
- }
434
- }
435
- ```
436
-
437
- ### Configuration Examples
438
-
439
- #### Minimal Configuration
440
- ```json
441
- {
442
- "promptDirs": ["./.prompts"]
443
- }
444
- ```
445
-
446
- #### Development Team Configuration
447
- ```json
448
- {
449
- "promptDirs": [
450
- "./.prompts",
451
- "~/team-prompts",
452
- "/shared/company-prompts"
453
- ],
454
- "historyDir": "~/.pt/history",
455
- "annotationDir": "~/.pt/history",
456
- "codingTool": "claude",
457
- "codingToolArgs": ["--model", "claude-3-opus"],
458
- "codingToolOptions": {
459
- "Continue with context?": "--continue",
460
- "Use company guidelines?": "--guidelines=/shared/guidelines.md"
461
- },
462
- "partials": {
463
- "companyHeader": {
464
- "type": "inline",
465
- "value": "/* Company Confidential - {{date}} */"
466
- }
467
- },
468
- "version": "2.0.0"
469
- }
470
- ```
471
-
472
- #### Personal Configuration
473
- ```yaml
474
- promptDirs:
475
- - ~/my-prompts
476
- - ~/work-prompts
477
- - ~/personal-prompts
478
- historyDir: ~/.pt/history
479
- annotationDir: ~/.pt/annotations
480
- codingTool: gpt
481
- codingToolArgs:
482
- - --temperature
483
- - "0.7"
484
- version: "2.0.0"
485
- ```
486
-
487
- #### Minimal Configuration with History
488
- ```json
489
- {
490
- "promptDirs": ["./.prompts"],
491
- "historyDir": "./.pthistory",
492
- "version": "2.0.0"
493
- }
494
- ```
495
-
496
- ## Development
497
-
498
- ```bash
499
- # Install dependencies
500
- npm install
501
-
502
- # Run tests
503
- npm test
504
-
505
- # Run tests with coverage
506
- npm run test:coverage
507
-
508
- # Build
509
- npm run build
510
-
511
- # Run locally
512
- node dist/cli.js
513
- ```
64
+ - **GitHub**: [https://github.com/apowers313/pupt](https://github.com/apowers313/pupt)
65
+ - **Issues**: [https://github.com/apowers313/pupt/issues](https://github.com/apowers313/pupt/issues)
66
+ - **Author**: Adam Powers <apowers@ato.ms>
514
67
 
515
68
  ## License
516
69
 
@@ -135,11 +135,11 @@ export class AnnotationAnalyzer {
135
135
  });
136
136
  return detected;
137
137
  }
138
- extractPromptName(historyFile) {
139
- // Extract prompt name from history filename pattern
140
- // Format: history_YYYY-MM-DDTHH-MM-SSZ_promptname.json
141
- const match = historyFile.match(/history_.*?_(.+)\.json$/);
142
- return match ? match[1] : 'unknown';
138
+ extractPromptName(_historyFile) {
139
+ // For the current filename format (YYYYMMDD-HHMMSS-randomhex.json),
140
+ // we can't extract the prompt name from the filename alone.
141
+ // This should be handled by the caller using the actual history entry data.
142
+ return 'unknown';
143
143
  }
144
144
  }
145
145
  //# sourceMappingURL=annotation-analyzer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotation-analyzer.js","sourceRoot":"","sources":["../../src/annotations/annotation-analyzer.ts"],"names":[],"mappings":"AAYA,MAAM,OAAO,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