SWAMP CLUB

How to build a software factory

// summary //

tl;dr

  • You stop writing the software
  • Instead you build the system that writes it
  • Build the factory: architecture, adversaries, tests, UAT, shipping
  • Iterate until you trust it
  • Use the time you get back to talk to each other and your customers
  • Go be the most creative you've ever been

// what is a software factory //

The socio-technical system by which software is produced and shipped to users

// what is a software factory //

You already have a software factory

// the agile manifesto //

Individuals and interactions over process and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan

// swamp's ai software factory //

Swamp's Software Factory

// how did we do that //

We are incredibly agile

We communicate constantly
Working software in hours
We collaborate with customers directly
We respond to change immediately

// the secret //

Maximum creativity

// the near future //

You will also work this way

Anything else is an unacceptable business risk

// scale //

It will break your organization

Mythbusters, Season 5, Episode 89

// get ahead of it //

How to build a software factory

01Green field

02Brown field

// still an engineer, don't worry //

Your role

  • Define outcomes
  • Engineer the factory
  • When the outcomes are bad, improve the factory

// outcomes are what matters //

Output vs Outcome

// measuring outcomes //

Measuring outcomes

The best way is to interact directly with the stakeholder — a user or a customer

// prompting //

Outcomes are good prompts for factories

implementation ✗

>Write a method to store cookie consent

outcome ✓

>Add a GDPR and ePrivacy compliant cookie consent banner

// building trust //

Building trust

Real trust comes from people (and systems) doing what they say they will do — over and over

// skills are context //

Skills don't build trust

// you trust software //

Use agents to build trustworthy systems

  • Build software
  • Skills explain how
  • Call into intelligence

// not one shot //

Engineering is still engineering

Iteration is critical

// emergent vs designed //

Software architecture

// choose your style //

Start with Software Architecture

  • Build an architecture skill
  • Give it the pattern's vocabulary
  • Add language-specific examples of each pattern
  • Consistency is vital

// from swamps ddd skill //

Value Object

Immutable, equality by value — readonly fields, a private constructor with a static factory

export class Money {
  private constructor(
    readonly amount: number,
    readonly currency: string,
  ) {}

  static create(amount: number, currency: string): Money {
    if (amount < 0) throw new Error("Amount cannot be negative");
    return new Money(amount, currency);
  }

  add(other: Money): Money {
    if (this.currency !== other.currency) {
      throw new Error("Currency mismatch");
    }
    return Money.create(this.amount + other.amount, this.currency);
  }

  equals(other: Money): boolean {
    return this.amount === other.amount && this.currency === other.currency;
  }
}

// your standards //

Adversarial skills

for example

Testing Security Accessibility UX design Observability

// what to do, and how to do it //

Planning phase

// build the factory //

Building your factory

Ask the agent to write the software or use Swamp

describe the outcome

>Make me a software factory using Swamp. Start with an initial prompt, then we discuss the feature. When I tell you, write a plan, then review it against my software architecture skill and [adversaries], surfacing only critical recommendations. Fold any critical feedback back into the plan and rework up to 5×, then show me the final plan for approval.

// write the code //

Implementation & testing

>Improve the factory so that after a plan is approved, you write the code with appropriate test coverage based on [test skill], then ensure all tests pass. If any are failing, rework the software until they pass — up to 5 times.

// review the code //

Code review

>Improve the factory to do a comprehensive code review after implementation and testing — checking compliance with the software architecture and [adversarial skills], surfacing critical issues. If there are any, go back to implementation and resolve them, feeding the previous findings into the next review. Do this up to 5 times.

// take it for a spin //

Build a first slice

first slice

>Use the software factory to start an application that does [X]. Help me design a good minimal first page and development environment, using my software architecture, design, and testing skills.

  • Examine the outcome — fire it up, how does it feel?
  • Spot check the output — recognize the architecture? is coverage right?
  • Iterate — tweak the skills, run it again, until you trust it

// package it up //

Production artifacts

>Improve the factory so that once a change is approved and merged, you build the production artifact — a [binary / container / static site] — and store it in [s3 / docker hub] where everyone can reach it.

// prove it works //

User Acceptance Testing

  • Start another factory: black-box UAT environment, built from production artifacts
  • Enables safe refactoring and avoids regressions

// invest in uat //

UAT is key to refactoring

// all together now //

The whole factory

// keep extending //

Next steps

  • Extend it all the way to production deployment
  • Consider a "fast lane" for simple tasks
  • Refactor when bugs or features get brittle

// existing codebases //

Brown-field strategy

No standard factories

Never be blocked

Share with each other

Embrace your creativity

// tl;dr //

  • You stop writing the software
  • Instead you build the system that writes it
  • Build the factory: architecture, adversaries, tests, UAT, shipping
  • Iterate until you trust it
  • Use the time you get back to talk to each other and your customers
  • Go be the most creative you've ever been

// get a recording //

QR code linking to the talk recording
EMAIL
::adam@swamp-club.com_

Join the Swamp Discord discord.gg/swamp-club