<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">
  <channel>
    <title>Blog - Xúlio Zé</title>
    <link>https://xulioze.com/</link>
    <atom:link href="https://xulioze.com/en/blog/feed.xml" rel="self" type="application/rss+xml"/>
    <description>A notebook where I talk about my projects and what I learn.</description>
    <lastBuildDate>Mon, 26 Oct 2026 18:40:10 GMT</lastBuildDate>
    <language>en</language>
    <generator>Lume v3.2.5</generator>
    <author>
      <name>Xúlio Zé</name>
      <uri>https://xulioze.com/</uri>
    </author>
    <item>
      <title>atproto-comments</title>
      <link>https://xulioze.com/en/blog/atproto-comments.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/atproto-comments.html</guid>
      <description>
        atproto-comments is a web component that brings AT Protocol comments (Bluesky, Mu, Deer…) to any website, with no server and no database.
      </description>
      <content:encoded>
        <![CDATA[        <figure class="c-post__body-img c-post__body-img--figure">
          <img src="https://xulioze.com/img/leiras.jpg" alt="Clouds, wind turbines and fields photographed from the sky" width="1200" loading="lazy">
          <figcaption>Atmosphere, wind turbines and fields (Thomas Richter)</figcaption>
        </figure>

        <p>I've just published atproto-comments (on <a href="https://www.npmjs.com/package/atproto-comments" target="_blank" rel="noopener" title="atproto-comments on npm">npm</a> and <a href="https://jsr.io/@arinspunk/atproto-comments" target="_blank" rel="noopener" title="atproto-comments on JSR">JSR</a>), a web component that brings AT Protocol comments to any website, simply and with no server or database.</p>

        <ol>
          <li>You publish an article on your website.</li>
          <li>You publish a post on an AT Protocol app (Bluesky, Mu, Deer, etc.) with a link to that article.</li>
          <li>You add the component to your HTML, pointing to the post through its AT URI (<a href="https://github.com/arinspunk/atproto-comments#getting-the-at-uri-of-your-post" target="_blank" rel="noopener" title="How to get the AT URI of your post">how to get it</a>):</li>
        </ol>

        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">&lt;link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/atproto-comments@1/dist/atproto-comments.css"&gt;
&lt;script type="module" src="https://cdn.jsdelivr.net/npm/atproto-comments@1/dist/index.js"&gt;&lt;/script&gt;
&lt;atproto-comments thread-uri="at://did:plc:xxxx/app.bsky.feed.post/yyyy"&gt;&lt;/atproto-comments&gt;</code></pre>

        <p>And that's it: the replies to that post show up as comments on your article. What's more, if a visitor with an AT Protocol account wants to comment, they pick their app and get redirected to the post.</p>

        <p>The goal is twofold. On the one hand, to offer a comment system that's easy to integrate, with no database of your own and no reliance on platforms like Disqus. On the other, to bring to your website the conversations that today stay locked inside social networks.</p>

        <p>If you don't know the AT Protocol, keep reading. I'm going to tell you the path I followed until I got to know it and understand it, because I have a hunch it'll be more useful than a textbook definition.</p>

        <p>A year and a half ago, fed up with the dumpster fire X has become, I went looking for alternatives. I came across Bluesky, which promised to be an open network and had an interface with old-Twitter vibes. I liked it: almost no noise, no nazis, no bots. But I didn't get why it was "open".</p>

        <p>In March I saw a post from Eurosky, an independent European initiative working to build an open social web, where <a href="https://eurosky.tech/accounts/migrate/" target="_blank" rel="noopener" title="How to move your account to Eurosky">they were inviting people to move their Bluesky accounts, hosted on servers in the US, to their servers in Europe</a>, and keep talking on Bluesky. How? That was already a bit stranger. But it was true: I moved my account to Eurosky and kept talking on Bluesky.</p>

        <p>In June, <a href="https://bsky.app/profile/eurosky.social/post/3mnyoeuenq225" target="_blank" rel="noopener" title="Muve to the beat">another post from Eurosky</a>. This time they were announcing <a href="https://mu.social/" target="_blank" rel="noopener" title="mu.social">mu.social</a>, a new microblogging app. I tried logging in with my Bluesky credentials and my jaw dropped. There was my profile, with my posts, the people I follow and my followers. Everything. Then I came across Deer, tested it and the same thing happened.</p>

        <p>To understand my surprise, here's the same Eurosky post seen through three apps:</p>

        <ul>
          <li>
            <a href="https://bsky.app/profile/eurosky.social/post/3mnyoeuenq225" target="_blank" rel="noopener" title="Eurosky's post on Bluesky">
              Eurosky's post on Bluesky
            </a>
          </li>
          <li>
            <a href="https://mu.social/profile/eurosky.social/post/3mnyoeuenq225" target="_blank" rel="noopener" title="Eurosky's post on mu.social">
              Eurosky's post on mu.social
            </a>
          </li>
          <li>
            <a href="https://deer.social/profile/eurosky.social/post/3mnyoeuenq225" target="_blank" rel="noopener" title="Eurosky's post on Deer">
              Eurosky's post on Deer
            </a>
          </li>
        </ul>

        <p>Wait, this reminded me of something I'd already lived through. Of course — I miss it! Blogs, RSS, Google Reader and Feedly. When the internet was decentralized, what we published was ours and what we read wasn't warped by the algorithms of private companies.</p>

        <p>I did some research and put the pieces together. This was possible because Bluesky is built on the AT Protocol, an open protocol for decentralized social networks. In it, every account has a permanent identifier (DID) and its data lives on a personal data server (PDS), cryptographically signed. That's why we can switch providers without losing our account or our followers (the data is ours!), and even run <a href="https://sliplane.io/blog/self-hosting-bluesky-pds-from-scratch" target="_blank" rel="noopener" title="Self-hosting Bluesky PDS from Scratch">our own server</a>. We can consume our data, and that of the people we follow, from different apps. And we can build tools like atproto-comments without depending on whatever a company decides at any given moment.</p>

        <h2>How it works under the hood</h2>

        <p>If you want to see the pieces of the puzzle, these are the ones that come into play when atproto-comments loads the comments:</p>

        <ul>
          <li>Identity (DID and handle): every account has a permanent identifier (<code>did:plc:...</code>) and a human-readable name (<code>@xulioze.eurosky.social</code>). The DID is what lets you switch servers without losing anything.</li>
          <li>PDS (Personal Data Server): the server where your data lives, in a signed repository. It can be Bluesky's, Eurosky's or your own.</li>
          <li>Lexicons and records: every data type has a public schema. A post is a record in the <code>app.bsky.feed.post</code> collection; that's why the AT URI points to <code>at://&lt;did&gt;/app.bsky.feed.post/&lt;id&gt;</code>.</li>
          <li>Relay: because the data is spread across many PDSes, the Relay gathers it and rebroadcasts its changes in a single real-time stream (the <em>firehose</em>).</li>
          <li>AppView: consumes that stream, indexes it and serves ready-made views, such as the reply thread of a post. atproto-comments requests that thread from the Bluesky AppView's public API (<code>app.bsky.feed.getPostThread</code>), but you can point it to another AppView with the <code>appview</code> attribute. Keep in mind that this request comes from each visitor's browser and that, since the comments load with JavaScript, search engines don't usually index them.</li>
          <li>Client apps: Bluesky, Mu, Deer… are just different interfaces on top of the same data, and each one can decide how to display it: which algorithm it uses, how it sorts the feed, what moderation it applies. If one day I don't like how Bluesky serves me the feed, I switch to another app that does it more to my liking, without losing anything.</li>
        </ul>

        <p>At heart, the idea is very similar to RSS and blogs: the data belongs to whoever publishes it and they can take it wherever they want. Each person decides how and where to consume it. And anyone can build tools for the ecosystem without asking permission, like atproto-comments, which we're launching here today.</p>

        <p>If you already have an AT Protocol account, leave a comment down here from your favorite app (Bluesky, Mu, Deer…) and you'll see it show up. If you don't, <a href="https://portal.eurosky.tech/create-account" target="_blank" rel="noopener" title="Create your Eurosky account">create an account on Eurosky</a> and use it in whichever app you like. Welcome to open social networks!</p>

        <h2 class="c-post__body-title">Comments</h2>

        <atproto-comments
          thread-uri="at://did:plc:myufvpeutlocqv3tpnzsvwoe/app.bsky.feed.post/3mysat3y3wc2x"
          style="color-scheme: dark; --atproto-font-family: inherit; --atproto-font-size: 1rem; --atproto-color-muted: oklch(70% 0 0); --atproto-color-border: oklch(40% 0 0); --atproto-color-surface: #1c1c3d;"
        ></atproto-comments>
]]>
      </content:encoded>
      <pubDate>Mon, 19 Oct 2026 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Extended Context 2.0: Agents Need Architecture, Not Just Note-Taking</title>
      <link>https://xulioze.com/en/blog/extended-context-v2.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/extended-context-v2.html</guid>
      <description>
        Improved guide for structuring AI-assisted development: separating reusable knowledge (rules) from temporary memory eliminates vibe-coding.
      </description>
      <content:encoded>
        <![CDATA[        <figure class="c-post__body-img c-post__body-img--figure">
          <img src="https://xulioze.com/img/blade-runner-2049-k-in-rooftop.jpg" alt="Silhouette of K in Blade Runner 2049 looking at the city from a rooftop, symbolizing knowledge architecture for AI agents" width="1200" loading="lazy">
          <figcaption>Observing the city</figcaption>
        </figure>

        <p>This guide is an improved version of what I proposed in "<a href="https://xulioze.com/en/blog/extended-context.html" target="_blank" rel="noopener" title="Extended Context. Agents also need to take notes">Extended Context. Agents also need to take notes</a>" and <a href="https://xulioze.com/en/blog/guide-develop-software-agents.html" target="_blank" rel="noopener" title="Guide: Developing Quality Software Assisted by AI Agents">Guide: Developing Quality Software Assisted by AI Agents</a>.</p>

        <p>When editors with autonomous AI agents arrived (Cursor, GitHub Copilot, Claude Code), many of us bought the promise: "<a href="https://xulioze.com/en/blog/oneshot-vs-dialogue.html" target="_blank" rel="noopener" title="One-shot vs dialogue: how to choose the right mode for your AI agent">write the perfect prompt</a> and the agent will generate the complete feature in one shot". Reality was different: without structure or constraints, we ended up spending more time fixing bugs than writing code.</p>

        <p>"Vibe-coding", trusting the agent to "get the vibe" of your project, works well for quick prototypes, but in real, complex projects it creates more problems than solutions:</p>
        <ul>
          <li>Lost decisions: Why did we choose this architecture two weeks ago?</li>
          <li>Constant hallucinations: AI invents APIs, mixes frameworks, ignores constraints</li>
          <li>Monolithic work: Impossible to divide features into trackable tasks</li>
          <li>Continuous improvisation: Each session starts from scratch</li>
        </ul>

        <p>A few months ago I documented <a href="https://xulioze.com/en/blog/guide-develop-software-agents.html" target="_blank" rel="noopener" title="Guide: Developing Quality Software Assisted by AI Agents">a solution</a> (v1): a structured workflow (analysis → solution → backlog → execution → saved progress) with four context files that turned vibe-coding into trackable engineering. It worked, but there was friction: manually repeating the same prompts in each session was painful.</p>

        <p>This guide presents the evolution of that system (v2). It leverages Cursor's rules system to automate prompts and converts the workflow into reusable protocols. But while designing it, a universal pattern emerged: separating reusable knowledge (rules) from temporary memory. This goes beyond saving you from writing the same prompts: you can reuse knowledge across different projects and keep an organized record of everything you do. And the pattern works with any AI tool, not just Cursor.</p>

        <p>Let's see how to build that architecture.</p>

        <h2>Problem with v1</h2>

        <p>Four-file system in <code>context/</code>:</p>
        <ul>
          <li><code>01-expert.md</code> - Expert profile</li>
          <li><code>02-analysis.md</code> - Code analysis</li>
          <li><code>03-plan.md</code> - Implementation plan</li>
          <li><code>04-backlog.md</code> - Pending tasks</li>
        </ul>

        <h3>Limitations in Real Projects</h3>

        <p>Mixed knowledge: <code>01-expert.md</code> combines general principles (KISS, DRY) with project-specific constraints (stack, versions, critical dependencies). Impossible to reuse principles between projects without dragging irrelevant configuration.</p>

        <p>Duplication across projects: Each project replicates common knowledge. If you work on 3 WordPress projects, you have <code>security: sanitize_*, nonces</code> copied three times. You update a best practice, you must manually sync.</p>

        <p>No history management: v1 gives you three options, all bad:</p>
        <ul>
          <li>Overwrite <code>02-analysis.md</code> → lose previous decisions</li>
          <li>Accumulate analyses in the same file → grows uncontrollably, impossible to track when each decision was made</li>
          <li>Create multiple files (<code>02-analysis-feature-X.md</code>) → mess, no consistent naming</li>
        </ul>

        <p>In all cases: Why did you reject architecture X two weeks ago? There's no systematic way to retrieve it.</p>

        <p>No modularity: Switching from WordPress to React requires rewriting the entire <code>01-expert.md</code>. You can't maintain common modules (principles, patterns) and only swap the technical expert.</p>

        <p>v1 had two fundamental problems: (1) mixed knowledge in a single file (<code>01-expert.md</code>), (2) manual execution - each action required writing the complete prompt ("analyze this file and save to <code>02-analysis.md</code>", "read <code>04-backlog.md</code>, execute tasks 1-3, update state"). v2 solves both: separates knowledge into modular <code>rules/</code> and automates execution through invocable protocols in <code>rules/utils/</code> (<code>@analysis</code>, <code>@execute</code>).</p>

        <h2>Solution: Rules/Memory Separation</h2>

        <p>The solution replicates how our brain works: we separate permanent knowledge (language, math, skills) from episodic memory (what we did yesterday, decisions from last week). But also, our knowledge isn't monolithic: we have specialized modules (JavaScript, WordPress, KISS principles) that we activate based on context.</p>

        <p>v2 implements this dual architecture:</p>

        <ol>
          <li>Knowledge/memory separation: Reusable rules vs temporary memory</li>
          <li>Knowledge modularization: Experts, guidelines, and executable protocols</li>
        </ol>

        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">.cursor/
├── rules/          # Reusable and modular knowledge
│   ├── experts/    # Technical roles (WordPress, React, Python...)
│   ├── guidelines/ # Principles and constraints (KISS, project-specific)
│   └── utils/      # Executable protocols (analysis, backlog, commit)
└── memory/         # Temporary experiences
    └── YYYYMMDD-VV-description.md</code></pre>

        <h3>Key Concept: alwaysApply</h3>

        <p>The rules/memory system needs an activation mechanism: what knowledge does Cursor load automatically vs. what you invoke on demand? Without this, you'd have 100 rules competing for limited context.</p>

        <p>The <code>alwaysApply</code> flag solves this:</p>

        <ul>
          <li><code>alwaysApply: true</code> → Cursor loads them automatically in every conversation
            <ul>
              <li>Use for: Base experts, critical project guidelines</li>
              <li>Example: <code>wordpress-classic-themes.mdc</code>, <code>constraints-balneario.mdc</code></li>
            </ul>
          </li>
          <li><code>alwaysApply: false</code> → User invokes them with <code>@</code> as needed
            <ul>
              <li>Use for: On-demand protocols, specific tools</li>
              <li>Example: <code>@analysis</code>, <code>@backlog</code></li>
            </ul>
          </li>
        </ul>

        <h3>Rules: Reusable Knowledge</h3>

        <p>Experts - Technical/domain expert profiles:</p>

        <p><code>rules/experts/wordpress-classic-themes.mdc</code></p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">---
alwaysApply: true
---
# WordPress Classic Expert
PHP + vanilla JS specialist. WordPress core APIs, theme dev.

## Stack
Backend: PHP 7.4+, WP Core APIs | Frontend: Vanilla JS, HTML5, CSS3

## Core Patterns
- Security: sanitize_*, esc_*, nonces
- Performance: transients (12h), conditional enqueue
- Translation: __(), _e() with text domain</code></pre>

        <p>Guidelines - Code principles and project constraints:</p>

        <p><code>rules/guidelines/constraints-balneario.mdc</code></p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">---
alwaysApply: true
---
# Balneario Theme
Text domain: themefront v0.1.2
Stack: Node | SASS 1.67.0 | PHP 7.4+ | jQuery 3.x
Build: npm run watch:sass (never edit compiled CSS)

Critical: ACF PRO (18 groups), WooCommerce, WPML
Core Systems: PDF Generator (pdf-generator.php), WooCommerce integration</code></pre>

        <p><code>rules/guidelines/kiss.mdc</code></p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">---
alwaysApply: true
---
# KISS Principle
- Direct solutions, avoid over-engineering
- Simple patterns, minimal dependencies
- Single responsibility per function

Rule: If you can't explain it in 2-3 sentences, it's too complex.</code></pre>

        <p>The KISS principle is especially important in AI-assisted development: it's easier to ask the agent to add complexity to a simple solution than to waste time analyzing what's excessive in its proposal (<a href="https://arxiv.org/html/2411.09916v1" target="_blank" rel="noopener" title="Research paper: LLMs tend to generate more complex code than necessary">LLMs tend to generate more complex code than necessary</a>).</p>

        <p>Utils - Invokable protocols:</p>

        <p><code>rules/utils/analysis.mdc</code> → Analyzes code/folders and saves to memory</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">---
alwaysApply: false
---
# Analysis Protocol
Trigger: @file/@folder or "analyze"
1. Acknowledge → 2. Analyze → 3. Save to .cursor/memory/YYYYMMDD-VV-*.md → 4. Confirm</code></pre>

        <p><code>rules/utils/solution.mdc</code> → Proposes solution and saves to memory</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">---
alwaysApply: false
---
# Solution Protocol (KISS)
Trigger: User requests solution
1. Acknowledge → 2. Propose simplest solution → 3. Save to memory → 4. Confirm
Principles: Simplicity > complexity, proven patterns > novel</code></pre>

        <p><code>rules/utils/backlog.mdc</code> → Converts solution into atomic trackable tasks</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">---
alwaysApply: false
---
# Backlog Protocol
Solution → atomic tasks → persistent backlog (YYYYMMDD-VV-backlog-*.md)

Format: [Phase.Task#] ⏳/🔄/✅/⚠️ Title
> What to do | Date completed | Work done

Rules: 2-4h max, sequential, testable</code></pre>

        <p><code>rules/utils/execute.mdc</code> → Executes backlog tasks and updates state</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">---
alwaysApply: false
---
# Task Execution Protocol
Load backlog → parse scope → execute → update status → stop at boundary
Input: [1.1], [2.3,2.4], Phase 2, continue</code></pre>

        <p><code>rules/utils/commit.mdc</code> → Generates conventional commits and updates backlog</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">---
alwaysApply: false
---
# Commit Protocol
Analyze staged → generate conventional commit → approve → execute → update backlog
Format: [JIRA-XXX] type(scope): subject (English, imperative, max 72 chars)</code></pre>

        <h3>Memory: Historical Record</h3>

        <p>Utils protocols automatically generate files in <code>memory/</code> following the nomenclature <code>YYYYMMDD-VV-description.md</code> (VV = daily sequence: 01, 02, 03...):</p>

        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">memory/
├── 20250919-01-analisis-pdf-generator.md
├── 20250919-02-sistema-pdfs-emails-finalizado.md
├── 20251015-01-analisis-completo-balneario-theme.md
├── 20251015-02-solucion-facturacion-automatica-399.md
└── 20251015-03-backlog-facturacion-automatica-399.md</code></pre>

        <p>Advantages: chronological ordering, multiple entries/day, traceability, visible relationships.</p>

        <p>This solves the three bad options problem from v1: the chronological nomenclature (YYYYMMDD-VV) accumulates history without losing control, maintains order without disorganization, and preserves decisions without overwriting.</p>

        <h2>Workflow in Cursor</h2>

        <blockquote>
          <p>Note: Commands with <code>@</code> invoke specific rules. For example, <code>@analysis</code> loads <code>rules/utils/analysis.mdc</code> without needing to write the full path. This is part of Cursor's native syntax.</p>
        </blockquote>

        <p>This section describes the general workflow for AI-assisted development: separating reusable knowledge from temporary memory, following the cycle analysis → solution → backlog → execution → commit → continue. We use Cursor and its rules system as an implementation example, but the workflow is applicable to any AI tool capable of injecting context.</p>

        <p>Below you'll see how the workflow works in practice. If you later want to implement it in your projects with Cursor, check the Implementation and Configuration guide below.</p>

        <h3>Feature Development: Automatic Invoicing</h3>

        <p>1. Analysis</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">@analysis checkout.php</code></pre>
        <p>→ Generates: <code>20251015-01-analisis-checkout.md</code></p>

        <p>2. Solution</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">@solution
Implement automatic WooCommerce invoicing</code></pre>
        <p>→ Generates: <code>20251015-02-solucion-facturacion.md</code></p>

        <p>3. Backlog</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">@memory/20251015-02-solucion-facturacion
@backlog</code></pre>
        <p>→ Generates: <code>20251015-03-backlog-facturacion.md</code></p>

        <p>4. Execution</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">@memory/20251015-03-backlog-facturacion
@execute [1.1]</code></pre>
        <p>→ Updates: <code>[1.1] ⏳ → ✅</code></p>

        <p>5. Commit</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">@memory/20251015-03-backlog-facturacion
@commit</code></pre>
        <p>→ Creates commit + updates backlog</p>

        <p>6. Continue work (new session)</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">@memory/20251015-03-backlog-facturacion
Resume work</code></pre>
        <p>→ Loads context + shows next tasks</p>

        <h2>Implementation and Configuration</h2>

        <h3>1. Install the system (5 min)</h3>

        <p>This system is available at <a href="https://github.com/arinspunk/extended-context" target="_blank" rel="noopener" title="Extended Context - Knowledge architecture for AI agents">github.com/arinspunk/extended-context</a>.</p>

        <p>Two ways to configure:</p>

        <p>Option A - Contribute to shared repo (recommended if you want to participate in maintenance):</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">cd your-project
git clone https://github.com/arinspunk/extended-context.git .cursor</code></pre>
        <p>Maintains connection to the repo to receive updates and contribute improvements. Update whenever you want: <code>cd .cursor && git pull</code></p>

        <p>Option B - Snapshot for your project (recommended for daily work):</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">git clone https://github.com/arinspunk/extended-context.git temp
cp -r temp/rules temp/memory your-project/.cursor/
rm -rf temp</code></pre>
        <p>Independent copy that you customize freely without affecting the original repo, ideal for versioning together with your project code.</p>

        <p>Migration from v1: Use Option B to integrate with your existing structure.</p>

        <h3>2. Initial Configuration (15 min)</h3>

        <p>Prerequisites:</p>
        <ul>
          <li>Cursor installed and project open</li>
          <li>rules/memory system cloned to <code>.cursor/</code> (previous step completed)</li>
        </ul>

        <p>Step 1: Identify your stack (2 min)</p>
        <p>Review <code>rules/experts/</code> and activate the expert that matches your project:</p>
        <ul>
          <li>WordPress → <code>wordpress-classic-themes.mdc</code></li>
          <li>React → <code>react-typescript.mdc</code> (if exists)</li>
          <li>Python Backend → <code>python-fastapi.mdc</code> (if exists)</li>
        </ul>
        <p>If your stack doesn't exist: copy the closest expert and adapt it.</p>

        <p>Step 2: Activate project constraints (3 min)</p>
        <ol>
          <li>Copy <code>rules/guidelines/constraints-template.mdc</code> to <code>constraints-{project}.mdc</code></li>
          <li>Complete:
            <ul>
              <li>Technical stack (specific versions)</li>
              <li>Critical dependencies (libraries that CANNOT be changed)</li>
              <li>Legacy systems you must respect</li>
            </ul>
          </li>
          <li>Change <code>alwaysApply: false</code> → <code>true</code></li>
        </ol>

        <p>Step 3: Activate base principles (1 min)</p>
        <p>Activate <code>kiss.mdc</code> by changing <code>alwaysApply: false</code> → <code>true</code></p>

        <p>Step 4: Verify loading (1 min)</p>
        <p>Open Cursor chat (Cmd+L) and type:</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">What experts and guidelines do you have active?</code></pre>
        <p>Cursor should list the files with <code>alwaysApply: true</code>.</p>

        <p>Step 5: First execution (8 min)</p>
        <p>Test the complete workflow with a real file:</p>
        <pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">@analysis src/components/Header.tsx</code></pre>
        <p>If it correctly generates <code>memory/YYYYMMDD-01-*.md</code>, the system is operational.</p>

        <blockquote>
          <p>Note for other tools: This system is tool-agnostic. The rules/memory conceptual separation can be implemented in any tool capable of injecting context (GitHub Copilot, Claude Code, etc.).</p>
        </blockquote>

        <p>Once the system is configured, the real work begins: feeding rules with project-specific knowledge and team's usual practices, while memory records the work done with AI (analyses, solution proposals, tasks and progress). In practice, this transforms how AI generates code: solutions coherent with project architecture and scalable. Additionally, it documents decisions that facilitate later debugging and knowledge transfer between developers.</p>

        <h2>Conclusion</h2>

        <p>Vibe-coding works for prototypes, but creates more problems than solutions in real projects: lost decisions, constant hallucinations, impossible to track work. v1 solved this with structured workflow, but required manually repeating prompts in each session.</p>

        <p>v2 eliminates that friction by automating protocols and, in doing so, discovers a universal pattern: separating reusable knowledge (rules) from temporary memory. This separation, the same one your brain makes between skills and experiences, turns any AI tool into a system where knowledge persists, evolves, and is systematically reused.</p>

        <p>It doesn't eliminate context window limitations, but transforms them into a structured framework for building software in a trackable and scalable way.</p>

        <h3>Next Steps</h3>

        <ol>
          <li>If you use Cursor: <a href="https://github.com/arinspunk/extended-context" target="_blank" rel="noopener" title="Extended Context - Knowledge architecture for AI agents">Clone the repo</a> and configure your first project</li>
          <li>If you use another tool: Adapt the rules/memory separation to your system</li>
          <li>Share your implementation: Created experts for your stack? Contribute to the repo</li>
          <li>Share results: Improved the workflow? Document your findings to collectively refine the system</li>
        </ol>
]]>
      </content:encoded>
      <pubDate>Fri, 24 Oct 2025 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>One-shot prompting? I prefer conversing with my AI</title>
      <link>https://xulioze.com/en/blog/oneshot-vs-dialogue.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/oneshot-vs-dialogue.html</guid>
      <description>
        The real value of AI is not in the initial generation, but in the subsequent iterations. Iteration is not development, it's design work.
      </description>
      <content:encoded>
        <![CDATA[				<figure class="c-post__body-img c-post__body-img--figure">
					<img src="https://xulioze.com/img/bicentennial-man.jpg" alt="Scene from Bicentennial Man: a man works on a laptop while two golden humanoid robots watch intently over his shoulders" width="768" loading="lazy">
					<figcaption>Andrew, Galatea, and Rupert Burns working together</figcaption>
				</figure>

				<p>A few days ago, in a conversation with colleagues, a debate arose about the usefulness of one-shot prompting when generating code with AI. I argued that it isn't useful, and I think the argument I used is worth sharing.</p>

				<h2>The problem with one-shot as an objective</h2>

				<p>When we assume that one-shot can give us the expected results, we're placing all the responsibility for output quality on the human side: if the LLM doesn't produce a good response, the problem is that we didn't write the correct prompt.</p>

				<p>But this idea clashes head-on with the nature of generative AI, which is non-deterministic. For the same prompt and model, we get different responses in each execution. Therefore, it becomes impossible—especially with complex tasks—to obtain the optimal response in a single interaction. Iteration becomes inevitable.</p>

				<p>In that debate, with minor nuances, we all agreed that one-shot is not valid as an end in itself, but as an exercise to improve our prompts. It's impossible to reach 100% quality, but with this practice we learn to move, let's say, from 60% to 70%.</p>

				<h2>From Figma to code: another perspective</h2>

				<p>This weekend I read <a href="https://www.uxtools.co/blog/the-only-ai-workflow-i-use-in-production" title="The only AI workflow I use in production" target="_blank" rel="noopener">The only AI workflow I use in production</a>, by Tommy Geoco. The article describes the workflow Tommy uses to develop his AI-assisted design work (Figma → Claude Code), claiming it surpasses the use of other tools like Lovable, Replit or Bolt in absolute terms. If you're a UX/UI designer interested in integrating AI into your work, I recommend reading it because it contains truly interesting ideas.</p>

				<p>Among those ideas is one that has made me reflect again on the inconvenience of one-shot. According to the author, we should demystify it because it doesn't capture the real value. The true power is not in the initial generation, but in the subsequent iterations.</p>

				<p>His workflow is as follows:</p>

				<ol>
					<li>Design the "happy path" (optimal flow) in Figma</li>
					<li>Feed the design to Claude Code via <a href="https://help.figma.com/hc/en-us/articles/32132100833559-Guide-to-the-Figma-MCP-server" title="Figma MCP server guide" target="_blank" rel="noopener">Figma MCP</a></li>
					<li>Get a solid foundation in 15 minutes (vs. 50 hours of manual coding)</li>
					<li>Iterate and refine for 50 hours</li>
				</ol>

				<p>The last point is key for him: iteration is not development, it's design work. It's not about refining code to represent a closed design, but using it to make decisions about visual hierarchy, interaction patterns, edge cases, error states, etc.</p>

				<h2>What if the value lies in iteration?</h2>

				<p>From this I draw two equally important conclusions. The first: the author is transferring a large part of the design exercise from Figma to code, something novel that blurs the UX/UI-Development boundary. I won't develop it here to avoid straying from the topic, but it deserves its own post.</p>

				<p>The second, related to the debate about one-shot: the author doesn't use AI to design for him based on initial instructions, but relies on it to iterate faster, reflect on design more deeply and achieve a better result. I think not only because AI saves him time on repetitive work without value and gains it for thinking, but because the generated dialogue can take him to places, thoughts and decisions he wouldn't have reached alone.</p>

				<p>It remains to be seen whether this scheme translates equally to software development, but if it works similarly, then the inconvenience of one-shot is not due solely to the limitations imposed by the non-deterministic nature of LLMs. There's something more important: iteration—that continuous dialogue between human and AI—provides us with real value, we get better results.</p>

				<p>This idea of iteration as dialogue has reminded me of <a href="https://intralation-culture-theory-posthuman-pedagogy.ghost.io/attuning-orienting-and-navigating-the-co-emergence-of-meaning-in-ai-dialogue-13-propositions-for-a-critical-ai-pedagogy/" title="Attuning, Orienting, and Navigating the Co-Emergence of Meaning in AI Dialogue: 13 Propositions for a Critical AI Pedagogy" target="_blank" rel="noopener">Owen Matson's approaches to human-AI co-creation</a>. And I have to admit that it's been while writing this post—in dialogue with an AI—when I think I've finally understood what Owen proposes. It remains pending to delve deeper into this path 🙂</p>
]]>
      </content:encoded>
      <pubDate>Mon, 13 Oct 2025 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Use Tools in Unexpected Ways, AI Too</title>
      <link>https://xulioze.com/en/blog/use-tools-unexpected-ways-ai.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/use-tools-unexpected-ways-ai.html</guid>
      <description>
        Don't hold back from asking AI to do things you think are impossible. You might be surprised by the results and learn something new.
      </description>
      <content:encoded>
        <![CDATA[				<p>When I worked as a graphic designer, I loved using tools or objects in ways they weren't originally intended for. For example, making drawings by colouring Excel spreadsheet cells or  <a href="https://arinspunk.com/kraksh-disco/" title="Disco Kraksh designed by Arinspunk" target="_blank" rel="noopener">writing text with yellow electrical tape</a>.</p>

				<p>The other day, while testing <a href="https://xulioze.com/en/blog/claude-talk-to-figma-mcp.html" title="How to integrate Figma with Claude">the MCP I developed to integrate Figma with Claude</a>, my 9-year-old daughter asked me what I was doing. I explained it to her and she listened carefully. When I finished, she said:<br>
				"Tell it to draw an angry monster."<br>
				I asked Claude to do it, and it drew one.</p>

				<figure class="c-post__body-img c-post__body-img--figure">
					<img src="https://xulioze.com/img/monstruo.png" alt="An angry monster drawn by an AI in Figma" width="768" loading="lazy">
					<figcaption>Angry monster drawn with Figma by Claude Sonnet 3.7</figcaption>
				</figure>

				<p><a href="https://xulioze.com/en/blog/guide-develop-software-agents.html" title="Developing Quality Software Assisted by AI Agents">I've been using AI intensively in my work</a> for some time now, and one of the things I've realised is that you shouldn't stop yourself from asking for something just because you think it can't do it. Just ask anyway—you'll see how often it will surprise you with the proposed solution and you'll learn something new.</p>

				<p>Today, whilst working with Figma + Cursor, I remembered my daughter and asked the agent to draw a dragon.</p>

				<figure class="c-post__body-img c-post__body-img--figure">
					<img src="https://xulioze.com/img/dragon-og.png" alt="A dragon breathing fire drawn by an AI in Figma" width="768" loading="lazy">
					<figcaption>Lovely dragon drawn with Figma by Claude Sonnet 4</figcaption>
				</figure>
				
				<p>I think I'm going to return to the hobby I had <a href="https://arinspunk.com/" title="The defunct Arinspunk's archive" target="_blank" rel="noopener">when I was a designer</a> 😊</p>
]]>
      </content:encoded>
      <pubDate>Wed, 30 Jul 2025 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Guide: integrating Figma into AI workflows</title>
      <link>https://xulioze.com/en/blog/guide-integrate-figma-with-ai.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/guide-integrate-figma-with-ai.html</guid>
      <description>
        Learn how to integrate Figma into your AI workflows with the Figma API, Dev Mode MCP Server, and Claude Talk to Figma MCP. A guide for development and design teams.
      </description>
      <content:encoded>
        <![CDATA[                <img class="c-post__body-img" src="https://xulioze.com/img/ex-machina.jpg" alt="Ava shows her drawing" width="768" loading="lazy">

                <h2>Purpose</h2>
                <p>Allow LLMs to:</p>
                <ul>
                    <li>Analyze and modify designs in Figma.</li>
                    <li>Generate code from them.</li>
                </ul>

                <h2>Who is it for</h2>
                <p>UX/UI teams who want to automate accessibility audits, perform synthetic user tests, and iterate on designs based on automated feedback.</p>
                <p>Frontend teams who need to speed up the translation of designs into code, especially when working with component systems and modern frameworks.</p>
                <p>Backend/DevOps teams developing automated workflows and AI agents that require integrating Figma design analysis and code generation from them.</p>
                <p>Multidisciplinary teams looking to reduce friction in the design-to-development handoff, keeping each team in their usual tools.</p>

                <h2>Tools</h2>
                
				<div class="c-post__table">
					<table>
						<thead>
							<tr>
								<th>Tool</th>
								<th>Functionality</th>
								<th>Recommended Use</th>
								<th>Target Team</th>
								<th>Usage Environment</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>
									<a href="https://xulioze.com/en/blog/guide-integrate-figma-with-ai.html#figma-api" title="Figma API">Figma API</a>
								</td>
								<td>
									Design analysis + code generation
								</td>
								<td>
									Integration of Figma in AI agent workflows
								</td>
								<td>
									Backend teams developing AI agent workflows
								</td>
								<td>
									ADK, Crew AI, LangGraph, etc.
								</td>
							</tr>
							<tr>
								<td>
									<a href="https://xulioze.com/en/blog/guide-integrate-figma-with-ai.html#dev-mode-mcp-server" title="Dev Mode MCP Server">Dev Mode MCP Server</a>
								</td>
								<td>
									Design analysis + code generation
								</td>
								<td>
									Code generation from Figma designs
								</td>
								<td>
									Frontend teams
								</td>
								<td>
									Cursor, VS Code + Github Copilot, Windsurf, Claude Code, etc.
								</td>
							</tr>
							<tr>
								<td>
									<a href="https://xulioze.com/en/blog/guide-integrate-figma-with-ai.html#claude-talk-to-figma-mcp" title="Claude Talk to Figma MCP">Claude Talk to Figma MCP</a>
								</td>
								<td>
									Design analysis and modification
								</td>
								<td>
									User tests (synthetic), accessibility and SEO audits, and design modification
								</td>
								<td>
									UX/UI teams
								</td>
								<td>
									Claude
								</td>
							</tr>
						</tbody>
					</table>
				</div>
                
                <h3 id="figma-api">Figma API</h3>
                <h4>Requirements</h4>
                <ul>
                    <li>Figma account</li>
                    <li>Generate an <a href="https://www.figma.com/developers/api#access-tokens" target="_blank" rel="noopener" title="'Access tokens' in Figma documentation">access token</a> or use <a href="https://www.figma.com/developers/api#oauth2" target="_blank" rel="noopener" title="'OAuth 2' in Figma documentation">OAuth 2</a></li>
                </ul>
                <h4>Description</h4>
                <p>It is the simplest way for an LLM to analyze a design.</p>
                <p>The Figma API allows building endpoints to request files, images, file versions, users, comments, team projects, and project files. It returns a JSON that we can pass to the LLM for interpretation.</p>
                <p>Unlike MCPs, we do not need to have Figma Desktop open for an agent to analyze a design. This makes it the ideal method for integrating Figma into AI agent workflows.</p>
                <h4>Installation</h4>
                <p>As it is an API, not an MCP, there is no installation as such. We can see how it works with a simple test with Cursor or VS Code:</p>
                <ol>
                    <li><a href="https://www.figma.com/developers/api#access-tokens" target="_blank" rel="noopener" title="'Access tokens' in Figma documentation">Create a token</a>.</li>
                    <li>Tell your agent to analyze a design in Figma by running <a href="https://www.figma.com/developers/api#get-file-nodes-endpoint" target="_blank" rel="noopener" title="'GET file nodes' in Figma documentation">a curl request to an endpoint</a>.</li>
                </ol>
                <p>For example, for the following URL of a design node:</p>
<pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">https://www.figma.com/design/XG1EYHLnC7NdwGuYc7LmUf/MVC---WEB?node-id=6037-2235&t=AHpchSRAIyGCdoci-0</code></pre>
                <p>tell it to use:</p>
<pre class="c-post__prompt c-post__prompt--scroll"><button class="c-post__copy-btn" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#fff" viewBox="0 -960 960 960"><path d="M362.31-260q-27.01 0-45.66-18.65T298-324.31v-455.38q0-27.01 18.65-45.66T362.31-844h359.38q27.01 0 45.66 18.65T786-779.69v455.38q0 27.01-18.65 45.66T721.69-260zm0-52h359.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-455.38q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H362.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v455.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85m-124 176q-27.01 0-45.66-18.65T174-200.31v-507.38h52v507.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h411.38v52zM350-312v-480z"/></svg></button><code class="c-post__prompt-code">curl -H 'X-FIGMA-TOKEN: {your personal access token}'
'https://api.figma.com/v1/files/XG1EYHLnC7NdwGuYc7LmUf/nodes?ids=6037-2235'</code></pre>
                <p>Upon receiving the prompt, the agent will execute the curl request and get a JSON with the design parameters. Then it will analyze it and generate a text with the content of its analysis.</p>
                
                <h3 id="dev-mode-mcp-server">Dev Mode MCP Server</h3>
                <h4>Requirements</h4>
                <ul>
                    <li><a href="https://help.figma.com/hc/en-us/articles/27468498501527-Updates-to-Figma-s-pricing-seats-and-billing-experience#h_01JCPBM8X2MBEXTABDM92HWZG4" target="_blank" rel="noopener" title="descriptions of Figma 'seats'">Dev or Full seat</a> on the <a href="https://help.figma.com/hc/en-us/articles/360040328273-Figma-plans-and-features" target="_blank" rel="noopener" title="Figma plans and features">Professional, Organization, or Enterprise plans</a>.</li>
                    <li>A code editor or application that supports MCP Servers (<a href="https://code.visualstudio.com/docs/copilot/overview" target="_blank" rel="noopener" title="GitHub Copilot in VS Code">VS Code</a>, <a href="https://www.cursor.com/" target="_blank" rel="noopener" title="Cursor official page">Cursor</a>, <a href="https://windsurf.dev/" target="_blank" rel="noopener" title="Windsurf official page">Windsurf</a>, <a href="https://docs.anthropic.com/en/docs/claude-code/overview" target="_blank" rel="noopener" title="Claude Code official page">Claude Code</a>).</li>
                    <li><a href="https://www.figma.com/downloads/" target="_blank" rel="noopener" title="Figma Downloads">Figma Desktop App</a></li>
                </ul>
                <h4>Description</h4>
                <p>This is the official Figma MCP server.</p>
                <p>It enables several analysis tools (5 at the time of this post's publication) that agents can use to generate code from a design.</p>
                <p>The tools that allow "viewing" a design are <code>get_code</code> and <code>get_image</code>. Unlike the Figma API, <code>get_code</code> does not return a JSON with the design data, but a translation of the design to React that Dev Mode generates on the fly.</p>
                <p>This makes it easier for the LLM to generate code even if it's not React, as the distance between React and another framework/language is smaller than between the JSON information and our framework/language.</p>
                <p><code>get_image</code> creates a screenshot of the selected design and supports the agent when generating code.</p>
                <h4>Installation</h4>
                <ol>
                    <li><a href="https://help.figma.com/hc/en-us/articles/32132100833559-Guide-to-the-Dev-Mode-MCP-Server#h_01K25F7RBP00A3VH1733692QN2" target="_blank" rel="noopener" title="Step 1: Enable the MCP Server">Activation in Figma Desktop App</a></li>
                    <li><a href="https://help.figma.com/hc/en-us/articles/32132100833559-Guide-to-the-Dev-Mode-MCP-Server#h_01K25F7RBRZKCATVJHNXCS6KXW" target="_blank" rel="noopener" title="Step 2: Set up your MCP client">Installation in our code editor</a> (Cursor, VS Code, Windsurf, Claude Code, Others)</li>
                </ol>

                <h3 id="claude-talk-to-figma-mcp">Claude Talk to Figma MCP</h3>
                <h4>Requirements</h4>
                <ul>
                    <li><a href="https://claude.ai/download" target="_blank" rel="noopener" title="Claude Desktop download page">Claude Desktop</a></li>
                    <li><a href="https://www.figma.com/downloads/" target="_blank" rel="noopener" title="Figma Downloads">Figma Desktop</a></li>
                    <li><a href="https://bun.sh/" target="_blank" rel="noopener" title="Bun official page">Bun</a> installed</li>
                </ul>
                <h4>Description</h4>
                <p>Open source MCP server.</p>
                <p>It enables a wide set of tools (43 at the time of this post's publication) that allow agents to analyze and also modify designs in Figma.</p>
                <p>The tools that allow "viewing" a design return a JSON with its data. This allows LLMs to analyze it through "thinking aloud", critical evaluation, user testing, accessibility audit, SEO audit, etc.</p>
                <p>With the modification tools, the LLM can then apply the changes proposed in the analysis.</p>
                <h4>Installation</h4>
                <p>Follow the instructions in the <a href="https://github.com/arinspunk/claude-talk-to-figma-mcp/tree/main?tab=readme-ov-file#-installation" target="_blank" rel="noopener" title="Claude Talk to Figma MCP Installation">official documentation</a>.</p>
                
                <h2>Share your experience</h2>
                <p>If you are already integrating Figma into your AI workflow, either with these or other tools, I would love to hear about your experience:</p>
                <ul>
                    <li>How the installation went.</li>
					<li>Experiments and discoveries.</li>
                    <li>Real use cases.</li>
                    <li>Results obtained.</li>
                </ul>
                <p>The AI + design/development ecosystem is constantly evolving and best practices emerge from the collective experience of those who implement them in real projects ✊</p>
                <p>If you haven't done it yet, dare to try one of the tools in this post. If you get stuck, you can write to me on my <a href="https://www.linkedin.com/in/xulioze/" target="_blank" rel="noopener" title="LinkedIn Profile">LinkedIn profile</a> 😉</p>
]]>
      </content:encoded>
      <pubDate>Thu, 24 Jul 2025 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Prompt, Context and Memory</title>
      <link>https://xulioze.com/en/blog/prompt-context-memory.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/prompt-context-memory.html</guid>
      <description>The three fundamental pillars of any interaction with AI language models</description>
      <content:encoded>
        <![CDATA[				<p>I started using AI in my work as a software developer a little over 2 years ago. <a href="https://xulioze.com/en/blog/build-pwa-with-chatgpt.html" title="My initial experience with ChatGPT to build a PWA">With ChatGPT and in a crude way</a>, like most people, I imagine 😅</p>

				<p>Throughout this time <a href="https://xulioze.com/en/blog/how-talk-with-chatgpt.html" title="Guide on how to communicate effectively with ChatGPT">I refined my conversation with LLMs</a>, started using code assistants (GitHub Copilot) and then assistants with agents (Cursor) and even developed agent systems with frameworks like CrewAI. But it wasn't until now that I clearly understood that any interaction with language models, <a href="https://xulioze.com/en/blog/ai-for-developers.html" title="Reflections on software development with artificial intelligence">no matter what tool we use</a>, boils down to three fundamental points: prompt, context, and memory.</p>

				<h2>Prompt</h2>

				<p>Through the prompt, we create the expert we need for a specific task, we tell them what to do and also what not to do. It's the means we have to achieve the desired result.</p>

				<p>To write the appropriate prompt for each task, we have <a href="https://www.promptingguide.ai/" title="Complete prompt engineering guide">prompt engineering</a>. Knowing its main techniques is important, but what really makes us improve is continuous practice with LLMs, our conversation with AI.</p>

				<h2>Context</h2>

				<p>Large language models have vast knowledge, but for certain tasks this is not enough. Providing additional context becomes an unavoidable necessity.</p>

				<p>To provide context, we have different approaches, from simply including relevant information in the prompt, to adding reference documents, to <a href="https://www.anthropic.com/news/model-context-protocol" title="MCP explained by Anthropic">using MCPs</a> that allow LLMs to access content from multiple platforms (Jira, Drive, etc.) and tools (<a href="https://xulioze.com/en/blog/claude-talk-to-figma-mcp.html" title="How to make Claude communicate with Figma using MCP">Figma</a>, Draw.io, etc.).</p>

				<h2>Memory</h2>

				<p>LLMs have the ability to remember our conversations, but this memory has a limit (<a href="https://www.ibm.com/think/topics/context-window" title="Explanation about the context window limit in LLMs">context window limit</a>). The more complex the task to be developed, the more likely we are to exceed this limit and the more necessary it becomes to extend the LLM's memory.</p>

				<p>There are different techniques to expand LLMs' memory, some quite sophisticated like using classical and <a href="https://xulioze.com/en/blog/vector-stores-introduction.html" title="Introduction to vector databases">vector databases</a>, but the simplest way to do it is by introducing <a href="https://xulioze.com/en/blog/extended-context.html" title="Strategies to extend LLMs' context and memory">extended context/memory strategies</a> into our routines.</p>

                <img class="c-post__body-img" src="https://xulioze.com/img/prompt-contexto-memoria.jpg" alt="Frank and the robot talking" width="900" height="383" loading="lazy">

				<h2>In perspective</h2>

				<p>Prompt, context, and memory. That is, the correct instructions to achieve the desired objective, the necessary information to understand the project and its objective, and the record of completed work (when, how, where, and why).</p>

				<p>If you think about it for a moment, it's not very different from what humans need to develop any complex task. Really, every time we delve deeper into the use of AI, we encounter situations where we see a clear parallel between how LLMs work and how we do. Not in vain are we entering an era where we no longer "talk" to machines through code, but rather talk to machines naturally. <a href="https://www.youtube.com/watch?v=YBPOguI-AFI&ab_channel=ChandanDatta" target="_blank" rel="noopener" title="Frank's conversation with his robot">Something that Frank already discovered more than 10 years ago</a> 😎🤖.</p>
]]>
      </content:encoded>
      <pubDate>Wed, 25 Jun 2025 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Guide: Developing Quality Software Assisted by AI Agents</title>
      <link>https://xulioze.com/en/blog/guide-develop-software-agents.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/guide-develop-software-agents.html</guid>
      <description>
        A comprehensive guide to implement extended context strategies that allow developing complex projects with AI agents while maintaining coherence and quality.
      </description>
      <content:encoded>
        <![CDATA[				<img class="c-post__body-img" src="https://xulioze.com/img/extended-context-guide.jpg" alt="notes in a screen"  width="900" height="383" loading="lazy">

				<p>This guide is an improved version of the proposal initially presented in "<a href="https://xulioze.com/en/blog/extended-context.html" title="Extended Context. Agents also need to take notes">Extended Context. Agents also need to take notes</a>".</p>

				<p>Its purpose is to implement a strategy that allows us to develop complex projects assisted by agents without losing the coherence and quality of the generated code.</p>

				<p>Its writing is oriented for use with tools like Cursor or GitHub Copilot, but it can be easily adapted to many others.</p>

				<h2>Context System Structure</h2>

				<p>To implement this strategy, we create a <code>context/</code> folder in the project root with the following structure:</p>

				<pre class="c-post__prompt"><code class="c-post__prompt-code">context/
├── 01-expert.md      # Synthetic expert definition
├── 02-analysis.md    # Analysis of existing code (empty)
├── 03-plan.md        # Master development plan (empty)
└── 04-backlog.md     # Detailed tasks and their status (empty)</code></pre>

				<h2>Step 1: Synthetic Expert Definition</h2>

				<p>The first step consists of defining a "synthetic expert": a specific role with clear competencies and restrictions that will guide the AI agent throughout development.</p>

				<h3>Prompt for the agent:</h3>

				<pre class="c-post__prompt"><code class="c-post__prompt-code">Read the `context/01-expert.md` file to understand your role in the project.

Do not generate code until you receive specific requirements.</code></pre>

				<h3>Example content for <code>context/01-expert.md</code>:</h3>

				<pre class="c-post__prompt"><code class="c-post__prompt-code"># SUDO: Act as a Senior Frontend Development Expert specialized in HTML5, CSS3/SCSS and JavaScript ES6+.

## ROLE
Senior Frontend Developer (10+ years) expert in semantic HTML5, advanced CSS3/SCSS with BEM and ITCSS methodologies, and modern JavaScript ES6+, with focus on component architecture, performance and accessibility.

## TECHNICAL_COMPETENCIES

- Semantic HTML5 and accessibility (ARIA, WCAG 2.1)
- Advanced CSS3 (Grid, Flexbox, animations, custom properties)
- SCSS/Sass with ITCSS architecture (Inverted Triangle CSS)
- Strict BEM methodology (Block__Element--Modifier)
- JavaScript ES6+ (async/await, modules, destructuring, classes)
- State management and component architecture
- Web performance optimization (Core Web Vitals)
- Unit and integration testing
- Modern build tools (Vite, Webpack)

## WORK_PRINCIPLES

- Clean and maintainable code following SOLID principles
- Clear and concise documentation
- Mobile-first and responsive approach
- Progressive enhancement
- Semantics before presentation

## RESTRICTIONS

- Avoid jQuery and legacy libraries unless specific requirement
- Maintain compatibility with modern browsers (latest 2 versions)
- Prioritize native solutions over external dependencies
- Do not generate code until receiving specific requirements</code></pre>

				<p>⚠️ Important: The last restriction ("Do not generate code until receiving specific requirements") is fundamental, models are very proactive 😅</p>

				<h2>Step 2: Project Code Analysis</h2>

				<p>This step is only necessary for existing projects. If you're starting a project from scratch, you can omit it.</p>

				<p>Now we ask the agent to analyze the project code and save its analysis in <code>context/02-analysis.md</code></p>

				<h3>Prompt for the agent:</h3>

				<pre class="c-post__prompt"><code class="c-post__prompt-code">Analyze in depth the current project code. Exclude the `context/` folder from the analysis.

Save the analysis result in `context/02-analysis.md` with the following structure:
- Executive summary
- Current architecture
- Technologies used
- Identified patterns
- Potential improvement areas
- Critical dependencies

When finished, wait for additional instructions without performing any action.</code></pre>

				<p>⚠️ Important: Don't hesitate to iterate with the agent if you're not satisfied with their first analysis.</p>

				<h2>Step 3: Master Plan Creation</h2>

				<p>Once the code is analyzed, we explain to the agent what we want to develop and ask them to define a master plan that should be saved in <code>context/03-plan.md</code></p>

				<p>The master plan is the fundamental document that will guide all development. Take the time necessary to clearly define requirements and objectives.</p>

				<h3>Prompt for the agent:</h3>

				<pre class="c-post__prompt"><code class="c-post__prompt-code">Based on the following requirements, create a detailed master plan for development:

[PROJECT REQUIREMENTS]

I need to create a REST service that processes images in batches. The service must:

- Receive multiple images in a single request
- Resize images according to configurable parameters
- Compress and optimize for web
- Return processed images in WebP format
- Implement cache to optimize resources
- Provide endpoints to query processing status

Technical considerations:

- Use Bun for its performance in intensive operations
- Evaluate compatibility with image processing libraries
- Implement asynchronous processing for large batches
- Include robust input validation

[END OF REQUIREMENTS]

Create a structured master plan and save it in `context/03-plan.md`.

When finished, wait for additional instructions.</code></pre>

				<p>⚠️ Important: Continue dialoguing with the agent if you see that the plan is missing or has too much.</p>

				<h2>Step 4: Detailed Backlog Creation</h2>

				<p>At this point we ask the agent to transform the master plan into executable tasks, as small and specific as possible. More granular tasks result in higher quality code.</p>

				<h3>Prompt for the agent:</h3>

				<pre class="c-post__prompt"><code class="c-post__prompt-code">Divide the master plan into atomic tasks following these criteria:

- Detailed description of technical requirements
- Clearly identified dependencies

Save the list in `context/04-backlog.md` with this structure:

# Task Backlog - [Project Name]

## Project Summary
[Brief description and implementation of the plan in `context/03-plan.md`]

## Task Status

### PHASE 1: [PHASE TITLE]

- **1.1** ⏳ [task title]
  - **Detailed description**:
  - **Dependencies**:
  - **Date**: 
  - **Work completed**: 

- **1.2** ⏳ [task title]
  - **Detailed description**:
  - **Dependencies**:
  - **Date**: 
  - **Work completed**:

### PHASE 2: [PHASE TITLE]
[Continue with the same format...]

## Status Legend
- ⏳ Pending
- 🔄 In progress
- ✅ Completed
- ⚠️ Blocked

## Notes and Dependencies
[Additional relevant information]

## Progress Tracking
- Total tasks: 0
- Completed tasks: 0
- Progress: 0%

When finished, wait for additional instructions</code></pre>

				<p>⚠️ Important: It's necessary to indicate to the LLM the backlog structure we want, otherwise it gets creative 😬</p>

				<h2>Step 5: Task Execution</h2>

				<p>With the backlog defined, we proceed to execute tasks systematically.</p>

				<h3>Prompt to execute a task:</h3>

				<pre class="c-post__prompt"><code class="c-post__prompt-code">Execute task 1.1 from the backlog (`context/04-backlog.md`) following its description strictly.

Additional context available in:
- `context/02-analysis.md` (if exists)
- `context/03-plan.md`

Execution requirements:
- Use agent tools to create files and folders (not terminal)
- Follow conventions established in the initial prompt
- Document code according to defined standards
- Do not perform actions outside the task scope

Upon completion:
1. Update task status in `context/04-backlog.md`:
   - Change status to ✅
   - Add completion date
   - Describe work completed
   - Update Progress Tracking
2. Wait for additional instructions without executing more tasks</code></pre>

				<p>⚠️ Important: It's necessary to ask the LLM not to do anything more than indicated in the task to avoid overstepping.</p>

				<h2>Step 6: Context Window Reset</h2>

				<p>To maintain quality and coherence, it's necessary to periodically reset the context window.</p>

				<p>It's evident that we should reset the context window when we notice the agent starts to "lose direction". But the optimal approach is to never reach this point and open a new chat:</p>

				<ul>
					<li>Every 4-6 completed tasks</li>
					<li>When changing phases (our backlog example is structured in phases that are divided into tasks).</li>
				</ul>

				<h3>Reset prompt:</h3>

				<pre class="c-post__prompt"><code class="c-post__prompt-code">Initial instructions:

1. Read `context/01-expert.md` to understand your role in this project
2. Read `context/02-analysis.md` to know the current state of the code
3. Read `context/03-plan.md` to understand the objectives
4. Read `context/04-backlog.md` to see progress and pending tasks

Provide a brief summary of:

- Your role and competencies
- Current project status
- Next tasks to execute

When finished, wait for additional instructions.</code></pre>

				<h2>Automation with Shortcuts</h2>

				<p>Both GitHub Copilot and Cursor allow creating custom shortcuts for frequent prompts:</p>

				<h3>GitHub Copilot</h3>
				<ul>
					<li>
						<a href="https://code.visualstudio.com/docs/copilot/copilot-customization#_instruction-files" target="_blank" rel="noopener" title="Custom instructions (VSCode)">
							Instructions
						</a>
					</li>
					<li>
						<a href="https://code.visualstudio.com/docs/copilot/copilot-customization#_prompt-files-experimental" target="_blank" rel="noopener" title="Custom prompts (VSCode)">
							Prompts
						</a>
					</li>
				</ul>

				<h3>Cursor</h3>
				<ul>
					<li>
						<a href="https://docs.cursor.com/context/rules" target="_blank" rel="noopener" title="Custom rules (Cursor)">
							Rules
						</a>
					</li>
				</ul>

				<h2>System Benefits</h2>

				<p>This context management strategy transforms the context window limitation from an obstacle into an opportunity to work more structured and efficiently. The main benefits include:</p>

				<ul>
					<li>Continuity: Maintain progress without losing critical information</li>
					<li>Consistent quality: The agent maintains the same level of detail and precision</li>
					<li>Traceability: Complete record of decisions and project evolution</li>
					<li>Better collaboration: Facilitates team work and onboarding of new members</li>
				</ul>

				<h2>Conclusion</h2>

				<p>By implementing this system, you not only avoid the technical limitations of LLMs but also establish a more professional and scalable development methodology for AI-assisted projects.</p>

				<hr>

				<p>Questions or suggestions? Share your experience implementing this strategy and help improve the guide for the community.</p>
]]>
      </content:encoded>
      <pubDate>Sun, 25 May 2025 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Extended Context. Agents also need to take notes</title>
      <link>https://xulioze.com/en/blog/extended-context.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/extended-context.html</guid>
      <description>
        Discover the 'extended context' strategy to maintain coherence in complex projects with AI agents using markdown files as external memory for your LLMs.
      </description>
      <content:encoded>
        <![CDATA[				<img class="c-post__body-img" src="https://xulioze.com/img/extended-context-her.jpg" alt="screen with handwritten notes" width="768" loading="lazy">

				<p>The purpose of this post is to describe a context expansion strategy in the development of complex projects with agents. But since not only LLMs need context to understand ideas, I'll start with a bit of context for humans.</p>

				<p><em>If you're in a hurry and want to skip the previous context, <a href="https://xulioze.com/en/blog/extended-context.html#extended-context">go ahead</a> and don't worry, no one will know you had this mini laziness attack </em> 😬</p>

				<h2>Context for humans</h2>

				<p>The emergence of agents in code assistants has represented a huge leap in AI-assisted software development.</p>

				<p>The first striking feature is their ability to automatically iterate on their own responses, create/modify files, and run commands in the terminal. But I think the skill that really makes a difference is their ability to index and analyze a project's code, including dependencies between files and relationships between its components.</p>

				<p>If assistants allowed us to work at the file level, with the appearance of agents we have moved to working at the architecture level. Now AI not only helps us in writing/fixing parts of our code, but also assists us in building complete projects (at a speed that sometimes makes you dizzy).</p>

				<p>But this increase in the complexity of the tasks developed causes something that was difficult to see before - we push the context window of the agents themselves to the limit. Developing a complete project requires many tasks, so at some point in the conversation the agent begins to forget parts of the conversation, making it very difficult (if not impossible) to maintain the coherence of the work we are doing.</p>

				<p>When this happens, the most common approach is to open a new chat to reset the context window, but how do we bring the agent to the point where we were? How do we make it remember what it had already built and what it still needs to develop?</p>

				<p>In my case, I'm using a strategy that I've been defining from my interactions with Cursor first and GitHub Copilot Agent Mode afterwards, which I call Extended Context. I know I'm not very original, but I think it expresses the idea decently 🤓</p>

				<h2 id="extended-context">Extended context (using markdowns as memory)</h2>

				<p>This strategy is based on storing markdown files with project information in a folder called <code>context/</code></p>

				<p>The central idea is to create a memory that the agent (or we) can access at any time, allowing it to know what point it's at and what remains to be done</p>
				
				<p>Thanks to this memory, we can divide the work into small tasks and use as many chats as necessary to avoid reaching the context window limit. This way, we maintain the coherence and quality of the work from start to finish.</p>

				<h3>Working scheme</h3>

				<p>The working scheme is summarized in the following image.</p>

				<img class="c-post__body-img" src="https://xulioze.com/img/extended-context.png" alt="Working scheme with 3 chats" width="840" loading="lazy">

				<p>Chat 0</p>

				<ol>
					<li>Prompt to create a synthetic expert in the project's technology: role, experience, technical stack, reasoning approach, and response format. Ending with a "don't write code yet".</li>
					<li>Prompt where we ask it to:
						<ul>
							<li>analyze the project code,</li>
							<li>generate a report of its analysis,</li>
							<li>and save it in <code>.md</code> format inside the <code>context/</code> folder with a 00- prefix in the filename.
							If we are not completely satisfied with the report, we can iterate on it until we are satisfied.</li>
						</ul>
					</li>
					<li>Prompt where:
						<ul>
							<li>we indicate what we want to do (requirements),</li>
							<li>ask it to generate a master plan,</li>
							<li>and save the master plan in <code>.md</code> format inside the <code>context/</code> folder with a 01- prefix in the filename.
							As with the analysis, we can iterate on it until we are satisfied.</li>
						</ul>
					</li>
				</ol>

				<p>Chat 1</p>

				<ol>
					<li>Same prompt for creating a synthetic expert.</li>
					<li>Prompt asking it to read and internalize the project analysis.</li>
					<li>Prompt asking it to read and internalize the master plan.</li>
					<li>Prompt asking it to execute point 1 of the master plan.</li>
					<li>Normal iteration until point 1 is completed.</li>
					<li>Prompt asking it to document the work developed in point 1 in a <code>.md</code> file inside <code>context/</code> following the current numbering and to mark the point as resolved in the master plan.</li>
				</ol>

				<p>Chat n</p>

				<ol>
					<li>Same prompt for creating a synthetic expert</li>
					<li>Prompt asking it to read and internalize the project analysis</li>
					<li>Prompt asking it to read and internalize the master plan</li>
					<li>Prompt asking it to execute point n of the master plan</li>
					<li>Normal iteration until point n is completed.</li>
					<li>Prompt asking it to document the work developed in point n in the previously created documentation <code>.md</code> file and to mark the point as resolved in the master plan.</li>
				</ol>

				<p>Obviously, this scheme is a working base that can be modified according to the needs of each project and that I hope to improve over time. Even so, in its initial form, I think it already offers some advantages compared to not using any strategy.</p>

				<h2>Advantages of extended context</h2>

				<ol>
					<li>We avoid context loss: the agent can consult the files when it needs to remember where it came from and where it's going.</li>
					<li>Continuity: we can close the computer and resume work days later without losing the thread.</li>
					<li>Collaboration: other team members can easily understand the project's status and continue it (with their agents).</li>
					<li>Automatic documentation: upon completion, we already have structured documentation.</li>
					<li>Facilitates task division: orienting work towards agile methodologies and sprints.</li>
				</ol>

				<h2>Finishing up</h2>

				<p>It's ironic that in this imitation of human thinking represented by language models, we have not only copied their capabilities but also their limitations. And among them is a very human one: forgetting. So just like imperfect humans, imperfect LLMs also need to take notes. That said, if they're in markdown, even better - they love markdown!</p>

				<p>By the way, do you have your agents take notes or do you have any other strategy when developing complex projects? If you work differently, I'd love to hear about your experience 😊</p>
]]>
      </content:encoded>
      <pubDate>Tue, 22 Apr 2025 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Claude Talk to Figma, my first MCP server</title>
      <link>https://xulioze.com/en/blog/claude-talk-to-figma-mcp.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/claude-talk-to-figma-mcp.html</guid>
      <description>My experience creating an MCP server that connects Claude with Figma, allowing AI to directly interact with UX/UI designs.</description>
      <content:encoded>
        <![CDATA[				<img class="c-post__body-img" src="https://xulioze.com/img/claude-talk-to-figma-metas.jpg" alt="Theodore thinking" width="768" loading="lazy">

				<p>Last week <a href="https://www.linkedin.com/in/marc-wabnitz-0135ba24/" target="_blank" rel="noopener" title="LinkedIn profile">Marc</a>, a colleague from the amazing UX/UI team at <a href="https://www.makingscience.es/" target="_blank" rel="noopener" title="AI Powered Digital Acceleration">Making Science</a>, shared with us an MCP server to connect Cursor to Figma and provide its agents with the ability not only to view designs in Figma, but also to manipulate them 😳</p>

				<p>The MCP was <a href="https://github.com/sonnylazuardi/cursor-talk-to-figma-mcp"  target="_blank" rel="noopener" title="project repository">Cursor Talk to Figma</a>, by <a href="https://sonnylab.framer.website/" target="_blank" rel="noopener" title="personal page">Sunny Lazuardi</a>. If you're looking for a way to connect Cursor with Figma, look no further, this is your MCP 👌🏻</p>
    
				<p>Since I have a Cursor license, I told him I could install it and do a test with them. The test went well, it was actually quite surprising to see Cursor's agent take control of Figma and modify a design, but shortly after I began to wonder if this was the right way for the UX/UI team to introduce AI into their workflow, mainly because Cursor is a tool focused on code development.</p>
				
				<p>Reviewing the MCP code, I saw that perhaps it could be adapted for use in Claude Desktop, since my UX/UI colleagues have licenses for this tool. The truth is that the original could already connect to Claude, but the way to do it wasn't obvious and wasn't described in the documentation, so with the aim of tinkering a bit and learning how an MCP server works from the inside, I got to work:</p>
				
				<ol>
					<li>I wrote <a href="https://github.com/arinspunk/claude-talk-to-figma-mcp/blob/main/scripts/configure-claude.js" target="_blank" rel="noopener" title="code on GitHub">a script to configure Claude automatically</a> by running a command via terminal: <code>bun run configure-claude</code>.</li>
					<li><a href="https://github.com/arinspunk/claude-talk-to-figma-mcp/commit/9de571d6bff9ea552b2a22cb2ca0b89f0108853c#diff-8d97fde957b1b60105e210d02f027f6a1babb3f5521e88d87d888171763bf08e" target="_blank" rel="noopener" title="commit of changes">Extended the socket features</a>:
						<ol>
							<li>Improved logging</li>
							<li>Creation of status endpoint <code>/status</code></li>
							<li>Channel system to allow different clients to join specific channels</li>
							<li>Inclusion of statistics for each channel</li>
						</ol>
					</li>
					<li><a href="https://github.com/arinspunk/claude-talk-to-figma-mcp/blob/main/TESTING.md" target="_blank" rel="noopener" title="test documentation on GitHub">Added tests</a> to verify correct project integration.</li>
					<li>Wrote a <a href="https://github.com/arinspunk/claude-talk-to-figma-mcp/blob/main/readme.md" target="_blank" rel="noopener" title="project documentation">README.md</a> with documentation now oriented toward its use in Claude.</li>
					<li>Published the MCP server as an <a href="https://www.npmjs.com/package/claude-talk-to-figma-mcp" target="_blank" rel="noopener" title="package page on NPM">npm package</a>.</li>
					<li>Published the project on GitHub...</li>
				</ol>
				
				<p>And voilà, my first MCP server: <a href="https://github.com/arinspunk/claude-talk-to-figma-mcp" target="_blank" rel="noopener" title="project repository">Claude Talk To Figma MCP</a> 🥳</p>

				<h2>Update, April 11</h2>
				
				<p>After a few days of testing, the UX/UI team detected that in the initial collection of tools for modifying designs, some important ones were missing such as auto layout (layoutMode, paddingTop, paddingBottom, etc.), typography control (fontName, fontSize, fontWeight, etc.) or shape creation (createEllipse, createPolygon, createStar, etc.), so we are currently adding them little by little. You can follow the progress in <a href="https://github.com/arinspunk/claude-talk-to-figma-mcp/blob/main/CHANGELOG.md" target="_blank" rel="noopener" title="visit the changelog in GitHub">the project's changelog</a>.</p>
]]>
      </content:encoded>
      <pubDate>Tue, 08 Apr 2025 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>AI for developers. Should we fall in love?</title>
      <link>https://xulioze.com/en/blog/ai-for-developers.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/ai-for-developers.html</guid>
      <description>The five existing ways today to write code assisted by Artificial Intelligence and to develop tools with integrated AI.</description>
      <content:encoded>
        <![CDATA[				<img class="c-post__body-img" src="https://xulioze.com/img/ia-developing-status-her.jpg" alt="Theodore thinking" width="768" loading="lazy">

				<p>If you started reading this post attracted by its title, you might be disappointed. You won't find a love story between humans and AIs here, not even a typical narrative. These are simply some notes, with a certain structure, about my view on the current state of software development with and for artificial intelligence.</p>

				<p>By "with" I refer to writing code with the help of AI. And by "for," to developing specific software with integrated AI.</p>

				<h2>Ways to develop with/for AI</h2>

				<p>As of today, there are 5:</p>

				<ol>
					<li>Not using AI</li>
					<li>Chats</li>
					<li>Code assistants</li>
					<li>Code assistants with AI agents</li>
					<li>Development of proprietary agents</li>
				</ol>

				<h3>Not using AI</h3>

				<p>I understand this stance, especially if you're a Senior developer and you're a bit tired of all the noise around the topic. I acknowledge that <a href="https://www.wheresyoured.at/longcon/" title="Article about AI hype" target="_blank" rel="noopener">there's a lot of hype in AI</a> (give the article a chance, it's always good to have some wind among so much smoke 😉), but it's worth using it, if only to save yourself from going through <a href="https://stackoverflow.com/" title="Question and answer community for programmers" target="_blank" rel="noopener">Stack Overflow</a> two hundred times to solve an error that's blocking you or to avoid having to read through the entire documentation of a new API to develop something simple.</p>

				<h3>Chats</h3>

				<p><a href="https://chat.openai.com/" title="ChatGPT by OpenAI" target="_blank" rel="noopener">ChatGPT</a>, <a href="https://www.deepseek.com/" title="DeepSeek AI Platform" target="_blank" rel="noopener">DeepSeek</a>, <a href="https://gemini.google.com/" title="Google's Gemini AI model" target="_blank" rel="noopener">Gemini</a>, <a href="https://claude.ai/" title="Anthropic's AI assistant" target="_blank" rel="noopener">Claude</a>, etc.</p>

				<p>These are the most widely used type of tools. Both because of their age and accessibility, as all models have free versions through browsers or apps.</p>

				<p>The type of interaction with AI is conversational: we ask questions and get answers. But the chat's disconnection from our local files forces us to move code back and forth.</p>

				<p>In chats, providing the right context is fundamental. Given that their knowledge is vast, to get precise answers about a specific programming language, it's necessary to narrow down and clearly define the scope of the query. For this, we use prompts with:</p>

				<ul>
					<li>Role</li>
					<li>Experience</li>
					<li>Technical staff</li>
					<li>Prompting techniques such as:
						<ul>
							<li>Chain-of-Thought</li>
							<li>Knowledge Generation</li>
						</ul>
					</li>
				</ul>

				<p>Additionally, chats have evolved, incorporating the possibility of adding extra context by uploading files from your local device or even directly from GitHub repositories, as in the case of Claude.</p>

				<h3>Code assistants</h3>

				<p><a href="https://github.com/features/copilot" title="GitHub Copilot" target="_blank" rel="noopener">GitHub Copilot</a>, <a href="https://developers.google.com/gemini-code-assist" title="Google Gemini Code Assistant" target="_blank" rel="noopener">Gemini Code Assist</a>, <a href="https://v0.dev/" title="V0 code generation platform" target="_blank" rel="noopener">V0</a>, etc.</p>

				<p>Their use is not as widespread. This is because they are more recent than chats and because their free versions only last a few trial days. Although this situation seems to be changing; for example, Google offers its <a href="https://developers.google.com/gemini-code-assist/docs/overview#supported-features-gca" title="Gemini Code Assist features" target="_blank" rel="noopener">Gemini Code Assist</a> for free for individual use.</p>

				<p>In addition to being able to converse with AI, assistants offer code suggestions for the file we're editing. Unlike Chats, here we don't have to copy and paste code.</p>

				<p>Providing context is not as important. Their knowledge is limited to code development, and they read the file we have open, which allows them to know the language we're using.</p>

				<p>When making queries, you can add files or specific lines within a file, but assistants don't have the context of all the files in a project.</p>

				<h3>Code assistants with AI agents</h3>

				<p><a href="https://www.cursor.com/" title="Cursor: AI code assistant" target="_blank" rel="noopener">Cursor</a>, <a href="https://pythagora.ai/" title="Pythagora.ai: AI development platform" target="_blank" rel="noopener">Pythagora.ai</a>, <a href="https://codegpt.com/" title="CodeGPT: AI code assistant" target="_blank" rel="noopener">CodeGPT</a>, and soon <a href="https://github.blog/news-insights/product-news/github-copilot-the-agent-awakens/" title="Upcoming GitHub Copilot Agent Mode" target="_blank" rel="noopener">GitHub Copilot Agent Mode</a> (if you have a GitHub Copilot license and want to try it, sign up for <a href="https://github.com/github-copilot/workspace_waitlist_signup/" title="GitHub Copilot waiting list" target="_blank" rel="noopener">the waiting list</a>, maybe it was luck but I was given access in less than 24 hours).</p>

				<p>In addition to conversation and code suggestions, this type of assistants includes AI Agents.</p>

				<p>While for traditional code assistants context was not as important, with the use of agents it becomes essential again, especially if we're going to build software from scratch. So don't set aside <a href="https://www.promptingguide.ai/es" title="Prompt engineering guide" target="_blank" rel="noopener">prompt engineering</a>, and thank goodness because I consider it one of the most fun parts of working with AIs!</p>

				<p>Unlike "traditional" assistants, agents do have the context of all the files in a project, including their relationships (such as function imports). Additionally, they are capable of:</p>

				<ul>
					<li>Creating and modifying files. Always pending your final approval</li>
					<li>Using the terminal. Seeing this for the first few times is a bit impressive 😅</li>
					<li>Creating branches and making commits. Merges are left to a bipedal mammal.</li>
					<li>Working in parallel with you. Yes, you can review the code for an API connection while it develops the 5 new components you've asked for 😳</li>
				</ul>

				<h3>Development of proprietary agents</h3>

				<p>This path is the most different, as its true function is not to help us develop code, but to create software with integrated AI.</p>

				<p>There are several frameworks (mainly in Python) that facilitate code development, agent creation, and LLM integration. Among the most used are <a href="https://docs.llamaindex.ai/en/stable/" title="LlamaIndex documentation" target="_blank" rel="noopener">LlamaIndex</a> and <a href="https://docs.crewai.com/introduction" title="Crew AI documentation" target="_blank" rel="noopener">Crew AI</a>.</p>

				<p>In theory, we could develop our own tools for code creation. However, my opinion is that, unless you're looking for a very specific solution, building an assistance agent doesn't compensate for the effort. The reason is simple: it requires developing multiple components from scratch that in the case of Assistants like Cursor or Pythagora are already included:</p>

				<ul>
					<li>Tools to read code from a repository</li>
					<li>RAG (Retrieval-Augmented Generation) to give context to the LLM:
						<ul>
							<li>Vector database with the repository's code</li>
							<li>Retrievers to make queries to the database and return results to the LLM</li>
						</ul>
					</li>
					<li>Agents and tasks</li>
					<li>Tools for writing code</li>
					<li>Other technical components</li>
				</ul>

				<p>However, I believe the power of this approach is that we can incorporate AI relatively easily into our software and develop our own AI tools without depending on those offered (and charged for) by third parties. Although for now, we cannot completely get rid of paying for queries to the APIs of the models we use in our developments. An alternative to APIs, especially if you don't need great depth of reasoning, is to use <a href="https://ollama.com/search" title="Local AI models with Ollama" target="_blank" rel="noopener">local models</a>, but that's a story to tackle in another post 😊</p>

				<h2>Some final thoughts</h2>

				<p>I believe the use of chats will not disappear. Being dissatisfied with the assistant's proposal, preferring to compare the response with other models, or learning about a new language while you're on the train, are situations where turning to these tools will continue to be a good option. So if you see someone asking questions to their phone about Redux while grabbing a carton of milk at the supermarket, give them a chance, maybe they're not completely crazy and are simply trying to resolve a doubt they brought from work using ChatGPT's voice interface.</p>

				<p>I believe all code assistants will end up including agents and will become the standard of work for developers in the near future. I also believe that the way of working will change radically with them, although I have no idea what our profession will be like after the transformation.</p>

				<p>I believe it's worth delving into the creation of software with integrated AI. Getting started is affordable, with a gentle learning curve. A significant part of our profession will be oriented towards that. And fundamentally because everything is yet to be done, which means a lot of fun!</p>

				<p>So, should we let ourselves be carried away by the general madness and fall in love? Well, if we learned anything from Theodore, it's that falling for an AI is not a good business, so let's better explore these new tools calmly, learn to use them (and enjoy them) and see what remains when all this apparent passion dissipates. Because what is certain is that for a long time, behind every line of code will still be human judgment.</p>
]]>
      </content:encoded>
      <pubDate>Wed, 26 Mar 2025 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Introduction to Vector Databases: input, more input!</title>
      <link>https://xulioze.com/en/blog/vector-stores-introduction.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/vector-stores-introduction.html</guid>
      <description>Discover what vector databases are, how they store embeddings, and why they are key in AI-driven software development.</description>
      <content:encoded>
        <![CDATA[				<img class="c-post__body-img" src="https://xulioze.com/img/vectorstores-johnny-5-input.webp" alt="Johnny No. 5 reading a book" width="768" loading="lazy">

				<p>I've been working for a few days with my colleague Olivier on an AI project. Our idea is to create a tool that automates documentation, refactoring, and test writing tasks for a repository’s code. As of today, we are not entirely sure if, from an operational standpoint, the effort is worth it, mainly because we’ve seen that there are services specifically developed for this, such as <a href="https://www.cursor.com/" target="_blank" rel="noopener" title="Official website">Cursor</a> or <a href="https://www.pythagora.ai/" target="_blank" rel="noopener" title="Official website">Pythagora</a>. However, what is certain is that we are learning a lot—besides losing a few hours of sleep… 😴</p>

				<p>When we first approach a new technology, we often feel overwhelmed by a torrent of new concepts and tools. In the case of AI-driven software development, this initial flood brings terms like LLMs, vector databases, retrievers, RAGs, AI agents, sentence transformers, etc.</p>

				<p>In this post, I will focus on vector databases (the title doesn’t lie). They are one of the key components in this field, and also, the best way to truly understand a concept is to be able to explain it simply. If this helps you as well, it means I haven’t misunderstood them completely. 😊</p>

				<h2>Vectors</h2>

				<p>To understand what vector databases are and how they work, we first need to understand what a vector is.</p>

				<p>In the field of machine learning, a vector is an ordered list of numbers representing data of any kind, including unstructured data such as text documents, images, audio, or videos.</p>

				<p>The number of values in a vector is known as its dimension, and vector databases handle vectors with several hundred dimensions. For example, OpenAI's <a href="https://platform.openai.com/docs/guides/embeddings#how-to-get-embeddings" target="_blank" rel="noopener" title="How to get embeddings, by OpenAI"><code>text-embedding-3-small</code></a> model generates vectors with 1,536 dimensions.</p>

				<p>1,536 dimensions make up a very large list of numbers. If we placed one here, you would likely leave the post out of boredom from scrolling. So, for a more manageable example, let's show the 3-dimensional vector representation of the word “love”:</p>

				<pre><code>[ 0.1234, -0.2567, 0.5432 ]</code></pre>

				<h2>Embeddings</h2>

				<p>Now that we have a clearer understanding of vectors, it's time to see how they are stored in a vector database. The way this is done is by embedding them as points in a multidimensional space.</p>

				<p>The number of dimensions in the space is determined by the dimensionality of the stored vectors. Personally, imagining points distributed in 768, 1,536, or 3,072 dimensions is a bit challenging. But maybe you’ve watched <em>Interstellar</em> dozens of times and feel capable of doing it. 😅</p>

				<p>If not, let's return to our previous example. Since we represented “love” with a vector of just three dimensions, it will be placed alongside other embeddings as a point on an XYZ coordinate axis. That makes it easier to visualize, right?</p>

				<img class="c-post__body-img" src="https://xulioze.com/img/vectorstores-embeddings.png" alt="embeddings in a multidimensional space" width="768" loading="lazy">

				<h2>Queries</h2>

				<p>Now that we know how data is stored in a vector database, let's see how queries are performed.</p>

				<p>First, the query is converted into an embedding that can be compared with the rest of the vectors in the database.</p>

				<p>Since embeddings are numerical representations, the distance between them can be measured using different mathematical metrics. The most common ones include:</p>

				<ul>
					<li>Euclidean distance ( √Σ(xᵢ - yᵢ)² ): measures the geometric distance in a multidimensional space.</li>
					<li>Cosine similarity ( cosθ ): measures the angle between two vectors, indicating how similar they are in direction.</li>
					<li>Manhattan distance ( Σ |xᵢ - yᵢ| ): calculates the sum of the absolute differences between each coordinate.</li>
				</ul>

				<p>Vector databases use algorithms such as <code>k-NN</code> (k-Nearest Neighbors) and <code>ANN</code> (Approximate Nearest Neighbors), which leverage these metrics to return the vectors closest to the query.</p>

				<p>This method allows for efficient searches across large datasets since it is not necessary to analyze the internal content of each vector—only their positions within the multidimensional space need to be compared.</p>

				<p>While efficiency in queries is crucial, the fundamental characteristic of vector databases is their ability to find the vectors closest to the query, a process known as similarity search.</p>

				<h2>Importance of Similarity Search</h2>

				<p>But why is similarity search so important? To fully grasp this, we need to go back to the beginning: the transformation of data into vectors, also known as embedding.</p>

				<p>The entity responsible for generating embeddings is not the database itself but a specialized language model called an embedding model. These models do not merely translate data into numbers; they encapsulate their semantics and context.</p>

				<img class="c-post__body-img" src="https://xulioze.com/img/vectorstores-semantic-similarity.png" alt="semantically close embeddings" width="768" loading="lazy">

				<p>And here lies the key to understanding the importance of this type of search. Similarity searches not only identify elements that are numerically close but also capture semantic similarities, enabling LLMs to recognize deep relationships within stored data.</p>

				<p>In short, vector databases not only facilitate access to information but also enhance LLMs’ ability to interpret and leverage available knowledge. <a href="https://www.youtube.com/watch?v=WnTKllDbu5o&ab_channel=CesareBianchi" target="_blank" rel="noopener" title="input, more input!">What Stephanie would have given to have one in 1986</a>!</p>
]]>
      </content:encoded>
      <pubDate>Wed, 05 Mar 2025 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>3D Printers and the Death of Symmetry</title>
      <link>https://xulioze.com/en/blog/3d-printers-death-symmetry.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/3d-printers-death-symmetry.html</guid>
      <description>Subtractive vs. additive production: designing as Nature does</description>
      <content:encoded>
        <![CDATA[				<p>
					<em>
						I originally published this post on the now-defunct <a href="https://arinspunk.com/" target="_blank" rel="noopener" title="Arquivo do estúdio">Arinspunk</a> blog in February 2016. I wrote it after watching a <a href="https://www.youtube.com/watch?v=kbAac9DxM1I&ab_channel=TEDxTalks" target="_blank" rel="noopener" title="3D Printing Our Future in Space - Youtube">TEDx talk</a> by Tommaso Ghidini (ESA) that blew my mind. In it, Tommaso argued that with 3D printers, we should forget about symmetry and embrace asymmetry—the way nature designs.
					</em>
				<p>
				<p>
					<em>
						Maybe it's just the misguided opinion of someone not well-versed in 3D printing, but I feel there's still a long way to go in this approach. What are your thoughts?
					</em>
				</p>
				<span class="separator" role="separator"></span>
				<p>
					Our technology, from the earliest rudimentary tools, has been primarily subtractive. This means that to build an object, we remove material from an initial raw material until we achieve the desired shape.
				</p>
				<figure class="figure-img">
					<img class="c-post__body-img" src="https://xulioze.com/img/bifaces-pedra.gif" alt="Flint arrows" loading="lazy">
					<figcaption>Stone bifaces</figcaption>
				</figure>
				<p>
					With the advent of 3D printers, this approach changes. We shift from subtractive to additive techniques, as 3D printers don't remove material but add it.
				</p>
				<p>
					This change might initially go unnoticed, overshadowed by other aspects revolutionizing industrial production through fabbing:
				</p>
				<ul>
					<li>
						Maximizing the optimal <a href="https://web.archive.org/web/20160729132020/https://lasindias.com/indianopedia/crisis-de-las-escalas" target="_blank" rel="noopener" title="Crisis de las escalas - Indianopedia (es)">production scale</a>.
					</li>
					<li>
						Extending piracy into the realm of patents.
					</li>
					<li>
						Initiating the <a href="https://www.youtube.com/watch?v=kbAac9DxM1I&ab_channel=TEDxTalks" target="_blank" rel="noopener" title="3D Printing Our Future in Space - Youtube">manufacturing of objects in space</a>.
					</li>
				</ul>
				<p>
					But it entails a significant (and very interesting) consequence from a product design perspective: the death of symmetry (or its uselessness).
				</p>
				<p>
					Symmetry is crucial when producing subtractive-shaped parts, as an object is easier to manufacture if it has simple shapes arranged on symmetrical axes. However, with additive techniques, this symmetry is no longer necessary. For a 3D printer, it doesn't matter whether it prints a symmetrical or asymmetrical object.
				</p>
				<p>
					So, why not continue designing symmetrical objects[<a id="termo-1" href="https://xulioze.com/en/blog/3d-printers-death-symmetry.html#nota-1">1</a>] and take advantage of the reduction/simplification in manufacturing? Because asymmetry opens a new door: designing/producing as nature does.
				</p>
				<figure class="figure-img">
					<img class="c-post__body-img" src="https://xulioze.com/img/raiz.jpeg" alt="Plant cells under a microscope" loading="lazy">
					<figcaption>
						Lentil root growing on the International Space Station. <a href="https://www.esa.int/ESA_Multimedia/Images/2016/01/Plant_gravity" target="_blank" rel="noopener" title="Más info en el site de la ESA">ESA/Université Blaise Pascal</a>
					</figcaption>
				</figure>
				<p>
					In nature, nothing is truly symmetrical[<a id="termo-2" href="https://xulioze.com/en/blog/3d-printers-death-symmetry.html#nota-2">2</a>], but this lack of symmetry doesn't diminish the quality of natural structures; quite the opposite. Millions of years of evolution have created countless (and excellent) solutions to many problems. Solutions that are waiting for us to apply them to our objects.
				</p>
				<p>
					That's why replicating symmetrical pieces with a 3D printer just because it's easier and cheaper is a mistake. To harness the full potential that this new technology offers, we must stop thinking as we did before and start designing as nature does—organically and asymmetrically.
				</p>
				<figure class="figure-img">
					<img class="c-post__body-img" src="https://xulioze.com/img/cadeira-celular.jpeg" alt="Organic-Structured Sofa" loading="lazy">
					<figcaption>
						3D printed soft seat by <a href="https://www.lilianvandaal.com/biomimicry-3d-printed-soft-seat" target="_blank" rel="noopener" title="la silla en la web de Lilian">Lilian van Daal</a>
					</figcaption>
				</figure>
				<h2>Future</h2>
				<p>
					Will this organic design eventually permeate from product design to graphic design?
				</p>
				<p>
					Applying it to editorial and web design might be a bit forced. But how will we design for a <a href="https://www.youtube.com/watch?v=KHSdObeUdxI&ab_channel=CNET" target="_blank" rel="noopener" title="LG OLED TV - Youtube">flexible screen</a> adapted to the shapes of a three-dimensional object? What will graphic design be like for the digital skin of an <a href="https://www.youtube.com/watch?v=uJF75t1fFRA&ab_channel=IEEESpectrum" target="_blank" rel="noopener" title="Robot Octopus Takes to the Sea - Youtube">electric octopus</a>?
				</p>
				<p>
					<small id="nota-1">
						[<a href="https://xulioze.com/en/blog/3d-printers-death-symmetry.html#termo-1">1</a>] Working with asymmetrical forms rarely went beyond ornamental or <a title="Postmodernism - Victoria and Albert Museum" href="http://www.vam.ac.uk/page/p/postmodernism/" target="_blank" rel="noopener">playful/provocative</a> character.
					</small><br>
					<small id="nota-2">
						[<a href="https://xulioze.com/en/blog/3d-printers-death-symmetry.html#termo-2">2</a>] <a title="Bilateral symmetry - Wikipedia" href="https://en.wikipedia.org/wiki/Symmetry_in_biology#Bilateral_symmetry" target="_blank" rel="noopener">Bilateral</a> and <a title="Radial symmetry - Wikipedia" href="https://en.wikipedia.org/wiki/Symmetry_in_biology#Radial_symmetry" target="_blank" rel="noopener">radial</a> symmetry are not exact (geometric) symmetries.
					</small>
				</p>
				<p>
					<small>
						The image 'Stone bifaces' is a gif made from <a href="https://fr.wikipedia.org/wiki/Acheul%C3%A9en#/media" title="Biface - Wikipedia (fr)" target="_blank" rel="noopener">photos by Didier Descouens</a> – <a href="http://creativecommons.org/licenses/by-sa/4.0/" title="licença no site de Creative Commons" target="_blank" rel="noopener">CC BY-SA 4.0</a>
					</small>
				</p>
]]>
      </content:encoded>
      <pubDate>Mon, 12 Feb 2024 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Reimbursement</title>
      <link>https://xulioze.com/en/blog/reimbursement.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/reimbursement.html</guid>
      <description>A Post About 'Feismo' in Galicia Written Over 10 Years Ago</description>
      <content:encoded>
        <![CDATA[				<p>
					<em>This post of mine that I'm recovering today was published 10 years ago on the <a href="https://niquelarte.prazapublica.com/post/41122929792/ressarcimento" target="_blank" rel="noopener" title="original post - galician (portuguese)">Canibalismo Patrimonial Periférico</a> blog of the Galician newspaper <a href="https://praza.gal/" target="_blank" rel="noopener" title="journal's site - galician">Praza.gal</a>. At the time, in addition to my work at <a href="https://arinspunk.com/" target="_blank" rel="noopener" title="Archive of studio">Arinspunk</a>, I was heavily involved in Niquelarte, a collective that worked with material and immaterial heritage in a somewhat unorthodox manner</em> 😬
				</p>
				<span class="separator" role="separator"></span>
				<img class="c-post__body-img" src="https://xulioze.com/img/cicatriz.png" alt="" width="655" loading="lazy">
				<p>
					In our country, we journeyed from tradition to contemporaneity abruptly, without transition. Stone, wood, tile, flax met with cement, aluminum, corrugated sheets, nylon, and the new and the old were separated but also connected in a deep scar.
				</p>
				<p>
					Some called it "<a href="https://gl.wikipedia.org/wiki/Fe%C3%ADsmo" title="article in Galipedia - galician">feísmo</a>" (ugliness) but we must speak clearly, that's just intellectual trash (one more) spewed from the Polígono Industrial de Sabón. Why ugly? Because it didn't conform to a beauty standard that institutions never cared about? Why can't our rural areas and our towns be transformed into heritage theme parks like many streets in Santiago de Compostela? Because we deface <a href="http://www.culturagalega.org/noticia.php?id=11704" title="Un país de postal - Culturagalega - galician">the postcard?</a>?
				</p>
				<p>
					We could think that their assertion was part of a larger strategy of assimilation and uniformity (which exists), but that would be giving them too much credit. The capitalist project that our elites pursued during the 20th century achieved, from a capitalist perspective, mediocre results, and at the end of the process, they tried to cover up part of their failure by claiming that what was a rushed adaptation by the people in response to their neglect was something ugly that we should erase. Poor them...
				</p>
				<p>
					The scar is there, entirely evident, and cannot be erased. But it doesn't make sense to discuss whether it's more or less ugly. That's not what matters about a scar. The meaningful interpretation, besides reminding us that despite everything, we are alive, is that every scar holds a story, a story in this case that is our own.
				</p>
				<p>
					Let's stop looking at it as something to be ashamed of and let's delve into it. We should know more about who we were and are, and it should help us create our own narrative. Because there, in the wound hastily healed with salty and bitter airs, we will find beauty. Not the universal kind, that doesn't exist, but our own.
				</p>
]]>
      </content:encoded>
      <pubDate>Mon, 25 Sep 2023 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>The art of conversing with ChatGPT (and other LLMs)</title>
      <link>https://xulioze.com/en/blog/how-talk-with-chatgpt.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/how-talk-with-chatgpt.html</guid>
      <description>How to write suitable prompts when developing code.</description>
      <content:encoded>
        <![CDATA[				<img class="c-post__body-img" src="https://xulioze.com/img/chatgpt-rachael.jpg" alt="Rachael e o Voight-Kampff test" width="655" loading="lazy">
				<p>
					In an email exchange about ChatGPT, a colleague asked me what would be the best way to write prompts when developing code. Well, the answer is not simple, as it involves conversing with a neural network, and often it is already challenging to do so with other people, let alone a machine. However, being a polite person who always likes to help when possible, I pondered and responded to the best of my ability.
				</p>
				<p>
					The internet is full of <a href="https://github.com/readme/guides/coding-generative-ai" title="Harness the power of generative AI for software development - ReadME Project" target="_blank" rel="noopener">tips</a> on improving our prompts, and I have incorporated many of them. But when analyzing them individually, I don't know to what extent they have brought improvement. There are even some where I'm not sure if they had a significant impact. It's normal, as the experience I've accumulated is still not enough for statistical analysis. However, what I can affirm is that collectively, and compared to my rough initial tests, their incorporation has resulted in an undeniable improvement in the obtained results.
				</p>
				<p>
					A different case is strategies focused on solving more complex tasks. Unlike simple tasks where we can obtain a valid and even very similar answer, whether or not using a particular tip, the adoption of these techniques brings immediate and evident improvement. <a href="https://xulioze.com/en/blog/build-pwa-with-chatgpt.html" title="How to build a PWA with ChatGPT before it sends us to unemployment" target="_blank" rel="noopener">Without a defined strategy</a>, the LLM tended to wander and make mistakes, forcing me to correct it and guide it with new questions or instructions. However, when I included <a href="https://www.promptingguide.ai/techniques/cot" title="description on Prompt Engineering Guide" target="_blank" rel="noopener">Chain-of-Thought</a> and <a href="https://www.promptingguide.ai/techniques/knowledge" title="description on Prompt Engineering Guide" target="_blank" rel="noopener">Generated Knowledge</a>, these problems were resolved. (I have a pending article recounting how I developed a React blog with the help of ChatGPT).
				</p>
				<figure>
					<blockquote cite="https://www.promptingguide.ai/models">
						<p>Understanding these capabilities are important to understand the limitations of these models and how to use them effectively.</p>
					</blockquote>
					<figcaption><cite>Prompt Engineering Guide</cite></figcaption>
				</figure>
				<p>
					So, how do we evaluate the small tips we find on the internet? An initial (and obvious) approach is to follow the guidance from reliable sources. I really like <a href="https://learnprompting.org/" title="Your Guide to Communicating with Artificial Intelligence" target="_blank" rel="noopener">learnprompting.org</a> and <a href="https://www.promptingguide.ai/" title="Prompt Engineering Guide" target="_blank" rel="noopener">promptingguide.ai</a>, but <a href="https://github.com/openai/openai-cookbook#prompting-guides" title="Prompting guides - OpenAI (En) " target="_blank" rel="noopener">there are many more</a>. Another complementary approach is to determine if the purpose of a tip makes sense in the functioning of LLMs. It is evident that following this approach involves an extra time investment, as we need to:
				</p>
				<ol>
					<li>
						Determine the purpose of the tip, even though they all tend to seek:
						<ul>
							<li>
								Reducing the <a href="https://platform.openai.com/tokenizer" title="tokens counter - OpenAI" target="_blank" rel="noopener">number of tokens</a> used in questions and answers.
							</li>
							<li>
								Optimizing the LLM's work in processing questions and generating answers.
							</li>
							<li>
								Obtaining the best possible answer for our task.
							</li>
						</ul>
					</li>
					<li>
						And it obliges us to delve into <a href="https://www.promptingguide.ai/models" title="Main LLMs" target="_blank" rel="noopener">understanding and knowledge of these tools</a>.
					</li>
				</ol>
				<p>
					However, this is always a good investment as it helps improve our daily work and allows us to enjoy the pleasure of learning something new.
				</p>
				<p>
					Finally, my colleague, who is also very polite, thanked me for the response. But being pragmatic and direct, he wanted to know if I had identified any best practices. In summary, he was looking for a list of tips 😬
				</p>
				<h2>My tips</h2>
				<p>
					Here are the practices I always include in my prompts focused on simple task development. To learn how to write complex code with ChatGPT, I recommend starting with the article "<a href="https://martinfowler.com/articles/2023-chatgpt-xu-hao.html" title="How Xu Hao uses chain of thought and general knowledge prompting with ChatGPT" target="_blank" rel="noopener">An example of LLM prompting for programming</a>".
				</p>
				<ul>
					<li>
						I avoid formality. No "Good morning," "could you please," "thank you very much," etc. Don't worry, the LLM is not a conscious being, and it's always good to save some tokens.
					</li>
					<li>
						I always start with "As a [role name]." This aims to format the model's response in a more specific way.
					</li>
					<li>
						I include details with specialized terminology. The idea is to provide enough context to prevent the model from having to guess what I mean.
					</li>
					<li>
						I strive to be as concise as possible, in balance with the previous point. The more concise and direct our prompt is, the more concise the response will be, while also saving some tokens.
					</li>
					<li>
						I clean up my example code. Anything that is not necessary for completing the task only adds noise and wastes tokens.
					</li>
				</ul>
				<p>
					What was intended to be a draft for a method to learn to converse with machines has turned into another article with tips for using ChatGPT. Do you think the purpose of each tip makes sense in the functioning of LLMs?
				</p>
]]>
      </content:encoded>
      <pubDate>Fri, 30 Jun 2023 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to build a PWA with ChatGPT before it sends us to unemployment</title>
      <link>https://xulioze.com/en/blog/build-pwa-with-chatgpt.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/build-pwa-with-chatgpt.html</guid>
      <description>Experimentando o ChatGPT antes que ele nos mande para o desemprego</description>
      <content:encoded>
        <![CDATA[				<img class="c-post__body-img" src="https://xulioze.com/img/chatgpt-hal-9000.jpg" alt="David Bowman in front of HAL 9000" width="655" loading="lazy">
				<figure>
					<blockquote>
						<p>Any sufficiently advanced technology is indistinguishable from magic.</p>
					</blockquote>
					<figcaption><cite>Arthur C. Clarke</cite></figcaption>
				</figure>
				<p>
					The first AI I used (consciously) was <a href="https://www.midjourney.com/" title="IA's site" target="_blank" rel="noopener">Midjourney</a>: write a prompt, press enter, wait a moment and the image appeared out of nowhere. Beautiful, sophisticated, and strange. It was like witnessing a magic act.
				</p>
				<p>
					Then I tried <a href="https://openai.com/research/dall-e" title="IA's site" target="_blank" rel="noopener">Dall·E</a> and <a href="https://stablediffusionweb.com/" title="IA's site" target="_blank" rel="noopener">Stable Diffusion</a>, equally spectacular, but in the end, boredom overcame magic. I didn't find them useful for me, I prefer <a href="https://twitter.com/naia_ze/status/1621621795907420162" title="fio em Twitter" target="_blank" rel="noopener">to generate images in my own way</a>.
				</p>
				<p>
					The months passed, and people stopped talking so much about them, there was a new toy in town, <a href="https://stablediffusionweb.com/" title="IA's site" target="_blank" rel="noopener">ChatGPT</a>.
				</p>
				<p>
					It took me a while to use it, but last week I copied a JavaScript snippet from an old website, pasted it into the chat box, and asked, "Could you optimize this code fragment?" And the text grew as it said, of course, you can improve this with that, and that with this, etc. Here's an example. The example made sense and it worked. Again, an apparently magical act. Again, excitement. But now also a different sensation, a little bit of fear.
				</p>
				<img class="c-post__body-img" src="https://xulioze.com/img/fired.gif" alt="you're fired" width="655" loading="lazy">
				<p>
					Just a little bit. The truth is, I don't believe in magic (except for <a href="https://www.nytimes.com/2023/01/02/magazine/juan-tamariz-magic.html" title="The Man Who Made Spain the Magic Capital of the World - NYT" target="_blank" rel="noopener">Tamariz</a>'s'), I already saw the adjective "disruptive" being overused in the first decade of the century, and the best way to overcome fear is to get to know something, so I got to work, before it sent us straight to unemployment.
				</p>
				<h2>
					Experiment
				</h2>
				<p>
					Hmm... where to start? Well, <a href="https://twitter.com/naia_ze" title="NZ&A en Twitter" target="_blank" rel="noopener">Naia and I</a> have the idea of creating a weather application in which, instead of the classic icons, some slightly more fun drawings are displayed. So, taking advantage of the excuse, I wrote the following question:
				</p>
				<img class="c-post__body-img" src="https://xulioze.com/img/chatgpt-01.jpg" alt="first question to ChatGPT and its answer" width="655" loading="lazy">
				<p>
					Perfect. In its first response, ChatGPT provided an HTML, a JS snippet, and a detailed explanation of the entire code.
				</p>
				<p>
					I replaced <code>your_openweathermap_api_key_here</code> with a valid API key from OpenWeatherMap, and it worked. The only noteworthy error was the city temperature, as it indicated that it was in Celsius degrees, but in reality, the value was in Kelvin.
				</p>
				<iframe class="c-post__body-iframe" height="300" style="width: 100%;" scrolling="no" title="chatGPT 01" src="https://codepen.io/arinspunk/embed/GRYpLrL?default-tab=html%2Cresult" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
					See the Pen <a href="https://codepen.io/arinspunk/pen/GRYpLrL">
					chatGPT 01</a> by Arinspunk (<a href="https://codepen.io/arinspunk">@arinspunk</a>)
					on <a href="https://codepen.io/">CodePen</a>.
				</iframe>
				<p>After some more testing, I noticed that if the city name did not exist in the API database, for example Portox, I would get an error in the fetch (with the message we passed in the code, "Failed to fetch weather data for Portox"). It also happened that if several cities shared the same name, such as Porto, which exists in Portugal, Brazil, and Spain, the data we saw belonged only to one of them. So I wrote a second question:</p>
				<img class="c-post__body-img" src="https://xulioze.com/img/chatgpt-02.jpg" alt="second question to ChatGPT and its answer" width="655" loading="lazy">
				<p>This time, ChatGPT didn't get it right. Or rather, it got it right, but I didn't provide the correct question. It simply checked if the city existed in the database before searching for weather information. However, for the user, there was no difference compared to the previous version, except for the exchange of messages. Additionally, the problem of cities with the same name remained unsolved.</p>
				<iframe class="c-post__body-iframe" height="300" style="width: 100%;" scrolling="no" title="PWA com ChatGPT 02" src="https://codepen.io/arinspunk/embed/qBJOzJX?default-tab=js%2Cresult" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
					See the Pen <a href="https://codepen.io/arinspunk/pen/qBJOzJX">
					PWA com ChatGPT 02</a> by Arinspunk (<a href="https://codepen.io/arinspunk">@arinspunk</a>)
					on <a href="https://codepen.io/">CodePen</a>.
				</iframe>
				<p>Mea culpa and a new question. Now focused on cities with the same name:</p>
				<img class="c-post__body-img" src="https://xulioze.com/img/chatgpt-03.jpg" alt="terça question to ChatGPT and its answer" width="655" loading="lazy">
				<p>With the new code, the list of cities was displayed, but it was not possible to click on them to obtain the data of just one when pressing the "Search" button.</p>
				<iframe class="c-post__body-iframe" height="300" style="width: 100%;" scrolling="no" title="PWA com ChatGPT 02" src="https://codepen.io/arinspunk/embed/oNajrao?default-tab=js%2Cresult" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
					See the Pen <a href="https://codepen.io/arinspunk/pen/oNajrao">
					PWA com ChatGPT 02</a> by Arinspunk (<a href="https://codepen.io/arinspunk">@arinspunk</a>)
					on <a href="https://codepen.io/">CodePen</a>.
				</iframe>
				<p>Another question:</p>
				<img class="c-post__body-img" src="https://xulioze.com/img/chatgpt-04.jpg" alt="fourth question to ChatGPT and its answer" width="655" loading="lazy">
				<p>With the change, it was possible to click on one of the cities in the list, and upon doing so, the weather data for that city was obtained.</p>
				<iframe  class="c-post__body-iframe" height="300" style="width: 100%;" scrolling="no" title="PWA com ChatGPT 04" src="https://codepen.io/arinspunk/embed/abRpbjQ?default-tab=html%2Cresult" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
					See the Pen <a href="https://codepen.io/arinspunk/pen/abRpbjQ">
					PWA com ChatGPT 04</a> by Arinspunk (<a href="https://codepen.io/arinspunk">@arinspunk</a>)
					on <a href="https://codepen.io/">CodePen</a>.
				</iframe>
				<p>But there were still some points to polish:</p>
				<ul>
					<li>The "Search" button didn't really do anything.</li>
					<li>The list should disappear when clicking on one of the options.</li>
					<li>The temperature needed to be changed to Celsius.</li>
					<li>It would be good to indicate the name of the country to the right of each city.</li>
				</ul>
				<p>It was at this point where I decided to leave autopilot and switch to "manual mode," as I thought it would be faster to modify the code myself than to keep asking questions.</p>
				<p>Here's the result with the "human modifications":</p>
				<iframe class="c-post__body-iframe" height="300" style="width: 100%;" scrolling="no" title="PWA com ChatGPT 05" src="https://codepen.io/arinspunk/embed/wvYgBdP?default-tab=html%2Cresult" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
					See the Pen <a href="https://codepen.io/arinspunk/pen/wvYgBdP">
					PWA com ChatGPT 05</a> by Arinspunk (<a href="https://codepen.io/arinspunk">@arinspunk</a>)
					on <a href="https://codepen.io/">CodePen</a>.
				</iframe>
				<p>Now that the code was ready, it was time to turn our site into a PWA (Progressive Web App):</p>
				<img class="c-post__body-img" src="https://xulioze.com/img/chatgpt-05.jpg" alt="fifth question to ChatGPT and its answer" width="655" loading="lazy">
				<p>It worked on the first try 🥳</p>
				<p>This is the result: <a href="https://xulioze.com/test/pwa/" target="_blank" rel="noopener" title="Visita e descarrega a PWA">Pe Man</a></p>
				<p>Thank you very much, ChatGPT!</p>
				<img class="c-post__body-img" src="https://xulioze.com/img/chatgpt-06.jpg" alt="last question to ChatGPT and its answer" width="655" loading="lazy">
				<h2>
					Conclusions
				</h2>
				<p>
					The first conclusion is that ChatGPT is capable of understanding even bad English like mine very well 😬
				</p>
				<p>
					The second is that it can be useful for:
				</p>
				<ul>
					<li>
						Writing a base code, helping us to save time. After analyzing my experiment, I must state that the best strategy is to write a prompt that is as broad and contextualized as possible, instead of formulating many short questions.
					</li>
					<li>
						Making improvements/changes in the code. To a certain point, it is better to switch to manual/human mode.
					</li>
					<li>
						Performing queries to an API that we do not know without the need to visit its documentation.
					</li>
					<li>
						Optimizing the code.
					</li>
					<li>
						Expanding knowledge about a language, knowing other approaches.
					</li>
					<li>
						Starting with new languages/technologies.
					</li>
				</ul>
				<p>
					And last but not least, it is not going to directly send us programmers to unemployment. At least not in the coming months…
				</p>
				<p>🥹</p>
				<img class="c-post__body-img" src="https://xulioze.com/img/fired.gif" alt="you are fired" width="655" loading="lazy">
]]>
      </content:encoded>
      <pubDate>Fri, 14 Apr 2023 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Custom Page Templates in Frontity? Current and very simple</title>
      <link>https://xulioze.com/en/blog/frontity-custom-page-templates.html</link>
      <guid isPermaLink="false">https://xulioze.com/en/blog/frontity-custom-page-templates.html</guid>
      <description>How to create Custom Page Templates in WordPress and develop their layouts in Frontity.</description>
      <content:encoded>
        <![CDATA[				<p>
					<a href="https://developer.wordpress.org/themes/template-files-section/page-template-files/#creating-custom-page-templates-for-global-use" title="Wordpress documentation" target="_blank" rel="noopener">Custom Page Templates</a> are the mechanism available in WordPress to create global templates with specific designs that can be applied to one or multiple pages.
				</p>
				<p>
					For example, if we need two types of pages on a site: one with a single column and another with two columns (main content and sidebar), a good option is to use the default page template, <code>page.php</code>, for the first one, and create a template, <code>sidebar-page.php</code>, for the second one. This way, for each new page, we can choose either design from the editor.
				</p>
				<p>
					But what about <a href="https://frontity.org/" title="framework's site" target="_blank" rel="noopener">Frontity</a>, where the front-end is not generated from the PHP templates of the WordPress theme but from a React app? Well, Custom Page Templates are still the best option to work with multiple page layouts because they allow us to:
				</p>
				<ul>
					<li>
						Select the desired layout from the page editor.
					</li>
					<li>
						Assign them groups of <a href="https://www.advancedcustomfields.com/" title="plugin's official site" target="_blank" rel="noopener">ACF</a> fields, extending the editing possibilities.
					</li>
					<li>
						Display the assigned template file name in the REST API (and in the Frontity <a href="https://gitbook-docs.frontity.org/learning-frontity/state" title="Descripción en la documentación de Frontity" target="_blank" rel="noopener">state</a>), making it easier for Frontity to serve the correct layout in each case.
					</li>
				</ul>
				<p>
					Now let's go through the complete process with a simple example.
				</p>
				<h2>
					Wordpress
				</h2>
				<p>
					We create a PHP file, for example, <code>custom-page-template.php</code>, with a comment at the beginning like the following:
				</p>
				<script src="https://gist.github.com/arinspunk/c1c7b8d374b0608a64a4f4e63cbb4448.js"></script>
				<p>
					Where "Template name:" is the tag that indicates to WordPress that this file is a page template, and "My Custom Page Template Name" is the name of our new template, which will appear in the template selector in the editor of each page.
				</p>
				<p>
					Anything else to do? No, that's all on the WordPress side. 😎
				</p>
				<p>
					However, to avoid errors (and some headaches), we must keep in mind that:
				</p>
				<ul>
					<li>
						Custom templates only work if we have an <code>index.php</code> (it can be empty) in the root of our WordPress theme.
					</li>
					<li>
						We should never use <code>page-</code> as a prefix in the file name because WordPress will interpret it as a specialized template intended to be applied only to a specific page of the site.
					</li>
				</ul>
				<h2>
					Frontity
				</h2>
				<p>
					We create three components:
				</p>
				<ol>
					<li>
						<code>
							Page
						</code>
					</li>
					<li>
						<code>
							PageDefault
						</code>
					</li>
					<li>
						<code>
							PageTemplate
						</code>
					</li>
				</ol>
				<p>
					In the first one, we include a <code>Switch</code> that serves the second component, <code>PageDefault</code>, or the third one, <code>PageTemplate</code>, depending on the value of the <code>template</code>  property in the page data from the Frontity state. If the published page in WordPress uses the default page template, this value will be empty, and if it uses a custom template, it will come with the name of the template file, <code>custom-page-template.php</code> in our case.
				</p>
				<script src="https://gist.github.com/arinspunk/dbe49b71f4ab06ad1b872beb0b02d53d.js"></script>
				<p>
					And finally, in the second and third components, we include the actual layouts for both types of pages.
				</p>
				<p>
					Simple, isn't it?
				</p>
				<p>If you have any questions, think something can be improved, or just want to say hello, you can reach me at <a href="mailto:hi@xulioze.com" title="mi email">hi@xulioze.com</a> 😋</p>
]]>
      </content:encoded>
      <pubDate>Thu, 03 Feb 2022 00:00:00 GMT</pubDate>
    </item>
  </channel>
</rss>