Skip to content

docs: add CLAUDE.md for layered feature-module convention#2037

Closed
rugpanov wants to merge 1 commit into
mainfrom
rugpanov/claude-md-layered-structure
Closed

docs: add CLAUDE.md for layered feature-module convention#2037
rugpanov wants to merge 1 commit into
mainfrom
rugpanov/claude-md-layered-structure

Conversation

@rugpanov

Copy link
Copy Markdown
Contributor

What

Adds a package-scoped packages/databricks-vscode/CLAUDE.md documenting the layered feature-module convention we're adopting for src/:

  • Feature-first folders, with internal models / controllers / handlers layers.
  • One-way dependency direction: handlers → controllers → models.
  • What belongs in each layer, and the tests-next-to-source rule.
  • Migration status: the layout is not yet repo-wide — prefer it for new features, migrate existing ones deliberately in their own PRs. Points at src/python-setup/ (added in [1/?] feat(python-setup): add setup-local CLI result contract types & golden fixtures #2036) as the reference template.

Why

We're gradually moving the extension toward this structure, starting with the new python-setup feature. Capturing the convention makes it a documented decision rather than something inferred from one feature folder, so contributors (and agents) follow it consistently instead of diverging.

Kept as its own PR — a repo-wide convention shouldn't ride inside a feature PR.

Verification

Docs-only; no code touched. Single new Markdown file.

This pull request and its description were written by Isaac.

@rugpanov

rugpanov commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ❌ 2 of 35 test jobs failed for bc12de67 (33 passed).
View run

*Why:*
We are gradually moving the extension's src/ toward a layered structure, starting
with the new python-setup feature. Capturing the convention in a package-scoped
CLAUDE.md makes it a documented decision rather than something inferred from one
feature folder, so future contributors follow it instead of diverging.

*What:*
- New `packages/databricks-vscode/CLAUDE.md` with a "Code organization" section:
  feature-first folders with internal models / utils / gateways / controllers /
  handlers layers, the one-way dependency rule
  (handlers -> controllers -> gateways -> utils -> models), what belongs in each
  layer, and tests-next-to-source.
- Documents migration status: the layout is not yet repo-wide; prefer it for new
  features, migrate existing ones deliberately in their own PRs. Points at
  src/python-setup/ as the reference template and the proposal doc for rationale.

*Verification:*
- Docs-only change; no code touched.

Co-authored-by: Isaac
@rugpanov
rugpanov force-pushed the rugpanov/claude-md-layered-structure branch from bc12de6 to 0ddf2aa Compare July 23, 2026 09:31
@rugpanov
rugpanov temporarily deployed to test-trigger-is July 23, 2026 09:31 — with GitHub Actions Inactive
@rugpanov
rugpanov temporarily deployed to test-trigger-is July 23, 2026 09:32 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/vscode

Inputs:

  • PR number: 2037
  • Commit SHA: 0ddf2aaca634e6194987240d93587e0ac174917b

Checks will be approved automatically on success.

@rugpanov

rugpanov commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ✅ all 35 test jobs passed for 0ddf2aac.
View run

@rugpanov
rugpanov marked this pull request as draft July 23, 2026 11:20
@rugpanov

Copy link
Copy Markdown
Contributor Author

Closing: the standalone layered (models/utils/gateways/controllers/handlers) convention is being set aside. Code conventions will instead iterate from #2043 (matching the current codebase style). The useful, layering-neutral observations from this effort are being folded into that doc.

@rugpanov rugpanov closed this Jul 23, 2026
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