Documentation / Workflows

Workflows & Best Practices

Effective patterns for using CLIO in real projects

Common Workflows

Code Review

YOU: Review the changes in lib/Module.pm and suggest improvements

CLIO: [Reading lib/Module.pm]
      [Running git diff]
      
I've reviewed the changes. Here are my suggestions:
1. Add error handling for null inputs
2. Extract duplicate logic into helper function
3. Add documentation for new parameters

Bug Fixing

YOU: There's a bug in the login function - users can't authenticate

CLIO: [Reading lib/Auth.pm]
      [Searching for 'login' function]
      [Reading test files]
      
Found the issue: token validation is missing a null check on line 47.
Here's the fix...

Refactoring

YOU: Refactor UserController to use dependency injection

CLIO: [Reading controllers/UserController.pm]
      [Analyzing dependencies]
      [Planning changes]
      
I'll refactor this in 3 steps:
1. Create interface for UserService
2. Update constructor to accept injected service
3. Update tests

Shall I proceed?

Best Practices

Be Specific

Provide Context

Use Memory

# Store project conventions
: /memory store test_framework pytest
: /memory store code_style pep8

# CLIO will remember and follow these conventions

Break Down Complex Tasks

YOU: I need to add user authentication with OAuth2

CLIO: This is a complex task. Let's break it down:
1. Install OAuth2 library
2. Create OAuth2 configuration
3. Add login/logout endpoints
4. Update user model
5. Add tests

Which step should we start with?

Tips for Efficiency

Next Steps