generated from finos-labs/project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 92
docs: add CALM Copilot Chatmode and Voice Mode documentation #1809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
35aa5e5
docs: add CALM Copilot Chatmode and Voice Mode documentation
gkaria 9d5a7b3
Merge branch 'finos:main' into docupdates
gkaria 6f7776e
docs: refactor Voice Mode documentation to focus on CALM usage and fi…
gkaria 7b16cf0
docs: update copilot-chatmode and revert sidebar_position on index.md
gkaria File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| --- | ||
| id: copilot-chatmode | ||
| title: CALM Copilot Chatmode | ||
| sidebar_position: 6 | ||
| --- | ||
|
|
||
| # CALM Copilot Chatmode | ||
|
|
||
| CALM Copilot Chatmode provides AI-powered development assistance for CALM architecture modeling by integrating specialized knowledge and tools directly into VS Code through GitHub Copilot Chat. | ||
|
|
||
| ## Overview | ||
|
|
||
| The `copilot-chatmode` command configures your development environment with comprehensive tool prompts that help GitHub Copilot understand CALM schema requirements, validation rules, and best practices. This enables you to get intelligent assistance when creating and modifying CALM architectures. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Before setting up CALM Copilot Chatmode, ensure you have: | ||
|
|
||
| - **VS Code**: Version 1.94 or later | ||
| - **GitHub Copilot**: Active GitHub Copilot subscription | ||
| - **GitHub Copilot Chat Extension**: Installed in VS Code | ||
| - **CALM CLI**: Installed globally (`npm install -g @finos/calm-cli`) | ||
| - **Git Repository**: Your project should be in a Git repository | ||
|
|
||
| ## Setting Up CALM Copilot Chatmode | ||
|
|
||
| To set up AI assistance for your CALM project, run the following command in your project directory: | ||
|
|
||
| ```shell | ||
| calm copilot-chatmode | ||
| ``` | ||
|
|
||
| Or specify a different directory: | ||
|
|
||
| ```shell | ||
| calm copilot-chatmode --directory /path/to/your/calm-project | ||
| ``` | ||
|
|
||
| This command creates a `.github/chatmodes/CALM.chatmode.md` configuration file in your repository that provides GitHub Copilot with specialized CALM knowledge. | ||
|
|
||
| ## Command Options | ||
|
|
||
| - **`-d, --directory <path>`**: Target directory (defaults to current directory) | ||
| - **`-v, --verbose`**: Enable verbose logging (default: false) | ||
| - **`-h, --help`**: Display help for command | ||
|
|
||
| ## What Gets Configured | ||
|
|
||
| The chatmode setup provides GitHub Copilot with: | ||
|
|
||
| - **Schema-Accurate Guidance**: Complete JSON schema definitions for all CALM components ensure that suggestions follow the official CALM specification. | ||
| - **Critical Validation Requirements**: Emphasis on important constraints like `oneOf` requirements for interfaces and proper relationship structures. | ||
| - **Best Practice Enforcement**: Guidance on naming conventions, relationship patterns, and proper architecture structure. | ||
|
|
||
| ### Specialized Tools | ||
|
|
||
| The chatmode includes separate tools for each CALM component: | ||
|
|
||
| - **Architecture Creation**: Guide for creating complete CALM architecture documents | ||
| - **Node Creation**: Creating nodes with proper validation and interface definitions | ||
| - **Relationship Creation**: Creating relationships with correct types and constraints | ||
| - **Interface Creation**: Critical guidance for interface `oneOf` constraints | ||
| - **Control Creation**: Security controls, requirements, and configurations | ||
| - **Flow Creation**: Business process flows and transitions | ||
| - **Pattern Creation**: Reusable architectural patterns using JSON schema | ||
| - **Metadata Creation**: Metadata structure and requirements | ||
| - **Documentation Creation**: Generating documentation from CALM models | ||
|
|
||
| ## Using CALM Copilot Chat | ||
|
|
||
| Once configured, you can interact with GitHub Copilot Chat in VS Code: | ||
|
|
||
| 1. Open GitHub Copilot Chat (Ctrl+Shift+I or Cmd+Shift+I) | ||
| 2. Select the **CALM** chatmode from the mode selector | ||
| 3. Ask questions or request assistance with your CALM architecture | ||
|
|
||
| ### Example Queries | ||
|
|
||
| Here are some examples of how to use CALM Copilot Chat: | ||
|
|
||
| **Creating Components:** | ||
| ``` | ||
| Create a new node for an API gateway service with REST interfaces | ||
| ``` | ||
|
|
||
| **Validation Help:** | ||
| ``` | ||
| Why is my interface definition failing validation? | ||
| ``` | ||
|
|
||
| **Best Practices:** | ||
| ``` | ||
| What's the recommended way to model a database relationship? | ||
| ``` | ||
|
|
||
| **Documentation:** | ||
| ``` | ||
| Generate documentation for my CALM architecture | ||
| ``` | ||
|
|
||
| ## Updating Chatmode Configuration | ||
|
|
||
| If you update the CALM CLI or want to refresh the chatmode configuration: | ||
|
|
||
| ```shell | ||
| calm copilot-chatmode --directory /path/to/your/calm-project | ||
| ``` | ||
|
|
||
| This will update the chatmode files with the latest tool prompts and guidance. | ||
|
|
||
| ## Next Steps | ||
|
|
||
| - Learn about [Voice Mode](voice-mode) for hands-free architecture modeling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| --- | ||
| id: voice-mode | ||
| title: Voice Mode | ||
| sidebar_position: 7 | ||
| --- | ||
|
|
||
| # Voice Mode with CALM Copilot Chat | ||
|
|
||
| Voice Mode enables hands-free interaction with CALM Copilot Chat, allowing you to speak architecture queries and receive spoken responses directly in the chat interface. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - **VS Code**: Version 1.94 or later | ||
| - **CALM Copilot Chatmode**: Configured in your repository (see [CALM Copilot Chatmode](copilot-chatmode)) | ||
| - **GitHub Copilot Chat**: Active subscription and extension installed | ||
| - **Microphone**: A working microphone | ||
|
|
||
| ### Setup | ||
|
|
||
| 1. **Install the VS Code Speech Extension** | ||
| - Open VS Code Extensions (Ctrl+Shift+X or Cmd+Shift+X) | ||
| - Search for "VS Code Speech" | ||
| - Click **Install** on the Microsoft-published extension | ||
|
|
||
| 2. **Grant Microphone Permissions** | ||
| - First use will prompt for microphone access - click **Allow** | ||
| - If prompted on macOS, grant permissions to both "Visual Studio Code" and "Code Helper", then restart VS Code | ||
| - On Windows, ensure VS Code is enabled in Settings → Privacy → Microphone | ||
|
|
||
| 3. **Configure VS Code Settings** | ||
| - Open VS Code Settings (Ctrl+, or Cmd+,) | ||
| - Search for `accessibility.voice` and add these settings: | ||
|
|
||
| ```json | ||
| { | ||
| "accessibility.voice.autoSynthesize": "on", | ||
| "accessibility.voice.ignoreCodeBlocks": true, | ||
| "accessibility.voice.speechTimeout": 1200, | ||
| "accessibility.voice.keywordActivation": "chatInView" | ||
| } | ||
| ``` | ||
|
|
||
| ## Using Voice Mode | ||
|
|
||
| ### Starting a Voice Query | ||
|
|
||
| 1. Open GitHub Copilot Chat (Ctrl+Shift+I or Cmd+Shift+I) | ||
| 2. Select the **CALM** chatmode | ||
| 3. Click the microphone icon in the chat input field or press Ctrl+I (Windows/Linux) / Cmd+I (macOS) | ||
| 4. Speak your query clearly | ||
| 5. The response will appear as you finish speaking (auto-submit after ~1.2 seconds of silence) | ||
| 6. Your response will be read aloud automatically | ||
|
|
||
| ### Quick Voice Activation | ||
|
|
||
| Say **"Hey Code"** to activate voice input without clicking anything (requires `keywordActivation` setting enabled above). | ||
|
|
||
| ### Example Queries | ||
|
|
||
| Speak naturally and clearly. Here are examples of how you can use CALM Chatmode via voice: | ||
|
|
||
| **Building Your Architecture:** | ||
|
|
||
| - "Create a microservices architecture with a web frontend, API gateway, and PostgreSQL database" | ||
| - "Add a node for the authentication service with HTTPS interfaces" | ||
| - "Create a connects-to relationship from the API gateway to the backend services" | ||
| - "Define that the services are deployed in Kubernetes" | ||
|
|
||
| **Defining Controls and Compliance:** | ||
|
|
||
| - "Add PCI-DSS compliance controls to the payment processor service" | ||
| - "Define encryption-in-transit controls for all API connections" | ||
| - "What security controls should apply to our database?" | ||
|
|
||
| **Modeling Business Processes:** | ||
|
|
||
| - "Create a flow for the customer onboarding process" | ||
| - "Model the trade execution flow from order placement to settlement" | ||
| - "Show the data journey through our system" | ||
|
|
||
| **Validation and Best Practices:** | ||
|
|
||
| - "Is my architecture valid?" | ||
| - "What patterns apply to this microservices design?" | ||
| - "What interfaces should the authentication service expose?" | ||
| - "Why is my relationship definition failing validation?" | ||
|
|
||
| **Documentation and Visualization:** | ||
|
|
||
| - "Generate documentation for my architecture" | ||
| - "Create a visual diagram of the system" | ||
| - "Document all the interfaces and their protocols" | ||
|
|
||
| ### Listening to Responses | ||
|
|
||
| Responses will be read aloud automatically (if `autoSynthesize` is enabled). You can also: | ||
|
|
||
| - **Stop playback**: Press **ESC** or click the speaker icon | ||
| - **Manual read-aloud**: Click the speaker icon next to any response to hear it read aloud again |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.