8. Example Workflows
Learn how to apply Athanor's features in real-world scenarios with these step-by-step workflow examples, from simple feature additions to complex system integrations.
Simple Feature: Dark Mode Toggle
Let's implement a dark mode toggle for a web application.
Step 1: Define the Task
Task Description:
Implement a dark mode toggle switch in the settings panel that saves the user's preference to localStorage and applies the theme immediately.
Step 2: Smart File Selection
Instead of manually selecting files, let's use Athanor's intelligence:
- Don't select any files initially
- Click "Autoselect" prompt template
- Copy the generated prompt to your AI assistant
- Paste response back into Athanor
- Click "Apply AI Output" to auto-select relevant files
The AI might suggest files like:
components/SettingsPanel.tsx
hooks/useTheme.ts
styles/globals.css
contexts/ThemeContext.tsx
Step 3: Implement the Feature
- Review the auto-selected files
- Click "Coder" prompt template
- Copy prompt to AI assistant
- Receive implementation with proper React hooks, CSS variables, and localStorage persistence
Step 4: Apply Changes
- Copy AI response
- Click "Apply AI Output"
- Review each proposed change in the diff viewer
- Accept changes that look correct
- Reject any unwanted modifications
Expected Outcome
- New theme toggle component
- Hook for theme management
- CSS variables for dark/light modes
- Persistent user preferences
Complex Feature: Stripe Payment Integration
Let's integrate Stripe for handling monthly user subscriptions with a multi-commit approach.
Phase 1: Architecture Planning
Task Description:
Integrate Stripe for handling monthly user subscriptions. This should include:
- Creating subscription plans
- Handling webhooks for payment success/failure
- Updating user subscription status
- Managing billing portal access
- Error handling and user feedback
Step 1: Get the Architecture Plan
- Click "Autoselect" to identify relevant files
- Apply AI Output to select suggested files
- Click "Architect" prompt template
- Copy to AI assistant for strategic planning
The AI will provide a commit-by-commit breakdown:
Commit 1: Setup Stripe SDK and API keys Commit 2: Implement subscription plan management Commit 3: Create checkout session handling Commit 4: Implement webhook endpoint Commit 5: Build user billing portal Commit 6: Add error handling and UI feedback
Step 2: Copy Architecture to Context
- Copy the AI's architecture response
- Paste the commit plan into the Context field
- This will be included in subsequent prompts
Phase 2: Implementation (Commit by Commit)
Commit 1: Setup Stripe SDK
- Select "Commit 1" from Task Context:
Implement Commit 1: Setup Stripe SDK and API keys.
Configure environment variables and initialize Stripe client. - Use existing file selection (you rarely need to rerun Autoselect)
- Click "Coder" prompt
- Apply changes after review
Commit 2: Subscription Plans
- Either:
- Continue in your current AI chat by telling the AI "Continue with Commit 2"; or
- Select "Commit 2" from Task Context, click "Coder prompt" and paste in a new chat
- This choice depends on the complexity and length of the current chat
- Review and apply changes
Continue Pattern for Remaining Commits
Repeat the process for each commit:
- Update task context with current commit (or continue in the chat)
- Use "Coder" prompt for implementation
- Apply and test changes
- Move to next commit
Phase 3: Integration Testing
After completing all commits:
- Task Description:
Review the complete Stripe integration implementation and provide:
- Integration testing checklist
- Potential security considerations
- Performance optimization opportunities
- Error scenarios to test - Select all modified files
- Use "Query" prompt for analysis
- Follow AI recommendations for testing
Understanding Existing Code: Authentication Flow
Learn how to use Athanor to understand unfamiliar codebases.
Step 1: Broad Overview
Task Description:
Explain the current user authentication flow, including:
- Token generation and validation
- Session management
- Role-based access control
- Security measures implemented
- Which files are primarily involved?
Process:
- Click "Autoselect" to find auth-related files
- Apply AI Output to select suggested files
- Click "Query" prompt for analysis-focused output
- Review AI's explanation of the authentication system
Step 2: Deep Dive into Specific Components
Based on the AI's overview, dive deeper on the JWT token validation middleware.
Process:
- Select specific middleware files identified in Step 1
- Use the copy action from the File Manager to copy just these files in the existing chat
- Ask follow-up questions in the same AI chat
Step 3: Document Your Understanding
Process:
- Ask the AI for a Summary of your chat
- Paste the summary into the Task Description
- Autoselect all authentication-related files
- Use "Writer" prompt for documentation generation
- Apply changes to create/update documentation files
Best Practices for Workflow Success
Planning Phase
- Start with Autoselect when unsure about file selection
- Use Architect for complex features requiring multiple steps
- Break large tasks into smaller, manageable commits
- Document your plan in the Context field
Implementation Phase
- Review AI suggestions carefully before applying
- Test incrementally after each commit
- Use version control to track changes
- Ask follow-up questions when AI responses are unclear
- Stay in the chat if the context is still relevant
Quality Assurance
- Use Query prompts to verify understanding
- Generate tests for critical functionality
- Review security implications of changes
- Document important decisions and changes
Team Collaboration
- Share custom templates that work well for your team
- Use consistent commit messages when applying changes
- Document workflows that prove effective
- Train team members on successful patterns
Troubleshooting Common Workflow Issues
AI Responses Don't Match Expectations
- Refine task descriptions with more specific requirements
- Add relevant context about coding standards or patterns
- Include examples of desired output format
- Break complex requests into smaller parts
Changes Don't Apply Cleanly
- Check that files haven't changed since generating the prompt
- Regenerate prompts with current file state
- Review merge conflicts carefully
- Apply changes in smaller batches
Workflow Takes Too Long
- Use preset tasks for common operations
- Create custom templates for repeated workflows
- Leverage API integration for simple requests
- Batch similar operations together
Results Lack Project Context
- Include
PROJECT.md
or documentation files in selection - Add project-specific requirements to task descriptions
- Use project-specific custom templates
- Provide architectural context in prompts
Ready to master Athanor? Practice these workflows with your own projects and experiment with creating custom templates that match your team's specific needs!