search
HomeBackend DevelopmentPython TutorialHow to Create Custom Plans with 'plan.md” in Goose

How to Create Custom Plans with “plan.md” in Goose

What is Goose?
Goose is a developer agent that enhances software development by automating coding tasks within your terminal or IDE. Guided by your input, it intelligently analyzes your project’s needs, generates the necessary code, and implements changes autonomously. When working with Goose, having a structured way to guide its execution toward specific goals is essential. This is where the plan.md file comes in. A plan.md file allows you to define a customized plan for Goose, using flexible text formatting and the power of Jinja templating to create dynamic, reusable, and goal-oriented plans.

How to Set Up Goose
Before creating your custom plan.md file, you need to set up Goose.

Step1: Fork the Goose and Goose Plugin repositories on GitHub and clone them.

Step2: Install Homebrew — Visit brew.sh and follow the installation steps, or run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Step3: To install Goose, use pipx. First ensure pipx is installed:

brew install pipx
pipx ensurepath

Step4: Then install Goose:

pipx install goose-ai

Step 5: Start a session — From your terminal, navigate to the directory you’d like to start from and run:

goose session start

Goose works with your preferred LLM. By default, it uses openai as the LLM provider. You'll be prompted to set an API key.

What Are “plan.md”Files?

The plan.md file is a text file that serves as a blueprint for Goose to follow. It consists of two essential components:

A kickoff message that sets the context and overall goal
A structured list of tasks for Goose to execute.

Why Use plan.md file?

  • Customization:
    You can tailor Goose’s actions for specific tasks or projects.

  • Reusability:
    Templates make it easy to reuse and modify plans for similar goals.

  • Clarity:
    Outlining goals and steps ensures better control and predictability.

Creating Your First plan.md File

Let’s say you want Goose to help set up a new design system. Here’s an example of how your plan.md might look:

Your goal is to set up a fresh design system for our app's redesign.

- Create folders for design components (buttons, forms, colors)
- Set up color palette based on brand guidelines
- Create typography styles for headings and body text
- Design basic button components with all states
- Create form elements (inputs, dropdowns)

See those dashes (-) at the start of each line in the tasks? Super important! Goose looks for these to understand what steps it needs to take. To run Goose with this plan:

goose session start --plan plan.md

Using Jinja Templating in Plans
Jinja is a templating engine that allows you to embed variables, loops, and conditionals directly in your text files. With Jinja, you can make plan.md files dynamic and adaptable.

Key Jinja Syntax

  • Variables: {{ variable }}

  • Loops: {% for item in list %}...{% endfor %}

  • Conditionals: {% if condition %}...{% endif %}

Remember our plan.md file, here’s what an enhanced version using jinja templating would look like.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Passing Arguments to Plan
Arguments can be passed into a plan.md file during execution. For example, to make our design system setup plan dynamic and reusable, we use Jinja templating, which allows us to pass arguments that customize the content based on specific projects, brands, or design requirements. By passing different sets of arguments, we can easily generate personalized plans for any redesign or product.

Example: Passing Arguments with Jinja

Define the Data: The first step is to prepare the data you want to pass into the template. This includes values like the brand name, colors, typography styles, and other design-specific details.

brew install pipx
pipx ensurepath

To run Goose with this plan and arguments, you would run the following command:

pipx install goose-ai

Goose will populate the placeholders in plan.md with these values.

goose session start

Best Practices and Tips

  • Define Clear Goals: Ensure each plan starts with a clear objective.
  • Use Reusable Templates: Create general templates that can be customized for different projects.
  • Document Assumptions: Add comments or notes to explain placeholders and structure.
  • Test Small Changes: Validate each change in the plan.md file to ensure correct rendering.

Conclusion
The plan.md file is a versatile tool for guiding Goose's execution in achieving your goals. By combining clear objectives, structured steps, and dynamic Jinja templating, you can create reusable and highly customizable plans. Whether you're improving a mobile app's UX or tackling a complex project, plan.md empowers you to provide clarity, adaptability, and precision to Goose.

