Experiment with different approaches before committing to implementation
Generates experimental prototypes to compare technical approaches and provide evidence-based implementation recommendations.
/plugin marketplace add uw-ssec/rse-plugins/plugin install ai-research-workflows@rse-pluginsThis step is OPTIONAL in the workflow — only use when the best approach is genuinely uncertain.
Your job:
Be honest about trade-offs:
When this command is invoked:
If argument AND plan/research doc reference provided (e.g., /experiment JWT vs sessions @plan-auth.md):
If argument provided but no doc reference (e.g., /experiment JWT vs sessions):
.agents/.agents/{research,plan}-*.mdIf no argument provided:
What would you like to experiment with?
Available research and plan documents in .agents/:
[List any relevant .md files, or state "None found"]
I can help you experiment with:
- Comparing different technical approaches
- Testing integration patterns
- Validating performance characteristics
- Prototyping architecture decisions
Please describe what you want to test and why.
.agents/From research and plans, identify:
Clarify what the experiment should answer:
Be specific. Vague questions lead to vague experiments.
I'm testing: [Clear statement of what's being compared]
The question: [Specific question to answer]
Why this matters: [Context for why we need to experiment]
More than 3 approaches makes comparison difficult. Fewer than 2 isn't really an experiment.
Good approaches:
Bad approaches (too similar):
How will you know if an approach works?
Example criteria:
For each approach, follow this pattern:
### Approach N: [Name]
**Description:** [How this approach works]
**Pros:**
- [Advantage 1]
- [Advantage 2]
**Cons:**
- [Disadvantage 1]
- [Disadvantage 2]
**Complexity:** Low | Medium | High
Actually write code — don't just theorize.
Create:
Where to put experimental code:
git checkout -b experiment-[slug]mkdir -p .experiments/[slug]Run actual code — execute tests, measure performance, verify integration.
# Run the prototype
python experiment_jwt.py
# Measure performance
time python benchmark.py
# Test integration
pytest tests/test_experiment.py -v
Document what happened:
What worked:
api/middleware/auth.pyWhat didn't work:
Performance characteristics:
Complexity assessment:
Maintainability observations:
Record both successes and failures:
Use a table to compare approaches across key dimensions:
| Criterion | Approach 1 | Approach 2 | Approach 3 |
|-----------|------------|------------|------------|
| **Performance** | 45ms avg | 120ms avg | 80ms avg |
| **Complexity** | Medium | Low | High |
| **Maintainability** | Good | Excellent | Fair |
| **Integration Ease** | Clean | Requires changes | Complex |
| **Test Coverage** | Easy to test | Easy to test | Hard to mock |
**Recommended Approach:** [Approach Name]
**Reasoning:**
[Explain why this approach is recommended. Be specific and honest about trade-offs.]
Based on experiments:
- [Key finding 1 that supports recommendation]
- [Key finding 2 that supports recommendation]
- [Trade-off accepted because...]
**Why Not Others:**
- **Approach X:** [Specific reason with evidence]
- **Approach Y:** [Specific reason with evidence]
Be honest about conditions and limitations:
**Caveats:**
- This recommendation assumes [assumption]
- Performance may differ under [condition]
- Requires [dependency] which adds complexity
## When to Use Alternatives
**Use Approach 2 if:**
- [Condition that would make it better]
- [Scenario where trade-offs shift]
**Use Approach 3 if:**
- [Different requirement]
- [Different constraint]
experiment-<slug>.md/experiment JWT vs sessions → .agents/experiment-jwt-vs-sessions.mdRead from: ${CLAUDE_PLUGIN_ROOT}/skills/research-workflow-management/assets/experiment-template.md
Include:
Critical requirements:
.agents/ directory if needed: mkdir -p .agents.agents/experiment-<slug>.mdPresent a concise summary:
# Experiment Complete: [Topic]
I've documented the experiment at `.agents/experiment-[slug].md`.
## Approaches Tested:
1. **[Approach 1]** — [One-line summary]
2. **[Approach 2]** — [One-line summary]
3. **[Approach 3]** — [One-line summary]
## Key Findings:
- [Finding 1]
- [Finding 2]
- [Finding 3]
## Recommendation:
**Use [Approach Name]** because [primary reason].
Trade-offs accepted:
- [Trade-off 1]
- [Trade-off 2]
The experiment document includes:
- Full code prototypes
- Performance measurements
- Comparison matrix
- Conditions for alternative approaches
Would you like to proceed with this recommendation, or explore further?
Don't just theorize — execute real code:
Good experimentation:
# Created prototype at .experiments/jwt-auth/test_jwt.py
# Running benchmark:
$ python benchmark_jwt.py
Average auth time: 45ms (1000 requests)
Bad experimentation (no execution):
Approach 1 would probably be faster because it has fewer database calls.
Every approach has downsides. Document them:
Good:
Approach 1 is fastest (45ms) but requires Redis dependency
and adds operational complexity.
Bad:
Approach 1 is fastest and best in every way.
Test one thing at a time:
Include negative results:
Example:
❌ Approach 2 looked promising but failed when:
- Multiple concurrent requests caused race conditions
- Token refresh logic became complex
- Integration required rewriting middleware
These failures rule out this approach.
When discussing integration:
api/middleware/auth.py:45-60Experiments should reference:
Experiments inform:
/iterate-plan — Results can update implementation approach/plan — If planning is next, experiment provides evidenceUse relative links in document:
## References
**Research Documents:**
- [Research: Auth System](research-auth-system.md)
**Plan Documents:**
- [Plan: Auth Implementation](plan-auth-implementation.md)
Skip experimentation when:
Example of when to skip:
User: Should I use JWT or sessions?
You: The codebase already uses JWT everywhere.
Follow that pattern. No experiment needed.
Before completing experimentation, verify:
.agents/experiment-<slug>.mdRemember: Good experiments provide evidence for decisions. They trade short-term investment for long-term confidence.