<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shreyanshrewa on Medium]]></title>
        <description><![CDATA[Stories by Shreyanshrewa on Medium]]></description>
        <link>https://medium.com/@shreyanshrewa?source=rss-06c6f9f7acd6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*nLwzsN2dH8QPki1s</url>
            <title>Stories by Shreyanshrewa on Medium</title>
            <link>https://medium.com/@shreyanshrewa?source=rss-06c6f9f7acd6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 20:17:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shreyanshrewa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Your LLM Doesn’t Always Need to Generate Text (How Jev actually works)]]></title>
            <link>https://medium.com/@shreyanshrewa/your-llm-doesnt-always-need-to-generate-text-how-jev-actually-works-40d62b0503cb?source=rss-06c6f9f7acd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/40d62b0503cb</guid>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[how-jev-works]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[jevs]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Shreyanshrewa]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 04:01:01 GMT</pubDate>
            <atom:updated>2026-09-21T04:01:01.852Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A simple look at next-token prediction, KV Cache, and decision-style inference.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kfCClw_yhphuV6sUF2pIFg.png" /></figure><p><strong>TL;DR</strong> (may sound very technical, but article is actually easier)</p><blockquote>Most LLM applications use a model as a text generator. But many real-world tasks don’t actually require generating text. They require making a decision from a small set of possible answers.</blockquote><blockquote>For example, instead of asking an LLM to generate a 30-token JSON response, we can ask it to score a few valid choices directly. With a large shared context, KV caching lets us process that context once, and independent decisions can be evaluated together.</blockquote><p>Same Transformer. Different way of using it.</p><h3>1. We usually think of LLMs as text generators</h3><p>When we use an LLM, we usually imagine something like this:</p><pre>Prompt<br>  ↓<br> LLM<br>  ↓<br>Text</pre><p>Ask:</p><pre>&quot;What is the capital of France?&quot;</pre><p>And the model generates:</p><pre>&quot;The capital of France is Paris.&quot;</pre><p>But that is not what the model fundamentally does.</p><h3>2. What does a Transformer actually do?</h3><p>At its core, a decoder-style LLM takes tokens and produces probabilities for what the next token could be.</p><pre>Input tokens<br>     ↓<br> Transformer<br>     ↓<br>Hidden representation<br>     ↓<br>   LM Head<br>     ↓<br>  Logits<br>     ↓<br>Probability distribution for next token</pre><p>For example, after reading:</p><pre>&quot;The capital of France is&quot;</pre><p>the model may produce:</p><pre>Token    |    Probability<br><br>Paris    |      91%<br>London   |      1%<br>Berlin   |      0.5%<br>banana   |      0.01%<br>...</pre><p>The model has not literally written the word Paris yet.</p><p>It has calculated a probability distribution for what the next token could be.</p><p>Normal generation then chooses a token, appends it to the sequence, and repeats the process.</p><pre>Choose &quot;Paris&quot;<br>      ↓<br>Add &quot;Paris&quot; to the input<br>      ↓<br>Run the model again<br>      ↓<br>Get probabilities for the next token<br>      ↓<br>Choose next token<br>      ↓<br>Repeat</pre><h3>3. Why does normal generation become sequential?</h3><p>Suppose the model needs to generate a longer answer:</p><pre>&quot;The capital of France is&quot;<br>              ↓<br>          predict token<br>              ↓<br>            Paris<br>              ↓<br>&quot;The capital of France is Paris&quot;<br>              ↓<br>          predict token<br>              ↓<br>             ...</pre><p>Every generated token becomes part of the input for the next prediction.</p><p>So token 2 depends on token 1.</p><p>Token 3 depends on token 2.</p><p>And so on.</p><p>This is called autoregressive generation.</p><p>The basic loop is:</p><pre>Previous tokens<br>      ↓<br> Transformer<br>      ↓<br>Next-token probabilities<br>      ↓<br>Choose next token<br>      ↓<br>Append token<br>      ↓<br>   Repeat</pre><h3>4. I came across Jev, and this got interesting</h3><p>While exploring this idea, I came across Jev, a decision-oriented model/system.</p><p>What I found interesting about Jev was not just the model itself, but the way it looks at the problem.</p><p>We usually think:</p><pre>LLM<br> ↓<br>Generate text<br> ↓<br>Parse the output<br> ↓<br>Use the result</pre><p>But <a href="https://typesafe.ai/blog/introducing-system-one-models-and-jev">Jev</a> made me think:</p><p>What if we don’t ask the model to generate the answer at all?</p><p>Suppose I have a large document and I need to answer:</p><pre>risk_level → HIGH / MEDIUM / LOW / NONE</pre><pre>requires_review → TRUE / FALSE</pre><pre>action_tier → TIER_1 / TIER_2 / TIER_3</pre><p>Why make the model generate a whole JSON object?</p><p>The model already produces probabilities for the next token.</p><p>So instead of:</p><pre>&quot;Generate this JSON for me.&quot;</pre><p>we can think about:</p><pre>&quot;Here are the possible answers.<br>Which one does the model assign the highest probability to?&quot;</pre><p>That idea really caught my attention.</p><p>So I wanted to understand what is actually happening underneath the hood, especially around next-token prediction, KV Cache, and how independent decisions could be evaluated together.</p><p>That’s what the rest of this article is about.</p><h3>5. Now come back to the 20k-token problem</h3><p>Imagine we have a 20,000-token document and need four decisions:</p><pre>20,000-token document</pre><pre>Questions:</pre><pre>1. risk_level       → HIGH / MEDIUM / LOW / NONE<br>2. requires_review  → true / false<br>3. action_tier      → TIER_1 / TIER_2 / TIER_3<br>4. category         → A / B / C</pre><p>We want:</p><pre>{<br>  &quot;risk_level&quot;: &quot;HIGH&quot;,<br>  &quot;requires_review&quot;: true,<br>  &quot;action_tier&quot;: &quot;TIER_2&quot;,<br>  &quot;category&quot;: &quot;B&quot;<br>}</pre><p>Now ask yourself:</p><p>Do we really need the LLM to write all of that JSON?</p><p>Not necessarily.</p><p>We already know the structure.</p><p>We only need four decisions.</p><h3>6. What happens with a normal LLM?</h3><p>A normal LLM can be asked:</p><p>Read this document and generate this JSON.</p><p>First, it processes the 20k-token prompt.</p><p>This first stage is called prefill.</p><pre>20k document + instructions + schema<br>                    ↓<br>               Transformer<br>                    ↓<br>                 KV Cache</pre><p>Then it starts generating the JSON.</p><p>Conceptually:</p><pre>20k document<br>     ↓<br>   PREFILL<br>     ↓<br>  KV CACHE<br>     ↓<br>generate &quot;{&quot;<br>     ↓<br>generate &#39;&quot;risk_level&quot;&#39;<br>     ↓<br>generate &quot;:&quot;<br>     ↓<br>generate &#39;&quot;HIGH&quot;&#39;<br>     ↓<br>generate &quot;,&quot;<br>     ↓<br>generate &#39;&quot;requires_review&quot;&#39;<br>     ↓<br>generate &quot;:&quot;<br>     ↓<br>generate &quot;true&quot;<br>     ↓<br>...</pre><p>The important thing is:</p><p>These generations are sequential.</p><p>If the JSON requires 30 tokens, the model goes through roughly 30 decoding steps.</p><pre>token 1<br>   ↓<br>token 2<br>   ↓<br>token 3<br>   ↓<br>...<br>   ↓<br>token 30</pre><h3>7. What is the KV Cache doing?</h3><p>This is where it is easy to misunderstand things.</p><p>During attention, the model creates Key and Value representations for the tokens it has processed.</p><p>During later decoding steps, those previous Key and Value tensors can be reused.</p><p>So:</p><pre>20k document<br>      ↓<br>   PREFILL<br>      ↓<br> Transformer<br>      ↓<br>   KV Cache</pre><p>The model is basically saying:</p><p><em>“I have already processed these 20,000 tokens. I don’t want to calculate the same Key/Value information again.”</em></p><p>So when generating the next token, it can reuse the cached information.</p><p>But there is an important distinction:</p><pre>KV Cache<br>   ↓<br>Reuse previously computed attention information</pre><p>It does not mean:</p><pre>KV Cache<br>   ↓<br>Jev&#39;s special feature</pre><p>Normal LLM inference uses KV caching too.</p><p>KV cache solves the problem of recomputing previous context.</p><p>It does not remove the sequential nature of normal text generation.</p><h3>8. So what changes with decision-style inference?</h3><p>Look again at risk_level.</p><p>The only valid answers are:</p><pre>HIGH<br>MEDIUM<br>LOW<br>NONE</pre><p>Instead of asking the LLM to generate a whole JSON object, we can use its probability output to score these choices.</p><p>For example:</p><pre>20k document<br>+<br>&quot;risk_level:&quot;<br>       ↓<br>   Transformer<br>       ↓<br>      logits<br>       ↓</pre><pre>HIGH       → 99.2%<br>MEDIUM     → 0.6%<br>LOW        → 0.1%<br>NONE       → 0.1%</pre><p>We select:</p><pre>HIGH</pre><p>That’s it.</p><p>We don’t need the model to generate:</p><pre>{<br>  &quot;risk_level&quot;: &quot;HIGH&quot;<br>}</pre><p>We only need the model to answer:</p><p><em>Given everything you know, which of these choices is most likely?</em></p><h3>9. Is this still next-token prediction?</h3><p>Yes.</p><p>This is the important part.</p><p>At the lowest level, the Transformer is still doing the same basic computation:</p><pre>Transformer<br>     ↓<br>Hidden state<br>     ↓<br>LM Head<br>     ↓<br>Logits<br>     ↓<br>Probabilities</pre><p>We haven’t invented a new kind of Transformer operation.</p><p>The difference is what we do with those probabilities.</p><h3>Normal LLM</h3><pre>Probabilities<br>      ↓<br>choose next token<br>      ↓<br>append token<br>      ↓<br>run model again<br>      ↓<br>choose next token<br>      ↓<br>append token<br>      ↓<br>...</pre><h3>Decision-style inference</h3><pre>Probabilities<br>      ↓<br>look at allowed choices<br>      ↓<br>HIGH / MEDIUM / LOW / NONE<br>      ↓<br>DONE</pre><p>So yes:</p><blockquote><em>Both ultimately use next-token prediction.</em></blockquote><p>The difference is that one uses it to generate a sequence, while the other uses it to make a decision from a fixed set of choices.</p><h3>10. Now the interesting part: all four questions</h3><p>The 20k-token document is shared across all four questions.</p><pre>                    20k document<br>                         ↓<br>                      PREFILL<br>                         ↓<br>                      KV CACHE<br>                         │<br>          ┌──────────────┼──────────────┐<br>          ↓              ↓              ↓<br>     risk_level     requires_review   action_tier<br>          │              │              │<br>          ↓              ↓              ↓<br>        logits         logits         logits<br>          │              │              │<br>          ↓              ↓              ↓<br>        HIGH             true         TIER_2<br><br><br>                  + category → B</pre><p>Now notice something important.</p><p>risk_level does not depend on the answer to action_tier.</p><p>requires_review does not depend on category.</p><p>They are independent decisions.</p><p>Therefore, we can evaluate them together.</p><h3>11. Is it four separate LLM calls?</h3><p>Conceptually, you can think of four branches.</p><p>But an efficient implementation does not need to do this:</p><pre>Call LLM #1<br>wait</pre><pre>Call LLM #2<br>wait</pre><pre>Call LLM #3<br>wait</pre><pre>Call LLM #4<br>wait</pre><p>That would throw away much of the advantage.</p><p>Instead, you can think about it as a batch:</p><pre>                  SAME KV CACHE<br>                         │<br>             ┌───────────┼───────────┐<br>             ↓           ↓           ↓<br>       &quot;risk_level&quot;   &quot;review&quot;   &quot;action_tier&quot;<br>             │           │           │<br>             └───────────┼───────────┘<br>                         ↓<br>                 GPU batch processing<br>                         ↓<br>             ┌───────────┼───────────┐<br>             ↓           ↓           ↓<br>          logits       logits       logits<br>             ↓           ↓           ↓<br>           HIGH         true       TIER_2</pre><p>The exact implementation can vary.</p><p>The important idea is:</p><p>The expensive shared context is processed once, while independent decisions can be evaluated together.</p><h3>12. Normal LLM vs decision-style inference</h3><p>The difference becomes easier to see side by side.</p><h3>Normal LLM</h3><pre>20k tokens<br>    ↓<br>  Prefill<br>    ↓<br> KV Cache<br>    ↓<br>token 1<br>    ↓<br>token 2<br>    ↓<br>token 3<br>    ↓<br>...<br>    ↓<br>token 30<br>    ↓<br>JSON</pre><p>The model is essentially writing an answer.</p><h3>Decision-style inference</h3><pre>                20k tokens<br>                    ↓<br>                  Prefill<br>                    ↓<br>                 KV Cache<br>                    ↓<br>┌─────────┬─────────┬─────────┬─────────┐<br>│ risk    │ review  │ action  │ category│<br>└─────────┴─────────┴─────────┴─────────┘<br>     ↓         ↓         ↓         ↓<br>   HIGH      TRUE      TIER_2      B</pre><p>The model is essentially choosing answers.</p><h3>13. A simple analogy</h3><p>Imagine giving a student a 20k-token document.</p><h3>Normal LLM-style task</h3><p>You say:</p><blockquote><em>“Read this and write a JSON answer containing four answers.”</em></blockquote><p>The student has to write:</p><pre>{<br>  &quot;risk_level&quot;: &quot;HIGH&quot;,<br>  ...<br>}</pre><p>They have to produce the whole thing.</p><h3>Decision-style task</h3><p>You say:</p><blockquote><em>“For question 1, choose one.”</em></blockquote><pre>HIGH<br>MEDIUM<br>LOW<br>NONE</pre><p>Then:</p><blockquote><em>“For question 2, choose one.”</em></blockquote><pre>TRUE<br>FALSE</pre><p>And so on.</p><p>The student’s knowledge hasn’t necessarily changed.</p><p>You are just using their ability differently.</p><h3>14. The bigger idea</h3><p>We often treat an LLM as a chatbot or a text-generation API.</p><p>But underneath, the model is fundamentally producing a probability distribution over tokens.</p><p>If our application only needs:</p><ul><li>a classification</li><li>a routing decision</li><li>a boolean</li><li>a structured field</li><li>a choice from a known set</li></ul><p>then generating a long piece of text may be unnecessary work.</p><p>Sometimes the better abstraction is not:</p><blockquote><em>“</em>Ask the LLM to generate an answer<em>.”</em></blockquote><p>It is:</p><blockquote><em>“</em>Ask the model to score the possible answers.<em>”</em></blockquote><p>Same underlying Transformer.</p><p>Very different inference strategy.</p><h3>The mental model</h3><p>This is the picture one would keep in mind.</p><h3>Normal LLM:</h3><pre>              NORMAL LLM<br>                   │<br>                   ↓<br>             &quot;Write JSON&quot;<br>                   │<br>                   ↓<br>       token → token → token → token<br>                   │<br>                   ↓<br>              final JSON</pre><h3>Decision-style inference:</h3><pre>            DECISION-STYLE<br>                   │<br>                   ↓<br>          &quot;Score these choices&quot;<br>                   │<br>          ┌────────┼────────┐<br>          ↓        ↓        ↓<br>        HIGH      true    TIER_2<br>        99%       100%      98%<br>          │        │         │<br>          └────────┼─────────┘<br>                   ↓<br>              construct JSON</pre><p>The key distinction is:</p><blockquote>The underlying Transformer can still be doing next-token prediction. The system changes how those probabilities are used, and it can exploit shared context and parallel independent decisions.</blockquote><p>And that is the part I find most interesting about this whole idea: the model does not necessarily need to “write” an answer for us to get value from its predictions. Sometimes the probability distribution itself is the useful output.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40d62b0503cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating and Sharing Effective goose Recipes]]></title>
            <link>https://medium.com/@shreyanshrewa/creating-and-sharing-effective-goose-recipes-abf9767d5128?source=rss-06c6f9f7acd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/abf9767d5128</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Shreyanshrewa]]></dc:creator>
            <pubDate>Wed, 29 Oct 2025 12:18:05 GMT</pubDate>
            <atom:updated>2025-10-29T12:18:05.948Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*KfzuaNAltkGqGMUJyAwkKA.jpeg" /></figure><h3>Creating and Sharing Effective goose Recipes: A Comprehensive Guide</h3><p>Recipes are one of goose’s most powerful features for automating repetitive development tasks. They transform one-time workflows into reusable automation templates that can be shared with your team or the entire goose community. This comprehensive guide will teach you how to create, optimize, and share effective recipes that save time and boost productivity.</p><h3>What Are Recipes and Why They Matter</h3><p>goose recipes are reusable configuration files that package up a specific setup so it can be easily shared and launched by others. Think of them as templates for common development workflows: code reviews, documentation generation, security audits, data analysis, or any task you find yourself doing repeatedly.</p><h3>The Power of Recipes</h3><ul><li>Time Savings: Turn a 30-minute repetitive task into a single command</li><li>Consistency: Ensure the same process is followed every time</li><li>Knowledge Sharing: Capture best practices and make them accessible to your team</li><li>Automation: Build complex workflows that combine multiple steps</li><li>Community: Contribute to the open-source ecosystem and help others</li></ul><h3>Creating Your First Recipe</h3><h3>Start from a Successful Session</h3><p>The best recipes often come from real work you’ve already done. When you’ve had a successful goose session that you’d want to repeat, convert it into a recipe.</p><h4>Step 1: Identify Your Workflow</h4><p>Think about:</p><ul><li>What was the core task you accomplished?</li><li>What inputs did goose need?</li><li>What was the expected output?</li><li>What made this session successful?</li></ul><h4>Step 2: Extract the Core Elements</h4><p>A recipe needs:</p><ul><li>Title: Clear, descriptive name</li><li>Description: What the recipe does</li><li>Instructions: High-level guidance for the agent</li><li>Prompt: The specific task to accomplish</li><li>Parameters: Dynamic inputs that make it reusable</li></ul><h4>Step 3: Write Your First Recipe</h4><p>Here’s a minimal recipe example:</p><pre>version: 1.0.0<br>title: &quot;Code Documentation Generator&quot;<br>description: &quot;Automatically generates code documentation from source files&quot;<br>instructions: &quot;You are a documentation specialist focused on creating clear, comprehensive code documentation.&quot;<br>prompt: &quot;Generate documentation for all functions in {{ source_directory }}&quot;<br>parameters:<br>- key: source_directory<br>input_type: string<br>requirement: required<br>description: &quot;Path to the directory containing source code&quot;<br>extensions:<br>- type: builtin<br>name: developer</pre><h3>Best Practices for Recipe Creation</h3><h4>1. Write Clear Instructions</h4><p>The instructions field sets the context and role for the agent. Be specific:</p><pre>instructions: |<br>You are a security analyst specializing in static code analysis.<br>Your expertise includes:<br>- Identifying OWASP Top 10 vulnerabilities<br>- Detecting insecure coding patterns<br>- Analyzing authentication and authorization flaws<br>- Providing actionable remediation guidance</pre><h4>2. Craft Effective Prompts</h4><p>The prompt field contains the actual task. Good prompts:</p><ul><li>Are specific and actionable</li><li>Include context about inputs</li><li>Define expected outputs</li><li>Break down complex tasks into steps Good prompt:</li></ul><pre>prompt: |<br>Analyze {{ project_path }} for security vulnerabilities:<br>1. Scan for SQL injection patterns<br>2. Check for hardcoded credentials<br>3. Review authentication mechanisms<br>4. Generate a report with severity levels</pre><p>Weak prompt:</p><pre>prompt: &quot;Check code for security issues&quot;</pre><h4>3. Parameterize Thoughtfully</h4><p>Parameters make recipes flexible. Identify what should vary between uses:</p><pre>parameters:<br>- key: target_file<br>input_type: string<br>requirement: required<br>description: &quot;File to analyze&quot;<br>- key: analysis_depth<br>input_type: string<br>requirement: optional<br>default: &quot;comprehensive&quot;<br>description: &quot;Analysis depth: &#39;quick&#39;, &#39;comprehensive&#39;, or &#39;deep&#39;&quot;<br>- key: output_format<br>input_type: string<br>requirement: optional<br>default: &quot;markdown&quot;<br>description: &quot;Output format: &#39;markdown&#39; or &#39;json&#39;&quot;</pre><p>Parameter Best Practices:</p><ul><li>Use required for essential inputs</li><li>Use optional with default for convenience</li><li>Use user_prompt for interactive scenarios</li><li>Use input_type: file to read file contents directly</li></ul><h4>4. Use Template Syntax</h4><p>goose uses Jinja-style templating. Reference parameters with {{ parameter_name }}:</p><pre>prompt: |<br>Review the code in {{ file_path }}.<br>Focus on:<br>- Code quality<br>- Security concerns<br>- Performance optimizations<br>Generate a report in {{ output_format }} format.</pre><p>You can also use conditional logic:</p><pre>prompt: |<br>Analyze {{ project_path }}.<br>{% if include_tests == &quot;true&quot; %}<br>Include test files in the analysis.<br>{% endif %}<br>{% if language_focus %}<br>Prioritize {{ language_focus }}-specific best practices.<br>{% endif %}</pre><h3>Optimizing Your Recipes</h3><h3>Iterative Improvement</h3><p>Recipes should evolve. Start simple, then refine:</p><ol><li>Create a basic version that works</li><li>Use it several times to identify pain points</li><li>Add parameters for variations you find yourself needing</li><li>Improve prompts based on outcomes</li><li>Test edge cases and handle them</li></ol><h3>Advanced Optimization Techniques</h3><h4>1. Use Subrecipes for Complex Workflows</h4><p>Break complex recipes into reusable subrecipes:</p><pre>version: 1.0.0<br>title: &quot;Full Stack Project Initializer&quot;<br>description: &quot;Creates a complete project with frontend, backend, and infrastructure&quot;<br>sub_recipes:<br>- name: &quot;frontend_setup&quot;<br>path: &quot;./subrecipes/frontend-setup.yaml&quot;<br>values:<br>framework: &quot;{{ frontend_framework }}&quot;<br>- name: &quot;backend_setup&quot;<br>path: &quot;./subrecipes/backend-setup.yaml&quot;<br>values:<br>language: &quot;{{ backend_language }}&quot;</pre><h4>2. Configure Model Settings</h4><p>Different tasks benefit from different model configurations:</p><pre>settings:<br>goose_provider: &quot;anthropic&quot;<br>goose_model: &quot;claude-sonnet-4–20250514&quot;<br>temperature: 0.7 # Higher for creative tasks, lower for precise tasks</pre><ul><li>Low temperature (0.0–0.3): Code generation, analysis, structured tasks</li><li>Medium temperature (0.4–0.7): Documentation, explanations, reviews</li><li>High temperature (0.8–1.0): Creative writing, brainstorming, ideation</li></ul><h4>3. Add Retry Logic for Reliability</h4><p>Automatically retry if success criteria aren’t met:</p><pre>retry:<br>max_retries: 3<br>timeout_seconds: 30<br>checks:<br>- type: shell<br>command: &quot;test -f {{ output_file }}&quot;<br>on_failure: &quot;echo &#39;Retry attempt failed, cleaning up…&#39;&quot;</pre><h4>4. Use Structured Output for Automation</h4><p>Enforce JSON schema output for scriptable results:</p><pre>response:<br>json_schema:<br>type: object<br>properties:<br>summary:<br>type: string<br>description: &quot;Brief summary of findings&quot;<br>issues:<br>type: array<br>items:<br>type: object<br>properties:<br>severity:<br>type: string<br>description:<br>type: string<br>required:<br>- summary<br>- issues</pre><h4>5. Leverage Extensions (MCP Servers)</h4><p>Connect recipes to external tools and data sources:</p><pre>extensions:<br>- type: stdio<br>name: codesearch<br>cmd: uvx<br>args:<br>- mcp_codesearch@latest<br>timeout: 300<br>description: &quot;Search code repositories&quot;<br>- type: stdio<br>name: github-mcp<br>cmd: github-mcp-server<br>args: []<br>env_keys:<br>- GITHUB_PERSONAL_ACCESS_TOKEN<br>timeout: 60<br>description: &quot;GitHub repository operations&quot;</pre><h3>Sharing Recipes with the Community</h3><h3>Contributing to the goose Recipe Cookbook</h3><p>The goose community maintains a <a href="https://block.github.io/goose/recipes/">Recipe Cookbook</a> where you can share your creations. Approved submissions receive $10 in OpenRouter LLM credits!</p><h4>Step 1: Prepare Your Recipe</h4><p>Before submitting:</p><ul><li>Test thoroughly: Run your recipe multiple times with different inputs</li><li>Validate syntax: Use goose recipe validate your-recipe.yaml</li><li>Check for sensitive data: Remove API keys, personal paths, secrets</li><li>Write clear documentation: Good description and parameter descriptions</li><li>Choose a unique name: Check existing recipes to avoid conflicts</li></ul><h4>Step 2: Submit via Pull Request</h4><ol><li>Fork the repository: <a href="https://github.com/block/goose/fork">Fork goose on GitHub</a></li><li>Add your recipe file:</li></ol><ul><li>Navigate to: documentation/src/pages/recipes/data/recipes/</li><li>Create a new file: your-recipe-name.yaml</li><li>Use a descriptive, unique filename</li></ul><ol><li>Follow the recipe format:</li></ol><pre>version: 1.0.0<br>title: &quot;Your Recipe Name&quot;<br>description: &quot;Brief description of what your recipe does&quot;<br>instructions: &quot;Detailed instructions for what the recipe should accomplish&quot;<br>author:<br>contact: &quot;your-github-username&quot;<br>extensions:<br>- type: builtin<br>name: developer<br>activities:<br>- &quot;Main activity 1&quot;<br>- &quot;Main activity 2&quot;<br>prompt: |<br>Detailed prompt describing the task step by step.<br>Use {{ parameter_name }} to reference parameters.</pre><ol><li>Create the pull request:</li></ol><ul><li>Include your email in the PR description for credits</li><li>Follow conventional commits format</li><li>Add sign-off to commits: git commit - signoff</li></ul><h4>Step 3: Review Process</h4><p>The goose team will:</p><ol><li>✅ Validate your recipe automatically</li><li>👀 Review for quality and usefulness</li><li>🔒 Security scan (if approved for review)</li><li>🎉 Merge and send you $10 credits!</li></ol><h3>Recipe Requirements</h3><p>Your recipe should:</p><ul><li>✅ Work correctly — Test it before submitting</li><li>✅ Be useful — Solve a real problem or demonstrate a valuable workflow</li><li>✅ Follow the format — Refer to the <a href="https://block.github.io/goose/docs/guides/recipes/recipe-reference">Recipe Reference Guide</a></li><li>✅ Have a unique filename — No conflicts with existing recipe files</li></ul><h3>Recipe Ideas</h3><p>Looking for inspiration? Consider recipes for:</p><ul><li>Web scraping workflows</li><li>Data processing pipelines</li><li>API integration tasks</li><li>File management automation</li><li>Code generation helpers</li><li>Testing and validation</li><li>Deployment processes</li><li>Documentation generation</li><li>Security audits</li><li>Performance analysis</li></ul><h3>Practical Example: Building a Recipe from Scratch</h3><p>Let’s walk through creating a real recipe: a “Security Audit Recipe” that analyzes code for vulnerabilities.</p><h3>Step 1: Start with the Goal</h3><p>“I want to quickly scan any project for common security issues and get a report.”</p><h3>Step 2: Create the Basic Structure</h3><pre>version: 1.0.0<br>title: &quot;Security Audit&quot;<br>description: &quot;Scans codebase for common security vulnerabilities&quot;<br>instructions: |<br>You are a security analyst specializing in static code analysis.<br>Focus on finding OWASP Top 10 vulnerabilities and insecure patterns.<br>prompt: &quot;Analyze {{ project_path }} for security vulnerabilities&quot;<br>parameters:<br>- key: project_path<br>input_type: string<br>requirement: required<br>description: &quot;Path to project directory&quot;<br>extensions:<br>- type: builtin<br>name: developer</pre><h3>Step 3: Add More Functionality</h3><p>Let’s enhance it with more parameters and better instructions:</p><pre>version: 1.0.0<br>title: &quot;Security Audit&quot;<br>description: &quot;Comprehensive security audit for codebases&quot;<br>instructions: |<br>You are a security analyst specializing in static code analysis.<br>Your expertise includes:<br>- OWASP Top 10 vulnerabilities<br>- CWE (Common Weakness Enumeration) patterns<br>- Language-specific security issues<br>- Authentication and authorization flaws<br>- Input validation problems<br>Provide actionable remediation guidance for each finding.<br>parameters:<br>- key: project_path<br>input_type: string<br>requirement: required<br>description: &quot;Path to project directory to analyze&quot;<br>- key: analysis_depth<br>input_type: string<br>requirement: optional<br>default: &quot;comprehensive&quot;<br>description: &quot;Analysis depth: &#39;quick&#39;, &#39;comprehensive&#39;, or &#39;deep&#39;&quot;<br>- key: language_focus<br>input_type: string<br>requirement: optional<br>default: &quot;auto&quot;<br>description: &quot;Programming language focus (auto-detects if not specified)&quot;<br>- key: include_tests<br>input_type: string<br>requirement: optional<br>default: &quot;false&quot;<br>description: &quot;Whether to include test files in analysis&quot;<br>extensions:<br>- type: builtin<br>name: developer<br>- type: builtin<br>name: memory<br>prompt: |<br>Perform a {{ analysis_depth }} security audit on {{ project_path }}.<br>1. Language Detection<br>- Identify primary programming languages<br>- Exclude test files unless {{ include_tests }} == &quot;true&quot;<br>2. Security Analysis<br>- Scan for injection vulnerabilities (SQL, NoSQL, OS command)<br>- Check for XSS risks<br>- Identify authentication flaws<br>- Detect hardcoded credentials<br>- Review encryption implementations<br>{% if language_focus != &quot;auto&quot; %}<br>- Focus on {{ language_focus }}-specific security patterns<br>{% endif %}<br>3. Report Generation<br>Create a detailed report with:<br>- Vulnerability type and severity<br>- File path and line numbers<br>- Risk assessment<br>- Remediation recommendations<br>4. Store findings in memory for tracking over time</pre><h3>Step 4: Test and Refine</h3><p>Run the recipe with different projects, adjust prompts based on results, and add parameters as you discover variations you need.</p><h3>Tips for Recipe Success</h3><ol><li>Start Simple: Begin with basic recipes, add complexity gradually</li><li>Document Well: Clear descriptions help users understand what the recipe does</li><li>Test Edge Cases: Handle missing files, empty parameters, various inputs</li><li>Use Examples: Include example values in parameter descriptions</li><li>Iterate: Recipes should improve over time based on real usage</li><li>Share Early: Get community feedback to improve your recipes</li><li>Follow Patterns: Study existing recipes for proven patterns</li><li>Keep Updated: Maintain recipes as goose features evolve</li></ol><h3>Resources</h3><ul><li><a href="https://block.github.io/goose/docs/guides/recipes/recipe-reference">Recipe Reference Guide</a>: Complete technical reference</li><li><a href="https://block.github.io/goose/docs/tutorials/recipes-tutorial">Recipe Tutorial</a>: Step-by-step tutorial</li><li><a href="https://github.com/block/goose/blob/main/CONTRIBUTING_RECIPES.md">Contributing Recipes Guide</a>: How to contribute</li><li><a href="https://block.github.io/goose/recipes/">Recipe Cookbook</a>: Browse community recipes</li><li><a href="https://block.github.io/goose">goose Documentation</a>: Full documentation</li></ul><h3>Conclusion</h3><p>Recipes transform goose from a powerful AI assistant into a customizable automation platform. By creating, optimizing, and sharing recipes, you’re not just saving your own time — you’re contributing to a growing library of automation tools that benefit the entire development community. Start small with a recipe for a task you do frequently, refine it through use, and consider sharing it. The goose community is always excited to see new recipes and the creative ways people are automating their workflows! — — Ready to create your first recipe? Start by identifying a repetitive task from your recent goose sessions, extract the core workflow, and package it into a reusable recipe. Then test it, refine it, and share it with the community to earn credits and help others!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abf9767d5128" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>