The above is the detailed content of How to Create Custom Plans with 'plan.md” in Goose. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Why are arrays generally more memory-efficient than lists for storing numerical data?Why are arrays generally more memory-efficient than lists for storing numerical data?May 05, 2025 am 12:15 AM

Arraysaregenerallymorememory-efficientthanlistsforstoringnumericaldataduetotheirfixed-sizenatureanddirectmemoryaccess.1)Arraysstoreelementsinacontiguousblock,reducingoverheadfrompointersormetadata.2)Lists,oftenimplementedasdynamicarraysorlinkedstruct

How can you convert a Python list to a Python array?How can you convert a Python list to a Python array?May 05, 2025 am 12:10 AM

ToconvertaPythonlisttoanarray,usethearraymodule:1)Importthearraymodule,2)Createalist,3)Usearray(typecode,list)toconvertit,specifyingthetypecodelike'i'forintegers.Thisconversionoptimizesmemoryusageforhomogeneousdata,enhancingperformanceinnumericalcomp

Can you store different data types in the same Python list? Give an example.Can you store different data types in the same Python list? Give an example.May 05, 2025 am 12:10 AM

Python lists can store different types of data. The example list contains integers, strings, floating point numbers, booleans, nested lists, and dictionaries. List flexibility is valuable in data processing and prototyping, but it needs to be used with caution to ensure the readability and maintainability of the code.

What is the difference between arrays and lists in Python?What is the difference between arrays and lists in Python?May 05, 2025 am 12:06 AM

Pythondoesnothavebuilt-inarrays;usethearraymoduleformemory-efficienthomogeneousdatastorage,whilelistsareversatileformixeddatatypes.Arraysareefficientforlargedatasetsofthesametype,whereaslistsofferflexibilityandareeasiertouseformixedorsmallerdatasets.

What module is commonly used to create arrays in Python?What module is commonly used to create arrays in Python?May 05, 2025 am 12:02 AM

ThemostcommonlyusedmoduleforcreatingarraysinPythonisnumpy.1)Numpyprovidesefficienttoolsforarrayoperations,idealfornumericaldata.2)Arrayscanbecreatedusingnp.array()for1Dand2Dstructures.3)Numpyexcelsinelement-wiseoperationsandcomplexcalculationslikemea

How do you append elements to a Python list?How do you append elements to a Python list?May 04, 2025 am 12:17 AM

ToappendelementstoaPythonlist,usetheappend()methodforsingleelements,extend()formultipleelements,andinsert()forspecificpositions.1)Useappend()foraddingoneelementattheend.2)Useextend()toaddmultipleelementsefficiently.3)Useinsert()toaddanelementataspeci

How do you create a Python list? Give an example.How do you create a Python list? Give an example.May 04, 2025 am 12:16 AM

TocreateaPythonlist,usesquarebrackets[]andseparateitemswithcommas.1)Listsaredynamicandcanholdmixeddatatypes.2)Useappend(),remove(),andslicingformanipulation.3)Listcomprehensionsareefficientforcreatinglists.4)Becautiouswithlistreferences;usecopy()orsl

Discuss real-world use cases where efficient storage and processing of numerical data are critical.Discuss real-world use cases where efficient storage and processing of numerical data are critical.May 04, 2025 am 12:11 AM

In the fields of finance, scientific research, medical care and AI, it is crucial to efficiently store and process numerical data. 1) In finance, using memory mapped files and NumPy libraries can significantly improve data processing speed. 2) In the field of scientific research, HDF5 files are optimized for data storage and retrieval. 3) In medical care, database optimization technologies such as indexing and partitioning improve data query performance. 4) In AI, data sharding and distributed training accelerate model training. System performance and scalability can be significantly improved by choosing the right tools and technologies and weighing trade-offs between storage and processing speeds.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)