Skip to content

Commit 66d7173

Browse files
add: Introduce comprehensive documentation for versioning language preferences MCP architecture task structure and testing guidelines
- Added a new changeset.mdc file detailing the versioning strategy and changeset process for the project. - Updated
1 parent 180772e commit 66d7173

File tree

5 files changed

+506
-25
lines changed

5 files changed

+506
-25
lines changed

.cursor/rules/changeset.mdc

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: false
5+
---
6+
# Versioning & Changesets
7+
8+
This document outlines the versioning strategy and changeset usage for git-gpt-commit.
9+
10+
## Versioning Strategy
11+
12+
The project follows Semantic Versioning (SemVer):
13+
14+
- **Major version (X.0.0)**: Breaking changes that require users to update their code
15+
- **Minor version (0.X.0)**: New features added in a backward-compatible manner
16+
- **Patch version (0.0.X)**: Backward-compatible bug fixes
17+
18+
## When to Create a Changeset
19+
20+
Create a changeset when making changes that affect:
21+
22+
- **Public API** - Changes to exported functions or CLI interface
23+
- **Dependencies** - Adding, removing, or updating dependencies
24+
- **Configuration** - Changes to configuration file structure
25+
- **Documentation** - Significant updates to documentation
26+
27+
## Changeset Process
28+
29+
1. Make your code changes and commit them
30+
2. Run the changeset command:
31+
```bash
32+
npm run changeset
33+
```
34+
3. Follow the interactive prompts:
35+
- Select the type of change (patch, minor, major)
36+
- Enter a description of the change
37+
- The command will create a new markdown file in the `.changeset` directory
38+
4. Commit the changeset file:
39+
```bash
40+
git add .changeset/*.md
41+
git commit -m "chore: add changeset for recent changes"
42+
```
43+
44+
Or amend your previous commit:
45+
```bash
46+
git add .changeset/*.md
47+
git commit --amend --no-edit
48+
```
49+
50+
## Writing Good Changeset Messages
51+
52+
A good changeset message should:
53+
54+
- Explain **what** changed
55+
- Explain **why** it changed
56+
- Mention any **migration steps** for users (if applicable)
57+
58+
Example:
59+
60+
```md
61+
---
62+
"@laststance/git-gpt-commit": minor
63+
---
64+
65+
Add support for GPT-4 model selection. Users can now choose between different OpenAI models for generating commit messages using the `git gpt model` command.
66+
```
67+
68+
## Release Process
69+
70+
When ready to release:
71+
72+
1. Run the version command to update package.json and create a CHANGELOG.md:
73+
```bash
74+
npm run version
75+
```
76+
2. Review the generated CHANGELOG.md
77+
3. Commit the changes:
78+
```bash
79+
git add .
80+
git commit -m "chore: version release"
81+
```
82+
4. Create a version tag:
83+
```bash
84+
git tag v0.x.x
85+
```
86+
5. Push changes and tags:
87+
```bash
88+
git push origin main --tags
89+
```
90+
91+
## Changeset Types
92+
93+
- **fix**: Bug fixes (patch)
94+
- **feat**: New features (minor)
95+
- **chore**: Maintenance changes (typically no version bump)
96+
- **docs**: Documentation changes (typically no version bump)
97+
- **BREAKING CHANGE**: Major version bump (include details about migration)
98+
99+
## Examples
100+
101+
### Minor Feature Addition
102+
103+
```md
104+
---
105+
"@laststance/git-gpt-commit": minor
106+
---
107+
108+
Add support for custom language selection. Users can now specify their preferred language for commit messages using `git gpt lang`.
109+
```
110+
111+
### Bug Fix
112+
113+
```md
114+
---
115+
"@laststance/git-gpt-commit": patch
116+
---
117+
118+
Fix issue where quotes in commit messages were not properly escaped, causing git commit to fail.
119+
```
120+
121+
### Breaking Change
122+
123+
```md
124+
---
125+
"@laststance/git-gpt-commit": major
126+
---
127+
128+
Change CLI command structure from `git-gpt-commit` to `git gpt`. Users will need to update their command usage.
129+
```
130+
131+
---
132+
133+
*Always create a changeset for significant changes to ensure proper versioning and documentation.*

.cursor/rules/language.mdc

Lines changed: 73 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,80 @@
11
---
2-
description:
3-
globs:
2+
description:
3+
globs:
44
alwaysApply: false
55
---
66
# Language Preferences
77

8-
This project primarily uses English for:
9-
- Code comments
10-
- Variable and function names
11-
- Documentation
12-
- Test descriptions
8+
## Code Language
9+
10+
- **Use English for all code elements:**
11+
- Variable and function names
12+
- Comments
13+
- Documentation strings
14+
- Test descriptions
15+
16+
- **Follow JavaScript conventions:**
17+
- Use camelCase for variables and functions
18+
- Use PascalCase for classes
19+
- Use UPPERCASE_SNAKE_CASE for constants
20+
21+
## Commit Message Languages
1322

