Skip to content
ForichokPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

decide

Your agent asks on a page. You answer in clicks.

A plugin for Claude Code and OpenAI Codex: a skill plus a local MCP server. When the agent needs you to choose, you get a page with the questions, the options, the agent's pick with its reason, and pictures of what you're choosing between. For a longer interview, /decide:swipe deals a deck of two-answer cards you clear with the arrow keys. No more walls of numbered questions in chat.

test license: MIT Claude Code plugin Codex plugin dependencies: 0

Install · When to use it · Screens · Swipe interview · How it works · FAQ

decide-launch-readme.mp4

The problem

You ask the agent to build a screen. Before it starts, it posts six numbered questions with options a–c, two of them about things you've never heard of. You reply "1b, 2 — what's a flag? 3 idk, 4 all of them?". The agent guesses the rest. It couldn't show you the three layouts it had in mind, and it can't tell which of your answers were real and which were "sure, whatever".

decide moves that exchange to a page built for it.

Answering in chat Answering in decide
Six questions at once A numbered wall; you reply "1b, 2 yes, 3 ?" One card per question, one click each, or the digits 1–9
Seeing what you choose Text descriptions Screenshots, clickable HTML mockups, before/after sliders, video, diffs, tables, charts
"What does this mean?" A new message, and the other answers wait Ask under the question; the agent answers right there while you go on
Questions you don't care about The agent guesses The recommendation or no answer, you choose; it knows you didn't pick it
Next week Scroll up and hope Every decision is kept per project, and the agent checks before asking again

Claude Code's built-in question picker (AskUserQuestion) is fine for one quick choice: it takes up to four questions with two to four options each. decide is for the rounds that need more than that.

When to use it

  • You're about to start a feature and the agent has a list of questions for you.
  • The choice is visual: two layouts, three card designs, before and after.
  • Something is hard to undo, like a migration, a public API or pricing, and you want the agent's reasoning next to every option.
  • The request is still vague, and the agent should interview you before it writes code. For a short interview, /decide <topic>; for a thorough one with dozens of small questions, /decide:swipe.

Keep a single yes/no in chat. decide is for two or more choices that change the result.

How

The agent asks six questions in the terminal, decide opens them as a page, the user picks options, asks the agent about one of them, presses Done, and the agent carries on with the exact answers

  1. Type /decide in Claude Code or $decide in Codex. Most of the time you don't have to: the agent opens decide on its own when a task has open choices.
  2. A tab opens with every question. Click, or use the keyboard: 1–9 picks, J / K moves, ? lists the rest.
  3. Not sure about a question? Ask under it. The agent answers on the page with text, a screenshot, a diagram or code.
  4. Press Done. The tab closes, and the agent gets your answers and carries on.

Screens

The page follows your system theme and your browser's language (English or Russian).

Options with a recommendation. Each one has pros, cons and metrics. The agent marks its pick and says why. A question with three options, the recommended one highlighted with its reason, pros, cons and metrics Mockups side by side. Click a picture to open it full size. Three home screen mockups compared in columns
Live mockups. The agent's HTML runs in a sandboxed frame, so you can click around before you approve it. A live HTML mockup of a task card with approve, reject and approve-with-changes options Diagrams. A mermaid chart shows where each option leads. A rollout question with a flowchart of the three ways to release
Ask under the question. The agent's answer lands right below yours. The user asks whether reminders need a server, and the agent's reply appears under the question Check before sending. Unanswered questions are highlighted. The agent takes its recommendation there or leaves them open, or you go back and fill them in. The review dialog listing every answer, with unanswered questions highlighted and a choice of what the agent does with them

What the agent gets

One line per question, plus a JSON file with every detail. Each line says whether the answer was yours or the agent's own recommendation, so it knows what you actually decided.

The done screen: the agent has your answers, the tab closes in 4 seconds, and the digest the agent receives

Follow-up rounds open in the same tab. The page also shows whether the agent is still listening: if it stepped away, your answers are saved and the page gives you a one-line message to send it.

Swipe interview

/decide:swipe <task> is for the start of a bigger piece of work, when the agent needs many small answers rather than a few big ones. Every card is one plain question with two answers, and you go through them with the keyboard:

