Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .cursor/commands/speckit.changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
description: 'Generate Rush changes entries for VChart monorepo based on commits since base branch; infer bump type; aggregate messages.'
handoffs:
- label: 'Commit Changes'
agent: 'speckit.commit'
prompt: 'Create a clean Conventional Commits commit and push if desired'
send: true
---

## User Input

```text
$ARGUMENTS
```

## Outline

1. **Read Inputs**:
- `sinceBranch` (default: `develop`): The base branch for collecting commits.
- `bumpType` (default: `auto`): Explicit bump type (`patch`, `minor`, `major`). If `auto`, infer from commit messages.
- `message` (optional): A custom message to use for the changelog entry.

2. **Gather Context**:
- Collect commits and file changes between `sinceBranch` and `HEAD`.
- If `bumpType` is `auto`, analyze commit messages (`feat`, `fix`, `BREAKING CHANGE`) to determine the appropriate version bump.

3. **Execute Rush Change**:
- The agent will run `rush change`, providing the determined bump type and an aggregated message.
- The message is constructed from the `message` input or summarized from commit history (and enriched with issue titles if `githubToken` is present).
- This action generates changelog files under `common/changes/`.

4. **Report Outputs**:
- List the paths of the generated changelog files.
- Confirm the final message used.
- Verify that the generated message complies with Conventional Commits (`commitlint`) standards.
35 changes: 35 additions & 0 deletions .cursor/commands/speckit.commit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
description: "Create an intelligent commit (Conventional Commits) bundling workspace changes; optionally push to origin."
handoffs:
- label: "Generate PR Body"
agent: "speckit.prgenerate"
prompt: "Generate a PR body from templates and artifacts"
send: true
---

## User Input

```text
$ARGUMENTS
```

## Outline

1. **Pre-flight Checks**:
* Verify the current branch and check if the working tree is dirty.
* If `commitAllowEmpty=false` (default) and there are no changes, the process will be skipped.

2. **Generate Commit Message**:
* **Priority 1**: Use the `message` argument if provided.
* **Priority 2**: If no message is provided, extract the subject from the latest entry in `common/changes/`.
* **Priority 3**: If neither is available, generate a generic subject like `chore: sync changes (N files)`.
* The commit type and scope are inferred from file paths and changelog entries.

3. **Execute Git Actions**:
* The agent will run `git add --all` to stage all changes.
* It will then execute `git commit` with the generated message.
* If `pushAfterCommit=true` (default), it will push the commit to the remote origin.

4. **Report Outputs**:
* `commit_message`: The full commit message used.
* `pushed_branch`: The name of the branch that was pushed (if applicable).
5 changes: 5 additions & 0 deletions .cursor/commands/speckit.implement.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
description: Execute the implementation plan by processing and executing all tasks defined in tasks.md
handoffs:
- label: Generate Changelog
agent: speckit.changelog
prompt: Generate Rush changes entries from current work
send: true
---

## User Input
Expand Down
36 changes: 36 additions & 0 deletions .cursor/commands/speckit.prcreate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
description: 'Create a GitHub Pull Request using local body file via gh CLI (browser auth).'
---

## User Input

```text
$ARGUMENTS
```

You **MUST** consider the user input before proceeding (if not empty).

## Outline

1. **Check Inputs**:
- **Title**: The Pull Request title (Required).
- **Head Branch**: Source branch (defaults to current branch: `git branch --show-current`).
- **Base Branch**: Target branch (defaults to `develop`).
- **Body File**: Path to PR body content (defaults to `.trae/output/pr.body.local.md`).

2. **Verify Environment**:
- Check if `gh` CLI is installed: `gh --version`.
- Check authentication status: `gh auth status`.
- **Note**: Explicitly ignore `GITHUB_TOKEN` env var to force browser-based auth if needed.

3. **Execute PR Creation**:
- Construct and run the `gh pr create` command:
```bash
gh pr create --title "<TITLE>" --body-file "<BODY_FILE>" --base "<BASE>" --head "<HEAD>" --web
```
- Note: The `--web` flag is optional but recommended if the user wants to review in browser before final submission, otherwise remove it to create directly. Based on user preference or default to direct creation if not specified.

4. **Report Output**:
- Capture the command output.
- Display the URL of the newly created Pull Request.
- Verify the URL is valid.
51 changes: 51 additions & 0 deletions .cursor/commands/speckit.prgenerate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
description: 'Generate a well-formed PR body using repo template and local artifacts (changelog, auto-test report). Save to .trae/output/pr.body.local.md by default.'
handoffs:
- label: 'Create Pull Request'
agent: 'speckit.prcreate'
prompt: 'Create the GitHub Pull Request using the generated body'
send: true
---

## User Input

```text
$ARGUMENTS
```

You **MUST** consider the user input before proceeding (if not empty).

## Outline

1. **Determine Template and Context**:
- **Select Template**:
- Check user input for language preference (English or Chinese).
- If Chinese, use template at: `.github/PULL_REQUEST_TEMPLATE/pr_cn.md`
- If English or unspecified, use template at: `.github/PULL_REQUEST_TEMPLATE.md`
- **Infer Context**:
- Get current branch name using `git branch --show-current`.
- Get recent commit messages using `git log -5 --pretty=format:"%s"`.
- Infer PR type (feat, fix, docs, etc.) to verify the checklist items.

2. **Populate Body Sections**:
- **Changelog**:
- Check `common/changes` directory for change files.
- If files exist, parse them to summarize changes for the `Changelog` section.
- If no files, mark as "N/A" or leave empty.
- **Self-test Summary**:
- Read report from `.trae/output/autotest.report.local.md`.
- If file exists, append summary to the body.
- If missing, add a placeholder indicating no automated test report.
- **Background/Solution**:
- Synthesize a description from commit messages and user input.
- Fill in the "Background and solution" section of the template.

3. **Generate and Save**:
- **Generate Title**: Create a concise PR title following Conventional Commits (e.g., `feat: add new chart type`).
- **Preview**: Display the generated title and body content to the user for review.
- **Save**: Write the final content to `.trae/output/pr.body.local.md`.
- **Verify**: Check if the file `.trae/output/pr.body.local.md` was created successfully.

4. **Validation Checklist**:
- Confirm the output file exists.
- Ask user to review the generated body in `.trae/output/pr.body.local.md`.
3 changes: 3 additions & 0 deletions .cursor/rules/specify-rules.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Auto-generated from all feature plans. Last updated: 2026-01-15

## Active Technologies
- TypeScript/React 18 + @visactor/react-vchart, @visactor/vchar (001-react-vchart-demo)

- TypeScript 4.9.5 + @visactor/vchart, @visactor/vrender-components (~1.0.37), @visactor/vutils (001-scrollbar-wheel-step)

Expand All @@ -22,6 +23,8 @@ npm test && npm run lint
TypeScript 4.9.5: Follow standard conventions

## Recent Changes
- 001-react-vchart-demo: Added TypeScript/React 18 + @visactor/react-vchart, @visactor/vchar
- 001-react-vchart-demo: Added [if applicable, e.g., PostgreSQL, CoreData, files or N/A]

- 001-scrollbar-wheel-step: Added TypeScript 4.9.5 + @visactor/vchart, @visactor/vrender-components (~1.0.37), @visactor/vutils

Expand Down
133 changes: 0 additions & 133 deletions .trae/skills/auto-flow/SKILL.md

This file was deleted.

72 changes: 0 additions & 72 deletions .trae/skills/auto-flow/docs/USAGE.md

This file was deleted.

Loading