Skip to content

feat(cli): warn when tracked document directory mismatches CALM Hub layout - #3612

Open
aksharprabhudesai wants to merge 1 commit into
finos:mainfrom
aksharprabhudesai:feat/3208-workspace-layout-warning
Open

aksharprabhudesai wants to merge 1 commit into
finos:mainfrom
aksharprabhudesai:feat/3208-workspace-layout-warning

Conversation

@aksharprabhudesai

Copy link
Copy Markdown
Contributor

Description

calm workspace check now checks the directory layout of tracked documents against the layout rules used by CALM Hub GitHub storage mode (architectures/, patterns/, standards/ [or standard-nodes/], flows/, interfaces/, controls/, adrs/, timelines/, decorators/). When a tracked file is placed in an unexpected directory, check emits an informational warning alerting the author before merge. Directory layout warnings do not alter the check exit code.

Closes #3208

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Code style/formatting changes
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvements
  • ✅ Test additions or updates
  • 🔧 Chore (maintenance, dependencies, CI, etc.)

Affected Components

  • CLI (cli/)
  • Schema (calm/)
  • CALM AI (calm-ai/)
  • CALM Hub (calm-hub/)
  • CALM Hub UI (calm-hub-ui/)
  • CALM Lab (calm-lab/)
  • CALM Models (calm-models/)
  • CALM Server (calm-server/)
  • CALM Studio (calm-studio/)
  • CALM Widgets (calm-widgets/)
  • CALMGuard (calm-guard/)
  • Documentation (docs/)
  • Shared (shared/)
  • VS Code Extension (calm-plugins/vscode/)
  • Dependencies
  • CI/CD

Testing

  • I have tested my changes locally
  • I have added/updated unit tests
  • All existing tests pass

Added unit tests covering:

  • Canonical directory identification, aliases, and directory segment detection in shared/src/hub/github-layout.spec.ts
  • Expected directory extraction from $id URLs and manifest types in cli/src/command-helpers/workspace/layout-check.spec.ts
  • Misplaced files, unknown directories, root files, and .calm-workspace directory warnings
  • Integration with calm workspace check in cli/src/command-helpers/workspace/commands.spec.ts

Checklist

  • My commits follow the conventional commit format
  • I have updated documentation if necessary
  • I have added tests for my changes (if applicable)
  • My changes follow the project's coding standards

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Affects `cli` code shared

Projects

None yet

Development

Successfully merging this pull request may close these issues.

calm workspace: warn when a tracked file is in a directory that CALM Hub GitHub mode will not read as its type

1 participant