@rotifer/playground 0.5.0-alpha.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +159 -15
- package/LICENSE +1 -1
- package/README.md +51 -23
- package/README.zh.md +54 -25
- package/dist/cloud/auth.d.ts +7 -1
- package/dist/cloud/auth.d.ts.map +1 -1
- package/dist/cloud/auth.js +65 -1
- package/dist/cloud/auth.js.map +1 -1
- package/dist/cloud/client.d.ts +4 -1
- package/dist/cloud/client.d.ts.map +1 -1
- package/dist/cloud/client.js +9 -2
- package/dist/cloud/client.js.map +1 -1
- package/dist/cloud/types.d.ts +3 -1
- package/dist/cloud/types.d.ts.map +1 -1
- package/dist/cloud/types.js.map +1 -1
- package/dist/commands/agent-create.d.ts.map +1 -1
- package/dist/commands/agent-create.js +66 -3
- package/dist/commands/agent-create.js.map +1 -1
- package/dist/commands/agent-run.d.ts.map +1 -1
- package/dist/commands/agent-run.js +296 -32
- package/dist/commands/agent-run.js.map +1 -1
- package/dist/commands/arena-submit.d.ts.map +1 -1
- package/dist/commands/arena-submit.js +45 -17
- package/dist/commands/arena-submit.js.map +1 -1
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +9 -3
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +13 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +23 -16
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/network.js +4 -4
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +162 -44
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +209 -23
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/wrap.d.ts.map +1 -1
- package/dist/commands/wrap.js +17 -1
- package/dist/commands/wrap.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/runtime/network-gateway.d.ts +53 -0
- package/dist/runtime/network-gateway.d.ts.map +1 -0
- package/dist/runtime/network-gateway.js +147 -0
- package/dist/runtime/network-gateway.js.map +1 -0
- package/dist/utils/binding.d.ts +25 -0
- package/dist/utils/binding.d.ts.map +1 -1
- package/dist/utils/binding.js.map +1 -1
- package/dist/utils/open-browser.d.ts +10 -0
- package/dist/utils/open-browser.d.ts.map +1 -0
- package/dist/utils/open-browser.js +23 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/genes/academic-writer/.cloud-manifest.json +6 -0
- package/genes/academic-writer/.gene-manifest.json +8 -0
- package/genes/academic-writer/SKILL.md +274 -0
- package/genes/academic-writer/phenotype.json +28 -0
- package/genes/ai-components/.cloud-manifest.json +6 -0
- package/genes/ai-components/.gene-manifest.json +8 -0
- package/genes/ai-components/SKILL.md +381 -0
- package/genes/ai-components/phenotype.json +28 -0
- package/genes/algorithmic-art/.cloud-manifest.json +6 -0
- package/genes/algorithmic-art/.gene-manifest.json +8 -0
- package/genes/algorithmic-art/SKILL.md +405 -0
- package/genes/algorithmic-art/phenotype.json +28 -0
- package/genes/answer-synthesizer/.cloud-manifest.json +6 -0
- package/genes/answer-synthesizer/index.ts +194 -0
- package/genes/answer-synthesizer/phenotype.json +61 -0
- package/genes/api-designer/.cloud-manifest.json +6 -0
- package/genes/api-designer/.gene-manifest.json +8 -0
- package/genes/api-designer/SKILL.md +456 -0
- package/genes/api-designer/phenotype.json +28 -0
- package/genes/auto-coder/.cloud-manifest.json +6 -0
- package/genes/auto-coder/.gene-manifest.json +8 -0
- package/genes/auto-coder/SKILL.md +400 -0
- package/genes/auto-coder/phenotype.json +28 -0
- package/genes/auto-writer/.cloud-manifest.json +6 -0
- package/genes/auto-writer/.gene-manifest.json +8 -0
- package/genes/auto-writer/SKILL.md +361 -0
- package/genes/auto-writer/phenotype.json +28 -0
- package/genes/brand-personality/.cloud-manifest.json +6 -0
- package/genes/brand-personality/.gene-manifest.json +8 -0
- package/genes/brand-personality/SKILL.md +549 -0
- package/genes/brand-personality/phenotype.json +28 -0
- package/genes/business-writer/.cloud-manifest.json +6 -0
- package/genes/business-writer/.gene-manifest.json +8 -0
- package/genes/business-writer/SKILL.md +448 -0
- package/genes/business-writer/phenotype.json +28 -0
- package/genes/citation-manager/.cloud-manifest.json +6 -0
- package/genes/citation-manager/.gene-manifest.json +8 -0
- package/genes/citation-manager/SKILL.md +279 -0
- package/genes/citation-manager/index.ts +162 -0
- package/genes/citation-manager/package.json +1 -0
- package/genes/citation-manager/phenotype.json +50 -0
- package/genes/code-complexity/.cloud-manifest.json +6 -0
- package/genes/code-complexity/README.md +35 -0
- package/genes/code-complexity/index.ts +101 -0
- package/genes/code-complexity/phenotype.json +34 -0
- package/genes/copywriter/.cloud-manifest.json +6 -0
- package/genes/copywriter/.gene-manifest.json +8 -0
- package/genes/copywriter/SKILL.md +329 -0
- package/genes/copywriter/phenotype.json +28 -0
- package/genes/creative-writer/.cloud-manifest.json +6 -0
- package/genes/creative-writer/.gene-manifest.json +8 -0
- package/genes/creative-writer/SKILL.md +356 -0
- package/genes/creative-writer/phenotype.json +28 -0
- package/genes/data-modeler/.cloud-manifest.json +6 -0
- package/genes/data-modeler/.gene-manifest.json +8 -0
- package/genes/data-modeler/SKILL.md +486 -0
- package/genes/data-modeler/phenotype.json +28 -0
- package/genes/debugger/.cloud-manifest.json +6 -0
- package/genes/debugger/.gene-manifest.json +8 -0
- package/genes/debugger/SKILL.md +416 -0
- package/genes/debugger/phenotype.json +28 -0
- package/genes/design-tokens/.cloud-manifest.json +6 -0
- package/genes/design-tokens/.gene-manifest.json +8 -0
- package/genes/design-tokens/SKILL.md +222 -0
- package/genes/design-tokens/index.ts +128 -0
- package/genes/design-tokens/package.json +1 -0
- package/genes/design-tokens/phenotype.json +1 -0
- package/genes/devops-automator/.cloud-manifest.json +6 -0
- package/genes/devops-automator/.gene-manifest.json +8 -0
- package/genes/devops-automator/SKILL.md +490 -0
- package/genes/devops-automator/phenotype.json +28 -0
- package/genes/doc-coauthoring/.cloud-manifest.json +6 -0
- package/genes/doc-coauthoring/.gene-manifest.json +8 -0
- package/genes/doc-coauthoring/SKILL.md +375 -0
- package/genes/doc-coauthoring/phenotype.json +28 -0
- package/genes/doc-retrieval/.cloud-manifest.json +6 -0
- package/genes/doc-retrieval/index.ts +134 -0
- package/genes/doc-retrieval/phenotype.json +54 -0
- package/genes/docs-writer/.cloud-manifest.json +6 -0
- package/genes/docs-writer/.gene-manifest.json +8 -0
- package/genes/docs-writer/SKILL.md +492 -0
- package/genes/docs-writer/phenotype.json +28 -0
- package/genes/evolve-life/.cloud-manifest.json +6 -0
- package/genes/evolve-life/.compile-result.json +12 -0
- package/genes/evolve-life/README.md +52 -0
- package/genes/evolve-life/gene.ir.wasm +0 -0
- package/genes/evolve-life/gene.wasm +0 -0
- package/genes/evolve-life/index.ts +255 -0
- package/genes/evolve-life/phenotype.json +129 -0
- package/genes/evolve-life-bitwise/.cloud-manifest.json +6 -0
- package/genes/evolve-life-bitwise/.compile-result.json +12 -0
- package/genes/evolve-life-bitwise/gene.ir.wasm +0 -0
- package/genes/evolve-life-bitwise/gene.wasm +0 -0
- package/genes/evolve-life-bitwise/index.ts +273 -0
- package/genes/evolve-life-bitwise/phenotype.json +129 -0
- package/genes/evolve-life-sparse/.cloud-manifest.json +6 -0
- package/genes/evolve-life-sparse/.compile-result.json +12 -0
- package/genes/evolve-life-sparse/gene.ir.wasm +0 -0
- package/genes/evolve-life-sparse/gene.wasm +0 -0
- package/genes/evolve-life-sparse/index.ts +236 -0
- package/genes/evolve-life-sparse/phenotype.json +129 -0
- package/genes/fact-checker/.cloud-manifest.json +6 -0
- package/genes/fact-checker/.gene-manifest.json +8 -0
- package/genes/fact-checker/SKILL.md +373 -0
- package/genes/fact-checker/phenotype.json +28 -0
- package/genes/genesis-code-format/.cloud-manifest.json +6 -0
- package/genes/genesis-code-format/package.json +1 -0
- package/genes/genesis-code-format/phenotype.json +1 -0
- package/genes/genesis-file-read/.cloud-manifest.json +6 -0
- package/genes/genesis-file-read/index.ts +11 -1
- package/genes/genesis-file-read/package.json +1 -0
- package/genes/genesis-file-read/phenotype.json +1 -0
- package/genes/genesis-l0-constraint/.cloud-manifest.json +6 -0
- package/genes/genesis-l0-constraint/package.json +1 -0
- package/genes/genesis-l0-constraint/phenotype.json +1 -0
- package/genes/genesis-web-search/.cloud-manifest.json +2 -2
- package/genes/genesis-web-search/package.json +1 -0
- package/genes/genesis-web-search/phenotype.json +1 -0
- package/genes/genesis-web-search-lite/.cloud-manifest.json +6 -0
- package/genes/genesis-web-search-lite/package.json +1 -0
- package/genes/genesis-web-search-lite/phenotype.json +1 -0
- package/genes/git-workflow/.cloud-manifest.json +6 -0
- package/genes/git-workflow/.gene-manifest.json +8 -0
- package/genes/git-workflow/SKILL.md +407 -0
- package/genes/git-workflow/phenotype.json +28 -0
- package/genes/grammar-checker/.cloud-manifest.json +6 -0
- package/genes/grammar-checker/.gene-manifest.json +8 -0
- package/genes/grammar-checker/SKILL.md +194 -0
- package/genes/grammar-checker/index.ts +168 -0
- package/genes/grammar-checker/package.json +1 -0
- package/genes/grammar-checker/phenotype.json +52 -0
- package/genes/json-validator/.cloud-manifest.json +6 -0
- package/genes/json-validator/README.md +42 -0
- package/genes/json-validator/index.ts +112 -0
- package/genes/json-validator/phenotype.json +42 -0
- package/genes/license-advisor/.cloud-manifest.json +6 -0
- package/genes/license-advisor/.gene-manifest.json +8 -0
- package/genes/license-advisor/SKILL.md +117 -0
- package/genes/license-advisor/phenotype.json +28 -0
- package/genes/logic-architect/.cloud-manifest.json +6 -0
- package/genes/logic-architect/.gene-manifest.json +8 -0
- package/genes/logic-architect/SKILL.md +451 -0
- package/genes/logic-architect/phenotype.json +28 -0
- package/genes/markdown-formatter/.cloud-manifest.json +6 -0
- package/genes/markdown-formatter/README.md +34 -0
- package/genes/markdown-formatter/index.ts +86 -0
- package/genes/markdown-formatter/phenotype.json +32 -0
- package/genes/orch/.cloud-manifest.json +6 -0
- package/genes/orch/.gene-manifest.json +8 -0
- package/genes/orch/SKILL.md +504 -0
- package/genes/orch/phenotype.json +28 -0
- package/genes/particle-barneshut/.cloud-manifest.json +6 -0
- package/genes/particle-barneshut/.compile-result.json +12 -0
- package/genes/particle-barneshut/README.md +55 -0
- package/genes/particle-barneshut/gene.ir.wasm +0 -0
- package/genes/particle-barneshut/gene.wasm +0 -0
- package/genes/particle-barneshut/index.ts +486 -0
- package/genes/particle-barneshut/phenotype.json +137 -0
- package/genes/particle-brute/.cloud-manifest.json +6 -0
- package/genes/particle-brute/.compile-result.json +12 -0
- package/genes/particle-brute/README.md +55 -0
- package/genes/particle-brute/gene.ir.wasm +0 -0
- package/genes/particle-brute/gene.wasm +0 -0
- package/genes/particle-brute/index.ts +277 -0
- package/genes/particle-brute/phenotype.json +137 -0
- package/genes/particle-spatial/.cloud-manifest.json +6 -0
- package/genes/particle-spatial/.compile-result.json +12 -0
- package/genes/particle-spatial/README.md +53 -0
- package/genes/particle-spatial/gene.ir.wasm +0 -0
- package/genes/particle-spatial/gene.wasm +0 -0
- package/genes/particle-spatial/index.ts +352 -0
- package/genes/particle-spatial/phenotype.json +137 -0
- package/genes/performance-optimizer/.cloud-manifest.json +6 -0
- package/genes/performance-optimizer/.gene-manifest.json +8 -0
- package/genes/performance-optimizer/SKILL.md +480 -0
- package/genes/performance-optimizer/phenotype.json +28 -0
- package/genes/plagiarism-checker/.cloud-manifest.json +6 -0
- package/genes/plagiarism-checker/.gene-manifest.json +8 -0
- package/genes/plagiarism-checker/SKILL.md +342 -0
- package/genes/plagiarism-checker/phenotype.json +28 -0
- package/genes/product-manager/.cloud-manifest.json +6 -0
- package/genes/product-manager/.gene-manifest.json +8 -0
- package/genes/product-manager/SKILL.md +249 -0
- package/genes/product-manager/phenotype.json +28 -0
- package/genes/project-reviewer/.cloud-manifest.json +6 -0
- package/genes/project-reviewer/.gene-manifest.json +8 -0
- package/genes/project-reviewer/SKILL.md +312 -0
- package/genes/project-reviewer/phenotype.json +28 -0
- package/genes/prompt-engineer/.cloud-manifest.json +6 -0
- package/genes/prompt-engineer/.gene-manifest.json +8 -0
- package/genes/prompt-engineer/SKILL.md +411 -0
- package/genes/prompt-engineer/phenotype.json +28 -0
- package/genes/readability-analyzer/.cloud-manifest.json +6 -0
- package/genes/readability-analyzer/.gene-manifest.json +8 -0
- package/genes/readability-analyzer/SKILL.md +357 -0
- package/genes/readability-analyzer/index.ts +123 -0
- package/genes/readability-analyzer/package.json +1 -0
- package/genes/readability-analyzer/phenotype.json +35 -0
- package/genes/rotifer-protocol/SKILL.md +121 -0
- package/genes/security-auditor/.cloud-manifest.json +6 -0
- package/genes/security-auditor/.gene-manifest.json +8 -0
- package/genes/security-auditor/SKILL.md +494 -0
- package/genes/security-auditor/phenotype.json +28 -0
- package/genes/seo-optimizer/.cloud-manifest.json +6 -0
- package/genes/seo-optimizer/.gene-manifest.json +8 -0
- package/genes/seo-optimizer/SKILL.md +327 -0
- package/genes/seo-optimizer/index.ts +206 -0
- package/genes/seo-optimizer/package.json +1 -0
- package/genes/seo-optimizer/phenotype.json +1 -0
- package/genes/source-linker/.cloud-manifest.json +6 -0
- package/genes/source-linker/index.ts +88 -0
- package/genes/source-linker/phenotype.json +45 -0
- package/genes/style-optimizer/.cloud-manifest.json +6 -0
- package/genes/style-optimizer/.gene-manifest.json +8 -0
- package/genes/style-optimizer/SKILL.md +285 -0
- package/genes/style-optimizer/phenotype.json +28 -0
- package/genes/tech-lead/.cloud-manifest.json +6 -0
- package/genes/tech-lead/.gene-manifest.json +8 -0
- package/genes/tech-lead/SKILL.md +451 -0
- package/genes/tech-lead/phenotype.json +28 -0
- package/genes/test-wrap/.cloud-manifest.json +6 -0
- package/genes/test-wrap/.gene-manifest.json +8 -0
- package/genes/test-wrap/phenotype.json +28 -0
- package/genes/testing-strategist/.cloud-manifest.json +6 -0
- package/genes/testing-strategist/.gene-manifest.json +8 -0
- package/genes/testing-strategist/SKILL.md +500 -0
- package/genes/testing-strategist/phenotype.json +28 -0
- package/genes/text-summarizer/.cloud-manifest.json +6 -0
- package/genes/text-summarizer/README.md +34 -0
- package/genes/text-summarizer/index.ts +122 -0
- package/genes/text-summarizer/phenotype.json +32 -0
- package/genes/tone-analyzer/.cloud-manifest.json +6 -0
- package/genes/tone-analyzer/.gene-manifest.json +8 -0
- package/genes/tone-analyzer/SKILL.md +410 -0
- package/genes/tone-analyzer/phenotype.json +28 -0
- package/genes/translator/.cloud-manifest.json +6 -0
- package/genes/translator/.gene-manifest.json +8 -0
- package/genes/translator/SKILL.md +355 -0
- package/genes/translator/phenotype.json +28 -0
- package/genes/ui-components/.cloud-manifest.json +6 -0
- package/genes/ui-components/.gene-manifest.json +8 -0
- package/genes/ui-components/SKILL.md +467 -0
- package/genes/ui-components/phenotype.json +28 -0
- package/genes/uiux-designer/.cloud-manifest.json +6 -0
- package/genes/uiux-designer/.gene-manifest.json +8 -0
- package/genes/uiux-designer/SKILL.md +353 -0
- package/genes/uiux-designer/phenotype.json +28 -0
- package/genes/url-extractor/.cloud-manifest.json +6 -0
- package/genes/url-extractor/README.md +37 -0
- package/genes/url-extractor/index.ts +86 -0
- package/genes/url-extractor/phenotype.json +48 -0
- package/genes/ux-patterns/.cloud-manifest.json +6 -0
- package/genes/ux-patterns/.gene-manifest.json +8 -0
- package/genes/ux-patterns/SKILL.md +872 -0
- package/genes/ux-patterns/phenotype.json +28 -0
- package/genes/web3-components/.cloud-manifest.json +6 -0
- package/genes/web3-components/.gene-manifest.json +8 -0
- package/genes/web3-components/SKILL.md +390 -0
- package/genes/web3-components/phenotype.json +28 -0
- package/package.json +6 -5
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: git-workflow
|
|
3
|
+
description: Standardize Git workflow with conventional commits, PR templates, branch naming, and changelog generation. Use when committing code, creating PRs, managing releases, or when the user mentions git, commit, pull request, branch, or changelog.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Git Workflow (Git 工作流)
|
|
7
|
+
|
|
8
|
+
**Goal**: 规范化 Git 操作,确保提交历史清晰、可追溯、自动化友好。
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Conventional Commits
|
|
13
|
+
|
|
14
|
+
### 提交格式
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
<type>(<scope>): <subject>
|
|
18
|
+
|
|
19
|
+
[optional body]
|
|
20
|
+
|
|
21
|
+
[optional footer]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Type 类型
|
|
25
|
+
|
|
26
|
+
| Type | 说明 | 示例 |
|
|
27
|
+
|------|------|------|
|
|
28
|
+
| `feat` | 新功能 | feat(chat): add streaming response |
|
|
29
|
+
| `fix` | 修复 Bug | fix(wallet): handle disconnect state |
|
|
30
|
+
| `docs` | 文档更新 | docs(readme): update installation |
|
|
31
|
+
| `style` | 代码格式 | style: format with prettier |
|
|
32
|
+
| `refactor` | 重构 | refactor(api): extract service layer |
|
|
33
|
+
| `perf` | 性能优化 | perf(query): add database index |
|
|
34
|
+
| `test` | 测试 | test(auth): add unit tests |
|
|
35
|
+
| `chore` | 构建/工具 | chore(deps): update dependencies |
|
|
36
|
+
| `ci` | CI 配置 | ci: add github actions |
|
|
37
|
+
|
|
38
|
+
### Scope 范围 (项目特定)
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
AI 项目常用:
|
|
42
|
+
- chat, prompt, model, stream, agent
|
|
43
|
+
|
|
44
|
+
Web3 项目常用:
|
|
45
|
+
- wallet, tx, contract, chain, sign
|
|
46
|
+
|
|
47
|
+
通用:
|
|
48
|
+
- api, auth, db, ui, config
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Subject 规则
|
|
52
|
+
|
|
53
|
+
- 使用祈使句 ("add" 而非 "added")
|
|
54
|
+
- 首字母小写
|
|
55
|
+
- 不加句号
|
|
56
|
+
- 限制 50 字符
|
|
57
|
+
|
|
58
|
+
### 示例
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# 简单
|
|
62
|
+
feat(chat): add message history
|
|
63
|
+
|
|
64
|
+
# 带 body
|
|
65
|
+
fix(wallet): handle network switch during transaction
|
|
66
|
+
|
|
67
|
+
The wallet would crash when user switches network while
|
|
68
|
+
a transaction is pending. Now we cancel the pending tx
|
|
69
|
+
and show an error message.
|
|
70
|
+
|
|
71
|
+
# 带 breaking change
|
|
72
|
+
feat(api)!: change response format to JSON:API
|
|
73
|
+
|
|
74
|
+
BREAKING CHANGE: API responses now follow JSON:API spec.
|
|
75
|
+
Old format is no longer supported.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 2. Branch Naming
|
|
81
|
+
|
|
82
|
+
### 格式
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
<type>/<ticket>-<description>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 示例
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
feat/PROJ-123-add-wallet-connect
|
|
92
|
+
fix/PROJ-456-streaming-timeout
|
|
93
|
+
refactor/no-ticket-cleanup-hooks
|
|
94
|
+
hotfix/critical-security-patch
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 分支策略 (Trunk-Based for OPC)
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
main (production)
|
|
101
|
+
↑
|
|
102
|
+
└── feat/xxx (short-lived feature branches)
|
|
103
|
+
└── fix/xxx
|
|
104
|
+
└── hotfix/xxx (直接合并 main)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**OPC 简化原则**:
|
|
108
|
+
- 不需要 develop 分支
|
|
109
|
+
- Feature 分支尽快合并 (1-3 天)
|
|
110
|
+
- Hotfix 直接从 main 创建并合并
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 3. Pull Request Template
|
|
115
|
+
|
|
116
|
+
### 模板 (.github/pull_request_template.md)
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
## Summary
|
|
120
|
+
<!-- 一句话描述这个 PR 做了什么 -->
|
|
121
|
+
|
|
122
|
+
## Changes
|
|
123
|
+
<!-- 列出主要变更 -->
|
|
124
|
+
-
|
|
125
|
+
-
|
|
126
|
+
-
|
|
127
|
+
|
|
128
|
+
## Type
|
|
129
|
+
<!-- 选择一个 -->
|
|
130
|
+
- [ ] feat: 新功能
|
|
131
|
+
- [ ] fix: Bug 修复
|
|
132
|
+
- [ ] refactor: 重构
|
|
133
|
+
- [ ] docs: 文档
|
|
134
|
+
- [ ] test: 测试
|
|
135
|
+
- [ ] chore: 其他
|
|
136
|
+
|
|
137
|
+
## Testing
|
|
138
|
+
<!-- 如何验证这些变更 -->
|
|
139
|
+
- [ ] 本地测试通过
|
|
140
|
+
- [ ] 单元测试通过
|
|
141
|
+
- [ ] E2E 测试通过 (如适用)
|
|
142
|
+
|
|
143
|
+
## Screenshots
|
|
144
|
+
<!-- 如有 UI 变更,附截图 -->
|
|
145
|
+
|
|
146
|
+
## Checklist
|
|
147
|
+
- [ ] 代码已自审
|
|
148
|
+
- [ ] 无 console.log
|
|
149
|
+
- [ ] 类型定义完整
|
|
150
|
+
- [ ] 文档已更新 (如需要)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### PR 标题规范
|
|
154
|
+
|
|
155
|
+
遵循 Conventional Commits 格式:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
feat(chat): add streaming response support
|
|
159
|
+
fix(wallet): handle disconnect state
|
|
160
|
+
refactor(api): extract service layer
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## 4. Commit Message Templates
|
|
166
|
+
|
|
167
|
+
### Git 配置
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# 设置提交模板
|
|
171
|
+
git config --global commit.template ~/.gitmessage
|
|
172
|
+
|
|
173
|
+
# ~/.gitmessage
|
|
174
|
+
# <type>(<scope>): <subject>
|
|
175
|
+
#
|
|
176
|
+
# <body>
|
|
177
|
+
#
|
|
178
|
+
# <footer>
|
|
179
|
+
#
|
|
180
|
+
# Types: feat, fix, docs, style, refactor, perf, test, chore, ci
|
|
181
|
+
# Scope: chat, wallet, api, auth, ui, config, etc.
|
|
182
|
+
# Subject: imperative, lowercase, no period, max 50 chars
|
|
183
|
+
# Body: explain what and why (not how), wrap at 72 chars
|
|
184
|
+
# Footer: BREAKING CHANGE, Closes #issue
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### 快速提交脚本
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# scripts/commit.sh
|
|
191
|
+
#!/bin/bash
|
|
192
|
+
|
|
193
|
+
types=("feat" "fix" "docs" "style" "refactor" "perf" "test" "chore" "ci")
|
|
194
|
+
|
|
195
|
+
echo "Select type:"
|
|
196
|
+
select type in "${types[@]}"; do
|
|
197
|
+
break
|
|
198
|
+
done
|
|
199
|
+
|
|
200
|
+
read -p "Scope (optional): " scope
|
|
201
|
+
read -p "Subject: " subject
|
|
202
|
+
|
|
203
|
+
if [ -n "$scope" ]; then
|
|
204
|
+
git commit -m "$type($scope): $subject"
|
|
205
|
+
else
|
|
206
|
+
git commit -m "$type: $subject"
|
|
207
|
+
fi
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## 5. Changelog Generation
|
|
213
|
+
|
|
214
|
+
### 自动生成 (使用 conventional-changelog)
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# 安装
|
|
218
|
+
pnpm add -D conventional-changelog-cli
|
|
219
|
+
|
|
220
|
+
# 生成
|
|
221
|
+
npx conventional-changelog -p angular -i CHANGELOG.md -s
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### 手动模板
|
|
225
|
+
|
|
226
|
+
```markdown
|
|
227
|
+
# Changelog
|
|
228
|
+
|
|
229
|
+
## [1.2.0] - 2024-01-15
|
|
230
|
+
|
|
231
|
+
### Added
|
|
232
|
+
- feat(chat): streaming response support
|
|
233
|
+
- feat(wallet): multi-chain support
|
|
234
|
+
|
|
235
|
+
### Fixed
|
|
236
|
+
- fix(api): rate limiting edge case
|
|
237
|
+
- fix(ui): mobile responsive issues
|
|
238
|
+
|
|
239
|
+
### Changed
|
|
240
|
+
- refactor(auth): simplify token refresh logic
|
|
241
|
+
|
|
242
|
+
### Security
|
|
243
|
+
- security: upgrade vulnerable dependencies
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## 6. Release Workflow
|
|
249
|
+
|
|
250
|
+
### 版本号规范 (SemVer)
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
MAJOR.MINOR.PATCH
|
|
254
|
+
|
|
255
|
+
1.0.0 → 1.0.1 (patch: bug fixes)
|
|
256
|
+
1.0.0 → 1.1.0 (minor: new features, backward compatible)
|
|
257
|
+
1.0.0 → 2.0.0 (major: breaking changes)
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### 发布流程
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# 1. 确保 main 分支最新
|
|
264
|
+
git checkout main && git pull
|
|
265
|
+
|
|
266
|
+
# 2. 更新版本号
|
|
267
|
+
npm version minor # 或 major/patch
|
|
268
|
+
|
|
269
|
+
# 3. 生成 changelog
|
|
270
|
+
npx conventional-changelog -p angular -i CHANGELOG.md -s
|
|
271
|
+
|
|
272
|
+
# 4. 提交
|
|
273
|
+
git add CHANGELOG.md
|
|
274
|
+
git commit --amend --no-edit
|
|
275
|
+
|
|
276
|
+
# 5. 推送 (包含 tag)
|
|
277
|
+
git push && git push --tags
|
|
278
|
+
|
|
279
|
+
# 6. GitHub 自动发布 (通过 CI)
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### GitHub Release 模板
|
|
283
|
+
|
|
284
|
+
```markdown
|
|
285
|
+
## What's New
|
|
286
|
+
|
|
287
|
+
### Features
|
|
288
|
+
- ✨ Streaming response support (#123)
|
|
289
|
+
- ✨ Multi-chain wallet connection (#124)
|
|
290
|
+
|
|
291
|
+
### Bug Fixes
|
|
292
|
+
- 🐛 Fixed rate limiting edge case (#125)
|
|
293
|
+
|
|
294
|
+
### Breaking Changes
|
|
295
|
+
- ⚠️ API response format changed to JSON:API
|
|
296
|
+
|
|
297
|
+
## Upgrade Guide
|
|
298
|
+
|
|
299
|
+
If you're upgrading from v1.x:
|
|
300
|
+
1. Update API client to handle new response format
|
|
301
|
+
2. ...
|
|
302
|
+
|
|
303
|
+
## Full Changelog
|
|
304
|
+
https://github.com/user/repo/compare/v1.1.0...v1.2.0
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## 7. Git Hooks
|
|
310
|
+
|
|
311
|
+
### Husky 配置
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# 安装
|
|
315
|
+
pnpm add -D husky
|
|
316
|
+
pnpm exec husky init
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### Pre-commit Hook
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# .husky/pre-commit
|
|
323
|
+
pnpm lint-staged
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Commit-msg Hook (验证格式)
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
# .husky/commit-msg
|
|
330
|
+
npx --no -- commitlint --edit $1
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### commitlint 配置
|
|
334
|
+
|
|
335
|
+
```javascript
|
|
336
|
+
// commitlint.config.js
|
|
337
|
+
module.exports = {
|
|
338
|
+
extends: ['@commitlint/config-conventional'],
|
|
339
|
+
rules: {
|
|
340
|
+
'scope-enum': [2, 'always', [
|
|
341
|
+
'chat', 'wallet', 'api', 'auth', 'ui', 'config',
|
|
342
|
+
'prompt', 'model', 'tx', 'contract'
|
|
343
|
+
]],
|
|
344
|
+
},
|
|
345
|
+
}
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### lint-staged 配置
|
|
349
|
+
|
|
350
|
+
```javascript
|
|
351
|
+
// lint-staged.config.js
|
|
352
|
+
module.exports = {
|
|
353
|
+
'*.{ts,tsx}': ['eslint --fix', 'prettier --write'],
|
|
354
|
+
'*.{json,md}': ['prettier --write'],
|
|
355
|
+
}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## Quick Reference
|
|
361
|
+
|
|
362
|
+
### 常用命令
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
# 交互式暂存
|
|
366
|
+
git add -p
|
|
367
|
+
|
|
368
|
+
# 修改最后一次提交
|
|
369
|
+
git commit --amend
|
|
370
|
+
|
|
371
|
+
# 压缩多个提交
|
|
372
|
+
git rebase -i HEAD~3
|
|
373
|
+
|
|
374
|
+
# 查看美化日志
|
|
375
|
+
git log --oneline --graph
|
|
376
|
+
|
|
377
|
+
# 临时保存
|
|
378
|
+
git stash
|
|
379
|
+
git stash pop
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### Commit Message 速查
|
|
383
|
+
|
|
384
|
+
```
|
|
385
|
+
feat: 新功能
|
|
386
|
+
fix: 修复
|
|
387
|
+
docs: 文档
|
|
388
|
+
style: 格式
|
|
389
|
+
refactor: 重构
|
|
390
|
+
perf: 性能
|
|
391
|
+
test: 测试
|
|
392
|
+
chore: 杂项
|
|
393
|
+
ci: CI/CD
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### 分支命令
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
# 创建并切换
|
|
400
|
+
git checkout -b feat/new-feature
|
|
401
|
+
|
|
402
|
+
# 删除本地分支
|
|
403
|
+
git branch -d feat/merged-branch
|
|
404
|
+
|
|
405
|
+
# 删除远程分支
|
|
406
|
+
git push origin --delete feat/old-branch
|
|
407
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"domain": "devops.git",
|
|
3
|
+
"description": "Standardize Git workflow with conventional commits, PR templates, branch naming, and changelog generation. Use when committing code, creating PRs, managing releases, or when the user mentions git, commit, pull request, branch, or changelog.",
|
|
4
|
+
"inputSchema": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"prompt": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"required": []
|
|
12
|
+
},
|
|
13
|
+
"outputSchema": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"result": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"dependencies": [],
|
|
22
|
+
"version": "0.1.0",
|
|
23
|
+
"author": "rotifer-team",
|
|
24
|
+
"createdAt": 1771939414660,
|
|
25
|
+
"fidelity": "Wrapped",
|
|
26
|
+
"transparency": "Open",
|
|
27
|
+
"source": "skill"
|
|
28
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"geneId": "191085093051e57cc79039969b054b83e9d93086333674e630f3ab2f7aae5837",
|
|
3
|
+
"name": "grammar-checker",
|
|
4
|
+
"domain": "content.grammar",
|
|
5
|
+
"fidelity": "Wrapped",
|
|
6
|
+
"wrappedAt": "2026-02-24T13:23:17.860Z",
|
|
7
|
+
"fromSkill": "../.cursor/skills/grammar-checker/SKILL.md"
|
|
8
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grammar-checker
|
|
3
|
+
description: Check grammar, spelling, and punctuation in written content. Identify common errors and provide corrections. Use when reviewing any written content for grammatical accuracy.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Grammar Checker
|
|
7
|
+
|
|
8
|
+
**Goal**: Ensure content is free from grammar, spelling, and punctuation errors.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Common Grammar Errors
|
|
13
|
+
|
|
14
|
+
### English Common Errors
|
|
15
|
+
|
|
16
|
+
| Error Type | Incorrect | Correct |
|
|
17
|
+
|-----------|-----------|---------|
|
|
18
|
+
| Subject-Verb Agreement | The team are ready | The team **is** ready |
|
|
19
|
+
| Tense Consistency | I walked and talk | I walked and **talked** |
|
|
20
|
+
| Article Usage | I have apple | I have **an** apple |
|
|
21
|
+
| Run-on Sentences | I went home I was tired | I went home**;** I was tired |
|
|
22
|
+
| Comma Splice | It's hot, I'm sweating | It's hot**,** **so** I'm sweating |
|
|
23
|
+
|
|
24
|
+
### Commonly Confused Words
|
|
25
|
+
|
|
26
|
+
| Words | Difference |
|
|
27
|
+
|-------|-----------|
|
|
28
|
+
| affect / effect | affect (v.) to influence; effect (n.) result |
|
|
29
|
+
| their / there / they're | their = possessive; there = location; they're = they are |
|
|
30
|
+
| its / it's | its = possessive; it's = it is |
|
|
31
|
+
| your / you're | your = possessive; you're = you are |
|
|
32
|
+
| then / than | then = next; than = comparison |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 2. Spelling Check
|
|
37
|
+
|
|
38
|
+
### Commonly Misspelled Words
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
accommodate ≠ accomodate
|
|
42
|
+
definitely ≠ definately
|
|
43
|
+
occurrence ≠ occurence
|
|
44
|
+
separate ≠ seperate
|
|
45
|
+
necessary ≠ neccessary
|
|
46
|
+
receive ≠ recieve
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Homophones
|
|
50
|
+
|
|
51
|
+
| Words | Context |
|
|
52
|
+
|-------|---------|
|
|
53
|
+
| to / too / two | to = direction; too = also/excessive; two = number |
|
|
54
|
+
| accept / except | accept = agree; except = exclude |
|
|
55
|
+
| principal / principle | principal = main/head; principle = rule/belief |
|
|
56
|
+
| complement / compliment | complement = complete; compliment = praise |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 3. Punctuation Rules
|
|
61
|
+
|
|
62
|
+
### English Punctuation
|
|
63
|
+
|
|
64
|
+
```markdown
|
|
65
|
+
## Common Rules
|
|
66
|
+
|
|
67
|
+
1. Period (.) - End of declarative sentence
|
|
68
|
+
2. Comma (,) - Separating clauses, lists, introductory elements
|
|
69
|
+
3. Semicolon (;) - Connecting related independent clauses
|
|
70
|
+
4. Colon (:) - Introducing lists or explanations
|
|
71
|
+
5. Apostrophe (') - Possession, contractions
|
|
72
|
+
6. Quotation marks ("") - Direct speech, titles of short works
|
|
73
|
+
7. Hyphen (-) - Compound words (well-known)
|
|
74
|
+
8. En dash (–) - Ranges (pages 10–15)
|
|
75
|
+
9. Em dash (—) - Interruption, emphasis, parenthetical
|
|
76
|
+
|
|
77
|
+
## Key Rules
|
|
78
|
+
|
|
79
|
+
- Use Oxford comma in lists of three or more
|
|
80
|
+
- Place periods and commas inside quotation marks
|
|
81
|
+
- No space before punctuation marks
|
|
82
|
+
- One space after punctuation marks
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 4. Checklist
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
## Grammar Check Checklist
|
|
91
|
+
|
|
92
|
+
### Basic Checks
|
|
93
|
+
- [ ] No spelling errors
|
|
94
|
+
- [ ] Punctuation used correctly
|
|
95
|
+
- [ ] Complete sentence structure
|
|
96
|
+
- [ ] Subject-verb agreement
|
|
97
|
+
|
|
98
|
+
### Advanced Checks
|
|
99
|
+
- [ ] Consistent verb tenses
|
|
100
|
+
- [ ] Correct word order
|
|
101
|
+
- [ ] Proper collocations
|
|
102
|
+
- [ ] No redundant expressions
|
|
103
|
+
|
|
104
|
+
### Formatting Checks
|
|
105
|
+
- [ ] Consistent punctuation style
|
|
106
|
+
- [ ] Uniform number formats
|
|
107
|
+
- [ ] Proper nouns capitalized correctly
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 5. Common Fix Patterns
|
|
113
|
+
|
|
114
|
+
### Fix Template
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
## Issue: [Error Type]
|
|
118
|
+
|
|
119
|
+
**Original**: [Incorrect content]
|
|
120
|
+
**Problem**: [Description of the issue]
|
|
121
|
+
**Correction**: [Fixed content]
|
|
122
|
+
**Rule**: [Applicable rule]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Examples
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
## Issue: Subject-Verb Agreement
|
|
129
|
+
|
|
130
|
+
**Original**: The list of items are on the table.
|
|
131
|
+
**Problem**: "list" is the subject (singular), not "items"
|
|
132
|
+
**Correction**: The list of items **is** on the table.
|
|
133
|
+
**Rule**: Subject-verb agreement with prepositional phrases
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
```markdown
|
|
137
|
+
## Issue: Dangling Modifier
|
|
138
|
+
|
|
139
|
+
**Original**: Walking to school, the rain started.
|
|
140
|
+
**Problem**: The modifier "Walking to school" has no proper subject
|
|
141
|
+
**Correction**: Walking to school, **I** got caught in the rain.
|
|
142
|
+
**Rule**: Modifiers must clearly refer to the subject of the sentence
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Quick Reference
|
|
148
|
+
|
|
149
|
+
### Verb Tense Quick Guide
|
|
150
|
+
|
|
151
|
+
| Tense | Structure | Example |
|
|
152
|
+
|-------|-----------|---------|
|
|
153
|
+
| Simple Present | V / V-s | I write |
|
|
154
|
+
| Simple Past | V-ed | I wrote |
|
|
155
|
+
| Present Perfect | have/has + V-ed | I have written |
|
|
156
|
+
| Past Perfect | had + V-ed | I had written |
|
|
157
|
+
| Future | will + V | I will write |
|
|
158
|
+
| Present Continuous | am/is/are + V-ing | I am writing |
|
|
159
|
+
|
|
160
|
+
### Common Rules at a Glance
|
|
161
|
+
|
|
162
|
+
```markdown
|
|
163
|
+
1. a → before consonant sounds (a book, a university)
|
|
164
|
+
2. an → before vowel sounds (an apple, an hour)
|
|
165
|
+
3. Comma after introductory clauses
|
|
166
|
+
4. No comma before "that" in restrictive clauses
|
|
167
|
+
5. Use "who" for people, "which/that" for things
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Integration with auto-writer
|
|
173
|
+
|
|
174
|
+
```markdown
|
|
175
|
+
## When to Invoke
|
|
176
|
+
|
|
177
|
+
- After each writing iteration
|
|
178
|
+
- As a core validation step
|
|
179
|
+
|
|
180
|
+
## Output Format
|
|
181
|
+
|
|
182
|
+
{
|
|
183
|
+
"hasErrors": boolean,
|
|
184
|
+
"errorCount": number,
|
|
185
|
+
"errors": [
|
|
186
|
+
{
|
|
187
|
+
"type": "spelling|grammar|punctuation",
|
|
188
|
+
"original": "incorrect content",
|
|
189
|
+
"suggestion": "suggested fix",
|
|
190
|
+
"position": "position description"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
```
|