Skip to content

Split the CLI into a command package and refresh the design note - #25

Merged
adityaramkumar merged 1 commit into
mainfrom
claude/cli-package
Oct 22, 2026
Merged

adityaramkumar merged 1 commit into
mainfrom
claude/cli-package

Conversation

@adityaramkumar

Copy link
Copy Markdown
Owner

Summary

  • cli.py had grown to about 500 lines, against the repo's ~150-line guideline. Commands now live in src/specdiff/cli/ by area:

    • build_cmd: build
    • info_cmds: status, validate, impact
    • review_cmd: review
    • project_cmds: init, skill, clean, extract, ui
    • shared loading lives in common.py and init's files in templates.py

    The specdiff = specdiff.cli:cli entry point is unchanged, and no file in the package exceeds ~135 lines.

  • The CLI tests no longer use Click's deprecated isolated_filesystem, which clears all 47 test warnings. They now patch review_spec where each module uses it.

  • DESIGN.md's status note now reflects what is implemented: fingerprints, the repair stage as a first Reconciler, and acceptance tests as the current form of test specs. CLAUDE.md and CONTRIBUTING.md now describe the package.

Pure restructuring: no behavior change.

Testing

  • pytest tests/: 206 passed, 0 warnings
  • ruff check / ruff format --check: clean
  • specdiff --help lists all ten commands

Generated by Claude Code

cli.py had grown to ~500 lines against the repo's ~150-line guideline.
Commands now live in specdiff/cli/ by area (build_cmd, info_cmds,
review_cmd, project_cmds) with shared loading in common.py and init's
file templates in templates.py. The `specdiff = specdiff.cli:cli` entry
point is unchanged.

CLI tests no longer use Click's deprecated isolated_filesystem, which
clears all 47 warnings, and patch review_spec where each module uses it.
DESIGN.md's status note now reflects what is implemented.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FAykpfqqWA2GFjcC1p6FRy
@adityaramkumar
adityaramkumar merged commit 577ba60 into main Oct 22, 2026
2 checks passed
@adityaramkumar
adityaramkumar deleted the claude/cli-package branch October 22, 2026 02:12
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.

2 participants