Skip to content

Move claude-sdk-cli source into model/view/controller directories#246

Merged
shellicar merged 3 commits intomainfrom
feature/mvc-directory-structure
Apr 11, 2026
Merged

Move claude-sdk-cli source into model/view/controller directories#246
shellicar merged 3 commits intomainfrom
feature/mvc-directory-structure

Conversation

@shellicar
Copy link
Copy Markdown
Owner

Summary

  • Move state classes into model/, renderer functions into view/, event handler into controller/
  • Update all import paths in source and test files
  • Add biome.json boundary enforcement: model/ cannot import from view/ or controller/, view/ cannot import from controller/

Co-Authored-By: Claude noreply@anthropic.com

Makes the three-layer architecture explicit in the filesystem. State
classes move to model/, renderer functions to view/, event handlers
to controller/. Two biome.json files enforce layer boundaries:
model/ cannot import from view/ or controller/, view/ cannot import
from controller/.

Also updates linting instructions: replace pnpm biome check --write
with pnpm ci:fix to avoid scope bleed across packages.

No logic changes. AppLayout stays in src/ as a known future split
target.
Tests (427/427), type-check, and biome ci all pass. Work is
verified and ready for the PR.
@shellicar shellicar added this to the 1.0 milestone Apr 11, 2026
@shellicar shellicar added enhancement New feature or request pkg: claude-sdk-cli The new SDK-based CLI labels Apr 11, 2026
@shellicar shellicar self-assigned this Apr 11, 2026
@shellicar shellicar added enhancement New feature or request pkg: claude-sdk-cli The new SDK-based CLI labels Apr 11, 2026
@shellicar shellicar enabled auto-merge (squash) April 11, 2026 19:53
@shellicar shellicar requested a review from bananabot9000 April 11, 2026 19:53
@shellicar shellicar force-pushed the feature/mvc-directory-structure branch from 5ab0556 to 41db517 Compare April 11, 2026 22:08
Copy link
Copy Markdown
Collaborator

@bananabot9000 bananabot9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phase 1: file moves + biome boundary enforcement. Clean mechanical PR.

No suspicious files — no history files, no logs, no credentials. changes.jsonl is the only .jsonl and it's the changelog, not history. Session log mentions .sdk-history2.jsonl was committed and repaired in an earlier session — confirmed it's NOT in this diff.

File inventory checks out:

  • model/: 7 state files + buildSubmitText + biome.json ✅
  • view/: 5 renderers + biome.json ✅
  • controller/: AgentMessageHandler ✅
  • Boundary rules: model blocks view+controller, view blocks controller ✅
  • All 12 test files updated with new import paths ✅

CLAUDE.md rewrite is significant — the testament/cast vocabulary landed, session protocol replaced with fleet identity framework, TUI architecture section added with MVC docs, biome fix command changed to pnpm ci:fix. All intentional per the design doc reviewed earlier tonight.

One note: the session logs mention damage from an earlier session (.sdk-history2.jsonl committed, biome run against entire repo). The 2026-04-12 session log says this was repaired before the verify session. Confirmed not present in this diff.

Approved ✅ 🍌

@shellicar shellicar merged commit 9d72531 into main Apr 11, 2026
4 checks passed
@shellicar shellicar deleted the feature/mvc-directory-structure branch April 11, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pkg: claude-sdk-cli The new SDK-based CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants