Symptom
_step_memory_dir (and every other _step_* in init_cmd.py) hard-codes its step number via step_header(N, title). That number is correct for the --advanced flow (where memory-dir is step 3 of 10) but misleading in the two preset flows where memory-dir is the first interactive step the user actually sees:
| Flow |
step_header shows |
Actually is |
mm init --advanced |
3. Memory Directory |
step 3 of 10 ✓ |
mm init --preset korean |
3. Memory Directory |
step 1 of 3 |
mm init (default, preset chosen) |
3. Memory Directory |
step 2 of 4 (picker + 3 follow-ups) |
First-time users reading 3. without seeing steps 1 and 2 get a nagging "did I miss something?" signal, and the surrounding log ordering looks bizarre. (This may have contributed to the confusion in #371 — 3. implies there was a previous step to return to.)
Root cause
packages/memtomem/src/memtomem/cli/init_cmd.py — each _step_* function opens with step_header(<hardcoded_int>, "<title>"). The integer is a property of the --advanced 10-step sequence, not of the function's position in whatever run_steps list actually invokes it. packages/memtomem/src/memtomem/cli/wizard.py:step_header takes the number as a parameter but has no way to know the step's real position inside the current run_steps queue.
Suggested directions
Pick one:
- Pass position through
run_steps. run_steps knows i and len(steps); it could stash state["_wizard_position"] = (i + 1, len(steps)) before each step call. Step functions read that instead of hard-coding. One-time wiring, no signature change to step functions.
- Make
step_header take a title only and derive the number from a state["_wizard_position"] seed. Same idea, different seam — the number lives in the helper instead of the step.
- Drop the number entirely from the preset flows (show only the title), or use word markers like
"First. …" / "Next. …". Less structured but zero risk of drift.
Direction 1 or 2 is the right choice if we want the full sequence numbered consistently. Direction 3 is the lowest-touch escape hatch.
Acceptance criteria
Related
Symptom
_step_memory_dir(and every other_step_*ininit_cmd.py) hard-codes its step number viastep_header(N, title). That number is correct for the--advancedflow (where memory-dir is step 3 of 10) but misleading in the two preset flows where memory-dir is the first interactive step the user actually sees:step_headershowsmm init --advanced3. Memory Directorymm init --preset korean3. Memory Directorymm init(default, preset chosen)3. Memory DirectoryFirst-time users reading
3.without seeing steps 1 and 2 get a nagging "did I miss something?" signal, and the surrounding log ordering looks bizarre. (This may have contributed to the confusion in #371 —3.implies there was a previous step to return to.)Root cause
packages/memtomem/src/memtomem/cli/init_cmd.py— each_step_*function opens withstep_header(<hardcoded_int>, "<title>"). The integer is a property of the--advanced10-step sequence, not of the function's position in whateverrun_stepslist actually invokes it.packages/memtomem/src/memtomem/cli/wizard.py:step_headertakes the number as a parameter but has no way to know the step's real position inside the currentrun_stepsqueue.Suggested directions
Pick one:
run_steps.run_stepsknowsiandlen(steps); it could stashstate["_wizard_position"] = (i + 1, len(steps))before each step call. Step functions read that instead of hard-coding. One-time wiring, no signature change to step functions.step_headertake atitleonly and derive the number from astate["_wizard_position"]seed. Same idea, different seam — the number lives in the helper instead of the step."First. …"/"Next. …". Less structured but zero risk of drift.Direction 1 or 2 is the right choice if we want the full sequence numbered consistently. Direction 3 is the lowest-touch escape hatch.
Acceptance criteria
--preset X, default-interactive preset), step headers reflect the actual position within the flow the user is taking.CliRunner().invoke(init, input=...)and grep the output).Related
run_steps. Step-number display was explicitly deferred from that PR's scope.