Make the agent
ask first.

AB Method is a workflow for Claude Code and Codex. Before any code is written, it questions your problem until the plan is sharp. Then it builds that plan one tested mission at a time, and puts critics on both sides of the change.

npx ab-method
Walk through a task
Every mission fails its test before it passes.

One task, start to finish

A customer asks to pause their subscription instead of cancelling it. Make the calls the method puts to you, and watch the files it writes as you go.

You describe the problem in a sentence.

You
/create-task Customers want to pause their subscription for up to three months instead of cancelling.

Files the method writes will appear here. Send the request to start.

Pick the size of the work

All three start with the same grilling. They differ in how much runs without you.

A task /create-task
One feature or fix, split into missions. You run them one at a time and stay in the loop, or hand the whole task to /start-task and review the commits afterwards.
A goal /create-goal
One objective with a stop condition a machine can check. The same grilling produces a prompt for an autonomous /goal loop that keeps its own tracker.
A roadmap /create-roadmap
Several tasks that depend on each other: the schema before the API before the UI. Questions nobody can answer yet stay open on the map instead of being guessed.

Commands

Slash commands in Claude Code. In Codex, call the matching skill, such as $ab-create-task, or just describe what you want.

Plan

/mastermind
Not sure where to start? Describe it and get routed.
/create-task
Grill a problem into a task with test-driven missions.
/create-goal
Write the prompt for an autonomous /goal loop.
/create-roadmap
Split a bigger idea into ordered tasks.
/extend-task
Add missions to a task that already exists.

Build

/resume-task
Pick a task up where its tracker left off.
/start-task
Run every remaining mission unattended, one commit each.
/start-roadmap
Run a planned roadmap in dependency order.
/test-mission
Add tests to code that wasn't written test-first.

Keep docs current

/analyze-project
Write the domain glossary, context and pattern docs.
/update-architecture
Refresh those docs after a big change.
/ab-cleanup
Compact docs back to budget and clear task leftovers.

Install

Into your project

Copies the workflows, skills and commands into the repo, so your whole team gets the same version.

npx ab-method

As a plugin

Nothing is copied into the repo, and the plugin updates on its own. In Claude Code:

/plugin marketplace add ayoubben18/ab-method
/plugin install ab-method@ab-method

Codex uses codex plugin marketplace add and codex plugin add with the same names.