3. Prompt Creation & Refinement
This is one of Athanor's core workflows. Learn how to create effective AI prompts with the right context and structure.
The Prompt Creation Process
Step 1: Select Relevant Files
In the File Explorer (left panel):
- Check boxes next to files and folders relevant to your task
- Folder selection automatically includes non-hidden descendants
- Multi-select allows you to choose files from different directories
Selection Strategy Tips:
- Include files you want to modify
- Add related files for context (interfaces, types, configurations)
- Consider including documentation or README files
- Don't over-select - focus on what's truly relevant
- No worries if this seems tedious–we'll see how to automate this soon
Step 2: Write Your Task Description
Navigate to the Prompt Studio (Workbench tab) and use the "Task Description" area:
Example: "Implement a new function to sort users by registration date"
Example: "Refactor the ApiService.ts to use async/await instead of promises"
Example: "Explain how the authentication middleware works"
Task Description Best Practices:
- Be specific about what you want to achieve
- Include any constraints or requirements
Step 3: Use Context Field (Optional)
The Context field below the task description is useful for:
- Partial commit messages
- Specific technical requirements
- Temporary notes or instructions
- Information that shouldn't be part of the main task
You won't need to use this most of the time.
Step 4: Choose a Prompt Template
Athanor provides several preset prompt templates:
Core Prompt Types
- Autoselect: Asks the AI to suggest which files are relevant to your task
- Query: For asking questions about the codebase without making changes
- Architect: For planning new features or refactorings, often breaking them into multiple steps ("commits")
- Coder: For generating code to implement a feature or change
- Minimal: Provides only repository information and your task description
- Writer: For writing or editing text, like documentation
- Meta-prompt: For creating a detailed prompt from a simpler task description
Prompt Variants
Many prompt templates have variants (e.g., "Default", "Full file updates"):
- Right-click a prompt button to see available variants
- Select a different variant via the context menu
- Left-click the button to use the active variant
Step 5: Configure Options
Use the configuration toggles to customize your prompt:
- Smart Preview: Truncates non-selected files to essential parts only
- If inactive, only the selected files are included in the prompt
- Include File Tree: Adds a schematic of your project's file structure (recommended)
- Include Project Info: Includes on top general project information (from
PROJECT.md
or a similar project file) - Documentation Format: Switches between XML tags and Markdown for file content formatting
Step 6: Generate and Copy
- Click your chosen prompt button (e.g., "Coder")
- The prompt appears in the "Generated Prompt" area
- Automatic copy: The prompt is automatically copied to your clipboard
Example Workflow
Let's walk through creating a prompt for a new feature:
- Select files:
userController.ts
,userService.ts
,userTypes.ts
- Task description: "Add a new API endpoint
/users/active
that returns only users active in the last 30 days" - Choose prompt: Click "Coder" for implementation-focused prompt
- Generated prompt: Comprehensive prompt with file contents and clear instructions
- Copy to AI: Paste into ChatGPT, Claude, or your preferred AI assistant
Prompt Types in Detail
Autoselect Workflow
Perfect when you're not sure which files to include or when you feel lazy (which if you are like me I assume it's most of the time):
- Describe your task without selecting specific files
- Click "Autoselect" to generate a file selection prompt
- Ensure "Smart Preview" is active, so that the prompt includes code snippets
- Paste into AI to get file recommendations
- Apply AI Output to automatically select suggested files
- Generate a follow-up prompt with the selected files
Query Workflow
Great for understanding existing code:
- Ask specific questions in the task description
- Select (or Autoselect) files you want to understand or may be needed to answer your query
- Use "Query" prompt for analysis-focused output
- Get explanations without code modifications
- You can ask the AI assistant for a summary of your conversation (possibly to reuse in Athanor for your next prompt)
Architect Workflow
Ideal for complex features:
- Describe the overall feature you want to build
- Again, Select or Autoselect relevant files
- Use "Architect" to get a step-by-step plan
- Receive commit-by-commit breakdown
- Use individual commits as context for follow-up "Coder" prompts
- You can select individual commits from the Task Context area
- You can also just proceed with your AI assistant, asking it to implement one commit at a time ("Go on with Commit 2", ...)
Tips for Better Prompts
- Be specific: Vague descriptions lead to generic responses
- Provide context: Include relevant background information
- Set expectations: Mention coding style, patterns, or constraints
- Use examples: If you have preferences, include examples
- Iterate: Start with a simple prompt and refine based on results
Next, learn how to apply the AI's response back to your project!