@pupt/cli 0.0.1 → 2.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.
- package/LICENSE +21 -0
- package/README.md +54 -29
- package/dist/annotations/annotation-analyzer.d.ts +17 -0
- package/dist/annotations/annotation-analyzer.d.ts.map +1 -0
- package/dist/annotations/annotation-analyzer.js +145 -0
- package/dist/annotations/annotation-analyzer.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +435 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/add.d.ts +5 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +164 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/annotate.d.ts +2 -0
- package/dist/commands/annotate.d.ts.map +1 -0
- package/dist/commands/annotate.js +99 -0
- package/dist/commands/annotate.js.map +1 -0
- package/dist/commands/base-command.d.ts +23 -0
- package/dist/commands/base-command.d.ts.map +1 -0
- package/dist/commands/base-command.js +41 -0
- package/dist/commands/base-command.js.map +1 -0
- package/dist/commands/cache.d.ts +9 -0
- package/dist/commands/cache.d.ts.map +1 -0
- package/dist/commands/cache.js +31 -0
- package/dist/commands/cache.js.map +1 -0
- package/dist/commands/config.d.ts +8 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +93 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/edit.d.ts +2 -0
- package/dist/commands/edit.d.ts.map +1 -0
- package/dist/commands/edit.js +35 -0
- package/dist/commands/edit.js.map +1 -0
- package/dist/commands/help.d.ts +2 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +26 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/history.d.ts +12 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +317 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +137 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/install.d.ts +16 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +263 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/review.d.ts +3 -0
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/commands/review.js +160 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/commands/run.d.ts +32 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +367 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/uninstall.d.ts +2 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +45 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +113 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/config/config-manager.d.ts +19 -0
- package/dist/config/config-manager.d.ts.map +1 -0
- package/dist/config/config-manager.js +221 -0
- package/dist/config/config-manager.js.map +1 -0
- package/dist/config/global-paths.d.ts +5 -0
- package/dist/config/global-paths.d.ts.map +1 -0
- package/dist/config/global-paths.js +16 -0
- package/dist/config/global-paths.js.map +1 -0
- package/dist/config/migration.d.ts +12 -0
- package/dist/config/migration.d.ts.map +1 -0
- package/dist/config/migration.js +270 -0
- package/dist/config/migration.js.map +1 -0
- package/dist/history/enhanced-history-manager.d.ts +27 -0
- package/dist/history/enhanced-history-manager.d.ts.map +1 -0
- package/dist/history/enhanced-history-manager.js +116 -0
- package/dist/history/enhanced-history-manager.js.map +1 -0
- package/dist/history/history-manager.d.ts +43 -0
- package/dist/history/history-manager.d.ts.map +1 -0
- package/dist/history/history-manager.js +229 -0
- package/dist/history/history-manager.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/input-types/file-search-prompt.d.ts +11 -0
- package/dist/prompts/input-types/file-search-prompt.d.ts.map +1 -0
- package/dist/prompts/input-types/file-search-prompt.js +53 -0
- package/dist/prompts/input-types/file-search-prompt.js.map +1 -0
- package/dist/prompts/input-types/review-file-prompt.d.ts +3 -0
- package/dist/prompts/input-types/review-file-prompt.d.ts.map +1 -0
- package/dist/prompts/input-types/review-file-prompt.js +9 -0
- package/dist/prompts/input-types/review-file-prompt.js.map +1 -0
- package/dist/schemas/config-schema.d.ts +1637 -0
- package/dist/schemas/config-schema.d.ts.map +1 -0
- package/dist/schemas/config-schema.js +136 -0
- package/dist/schemas/config-schema.js.map +1 -0
- package/dist/search/search-engine.d.ts +8 -0
- package/dist/search/search-engine.d.ts.map +1 -0
- package/dist/search/search-engine.js +53 -0
- package/dist/search/search-engine.js.map +1 -0
- package/dist/services/git-service.d.ts +28 -0
- package/dist/services/git-service.d.ts.map +1 -0
- package/dist/services/git-service.js +157 -0
- package/dist/services/git-service.js.map +1 -0
- package/dist/services/input-collector.d.ts +9 -0
- package/dist/services/input-collector.d.ts.map +1 -0
- package/dist/services/input-collector.js +162 -0
- package/dist/services/input-collector.js.map +1 -0
- package/dist/services/logging-service.d.ts +49 -0
- package/dist/services/logging-service.d.ts.map +1 -0
- package/dist/services/logging-service.js +203 -0
- package/dist/services/logging-service.js.map +1 -0
- package/dist/services/module-cache.d.ts +42 -0
- package/dist/services/module-cache.d.ts.map +1 -0
- package/dist/services/module-cache.js +205 -0
- package/dist/services/module-cache.js.map +1 -0
- package/dist/services/module-entry-builder.d.ts +20 -0
- package/dist/services/module-entry-builder.d.ts.map +1 -0
- package/dist/services/module-entry-builder.js +71 -0
- package/dist/services/module-entry-builder.js.map +1 -0
- package/dist/services/output-capture-service.d.ts +28 -0
- package/dist/services/output-capture-service.d.ts.map +1 -0
- package/dist/services/output-capture-service.js +348 -0
- package/dist/services/output-capture-service.js.map +1 -0
- package/dist/services/package-manager.d.ts +18 -0
- package/dist/services/package-manager.d.ts.map +1 -0
- package/dist/services/package-manager.js +141 -0
- package/dist/services/package-manager.js.map +1 -0
- package/dist/services/pattern-detector.d.ts +15 -0
- package/dist/services/pattern-detector.d.ts.map +1 -0
- package/dist/services/pattern-detector.js +228 -0
- package/dist/services/pattern-detector.js.map +1 -0
- package/dist/services/prompt-resolver.d.ts +32 -0
- package/dist/services/prompt-resolver.d.ts.map +1 -0
- package/dist/services/prompt-resolver.js +73 -0
- package/dist/services/prompt-resolver.js.map +1 -0
- package/dist/services/pupt-prompt-source.d.ts +16 -0
- package/dist/services/pupt-prompt-source.d.ts.map +1 -0
- package/dist/services/pupt-prompt-source.js +74 -0
- package/dist/services/pupt-prompt-source.js.map +1 -0
- package/dist/services/pupt-service.d.ts +33 -0
- package/dist/services/pupt-service.d.ts.map +1 -0
- package/dist/services/pupt-service.js +119 -0
- package/dist/services/pupt-service.js.map +1 -0
- package/dist/services/review-data-builder.d.ts +25 -0
- package/dist/services/review-data-builder.d.ts.map +1 -0
- package/dist/services/review-data-builder.js +333 -0
- package/dist/services/review-data-builder.js.map +1 -0
- package/dist/services/suggestion-generator.d.ts +11 -0
- package/dist/services/suggestion-generator.d.ts.map +1 -0
- package/dist/services/suggestion-generator.js +158 -0
- package/dist/services/suggestion-generator.js.map +1 -0
- package/dist/services/ui-service.d.ts +49 -0
- package/dist/services/ui-service.d.ts.map +1 -0
- package/dist/services/ui-service.js +196 -0
- package/dist/services/ui-service.js.map +1 -0
- package/dist/types/annotations.d.ts +50 -0
- package/dist/types/annotations.d.ts.map +1 -0
- package/dist/types/annotations.js +2 -0
- package/dist/types/annotations.js.map +1 -0
- package/dist/types/config.d.ts +110 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +12 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/history.d.ts +36 -0
- package/dist/types/history.d.ts.map +1 -0
- package/dist/types/history.js +2 -0
- package/dist/types/history.js.map +1 -0
- package/dist/types/patterns.d.ts +25 -0
- package/dist/types/patterns.d.ts.map +1 -0
- package/dist/types/patterns.js +2 -0
- package/dist/types/patterns.js.map +1 -0
- package/dist/types/prompt.d.ts +29 -0
- package/dist/types/prompt.d.ts.map +1 -0
- package/dist/types/prompt.js +24 -0
- package/dist/types/prompt.js.map +1 -0
- package/dist/types/review.d.ts +81 -0
- package/dist/types/review.d.ts.map +1 -0
- package/dist/types/review.js +2 -0
- package/dist/types/review.js.map +1 -0
- package/dist/ui/console-ui.d.ts +30 -0
- package/dist/ui/console-ui.d.ts.map +1 -0
- package/dist/ui/console-ui.js +88 -0
- package/dist/ui/console-ui.js.map +1 -0
- package/dist/ui/interactive-search.d.ts +8 -0
- package/dist/ui/interactive-search.d.ts.map +1 -0
- package/dist/ui/interactive-search.js +29 -0
- package/dist/ui/interactive-search.js.map +1 -0
- package/dist/utils/annotation-migration.d.ts +12 -0
- package/dist/utils/annotation-migration.d.ts.map +1 -0
- package/dist/utils/annotation-migration.js +88 -0
- package/dist/utils/annotation-migration.js.map +1 -0
- package/dist/utils/date-formatter.d.ts +10 -0
- package/dist/utils/date-formatter.d.ts.map +1 -0
- package/dist/utils/date-formatter.js +46 -0
- package/dist/utils/date-formatter.js.map +1 -0
- package/dist/utils/editor.d.ts +14 -0
- package/dist/utils/editor.d.ts.map +1 -0
- package/dist/utils/editor.js +52 -0
- package/dist/utils/editor.js.map +1 -0
- package/dist/utils/errors.d.ts +58 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +275 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/git-info.d.ts +10 -0
- package/dist/utils/git-info.d.ts.map +1 -0
- package/dist/utils/git-info.js +44 -0
- package/dist/utils/git-info.js.map +1 -0
- package/dist/utils/gitignore.d.ts +10 -0
- package/dist/utils/gitignore.d.ts.map +1 -0
- package/dist/utils/gitignore.js +72 -0
- package/dist/utils/gitignore.js.map +1 -0
- package/dist/utils/logger.d.ts +39 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +143 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/platform.d.ts +9 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +45 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/utils/project-root.d.ts +22 -0
- package/dist/utils/project-root.d.ts.map +1 -0
- package/dist/utils/project-root.js +226 -0
- package/dist/utils/project-root.js.map +1 -0
- package/dist/utils/prompt-dir-resolver.d.ts +5 -0
- package/dist/utils/prompt-dir-resolver.d.ts.map +1 -0
- package/dist/utils/prompt-dir-resolver.js +25 -0
- package/dist/utils/prompt-dir-resolver.js.map +1 -0
- package/dist/utils/security.d.ts +5 -0
- package/dist/utils/security.d.ts.map +1 -0
- package/dist/utils/security.js +57 -0
- package/dist/utils/security.js.map +1 -0
- package/dist/utils/tool-detection.d.ts +14 -0
- package/dist/utils/tool-detection.d.ts.map +1 -0
- package/dist/utils/tool-detection.js +43 -0
- package/dist/utils/tool-detection.js.map +1 -0
- package/package.json +79 -7
- package/prompts/prompts/ad-hoc-long.prompt +60 -0
- package/prompts/prompts/ad-hoc.prompt +29 -0
- package/prompts/prompts/code-review.prompt +99 -0
- package/prompts/prompts/debugging-error-message.prompt +81 -0
- package/prompts/prompts/fix-github-actions.prompt +62 -0
- package/prompts/prompts/fix-test-errors.prompt +73 -0
- package/prompts/prompts/git-commit-comment.prompt +61 -0
- package/prompts/prompts/implementation-phase.prompt +53 -0
- package/prompts/prompts/implementation-plan.prompt +101 -0
- package/prompts/prompts/new-feature.prompt +89 -0
- package/prompts/prompts/new-project.prompt +9 -0
- package/prompts/prompts/one-shot-change.prompt +79 -0
- package/prompts/prompts/pupt-prompt-improvement.prompt +270 -0
- package/prompts/prompts/simple-test.prompt +8 -0
- package/prompts/prompts/update-design.prompt +71 -0
- package/prompts/prompts/update-documentation.prompt +6 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{/* Converted from one-shot-change.md */}
|
|
2
|
+
<Prompt name="one-shot-change" description="One Shot Change" tags={["development", "implementation", "quick-fix"]}>
|
|
3
|
+
|
|
4
|
+
<Role preset="engineer" extend>
|
|
5
|
+
You are a precise software engineer focused on making targeted changes with minimal impact while ensuring code quality and test integrity.
|
|
6
|
+
</Role>
|
|
7
|
+
|
|
8
|
+
<Task>
|
|
9
|
+
Implement the specific changes requested below, then verify the implementation meets all quality standards.
|
|
10
|
+
</Task>
|
|
11
|
+
|
|
12
|
+
<Constraints extend>
|
|
13
|
+
1. **Analyze the requested changes**:
|
|
14
|
+
- Understand the exact scope and intent
|
|
15
|
+
- Identify affected files and components
|
|
16
|
+
- Consider potential side effects
|
|
17
|
+
|
|
18
|
+
2. **Implement with precision**:
|
|
19
|
+
- Make ONLY the changes necessary to fulfill the request
|
|
20
|
+
- Preserve existing functionality unless explicitly changing it
|
|
21
|
+
- Follow existing code patterns and conventions
|
|
22
|
+
- Maintain consistent code style
|
|
23
|
+
|
|
24
|
+
3. **Verify implementation** (MANDATORY):
|
|
25
|
+
- Run `npm test` and ensure ALL tests pass (show output with "0 failing")
|
|
26
|
+
- Run `npm run lint` and fix any errors (must show "0 errors")
|
|
27
|
+
- Run `npm run build` and ensure successful completion
|
|
28
|
+
- If any command fails, fix the issues and re-run ALL verification steps
|
|
29
|
+
|
|
30
|
+
4. **Handle errors systematically**:
|
|
31
|
+
- If tests fail, determine if implementation or test needs updating
|
|
32
|
+
- Make MINIMAL changes to fix errors
|
|
33
|
+
- Document any assumptions made
|
|
34
|
+
- Re-verify after each fix
|
|
35
|
+
|
|
36
|
+
**Requested Changes**:
|
|
37
|
+
<Ask.Editor name="changes" label="Changes (press enter to open editor):" />
|
|
38
|
+
</Constraints>
|
|
39
|
+
|
|
40
|
+
<Format>
|
|
41
|
+
1. Brief analysis of the requested changes
|
|
42
|
+
2. List of files to be modified
|
|
43
|
+
3. Implementation of changes
|
|
44
|
+
4. Verification results showing:
|
|
45
|
+
- Test output with "0 failing"
|
|
46
|
+
- Lint output with "0 errors"
|
|
47
|
+
- Build output showing success
|
|
48
|
+
5. Summary of changes made
|
|
49
|
+
</Format>
|
|
50
|
+
|
|
51
|
+
<Examples>
|
|
52
|
+
<Example>
|
|
53
|
+
```
|
|
54
|
+
Requested: Add validation to user input
|
|
55
|
+
Analysis: Need to add input validation to prevent empty strings
|
|
56
|
+
Files affected: src/user.js, test/user.test.js
|
|
57
|
+
Implementation: Added validation check with appropriate error
|
|
58
|
+
Verification: All tests passing (0 failing), no lint errors, build successful
|
|
59
|
+
```
|
|
60
|
+
</Example>
|
|
61
|
+
</Examples>
|
|
62
|
+
|
|
63
|
+
<Constraint>
|
|
64
|
+
- DO NOT make unrelated "improvements" or refactoring
|
|
65
|
+
- DO NOT modify test expectations unless the change requires it
|
|
66
|
+
- DO NOT skip or disable any tests
|
|
67
|
+
- DO NOT use @ts-ignore or eslint-disable comments
|
|
68
|
+
- Changes must be minimal and focused
|
|
69
|
+
</Constraint>
|
|
70
|
+
|
|
71
|
+
<SuccessCriteria>
|
|
72
|
+
<Criterion>✅ Requested changes are fully implemented</Criterion>
|
|
73
|
+
<Criterion>✅ All tests pass (npm test shows "0 failing")</Criterion>
|
|
74
|
+
<Criterion>✅ No lint errors (npm run lint shows "0 errors")</Criterion>
|
|
75
|
+
<Criterion>✅ Build succeeds (npm run build completes without errors)</Criterion>
|
|
76
|
+
<Criterion>✅ No functionality is broken</Criterion>
|
|
77
|
+
<Criterion>✅ Changes are minimal and targeted</Criterion>
|
|
78
|
+
</SuccessCriteria>
|
|
79
|
+
</Prompt>
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
{/* Converted from pupt-prompt-improvement.md */}
|
|
2
|
+
<Prompt name="pupt-prompt-improvement" description="PUPT Prompt Improvement" tags={[]}>
|
|
3
|
+
|
|
4
|
+
<Role>
|
|
5
|
+
You are an expert prompt engineer and performance analyst specializing in identifying failure patterns in AI-assisted development workflows. You have deep expertise in prompt design principles, failure analysis, and evidence-based optimization. You will actively modify prompt files to implement improvements.
|
|
6
|
+
</Role>
|
|
7
|
+
|
|
8
|
+
<Task>
|
|
9
|
+
Use the `pt review` command to analyze comprehensive usage data for AI prompts and DIRECTLY UPDATE prompt files to:
|
|
10
|
+
1. Fix documented failure patterns by modifying existing prompt files
|
|
11
|
+
2. Create new prompt files for repeated Ad Hoc usage patterns
|
|
12
|
+
3. Implement all improvements immediately (git handles version control)
|
|
13
|
+
Your analysis must be grounded in actual usage evidence, and you MUST modify files, not just make recommendations.
|
|
14
|
+
</Task>
|
|
15
|
+
|
|
16
|
+
<Constraint>
|
|
17
|
+
1. **Run the review command**: Execute `pt review --format json > <Ask.Text name="reviewDataFile" label="Review data file path" default={"review.json"} />` to generate comprehensive usage data
|
|
18
|
+
2. **Read the review data**: Load and analyze the JSON file containing:
|
|
19
|
+
- Usage statistics with execution outcomes and timing
|
|
20
|
+
- Active execution time (excluding user input wait time)
|
|
21
|
+
- User input frequency and patterns
|
|
22
|
+
- Environment correlations and timing patterns
|
|
23
|
+
- User annotations with structured issue data
|
|
24
|
+
- Output capture analysis with error indicators
|
|
25
|
+
- Detected patterns with frequency and severity metrics
|
|
26
|
+
3. **Analyze patterns with evidence**:
|
|
27
|
+
- Focus on patterns with ≥3 occurrences (statistical significance)
|
|
28
|
+
- Correlate failures with environmental factors
|
|
29
|
+
- Extract specific evidence quotes from annotations
|
|
30
|
+
- Calculate pattern impact (frequency × severity)
|
|
31
|
+
- Identify repeated Ad Hoc prompt content/themes
|
|
32
|
+
- Detect common prompt structures and workflows
|
|
33
|
+
- Analyze execution timing patterns:
|
|
34
|
+
* Prompts requiring excessive user input (high avg_user_inputs)
|
|
35
|
+
* Prompts with high active time but many failures
|
|
36
|
+
* Correlation between user input frequency and failure rates
|
|
37
|
+
4. **Review ALL prompts for completeness and structure**:
|
|
38
|
+
- Read every prompt file regardless of execution count
|
|
39
|
+
- Check for proper prompt structure (Role, Objective, Requirements, etc.)
|
|
40
|
+
- Verify all prompts have:
|
|
41
|
+
* Clear role and context definition
|
|
42
|
+
* Specific objective statement
|
|
43
|
+
* Detailed requirements or steps
|
|
44
|
+
* Success criteria
|
|
45
|
+
* Appropriate constraints
|
|
46
|
+
- Identify minimal or incomplete prompts (e.g., single-line prompts)
|
|
47
|
+
- Flag prompts missing critical elements like verification steps
|
|
48
|
+
5. **DIRECTLY UPDATE existing prompt files**:
|
|
49
|
+
- Use the Edit tool to modify prompts with identified issues
|
|
50
|
+
- For prompts with usage data: Every change must cite specific evidence
|
|
51
|
+
- For prompts without usage data: Improve based on best practices
|
|
52
|
+
- Address root causes, not symptoms
|
|
53
|
+
- Preserve successful prompt elements
|
|
54
|
+
- Add verification steps for all implementation prompts
|
|
55
|
+
- Replace ambiguous terms with measurable criteria
|
|
56
|
+
- Ensure all prompts follow consistent structure
|
|
57
|
+
- Confirm each edit is successful before proceeding
|
|
58
|
+
6. **CREATE new prompt files**:
|
|
59
|
+
- Use the Write tool to create new prompts for repeated Ad Hoc patterns
|
|
60
|
+
- Each new prompt must address ≥3 similar Ad Hoc uses
|
|
61
|
+
- Include proper frontmatter (title, author, tags)
|
|
62
|
+
- Base templates on common patterns found in Ad Hoc usage
|
|
63
|
+
- Test that new prompts are discoverable with `pt list`
|
|
64
|
+
</Constraint>
|
|
65
|
+
|
|
66
|
+
<Format>
|
|
67
|
+
Create <Ask.Text name="promptReviewFile" label="Prompt review output file" default={"design/prompt-review.md"} /> documenting the changes made:
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
# Prompt Performance Analysis & Implementation Report
|
|
71
|
+
*Generated: [Current Date]*
|
|
72
|
+
*Analysis Period: <Ask.Text name="timeframe" label="Analysis timeframe" default={"30d"} />*
|
|
73
|
+
|
|
74
|
+
## Executive Summary
|
|
75
|
+
- **Prompts Analyzed**: X prompts with Y total executions
|
|
76
|
+
- **Prompts Modified**: X files updated
|
|
77
|
+
- **New Prompts Created**: Y new prompt files
|
|
78
|
+
- **Key Finding**: [Most significant pattern discovered]
|
|
79
|
+
- **Overall Success Rate**: X% → Y% (after improvements)
|
|
80
|
+
- **Average Active Execution Time**: Xms → Yms (after improvements)
|
|
81
|
+
- **Average User Inputs Required**: X → Y (after improvements)
|
|
82
|
+
|
|
83
|
+
## Prompt Completeness Review
|
|
84
|
+
|
|
85
|
+
### Prompts Requiring Structure Improvements
|
|
86
|
+
| Prompt | Current State | Missing Elements | Priority |
|
|
87
|
+
|--------|--------------|------------------|----------|
|
|
88
|
+
| [name] | [e.g., "Minimal 3-line prompt"] | [e.g., "Role, Requirements, Success Criteria"] | [High/Medium/Low] |
|
|
89
|
+
|
|
90
|
+
## Implemented Improvements
|
|
91
|
+
|
|
92
|
+
### 1. [Prompt Name] - [Pattern Type] (Priority: Critical/High/Medium) ✅
|
|
93
|
+
**Evidence**:
|
|
94
|
+
- Pattern frequency: X occurrences across Y executions
|
|
95
|
+
- Success rate impact: X% → Y% projected improvement
|
|
96
|
+
- Timing impact: Average active time Xms, with Y user inputs
|
|
97
|
+
- User quotes: "[specific user feedback]"
|
|
98
|
+
- Output indicators: [specific failure signals from captured output]
|
|
99
|
+
- Structure issues: [if applicable, e.g., "Minimal prompt lacking guidance"]
|
|
100
|
+
|
|
101
|
+
**Root Cause**: [Specific analysis of why this pattern occurs]
|
|
102
|
+
|
|
103
|
+
**Changes Made**:
|
|
104
|
+
- File: `prompts/[filename].prompt`
|
|
105
|
+
- Action: Modified using Edit tool
|
|
106
|
+
- Specific changes:
|
|
107
|
+
- Added: "[what was added]"
|
|
108
|
+
- Removed: "[what was removed]"
|
|
109
|
+
- Modified: "[what was changed]"
|
|
110
|
+
|
|
111
|
+
**Before**:
|
|
112
|
+
```
|
|
113
|
+
[Quote problematic sections that were fixed]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**After**:
|
|
117
|
+
```
|
|
118
|
+
[Show the updated sections]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Expected Impact**:
|
|
122
|
+
- Success rate improvement: X% → Y%
|
|
123
|
+
- Reduced verification gaps: X → Y occurrences
|
|
124
|
+
- Environmental resilience: [specific improvements]
|
|
125
|
+
- Reduced user interventions: X → Y inputs per run
|
|
126
|
+
- Faster execution: Xms → Yms active time
|
|
127
|
+
- Improved clarity and guidance for users
|
|
128
|
+
|
|
129
|
+
[Repeat for each implemented improvement]
|
|
130
|
+
|
|
131
|
+
## New Prompts Created
|
|
132
|
+
|
|
133
|
+
### 1. [Prompt Name] (Addressed X Ad Hoc uses) ✅
|
|
134
|
+
**Evidence of Need**:
|
|
135
|
+
- Ad Hoc prompts with similar content: X occurrences
|
|
136
|
+
- Common phrases: "[repeated text patterns]"
|
|
137
|
+
- Typical use cases: [list specific scenarios]
|
|
138
|
+
|
|
139
|
+
**File Created**: `prompts/[filename].prompt`
|
|
140
|
+
**Action**: Created using Write tool
|
|
141
|
+
|
|
142
|
+
**Prompt Content**:
|
|
143
|
+
```jsx
|
|
144
|
+
<Prompt name="[prompt-name]" description="[Prompt Name]" tags={["relevant", "tags"]}>
|
|
145
|
+
<Ask.Text name="input" label="Input:" />
|
|
146
|
+
|
|
147
|
+
<Role>[Role description]</Role>
|
|
148
|
+
<Task>[Task description with {inputs.input}]</Task>
|
|
149
|
+
<Constraint>[Constraints]</Constraint>
|
|
150
|
+
<SuccessCriteria>
|
|
151
|
+
<Criterion>[Success criterion]</Criterion>
|
|
152
|
+
</SuccessCriteria>
|
|
153
|
+
</Prompt>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Verification**:
|
|
157
|
+
- ✅ File created successfully
|
|
158
|
+
- ✅ Appears in `pt list` output
|
|
159
|
+
- ✅ Template variables work correctly
|
|
160
|
+
- ✅ Addresses the identified use cases
|
|
161
|
+
|
|
162
|
+
**Expected Benefits**:
|
|
163
|
+
- Standardizes common workflow covering X% of similar Ad Hoc uses
|
|
164
|
+
- Reduces prompt creation time from Y minutes to Z seconds
|
|
165
|
+
- Improves consistency across team members
|
|
166
|
+
|
|
167
|
+
[Repeat for each new prompt created]
|
|
168
|
+
|
|
169
|
+
## Ad Hoc Usage Analysis
|
|
170
|
+
| Pattern | Frequency | Example Content | Proposed Prompt |
|
|
171
|
+
|---------|-----------|-----------------|-----------------|
|
|
172
|
+
| ... | ... | ... | ... |
|
|
173
|
+
|
|
174
|
+
## Implementation Priority Matrix
|
|
175
|
+
| Prompt | Pattern | Frequency | Impact | Effort | Priority Score |
|
|
176
|
+
|--------|---------|-----------|---------|--------|----------------|
|
|
177
|
+
| ... | ... | ... | ... | ... | ... |
|
|
178
|
+
|
|
179
|
+
## Environmental Risk Factors
|
|
180
|
+
- **Branch-specific failures**: [analysis of git branch correlations]
|
|
181
|
+
- **Time-based patterns**: [analysis of time-of-day success rates]
|
|
182
|
+
- **Directory-specific issues**: [analysis of working directory correlations]
|
|
183
|
+
|
|
184
|
+
## Cross-Prompt Patterns
|
|
185
|
+
- **Pattern**: [Description]
|
|
186
|
+
**Affected**: [Prompt names]
|
|
187
|
+
**Recommendation**: [Global improvement strategy]
|
|
188
|
+
|
|
189
|
+
## Monitoring Recommendations
|
|
190
|
+
- Track success rates for improved prompts
|
|
191
|
+
- Monitor for new pattern emergence
|
|
192
|
+
- Focus annotation collection on [specific areas]
|
|
193
|
+
- Track Ad Hoc prompt reuse to validate new prompt recommendations
|
|
194
|
+
```
|
|
195
|
+
</Format>
|
|
196
|
+
|
|
197
|
+
<Examples>
|
|
198
|
+
<Example>
|
|
199
|
+
```
|
|
200
|
+
Pattern: "verification_gap"
|
|
201
|
+
Evidence: 12 annotations across 5 prompts mention "tests still failing after AI claimed success"
|
|
202
|
+
Timing Analysis: Affected prompts average 3.2 user inputs (vs 0.8 for successful prompts)
|
|
203
|
+
Root Cause: Prompts lack explicit verification requirements
|
|
204
|
+
Fix: Add "After implementation, run 'npm test' and verify output shows '0 failing' before proceeding"
|
|
205
|
+
Expected Impact: 85% reduction in verification-related partial failures, 60% reduction in user inputs
|
|
206
|
+
```
|
|
207
|
+
</Example>
|
|
208
|
+
<Example>
|
|
209
|
+
```
|
|
210
|
+
Pattern: "incomplete_task"
|
|
211
|
+
Evidence: 8 annotations report "stopped at first error" with 15+ subsequent errors found
|
|
212
|
+
Timing Analysis: Average 5.1 user inputs needed to complete (active time: 4500ms across multiple runs)
|
|
213
|
+
Root Cause: Prompts use "fix the error" instead of "fix all errors"
|
|
214
|
+
Fix: Replace with "Continue debugging and fixing ALL errors until none remain"
|
|
215
|
+
Expected Impact: 70% reduction in incomplete task annotations, 80% faster completion
|
|
216
|
+
```
|
|
217
|
+
</Example>
|
|
218
|
+
<Example>
|
|
219
|
+
```
|
|
220
|
+
New Prompt Opportunity: "Dependency Update Workflow"
|
|
221
|
+
Evidence: 15 Ad Hoc prompts in past 30 days containing variations of "update dependencies" or "npm update"
|
|
222
|
+
Common Pattern: Users repeatedly asking to update packages, check for breaking changes, and run tests
|
|
223
|
+
Proposed Template: Standardized workflow for dependency updates with automated compatibility checks
|
|
224
|
+
Expected Impact: Replace 80% of dependency-related Ad Hoc prompts with consistent workflow
|
|
225
|
+
```
|
|
226
|
+
</Example>
|
|
227
|
+
<Example>
|
|
228
|
+
```
|
|
229
|
+
New Prompt Opportunity: "API Integration Testing"
|
|
230
|
+
Evidence: 8 Ad Hoc prompts containing "test API", "mock endpoint", or "integration test"
|
|
231
|
+
Common Pattern: Users creating similar API testing scenarios with slight variations
|
|
232
|
+
Proposed Template: Parameterized API testing prompt with endpoint, auth, and payload variables
|
|
233
|
+
Expected Impact: Reduce API testing prompt creation time from 5 minutes to 30 seconds
|
|
234
|
+
```
|
|
235
|
+
</Example>
|
|
236
|
+
</Examples>
|
|
237
|
+
|
|
238
|
+
<Constraint>
|
|
239
|
+
- For usage-based improvements: Only modify based on patterns with ≥3 documented occurrences
|
|
240
|
+
- For completeness review: Update ALL prompts that lack proper structure regardless of usage
|
|
241
|
+
- Only recommend new prompts for Ad Hoc patterns with ≥3 similar occurrences
|
|
242
|
+
- Maintain original prompt intent and core workflow
|
|
243
|
+
- Preserve existing successful elements (don't change what works)
|
|
244
|
+
- Ensure backward compatibility with existing template variables
|
|
245
|
+
- New prompt recommendations must show clear reuse potential
|
|
246
|
+
- Minimal prompts (fewer than 5 lines) should be expanded to include full structure
|
|
247
|
+
- All implementation prompts MUST include verification steps
|
|
248
|
+
</Constraint>
|
|
249
|
+
|
|
250
|
+
<SuccessCriteria>
|
|
251
|
+
<Criterion>✅ ALL prompts have proper structure (Role, Objective, Requirements, Success Criteria)</Criterion>
|
|
252
|
+
<Criterion>✅ All minimal prompts (fewer than 5 lines) are expanded with complete structure</Criterion>
|
|
253
|
+
<Criterion>✅ All implementation prompts include explicit verification steps</Criterion>
|
|
254
|
+
<Criterion>✅ All high-severity patterns (≥3 occurrences) have corresponding file modifications</Criterion>
|
|
255
|
+
<Criterion>✅ At least 80% of identified issues result in actual prompt file updates</Criterion>
|
|
256
|
+
<Criterion>✅ All modifications are verified with successful Edit tool operations</Criterion>
|
|
257
|
+
<Criterion>✅ New prompt files are created for 70%+ of repeated Ad Hoc patterns</Criterion>
|
|
258
|
+
<Criterion>✅ Each created prompt is verified to work with `pt list` and `pt run`</Criterion>
|
|
259
|
+
<Criterion>✅ Report documents all changes made with file paths and specific edits</Criterion>
|
|
260
|
+
<Criterion>✅ Git status shows modified/new files ready for review and commit</Criterion>
|
|
261
|
+
<Criterion>Read each prompt file in the prompts directory</Criterion>
|
|
262
|
+
<Criterion>Identify prompts lacking proper structure</Criterion>
|
|
263
|
+
<Criterion>Update minimal or incomplete prompts</Criterion>
|
|
264
|
+
<Criterion>Read the prompt file</Criterion>
|
|
265
|
+
<Criterion>Apply fixes using Edit tool based on evidence</Criterion>
|
|
266
|
+
<Criterion>Verify the edit succeeded</Criterion>
|
|
267
|
+
<Criterion>Create new prompt file using Write tool</Criterion>
|
|
268
|
+
<Criterion>Verify it appears in `pt list`</Criterion>
|
|
269
|
+
</SuccessCriteria>
|
|
270
|
+
</Prompt>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{/* Converted from update-design.md */}
|
|
2
|
+
<Prompt name="update-design" description="Update Design" tags={[]}>
|
|
3
|
+
|
|
4
|
+
<Role preset="architect" extend>
|
|
5
|
+
You are a software architect updating existing designs with new requirements while maintaining system coherence and design integrity.
|
|
6
|
+
</Role>
|
|
7
|
+
|
|
8
|
+
<Task>
|
|
9
|
+
Update the design document <Ask.File name="designFile" label="Design file:" /> to incorporate new requirements while preserving existing functionality.
|
|
10
|
+
</Task>
|
|
11
|
+
|
|
12
|
+
<Constraints extend>
|
|
13
|
+
- Read and understand the current design completely
|
|
14
|
+
- Analyze new requirements for conflicts or dependencies
|
|
15
|
+
- Integrate new requirements seamlessly:
|
|
16
|
+
- Maintain existing design patterns and principles
|
|
17
|
+
- Ensure backward compatibility
|
|
18
|
+
- Highlight any breaking changes
|
|
19
|
+
- Keep document structure consistent
|
|
20
|
+
- Mark all changes clearly:
|
|
21
|
+
- Add "**[NEW]**" tags for new sections
|
|
22
|
+
- Add "**[UPDATED]**" tags for modified sections
|
|
23
|
+
- Include change rationale where not obvious
|
|
24
|
+
- Validate the updated design:
|
|
25
|
+
- All original requirements still met
|
|
26
|
+
- New requirements fully addressed
|
|
27
|
+
- No conflicts or contradictions
|
|
28
|
+
- Implementation remains feasible
|
|
29
|
+
</Constraints>
|
|
30
|
+
|
|
31
|
+
<Format>
|
|
32
|
+
1. Add a "Change Summary" section at the top:
|
|
33
|
+
```markdown
|
|
34
|
+
## Change Summary - [Date]
|
|
35
|
+
|
|
36
|
+
### New Requirements Added:
|
|
37
|
+
- [Requirement 1]: [Brief description]
|
|
38
|
+
- [Requirement 2]: [Brief description]
|
|
39
|
+
|
|
40
|
+
### Sections Modified:
|
|
41
|
+
- [Section name]: [What changed and why]
|
|
42
|
+
|
|
43
|
+
### Impact Assessment:
|
|
44
|
+
- Breaking changes: [Yes/No - details if yes]
|
|
45
|
+
- Implementation effort: [Estimated additional work]
|
|
46
|
+
- Risk factors: [Any new risks introduced]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
2. Update relevant sections with new requirements
|
|
50
|
+
3. Ensure cross-references are updated
|
|
51
|
+
4. Keep formatting consistent with original
|
|
52
|
+
|
|
53
|
+
**New Requirements to Integrate**:
|
|
54
|
+
<Ask.Editor name="requirements" label="Requirements (press enter to open editor):" />
|
|
55
|
+
</Format>
|
|
56
|
+
|
|
57
|
+
<Constraint>
|
|
58
|
+
- Preserve all existing functionality unless explicitly changing
|
|
59
|
+
- Maintain document readability and organization
|
|
60
|
+
- Don't remove content unless replaced by better alternative
|
|
61
|
+
- Keep changes focused on new requirements only
|
|
62
|
+
</Constraint>
|
|
63
|
+
|
|
64
|
+
<SuccessCriteria>
|
|
65
|
+
<Criterion>All new requirements integrated clearly</Criterion>
|
|
66
|
+
<Criterion>Existing design integrity maintained</Criterion>
|
|
67
|
+
<Criterion>Changes are clearly marked and justified</Criterion>
|
|
68
|
+
<Criterion>Document remains coherent and implementable</Criterion>
|
|
69
|
+
<Criterion>No unintended side effects introduced</Criterion>
|
|
70
|
+
</SuccessCriteria>
|
|
71
|
+
</Prompt>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{/* Converted from update-documentation.md */}
|
|
2
|
+
<Prompt name="update-documentation" description="Update Documentation" tags={[]}>
|
|
3
|
+
<Section>
|
|
4
|
+
Update our documentation. Review every file in the project to make sure that if it is relevant it is included in the documentation. Update our README.md and ensure that all the information is complete and accurate.
|
|
5
|
+
</Section>
|
|
6
|
+
</Prompt>
|