Cline - chunhualiao/public-docs GitHub Wiki
https://github.com/cline/cline/blob/main/docs/features/slash-commands/workflows.mdx
Questions: https://deepwiki.com/cline/cline
- cline and pdf
- cline vs windsurf
- windsurf vs allhands
- cline:how does it modify source code
- cline:internal workflow
- cline:large codebase challenge
- cline:developer process
- cline:file creation and editing
overview
- cline:proposal
- cline:latex, cline:rules:latex paper example 1
- cline:paper and code repos
- .clineignore control which files and directories Cline should ignore when analyzing your codebase.
- cline:workflow
- cline:memory bank
clinerules
# Source Code Development Guidelines
## Project Structure
- Source code files in src/ directory
- Test files in tests/ directory
- Documentation in docs/
- Configuration files in project root
- Build artifacts in build/ or dist/
## Code Quality Standards
- Follow language-specific style guides
- Maintain consistent code formatting
- Write comprehensive unit tests
- Document public APIs and interfaces
- Use meaningful variable/function names
- Keep functions focused and concise
- Handle errors appropriately
## Development Practices
- Write modular, reusable code
- Follow SOLID principles
- Use appropriate design patterns
- Implement proper error handling
- Add logging where necessary
- Write clear commit messages
- Keep dependencies up to date
## Build and Testing
- Ensure all tests pass before commits
- Maintain CI/CD pipeline
- Keep build times reasonable
- Monitor code coverage
- Address compiler warnings
- Follow semantic versioning
## Security Guidelines
- Never commit sensitive data
- Use environment variables for secrets
- Follow security best practices
- Validate user inputs
- Handle data safely
- Use secure dependencies
## Performance Considerations
- Optimize critical paths
- Profile code when necessary
- Handle resources efficiently
- Consider scalability
- Monitor memory usage
## File Patterns to Watch
- Source files (*.js, *.py, *.cpp, etc.)
- Test files (*_test.*, *.test.*, test_*)
- Configuration files (*.json, *.yaml, *.config)
- Build files (Makefile, package.json, etc.)
- Documentation (*.md, *.rst)
## Documentation Requirements
- README.md with setup instructions
- API documentation
- Architecture diagrams
- Contribution guidelines
- Changelog
- License information
## Version Control
- Use meaningful branch names
- Write descriptive commit messages
- Keep PRs focused and manageable
- Review code before merging
- Maintain clean git history
## Dependency Management
- Keep dependencies updated
- Use lock files
- Document dependencies
- Monitor for vulnerabilities
- Minimize dependency footprint
Prompts
The prompts in Cline are defined in several key locations:
-
Core System Prompts (
/src/core/prompts/
):system.ts
: Contains the main system prompt that defines Cline's core capabilities, personality, and tool usage instructions. This is the primary prompt that shapes Cline's behavior and abilities.responses.ts
: Contains formatted responses and instructions for various scenarios like tool usage, error handling, and task management.
-
Documentation and Custom Instructions (
/docs/prompting/
):- Contains documentation about prompting and a library of custom instructions
- Allows for customization of Cline's behavior through user-defined instructions
The system prompt (system.ts
) is particularly important as it:
- Defines Cline's identity as a skilled software engineer
- Specifies the format and rules for tool usage
- Details available tools and their parameters
- Sets up the operating context (working directory, system capabilities)
The responses file (responses.ts
) handles:
- Tool usage errors and denials
- Task resumption and planning
- File edit responses
- Various instruction reminders and error messages
Best model so far
- Gemini-2.0-pro-exp-02-05
Avoid
- gemini-2.0-flash-001: often copy entire code again to the top, horrible!
- llama 3.3 70b instruct -q8: does not follow instructions at all
https://www.reddit.com/r/CLine/comments/1ig6yvs/local_ollama_models_with_tool_use/
I'm also trying to find a good model for local use in Cline. I'm having some luck running "mistral-small-24b-instruct-2501" on my M3 Macbook Pro with 36gb or RAM. I'm running it through LM Studio but Ollama should work fine as well. I expected to this the 32k max content length, but so far I haven't. I'm running some simple tests though, asking it to generate various apps. It's doing ok, better than most other local models.
The other model I've have some luck with is "qwen2.5-7b-instruct-1m". Look into enabling Flash Attention, as it will reduce the amount of memory required to load the models, for example when increasing the context length on the qwen model.
I've also personally not had great luck with the R1 model variants with Cline.