Skip to content

bug: verify next-command hint still prints for empty JSON plans #121

Description

@aryamthecodebreaker

What happened?

nextCommandHint prefers the verify hint whenever --output + --format json are set, before checking whether the plan found anything useful.

Against a 200-file homogeneous repo that returned 0 context files (#119), stderr still said:

After you make the change, check it against this plan:
  fixmap verify --report …\many.json --diff main...HEAD

Verifying an empty plan against a later diff is busywork, and the hint crowds out the more relevant “add an anchor / terms were wiped” guidance.

Source order in packages/cli/src/cli-runner.ts nextCommandHint: output+json branch returns first; weak/empty explain branch never runs.

How can we reproduce it?

# any plan that yields 0 contextFiles
npx -y @aryam/fixmap@0.7.3 plan --repo /empty-or-mismatched --issue "fix the login bug" \
  --format json --output empty.json
# read stderr

What did you expect instead?

Skip the verify hint when contextFiles.length === 0 (and maybe when specificity is vague). Prefer the analysis next-action / explain-or-refine hint instead.

FixMap version or commit

v0.7.3 / main

Where did this happen?

CLI

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueApproachable contribution with a clear scope

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions