π¬Prompting Cosine
Cosine is your AI-powered software engineer, ready to assist with tasks ranging from bug fixes to feature implementations. To get the most out of Cosine, it's helpful to understand how to communicate effectively with it.β
Best Practices for Prompting
While Cosine is designed to understand and process a wide range of instructions, providing clear and concise prompts can enhance its effectiveness. Here are some tips:β
Be Specific: Clearly state what you want Cosine to do. For example, instead of saying "fix the issue," specify "resolve the null pointer exception in
UserService.java
."βProvide Context: If the task involves specific files or functions, mention them. This helps Cosine focus on the relevant parts of your codebase.β
Use Step-by-Step Instructions: For complex tasks, breaking them down into smaller steps can make it easier for Cosine to process and execute them.β
Iterate as Needed: Don't hesitate to refine your prompts based on Cosine's responses. Collaboration leads to better outcomes.β
Cosine's Capabilities
Cosine comes equipped with a suite of tools to assist you:β
File Reading: Cosine can read and analyze files in your repository.β
File Search: Search for specific files or content within your codebase.β
Keyword Search: Find occurrences of specific keywords across your project.β
Directory Navigation: Navigate through your project's directory structure to locate files and folders.β
URL Reading: Fetch and process content from specified URLs.β
Web Search: Perform web searches to gather information or resources.β
Code Execution: Run code snippets to test functionality or validate changes.β
You can guide Cosine by suggesting which tools might be most helpful for a given task.β
Linking Files and Tickets
To provide Cosine with additional context:β
Attach Files: Use the file explorer to select and attach relevant files to your prompt.β
Link Tickets: Associate tasks with existing tickets or issues to give Cosine a clearer understanding of the objectives.β
Utilizing Workflows
Cosine can monitor and interact with your CI workflows:β
Workflow Monitoring: Configure Cosine to watch specific CI steps, such as tests or linters.β
Automated Iteration: If a workflow step fails, Cosine can analyze the logs, make necessary code changes, and re-run the workflow until it passes.β
To set this up, navigate to your project's settings and specify which CI steps Cosine should monitor.β
By following these guidelines and leveraging Cosine's capabilities, you can streamline your development process and focus on building great software.β
Last updated
Was this helpful?