Key Does
← / → Picks the left or the right answer
↑ Skips the card
↓ Asks the agent to explain the card
Enter Opens a box for your own answer
Backspace Takes the last answer back
Esc Stops and builds the brief

To the left of the deck the agent keeps a brief: the goal, then decisions, risks, conflicts and open questions. The bar on top shows how well the agent thinks it understands what you want.

When neither answer fits, press Enter or click "Neither — my own answer" under the two sides, and type what you want. The agent gets your words with the next batch.

A card asking who the first version is for, with the user's own answer typed under the two sides: 'Both: one person now, sharing later without a rewrite' A swipe card asking which home screen to build, with a list and a board mockup as the two answers; on the left, the brief with three decisions, one risk and one open question

The agent reads your answers in batches of a few while you keep going. After each batch it rewrites the brief and changes the deck: it drops cards your answers made moot, rewrites unclear ones and adds follow-ups. A follow-up goes right behind the card you're on and says which answer brought it up. The card in front of you never changes under your hands, and answers the agent hasn't read yet show in the brief as "Not in the brief yet".

A follow-up card, 'Because you answered: Yes, sync later', asks which edit wins when a task changes on two phones offline; the last answer waits in the brief under 'Not in the brief yet'

What a card can show

Besides screenshots, mockups, diagrams and code, a card can carry the kinds below. The agent puts one thing on the card, or one version on each side. The same kinds work in /decide rounds: on questions, on options and in the agent's replies.

Before and after. Drag the divider across today's screen and the new one. A card asking whether to ship the new pricing page, with today's page and the redesign under one draggable divider Video. Short clips loop muted, so you see an animation or a gesture without pressing play. A card asking whether to teach the swipe gesture with a clip, showing the clip above the two answers
A mockup on each side. Each side's HTML mockup is laid out at phone width and scaled into its tile. The corner button opens it full size. A card asking how dense the task list should be, with a compact and a roomy list mockup as the two answers Diff. Two versions of code side by side, changed lines paired and the changed part marked. Phones get a unified view. A card asking whether to ship a new date parser, with a side-by-side diff of the old and new parse.js
Facts and charts. Markdown with a table and a quote under the question, and a chart on each side. Both charts use one scale. A card asking whether to price Pro at $8 or $12, with a table of test results, a quote, and a revenue bar chart on each side Line charts. For a trend over time; each line is labelled at its end. A card asking whether to send the digest daily or weekly, with a line chart of opens per 100 emails for both
Tables. For a few facts per answer, such as plan limits. A card asking which free plan to offer, with a table of limits on each side Dig deeper. At the end, leave a note and ask for a stricter round. The agent comes back with harder questions about what is still open, starting with your note. The end of the deck: the agent has no more questions, a note asking to dig into offline sync, and the Dig deeper and Finish buttons

Click any chart, table, diff or mockup to open it large; Esc closes it. Pictures and mockups for the next two cards load ahead, so the deck doesn't stall on a heavy card.

When the deck runs low, the agent adds more or tells you it has enough. You can then finish, or press Dig deeper with a note on what still feels thin. On finish the agent shows you the brief in chat, with your note in it, and asks whether to start. The decisions go into the project journal, so /decide history finds them later.

Asking someone else

Sometimes the answer belongs to a person who isn't at your machine: a designer, a client, the rest of the team. Ask the agent to export the round. You get one .html file with the page, the pictures and the mockups inside it. Whoever opens it answers from disk in any browser, with nothing to install and no server. Done asks for their name and saves an *.answers.json, which they send back.

Hand those files to the agent and it imports them. One file settles the round as if it was answered here. Several files settle nothing: the agent gets each person's answers side by side and a list of the questions where they disagree, and asks you how to resolve them.

An exported file can't attach files, and the agent can't answer questions inside it. Diagrams need the network once to draw; offline they show their source.

Decisions over time

Every answered round goes into the project's journal. The journal page (the clock button in the header, or "Open the journal" on the idle screen) lists them with search and filters by kind and status.

When a new round asks about something a decision already settled, the agent is told which earlier answer it may contradict. If you now decide otherwise, it marks the old decision superseded: the journal keeps it, crossed out, with the round that replaced it.

To keep a decision in the repository, ask for an ADR. The agent writes docs/decisions/NNNN-title.md with context, options, the decision and its consequences. Superseding the decision later updates its status there too.

Smaller things in 2.1

  • A time budget. A spec can say the user has five minutes. The page asks what fits, by priority, and lists the questions it left out, so the agent knows what it still has to decide.
  • Questions only you answer. Such a question never gets the agent's recommendation filled in and has no "Agent decides" button. Done waits until it has an answer.
  • Hesitation. In a swipe interview, a card you looked at for a long time or answered twice reaches the agent marked "not sure or hesitated".
  • Mockup widths and pins. A mockup switches between 375, 768 and 1440 px. Two HTML mockups compare live under one divider. You can pin notes to points on a mockup; the pins go into your answer.
  • Inline HTML. A question, option or card can carry a small HTML snippet instead of a file.
  • Simulator screenshots. The agent can capture the booted iOS simulator or a running Android emulator and put the screen into a round.
  • A system notification when the agent replies or adds cards while the page isn't in front of you.

Install

You need Node.js 20 or newer. Screenshots of running pages use a local Chrome, Chromium, Edge or Brave if there is one.

Claude Code:

/plugin install decide --marketplace Forichok/decide

Claude Code older than 2.1.275 needs two steps:

/plugin marketplace add Forichok/decide
/plugin install decide@forichok

Codex:

codex plugin marketplace add Forichok/decide
codex plugin add decide@forichok

Start a new agent session afterwards.

To look around without installing anything, clone the repo and run node decide.mjs --demo.

Commands

In Claude Code the command is /decide; in Codex it's $decide. If another command in your setup already uses /decide, type the full /decide:decide.

Type What happens
/decide The agent collects the open choices of the current task
/decide <topic> A short interview about the topic before work starts
/decide demo The feature tour
/decide history What was already decided in this project
/decide x.questions.json Runs a spec you or the agent wrote
/decide:swipe <task> A thorough interview: many two-answer cards, arrow keys

/decide:swipe also takes a path to a deck JSON, or nothing to interview you about the current task. See Swipe interview.

How it works

The plugin ships an MCP server with eleven tools: ask opens a round, swipe opens a card interview, wait blocks until you answer or ask something, push updates the deck and brief of a card interview, explain puts the agent's answer on the page, screenshot captures a running page or a simulator, history searches past decisions, supersede marks one as no longer holding, adr writes one into the repo, and export and import carry a round to someone else and back. Agents without MCP can run the same engine as a CLI (node decide.mjs --help).

A small server per project serves the page on 127.0.0.1. It starts on demand and stops after 30 idle minutes. Its state, the decision journal and screenshots live in ~/.decide/projects/<project>/ (set DECIDE_HOME to move them). There are no dependencies, no build step and no telemetry.

The agent's guides are skills/decide/SKILL.md and skills/swipe/SKILL.md, and the full spec and answers format is in skills/decide/spec.md. The smallest round looks like this:

{
  "questions": [
    {
      "id": "db",
      "title": "Which database do we use?",
      "options": [
        { "id": "pg", "label": "Postgres", "recommended": "we already run it" },
        { "id": "sqlite", "label": "SQLite" }
      ]
    }
  ]
}

Security

The server listens on 127.0.0.1 only, rejects requests with a foreign Host header and requires an x-decide header on every write. Mockups run in a sandboxed frame with no network access. Screenshots take http(s) URLs only.

FAQ

Does anything leave my machine? No. The page, your answers and the journal stay on 127.0.0.1 and in ~/.decide. The one outside request is mermaid, loaded from jsDelivr, and only for rounds that have a diagram. An exported round leaves only when you send the file to someone, and it holds the questions and pictures of that one round.

I closed the tab halfway through. Your answers are saved as you go. Open the same link again and carry on.

The agent stopped waiting before I pressed Done. Codex can end its turn while you're still answering. The page says so and keeps your answers. Send the agent the message the page gives you, and it picks them up.

/decide or /decide:swipe? /decide when there are a few real choices with three or more options, or mockups to compare side by side. /decide:swipe when the task is still vague and needs many quick two-answer questions before anyone writes code.

Can I use it with another agent? Anything that can run a shell command can use the CLI: node decide.mjs --help.

Development

node --test

The tests start real servers in temp directories and never touch your ~/.decide. CI runs them on Linux, macOS and Windows.

If decide saved you a round of "1b, 2 yes", a ⭐ helps other people find it.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages