Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍈 MELON

Mind Elon (Make Everything Lean, Optimized & Necessary) — a first-principles engineering and prompt review protocol based on Elon Musk's 5-step engineering algorithm.

Also answers to "Mind the step" and "Use your melon" (humor setting: 85%).
"The most common mistake of a smart engineer is to optimize a thing that should not exist."

MELON is an adversarial review protocol for AI coding agents and engineers. It operationalizes Elon Musk's 5-step algorithm coupled with red-team personas and pre-mortem stress testing to ruthlessly prune complexity, eliminate bogus requirements, and optimize iteration velocity across codebases, architectures, pull requests, and LLM prompts.


🥊 The Core Framework

flowchart TD
    Target["Target: Code / PR / Architecture / Prompt"] --> CrossExam["🥊 Adversarial Cross-Examination"]
    CrossExam --> S1["1. Question Requirements\n(Make them less dumb & find the named owner)"]
    S1 --> S2["2. Delete Aggressively\n(If you don't add back 10%, delete more)"]
    S2 --> S3["3. Simplify & Optimize\n(Only what survived deletion. Flat > Nested)"]
    S3 --> S4["4. Accelerate Cycle Time\n(Sub-3s local feedback loops & tracer bullets)"]
    S4 --> S5["5. Automate / Orchestrate\n(Only proven, streamlined steps)"]
    S5 --> PreMortem["💀 Pre-Mortem Stress Test & Action Matrix"]
Loading

The Adversarial Personas

  1. The Chief Deletion Officer (The Skeptic / Red Team):
    • Stance: Presumes every requirement, file, endpoint, abstraction, and prompt rule is waste until proven essential.
    • Motto: "The best part is no part. The best line of code is no line. The best token is no token."
  2. The Velocity Pragmatist (The Shipper):
    • Stance: Attacks academic refactors, premature automation, complex multi-agent DAGs, and slow pipelines.
    • Motto: "If the design takes too long, the design is wrong. Ship the tracer bullet."

🎯 Review Targets

  • Codebases & Architecture: Flatten unnecessary factory patterns, single-use abstractions, and speculative middleware.
  • Pull Requests & Diffs: Catch scope creep, defensive rule-stacking, and unverified edge-case scaffolding before merging.
  • LLM Prompts & Agent Systems: Prune prompt bloat, eliminate contradictory negative constraints, and replace complex multi-agent DAGs with simple, testable single-prompt functions.

⚡ Installation & Setup

Because Melon is a pure markdown protocol (skills/melon/SKILL.md), it works natively in any AI agent environment without runtime dependencies or package managers.

🤖 1. The Agentic Way (Zero-Config / Recommended)

Pass this repository directly to your AI agent (Antigravity, Claude Code, Cursor, Windsurf, Cline, Aider):

"Install the Melon skill from https://github.com/jdiazromeral/melon into our agent configuration / project."

Your agent will automatically detect its own configuration path and link or copy skills/melon/SKILL.md.


🛠️ 2. The Manual Way

If you prefer setting it up by hand:

  • Antigravity CLI (agy):

    git clone https://github.com/jdiazromeral/melon.git ~/.gemini/config/plugins/melon

    Or per-project:

    mkdir -p .agents/skills/melon
    cp skills/melon/SKILL.md .agents/skills/melon/
  • Claude Code:

    mkdir -p ~/.claude/commands
    ln -s "$(pwd)/skills/melon/SKILL.md" ~/.claude/commands/melon.md
  • Cursor IDE / Windsurf / Others:

    mkdir -p .cursor/rules
    ln -s "$(pwd)/skills/melon/SKILL.md" .cursor/rules/melon.mdc

🚀 How to Run an Audit

  • In Claude Code: /melon review the authentication flow in src/auth/
  • In Antigravity CLI: activate_skill melon or "Run melon against this PR"
  • In Cursor IDE: @melon audit our system prompt in prompts/system.md
  • Deep Subagent Strike: "Run melon --deep on our database migration architecture"
  • In Any Chat / Web Agent: Paste skills/melon/SKILL.md into your custom instructions or prompt.

📋 The 5-Step Protocol

"Sequence is everything. The algorithm must be applied strictly in order:"

  1. Question Requirements: Every constraint must have a named owner. Attack the premise. Why does this problem need solving at all?
  2. Delete Aggressively: The 10% Benchmark (if you don't restore ~10%, you weren't aggressive enough). Avoid the Mock Trap: Never prune boundary glue (shell wrappers, env vars, IPC, entrypoints) based solely on mocked unit tests—verify unmocked black-box seam coverage first.
  3. Simplify & Optimize: Only simplify what survived Phase 2. Apply Zen of Python ("Simple is better than complex", "Flat is better than nested").
  4. Accelerate Cycle Time: Progress = Iteration Cadence × Number of Iterations. Enforce sub-3-second local verification loops.
  5. Automate (The Final Step): Never automate chaos. Automate only stabilized, proven steps.

💀 Mandatory Pre-Mortem Scorecard & Output

Every Melon review concludes with a structured scorecard and these 3 pre-mortem questions:

  1. The Bogus Requirement Test: What is the strongest case that this entire effort is solving the wrong problem?
  2. The 6-Month Failure Mode: If this system breaks or causes developer misery 6 months from now, what component was responsible?
  3. The 10% Solution: How would a 10x smaller team implement this in 1 afternoon using 10% of the code or tokens?
# 🍈 Melon Analysis: [Target]
## 🥊 Adversarial Cross-Examination (Chief Deletion Officer vs. Velocity Pragmatist)
## 1. Requirement Sanity Check
## 2. Deletion Target List (The 10% Cut & Seam Verification)
## 3. Simplification & Minimal Viable Core
## 4. Iteration & Acceleration Plan
## 5. Automation Recommendations
## 💀 Pre-Mortem Stress Test
## 🚀 Executive Summary & Action Plan (Kill List & Next Tracer Bullet)

🧠 Conceptual Lineage & Acknowledgments

  • The 5-Step Engineering Algorithm: Conceived by Elon Musk and battle-tested across SpaceX and Tesla engineering programs.
  • The Melon Protocol: Operationalized by Javi Diaz into an adversarial agent protocol, adding Red Team agent personas, LLM prompt-auditing heuristics, and pre-mortem stress testing for AI pair-programming workflows.

📄 License

GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). See LICENSE for details.

About

Adversarial first-principles engineering and prompt review protocol based on Elon Musk's 5-step algorithm

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors