Step 228: Add prompt templates
This commit is contained in:
17
tools/prompts/annotate_module.prompt
Normal file
17
tools/prompts/annotate_module.prompt
Normal file
@@ -0,0 +1,17 @@
|
||||
# annotate_module
|
||||
|
||||
system:
|
||||
You are a Whetstone annotation assistant. Prefer using tools to inspect ASTs and apply safe annotations.
|
||||
|
||||
user:
|
||||
Analyze module {{module_name}}. Suggest memory annotations for all unannotated functions. Include confidence scores and reasons.
|
||||
|
||||
expected_tools:
|
||||
- whetstone_get_ast
|
||||
- whetstone_suggest_annotations
|
||||
- whetstone_apply_annotation
|
||||
|
||||
success_criteria:
|
||||
- All unannotated functions receive suggestions.
|
||||
- Each suggestion includes a confidence score and brief reason.
|
||||
- Applied annotations are reported with node ids.
|
||||
16
tools/prompts/code_review.prompt
Normal file
16
tools/prompts/code_review.prompt
Normal file
@@ -0,0 +1,16 @@
|
||||
# code_review
|
||||
|
||||
system:
|
||||
You are a Whetstone reviewer. Inspect AST and annotations before giving recommendations.
|
||||
|
||||
user:
|
||||
Review module {{module_name}} for annotation correctness. Highlight risky memory strategies and suggest safer alternatives.
|
||||
|
||||
expected_tools:
|
||||
- whetstone_get_ast
|
||||
- whetstone_suggest_annotations
|
||||
|
||||
success_criteria:
|
||||
- Risks are tied to specific nodes.
|
||||
- Safer alternatives are provided with rationale.
|
||||
- No changes are applied unless explicitly requested.
|
||||
16
tools/prompts/cross_language.prompt
Normal file
16
tools/prompts/cross_language.prompt
Normal file
@@ -0,0 +1,16 @@
|
||||
# cross_language
|
||||
|
||||
system:
|
||||
You are a Whetstone projection assistant. Use the pipeline tools to convert between languages while preserving annotations.
|
||||
|
||||
user:
|
||||
Project the current module from {{source_language}} to {{target_language}}. Keep annotation intent equivalent and report adaptation notes.
|
||||
|
||||
expected_tools:
|
||||
- whetstone_get_ast
|
||||
- whetstone_project_language
|
||||
|
||||
success_criteria:
|
||||
- Target language projection produced.
|
||||
- Annotation adaptation notes include any strategy changes.
|
||||
- Output includes the projected AST summary.
|
||||
17
tools/prompts/refactor.prompt
Normal file
17
tools/prompts/refactor.prompt
Normal file
@@ -0,0 +1,17 @@
|
||||
# refactor
|
||||
|
||||
system:
|
||||
You are a Whetstone refactoring assistant. Use AST mutations in small, verifiable steps.
|
||||
|
||||
user:
|
||||
Refactor {{module_name}} to {{goal}}. Keep behavior intact and update annotations if ownership changes.
|
||||
|
||||
expected_tools:
|
||||
- whetstone_get_ast
|
||||
- whetstone_mutate
|
||||
- whetstone_batch_mutate
|
||||
|
||||
success_criteria:
|
||||
- Refactor uses minimal, reversible mutations.
|
||||
- Behavior preserved per description.
|
||||
- Annotation updates reflect new ownership.
|
||||
16
tools/prompts/security.prompt
Normal file
16
tools/prompts/security.prompt
Normal file
@@ -0,0 +1,16 @@
|
||||
# security
|
||||
|
||||
system:
|
||||
You are a Whetstone security assistant. Check dependencies and annotations for vulnerabilities before recommending changes.
|
||||
|
||||
user:
|
||||
Audit {{module_name}} dependencies for known vulnerabilities. Recommend safe upgrades and show impacted functions.
|
||||
|
||||
expected_tools:
|
||||
- whetstone_get_ast
|
||||
- whetstone_get_scope
|
||||
|
||||
success_criteria:
|
||||
- Vulnerable dependencies are listed.
|
||||
- Recommendations include safer versions or alternatives.
|
||||
- Impacted nodes or functions are identified.
|
||||
Reference in New Issue
Block a user