1423
The project supports generating commit messages in multiple languages:
15-
- English (default)
16-
- Spanish
17-
- Japanese (日本語)
18-
- French (Français)
19-
- German (Deutsch)
20-
- Italian (Italiano)
21-
- Korean (한국어)
22-
- Simplified Chinese (简体中文)
23-
- Traditional Chinese (繁體中文)
24-
- Dutch (Nederlands)
25-
- Russian (Русский)
26-
- Brazilian Portuguese (Português do Brasil)
27-
28-
When writing code or documentation for this project, please follow these guidelines:
29-
- Use English for all code and comments
30-
- Use clear, descriptive variable and function names
31-
- Follow JavaScript best practices and ES Module syntax
32-
- Make sure all documentation is accessible to international users
24+
25+
- **English** (default)
26+
- **Spanish** (Español)
27+
- **Japanese** (日本語)
28+
- **French** (Français)
29+
- **German** (Deutsch)
30+
- **Italian** (Italiano)
31+
- **Korean** (한국어)
32+
- **Simplified Chinese** (简体中文)
33+
- **Traditional Chinese** (繁體中文)
34+
- **Dutch** (Nederlands)
35+
- **Russian** (Русский)
36+
- **Brazilian Portuguese** (Português do Brasil)
37+
38+
Language selection is managed through the CLI:
39+
40+
```javascript
41+
// ✅ DO: Use the 'git gpt lang' command to select language
42+
// $ git gpt lang
43+
// Then select from the menu
44+
45+
// ❌ DON'T: Manually edit config files to change language
46+
```
47+
48+
## Documentation Guidelines
49+
50+
- **Write clear, concise documentation:**
51+
- Use complete sentences
52+
- Avoid jargon where possible
53+
- Provide examples for complex concepts
54+
55+
- **Make documentation accessible:**
56+
- Assume an international audience
57+
- Explain cultural references or idioms
58+
- Use simple language where possible
59+
60+
## Message Structure
61+
62+
- **Commit message prefixes (optional):**
63+
- `fix:` - Bug fixes
64+
- `feat:` - New features
65+
- `refactor:` - Code changes that neither fix bugs nor add features
66+
- `chore:` - Routine tasks, maintenance
67+
- `docs:` - Documentation changes
68+
- `style:` - Formatting, missing semicolons, etc.
69+
- `perf:` - Performance improvements
70+
- `test:` - Adding or refactoring tests
71+
- `ci:` - CI/CD related changes
72+
- `build:` - Build system or dependency changes
73+
- `revert:` - Reverting previous changes
74+
- `merge:` - Merge commits
75+
76+
Prefixes can be enabled or disabled using the `git gpt prefix` command.
77+
78+
---
79+
80+
*Adjust your language preferences by using the `git gpt lang` command.*

.cursor/rules/mcp.mdc

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: false
5+
---
6+
# MCP Architecture
7+
8+
The Model-Controller-Protocol (MCP) architecture is a communication standard used by Task Master to facilitate integration with AI assistants and IDEs like Cursor.
9+
10+
## Overview
11+
12+
- **Standardized Interface**: MCP defines a consistent API surface for tools to interact with Task Master
13+
- **Enhanced Performance**: Direct function calls provide better performance than CLI parsing
14+
- **Rich Error Handling**: Structured error responses with detailed context
15+
- **Bi-directional Communication**: Tools can return structured data objects
16+
17+
## MCP Server
18+
19+
The MCP server exposes Task Master functionality through a set of standardized tools that can be called by AI assistants or other integrated development environments. These tools provide the same functionality as the CLI commands but with a more structured interface.
20+
21+
## Key Benefits of MCP Tools
22+
23+
- **Direct Function Execution**: Bypasses CLI parsing overhead
24+
- **Structured Data Exchange**: Returns properly formatted JSON objects
25+
- **Better Error Handling**: Provides detailed error information
26+
- **Richer Context**: Can include additional metadata
27+
28+
## MCP vs CLI Usage
29+
30+
When to use MCP tools vs. CLI commands:
31+
32+
- **Use MCP tools when**:
33+
- Working with AI assistants like Cursor AI
34+
- Building integrations with Task Master
35+
- Performance and structured data are important
36+
- Error handling needs detailed context
37+
38+
- **Use CLI commands when**:
39+
- Working directly in the terminal
40+
- MCP server is unavailable
41+
- Building simple scripts
42+
- Human-readable output is preferred
43+
44+
## MCP Tool Structure
45+
46+
Each MCP tool follows a consistent structure:
47+
- `name`: The function name to be called
48+
- `parameters`: A structured object of parameters
49+
- `return`: A structured response with result and metadata
50+
51+
For a complete list of available MCP tools and their CLI equivalents, see [taskmaster.mdc](mdc:.cursor/rules/taskmaster.mdc).
52+
53+
## Configuration for MCP
54+
55+
To use MCP tools with Cursor:
56+
57+
1. Ensure the API keys for your AI providers are in the `env` section of `.cursor/mcp.json`
58+
2. Restart the MCP server if core Task Master logic changes
59+
3. MCP tools read configuration from the `.taskmasterconfig` file in the project root
60+
61+
---
62+
63+
*For more detailed information on using individual MCP tools, refer to the [Task Master Development Workflow Guide](mdc:.cursor/rules/dev_workflow.mdc).*

0 commit comments

Comments
 (0)