Stop shipping code you can't explain.

We built Struggle AI around one belief: removing all friction from coding makes it easier to ship code you do not actually own.

Our Thesis

The best coding tools should not remove every obstacle. They should add deliberate cognitive friction at the moments where learning, ownership, and architectural clarity are at stake.

npm install -g @struggle-ai/cli
zsh — struggle
struggle init project-alpha
Analyzing architecture...
? Struggle: Before we generate the API, how do you plan to handle state persistence?
1) Redis (In-memory cache)
2) PostgreSQL (Relational)
3) I haven't decided yet
1
? Struggle: Excellent. Why Redis over a traditional SQL database for this specific microservice?

The Crisis of Abstraction

AI can write your code.
But can you explain it?

"Ghost in the Machine"

Most developers today cannot debug what AI generates. We are becoming curators of magic boxes rather than architects of systems.

Velocity vs. Understanding

Shipping 10x faster is useless if you're 10x slower at fixing the inevitable edge cases because you don't understand the logic underneath.

Why This Is Friction

We are not using friction as delay. We are using friction as a tool for comprehension.

Interpretation

Friction here is cognitive and educational, not mechanical slowdown.

Stance

Some friction in coding is not a bug. It is a feature when ownership is at stake.

Claim

A codebase you cannot explain is not productivity. It is dependency.

Think Before You Build

Struggle AI asks the right questions before writing any code — so you understand what you're building, not just copy it.

The point is not to slow you down everywhere. The point is to slow you down exactly where understanding would otherwise be skipped.

Build me a rate-limiting middleware for Express.

Understood. But first: How should the system behave when a user exceeds the limit? Should we drop requests silently, or return a 429 with a 'Retry-After' header?

429 HeaderSilent DropQueue & Delay
429 with header. We need to be transparent with API consumers.
middleware.js
const rateLimiter = (req, res, next) => {
  const { limit, current } = checkLimit(req.ip);
  if (current > limit) {
    res.set('Retry-After', 60);
    return res.status(429).json({ error: 'Too many requests' });
  }
  next();
};

Three Modes. One Goal: Understanding.

From deep reasoning to fast execution — choose how you learn.

Full Socratic

High friction, deep thinking. Struggle will refuse to generate code until you successfully explain the architectural trade-offs of your request.

Maximum Learning

Guided

Balanced approach. AI generates code alongside a "Logic Map" that explains the 'Why' behind every function and variable choice.

Recommended

Standard

Fast but reflective. Code is generated immediately, but you must complete a 15-second logic quiz to unlock the 'Copy to Clipboard' action.

Efficiency Focus

The Learning Trail

Every session can leave behind a living project artifact that records what you learned, which decisions you made, and which trade-offs you accepted.

Proof of Understanding (PoU)
Decision Logs
Context Awareness
STRUGGLE_LEARNING_TRAIL.md

Project: Auth-Bridge

This document tracks the technical evolution of Auth-Bridge. Decisions made through Socratic dialogue.

Decisions & Trade-offs

JWT vs Session Cookies

Chose JWT because the system needs to be stateless for horizontal scaling. Acknowledged security risk: No easy way to revoke tokens without a blacklist.

Knowledge Checkpoints

  • Explained the difference between symmetric and asymmetric encryption.
  • Mapped the OIDC handshake flow from scratch.
  • Identified why bcrypt is preferred over SHA-256 for password hashing.

Code Reference

auth-middleware.ts
// Derived from Dialogue #42
export const verifyScope = (token) => {
  // Logic for scope verification explained by user in PoU check.
};

Deliberate Progress

The Struggle Workflow

Struggle is not trying to slow down everything. It inserts friction at the exact points where reasoning, trade-offs, and ownership would normally be skipped.

1
Step 1

Ask

Start with a real problem, not a vague vibe. Bring the request into the CLI and make the target explicit.

2
Step 2

Think

Struggle pushes back with clarifying questions so architecture, boundaries, and trade-offs are surfaced early.

3
Step 3

Build

Implementation moves forward only after the plan is coherent enough to own, defend, and verify.

4
Step 4

Export

Leave with code plus a Learning Trail that captures what you understood, not just what was generated.

Take A Stance

Start building things you actually understand.

If AI is going to write with you, it should also force you to think with it. Install Struggle and make comprehension part of the workflow again.

Install CLI
Terminal First
$ npm install -g @struggle-ai/cli

Use AI as a mentor, not a vending machine. Ship the code and the reasoning behind it.