<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Wagner Braz Rodrigues on Medium]]></title>
        <description><![CDATA[Stories by Wagner Braz Rodrigues on Medium]]></description>
        <link>https://medium.com/@wagner.b.rodrigues?source=rss-33d594b68a60------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*OLifvPdfFw5hVb9t.jpg</url>
            <title>Stories by Wagner Braz Rodrigues on Medium</title>
            <link>https://medium.com/@wagner.b.rodrigues?source=rss-33d594b68a60------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 07:03:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wagner.b.rodrigues/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[SDD, who’s in charge of the specification?]]></title>
            <link>https://medium.com/@wagner.b.rodrigues/sdd-whos-in-charge-of-the-specification-f313d347194d?source=rss-33d594b68a60------2</link>
            <guid isPermaLink="false">https://medium.com/p/f313d347194d</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Wagner Braz Rodrigues]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 12:27:55 GMT</pubDate>
            <atom:updated>2026-08-04T12:27:55.411Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1SFcf29wLO0EKYH9Ohc0OA.png" /></figure><p>Monday morning, you open the repository and find the spec with three new rules nobody on the team wrote. It was the agent. During the weekend’s tests, it found some gaps, decided to fix them on its own, and updated the spec without asking. The rules even make sense. But nobody decided they should exist.</p><p>Welcome to the problem that closes this series. In the previous articles, I showed that SDD is a model whose semantics is natural language, introduced the pieces that surround that model, and the frameworks the market uses to keep that model alive. Now we reach the question that shows up the moment all of this enters real use. Who decides what goes into the specification? And more importantly, who has the authority to change the business’s official knowledge?</p><p>Before answering, let me bring back the case I’ve been using throughout this series. The appointment scheduling system has a simple rule, patients on the VIP plan never pay a cancellation fee. That rule isn’t in the production code by accident. It exists only in the business specification, and that’s exactly why the agent can apply it reliably every time the code needs to be regenerated or adjusted. No AI in the world guesses a rule that only ever existed in the head of whoever designed the product.</p><p>There’s an important detail here. Code is implementation, the specification represents knowledge. Implementation can be regenerated as many times as needed. The organization’s official knowledge shouldn’t change without a human decision.</p><p>Alright, and when that rule needs to change? That’s where the two flows come in.</p><h3>Direct flow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t6CC9nre3VcufzzKlcndmQ.png" /></figure><p>In the direct flow, the five steps run in sequence, and a return arrow connects the last step back to the first. Every functional change goes back to the spec. The team writes the specification, reviews and approves it before any code exists, the AI tool reads the spec and the reference architecture to generate the implementation, automated tests validate the edge cases described in the spec itself, and a new rule updates the specification, never the code directly.</p><p>This flow works well when the specification is already mature and stable. It’s the simplest path, and it’s no accident that it’s the one most shown in SDD demos. After all, it’s the easiest to record in a few minutes.</p><h3>Flow with human curation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RlW5qRnARA2auneNMjIkZw.png" /></figure><p>Except that, in practice, a specification rarely comes out complete. During testing, the agent frequently runs into ambiguities, uncovered exceptions or opportunities for improvement. And the natural impulse is to let the agent write those suggestions straight into the specification. Seems efficient, right?</p><p>Wrong. It’s exactly the Monday morning scenario that opened this article. That impulse turns the specification into a document that grows out of control and takes away the team’s decision over what should actually become a rule. Remember the first article? SDD only works because it’s a model with organization and intent. A model that any agent edits at will stops being a model and becomes a log.</p><p>The solution is simple. The same five-step sequence gains two steps instead of one. Instead of the agent updating the spec directly after the tests, it logs the gap or suggestion in melhorias.md, without touching the specification. Only after a person filters that suggestion and decides it&#39;s valid does the spec get updated, and the cycle starts over from the first step.</p><p>A typical entry in melhorias.md looks like the example below.</p><pre>## Suggestion 007 (2026-08-11)<br>Origin: Agent, during cancellation test execution<br>Observation: The VIP plan rule says these patients never pay a fee,<br>but it isn&#39;t clear whether that also applies when the appointment<br>has already taken place. Right now the code blocks cancellation in<br>that case, even for a VIP patient.<br>Suggestion: Add an explicit sentence to the business spec, the VIP<br>exemption doesn&#39;t override the rule for appointments already<br>completed, those can never be cancelled, even for a VIP patient.<br>Status: Pending review</pre><p>After curation, the same entry gets the following outcome.</p><pre>Status: Approved, incorporated into business-spec.md (2026-08-13)</pre><p>Notice what happened here. The agent was useful, it found a real gap. But who decided that gap should become a rule was a person. Agents make proposals. The organization makes decisions.</p><p>This flow even changes how this series’ demo repository should evolve. The VIP exception we just saw shouldn’t simply show up ready-made in the business spec. It should be born as an entry in melhorias.md, wait for someone to validate that it makes sense, and only then become a formal rule. It ends up much closer to what happens on a real squad, where a business rule change almost never skips the human review step before becoming a formal specification.</p><h3>What this changes in the repository</h3><p>Based on the current structure of this series’ demo repository, the cycle can be closed with two additions.</p><ol><li><strong>melhorias.md as a first-class artifact.</strong> Add the file to the repository root, along with an explicit instruction telling the agent to log any rule-change suggestion there, and never edit business-spec.md directly.</li><li><strong>A readable version history for the specification.</strong> A simple CHANGELOG.md, with each entry referencing the rule that changed and the date. That makes the business&#39;s evolution visible over time, not just the code&#39;s.</li></ol><p>A third piece has been there since the previous article, tests named after the rule they validate. Each test in tests/ already references the identifier it validates explicitly. That convention creates direct traceability between the specification and the test suite, without depending on the memory of whoever wrote the test.</p><p>Interestingly, this isn’t any different from what we already do with code. Nobody today expects an agent to merge straight into the main branch without review. If we protect the code that way, it makes even more sense to protect the specification, since it’s the spec that defines the system’s expected behavior.</p><h3>Closing the series</h3><p>In the end, the difference between Vibe Coding and SDD isn’t about the tool used. It’s about who holds authority over the business knowledge and where that decision stays recorded. A prompt gets lost in the next session. A specification that’s versioned, reviewed and curated by people survives a model swap, an agent swap, and a swap of whoever’s at the keyboard.</p><p>If you’ve followed all four articles, you’ve probably noticed they describe the same idea from four angles. SDD is a model whose semantics is natural language, readable by people and machines at the same time. The context base equips the agent with the directives the organization already produces, architecture, governance, compliance. Frameworks differ in how long that model stays alive after creation. And governance decides who has the authority to change that model.</p><p>Deep down, none of this is new. It’s Software Engineering doing what it has always done, understanding and modeling the problem before implementing the solution. The revolutionary difference is that the model now speaks our language.</p><p>For decades we treated code as the main artifact of Software Engineering. LLMs changed that perspective. Code is still important, but it has become the consequence of a well-built model. Maybe real software was never just the code. Maybe it was always the knowledge the code represents. Whoever learns to build and govern good specifications comes out ahead.</p><p>That wraps up this series on SDD. Stay tuned for what comes next.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f313d347194d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SDD, quem manda na especificação?]]></title>
            <link>https://medium.com/@wagner.b.rodrigues/sdd-quem-manda-na-especifica%C3%A7%C3%A3o-39dc983bdbbe?source=rss-33d594b68a60------2</link>
            <guid isPermaLink="false">https://medium.com/p/39dc983bdbbe</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Wagner Braz Rodrigues]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 12:23:31 GMT</pubDate>
            <atom:updated>2026-08-04T12:23:31.461Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qm18ZrnErMzwmDuPkUPl3A.png" /></figure><p>Segunda de manhã, você abre o repositório e encontra a especificação com três regras novas que ninguém do time escreveu. Foi o agente. Durante os testes do fim de semana, ele encontrou lacunas, achou por bem corrigir tudo sozinho e atualizou a spec sem perguntar. As regras até fazem sentido. Mas ninguém decidiu que elas deveriam existir.</p><p>Bem-vindo ao problema que fecha esta série. Nos artigos anteriores, mostrei que SDD é um modelo cuja semântica é a linguagem natural, apresentei as peças que cercam esse modelo e os frameworks que o mercado usa para manter esse modelo vivo. Agora chegamos na pergunta que aparece assim que tudo isso entra em uso de verdade. Quem decide o que entra na especificação? E mais importante, quem tem autoridade para mudar o conhecimento oficial do negócio?</p><p>Antes de responder, deixa eu retomar o caso que venho usando nesta série. O sistema de agendamento de consultas tem uma regra simples, pacientes de plano VIP nunca pagam multa quando cancelam uma consulta. Essa regra não está em lugar nenhum do código de produção por acaso. Ela existe apenas na especificação de negócio, e é exatamente por isso que o agente consegue aplicar essa regra de forma confiável toda vez que o código precisa ser regenerado ou ajustado. Nenhuma IA do mundo adivinha uma regra que só existia na cabeça de quem desenhou o produto.</p><p>Existe um detalhe importante aqui. Código é implementação, a especificação representa conhecimento. Implementação pode ser regenerada quantas vezes for necessário. O conhecimento oficial da organização não deveria mudar sem uma decisão humana.</p><p>Certo, e quando essa regra precisa mudar? Aí entram os dois fluxos.</p><h3>Fluxo direto</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qiB-uunOWkk98FpzuqwOeA.png" /></figure><p>No fluxo direto, as cinco etapas correm em sequência, e uma seta de retorno conecta a última etapa de volta à primeira. Toda mudança funcional volta para a spec. O time escreve a especificação, revisa e aprova antes de qualquer código existir, a ferramenta de IA lê a spec e a arquitetura de referência para gerar a implementação, os testes automáticos validam os edge cases descritos na própria spec, e uma nova regra atualiza a especificação, nunca o código diretamente.</p><p>Esse fluxo funciona bem quando a especificação já está madura e estável. É o caminho mais simples, e não por acaso é o mais demonstrado em apresentações sobre SDD. Afinal, é o mais fácil de gravar em poucos minutos.</p><h3>Fluxo com curadoria humana</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9PzfYza2q4dX6SPP9ot9Ag.png" /></figure><p>Só que, na prática, a especificação raramente nasce completa. Durante os testes, o agente frequentemente encontra ambiguidades, exceções não cobertas ou oportunidades de melhoria. E o impulso natural é deixar o agente escrever essas sugestões direto na especificação. Parece eficiente, certo?</p><p>Errado. É exatamente o cenário da segunda de manhã que abriu este artigo. Esse impulso transforma a especificação em um documento que cresce sem controle e tira do time a decisão sobre o que de fato deveria virar regra. Lembra do primeiro artigo? O SDD só funciona porque é um modelo com organização e intenção. Um modelo que qualquer agente edita à vontade deixa de ser um modelo e vira um log.</p><p>A solução é simples. A mesma sequência de cinco etapas ganha duas etapas no lugar de uma só. Em vez de o agente atualizar a spec diretamente após os testes, ele registra a lacuna ou sugestão em melhorias.md, sem tocar na especificação. Só depois que uma pessoa filtra essa sugestão e decide que ela é válida, a spec é atualizada, e o ciclo recomeça pela primeira etapa.</p><p>Um registro típico em melhorias.md se parece com o exemplo a seguir.</p><p>markdown</p><pre>## Sugestão 007 (2026-08-11)<br>Origem: Agente, durante execução dos testes de cancelamento<br>Observação: A regra do plano VIP diz que esses pacientes nunca pagam<br>multa, mas não fica claro se isso também vale quando a consulta já<br>foi realizada. Hoje o código bloqueia o cancelamento nesse caso,<br>mesmo para paciente VIP.<br>Sugestão: Adicionar frase explícita na spec de negócio, a isenção do<br>VIP não dispensa a regra de consulta já realizada, ela nunca pode ser<br>cancelada, mesmo para paciente VIP.<br>Status: Pendente de revisão</pre><p>Depois da curadoria, a mesma entrada recebe o desfecho a seguir.</p><p>markdown</p><pre>Status: Aprovada, incorporada na spec-negocio.md (2026-08-13)</pre><p>Repare no que aconteceu aqui. O agente foi útil, encontrou uma lacuna real. Mas quem decidiu que a lacuna virava regra foi uma pessoa. Agentes fazem propostas. A organização toma decisões.</p><p>Esse fluxo muda até a forma como o repositório de demonstração desta série deveria evoluir. A exceção do VIP que acabamos de ver não deveria simplesmente aparecer pronta na spec de negócio. Ela deveria nascer como entrada em melhorias.md, esperar alguém validar que faz sentido, e só então virar regra formal. Fica muito mais parecido com o que acontece numa squad real, onde uma mudança de regra de negócio quase nunca pula a etapa de revisão humana antes de virar especificação formal.</p><h3>O que isso muda no repositório</h3><p>Com base na estrutura atual do repositório de demonstração desta série, dá para fechar o ciclo com duas adições.</p><ol><li><strong>melhorias.md como artefato de primeira classe.</strong> Adicionar o arquivo na raiz do repositório, junto de uma instrução explícita orientando o agente a registrar ali qualquer sugestão de mudança de regra, e nunca editar spec-negocio.md diretamente.</li><li><strong>Histórico de versões da especificação.</strong> Um CHANGELOG.md simples, com cada entrada referenciando a regra alterada (RN-0X) e a data. Assim fica visível a evolução do negócio ao longo do tempo, e não somente a evolução do código.</li></ol><p>Uma terceira peça já está lá desde o artigo anterior, testes nomeados por regra. Cada teste em tests/ já referencia explicitamente o identificador que valida, test_rn01_..., test_rn03_.... Essa convenção cria rastreabilidade direta entre especificação e suíte de testes, sem depender da memória de quem escreveu o teste.</p><p>Curiosamente isso não é diferente do que já fazemos com o código. Hoje ninguém espera que um agente faça merge diretamente na branch principal sem revisão. Se protegemos o código dessa forma, faz ainda mais sentido proteger a especificação, porque é ela que define o comportamento esperado do sistema.</p><h3>Fechando a série</h3><p>No fim das contas, a diferença entre Vibe Coding e SDD não está na ferramenta usada. Está em quem tem autoridade sobre o conhecimento do negócio e onde essa decisão fica registrada. Um prompt se perde na próxima sessão. Uma especificação versionada, revisada e curada por pessoas sobrevive à troca de modelo, à troca de agente e à troca de quem está no teclado.</p><p>Se você acompanhou os quatro artigos, deve ter percebido que eles descrevem uma mesma ideia sob quatro ângulos. O SDD é um modelo cuja semântica é a linguagem natural, legível por pessoas e por máquinas ao mesmo tempo. A base de contexto equipa o agente com os direcionadores que a organização já produz, arquitetura, governança, compliance. Os frameworks diferem em quanto tempo esse modelo permanece vivo depois da criação. E a governança decide quem tem autoridade para mudar esse modelo.</p><p>No fundo, nada disso é novidade. É a Engenharia de Software fazendo o que sempre fez, entender e modelar o problema antes de implementar a solução. A diferença é que agora o modelo fala a nossa língua.</p><p>Durante décadas tratamos o código como o principal artefato da Engenharia de Software. As LLMs mudaram essa perspectiva. O código continua importante, mas passou a ser consequência de um modelo bem construído. Talvez o verdadeiro software nunca tenha sido apenas o código. Talvez sempre tenha sido o conhecimento que ele representa. Quem aprender a construir e governar boas especificações sai na frente.</p><p>Por aqui encerro esta série sobre SDD. Aguardem os próximos conteúdos.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39dc983bdbbe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SDD, the frameworks the market is using]]></title>
            <link>https://medium.com/@wagner.b.rodrigues/sdd-the-frameworks-the-market-is-using-6bfdc23237de?source=rss-33d594b68a60------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bfdc23237de</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Wagner Braz Rodrigues]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 23:42:21 GMT</pubDate>
            <atom:updated>2026-07-29T00:26:41.867Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*4wlj3X1eQWlkzAPGtLoycQ.png" /></figure><p>You opened your timeline and there they are. Kiro, Spec Kit, Tessl, each one promising Spec-Driven Development, each one with a crowd claiming it&#39;s the one true way to do it. And there you are wondering which one to install first.</p><p>Breathe. The right question isn&#39;t which framework to choose. It&#39;s which SDD technique each one practices. Because, and almost nobody explains this, there are different ways of doing SDD.</p><p>In the previous articles, I showed that SDD is a model whose semantics is natural language, and introduced the pieces that surround that model, the specification, the context base and skills. Now that you know the pieces, you can understand what each framework actually does differently. And the difference comes down to one question. How long does the specification live?</p><p>Birgitta Böckeler, from Thoughtworks, [mapped three techniques that build on each other](https://martinfowler.com/articles/exploring-gen-ai/sdd-3-tools.html), each one constructed on top of the previous one.</p><h3>Spec-first</h3><p>The specification guides the initial code generation and is then discarded. It did its job, goodbye. It&#39;s the first step, and it solves the creation problem. You stop sending loose prompts and start from a thought-out artifact.</p><p>A reference example is [Kiro](https://kiro.dev/docs/), from AWS. It structures the work into requirements, design and tasks before generating any code.</p><p>The limit of this technique shows up fast. If the spec dies after the first delivery, maintenance goes back to loose conversation with the agent. And then you&#39;re back to Vibe Coding, just with one extra step at the beginning.</p><h3>Spec-anchored</h3><p>The specification keeps existing after creation. It&#39;s versioned alongside the code and gets edited again with every change in behavior. The system&#39;s knowledge stays concentrated in the spec, exactly as we discussed in the first article.</p><p>A reference example is [GitHub Spec Kit](https://github.com/github/spec-kit), an open source toolkit whose repository is open for you to clone and adapt to your own workflow. It organizes the cycle into commands running from the project&#39;s constitution to the specification, from the plan to the implementation.</p><p>This is the technique that solves maintenance, the phase where most systems spend their lives. And it&#39;s the one closest to how this very series treats the specification, the new rule enters through the spec, never through the code.</p><h3>Spec-as-source</h3><p>Here&#39;s where it gets interesting. The specification becomes the only file humans edit. The code gets generated and marked as such, and nobody touches it by hand anymore. It&#39;s the most radical version of the sentence that closed the first article, code as the consequence of a good model.</p><p>A reference example is [Tessl](https://docs.tessl.io/), which connects to agents like Claude Code through MCP.</p><p>## Which one to choose?</p><p>One note before you think you need to install a tool for every technique. You don&#39;t. Spec-first and spec-anchored you can practice today with any agent, including plain Claude Code, without installing anything besides the agent itself, just discipline and a specification file. The tool exists to automate the ritual, not to create the technique. Spec-as-source asks for more, marking code as generated and keeping automatic synchronization requires something like Tessl, because doing that by hand on every commit doesn&#39;t scale.</p><p>Let&#39;s see this working, with no framework at all, in the same appointment scheduling system from the previous article. The project&#39;s business spec has a simple rule, a patient can cancel up to 24h before with no cost, less than that pays a 30% fee on the appointment&#39;s value. The prompt to the agent is just that, read spec.md and implement the cancellation function in Python, following exactly these rules. No CLI, no installation, any coding agent understands the request and delivers the function.</p><p>Now a new rule arrives, VIP plan patients don&#39;t pay a fee under any circumstances. It goes into spec.md, not into the function. The next prompt is just as simple, I updated spec.md with a new rule, re-read it and adjust the function. The agent adds the condition without you having to point at the line, and the file&#39;s history now documents why the VIP exception exists, for whoever opens the project a year from now.</p><p>That&#39;s spec-anchored, in full, no Kiro, no Spec Kit, no Tessl. The complete repository with this example is available at <a href="https://github.com/wagnerbrodrigues/sdd-demo">https://github.com/wagnerbrodrigues/sdd-demo</a>.</p><p>It&#39;s also worth noting that Kiro, Spec Kit and Tessl are just the three names Böckeler picked to name the category, back in October 2025. Since then the ecosystem has grown quite a bit around the same spectrum, OpenSpec and Spec Kitty on the spec-anchored side, BMad Method on the spec-first side, with a much heavier workflow, coordinating 21 specialized agents. The tool changes, the question stays the same, how long does the specification live after the code is born.</p><p>If you look closely, the progression across the three techniques tells a story of maturity. Spec-first solves creation. Spec-anchored solves maintenance, because the specification survives the first deploy. Spec-as-source solves governance, because nobody edits code by mistake anymore, only the specification that generates it.</p><p>And that word, governance, is exactly what opens the next and last article of the series. Once the specification enters real use, an uncomfortable question shows up. Who decides what goes into it? I&#39;ll show two flows that answer that in quite different ways, a direct one and one with human curation over the suggestions the agent itself raises.</p><p>See you in the next one.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bfdc23237de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SDD, os frameworks que o mercado está usando]]></title>
            <link>https://medium.com/@wagner.b.rodrigues/sdd-os-frameworks-que-o-mercado-est%C3%A1-usando-4cde87576148?source=rss-33d594b68a60------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cde87576148</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Wagner Braz Rodrigues]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 23:36:27 GMT</pubDate>
            <atom:updated>2026-07-29T00:27:44.172Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VuYEwrb5m18-4E39vAPYVg.png" /></figure><p>Abriu a timeline e lá estão eles. Kiro, Spec Kit, Tessl, cada um prometendo Spec-Driven Development, cada um com uma legião dizendo que é o único jeito certo de fazer. E você aí se perguntando qual deles instalar primeiro.</p><p>Respira. A pergunta certa não é qual framework escolher. É qual técnica de SDD cada um pratica. Porque, e isso quase ninguém explica, existem diferentes maneiras de se fazer SDD.</p><p>Nos artigos anteriores, mostrei que SDD é um modelo cuja semântica é a linguagem natural, e apresentei as peças que cercam esse modelo, a especificação, a base de contexto e as skills. Agora que você conhece as peças, dá para entender o que cada framework realmente faz de diferente. E a diferença se resume a uma pergunta. Quanto tempo a especificação vive?</p><p>Birgitta Böckeler, do Thoughtworks, [mapeou três técnicas que se acumulam](https://martinfowler.com/articles/exploring-gen-ai/sdd-3-tools.html), cada uma construída sobre a anterior.</p><h3>Spec-first</h3><p>A especificação orienta a geração inicial do código e depois é descartada. Cumpriu seu papel, tchau. É o primeiro degrau, e resolve o problema da criação. Você para de mandar prompts soltos e passa a partir de um artefato pensado.</p><p>Um exemplo de referência é o [Kiro](https://kiro.dev/docs/), da AWS. Ele estrutura o trabalho em requisitos, design e tarefas antes de gerar qualquer código.</p><p>O limite dessa técnica aparece rápido. Se a spec morre depois da primeira entrega, a manutenção volta a ser conversa solta com o agente. E aí você está de volta ao Vibe Coding, só que com uma etapa a mais no começo.</p><h3>Spec-anchored</h3><p>A especificação continua existindo depois da criação. Ela é versionada junto do código e volta a ser editada a cada mudança de comportamento. O conhecimento do sistema permanece concentrado na spec, exatamente como discutimos no primeiro artigo.</p><p>Um exemplo de referência é o [GitHub Spec Kit](https://github.com/github/spec-kit), toolkit open source cujo repositório está aberto para você clonar e adaptar ao seu próprio fluxo. Ele organiza o ciclo em comandos que vão da constituição do projeto à especificação, do plano à implementação.</p><p>Essa é a técnica que resolve a manutenção, a fase em que a maioria dos sistemas passa a vida. E é a que mais se aproxima de como esta própria série trata a especificação, a regra nova entra pela spec, nunca pelo código.</p><h3>Spec-as-source</h3><p>Aqui a coisa fica interessante. A especificação vira o único arquivo que humanos editam. O código passa a ser gerado e marcado como tal, e ninguém mais mexe nele à mão. É a versão mais radical da frase que fechou o primeiro artigo, o código como consequência de um bom modelo.</p><p>Um exemplo de referência é o [Tessl](https://docs.tessl.io/), que se conecta a agentes como o Claude Code por meio do MCP.</p><p>## Qual escolher?</p><p>Uma observação antes que você pense que precisa instalar uma ferramenta para cada técnica. Não precisa. Spec-first e spec-anchored você pratica hoje mesmo com qualquer agente, incluindo o Claude Code puro, sem instalar nada além do próprio agente, só disciplina e um arquivo de especificação. A ferramenta existe para automatizar o ritual, não para criar a técnica. Spec-as-source já pede mais, marcar o código como gerado e manter a sincronização automática exige algo como o Tessl, porque fazer isso à mão em todo commit não escala.</p><p>Vamos ver isso funcionando, sem framework nenhum, no mesmo sistema de agendamento de consultas do artigo anterior. A spec de negócio do projeto tem uma regra simples, paciente cancela até 24h antes sem custo, menos que isso paga multa de 30% do valor da consulta. O prompt para o agente é só isso, leia o spec.md e implemente a função de cancelamento em Python, seguindo exatamente essas regras. Nenhum CLI, nenhuma instalação, qualquer agente de código entende o pedido e entrega a função.</p><p>Agora chega uma regra nova, pacientes de plano VIP não pagam multa em hipótese alguma. Ela entra no spec.md, não na função. O prompt seguinte também é simples, atualizei o spec.md com uma regra nova, releia e ajuste a função. O agente adiciona a condição sem que você precise apontar a linha, e o histórico do arquivo passa a documentar por que a exceção do VIP existe, para quem abrir o projeto daqui a um ano.</p><p>Isso é spec-anchored inteiro, sem Kiro, sem Spec Kit, sem Tessl. O repositório completo com esse exemplo está disponível em <a href="https://github.com/wagnerbrodrigues/sdd-demo">https://github.com/wagnerbrodrigues/sdd-demo</a></p><p>Vale abrir também que Kiro, Spec Kit e Tessl são só os três nomes que a Böckeler escolheu pra batizar a categoria, em outubro de 2025. De lá pra cá o ecossistema cresceu bastante em torno do mesmo espectro, o OpenSpec e o Spec Kitty do lado spec-anchored, o BMad Method do lado spec-first, com um workflow bem mais pesado, coordenando 21 agentes especializados. A ferramenta muda, a pergunta continua a mesma, quanto tempo a especificação vive depois que o código nasce.</p><p>Se você reparar, a progressão entre as três técnicas conta uma história de maturidade. Spec-first resolve a criação. Spec-anchored resolve a manutenção, porque a especificação sobrevive ao primeiro deploy. Spec-as-source resolve a governança, porque ninguém mais edita código por engano, apenas a especificação que o gera.</p><p>E é exatamente essa palavra, governança, que abre o próximo e último artigo da série. Quando a especificação entra em uso de verdade, aparece uma pergunta incômoda. Quem decide o que entra nela? Vou mostrar dois fluxos que respondem isso de formas bem diferentes, um direto e um com curadoria humana sobre as sugestões que o próprio agente levanta.</p><p>Até o próximo.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cde87576148" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SDD, how to provide all the context needed to build solutions]]></title>
            <link>https://medium.com/@wagner.b.rodrigues/sdd-how-to-provide-all-the-context-needed-to-build-solutions-5c70d62f9347?source=rss-33d594b68a60------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c70d62f9347</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[inteligencia-artificial]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Wagner Braz Rodrigues]]></dc:creator>
            <pubDate>Fri, 24 Jul 2026 01:39:50 GMT</pubDate>
            <atom:updated>2026-07-24T01:39:50.162Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PBSVc9XGi5PRL5KEUpD_PA.png" /></figure><p>You opened the AI and wrote a prompt, “Implement an appointment scheduling system, following these business rules, use this stack, follow these conventions.” The AI implemented it. It worked. Except that, when the system went through review, the complaints poured in. It stores customer information in a way the company doesn’t allow, ignores internal policies every system in the house has to follow, and makes decisions no department would approve. There’s a second type of knowledge that no prompt carries. That’s what we call the context base, and that’s what this article is about.</p><p>Notice something before we continue. What you wrote there was a prompt, not a specification. The difference sounds subtle, but it isn’t. A prompt is a question asked in a conversation, it lives in that session, nobody reviews it, nobody versions it, and tomorrow someone else writes a different prompt for the same system and gets a different result. A specification is something else, the model we introduced in the first article of this series, Specification-Driven Development, or SDD, trades the prompt that gets lost every session for an organized, versioned document, meant to represent the system in a stable way over time. Even if the content looks the same, a prompt and a spec don’t play the same role.</p><p>But let’s say you actually wrote a specification, and a good one. The review would still keep sending the system back for the same reasons. The specification covers the part of the context that belongs to the project, it describes what that system does. What it doesn’t carry is everything that applies to any system in the organization, and that’s exactly the knowledge that separates code that works from code that can go to production.</p><h3><strong>What lives inside the specification</strong></h3><p>Before opening up the context base, it’s worth marking off what the specification covers.</p><p>It splits into two parts. The business specification describes the API contract, the business rules and the domain model, what the system does and under what conditions. The technical specification describes the stack, the layers, the project’s code conventions and how the API is exposed, how the system is built. The business rule is sovereign, it survives a framework swap, while the technical specification changes as the implementation evolves. That’s why the two live in separate documents, mixing them destroys the ability to audit what the system does separately from how it does it.</p><p>The boundary with the context base looks like this. The technical specification says which technologies this project is going to use, event-based communication, authentication through some protocol. The context base says how those technologies should be implemented across any project in the house, which naming convention the event follows, which format the token requires.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O7nwEENiKdK-due3HNmvFg.png" /></figure><blockquote>The spec points to the choice, the context base governs how that choice gets carried out.</blockquote><p>This distinction is worth naming, project knowledge on one side, organizational knowledge on the other. The spec is born, evolves and dies together with the project, and has a clear owner, Software Engineering, historically responsible for the profession’s technical documents, from the flowchart to the ER model, from the ER model to UML. The context base exists before the project starts and keeps existing after it ends, because it belongs to the organization. Hold on to both names, the rest of the article is about the second one.</p><p>Where exactly does what goes into this base come from? It comes from processes the organization already has, even if nobody had thought of them as input for AI.</p><h3><strong>Where the directives come from</strong></h3><p>The first process is Architecture, and what comes out of it are architectural definitions. Think of every technical decision that affects more than one system, whether services talk through events or direct calls, which database is standard for which type of load, which authentication protocol is accepted. Each of these decisions goes through an Architecture committee or some other responsible technical forum, and becomes a record of an architectural decision, which serves as a directive for projects.</p><p>Notice why this matters so much. An AI agent doesn’t arrive empty. It arrives full of patterns learned from millions of public repositories, and it’s going to use some of those patterns, with or without your permission. If the organization doesn’t have a clear architectural definition for, say, communication between services, the agent won’t stop and ask, it will infer, and the inference comes from whatever is most common on the internet, not from what your company decided after years of learning from its own incidents. The result is predictable, two teams delivering two different solutions to the same problem, each defensible on its own, neither aligned with the other. A well-written architectural definition closes that door. It leaves no room for the agent to decide on its own something the organization has already decided.</p><p>The second process is Governance, where the corporate policies that cross products and systems come from, the standard way to calculate risk, the definition of default, the limits any product in the house has to respect. The name of whoever decides varies from company to company, what matters is that the decision becomes a record of corporate policy.</p><p>The third process is Compliance, where the regulations that ensure the software is born within the law and the sector’s regulations come from, from the deadlines the GDPR or local privacy law requires to the mandatory audit trails. Here too the owner varies, legal, a dedicated team, a data officer, and the effect is the same, the decision becomes a compliance regulation.</p><p>Notice the pattern. A technical decision generates an architectural definition. A business decision generates a governance policy. A regulatory decision generates a compliance regulation. The context base isn’t a new document someone writes from scratch thinking about AI, it’s the collection of these three flows the company already maintains, now available for the agent to consult. And these three are the most common processes, not a closed list. Depending on the company, more sources can exist, a Data area with its own governance, an Information Security office running independently, a Software Quality committee. The number of pillars changes, the pattern doesn’t, every source turns a decision into a document, and that document becomes a directive.</p><h3><strong>Watching the base take shape</strong></h3><p>To get out of the abstract, imagine you’re building this base for the team that runs the appointment scheduling system. It doesn’t come ready-made, it grows document by document, as each area contributes what it has already decided.</p><pre>context-base/<br>  architecture/<br>    service-communication.md (architectural definition)<br>    authentication-standard.md (architectural definition)<br>    code-conventions.md (architectural definition)<br>  data/<br>    sensitivity-classification.md (architectural definition)<br>  governance/<br>    cancellation-policy.md (business decision)<br>  compliance/<br>    privacy-regulations.md (regulatory record)<br></pre><p>And what’s actually inside one of these documents? Nothing mysterious, decisions written plainly. The `authentication-standard.md`, for example, could contain just this.</p><pre>Every REST API authenticates with OAuth2.<br>JWT tokens expire in 30 minutes.<br>Refresh token is mandatory.</pre><p>One detail matters here, because the tree above is a didactic simplification. In real life, these documents rarely live natively as .md files in a folder like this. They tend to be scattered across Confluence, Word, PDF, internal wikis, each area using the tool it’s relied on for years. What matters isn’t the file format, it’s the content, the owner and the organization by governance domain.</p><p>The separation into folders isn’t cosmetic, it preserves each area’s accountability. Whoever approves a change to `authentication-standard.md` is the architecture committee, whoever approves a change to `privacy-regulations.md` is legal, and `code-conventions.md` carries the convention from the Engineering guild that applies to any squad, not one team’s local preference, that stays in the project’s technical spec. Mixing everything into a single file destroys that traceability.</p><p>None of these documents were written with AI or SDD in mind. Any mature organization already has them, just scattered across wikis, PDFs, intranets and the heads of the more senior architects. A new developer takes months to absorb all of this. The AI agent never absorbs it, because nobody consolidated it. Consolidating and properly governing these assets is the first step toward making SDD viable, and the benefit isn’t exclusive to AI, a well-organized base also makes life easier for the developer who just joined, the architect from another squad, the auditor who needs to confirm a decision.</p><blockquote>Organizing for AI ends up organizing for people too.</blockquote><p>And although the base exists before the projects, it also evolves with them. An important architecture, an observability standard born inside a squad, a convention created during a transformation program, all of this can stop being a local decision and start applying to the whole organization. How that promotion happens, and who decides it, is a topic for this series’ article on governance.</p><h3><strong>What makes a good context base for SDD</strong></h3><p>With the three pillars and the example on the table, this can be closed into objective criteria. A good context base has six characteristics.</p><p>It’s recorded as a decision, not a suggestion, approved by whoever has the authority to approve it. Every document has an explicit owner, an area responsible for keeping it up to date. The base is also versioned and dated, because if it ages without updates, the AI generates code following a dead regulation with the same conviction as one following a living one, and truly adopting SDD pushes the organization to treat this documentation as living code. And everything is separated by governance domain, because whoever approves each domain is different.</p><p>The last two deserve more room. It’s written to decide, not to describe. An architectural definition says use this pattern, not that other one, it doesn’t list the available options with pros and cons. Documented ambiguity is still ambiguity, and the agent fills ambiguity with whatever it learned on the internet. There’s a similar risk with jargon. If the internal documentation uses terms too specific to the company without explaining what they mean, the agent trips in a different way, it tries to fit that term into some generic concept it has seen elsewhere, and often gets it wrong. A document that mentions a platinum customer without ever defining what that means leaves the AI free to invent a definition, and it will.</p><p>And it’s consumable at the moment the agent generates code, not filed away somewhere rarely opened. A perfect document the agent never reads is worth as much as no document at all.</p><h3><strong>Skills</strong></h3><p>If the context base is what the agent knows, skills are what it does on command.</p><p>A skill executes a recurring task without anyone having to rewrite the logic for every new module. It encodes an engineering decision the team has already made, like generating tests, validating architecture or checking compliance with internal regulations. The important detail is that a skill reads the specification before acting. A testing skill, for example, generates the test cases from the documented business rules themselves, and stays available for any spec in the same domain, without depending on whoever remembers how it was done last time.</p><p>In corporate environments, skills carry an extra role. They turn a directive into an executable check. Take the file tree from before, an architectural compliance skill could read `authentication-standard.md`, scan freshly generated code and flag every call that doesn’t use the approved protocol, before any human reviewer opens the PR. Another skill, a corporate linter, does the same with `code-conventions.md`, automatically rejecting whatever the Engineering guild has already defined as out of standard. Compliance stops being a step at the end of the process and starts running inside it.</p><h3><strong>How to consume and consolidate these bases</strong></h3><p>Now that it’s clear what needs to be consumed, it’s time to understand how to deliver it to the agent. There’s no point gathering all this content if the agent doesn’t consult it at the moment it generates code. There are three main ways to build that bridge, and they can coexist.</p><p>The simplest is the agent’s context file, usually a .md file in the project’s root folder, like `CLAUDE.md` or its equivalent, read automatically on every generation. It’s good for the most critical, most stable directives, but limited in size. The one that scales best is RAG over the internal documentation, indexing the full directives and retrieving just the relevant excerpt for each task. And the one most aligned with the corporate world is MCP, which exposes the directives as a service maintained by whoever owns them, with centralized access control and auditing, instead of replicated in every project.</p><p>It’s worth understanding why RAG and MCP matter so much here, and it’s not just a matter of cost. Dumping every one of the company’s regulations directly into a model’s context window isn’t just expensive in tokens, it also dilutes the AI’s attention. The more irrelevant information enters the context, the worse the model’s attention gets to the part that actually matters for that task, an effect that’s already been named getting lost in the middle. RAG and MCP exist precisely to avoid this, they deliver only the excerpt necessary for that specific generation, keeping the agent focused on what matters.</p><h3><strong>All the pieces on the table</strong></h3><p>Now all the pieces are on the table. The specification defines what this project does, the context base carries how the organization works, and skills automate whatever repeats over that knowledge. The agent stops being a talented intern who never read the house’s regulations and starts working like a team member who absorbed all the documentation before writing the first line.</p><p>And with the pieces on the table, the market can be looked at with different eyes. Kiro, Spec Kit, Tessl, every framework promises SDD, but each one treats these pieces quite differently. That’s the subject of the next article.</p><p>See you in the next one.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c70d62f9347" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SDD, como fornecer todo o contexto necessário para desenvolver soluções]]></title>
            <link>https://medium.com/@wagner.b.rodrigues/sdd-como-fornecer-todo-o-contexto-necess%C3%A1rio-para-desenvolver-solu%C3%A7%C3%B5es-9340e1c4dec7?source=rss-33d594b68a60------2</link>
            <guid isPermaLink="false">https://medium.com/p/9340e1c4dec7</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[sdd]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Wagner Braz Rodrigues]]></dc:creator>
            <pubDate>Fri, 24 Jul 2026 01:38:46 GMT</pubDate>
            <atom:updated>2026-07-24T01:38:46.421Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1oDgJ969p2OCWvPBFpCRHw.png" /></figure><p>Você abriu a IA e escreveu um prompt, “Implemente um sistema de agendamento de consultas, seguindo essas regras de negócio, use essa stack, siga essas convenções.” A IA implementou. Funcionou. Só que, quando o sistema passou pela revisão, choveu apontamento. Ele guarda informações do cliente de um jeito que a empresa não permite, ignora políticas internas que todo sistema da casa precisa seguir e toma decisões que nenhuma área aprovaria. Existe um segundo tipo de conhecimento que nenhum prompt carrega. É o que chamamos de base de contexto, e é dele que este artigo trata.</p><p>Repare numa coisa antes de continuarmos. O que você escreveu ali foi um prompt, não uma especificação. A diferença parece sutil, mas não é. Um prompt é uma pergunta feita numa conversa, ele vive naquela sessão, ninguém revisa, ninguém versiona, e amanhã outra pessoa escreve um prompt diferente para o mesmo sistema e recebe um resultado diferente. Uma especificação é outra coisa, o modelo que apresentamos no primeiro artigo desta série, o Specification-Driven Development, ou SDD, troca o prompt que se perde a cada sessão por um documento organizado, versionado, com a intenção de representar o sistema de forma estável ao longo do tempo. Mesmo que o conteúdo pareça o mesmo, prompt e spec não cumprem o mesmo papel.</p><p>Mas vamos supor que você realmente escreveu uma especificação, e uma boa. Mesmo assim, a revisão continuaria devolvendo o sistema pelos mesmos motivos. A especificação resolve a parte do contexto que pertence ao projeto, ela descreve o que aquele sistema faz. O que ela não carrega é tudo aquilo que vale para qualquer sistema da organização, e é justamente esse conhecimento que separa um código que funciona de um código que pode ir para produção.</p><h3>O que mora dentro da especificação</h3><p>Antes de abrir a base de contexto, vale delimitar o que a especificação cobre.</p><p>Ela se divide em duas partes. A especificação de negócio descreve o contrato da API, as regras de negócio e o modelo de domínio, o que o sistema faz e em que condições. A especificação técnica descreve a stack, as camadas, as convenções de código do projeto e a forma de expor a API, como o sistema é construído. A regra de negócio é soberana, ela sobrevive a uma troca de framework, enquanto a especificação técnica muda conforme a implementação evolui. Por isso as duas vivem em documentos separados, misturá-las destrói a capacidade de auditar o que o sistema faz separadamente de como ele faz.</p><p>A fronteira com a base de contexto fica assim. A especificação técnica diz quais tecnologias este projeto vai usar, comunicação por evento, autenticação por tal protocolo. A base de contexto diz como essas tecnologias devem ser implementadas em qualquer projeto da casa, qual convenção de nomenclatura o evento segue, qual formato o token exige.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*0RGuvR3T3MS6euaAjxXE5Q.png" /></figure><blockquote><em>A spec aponta a escolha, a base de contexto governa a execução dessa escolha.</em></blockquote><p>Dá pra nomear essa distinção, conhecimento de projeto de um lado, conhecimento organizacional do outro. A spec nasce, evolui e morre junto com o projeto, e tem dono claro, a Engenharia de Software, historicamente responsável pelos documentos técnicos da profissão, do fluxograma ao MER, do MER à UML. A base de contexto existe antes do projeto começar e continua depois que ele acaba, porque pertence à organização. Guarde os dois nomes, o resto do artigo é sobre o segundo.</p><p>De onde vem, exatamente, o que entra nessa base? Ela nasce de processos que a organização já tem, ainda que ninguém tenha pensado neles como insumo para IA.</p><h3>De onde vêm os direcionadores</h3><p>O primeiro processo é a Arquitetura, e o que sai dela são as definições arquiteturais. Pensa em toda decisão técnica que afeta mais de um sistema, se serviços conversam por evento ou por chamada direta, qual banco é padrão para qual tipo de carga, qual protocolo de autenticação é aceito. Cada uma dessas decisões passa por um comitê de Arquitetura ou outro fórum técnico responsável, e vira um registro de decisão arquitetural, que serve como direcionador para os projetos.</p><p>Note por que isso importa tanto. Um agente de IA não chega vazio. Ele chega cheio de padrões aprendidos em milhões de repositórios públicos, e algum desses padrões vai usar, com ou sem a sua permissão. Se a organização não tem uma definição arquitetural clara para, digamos, comunicação entre serviços, o agente não vai parar e perguntar, ele vai inferir, e a inferência vem do que é mais comum na internet, não do que a sua empresa decidiu depois de anos de aprendizado com incidentes próprios. O resultado é previsível, duas equipes entregando duas soluções diferentes para o mesmo problema, cada uma defensável isoladamente, nenhuma alinhada com a outra. Uma definição arquitetural bem escrita fecha essa porta. Ela não deixa espaço para o agente decidir por conta própria algo que a organização já decidiu.</p><p>O segundo processo é a Governança, de onde saem as políticas corporativas que atravessam produtos e sistemas, a forma padrão de calcular risco, a definição de inadimplência, os limites que qualquer produto da casa precisa respeitar. O nome de quem decide varia de empresa para empresa, o que importa é que a decisão vira um registro de política corporativa.</p><p>O terceiro processo é o Compliance, de onde saem os normativos que garantem que o software nasça dentro da lei e das regulações do setor, dos prazos que a LGPD exige às trilhas de auditoria obrigatórias. Aqui também o dono varia, jurídico, área dedicada, encarregado de dados, e o efeito é o mesmo, a decisão vira um normativo de conformidade.</p><p>Repare no padrão. Decisão técnica gera definição arquitetural. Decisão de negócio gera política de governança. Decisão regulatória gera normativo de compliance. A base de contexto não é um documento novo que alguém escreve do zero pensando na IA, ela é a coleção desses três fluxos que a empresa já mantém, agora disponível para o agente consultar. E os três são os processos mais comuns, não uma lista fechada. Dependendo da empresa, podem existir mais fontes, uma área de Dados com governança própria, um escritório de Segurança da Informação independente, um comitê de Qualidade de Software. O número de pilares muda, o padrão não, toda fonte transforma uma decisão em documento, e esse documento vira direcionador.</p><h3>Vendo a base se formar</h3><p>Para sair do abstrato, imagina que você está montando essa base para o time que cuida do sistema de agendamento de consultas. Ela não nasce pronta, ela cresce documento por documento, à medida que cada área contribui com o que já decidiu.</p><pre>base-contexto/<br>  arquitetura/<br>    comunicacao-entre-servicos.md      (definição arquitetural)<br>    autenticacao-padrao.md             (definição arquitetural)<br>    convencoes-de-codigo.md            (definição arquitetural)<br>  dados/<br>    classificacao-sensibilidade.md     (definição arquitetural, arquitetura e segurança)<br>  governanca/<br>    politica-cancelamento.md           (decisão de negócio, comitê de produto)<br>  compliance/<br>    normativos-lgpd.md                 (normativo regulatório, jurídico e compliance)</pre><p>E o que tem dentro de um documento desses? Nada de misterioso, decisões escritas de forma direta. O autenticacao-padrao.md, por exemplo, poderia conter apenas isto.</p><pre>Toda API REST autentica com OAuth2.<br>Tokens JWT expiram em 30 minutos.<br>Refresh token é obrigatório.</pre><p>Um detalhe importa aqui, porque a árvore acima é uma simplificação didática. Na vida real, dificilmente esses documentos vivem nativamente como arquivos .md numa pasta assim. Eles costumam estar espalhados em Confluence, Word, PDF, wikis internas, cada área com a ferramenta que já usa há anos. O que importa não é o formato do arquivo, é o conteúdo, o dono e a organização por domínio de governança.</p><p>A separação em pastas não é estética, ela preserva a responsabilidade de cada área. Quem aprova uma mudança em autenticacao-padrao.md é o comitê de arquitetura, quem aprova em normativos-lgpd.md é o jurídico, e convencoes-de-codigo.md carrega a convenção da guilda de Engenharia que vale para qualquer squad, não a preferência local de um time, essa fica na spec técnica do projeto. Misturar tudo num arquivo único destrói essa rastreabilidade.</p><p>Nenhum desses documentos foi escrito pensando em IA ou SDD. Toda organização madura já os tem, só que espalhados em wikis, PDFs, intranets e na cabeça dos arquitetos mais antigos. Um desenvolvedor novo leva meses para absorver tudo isso. O agente de IA não absorve nunca, porque ninguém consolidou. Consolidar e governar bem esses ativos é o primeiro passo para viabilizar o SDD, e o benefício não é exclusivo da IA, uma base bem organizada também facilita a vida do desenvolvedor que acabou de entrar, do arquiteto de outra squad, do auditor que precisa confirmar uma decisão.</p><blockquote><em>Organizar para a IA acaba organizando para as pessoas também.</em></blockquote><p>E embora a base exista antes dos projetos, ela também evolui com eles. Uma aquitetura importante, um padrão de observabilidade que nasceu numa squad, uma convenção criada durante um programa de transformação, tudo isso pode deixar de ser decisão local e passar a valer para a organização inteira. Como essa promoção acontece, e quem decide, é assunto para o artigo de governança desta série.</p><h3>O que compõe uma boa base de contexto para SDD</h3><p>Com os três pilares e o exemplo na mesa, dá para fechar isso em critérios objetivos. Uma boa base de contexto tem seis características.</p><p>Ela é registrada como decisão, não como sugestão, aprovada por quem tem autoridade para aprovar. Cada documento tem dono explícito, uma área responsável por mantê-lo. A base também é versionada e datada, porque se ela envelhece sem atualização, a IA gera código seguindo um normativo morto com a mesma convicção de quem segue um normativo vivo, e adotar SDD de verdade empurra a organização a tratar essa documentação como código vivo. E tudo fica separado por domínio de governança, porque quem aprova cada domínio é diferente.</p><p>As duas últimas merecem mais espaço. Ela é escrita para decidir, não para descrever. Uma definição arquitetural diz use este padrão, não use aquele outro, ela não lista as opções com prós e contras. Ambiguidade documentada ainda é ambiguidade, e o agente preenche ambiguidade com o que aprendeu na internet. Existe um risco parecido com o jargão, se a documentação usa termos muito específicos da empresa sem explicar o que significam, o agente tenta encaixar aquele termo em algum conceito genérico que já viu por aí, e frequentemente erra. Um documento que fala em cliente platina sem nunca definir o que isso significa deixa a IA livre para inventar uma definição, e ela vai inventar.</p><p>E ela é consumível no momento em que o agente gera código, não arquivada num lugar que raramente se abre. Um documento perfeito que o agente nunca lê vale tanto quanto nenhum documento.</p><h3>Skills</h3><p>Se a base de contexto é o que o agente sabe, as skills são o que ele faz sob comando.</p><p>Uma skill executa uma tarefa recorrente sem que ninguém precise reescrever a lógica a cada módulo novo. Ela codifica uma decisão de engenharia que o time já tomou, como gerar testes, validar a arquitetura ou checar conformidade com os normativos internos. O detalhe importante é que uma skill lê a especificação antes de agir. Uma skill de teste, por exemplo, gera os casos a partir das próprias regras de negócio documentadas, e fica disponível para qualquer spec do mesmo domínio, sem depender de quem lembra como foi feito da última vez.</p><p>No ambiente corporativo, as skills têm um papel extra. Elas transformam direcionador em verificação executável. Pega o exemplo da árvore de arquivos de antes, uma skill de compliance arquitetural pode ler autenticacao-padrao.md, varrer o código recém-gerado e apontar toda chamada que não usa o protocolo aprovado, antes de qualquer revisor humano abrir o PR. Outra skill, de linting corporativo, faz o mesmo com convencoes-de-codigo.md, rejeitando automaticamente o que a guilda de Engenharia já definiu como fora do padrão. O compliance deixa de ser uma etapa no fim do processo e passa a rodar dentro dele.</p><h3>Como consumir e consolidar essas bases</h3><p>Agora que ficou claro o que precisa ser consumido, falta entender como entregar isso ao agente. De nada adianta reunir todo esse conteúdo se o agente não o consulta no momento em que gera o código. Existem três formas principais de fazer essa ponte, e podem inclusive coexistir.</p><p>A mais simples é o arquivo de contexto do agente, geralmente um .md na pasta raiz do projeto, como o CLAUDE.md ou equivalente, lido automaticamente a cada geração. É bom para os direcionadores mais críticos e estáveis, mas limitado em tamanho. A que mais escala é o RAG sobre a documentação interna, indexando os direcionadores completos e recuperando só o trecho relevante para cada tarefa. E a mais alinhada ao mundo corporativo é o MCP, que expõe os direcionadores como serviço mantido por quem é dono deles, com controle de acesso e auditoria centralizados, em vez de replicados em cada projeto.</p><p>Vale entender por que RAG e MCP importam tanto aqui, e não é só questão de custo. Jogar todos os normativos da empresa direto na janela de contexto de um modelo não é apenas caro em tokens, também dilui a atenção da IA. Quanto mais informação irrelevante entra no contexto, pior fica a atenção do modelo à parte que realmente importa para aquela tarefa, um efeito que já foi batizado de perder-se no meio. RAG e MCP existem justamente para evitar isso, eles entregam só o trecho necessário para aquela geração específica, e mantêm o agente focado no que importa.</p><h3>As peças na mesa</h3><p>Agora todas as peças estão na mesa. A especificação define o que este projeto faz, a base de contexto carrega como a organização trabalha, e as skills automatizam o que se repete sobre esse conhecimento. O agente deixa de ser um estagiário talentoso que nunca leu os normativos da casa e passa a trabalhar como um integrante que absorveu toda a documentação antes de escrever a primeira linha.</p><p>E com as peças na mesa, dá para olhar o mercado com outros olhos. Kiro, Spec Kit, Tessl, cada framework promete SDD, mas cada um trata essas peças de um jeito bem diferente. Esse é o assunto do próximo artigo.</p><p>Até o próximo.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9340e1c4dec7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SDD, the model that LLMs made possible]]></title>
            <link>https://medium.com/@wagner.b.rodrigues/sdd-the-model-that-llms-made-possible-07d242fc28ff?source=rss-33d594b68a60------2</link>
            <guid isPermaLink="false">https://medium.com/p/07d242fc28ff</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Wagner Braz Rodrigues]]></dc:creator>
            <pubDate>Tue, 21 Jul 2026 16:45:15 GMT</pubDate>
            <atom:updated>2026-07-21T16:45:15.801Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EgXWm5JETHtO1rDSbW7jDg.png" /></figure><p>You grabbed your coffee, opened the AI, pasted the task, and asked it to implement everything. If this describes a good part of your day, you are already doing Vibe Coding.</p><p>That’s why we’re going to start by addressing the elephant in the room. SDD and Vibe Coding are two different things.</p><p>I’m not here to condemn Vibe Coding. On the contrary, it serves perfectly for creating a POC, a demonstration, validating an idea, or developing something that doesn’t need to last long. And let’s be honest, we’ve all used Vibe Coding and know the back-and-forth involved until something actually works. You ask for a change, a side effect appears, you fix one thing, break another, explain the context again, and so on. It is precisely for this reason that, for production applications, it isn’t the best path.</p><p>This happens because the LLM doesn’t have all the necessary context. It works with what was provided at that moment and tries to fill in the rest as best as possible. The less context it has, the higher the chance of it interpreting something differently than we imagined. The result works until the next session, when the agent loses context and the team loses the explanation of the reasoning behind that rule. Prompt engineering improves the input of each interaction, but still treats each conversation as an isolated event.</p><p><strong>SDD (Spec-Driven Development)</strong> is a Software Engineering model in which the specification becomes the central artifact of the project, serving simultaneously for people and AI agents.</p><h3>A Model, Not a Document</h3><p>SDD is a model. Just like UML is a model, an entity-relationship diagram is a model, a flowchart is a model, and so many others that Software Engineering has produced over the past decades. The difference is that the semantics of SDD is natural language itself.</p><p>The power of SDD doesn’t lie in writing specifications in natural language. It lies in transforming natural language into a model.</p><p>It might seem like a small difference, but it completely changes the way we produce software.</p><p>And look, this idea wasn’t born yesterday. As long as Software Engineering has existed, we have tried to represent the system before implementing it. Over the decades, various models, notations, and methodologies have emerged with a common goal: to create representations of the software that could be understood by people and, at the same time, interpreted by tools to automate part of the development.</p><p>In the 2000s, this vision gained traction with MDA and MDD, which placed the model at the center of the process and sought to generate code from it. I myself revisited this idea in 2024, in a Model-Driven Development experiment using ChatGPT, generating Python applications from UML diagrams. It worked, but it hit a limit that wasn’t of the tool, but rather the expressiveness of the notation. Diagrams describe structure and flow very well, but they cannot represent business rules, exceptions, constraints, and all the context surrounding a real system with the same richness.</p><p>All these movements had something in common. They started from the idea that thinking about the system before writing code produces better software. SDD doesn’t break from this idea. On the contrary, it continues this exact evolution.</p><p>There was, however, a fundamental difference. For decades, we avoided using natural language as the primary model because computers couldn’t interpret it. We created formal languages precisely to reduce ambiguities and allow tools to understand those models.</p><p>LLMs changed this equation. In an unprecedented way, natural language ceases to be merely documentation and becomes comprehensible to machines as well.</p><h3>What LLMs Changed</h3><p>We stopped creating models for machines and started creating models for people, without losing the ability for machines to understand them.</p><p>The Product Owner can read it. The analyst can read it. The architect can read it. The developer can read it. The client can read it. And the AI can too.</p><p>As a result, everyone works on exactly the same artifact.</p><p>Note that I didn’t say SDD is a document written in natural language. A document can just be text. SDD is a model. There is organization, there is structure, there is semantics, and there is an intention to represent a system, exactly like any other Software Engineering model.</p><p>The difference is that its semantics are much closer to the way human beings think and communicate.</p><p>When the entire project context starts existing within this model, the AI stops trying to guess what we want with each prompt. It starts working on a consistent representation of the domain, the business rules, the architectural decisions, the constraints, and the project objectives.</p><p>The system’s knowledge is no longer distributed among code, documents, and conversations. It becomes concentrated in the specification.</p><h3>First the Problem, Then the Solution</h3><p>Perhaps this is the biggest shift in perspective. We are not replacing Software Engineering with Artificial Intelligence. We are using Artificial Intelligence to rescue a principle that has always existed in Software Engineering. First, we understand and model the problem, then we implement the solution.</p><p>This article had only one goal: to introduce the concept and show where it comes from. In the next three, we will get down to practice:</p><ul><li><strong>In the second:</strong> Context and knowledge bases — that is, everything the agent needs to know about your team beyond the specification.</li><li><strong>In the third:</strong> The frameworks the market already offers to work with SDD and the differences between them.</li><li><strong>In the fourth:</strong> Model governance: who has the authority to change the spec and how to keep a human in the loop when the agent itself starts suggesting improvements.</li></ul><p>If code is the consequence of a good model, perhaps the main skill of the next generation of engineers will no longer be writing code, but rather building good specifications.</p><p>Until next time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07d242fc28ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SDD, o modelo que as LLMs tornaram possível]]></title>
            <link>https://medium.com/@wagner.b.rodrigues/sdd-o-modelo-que-as-llms-tornaram-poss%C3%ADvel-ca6d4da93382?source=rss-33d594b68a60------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca6d4da93382</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Wagner Braz Rodrigues]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 17:13:57 GMT</pubDate>
            <atom:updated>2026-07-19T00:30:07.350Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vhSAgJpH6eWH9sglkZ-WIw.png" /></figure><p>Você pegou seu café, abriu a IA, colou a task e pediu para ela implementar tudo. Se isso descreve boa parte do seu dia, você já faz Vibe Coding.</p><p>Por isso, já vamos começar retirando o elefante da sala. SDD e Vibe Coding são duas coisas diferentes.</p><p>Não estou aqui para condenar o Vibe Coding. Pelo contrário, ele serve perfeitamente para criar uma POC, uma demonstração, validar uma ideia ou desenvolver algo que não precisa durar muito. E vamos ser honestos, todos nós já usamos Vibe Coding e conhecemos as idas e vindas até algo realmente dar certo. Você pede uma alteração, aparece um efeito colateral, corrige uma coisa, quebra outra, explica o contexto novamente e assim por diante. É justamente por esse motivo que, para aplicações produtivas, ele não é o melhor caminho.</p><p>Isso acontece porque a LLM não tem todo o contexto necessário. Ela trabalha com o que foi informado naquele momento e tenta preencher o restante da melhor forma possível. Quanto menos contexto ela possui, maior a chance de interpretar algo diferente do que imaginamos. O resultado funciona até a próxima sessão, quando o agente perde o contexto e o time perde a explicação do motivo daquela regra. Prompt engineering melhora a entrada de cada interação, mas ainda trata cada conversa como um evento isolado.</p><p>SDD (Spec-Driven Development) é um modelo de Engenharia de Software em que a especificação se torna o artefato central do projeto, servindo simultaneamente para pessoas e para agentes de IA.</p><h3>Um modelo, não um documento</h3><p>SDD é um modelo. Assim como UML é um modelo, um diagrama entidade-relacionamento é um modelo, um fluxograma é um modelo e tantos outros que a Engenharia de Software produziu ao longo das últimas décadas. A diferença é que a semântica do SDD é a própria linguagem natural.</p><p>O poder do SDD não está em escrever especificações em linguagem natural. Está em transformar a linguagem natural em um modelo.</p><p>Pode parecer uma diferença pequena, mas ela muda completamente a forma como produzimos software.</p><p>E olha, essa ideia não nasceu ontem. Desde que Engenharia de Software existe, tentamos representar o sistema antes de implementá-lo. Ao longo das décadas surgiram diversos modelos, notações e metodologias com um objetivo em comum, o de criar representações do software que pudessem ser compreendidas pelas pessoas e, ao mesmo tempo, interpretadas pelas ferramentas para automatizar parte do desenvolvimento.</p><p>Nos anos 2000, essa visão ganhou força com o MDA e o MDD, que colocavam o modelo no centro do processo e buscavam gerar código a partir dele. Eu mesmo revisitei essa ideia em 2024, no experimento de <a href="https://medium.com/@wagner.b.rodrigues/model-driven-development-utilizando-chatgpt-209735cf080e">Model-Driven Development utilizando ChatGPT</a>, gerando aplicações Python a partir de diagramas UML. Funcionou, mas esbarrou em um limite que não era da ferramenta, e sim da expressividade da notação. Diagramas descrevem muito bem estrutura e fluxo, mas não conseguem representar com a mesma riqueza as regras de negócio, as exceções, as restrições e todo o contexto que envolve um sistema real.</p><p>Todos esses movimentos tinham algo em comum. Eles partiam da ideia de que pensar o sistema antes de escrever código produz software melhor. O SDD não rompe com essa ideia. Pelo contrário, ele continua exatamente essa evolução.</p><p>Existia, porém, uma diferença fundamental. Durante décadas evitamos usar linguagem natural como modelo principal porque computadores não conseguiam interpretá-la. Criamos linguagens formais justamente para reduzir ambiguidades e permitir que ferramentas compreendessem aqueles modelos.</p><p>As LLMs mudaram essa equação. De forma inédita, a linguagem natural deixa de ser apenas documentação e passa a ser compreensível também pelas máquinas.</p><h3>O que as LLMs mudaram</h3><p>Deixamos de criar modelos para máquinas e passamos a criar modelos para pessoas, sem perder a capacidade de as máquinas compreendê-los.</p><p>O Product Owner consegue ler. O analista consegue ler. O arquiteto consegue ler. O desenvolvedor consegue ler. O cliente consegue ler. E a IA também.</p><p>Como resultado, todos trabalham sobre exatamente o mesmo artefato.</p><p>Perceba que eu não disse que SDD é um documento escrito em linguagem natural. Um documento pode ser apenas um texto. O SDD é um modelo. Existe organização, existe estrutura, existe semântica e existe a intenção de representar um sistema, exatamente como qualquer outro modelo de Engenharia de Software.</p><p>A diferença é que sua semântica é muito mais próxima da forma como os seres humanos pensam e se comunicam.</p><p>Quando todo o contexto do projeto passa a existir dentro desse modelo, a IA deixa de tentar adivinhar o que queremos a cada prompt. Ela passa a trabalhar sobre uma representação consistente do domínio, das regras de negócio, das decisões arquiteturais, das restrições e dos objetivos do projeto.</p><p>O conhecimento do sistema deixa de estar distribuído entre código, documentos e conversas. Ele passa a estar concentrado na especificação.</p><h3>Primeiro o problema, depois a solução</h3><p>Talvez essa seja a maior mudança de perspectiva. Não estamos substituindo Engenharia de Software por Inteligência Artificial. Estamos utilizando a Inteligência Artificial para resgatar um princípio que sempre existiu na Engenharia de Software. Primeiro entendemos e modelamos o problema, depois implementamos a solução.</p><p>Este artigo teve apenas um objetivo, apresentar o conceito e mostrar de onde ele vem. Nos próximos três, vamos descer para a prática.</p><ul><li>No segundo, as bases de contexto e conhecimento, ou seja, tudo que o agente precisa saber sobre o seu time além da especificação.</li><li>No terceiro, os frameworks que o mercado já oferece para trabalhar com SDD e as diferenças entre eles.</li><li>No quarto, a governança do modelo, quem tem autoridade para mudar a spec e como manter um humano no circuito quando o próprio agente começa a sugerir melhorias.</li></ul><p>Se o código é consequência de um bom modelo, talvez a principal habilidade da próxima geração de engenheiros deixe de ser escrever código e passe a ser construir boas especificações.</p><p><strong>Até o próximo.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca6d4da93382" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Habemos Pingu Linux: Criando Minha Própria Versão do Linux com Linux From Scratch]]></title>
            <link>https://medium.com/@wagner.b.rodrigues/habemos-pingu-linux-criando-minha-pr%C3%B3pria-vers%C3%A3o-do-linux-com-linux-from-scratch-3ab4a74437a1?source=rss-33d594b68a60------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ab4a74437a1</guid>
            <category><![CDATA[linux-tutorial]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Wagner Braz Rodrigues]]></dc:creator>
            <pubDate>Wed, 12 Mar 2025 14:43:14 GMT</pubDate>
            <atom:updated>2025-03-20T22:57:12.558Z</atom:updated>
            <content:encoded><![CDATA[<p>Recentemente, embarquei em uma jornada desafiadora e enriquecedora: criar minha própria versão do Linux utilizando o <strong>Linux From Scratch (LFS)</strong>. A escolha do nome e da identidade do sistema foi inspirada no personagem infantil Pingu. O objetivo não era criar uma distro para uso diário ou mantê-la publicamente, mas explorar a arquitetura e os internals do Linux, aprofundando o aprendizado.</p><p>Neste artigo, compartilho minha experiência, os desafios enfrentados e algumas dicas valiosas para quem quiser se aventurar nessa empreitada.</p><h3>O Desafio do Linux From Scratch</h3><p>O <strong>Linux From Scratch</strong> <a href="https://www.linuxfromscratch.org/">https://www.linuxfromscratch.org/</a> é um projeto que ensina como construir um sistema Linux completamente funcional a partir do código-fonte. É uma experiência que exige paciência, atenção aos detalhes e um bom conhecimento prévio de Linux. No meu caso, o processo levou cerca de <strong>16 horas</strong>, incluindo algumas vezes que foi necessario retomar o processo do inicio a erros cometidos ao longo do caminho. Esse tempo não considera os builds mais demorados e os backups que deixei sendo executado pela maquina.</p><p>Uma parte desafiadora é que como arquiteto, confesso que precisei “tirar a poeira dos dedos” para realizar algumas tarefas mais , como compilar pacotes e resolver problemas de dependências. Esse distanciamento da prática é algo que aconselho meus colegas a evitarem. Manter um laboratório ou alguma forma de contato com as tecnologias é essencial para o trabalho do arquiteto. Pretendo escrever um artigo futuramente, sobre esse topico.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*xa_Khups1aVUjjo8gnxqxw.jpeg" /><figcaption>Tela do Linux Pingu</figcaption></figure><h3>Ambiente de Desenvolvimento</h3><p>Para realizar o processo, utilizei o <strong>Debian</strong> com a interface <strong>LXDE</strong> (leve e eficiente) em uma máquina virtual no <strong>VirtualBox</strong>. Optar por uma máquina virtual pode tornar o processo mais lento, mas garante o isolamento e a segurança do ambiente principal que uso no dia a dia. Além disso, facilita a criação de <em>snapshots</em>, que são úteis para voltar a um ponto anterior em caso de erros graves.</p><h3>Fluxo do LFS</h3><p>A construção do LFS segue um fluxo bem definido, que pode ser dividido nas seguintes etapas:</p><ol><li><strong>Preparação do Sistema Hospedeiro</strong>: Instalação dos pacotes necessários no sistema que será usado para compilar o LFS.</li><li><strong>Criação da Partição LFS</strong>: Configuração da partição que armazenará o novo sistema, incluindo formatação e montagem.</li><li><strong>Compilação do Toolchain Cross</strong>: Construção das ferramentas iniciais em um ambiente isolado para garantir uma compilação limpa.</li><li><strong>Construção das Ferramentas Temporárias</strong>: Compilação de utilitários essenciais que permitirão a construção do sistema final.</li><li><strong>Entrada no Ambiente Chroot</strong>: Troca do ambiente para o diretório raiz do LFS, isolando-o completamente do sistema hospedeiro.</li><li><strong>Construção do Sistema Base</strong>: Compilação e instalação dos pacotes essenciais que formarão o novo sistema operacional.</li><li><strong>Configuração Final</strong>: Ajustes de configuração, scripts de inicialização e configuração da rede.</li><li><strong>Compilação do Kernel e Bootloader</strong>: Construção do kernel Linux e instalação do GRUB para permitir o boot no novo sistema.</li><li><strong>Reinicialização no Novo Sistema</strong>: O momento final, onde o sistema LFS é carregado de forma independente pela primeira vez.</li></ol><h3>Dicas para o Processo</h3><p>Aqui estão algumas dicas que aprendi ao longo do caminho:</p><ul><li><strong>Use </strong><strong>echo $? constantemente</strong>: Esse comando verifica o retorno do último comando executado. É uma forma rápida de garantir que tudo está funcionando como esperado.</li><li><strong>Siga o livro à risca, mas esteja preparado para improvisar</strong>: O livro do LFS é um guia excelente, mas não cobre todos os detalhes. Em alguns momentos, você precisará pesquisar e descobrir soluções por conta própria.</li><li><strong>Mantenha a atenção, mesmo quando o processo for repetitivo</strong>: Em certo ponto, o processo se torna monótono, com comandos repetidos para diferentes pacotes. Um pequeno desvio de atenção me fez tentar corrigir um erro que, na verdade, era esperado e já descrito no livro. Fique atento!</li><li><strong>Escolha uma distribuição base com a qual você tenha familiaridade</strong>: Isso facilita a resolução de problemas e a compreensão do ambiente.</li><li><strong>Esteja preparado para erros</strong>: Nem todos os problemas que você encontrar terão soluções prontas em fóruns ou documentações. Alguns exigirão conhecimento técnico para serem resolvidos. Por isso, não recomendo o LFS para iniciantes.</li><li><strong>Tutorial complementar</strong>: Utilize algum curso ou material complementar, para facilitar o processo. Eu utilizei o curso do Diolinux sobre LFS, disponível no YouTube. <a href="https://www.youtube.com/playlist?list=PLZsjaJhVZaxW8FvFeb59By218xzIBbl4e">Curso Diolinux sobre LFS no YouTube</a></li></ul><h3>Erros e Soluções</h3><p>Durante o processo, encontrei alguns erros, como por exemplo, um problema na compilação do <strong>M4</strong>, um pacote essencial para a construção do sistema. Depois de algumas pesquisas, encontrei a solução no <strong>FAQ oficial do Linux From Scratch</strong>, disponível em <a href="https://www.linuxfromscratch.org/lfs/faq.html">https://www.linuxfromscratch.org/lfs/faq.html</a>. Contudo, não existe muito material a respeito disponivel o que reforça a importância de ter habilidades de resolução de problemas e paciência para buscar soluções.</p><h3>Conclusão</h3><p>Criar minha própria versão do Linux com o <strong>Linux From Scratch</strong> foi uma experiência incrivelmente gratificante. Além de aprofundar meu conhecimento sobre a arquitetura do Linux, pude resgatar a prática de tarefas mais técnicas que, como arquiteto, acabo deixando de lado no dia a dia.</p><p>O <strong>Pingu Linux</strong> pode não ser uma distro para o mundo, mas certamente é um marco na minha jornada de aprendizado. Para quem está disposto a encarar o desafio, recomendo fortemente a experiência.</p><p>E você, já pensou em criar sua própria versão do Linux? Compartilhe suas experiências nos comentários! 🐧</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ab4a74437a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Model-driven development utilizando ChatGPT.]]></title>
            <link>https://medium.com/@wagner.b.rodrigues/model-driven-development-utilizando-chatgpt-209735cf080e?source=rss-33d594b68a60------2</link>
            <guid isPermaLink="false">https://medium.com/p/209735cf080e</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[inovation]]></category>
            <category><![CDATA[mdd]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Wagner Braz Rodrigues]]></dc:creator>
            <pubDate>Mon, 19 Aug 2024 20:46:14 GMT</pubDate>
            <atom:updated>2024-08-19T20:46:14.860Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introdução:</h3><p>Neste artigo, exploraremos como o ChatGPT, o modelo LLM mais popular, pode ser utilizado para gerar aplicações a partir de modelos de software. Nosso objetivo é avaliar a capacidade do ChatGPT de realizar Model-Driven Development (MDD), por meio de uma série de experimentos que combinam a geração de código automatizada com a prática do MDD.</p><h3>Sobre o MDD:</h3><p><em>Model-Driven Development (MDD)</em> é uma abordagem que coloca os modelos no centro do processo de desenvolvimento de software. Em vez de escrever código diretamente, o desenvolvedor cria diagramas e modelos que descrevem o comportamento e a estrutura do sistema. Esses modelos são então usados para gerar automaticamente o código-fonte, o que pode simplificar o desenvolvimento, reduzir erros e garantir que a solução final esteja alinhada com o design planejado.</p><h3>Experimento MDD com o ChatGPT:</h3><p>Para testar a eficácia dessa abordagem, foi realizado um experimento com um software relativamente simples: um sistema de cadastro de usuários com geração de token. O <em>prompt </em>utilizado foi mantido o mais básico possível, com o objetivo de que o <em>ChatGPT </em>extraísse as informações diretamente dos diagramas, sem o suporte de instruções textuais detalhadas, testando assim sua capacidade de interpretar modelos visuais de software. Os experimentos iniciais foram conduzidos utilizando a versão 4.0 do <em>ChatGPT “Vanilla”</em>, onde foi solicitado que o modelo criasse uma aplicação <em>Python</em> baseada nos modelos fornecidos, retornando tanto o código quanto a estrutura dos arquivos.</p><p>Como método, estabeleceu-se que o <em>ChatGPT </em>deveria gerar uma versão funcional na primeira iteração, sem possibilidade de ajustes. Após a geração dos arquivos, eles eram testados e em caso de erro, uma nova instância do chat era iniciada, e a solicitação era realizada ao prompt. Essa abordagem permitiu uma avaliação imparcial da capacidade do modelo em interpretar e executar as instruções fornecidas, sem intervenções ou correções adicionais.</p><p><em>Prompt </em>utilizado<em>“</em>crie uma aplicação <em>python</em> com base nos diagramas, retorne o codigo e estrutura dos arquivos”<em>.</em></p><h3><strong>Os modelos utilizados<em>:</em></strong></h3><p>O diagrama de sequência define o processo de cadastro de uma pessoa com a geração de um token. Primeiro, o Usuário envia ao webAPP uma requisição com nome e ID. O webAPP gera um token e insere o cadastro com nome, ID e token no MongoDB. Após a inserção ser confirmada pelo MongoDB, o webAPP retorna o cadastro completo, incluindo o token, ao Usuário.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*iXidJ3o2OpoXQ-G5_PGJWQ.png" /><figcaption>Diagrama de Sequencias do APP</figcaption></figure><p>Para o diagrama de implantação, tomamos a liberdade de incorporar alguns elementos do diagrama de classes para simplificar e unificar a visualização. O diagrama foi elaborado para representar os testes realizados em uma máquina local, utilizando WSL e Docker para a execução dos componentes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*9xnRO8vcBkBGooU4JW6pcg.png" /><figcaption>Diagrama Demonstrando o Deploy</figcaption></figure><p>Junto aos modelos, foi incluido um desenho de tela simples, para que fosse gerada uma interface para apresentar o cadastro e consulta ao usuario.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*W6aCVgXVtI3iwIFXi0jcRg.png" /><figcaption>Tela apresentando os resultados</figcaption></figure><h3><strong>Resuldados:</strong></h3><p>Github da solução criada: <a href="https://github.com/wagnerbrodrigues/mdd_chatgpt_person-registration">https://github.com/wagnerbrodrigues/mdd_chatgpt_person-registration</a></p><p>Foram necessárias 17 tentativas para que os diagramas submetidos resultassem em uma solução funcional. Os erros mais comuns foram relacionados à definição incorreta do caminho (path) de arquivos e à ausência da inclusão da biblioteca Werkzeug.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*XJ_BRchWfGnBy55nM9Q3ow.png" /></figure><h3>Um novo experimento:</h3><p>Com a quantidade de erros encontrados, ficou claro que é necessario prover um maior conjunto de informções ao <em>ChatGPT</em>. Contudo, em cenarios do mundo real, não é possivel incluir todas as informações necessarias no modelo. Seria como criar um modelo 1 para 1 de toda a TI. Para superar esses desafios utilizamos de extratégia de governança de ativos e utilização de padrões arquiteturais.</p><p>Tendo como base nossos modelos como amostragem, definimos nossos ativos tecnologicos utilizados, como <em>Python</em>, <em>Docker</em>, e as bibliotecas padrão como sendo <em>Flask, PyMongo e Werkzeug.</em></p><p>Foi adotado o padrão de design MVC (Model-View-Controller), alinhado às melhores práticas de organização de pastas para cada camada. Essa abordagem garantiu uma separação clara entre modelos, visualizações e controladores, tornando a definição dos caminhos de arquivos mais estruturada e precisa.</p><p>Com essas definições estabelecidas, foi criado e treinado um modelo no <em>ChatGPT </em><a href="https://chatgpt.com/g/g-J2ut2wDvX-model-driven-design">https://chatgpt.com/g/g-J2ut2wDvX-model-driven-design</a>. Este modelo foi desenvolvido para identificar e seguir os padrões e as diretrizes de governança previamente definidos. Os resultados a seguir, foram obtidos com o uso desse modelo treinado.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*U_OLAV9vkiHYRepZTkMI6g.png" /><figcaption>Resultados utilizando modelo treinado</figcaption></figure><p>Com o uso do modelo treinado, aliado a uma governança sólida e a padrões arquiteturais bem definidos, conseguimos melhorar significativamente a taxa de sucesso, reduzindo os erros para apenas um em cada cinco testes. Essa estratégia não só padronizou o processo de desenvolvimento, como também diminuiu drasticamente a ocorrência de falhas, tornando o fluxo de trabalho muito mais ágil e eficiente.</p><p>Github da solução criada a partir do modelo treinado: <a href="https://github.com/wagnerbrodrigues/mdd_treined_chatgpt_person-registration">https://github.com/wagnerbrodrigues/mdd_treined_chatgpt_person-registration</a></p><h3>Conclusões:</h3><p>Os mais pessimistas podem pensar: ‘Então, é o fim? Nossa TI será reduzida a diagramadores de software?’ É importante lembrar que estamos apenas explorando funcionalidades básicas, sem envolver fluxos ou regras de negócio complexas. Mesmo para modelar uma solução de complexidade moderada, é necessário um certo grau de senioridade em relação às tecnologias e ao tratamento do problema. Além disso, o MDD possui suas limitações, sendo raramente utilizado nas fases de evolução ou manutenção de código. Para um maior aprofundamento, recomendo a leitura de <em>‘Model-driven development: The good, the bad, and the ugly’</em>. No entanto, podemos utilizar essa funcionalidade para tarefas mais simples e repetitivas, como a geração de <em>CRUDs</em>, enquanto concentramos nossos esforços em problemas mais complexos e estratégicos para o negócio.”</p><p>O que ficou claro com o experimento é que, mesmo em cenários inovadores como o uso de modelos de linguagem avançados (<em>LLMs</em>), a presença de uma governança sólida e padrões arquiteturais bem definidos é essencial para alcançar bons resultados. Sem esses elementos, o desenvolvimento pode se tornar desorganizado e ineficiente. Em outras palavras, por mais promissora que seja a tecnologia, sem uma base estrutural firme, é difícil garantir consistência e qualidade nos resultados.</p><h3>Cena pós creditos:</h3><p><strong>Automatização do Processo:</strong> A ideia é simples: criar uma aplicação que envie os diagramas para a <em>OpenAI</em> e teste automaticamente os resultados. O processo continua até que a gente consiga uma versão funcional. Embora fosse possível usar algoritmos genéticos para algo mais avançado, vamos manter as coisas simples e focar no objetivo principal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*dmGiiVJWyA0NmAXRdYPs7w.png" /><figcaption>Diagrama de Sequencia, Automação geração de codigo</figcaption></figure><p>Contudo, consultando o proprio <em>ChatGPT</em>, sobre como criar a solução acima, obtem-se essa resposta:</p><blockquote>“Para utilizar a API do ChatGPT para gerar código a partir de uma descrição ou imagem, você precisará fazer algumas adaptações. Como a API do ChatGPT não processa imagens diretamente, você deve enviar uma descrição textual ou o conteúdo de uma imagem extraído através de OCR (Reconhecimento Óptico de Caracteres). A seguir está um exemplo simplificado que demonstra como você pode enviar uma descrição para a API do ChatGPT e receber um código em resposta”</blockquote><p>Dado que o sucesso do projeto depende da capacidade de o <em>ChatGPT</em> interpretar diretamente as imagens, essa limitação torna inviável a implementação completa da solução neste momento. Portanto, o próximo passo é aguardar futuras versões da API incluam essa funcionalidade, para novos testes.</p><p>Referencias:</p><ul><li><a href="https://en.wikipedia.org/wiki/Model-driven_engineering">Model-driven engineering - Wikipedia</a></li><li><a href="https://dl.acm.org/doi/10.1147/sj.453.0451">Model-driven development: the good, the bad, and the ugly: IBM Systems Journal: Vol 45, No 3</a></li></ul><iframe src="https://drive.google.com/viewerng/viewer?url=https%3A//users.ece.utexas.edu/%7Eperry/education/SE-Intro/fakeit.pdf&amp;embedded=true" width="600" height="780" frameborder="0" scrolling="no"><a href="https://medium.com/media/dd2d66db3a93622fcfffa43c818bbc5a/href">https://medium.com/media/dd2d66db3a93622fcfffa43c818bbc5a/href</a></iframe><p><a href="https://www.omg.org/mda/">MDA</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=209735cf080e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>