미니, 파트 7/9로 구축: 상태 명령 — 상태, 실행 취소, 모델

작성자

카테고리:

← 피드로
DEV Community · Stanislav Kremeň · 2026-07-22 개발(SW)

pycalc has four phases behind it and runs. The loop, the checkpoints, autonomous mode — all of those change state. Now three commands that only look at the state, or carefully roll it back: status (where am I), undo (one step back), model (what to drive it with, and at what cost). It’s mini’s instrument panel — cheap, instant, mostly Claude-free.

status — where am I

mini status

Enter fullscreen mode Exit fullscreen mode

pycalc
  A small command-line calculator: `pycalc "2+3*4"` evaluates one expression and exits…
  Ideas: 2 open (mini todo)

Phases:
  [done]       1. Tokenizer with positions (took 2m 6s)
  [done]       2. Parser and evaluation (took 1m 16s)
  [done]       3. CLI layer and formatting (took 29m 5s)
  [done]       4. Help flag support (took 1m 24s)

  Next: mini next (proposes the first phase)

Enter fullscreen mode Exit fullscreen mode

One glance: what you’re building, how many ideas wait in the backlog, every phase with its status and time, and what to do next. It reads from state.json — no Claude, no tokens, no waiting. When you want the detail of one phase:

mini status --phase 4

Enter fullscreen mode Exit fullscreen mode

it prints the goal, all steps with their details, and the whole run report — what do wrote, including decisions and notes. And for a script or another tool:

mini status --json

Enter fullscreen mode Exit fullscreen mode

returns a machine-readable object (title, phases[] with statuses and steps, ideasOpen, currentPhaseId, …). The whole of status is read-only — it never changes anything, so you can run it any time without worry.

undo — one step back

Sometimes done jumps the gun, or next saves a phase you didn’t want. undo reverts the last state change:

mini undo --dry-run

Enter fullscreen mode Exit fullscreen mode

Undo would revert the last change:
  1 phase will be removed; current phase: 5 (Throwaway demo phase) → (none)

Preview only — nothing changed. Run "mini undo --yes" to apply.

Enter fullscreen mode Exit fullscreen mode

--dry-run is a preview: it shows exactly what would happen (phases removed/restored, step statuses reverted, a commit possibly dropped) and touches nothing. Only mini undo --yes actually does it.

Two things you must know about undo before you rely on it:

  1. It remembers only one step. It’s not git history, it’s a single level back. A second undo in a row does nothing. When you need to go deeper, you’re on git.
  2. It can drop a phase commit too — but only safely. When done committed the phase and that commit is still on top with a clean working tree, undo soft-resets it (your changes stay in the index). But if you’ve committed something else since, or you have unsaved changes, undo leaves the commit alone — it only reverts state.json and tells you to git reset --soft <sha> by hand. It never rewrites git over your head.

Mind the environment: a bare mini undo asks interactively (Y/n). In Claude Code’s non-TTY Bash it would hang — which is why the /mini:undo slash command runs --dry-run (shows the preview in the chat), waits for your confirmation, then --yes.

model — with what, and at what cost

mini doesn’t drive every step with the same Claude — you can steer it:

mini model show

Enter fullscreen mode Exit fullscreen mode

Models for this project
  default     (inherited from default / Claude Code)
  next        (inherited from default / Claude Code)
  plan        (inherited from default / Claude Code)
  do          (inherited from default / Claude Code)
  importGsd   (inherited from default / Claude Code)
  audit       (inherited from default / Claude Code)
  memory      (inherited from default / Claude Code)

Enter fullscreen mode Exit fullscreen mode

Seven scopes: default (for everything without its own setting) plus the individual steps — next, plan, do, importGsd, audit, memory. Each inherits from default until you give it its own model:

mini model do haiku       # mechanical work, cheap and fast
mini model plan opus      # leave the thinking to the best one

Enter fullscreen mode Exit fullscreen mode

The presets are opus (best quality, slower, weighs more on the limit), sonnet (balanced) and haiku (fast, cheap, for simple things); you can also pass a full model ID. The setting lives in state.json, so it’s per-project. mini model reset clears it all (back to Claude Code’s default).

That’s the whole point of scopes: spend where it pays back. plan and do decide the architecture — that’s where quality is worth it. memory (writing the phase memory afterward) or audit (the codebase overview) are more mechanical — a cheaper model is fine. It’s not about “the best one everywhere”, it’s about where to put the budget.

What they have in common

None of the three is part of the loop — you reach for them between work. status and model show are pure local reads (zero tokens, instant). undo is the only one that changes anything, and even it is careful: a preview, one step, and it touches git only when it’s safe. It’s a deliberately boring, predictable instrument panel — which, for a tool whose job is to hold state, is exactly what you want.

Trade-offs

  • undo is shallow. One step, not history. Anyone expecting “ctrl-Z for the whole project” will hit a wall — that’s what git is for, and undo doesn’t replace it, it just doesn’t fight with it.
  • A model override can quietly do harm. You switch do to haiku to save money and suddenly the phases are sloppy. The saving only counts together with output quality, not on its own — a cheap model on the wrong step is more expensive than an expensive one on the right step.
  • status tells the truth about state, not about code. It shows what’s in state.json — a phase being done doesn’t mean the code works. Verification is verify and your eyes, not status.

Next time

You can see the state, step back, and steer the model. Two commands remain, the ones that watch the project’s health: changelog (what changed, and when, for users) and doctor (a check that the whole mini setup is in order). Those next time — and then the finale.

mini is open source: npm install -g mini-orchestrator, then mini install-commands in your project. Source and docs on GitHub.

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다