Category: Uncategorized

Software Factory – Evolving it

There is a trend to offload to AI as much work as possible. It has taken different forms, from AI native teams, to sub-agents, loop engineering, you name it.

This month’s trend is ‘Software Factory’ (next month will be a new one). But here the concept is simple. Treat the production of software like a production line, where agents work on the line with minimal supervision from humans.

It’s not a new idea, but now with LLMs and coding agents, it’s been taken to a new level.

Based on my experience, this concept is ok, but falls short because software doesn’t just die when you close your last task. It’s alive, requires maintenance and it evolves with time.

If we think in a car manufacturer, the production line is not the only thing the company needs, it also needs distribution, maintenance, security, etc. The same applies to software, you’ll have bugs and incidents, need new features and security updates, and need to keep the knowledge of why it all works.

For me a software factory just produces code, that part is now cheap. A high-performing team uses to produce that code, but also did lots of steps before (specs, dependencies, teams coordination) and especially after (on-call, better engineering, security updates). And during all those extra steps, there is knowledge that is being forged, something that helps engineers avoid mistakes, train new people to run the projects and it’s the collective glue that makes things happen.

On top of that, running live software requires decisions. Some are taken by agents, others by humans, depending on the blast radius.

But whoever makes the decision, the accountability is always human. Agents can write the code, fix the bug or roll back the release, but they can’t own the outcome. Every product has a person who answers for it: someone who decides how much the agents can do on their own, and who takes responsibility when something goes wrong.

It’s not a factory any more, it’s a Software Shipyard. A factory’s job ends when the car leaves the line. A shipyard builds a ship, then keeps bringing it back to repair, refit and upgrade it for decades, while its logbook records everything that happened at sea. That’s what software needs: not just a line that produces it, but a place that keeps it seaworthy.

A Software Shipyard is how a team builds, runs and keeps improving its products over their whole lives, with agents doing much of the work and a shared memory so people still understand what they own.

My LLM-coding benchmark

Embracing AI Technologies in My Coding Journey

As a firm believer in the potential of artificial intelligence, I am excited to share how AI technologies can significantly enhance productivity for both companies and individuals. In my personal projects, I often find myself creating versions of web applications, leveraging my background in Node.js, TypeScript, and various flavors of React. Each new project starts with the same desire for a solid foundation—specifically, a monorepo structure for the backend and frontend that includes the best practices and guardrails for efficient development.

Traditionally, a variety of generator tools exist to help set up this scaffolding. However, in today’s era of AI, I decided to take a different approach. I now rely on my coding agent to help build that essential foundation for me. The results, however, can be quite unpredictable. This variability inspires me to take a more hands-on role in crafting the prompts I use when interacting with different coding agents.

Crafting the Perfect Benchmark Prompt

Over time, I’ve learned that the key to getting the most out of my AI tools lies in the specificity and clarity of your prompts. I aim to design a prompt that effectively communicates my requirements for a greenfield project, preparing the coding agent to generate the desired scaffolding with precision.

Here’s what I’ve found works well in my prompt:

  1. Project Structure: I specify the type of project and the technologies I want integrated, such as Node.js, TypeScript, and React.
  2. Monorepo Setup: I highlight the need for a monorepo to keep both the backend and frontend organized under a single repository.
  3. Best Practices: I include requests for coding conventions and safety measures—like linters and testing frameworks—to ensure a high standard of quality from the outset.

A positive outcome for the prompt will be a base skeleton, with the correct project structure, where I can run basic commands to check the health of the code base.

Personally, in this new AI era, I found extremely helpful to setup strict guidelines and be opinionated on how you want to accept code into your code base.

The Prompt

# Task: Create a Production-Ready Node.js Monorepo

Create a complete Node.js monorepo from scratch for a full-stack web application. The monorepo should contain a backend API and frontend client with all modern development tooling configured. The result should be a working skeleton for start developing a modern web app.

## Requirements

### Project Structure
- Set up a monorepo using yarn and yarn workspaces
- Create three packages: `backend`, `frontend`, and `shared`
- Backend: Express.js API with TypeScript
- Frontend: React/Next.js application with TypeScript
- Shared: Common types, utilities, and configurations

### Development Infrastructure (Critical - This is what most agents fail at)
1. **TypeScript Configuration**
   - Root tsconfig.json with project references
   - Individual tsconfigs for each package
   - Proper path mapping between packages

2. **Code Quality Tools**
   - ESLint configuration with TypeScript support
   - Prettier for code formatting
   - Different lint rules for frontend (React) vs backend

3. **Git Hooks & Automation**
   - Husky for git hooks
   - lint-staged for pre-commit linting
   - Proper commit message validation

4. **Testing Infrastructure**
   - Jest configuration for both packages
   - Supertest for API testing
   - React Testing Library for frontend
   - Coverage reporting

5. **Build & Development Scripts**
   - Concurrent development servers
   - Production build process
   - Type checking across all packages

### Functional Requirements
- Backend: Create 3 REST endpoints (GET /health, POST /users, GET /users/:id)
- Frontend: Basic React components that call the backend API
- Shared: Common TypeScript interfaces for API contracts
- All endpoints should have proper TypeScript types
- Include basic error handling and validation

### Configuration Files Required
- package.json (root + each package)
- tsconfig.json (root + each package)  
- .eslintrc.js with proper overrides
- .prettierrc
- jest.config.js (for each package)
- .husky/pre-commit hook
- .gitignore
- README.md with setup instructions

## Success Criteria
The final project should:
1. Install dependencies without errors
2. Pass all linting and type checking
3. Run concurrent dev servers with `yarn run dev`
4. Execute all tests successfully
5. Build production bundles without errors
6. Pre-commit hooks should work correctly
7. Frontend should successfully call backend API

## Bonus Points
- Docker configuration
- GitHub Actions CI/CD
- Environment variable management
- API documentation with OpenAPI/Swagger
- Database integration setup (without actual DB)