Step 228: Add prompt templates

This commit is contained in:
Bill
2026-02-10 08:20:59 -07:00
parent 1d91c49b15
commit 7e329b6a2e
9 changed files with 126 additions and 1 deletions

View 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.

View 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.

View 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.

View 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.

View 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.