@waoooo/claude-skills 1.0.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/README.md +48 -0
- package/package.json +28 -0
- package/registry.json +431 -0
- package/skills/acceptance-review/SKILL.md +537 -0
- package/skills/all-plan/SKILL.md +19 -0
- package/skills/all-plan/references/flow.md +750 -0
- package/skills/api-docs-generate/SKILL.md +204 -0
- package/skills/api-docs-generate/assets/templates/api.mdx +140 -0
- package/skills/api-docs-generate/scripts/generate-api-docs.ts +308 -0
- package/skills/ask/SKILL.md +42 -0
- package/skills/autonew/SKILL.md +34 -0
- package/skills/capability-analyze/SKILL.md +300 -0
- package/skills/capability-analyze/scripts/analyze-capabilities.ts +531 -0
- package/skills/capability-docs-generate/SKILL.md +155 -0
- package/skills/capability-docs-generate/assets/templates/capability.mdx +271 -0
- package/skills/capability-docs-generate/scripts/generate-capability-docs.ts +358 -0
- package/skills/capability-tree-query/SKILL.md +112 -0
- package/skills/capability-tree-query/scripts/build-capability-tree.ts +402 -0
- package/skills/changelog-generator/SKILL.md +104 -0
- package/skills/continue/SKILL.md +39 -0
- package/skills/continue/agents/openai.yaml +3 -0
- package/skills/creating-skills/SKILL.md +158 -0
- package/skills/creating-skills/references/official_best_practices.md +128 -0
- package/skills/creating-skills/references/skill_examples.md +199 -0
- package/skills/docx/LICENSE.txt +30 -0
- package/skills/docx/SKILL.md +197 -0
- package/skills/docx/docx-js.md +350 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/docx/ooxml/scripts/pack.py +159 -0
- package/skills/docx/ooxml/scripts/unpack.py +29 -0
- package/skills/docx/ooxml/scripts/validate.py +69 -0
- package/skills/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/docx/ooxml/scripts/validation/base.py +951 -0
- package/skills/docx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/docx/ooxml.md +610 -0
- package/skills/docx/scripts/__init__.py +1 -0
- package/skills/docx/scripts/document.py +1276 -0
- package/skills/docx/scripts/templates/comments.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/skills/docx/scripts/templates/people.xml +3 -0
- package/skills/docx/scripts/utilities.py +374 -0
- package/skills/git-branch-create/SKILL.md +170 -0
- package/skills/git-branch-merge/SKILL.md +176 -0
- package/skills/git-commit/SKILL.md +56 -0
- package/skills/git-commit/references/commit_examples.md +311 -0
- package/skills/github-actions-trigger/SKILL.md +367 -0
- package/skills/github-issue-create/SKILL.md +294 -0
- package/skills/github-pr-creation/SKILL.md +137 -0
- package/skills/github-pr-creation/references/pr_templates.md +187 -0
- package/skills/github-pr-merge/SKILL.md +112 -0
- package/skills/github-pr-review/SKILL.md +110 -0
- package/skills/github-pr-review/references/severity_guide.md +168 -0
- package/skills/job-create/SKILL.md +294 -0
- package/skills/job-create/scripts/create-job.ts +105 -0
- package/skills/job-workflow/SKILL.md +212 -0
- package/skills/keyword-extract/SKILL.md +229 -0
- package/skills/mcp-builder/LICENSE.txt +202 -0
- package/skills/mcp-builder/SKILL.md +236 -0
- package/skills/mcp-builder/reference/evaluation.md +602 -0
- package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/skills/mcp-builder/scripts/connections.py +151 -0
- package/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/mdx-to-openspec/SKILL.md +827 -0
- package/skills/mdx-to-openspec/scripts/mdx-to-openspec.ts +320 -0
- package/skills/mounted/SKILL.md +20 -0
- package/skills/multi-model-review/SKILL.md +459 -0
- package/skills/notion-automation/SKILL.md +215 -0
- package/skills/openspec-review/SKILL.md +513 -0
- package/skills/pdf/LICENSE.txt +30 -0
- package/skills/pdf/SKILL.md +294 -0
- package/skills/pdf/forms.md +205 -0
- package/skills/pdf/reference.md +612 -0
- package/skills/pdf/scripts/check_bounding_boxes.py +70 -0
- package/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/skills/pdf/scripts/check_fillable_fields.py +12 -0
- package/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/skills/pdf/scripts/create_validation_image.py +41 -0
- package/skills/pdf/scripts/extract_form_field_info.py +152 -0
- package/skills/pdf/scripts/fill_fillable_fields.py +114 -0
- package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/skills/pend/SKILL.md +33 -0
- package/skills/ping/SKILL.md +39 -0
- package/skills/pptx/LICENSE.txt +30 -0
- package/skills/pptx/SKILL.md +484 -0
- package/skills/pptx/html2pptx.md +625 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/pptx/ooxml/scripts/pack.py +159 -0
- package/skills/pptx/ooxml/scripts/unpack.py +29 -0
- package/skills/pptx/ooxml/scripts/validate.py +69 -0
- package/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/pptx/ooxml/scripts/validation/base.py +951 -0
- package/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/pptx/ooxml.md +427 -0
- package/skills/pptx/scripts/html2pptx.js +979 -0
- package/skills/pptx/scripts/inventory.py +1020 -0
- package/skills/pptx/scripts/rearrange.py +231 -0
- package/skills/pptx/scripts/replace.py +385 -0
- package/skills/pptx/scripts/thumbnail.py +450 -0
- package/skills/progress-update/SKILL.md +394 -0
- package/skills/progress-update/scripts/update-progress.ts +221 -0
- package/skills/release-automation/SKILL.md +306 -0
- package/skills/requirement-parse/SKILL.md +212 -0
- package/skills/requirement-parse/scripts/infer-builder-config.ts +346 -0
- package/skills/requirement-parse/scripts/merge-requirements.ts +228 -0
- package/skills/requirement-parse/scripts/parse-docs.ts +206 -0
- package/skills/requirement-parse/scripts/parse-openspec.ts +168 -0
- package/skills/roadmap-docs-generate/SKILL.md +483 -0
- package/skills/roadmap-docs-generate/assets/templates/ROADMAP.mdx +75 -0
- package/skills/roadmap-docs-generate/assets/templates/ROADMAP.mdx.template +330 -0
- package/skills/roadmap-docs-generate/assets/templates/TODO.mdx +56 -0
- package/skills/roadmap-docs-generate/assets/templates/TODO.mdx.template +363 -0
- package/skills/roadmap-docs-generate/scripts/json-to-mdx.ts +445 -0
- package/skills/roadmap-docs-generate/scripts/json-to-mdx.ts.backup +411 -0
- package/skills/roadmap-generate/SKILL.md +396 -0
- package/skills/roadmap-generate/scripts/generate-roadmap.ts +496 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +356 -0
- package/skills/skill-creator/references/output-patterns.md +82 -0
- package/skills/skill-creator/references/workflows.md +28 -0
- package/skills/skill-creator/scripts/init_skill.py +303 -0
- package/skills/skill-creator/scripts/package_skill.py +110 -0
- package/skills/skill-creator/scripts/quick_validate.py +95 -0
- package/skills/spec-generate/SKILL.md +408 -0
- package/skills/spec-generate/scripts/generate-specs.ts +538 -0
- package/skills/spec-generate/scripts/generate-tasks.ts +174 -0
- package/skills/specs-review/SKILL.md +370 -0
- package/skills/task-execute/SKILL.md +399 -0
- package/skills/task-update-status/SKILL.md +349 -0
- package/skills/task-update-status/scripts/update-task-status.ts +192 -0
- package/skills/task-verify/SKILL.md +407 -0
- package/skills/ui-ux-pro-max/SKILL.md +386 -0
- package/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/skills/vercel-automation/SKILL.md +226 -0
- package/skills/webapp-testing/LICENSE.txt +202 -0
- package/skills/webapp-testing/SKILL.md +96 -0
- package/skills/webapp-testing/examples/console_logging.py +35 -0
- package/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/skills/webapp-testing/scripts/with_server.py +106 -0
- package/skills/worktree-manager/SKILL.md +725 -0
- package/skills/worktree-manager/config.json +15 -0
- package/skills/worktree-manager/scripts/allocate-ports.sh +100 -0
- package/skills/worktree-manager/scripts/cleanup.sh +185 -0
- package/skills/worktree-manager/scripts/launch-agent.sh +155 -0
- package/skills/worktree-manager/scripts/register.sh +125 -0
- package/skills/worktree-manager/scripts/release-ports.sh +48 -0
- package/skills/worktree-manager/scripts/status.sh +169 -0
- package/skills/worktree-manager/scripts/sync.sh +168 -0
- package/skills/worktree-manager/templates/worktree.json +23 -0
- package/skills/xlsx/LICENSE.txt +30 -0
- package/skills/xlsx/SKILL.md +289 -0
- package/skills/xlsx/recalc.py +178 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release-automation
|
|
3
|
+
description: Automate version release workflow. Handles version updates, CHANGELOG generation, Git commits, tags, and GitHub Release creation. Use when user says "release", "发布", "发版", "publish new version". Supports semantic versioning for npm packages, frontend projects, and backend projects.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Release Automation
|
|
7
|
+
|
|
8
|
+
Automate the complete version release workflow with semantic versioning.
|
|
9
|
+
|
|
10
|
+
## Current project info
|
|
11
|
+
|
|
12
|
+
!`[ -f package.json ] && echo "Project: $(jq -r '.name // "unknown"' package.json), Version: $(jq -r '.version // "0.0.0"' package.json)" || echo "No package.json found"`
|
|
13
|
+
|
|
14
|
+
## Core workflow
|
|
15
|
+
|
|
16
|
+
### 1. Detect project type and current version
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Check if npm package
|
|
20
|
+
if [ -f "package.json" ]; then
|
|
21
|
+
PROJECT_TYPE="npm"
|
|
22
|
+
CURRENT_VERSION=$(jq -r '.version' package.json)
|
|
23
|
+
PROJECT_NAME=$(jq -r '.name' package.json)
|
|
24
|
+
else
|
|
25
|
+
# Try to get version from git tags
|
|
26
|
+
CURRENT_VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//')
|
|
27
|
+
PROJECT_TYPE="git-tags"
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
echo "Current version: $CURRENT_VERSION"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Ask user for version type
|
|
34
|
+
|
|
35
|
+
**ALWAYS ask user:**
|
|
36
|
+
```
|
|
37
|
+
Current version: 1.2.3
|
|
38
|
+
|
|
39
|
+
What type of release?
|
|
40
|
+
1. major (2.0.0) - Breaking changes
|
|
41
|
+
2. minor (1.3.0) - New features
|
|
42
|
+
3. patch (1.2.4) - Bug fixes
|
|
43
|
+
4. custom - Specify version manually
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 3. Calculate new version
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Parse current version
|
|
50
|
+
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
|
|
51
|
+
|
|
52
|
+
# Calculate based on type
|
|
53
|
+
case "$VERSION_TYPE" in
|
|
54
|
+
major)
|
|
55
|
+
NEW_VERSION="$((MAJOR + 1)).0.0"
|
|
56
|
+
;;
|
|
57
|
+
minor)
|
|
58
|
+
NEW_VERSION="${MAJOR}.$((MINOR + 1)).0"
|
|
59
|
+
;;
|
|
60
|
+
patch)
|
|
61
|
+
NEW_VERSION="${MAJOR}.${MINOR}.$((PATCH + 1))"
|
|
62
|
+
;;
|
|
63
|
+
custom)
|
|
64
|
+
# User provides NEW_VERSION
|
|
65
|
+
;;
|
|
66
|
+
esac
|
|
67
|
+
|
|
68
|
+
echo "New version: $NEW_VERSION"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 4. Validate new version
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Check if version already exists in CHANGELOG
|
|
75
|
+
if [ -f "CHANGELOG.md" ]; then
|
|
76
|
+
if grep -q "## \[$NEW_VERSION\]" CHANGELOG.md; then
|
|
77
|
+
echo "ERROR: Version $NEW_VERSION already exists in CHANGELOG.md"
|
|
78
|
+
exit 1
|
|
79
|
+
fi
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
# Check if git tag already exists
|
|
83
|
+
if git rev-parse "v$NEW_VERSION" >/dev/null 2>&1; then
|
|
84
|
+
echo "ERROR: Git tag v$NEW_VERSION already exists"
|
|
85
|
+
exit 1
|
|
86
|
+
fi
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 5. Generate release notes from git commits
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Get commits since last tag
|
|
93
|
+
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|
|
94
|
+
|
|
95
|
+
if [ -n "$LAST_TAG" ]; then
|
|
96
|
+
COMMITS=$(git log ${LAST_TAG}..HEAD --oneline)
|
|
97
|
+
else
|
|
98
|
+
# If no tags, get recent commits
|
|
99
|
+
COMMITS=$(git log --oneline --since="1 month ago")
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
# Categorize by conventional commit type
|
|
103
|
+
echo "### Added"
|
|
104
|
+
echo "$COMMITS" | grep "^[a-f0-9]* feat" | sed 's/^[a-f0-9]* feat[^:]*: /- /'
|
|
105
|
+
|
|
106
|
+
echo "### Fixed"
|
|
107
|
+
echo "$COMMITS" | grep "^[a-f0-9]* fix" | sed 's/^[a-f0-9]* fix[^:]*: /- /'
|
|
108
|
+
|
|
109
|
+
echo "### Changed"
|
|
110
|
+
echo "$COMMITS" | grep "^[a-f0-9]* refactor\|chore\|perf" | sed 's/^[a-f0-9]* [^:]*: /- /'
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 6. Update version files
|
|
114
|
+
|
|
115
|
+
**For npm projects (package.json exists):**
|
|
116
|
+
```bash
|
|
117
|
+
# Update package.json
|
|
118
|
+
jq ".version = \"$NEW_VERSION\"" package.json > package.json.tmp
|
|
119
|
+
mv package.json.tmp package.json
|
|
120
|
+
|
|
121
|
+
# Update package-lock.json if exists
|
|
122
|
+
if [ -f "package-lock.json" ]; then
|
|
123
|
+
jq ".version = \"$NEW_VERSION\"" package-lock.json > package-lock.json.tmp
|
|
124
|
+
mv package-lock.json.tmp package-lock.json
|
|
125
|
+
fi
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**For other projects:**
|
|
129
|
+
```bash
|
|
130
|
+
# Create or update VERSION file
|
|
131
|
+
echo "$NEW_VERSION" > VERSION
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 7. Update CHANGELOG.md
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# Get current date
|
|
138
|
+
DATE=$(date +%Y-%m-%d)
|
|
139
|
+
|
|
140
|
+
# Prepare new entry
|
|
141
|
+
NEW_ENTRY="## [$NEW_VERSION] - $DATE
|
|
142
|
+
|
|
143
|
+
$RELEASE_NOTES
|
|
144
|
+
"
|
|
145
|
+
|
|
146
|
+
# Insert at top of CHANGELOG (after title)
|
|
147
|
+
if [ -f "CHANGELOG.md" ]; then
|
|
148
|
+
# Insert after first line (title)
|
|
149
|
+
sed -i.bak "1a\\
|
|
150
|
+
$NEW_ENTRY" CHANGELOG.md
|
|
151
|
+
else
|
|
152
|
+
# Create new CHANGELOG
|
|
153
|
+
echo "# Changelog
|
|
154
|
+
|
|
155
|
+
$NEW_ENTRY" > CHANGELOG.md
|
|
156
|
+
fi
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### 8. Commit changes
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
git add .
|
|
163
|
+
git commit -m "chore: release v$NEW_VERSION"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### 9. Create Git tag
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Create annotated tag
|
|
170
|
+
git tag -a "v$NEW_VERSION" -m "Release v$NEW_VERSION"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### 10. Push to remote
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Push commits
|
|
177
|
+
git push origin $(git branch --show-current)
|
|
178
|
+
|
|
179
|
+
# Push tag
|
|
180
|
+
git push origin "v$NEW_VERSION"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### 11. Create GitHub Release
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# Extract release notes for this version from CHANGELOG
|
|
187
|
+
RELEASE_BODY=$(sed -n "/## \[$NEW_VERSION\]/,/## \[/p" CHANGELOG.md | sed '$d')
|
|
188
|
+
|
|
189
|
+
# Create GitHub Release
|
|
190
|
+
gh release create "v$NEW_VERSION" \
|
|
191
|
+
--title "Release v$NEW_VERSION" \
|
|
192
|
+
--notes "$RELEASE_BODY"
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### 12. NPM publish (optional, for npm packages)
|
|
196
|
+
|
|
197
|
+
**Ask user:** "Publish to npm?"
|
|
198
|
+
|
|
199
|
+
If yes:
|
|
200
|
+
```bash
|
|
201
|
+
npm publish
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Note**: If 2FA is enabled, user must enter code manually.
|
|
205
|
+
|
|
206
|
+
## Important rules
|
|
207
|
+
|
|
208
|
+
- **ALWAYS** validate version doesn't already exist
|
|
209
|
+
- **ALWAYS** generate release notes from git commits
|
|
210
|
+
- **ALWAYS** ask user before publishing to npm
|
|
211
|
+
- **NEVER** skip version validation
|
|
212
|
+
- **NEVER** force push tags
|
|
213
|
+
- **NEVER** publish without user confirmation
|
|
214
|
+
|
|
215
|
+
## Error handling
|
|
216
|
+
|
|
217
|
+
### Version already exists
|
|
218
|
+
|
|
219
|
+
If version exists in CHANGELOG or git tags:
|
|
220
|
+
```
|
|
221
|
+
ERROR: Version 1.2.3 already exists
|
|
222
|
+
- Found in CHANGELOG.md
|
|
223
|
+
- Git tag v1.2.3 exists
|
|
224
|
+
|
|
225
|
+
Please choose a different version.
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### No git tags found
|
|
229
|
+
|
|
230
|
+
If no previous tags exist:
|
|
231
|
+
```
|
|
232
|
+
No previous tags found. Using all commits from last month for release notes.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### GitHub CLI not authenticated
|
|
236
|
+
|
|
237
|
+
If `gh` command fails:
|
|
238
|
+
```bash
|
|
239
|
+
# Check authentication
|
|
240
|
+
gh auth status
|
|
241
|
+
|
|
242
|
+
# If not authenticated
|
|
243
|
+
gh auth login
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### NPM publish fails
|
|
247
|
+
|
|
248
|
+
If npm publish fails:
|
|
249
|
+
```
|
|
250
|
+
NPM publish failed. Common reasons:
|
|
251
|
+
1. Not logged in: npm login
|
|
252
|
+
2. No permission: Check package ownership
|
|
253
|
+
3. Version already published: Bump version again
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Examples
|
|
257
|
+
|
|
258
|
+
### Release patch version (bug fix)
|
|
259
|
+
```bash
|
|
260
|
+
# User: "发布新版本,修复了一些 bug"
|
|
261
|
+
|
|
262
|
+
# Current: 1.2.3
|
|
263
|
+
# Type: patch
|
|
264
|
+
# New: 1.2.4
|
|
265
|
+
|
|
266
|
+
# Auto-generate release notes from commits
|
|
267
|
+
# Update package.json, CHANGELOG.md
|
|
268
|
+
# Commit, tag, push
|
|
269
|
+
# Create GitHub Release
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Release minor version (new feature)
|
|
273
|
+
```bash
|
|
274
|
+
# User: "release new version with new features"
|
|
275
|
+
|
|
276
|
+
# Current: 1.2.3
|
|
277
|
+
# Type: minor
|
|
278
|
+
# New: 1.3.0
|
|
279
|
+
|
|
280
|
+
# Auto-generate release notes
|
|
281
|
+
# Update files, commit, tag, push
|
|
282
|
+
# Create GitHub Release
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Release major version (breaking changes)
|
|
286
|
+
```bash
|
|
287
|
+
# User: "发布 2.0 版本"
|
|
288
|
+
|
|
289
|
+
# Current: 1.9.5
|
|
290
|
+
# Type: major
|
|
291
|
+
# New: 2.0.0
|
|
292
|
+
|
|
293
|
+
# Auto-generate release notes
|
|
294
|
+
# Update files, commit, tag, push
|
|
295
|
+
# Create GitHub Release
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Notes
|
|
299
|
+
|
|
300
|
+
- Works in **current directory** (uses `pwd`)
|
|
301
|
+
- No hardcoded paths
|
|
302
|
+
- Auto-detects project type (npm or git-tags)
|
|
303
|
+
- Generates release notes from git commits
|
|
304
|
+
- Follows semantic versioning
|
|
305
|
+
- Compatible with any git repository
|
|
306
|
+
- Supports npm packages (optional publish)
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Skill: requirement-parse
|
|
2
|
+
|
|
3
|
+
## 功能
|
|
4
|
+
|
|
5
|
+
解析 OpenSpec 提案,推断能力配置,合并生成统一需求规范。
|
|
6
|
+
|
|
7
|
+
## 何时调用
|
|
8
|
+
|
|
9
|
+
- Job 创建完成后
|
|
10
|
+
- OpenSpec 生成完成后
|
|
11
|
+
- 需要生成 unified.json 时
|
|
12
|
+
|
|
13
|
+
## 输入
|
|
14
|
+
|
|
15
|
+
- `jobId` - Job ID(例如:2026-02-10-1520-pricing-system)
|
|
16
|
+
- `openspecPath` - OpenSpec 目录路径(例如:openspec/changes/001-pricing-system/)
|
|
17
|
+
|
|
18
|
+
## 输出
|
|
19
|
+
|
|
20
|
+
- `parsed/docs.json` - 从 OpenSpec 解析的需求
|
|
21
|
+
- `parsed/form.json` - 推断的能力配置
|
|
22
|
+
- `parsed/unified.json` - 合并后的统一规范
|
|
23
|
+
|
|
24
|
+
## 执行步骤
|
|
25
|
+
|
|
26
|
+
### 1. 解析 OpenSpec
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm spec:parse-openspec \
|
|
30
|
+
<openspec-path> \
|
|
31
|
+
exports/jobs/<job-id>/parsed/docs.json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**输出**:`docs.json`
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"version": "1.0.0",
|
|
38
|
+
"sources": {
|
|
39
|
+
"docs": {
|
|
40
|
+
"files": ["planning/pricing-system.mdx"],
|
|
41
|
+
"extractedAt": "2026-02-10T15:20:00Z"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"requirements": [
|
|
45
|
+
{
|
|
46
|
+
"reqId": "REQ-PRICING-021",
|
|
47
|
+
"title": "多货币支持",
|
|
48
|
+
"description": "支持 USD, CNY, JPY, EUR...",
|
|
49
|
+
"source": "docs",
|
|
50
|
+
"type": "feature",
|
|
51
|
+
"status": "draft",
|
|
52
|
+
"acceptance": ["支持 4+ 货币"],
|
|
53
|
+
"tasks": ["实现货币转换"]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 2. 推断能力配置
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pnpm spec:infer-builder \
|
|
63
|
+
exports/jobs/<job-id>/parsed/docs.json \
|
|
64
|
+
exports/jobs/<job-id>/parsed/form.json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**输出**:`form.json`
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"version": "1.0.0",
|
|
71
|
+
"sources": {
|
|
72
|
+
"builder": {
|
|
73
|
+
"method": "inferred",
|
|
74
|
+
"extractedAt": "2026-02-10T15:20:05Z"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"requirements": [
|
|
78
|
+
{
|
|
79
|
+
"reqId": "REQ-BUILDER-AUTH",
|
|
80
|
+
"title": "集成 auth 能力",
|
|
81
|
+
"source": "builder",
|
|
82
|
+
"type": "feature",
|
|
83
|
+
"status": "ready",
|
|
84
|
+
"layerHint": "L1",
|
|
85
|
+
"capabilityHints": ["auth"]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 3. 合并需求
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pnpm spec:merge \
|
|
95
|
+
exports/jobs/<job-id>/parsed/docs.json \
|
|
96
|
+
exports/jobs/<job-id>/parsed/form.json \
|
|
97
|
+
exports/jobs/<job-id>/parsed/unified.json
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**输出**:`unified.json`
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"version": "1.0.0",
|
|
104
|
+
"sources": {
|
|
105
|
+
"docs": {...},
|
|
106
|
+
"builder": {...}
|
|
107
|
+
},
|
|
108
|
+
"requirements": [
|
|
109
|
+
{
|
|
110
|
+
"reqId": "REQ-PRICING-021",
|
|
111
|
+
"title": "多货币支持",
|
|
112
|
+
"description": "...",
|
|
113
|
+
"source": "merged",
|
|
114
|
+
"layerHint": "L2",
|
|
115
|
+
"capabilityHints": ["payment-gateway", "pricing"],
|
|
116
|
+
"acceptance": [...],
|
|
117
|
+
"tasks": [...],
|
|
118
|
+
"blockedBy": [],
|
|
119
|
+
"blocks": []
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"executionOrder": ["REQ-PRICING-021", "REQ-PRICING-022"]
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 4. 验证输出
|
|
127
|
+
|
|
128
|
+
- 检查三个文件是否都生成
|
|
129
|
+
- 检查 JSON 格式是否正确
|
|
130
|
+
- 检查需求数量是否合理
|
|
131
|
+
|
|
132
|
+
## 使用示例
|
|
133
|
+
|
|
134
|
+
### 示例 1:完整流程
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Agent 调用 requirement-parse:
|
|
138
|
+
输入:
|
|
139
|
+
- jobId: 2026-02-10-1520-pricing-system
|
|
140
|
+
- openspecPath: openspec/changes/001-pricing-system/
|
|
141
|
+
|
|
142
|
+
执行:
|
|
143
|
+
🔧 步骤 1: 解析 OpenSpec
|
|
144
|
+
⏳ 运行: pnpm spec:parse-openspec
|
|
145
|
+
✅ 生成: docs.json (5 个需求)
|
|
146
|
+
|
|
147
|
+
🔧 步骤 2: 推断配置
|
|
148
|
+
⏳ 运行: pnpm spec:infer-builder
|
|
149
|
+
✅ 生成: form.json (推断出 3 个能力)
|
|
150
|
+
|
|
151
|
+
🔧 步骤 3: 合并需求
|
|
152
|
+
⏳ 运行: pnpm spec:merge
|
|
153
|
+
✅ 生成: unified.json (5 个需求 + 能力标注)
|
|
154
|
+
|
|
155
|
+
显示结果:
|
|
156
|
+
✅ 需求解析完成
|
|
157
|
+
📊 统计:
|
|
158
|
+
- 总需求: 5 个
|
|
159
|
+
- 推断能力: 3 个 (auth, payment, pricing)
|
|
160
|
+
- 执行顺序: 5 个任务
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## 错误处理
|
|
164
|
+
|
|
165
|
+
### 错误 1:OpenSpec 解析失败
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
❌ 错误: OpenSpec 解析失败
|
|
169
|
+
🔍 原因: 找不到 proposal.md 或格式不正确
|
|
170
|
+
|
|
171
|
+
💡 建议:
|
|
172
|
+
1. 检查 OpenSpec 目录是否存在
|
|
173
|
+
2. 确认包含 proposal.md, design.md, tasks.md
|
|
174
|
+
3. 检查文件格式是否正确
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### 错误 2:推断失败
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
❌ 错误: 无法推断能力配置
|
|
181
|
+
🔍 原因: 需求描述中没有能力关键词
|
|
182
|
+
|
|
183
|
+
💡 建议:
|
|
184
|
+
1. 手动创建 form.json
|
|
185
|
+
2. 使用 Builder UI 填写表单
|
|
186
|
+
3. 在 MDX 中添加更多能力关键词
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### 错误 3:合并冲突
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
❌ 错误: 需求 ID 冲突
|
|
193
|
+
🔍 原因: docs.json 和 form.json 有相同的 reqId
|
|
194
|
+
|
|
195
|
+
💡 建议:
|
|
196
|
+
1. 检查两个文件的需求 ID
|
|
197
|
+
2. 手动调整冲突的 ID
|
|
198
|
+
3. 重新运行合并
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## 相关脚本
|
|
202
|
+
|
|
203
|
+
- `src/scripts/parse-openspec.ts` - 解析 OpenSpec
|
|
204
|
+
- `src/scripts/infer-builder-config.ts` - 推断配置
|
|
205
|
+
- `src/scripts/merge-requirements.ts` - 合并需求
|
|
206
|
+
|
|
207
|
+
## 注意事项
|
|
208
|
+
|
|
209
|
+
1. **顺序执行** - 三个步骤必须按顺序执行
|
|
210
|
+
2. **依赖关系** - 每步依赖前一步的输出
|
|
211
|
+
3. **错误停止** - 任何步骤失败立即停止
|
|
212
|
+
4. **保留中间文件** - 方便调试和回溯
|