All CUJ Case Studies
Critical User Journey Case Study

The CUJ Engineering Framework: Eliminating Speculative Code Through Autonomous Agent Workflows

📅 2026-09-02 👤 Daniel Herrington
GitHub Repository
The CUJ Engineering Framework: Eliminating Speculative Code Through Autonomous Agent Workflows Hero Graphic

A product-driven engineering framework and agentic skill that captures real-world user friction via standardized Mad Libs formulas and autonomously translates them into secure, verified production pull requests.


The Problem Space

Context

Modern software engineering has reached unprecedented development velocity through LLMs and AI coding assistants. However, while generating syntax is now near-instant, the bottleneck has violently shifted upstream to product discovery, user intent capture, and validation.

Engineering teams oscillate between two failure modes:

  1. The Speculative PRD Trap: Product managers spend 3–4 weeks drafting 25-page Product Requirement Documents (PRDs) packed with assumptions, edge-case conjecture, and bloated roadmap items that are obsolete before the first sprint concludes.
  2. Ungrounded "Vibe Coding": Developers rapidly spin up prototypes based on internal gut feeling or vague feedback, producing technical solutions to problems no real user actually experiences.

The Core Friction

Traditional telemetry and bug trackers (Sentry, Jira, Datadog) capture system crashes and HTTP 500s, but they are fundamentally blind to user intent blockages:


The Meta Critical User Journey (CUJ)

Applying the CUJ methodology recursively to product engineering itself reveals the core journey required to bridge user pain and software delivery:

CUJ 1: Autonomous Translation of Friction to Verified Code

CUJ 2: Frictionless Drop-In Intake Across Any Project


The Ideal Flow

sequenceDiagram
    autonumber
    actor User as End User
    participant App as Web App / /cuj Widget
    participant API as /api/cuj Endpoint
    participant GH as GitHub Issues (cuj-report)
    participant Agent as CDD Autonomous Agent
    participant Sec as Security Evaluator
    participant Git as Git Repo / Branch

    User->>App: Submits Mad Libs ("I want to [X] while avoiding [Y] so that [Z]")
    App->>API: POST /api/cuj (payload)
    API->>GH: Creates Issue with [cuj-report] label
    Agent->>GH: Ingests open CUJ issue
    Agent->>Sec: Runs Machine Review (Prompt injection & Auth checks)
    alt Security Pass & Feasibility >= 80%
        Agent->>Git: Checkouts branch: cuj/issue-42-feature
        Agent->>Git: Writes code, tests, & verifies locally
        Agent->>GH: Opens Draft Pull Request ("Closes #42")
    else Security Flagged
        Agent->>GH: Labels [cuj:security-flagged] + posts threat audit
    end

The CUJ-Driven Development (CDD) Agent Skill

To operationalize this framework across repositories, we formalized CUJ-Driven Development into a reusable agent skill (.agents/skills/cuj-driven-development/).

The Standardized Intake Formula

Every piece of user friction is reduced to the canonical Mad Libs structure:

"I want to [Do X] while avoiding [Friction Y] so that I can [Benefit Z]."

This prevents feature dictation ("Add a drop-down menu here") and forces the focus onto Action, Pain, and Desired Outcome.

Three Execution Modes

Execution ModeTarget Use CaseAutomation LevelSecurity & Approval Gate
Turbo ModeInternal tools, rapid hackathons, local scripts100% AutonomousBaseline sandbox isolation; immediate branch & PR generation.
🛡️ Machine Review ModeDefault production web apps, OSS reposMulti-Agent GuardrailsEvaluates prompt injection, auth bypass, and privilege escalation. Auto-opens PR if Safety = 100%.
👤 Manual Review ModeRegulated industries, fintech, core infrastructureHuman-in-the-LoopGenerates Threat & Architecture spec, comments on GitHub Issue, and pauses for human confirmation.

Real-World Implementations

We use the CUJ framework across multiple production systems and open-source tools:

  1. Plex Media Hub Hub: Installed the .agents/skills/cuj-driven-development/ skill, /api/cuj FastAPI backend, and in-app modal to capture library and watchlist gap friction.
  2. Local Meeting Scribe: Solved the multi-meeting speaker diarization gap with 256-dimensional acoustic voiceprints, local privacy, and zero API token costs.
  3. American Airlines Household Loyalty: Addressed the single-earner spend bias in co-branded credit card programs.
  4. Google Calendar Schedule Helper: Automated zero-latency cross-timezone meeting slot proposal generation.

Try It Live: Submit a CUJ on This Framework

Test our live CUJ intake component directly below. Submissions demonstrate how raw user friction is captured in standardized format:

Live Interactive Widget

How is our CUJ Framework or Site Underserving You?

Share where you experience friction in AI product workflows or this site:

Have thoughts on this CUJ or framework?

Let's discuss product strategy, machine learning engineering, or system architecture.

Connect on LinkedIn Explore Other CUJs