Introducing /supergoal: A Planning Layer for Claude Code and Codex CLI
The /supergoal plugin adds a planning and self‑healing layer to Claude Code’s /goal engine, automatically generating specifications, risk analysis, staged roadmaps, and audit checks, so developers can issue a single high‑level command and let the system handle task decomposition, execution, and verification.
Robert Courson created a plugin called /supergoal for Claude Code and Codex CLI that goes beyond simple "write a function" helpers. It tackles the tedious "confirm each step" workflow that AI coding assistants normally require.
The core distinction lies in who does the planning: /goal is the execution engine that runs a user‑provided end‑state condition, while /supergoal is a planning engine that automatically generates that condition and breaks the work into stages.
Conceptually there are three layers:
/goal – the execution primitive that needs a well‑crafted condition (e.g., "test/auth all pass and lint clean"). If the condition is vague, the run deviates.
/supergoal – performs the pre‑work that /goal does not: it scans the codebase, lists risks, reads historical memory, splits the task into N adaptive stages, writes each stage’s spec to .supergoal/ files, conducts a self‑critique and pre‑check, and finally outputs a polished /goal command.
Self‑healing + audit – an extra protocol not present in native /goal. It provides three‑strike fault tolerance (retry → generate fix spec → halt), writes memory after each stage, and after completion re‑audits the roadmap against the original plan, diffing every deliverable.
The detailed workflow looks like this:
Stage 0 – load memory and detect tools in the current environment (MCP, skills, host).
Stage 1 – decide whether the project is greenfield or brownfield; a greenfield project follows a full checklist (platform, stack, design, integration, scope…), while a brownfield project asks only 0–2 questions because the code already answers many.
Stage 2 – parallel reconnaissance of the codebase.
Stage 3 – analyze risks and recommend best practices.
Stage 4 – decompose the task into N stages (the number adapts, not a fixed five).
Stage 5 – write the complete roadmap and each stage’s spec into the .supergoal/ directory.
Stage 6 – self‑critique: check for vague goals or broken slices, fix them on the spot, then present a reviewed plan with a revision menu (start, adjust assumptions, tweak a stage, refactor a stage).
Stage 6.5 – pre‑run validation: execute mandatory commands (build, lint, test) to ensure a clean baseline environment.
Stage 7 – after all checks pass, print a ready‑to‑paste /goal <end-state condition> line; the user copies it, runs it once, and the rest proceeds automatically.
During automatic execution, a three‑strike fault‑tolerance mechanism applies: the first failure triggers an automatic retry with probe data, the second generates a fix spec and runs it, and the third halts and hands over the full probe history to the user.
Each stage also writes memory entries (e.g., hidden API pitfalls, user preferences, project facts) so future similar tasks can read them directly.
Finally, a comprehensive audit compares the actual outcomes against the original roadmap, re‑runs required commands, and verifies that every deliverable truly materialized (including uncommitted changes). Only after passing this audit does the system emit SUPERGOAL_RUN_COMPLETE.
/goal gives you "automatic run"; /supergoal gives you "plan first, self‑heal when off‑track, and verify after completion". Use /goal for quick fixes, but for greenfield projects or large refactors, /supergoal saves the mental effort of writing conditions and stage breakdowns.
Installation
Three commands inside Claude Code:
/plugin marketplace add https://github.com/robzilla1738/supergoal.git
/plugin install supergoal@supergoal
/reload-pluginsFor Codex CLI, clone the repository manually into the skills directory.
GitHub repository: https://github.com/robzilla1738/supergoal
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
AI Engineering
Focused on cutting‑edge product and technology information and practical experience sharing in the AI field (large models, MLOps/LLMOps, AI application development, AI infrastructure).
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
