Your objective is to compare two prompt versions.
Before proceeding, verify that .cocoplus/ exists.
If not: output "CocoPlus not initialized in this directory. Run $pod init to begin." Then stop.
Parse arguments: $prompt compare [path-a] [path-b]
If both arguments are missing: output "Usage: $prompt compare [path-a] [path-b]" Then stop.
If only one prompt path is provided:
- Validate the prompt exists.
- Offer to scaffold a draft comparison variant: "Only one prompt version was provided. Create an editable draft v2 for comparison? [yes/no]"
- If yes, copy the prompt to the next version name in the same directory, add a clear frontmatter or top-of-file marker
draft_variant: true, and add a note: "Draft variant scaffold — edit before using for final comparison." - Stop after creating the draft. Do not run
$prompt compareuntil the developer has revised the draft. - If no, show usage and stop.
Read both prompt files. If either does not exist: output error with which file is missing. Then stop.
Test Input Collection
Ask: "Provide 3-5 test inputs to compare the prompts against (one per line):"
Run Comparison
For each test input, generate output using both prompts (invoke Cortex COMPLETE function via SnowflakeSqlExecute with each prompt as system context).
Output Comparison Table
# Prompt Comparison: [prompt-a name] vs [prompt-b name]
| Test Input | Prompt A Output | Prompt B Output | Difference |
|------------|----------------|----------------|------------|
[one row per test input]
## Analysis
Prompt A: [strengths and weaknesses]
Prompt B: [strengths and weaknesses]
Recommendation: [which prompt to use and why]
Anti-Rationalization
| Shortcut / Temptation | Why It Fails |
|---|---|
| Compare with only one input | A single case hides regressions and overfits the recommendation |
| Skip difference column details | Without explicit diffs, recommendation becomes subjective |
| Ignore missing prompt file validation | Comparison output becomes misleading and non-reproducible |
| Treat a scaffolded draft as a real strategy | The draft is only an editable starting point; the developer must revise it before comparison |
Exit Criteria
- Both prompt files were validated as existing before comparison
- Comparison output includes rows for each provided test input with Prompt A output, Prompt B output, and a difference summary
-
## Analysissection includes strengths and weaknesses for each prompt plus a recommendation - Errors for missing arguments or missing files are handled with clear usage guidance
- One-prompt invocation can scaffold a clearly marked draft variant and stops before comparison