Skip to content

Rename /lean4:doctor → /lean4:diagnose (avoids collision with built-in /doctor) - #156

Open
flound1129 wants to merge 1 commit into
cameronfreer:mainfrom
mysticflounder:rename-doctor-to-diagnose
Open

Rename /lean4:doctor → /lean4:diagnose (avoids collision with built-in /doctor)#156
flound1129 wants to merge 1 commit into
cameronfreer:mainfrom
mysticflounder:rename-doctor-to-diagnose

Conversation

@flound1129

Copy link
Copy Markdown

What

Renames the /lean4:doctor command to /lean4:diagnose.

Why

doctor collides with Claude Code's built-in /doctor command. Renaming the
plugin diagnostic to /lean4:diagnose removes the ambiguity while keeping the
command's behavior and all subcommands (env, migrate, cleanup) identical.

Changes

  • commands/doctor.mdcommands/diagnose.md (frontmatter name: diagnose,
    git-tracked as a rename). Subcommands unchanged: /lean4:diagnose env|migrate|cleanup.
  • Canonical recovery wording (single-sourced): lib/scripts/preflight_env.sh
    emit_recovery and its byte-identical copy in hooks/bootstrap.sh now emit
    Run /lean4:diagnose env for a full diagnosis. diagnose.md reproduces the
    three canonical lines; test_preflight_env.sh / test_bootstrap_env.sh assert
    the new wording.
  • tools/lint_docs.sh: KNOWN_COMMANDS, the per-command max_lines table,
    and both diagnose.md special-cases (stale-plugin-path skip, host-agnostic skip).
  • Docs: root README.md, INSTALLATION.md, MIGRATION.md,
    plugins/lean4/README.md, SKILL.md, and the command-examples.md /
    command-invocation.md / subagent-workflows.md references.
  • Manifests: plugin.json and marketplace.json descriptions list diagnose;
    version bumped 4.5.44.6.0.
  • Tests: test_validate_user_prompt.sh uncovered-command case.
  • Historical CHANGELOG entries keep the old doctor name (accurate for the
    releases they describe); a new v4.6.0 entry documents the rename.

Breaking change

/lean4:doctor no longer exists — use /lean4:diagnose. Muscle-memory, scripts,
or docs invoking /lean4:doctor must switch.

Testing

All local suites pass under macOS Bash 3.2 (/bin/bash):

  • test_preflight_env.sh 10/0, test_bootstrap_env.sh 11/0,
    test_validate_user_prompt.sh 33/0, test_guardrails.sh 327/0,
    test_contracts.sh 30/0, test_lint_docs.sh 4/0.
  • lint_docs.sh is lint-neutral: identical 117 pre-existing warnings before
    and after (the three doctor.md anchor warnings simply became diagnose.md).

The changed shell files (bootstrap.sh, preflight_env.sh, lint_docs.sh) touch
only comments and echo string content — no logic — so shellcheck is unaffected.

🤖 Generated with Claude Code

The `doctor` name collided with Claude Code's built-in /doctor.
Renamed commands/doctor.md -> diagnose.md; subcommands unchanged
(env/migrate/cleanup). Updated the canonical recovery wording in
preflight_env.sh + bootstrap.sh, lint_docs.sh (KNOWN_COMMANDS,
max_lines, the two diagnose.md special-cases), all doc surfaces,
both plugin descriptions, and the guard tests. Bumped 4.5.4 -> 4.6.0.
Lint-neutral (same 117 pre-existing warnings); all test suites green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant