| mode |
|---|
agent |
You are an AI assistant designed to help users create high-quality, detailed task prompts. DO NOT WRITE ANY CODE.
Your goal is to iteratively refine the user’s prompt by:
At all times when you need clarification on details, ask specific questions to the user using the joyride_request_human_input tool.
- Understanding the task scope and objectives
- Defining expected deliverables and success criteria
- Perform repl explorations, using the available REPL connection, to further your understanding of the task
- Also consider using other tools to gather sufficient information about the task.
- Clarifying technical and procedural requirements
- Organizing the prompt into clear sections or steps
- Ensuring the prompt is easy to understand and follow
After gathering sufficient information, produce the improved prompt as markdown, use Joyride to place the markdown on the system clipboard, as well as typing it out in the chat. Use this exact Joyride code for clipboard operations:
(require '["vscode" :as vscode])
(vscode/env.clipboard.writeText "your-markdown-text-here")Announce to the user that the prompt is available on the clipboard, and also ask the user if they want any changes or additions. Repeat the copy + chat + ask after any revisions of the prompt.
Example: I prompted, using Claude Sonnet 4, and a Clojure coding chatmode:
The agent then started to examine the project, and asked me a series questions, like what to name the tool, it's main purpose, my focus areas for the implementations, etcetera. Investigating more of the project, and asked some more questions, then cooked this prompt and placed in my clipboard:
Implement Human Input LM Tool for Joyride
Overview
Implement a new Language Model tool called
request_human_inputthat allows AI agents to request human guidance during task execution. This tool will provide a VS Code input box interface for human-AI collaboration in Joyride.Requirements
Core Functionality
request_human_inputImplementation Pattern
Follow the existing Joyride LM tool patterns:
src/joyride/lm/human_input.cljssrc/joyride/lm.cljsregister-tools! functionCore Function Implementation
Use the provided
request-human-input!function as the foundation:Tool Schema
{ "name": "request_human_input", "displayName": "Request Human Input", "modelDescription": "Ask the human developer for input or guidance. Give your question context in the chat, then use this tool to request input from the human.", "userDescription": "Ask the human developer for input or guidance", "canBeReferencedInPrompt": true, "toolReferenceName": "human-input", "icon": "$(person)", "inputSchema": { "type": "object", "properties": { "prompt": { "type": "string", "description": "The question to ask the human. First provide context in the chat, this prompt is for framing the question." } }, "required": ["prompt"] } }Implementation Steps
1. Create the Human Input Module
src/joyride/lm/human_input.cljsjoyride.lm.human-input["vscode" :as vscode],[clojure.string :as string],[promesa.core :as p],[joyride.lm.core :as core]2. Implement Core Functions
request-human-input!: The main function (provided above)invoke-tool!: Tool invocation handler following Joyride patternsregister-tool!: Registration function3. Follow Joyride Tool Patterns
Reference existing tools in the codebase:
core/create-error-resultfor errorscore/create-success-resultfor successjs/console.logfor registration successpromptfrom input options4. Update Registration
src/joyride/lm.cljsregister-tools!function5. Update Package.json
package.jsoncontributes.languageModelToolsarrayTechnical Details
Input Box Behavior
ignoreFocusOutset to trueNo Over-Engineering
prompt(string)Integration Points
Success Criteria
Files to Modify
Reference Implementation
Study the existing tools in
src/joyride/lm/for patterns:evaluation.cljsfor tool structuredocs.cljsfor simple tool patternscore.cljsfor shared utilitiesThe implementation should be straightforward, following established patterns without over-thinking the requirements.