Skip to main content

Help me write a task

This document provides comprehensive guidelines for developers on how to write tasks for the Task to code feature. The goal is to ensure that tasks are clearly defined, using the feature’s flexibility in language input to generate accurate code. Following these guidelines, developers can create well-structured tasks that facilitate effective and efficient code generation.

Overview of the Task to code feature

The Task to code feature processes task inputs to generate corresponding code. This guide effectively explains how to leverage this feature, highlighting its support for multiple languages and providing detailed instructions for each component. The aim is to enable developers to produce precise and functional code by clearly defining tasks, and ensuring all necessary details are included.

tip
  1. Title, Description, and Acceptance Criteria are required fields.
  2. Keep the description as specific as you can. You can generate it to give you a start.
  3. Add the Acceptance Criteria if you have them handy. If not, use our Acceptance Criteria Generator to create precise and clear criteria.

See how it works

Understanding task components

1. Task title

Importance:
  • A clear and concise title is crucial for understanding the task at a glance. It sets the context and expectations for the task, making it easier for the system to generate relevant code.
Tips:
  • Be specific and to the point.
  • Ensure the title reflects the task's primary objective.
  • Use simple and clear language, suitable for any language you prefer. Avoid using jargon or overly complex terms that might confuse the system.
Example:
  • Implement a React Login Form with Validation and Error Handling
  • Develop a Flutter Widget for a Customizable Carousel Slider

2. Task description

The importance of including detailed objectives in the description:
  • Clearly state what the task aims to achieve. A detailed objective ensures that the task's purpose is understood and the generated code meets the requirements.

  • Include all necessary details to avoid ambiguity. Specific instructions lead to more accurate code generation and reduce the need for revisions.

  • Detailed objectives help in generating accurate and relevant code. Without clear objectives, the generated code may not align with the intended functionality, leading to inefficiencies and potential errors.

Language flexibility:
  • Write in your natural language or a hybrid language (e.g., Hinglish, Gujlish, Spanglish). This flexibility allows users to express tasks more naturally and comfortably.

  • The system can understand and process tasks in various languages, ensuring accessibility and ease of use. This inclusivity ensures that language barriers do not hinder task creation and code generation.

Examples demonstrating how different languages can be effectively used:

Create a login form with validation. Ensure that the form includes fields for username and password, and validates that both fields are not empty. Additionally, check that the password is at least 8 characters long. Display appropriate error messages if the validation fails.

3. Acceptance criteria

Auto-generated acceptance criteria:
  • When to use: When you don’t have pre-written acceptance criteria or are dealing with generic tasks, you can auto-generate a baseline acceptance criteria that you can edit.

  • Explanation: The system uses descriptions and titles to generate comprehensive and valid acceptance criteria. These criteria ensure that the generated code meets the task's objectives.

  • Reviewing and editing: Always review and edit auto-generated acceptance criteria to ensure they meet the task requirements fully. Manual adjustments can correct any inaccuracies or add additional details specific to your use case that are not covered in the auto-generated acceptance criteria.

Manual input of acceptance criteria:
  • Include detailed and clear criteria if known. Well-defined acceptance criteria provide clear goals for the generated code to meet.

  • Ensure criteria are measurable and specific. This clarity helps in evaluating whether the generated code meets the task's requirements and performs as expected.

Task granularity and scope

Breaking down large tasks

Large tasks should be divided into smaller, manageable components. This approach makes the tasks more approachable and easier to manage.

Traditional Approach to a Coding Task:
  1. Understand requirements: Review what needs to be done.
  2. Break down task: Divide into smaller, manageable parts.
  3. Plan: Outline how to tackle each part.
  4. Code: Implement one part at a time.
  5. Test: Verify each part works as expected.
  6. Debug: Fix any issues found.
  7. Integrate and review: Combine parts and conduct code reviews.

Benefits of granular tasks

  • Clearer objectives. Smaller tasks make it easier to define specific goals and outcomes.

  • Better code generation. Granular tasks provide clearer instructions, leading to more accurate and relevant code generation.

Examples of proper task breakdown

Large task:

"Develop a shopping cart.”

Breakdown:
  1. View shopping cart
  2. Change items in cart
  3. Apply coupon code
  4. Update pricing with applied coupon
  5. Proceed to buy

Using the Task to code feature

Guidelines for entering information

  • Enter a clear and concise title. This sets the context for the task.

  • Provide a detailed description. Include all necessary information to ensure the task is understood.

  • Specify acceptance criteria. Define the standards the generated code must meet to be considered successful.

Auto-generation features

  • Utilize acceptance criteria when appropriate. This feature can save time and streamline the task creation process.

  • Always review and edit auto-generated content to ensure it meets your specific needs. Manual adjustments can enhance accuracy and relevance.

Common pitfalls in task components

1. Lack of objectives or clear criteria

Don't Do
Tasks without clear objectives or criteria can lead to misunderstandings and inaccurate code generation. Code generation may struggle to understand what needs to be achieved, resulting in misaligned outputs.

Must Do
Always specify clear goals and standards. Detailed descriptions ensure that WiseGPT understands the task's purpose and expected outcomes.


2. Inappropriate language use

Don't Do
Using overly complex language can confuse the system. Ambiguous language may lead to misinterpretation and errors in the generated code.

Must Do
Use standard English or mixed languages without losing clarity. Ensure the task is understandable in the chosen language. Simple, clear language helps in accurate code generation and reduces the need for revisions.


3. Overgeneralization

Don't Do
Broad or unclear task scopes can result in incomplete or unfocused code. Generalized tasks may not provide enough direction, leading to inefficient or inaccurate outputs.

Must Do
Avoid overly broad or unclear task scopes. Be specific and detailed in task descriptions. Detailed instructions help the system generate relevant and precise code, ensuring the task's objectives are met.


Example

Don't Do
"Generate login screen UI."


This task is too broad, lacks detail, and is unclear in its requirements.

Must Do
"Generate login screen UI with 2 inputs, one for email and one for password with a 'login' button and forgot password hyperlink below the button. Include validation for email and password validity. Password must be 8 characters long containing at least a number, a lowercase alphabet, an uppercase alphabet, and a symbol like @#$%."


This task is specific, detailed, and clear in its requirements.

Frequently Asked Questions

How to write tasks in different languages?

You can write tasks in any language you are comfortable with. The system supports multiple languages, ensuring accessibility and ease of use.

What if my task is too broad?

Break it down into smaller, more manageable components. Smaller tasks are easier to manage and lead to more accurate code generation.

Can I rely solely on auto-generated acceptance criteria?

It's best to review and edit auto-generated content to ensure it meets your specific needs. Manual adjustments enhance accuracy and relevance.