create-dwy 0.16.1 → 0.17.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.
Files changed (104) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/bin/index.js +1 -1
  3. package/package.json +1 -1
  4. package/src/sync-all.js +303 -59
  5. package/src/sync-global-skills.js +167 -0
  6. package/src/sync.js +21 -11
  7. package/templates/ai-tools/CHANGELOG.md +134 -0
  8. package/templates/ai-tools/VERSION +1 -1
  9. package/templates/ai-tools/rules/Android/dwy-android-core.md +65 -1
  10. package/templates/ai-tools/rules/Python/dwy-python-core.md +47 -0
  11. package/templates/ai-tools/rules/Vue/dwy-vue-core.md +55 -0
  12. package/templates/ai-tools/rules/iOS/dwy-swift-core.md +46 -0
  13. package/templates/ai-tools/rules//345/274/200/345/217/221/346/265/201/347/250/213/dwy-oss-commercial-license.md +128 -0
  14. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-ios-app-store-release/SKILL.md +65 -0
  15. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-ios-app-store-release/assets/appstore-submission.yaml +43 -0
  16. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-ios-app-store-release/references/api-workflow.md +17 -0
  17. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-ios-app-store-release/references/in-app-purchase-review.md +16 -0
  18. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-ios-app-store-release/references/screenshot-workflow.md +16 -0
  19. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-ios-app-store-release/scripts/appstore_config.sh +140 -0
  20. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/SKILL.md +11 -8
  21. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/android.md +2 -1
  22. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/backend-deploy.md +2 -1
  23. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/changelog.md +24 -4
  24. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/frontend-deploy.md +2 -1
  25. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/generic-release.md +2 -1
  26. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/git-tag.md +82 -0
  27. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/harmony.md +2 -1
  28. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/ios.md +3 -2
  29. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-publish/references/monitor-notify.md +2 -2
  30. package/templates/ai-tools/skills//345/217/221/345/270/203/345/217/221/347/211/210/dwy-semver/SKILL.md +1 -1
  31. package/templates/ai-tools/skills//345/237/272/347/241/200/345/272/223/dwy-eapi/references/tasks-integration-guide.md +2 -2
  32. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/README.md +57 -0
  33. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/dwy-doubao-tts/SKILL.md +147 -0
  34. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/dwy-doubao-tts/references/api.md +43 -0
  35. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/dwy-doubao-tts/references/config.example.yaml +33 -0
  36. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/dwy-doubao-tts/scripts/global_config.py +89 -0
  37. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/dwy-doubao-tts/scripts/setup_config.py +175 -0
  38. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/dwy-doubao-tts/scripts/synthesize.py +339 -0
  39. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/media-platform-packaging/SKILL.md +127 -0
  40. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/media-platform-packaging/assets/cover-style-master-v1.png +0 -0
  41. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/media-platform-packaging/references/platform-copy-examples.md +37 -0
  42. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/media-platform-packaging/references/platform-posting-times.md +193 -0
  43. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0005-ideation/SKILL.md +42 -0
  44. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0005-ideation/templates/topic-backlog.template.md +50 -0
  45. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0005-ideation/templates//351/200/211/351/242/230/346/261/240.template.md +16 -0
  46. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0010-product/SKILL.md +106 -0
  47. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0010-product/templates/channel-profile.template.md +52 -0
  48. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0010-product/templates//344/272/247/345/223/201/345/215/241.template.md +132 -0
  49. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0030-facts/SKILL.md +60 -0
  50. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0030-facts/scripts/build_facts_html.py +430 -0
  51. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0030-facts/scripts/generate_html.py +1287 -0
  52. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0030-facts/scripts/generate_report.py +189 -0
  53. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0030-facts/templates//344/272/213/345/256/236/350/265/204/346/226/231/345/272/223.template.md +55 -0
  54. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0040-script/SKILL.md +36 -0
  55. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0040-script/templates/README.md +10 -0
  56. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0040-script/templates//344/272/213/345/256/236.template.md +82 -0
  57. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0040-script/templates//345/215/225/351/233/206/346/226/207/346/241/243.template.md +175 -0
  58. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0040-script/templates//350/204/232/346/234/254.template.md +69 -0
  59. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0040-script/templates//351/252/250/346/236/266-v1.1.md +174 -0
  60. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0050-design/SKILL.md +55 -0
  61. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0060-assets/SKILL.md +29 -0
  62. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0070-package/SKILL.md +42 -0
  63. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0070-package/scripts/validate_shots.py +207 -0
  64. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0070-package/shots.schema.json +186 -0
  65. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0070-package//344/272/272/345/256/241/345/214/205.template.md +1 -0
  66. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0070-package//344/272/272/345/256/241/350/257/264/346/230/216.md +15 -0
  67. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0070-package//346/210/220/347/211/207/345/214/205.template.md +49 -0
  68. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-0080-factory/SKILL.md +58 -0
  69. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-comic-kit/SKILL.md +424 -0
  70. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-comic-kit/evals.md +41 -0
  71. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-flow/CONTRACT.md +123 -0
  72. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-flow/SKILL.md +81 -0
  73. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-flow//346/211/247/350/241/214/346/270/205/345/215/225.template.md +60 -0
  74. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/SKILL.md +78 -0
  75. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/agents/openai.yaml +4 -0
  76. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/assets/knowledge-town-paper-film-v1.json +80 -0
  77. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/assets/remotion/AudioTracks.tsx +20 -0
  78. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/assets/remotion/CaptionLayer.tsx +18 -0
  79. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/assets/remotion/CueTimeline.ts +24 -0
  80. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/assets/remotion/KnowledgeTownComposition.tsx +21 -0
  81. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/references/cinematic-direction.md +73 -0
  82. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/references/sticker-asset-production.md +30 -0
  83. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/references/style-guide.md +43 -0
  84. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/scripts/build_cue_timeline.py +75 -0
  85. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/scripts/validate_cue_timeline.py +68 -0
  86. package/templates/ai-tools/skills//350/207/252/345/252/222/344/275/223/uc-media-knowledge-town/scripts/validate_style_preset.py +22 -0
  87. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/SKILL.md +0 -511
  88. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/references/checks-data.md +0 -126
  89. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/references/checks-network.md +0 -88
  90. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/references/checks-runtime.md +0 -195
  91. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/references/security-doc-search.md +0 -179
  92. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_base.sh +0 -39
  93. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_capacity.sh +0 -278
  94. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_db.sh +0 -147
  95. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_docker.sh +0 -230
  96. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_env.sh +0 -64
  97. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_https.sh +0 -60
  98. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_logs.sh +0 -209
  99. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_nginx.sh +0 -100
  100. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_resilience.sh +0 -157
  101. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_secrets.sh +0 -265
  102. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_services.sh +0 -94
  103. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/check_ssh.sh +0 -56
  104. package/templates/ai-tools/skills/unitcircle/uc-deploy-audit/scripts/run_all.sh +0 -105
@@ -0,0 +1,43 @@
1
+ # 已确认的发布包模板;秘密仅使用外部引用,不能填入此文件。
2
+ schema_version: 1
3
+ application:
4
+ bundle_id: ""
5
+ sku: ""
6
+ platforms: [ios, macos]
7
+ availability: all_territories
8
+ china_mainland:
9
+ icp_status: not_started
10
+ icp_filing_number: ""
11
+ localizations:
12
+ zh-Hans:
13
+ name: ""
14
+ subtitle: ""
15
+ description: ""
16
+ keywords: ""
17
+ support_url: ""
18
+ privacy_policy_url: ""
19
+ en-US:
20
+ name: ""
21
+ subtitle: ""
22
+ description: ""
23
+ keywords: ""
24
+ support_url: ""
25
+ privacy_policy_url: ""
26
+ screenshots:
27
+ ios: { zh-Hans: [], en-US: [] }
28
+ macos: { zh-Hans: [], en-US: [] }
29
+ # 每个内购条目必须带 `review_screenshot`,尺寸固定为 1280x800 像素。
30
+ in_app_purchases: []
31
+ subscriptions: []
32
+ review:
33
+ contact_name: ""
34
+ contact_email: ""
35
+ contact_phone: ""
36
+ demo_credentials_reference: ""
37
+ notes: ""
38
+ confirmations:
39
+ metadata_confirmed: false
40
+ privacy_confirmed: false
41
+ pricing_confirmed: false
42
+ submit_for_review_confirmed: false
43
+ release_confirmed: false
@@ -0,0 +1,17 @@
1
+ # App Store Connect API 与网页补齐
2
+
3
+ ## API 优先动作
4
+
5
+ 使用 App Store Connect API 创建或更新版本本地化、App 信息、分类、年龄分级、地区可售性、应用价格、内购、订阅、审核资料、截图和审核提交。每次写入前读取当前资源并生成字段 diff。
6
+
7
+ ## 网页补齐动作
8
+
9
+ 只在 API 无法覆盖时,使用用户已登录的 Playwright 会话:创建 App Record、App Privacy 问卷和 Apple 要求的网页专属确认。不得自动绕过验证码或复用未授权会话。
10
+
11
+ ## 中国大陆
12
+
13
+ 默认请求全地区可售。若 Apple 返回 ICP 缺失或无效状态,保留其它地区配置并在执行记录中登记备案待办。用户提供有效备案号后,单独重试中国大陆。
14
+
15
+ ## 最终门禁
16
+
17
+ 下列动作必须再次询问用户:提交审核、正式发布、提高价格、启用中国大陆(当备案资料刚补齐时)。
@@ -0,0 +1,16 @@
1
+ # 内购审核截图
2
+
3
+ ## 本项目固定规格
4
+
5
+ 每个内购项目提交一张 `1280 × 800` 像素、16:10 的审核截图。图片必须来自真实购买路径,清晰展示商品或服务、价格入口与购买后的可获得权益;禁止使用与应用不一致的概念图。
6
+
7
+ ## 采集与上传
8
+
9
+ 1. 使用审核账号或 StoreKit 测试环境进入目标商品购买页。
10
+ 2. 在 macOS 16:10 画布导出 `1280 × 800` PNG 或 JPG,移除用户身份、支付凭据和生产数据。
11
+ 3. 上传前校验精确像素、RGB、无透明通道和单张文件约束。
12
+ 4. 通过 `inAppPurchaseAppStoreReviewScreenshots` 的预留、上传、提交流程写入对应内购;上传后读取资源状态确认成功。
13
+
14
+ ## Apple 规格关系
15
+
16
+ Apple 将内购审核截图用于审核而非商店展示,并要求它符合应用支持的平台截图规格。本项目将 `1280 × 800` 作为固定的 macOS 审核画布;如果 Apple 后续针对目标平台返回更严格的校验错误,停止上传并提示用户确认平台规格,不擅自缩放或裁剪。
@@ -0,0 +1,16 @@
1
+ # iOS/macOS 截图工作流
2
+
3
+ ## 采集
4
+
5
+ 从真实 iOS 模拟器和 macOS 应用构建采集截图。先向用户确认截图剧本:启动方式、测试账号引用、页面路径、测试数据、脱敏规则和中英文文案。禁止以与实际应用不一致的生成图替代功能展示。
6
+
7
+ ## 分平台输出
8
+
9
+ - iOS 和 macOS 必须分别采集、设计、校验和上传,不能将同一图片简单缩放复用。
10
+ - 每种平台、设备尺寸和语言输出 1 到 10 张 JPEG/JPG/PNG;不得包含 Alpha 通道。
11
+ - macOS 使用 16:10:`1280x800`、`1440x900`、`2560x1600` 或 `2880x1800`。
12
+ - iOS 根据目标 iPhone 展示尺寸选择 Apple 当前接受的规格;执行时先读取 Apple 官方截图规格,避免使用过期机型尺寸。
13
+
14
+ ## 上传前检查
15
+
16
+ 检查尺寸、方向、格式、无透明通道、语言目录、页面顺序、隐私脱敏和平台归属。先生成本地预览和上传清单,用户确认后才上传。
@@ -0,0 +1,140 @@
1
+ #!/usr/bin/env bash
2
+ # App Store Connect 用户级配置管理:只保存非秘密标识与私钥文件,禁止向 Skill 或项目目录写入凭据。
3
+
4
+ set -euo pipefail
5
+
6
+ default_root="/Users/$(id -un)/.dwy/app-store-connect"
7
+
8
+ # 输出用法,避免调用者猜测参数格式而误把私钥内容传入命令行。
9
+ usage() {
10
+ cat <<'EOF'
11
+ Usage:
12
+ appstore_config.sh init [--root <directory>]
13
+ appstore_config.sh get [--root <directory>]
14
+ appstore_config.sh set --issuer-id <id> --key-id <id> [--team-id <id>] [--root <directory>]
15
+ appstore_config.sh import-key --path <AuthKey.p8> [--root <directory>]
16
+ appstore_config.sh reset [--root <directory>]
17
+ EOF
18
+ }
19
+
20
+ # 创建私有目录并收紧权限,防止同机其他用户读取配置或私钥。
21
+ ensure_root() {
22
+ mkdir -p "$root/private_keys" "$root/sessions" "$root/submissions"
23
+ chmod 700 "$root" "$root/private_keys" "$root/sessions" "$root/submissions"
24
+ }
25
+
26
+ # 将非秘密配置初始化为 JSON;私钥单独存放,避免在 get 输出中泄漏。
27
+ ensure_config() {
28
+ ensure_root
29
+ if [[ ! -f "$config_file" ]]; then
30
+ jq -n '{version: 1}' > "$config_file"
31
+ chmod 600 "$config_file"
32
+ fi
33
+ if ! jq empty "$config_file" >/dev/null 2>&1; then
34
+ echo "ERROR: configuration is not valid JSON: $config_file" >&2
35
+ exit 2
36
+ fi
37
+ }
38
+
39
+ # 校验受外部输入控制的标识长度,避免错误或过大的配置写入本地缓存。
40
+ validate_id() {
41
+ local label="$1" value="$2" limit="$3"
42
+ if [[ -z "$value" || ${#value} -gt "$limit" ]]; then
43
+ echo "ERROR: $label must contain 1-$limit characters" >&2
44
+ exit 2
45
+ fi
46
+ }
47
+
48
+ # 解析共享根目录参数;其他参数由具体子命令处理。
49
+ parse_root() {
50
+ while [[ $# -gt 0 ]]; do
51
+ case "$1" in
52
+ --root)
53
+ root="$2"
54
+ shift 2
55
+ ;;
56
+ *)
57
+ remaining+=("$1")
58
+ remaining_count=$((remaining_count + 1))
59
+ shift
60
+ ;;
61
+ esac
62
+ done
63
+ }
64
+
65
+ action="${1:-}"
66
+ if [[ -z "$action" ]]; then
67
+ usage >&2
68
+ exit 2
69
+ fi
70
+ shift
71
+
72
+ root="$default_root"
73
+ remaining=()
74
+ remaining_count=0
75
+ parse_root "$@"
76
+ # macOS 自带 Bash 在 `nounset` 下会将空数组视为未绑定,因此空参数必须避免展开数组。
77
+ if [[ "$remaining_count" -eq 0 ]]; then
78
+ set --
79
+ else
80
+ set -- "${remaining[@]}"
81
+ fi
82
+ config_file="$root/config.json"
83
+
84
+ case "$action" in
85
+ init)
86
+ [[ $# -eq 0 ]] || { usage >&2; exit 2; }
87
+ ensure_config
88
+ echo "OK: initialized $root"
89
+ ;;
90
+ get)
91
+ [[ $# -eq 0 ]] || { usage >&2; exit 2; }
92
+ ensure_config
93
+ cat "$config_file"
94
+ ;;
95
+ set)
96
+ issuer_id=""
97
+ key_id=""
98
+ team_id=""
99
+ while [[ $# -gt 0 ]]; do
100
+ case "$1" in
101
+ --issuer-id) issuer_id="$2"; shift 2 ;;
102
+ --key-id) key_id="$2"; shift 2 ;;
103
+ --team-id) team_id="$2"; shift 2 ;;
104
+ *) usage >&2; exit 2 ;;
105
+ esac
106
+ done
107
+ validate_id "issuer id" "$issuer_id" 128
108
+ validate_id "key id" "$key_id" 64
109
+ if [[ -n "$team_id" ]]; then validate_id "team id" "$team_id" 64; fi
110
+ ensure_config
111
+ jq -n --arg issuer "$issuer_id" --arg key "$key_id" --arg team "$team_id" \
112
+ '{version: 1, issuer_id: $issuer, key_id: $key, team_id: $team}' > "$config_file"
113
+ chmod 600 "$config_file"
114
+ echo "OK: stored non-secret API identifiers in $config_file"
115
+ ;;
116
+ import-key)
117
+ [[ $# -eq 2 && "$1" == "--path" ]] || { usage >&2; exit 2; }
118
+ source_key="$2"
119
+ [[ -f "$source_key" && "${source_key##*.}" == "p8" ]] || {
120
+ echo "ERROR: --path must reference an existing .p8 file" >&2
121
+ exit 2
122
+ }
123
+ ensure_config
124
+ target_key="$root/private_keys/$(basename "$source_key")"
125
+ cp "$source_key" "$target_key"
126
+ chmod 600 "$target_key"
127
+ echo "OK: imported private key to $target_key"
128
+ ;;
129
+ reset)
130
+ [[ $# -eq 0 ]] || { usage >&2; exit 2; }
131
+ if [[ -f "$config_file" ]]; then
132
+ rm "$config_file"
133
+ fi
134
+ echo "OK: removed non-secret configuration; private keys and submissions were preserved"
135
+ ;;
136
+ *)
137
+ usage >&2
138
+ exit 2
139
+ ;;
140
+ esac
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: dwy-publish
3
- description: "发版/部署编排器。触发条件:用户说\"发版\"\"部署\"\"发布上线\"\"release\"\"publish\"\"走发版流程\"时。按应用目录确认发布方式并缓存,串起定版本→changelog→安全检查→build/发布→监控→通知。版本号决策单独走 dwy-semver,GA 打包走 dwy-github-action-publish,发布前安全检查走 dwy-sdk-spec——本 skill 负责编排,按路径主动调它们。"
3
+ description: "发版/部署编排器。触发条件:用户说\"发版\"\"部署\"\"发布上线\"\"release\"\"publish\"\"走发版流程\"时。按应用目录确认发布方式并缓存,串起定版本→changelog→安全检查→打 tag→build/发布→监控→通知。每次更新版本必须打 git tag,tag 版本串与 changelog 新版本标题完全一致。版本号决策单独走 dwy-semver,GA 打包走 dwy-github-action-publish,发布前安全检查走 dwy-sdk-spec——本 skill 负责编排,按路径主动调它们。"
4
4
  ---
5
5
 
6
6
  # 发版编排器
7
7
 
8
8
  一条发版链的编排执行。进入前测试已完成。
9
9
 
10
- **先**读仓库上下文,判目标平台(前端/后端/Android/iOS/鸿蒙/通用)+ 定位应用目录(相对项目根的相对路径)。**再**按下表执行 8 步。
10
+ **先**读仓库上下文,判目标平台(前端/后端/Android/iOS/鸿蒙/通用)+ 定位应用目录(相对项目根的相对路径)。**再**按下表执行 9 步。
11
11
 
12
12
  | # | 步骤 | 类型 | 调用 |
13
13
  |---|------|------|------|
@@ -16,16 +16,19 @@ description: "发版/部署编排器。触发条件:用户说\"发版\"\"部
16
16
  | 3 | 定版本号 + 多文件同步 | 通用步 | `../dwy-semver` + `references/version-sync.md` |
17
17
  | 4 | 写 changelog(按平台子目录) | 通用步 | `references/changelog.md` |
18
18
  | 5 | 安全检查(闸门,未过不发) | 通用步 | `../dwy-sdk-spec` |
19
- | 6 | build + 触发发布 | 项目步 | `references/<平台>.md`;走 GA 引 `../dwy-github-action-publish` |
20
- | 7 | 监控发布进程 | 项目步 | `references/monitor-notify.md` |
21
- | 8 | 通知结果(输出结果文本) | — | `references/monitor-notify.md` |
19
+ | 6 | commit 版本变更 + 打 tag 并推送 | 通用步 | `references/git-tag.md` |
20
+ | 7 | build + 触发发布 | 项目步 | `references/<平台>.md`;走 GA 引 `../dwy-github-action-publish` |
21
+ | 8 | 监控发布进程 | 项目步 | `references/monitor-notify.md` |
22
+ | 9 | 通知结果(输出结果文本) | — | `references/monitor-notify.md` |
22
23
 
23
24
  平台流程文件:`frontend-deploy.md` / `backend-deploy.md` / `ios.md` / `android.md` / `harmony.md` / `generic-release.md`。
24
25
 
25
26
  ## 编排约束
26
27
 
27
- - **通用步固化**(定版本/changelog/安全检查跨项目一致,走子 skill/脚本);**项目步读上下文+缓存**(build/deploy/监控命令因项目而异,**绝不写死**,探测不到问用户后缓存)。
28
- - 安全检查(第 5 步)是闸门,未过不进发布。
29
- - 全程 AI 自动判断、自动跑,仅搞不定时才问用户(版本级别拿不准、命令探测不到、配置缺失、构建/发布失败)。
28
+ - **通用步固化**(定版本/changelog/安全检查/打 tag 跨项目一致,走子 skill/脚本);**项目步读上下文+缓存**(build/deploy/监控命令因项目而异,**绝不写死**,探测不到问用户后缓存)。
29
+ - 安全检查(第 5 步)是闸门,未过不进 tag / 发布。
30
+ - **每次更新版本必须打 tag**(第 6 步):tag 版本串与本次 changelog 新版本标题(`## x.y.z`)完全一致;细则见 `references/git-tag.md`。无 bump 的纯重发可不打新 tag。
31
+ - 若 GA workflow 由 tag 触发,第 6 步 push tag 即触发第 7 步发布。
32
+ - 全程 AI 自动判断、自动跑,仅搞不定时才问用户(版本级别拿不准、命令探测不到、配置缺失、构建/发布失败、需删远端 tag)。
30
33
  - 编排时按文件路径主动加载子 skill(`../dwy-semver`、`../dwy-sdk-spec`、`../dwy-github-action-publish`);这些 skill 也可被用户独立触发。
31
34
  - `.dwy/` 缓存提醒用户加进 `.gitignore`。
@@ -24,8 +24,9 @@
24
24
  - `github-action` → 引 `../dwy-github-action-publish`(先过通用检查)
25
25
  - `local` → 缓存的本地构建/发布命令
26
26
 
27
- ## changelog / 安全检查 / 监控
27
+ ## changelog / tag / 安全检查 / 监控
28
28
 
29
29
  - changelog → `changelog.md`(写 `android/CHANGELOG.md`)
30
+ - tag → `git-tag.md`(每次 bump 必打;版本串与 changelog `##` 标题一致)
30
31
  - 安全检查 → `../dwy-sdk-spec`
31
32
  - 监控 + 结果 → `monitor-notify.md`
@@ -17,7 +17,8 @@
17
17
  - `github-action` → 引 `../dwy-github-action-publish`(CI 推荐 OIDC,先过通用检查)
18
18
  - `local` → 缓存的本地构建/部署命令(打镜像 / 部署脚本)
19
19
 
20
- ## changelog / 监控
20
+ ## changelog / tag / 监控
21
21
 
22
22
  - changelog → `changelog.md`(写 `backend/CHANGELOG.md`)
23
+ - tag → `git-tag.md`(每次 bump 必打;版本串与 changelog `##` 标题一致)
23
24
  - 监控 + verify → `monitor-notify.md`(后端信号:健康检查 / 版本接口 / 运行日志 / 镜像 tag)
@@ -10,7 +10,26 @@ monorepo 下一个仓库可能同时含 android / ios / harmony / frontend / bac
10
10
  - `frontend/CHANGELOG.md`
11
11
  - `backend/CHANGELOG.md`
12
12
 
13
- 子目录名按仓库实际结构定(先在第 0 步识别平台目录)。
13
+ 子目录名按仓库实际结构定(先在第 0 步识别平台目录)。单包仓库可在根目录一份;monorepo 按包目录(如 `dwy-cli/CHANGELOG.md`、`frontend/eui/CHANGELOG.md`)。
14
+
15
+ ## 版本标题格式(与 git tag 对齐)
16
+
17
+ 新版本必须用二级标题,版本串单独成标题,供第 6 步打 tag 原样取用:
18
+
19
+ ```markdown
20
+ # <包标识> ← monorepo 建议有 H1,作为 tag 的包前缀(如 create-dwy、@dwydev/eui)
21
+
22
+ ## 0.16.1 ← 新版本标题;tag 版本串必须与此完全一致
23
+
24
+ ### Patch Changes
25
+
26
+ - ...
27
+ ```
28
+
29
+ 约束:
30
+
31
+ - 标题里只写 SemVer 版本串(可含预发布,如 `1.0.0-rc.1`),不要写 `v0.16.1`、日期或其它后缀
32
+ - 该版本串 = 版本来源文件里的 version = 即将打的 tag 中的版本部分(见 `git-tag.md`)
14
33
 
15
34
  ## 写法
16
35
 
@@ -22,9 +41,9 @@ git log <last-tag>..HEAD --oneline -- <平台子目录>/
22
41
  ```
23
42
 
24
43
  3. 按 `feat` / `fix` / `refactor` / `chore` 分组
25
- 4. 写入该平台 `CHANGELOG.md`,标注新版本号
44
+ 4. 写入该平台 `CHANGELOG.md`,用 `## <新版本号>` 标注(格式见上)
26
45
 
27
- 如果仓库已有自动生成命令(changelogen 等),优先使用,但仍按平台目录过滤范围。
46
+ 如果仓库已有自动生成命令(changelogen 等),优先使用,但仍按平台目录过滤范围,且产出的版本标题须满足上述格式。
28
47
 
29
48
  ## 自动执行
30
49
 
@@ -33,5 +52,6 @@ changelog 由 AI 自动生成并写入,不强制逐步确认。仅当 commit
33
52
  ## 禁止
34
53
 
35
54
  - 禁止写一份全局 CHANGELOG 混入多平台变更
36
- - 禁止 changelog 未写完就进入部署
55
+ - 禁止 changelog 未写完就进入 tag / 部署
37
56
  - 禁止把其他平台的 commit 写进当前平台 CHANGELOG(必须按目录过滤)
57
+ - 禁止版本标题写成与即将打的 tag 版本串不一致的形式
@@ -17,7 +17,8 @@
17
17
  - `github-action` → 引 `../dwy-github-action-publish`(CI 推荐 OIDC,先过通用检查)
18
18
  - `local` → 缓存的本地构建/部署命令(推镜像 / 传 CDN·OSS / 部署脚本)
19
19
 
20
- ## changelog / 监控
20
+ ## changelog / tag / 监控
21
21
 
22
22
  - changelog → `changelog.md`(写 `frontend/CHANGELOG.md`)
23
+ - tag → `git-tag.md`(每次 bump 必打;版本串与 changelog `##` 标题一致)
23
24
  - 监控 + verify → `monitor-notify.md`(前端信号:页面访问 / 版本接口 / 产物 hash / CDN 刷新)
@@ -20,8 +20,9 @@
20
20
 
21
21
  **PyPI/npm 未配置 GA 时按 `publish-config.md` 主动推荐 OIDC。**
22
22
 
23
- ## changelog / 安全检查 / 监控
23
+ ## changelog / tag / 安全检查 / 监控
24
24
 
25
25
  - changelog → `changelog.md`(单包仓库根目录一份;monorepo 按包目录过滤)
26
+ - tag → `git-tag.md`(每次 bump 必打;版本串与 changelog `##` 标题一致;monorepo 例:`@dwydev/eui@2.2.3`、`create-dwy@0.16.1`)
26
27
  - 安全检查 → `../dwy-sdk-spec`(对外包必查泄露/产物)
27
28
  - 监控 + verify → `monitor-notify.md`(包仓库版本查询 / GitHub Release)
@@ -0,0 +1,82 @@
1
+ # 发版 git tag(强制)
2
+
3
+ **每次更新版本号都必须打 tag 并推远端。** 无版本 bump 的纯重发 / 仅重跑 workflow / 仅回滚,不打新 tag。
4
+
5
+ ## 时机
6
+
7
+ 在第 3 步版本同步 + 第 4 步 changelog 写完、第 5 步安全检查通过之后:
8
+
9
+ 1. 将版本来源文件 + CHANGELOG 一并 commit(若尚未提交)
10
+ 2. 按下方规则算出 tag 名
11
+ 3. 本地打 tag → push tag 到 origin
12
+ 4. 再进入 build / 发布(若 workflow 由 tag 触发,push tag 即触发发布)
13
+
14
+ ```bash
15
+ # 版本与 changelog 已落盘并 commit 后
16
+ git tag <tag>
17
+ git push origin <tag>
18
+ ```
19
+
20
+ ## tag 与 changelog 版本对齐(硬规则)
21
+
22
+ tag 中的**版本串**必须与本次 CHANGELOG **新版本标题**完全一致,禁止改写。
23
+
24
+ | CHANGELOG 写法 | 取出的版本串 |
25
+ |----------------|-------------|
26
+ | `## 0.16.1` | `0.16.1` |
27
+ | `## 2.2.3` | `2.2.3` |
28
+ | `## 1.0.0-rc.1` | `1.0.0-rc.1` |
29
+
30
+ 禁止:
31
+
32
+ - changelog 写 `## 0.16.1`,tag 打成 `v0.16.1` / `0.16.1.0` / `0.16`(格式不一致)
33
+ - tag 版本与 `package.json` / `pyproject.toml` 等来源文件不一致
34
+ - 未写 changelog 新版本标题就打 tag
35
+
36
+ ## tag 全名拼法
37
+
38
+ 先取 changelog 版本串 `VER`,再按仓库惯例拼全名:
39
+
40
+ | 场景 | 规则 | 例 |
41
+ |------|------|-----|
42
+ | monorepo 多包 / 多平台 | `{包标识}@{VER}`;包标识优先取该 CHANGELOG 顶部 H1(去掉 `# `),否则取 `package.json` 的 `name` | CHANGELOG H1 `# create-dwy` + `## 0.16.1` → `create-dwy@0.16.1`;H1 `# @dwydev/eui` + `## 2.2.3` → `@dwydev/eui@2.2.3` |
43
+ | 单包仓库且历史 tag 已有固定前缀 | 沿用历史前缀 + `VER`(仅当前缀不篡改 VER 本身时) | 历史 `v1.2.0` 且 changelog 为 `## 1.3.0` 时,若项目约定 `v` 前缀且 VER 仍完整出现 → 须在本仓库已有 tag 惯例中确认;**优先保证 VER 与 changelog 一致** |
44
+ | 单包仓库无历史惯例 | 直接用 `VER` | changelog `## 1.0.0` → tag `1.0.0` |
45
+
46
+ **冲突裁决**:若「历史 `v` 前缀」与「changelog 无 `v`」冲突,以 **changelog 标题里的版本串** 为准拼 tag(monorepo 用 `包@VER`,单包用 `VER`),不要为了凑 `v` 前缀改掉 VER。仓库若已有 workflow 写死 `v*` 触发,同步改 workflow 或 changelog 标题约定,二者必须一致。
47
+
48
+ 打 tag 前自检:
49
+
50
+ ```bash
51
+ # VER 必须等于 changelog 最新 ## 标题
52
+ # 包来源文件 version 字段必须等于 VER
53
+ git tag -l | head # 对照历史命名是否 monorepo 包前缀
54
+ ```
55
+
56
+ ## 推送与触发
57
+
58
+ - 必须 `git push origin <tag>`,只打本地 tag 不算完成
59
+ - method 为 `github-action` / `github-action-oidc` 且 workflow `on.push.tags` 时:push tag 即触发 CI,不必再另起发布命令
60
+ - method 为 local / testflight / maven 等:先 push tag,再跑缓存的 `publish_cmd`(或按项目既有顺序,但 tag 不可省)
61
+
62
+ ## 重发 / 删 tag
63
+
64
+ 远端已有错误 tag 需要覆盖时:
65
+
66
+ 1. **先确认用户允许**删除远端 tag / release
67
+ 2. 再删远端 + 本地,重打同名 tag 推送
68
+
69
+ ```bash
70
+ git push origin :refs/tags/<tag>
71
+ git tag -d <tag>
72
+ git tag <tag>
73
+ git push origin <tag>
74
+ ```
75
+
76
+ ## 禁止
77
+
78
+ - 禁止版本号已 bump 却不打 tag
79
+ - 禁止 tag 版本串与 changelog 新版本标题不一致
80
+ - 禁止 tag 与版本来源文件不一致
81
+ - 禁止未 push 远端就当发版完成
82
+ - 禁止未确认用户就删除远端已有 tag / release
@@ -18,8 +18,9 @@
18
18
  - `github-action` → 引 `../dwy-github-action-publish`(先过通用检查)
19
19
  - `local` → 缓存的本地构建/发布命令
20
20
 
21
- ## changelog / 安全检查 / 监控
21
+ ## changelog / tag / 安全检查 / 监控
22
22
 
23
23
  - changelog → `changelog.md`(写 `harmony/CHANGELOG.md`)
24
+ - tag → `git-tag.md`(每次 bump 必打;版本串与 changelog `##` 标题一致)
24
25
  - 安全检查 → `../dwy-sdk-spec`
25
26
  - 监控 + 结果 → `monitor-notify.md`
@@ -21,12 +21,13 @@
21
21
 
22
22
  按缓存 method 分流:
23
23
  - `testflight` → 用项目实际的 TestFlight 上传命令(fastlane lane / Transporter / altool)
24
- - `cocoapods` / `spm` → 用项目实际的 pod 发布 / git tag 命令(SPM 以 tag 为版本,tag 须等于 `CFBundleShortVersionString`)
24
+ - `cocoapods` / `spm` → 用项目实际的 pod 发布命令(SPM 消费 git tag;tag 走统一 `git-tag.md`,版本串 = changelog = `CFBundleShortVersionString`)
25
25
  - `github-action` → 引 `../dwy-github-action-publish`(先过其通用检查)
26
26
  - `local` → 缓存的本地命令
27
27
 
28
- ## changelog / 安全检查 / 监控
28
+ ## changelog / tag / 安全检查 / 监控
29
29
 
30
30
  - changelog → `changelog.md`(写 `ios/CHANGELOG.md`)
31
+ - tag → `git-tag.md`(每次 bump 必打;版本串与 changelog `##` 标题一致)
31
32
  - 安全检查 → `../dwy-sdk-spec`(SDK 发布尤其要查泄露)
32
33
  - 监控 + 结果 → `monitor-notify.md`
@@ -30,7 +30,7 @@ verify 失败,发布不算完成。
30
30
 
31
31
  发布终态后在对话里输出结果摘要,不接外部通知:
32
32
 
33
- - **成功**:平台 / 应用目录、版本号、产物、渠道、verify 结果
34
- - **失败**:失败阶段、关键报错、下一步建议(重发 / bump / 修配置)
33
+ - **成功**:平台 / 应用目录、版本号、**git tag 全名**、产物、渠道、verify 结果
34
+ - **失败**:失败阶段、关键报错、下一步建议(重发 / bump / 修配置 / 重打 tag)
35
35
 
36
36
  涉及删除远端 release / tag 的重发,必须先确认用户允许。
@@ -120,7 +120,7 @@ python3 scripts/bump.py 2.0.0-rc.1 major # -> 2.0.0 (预发布转
120
120
  ## 与 dwy-publish 的边界
121
121
 
122
122
  - **dwy-semver**(本 skill):只回答"该升哪一位、新号是多少"
123
- - **dwy-publish**:拿到版本号后执行发版流程(测试 → bump 版本文件 → changelog → build → publish → tag)
123
+ - **dwy-publish**:拿到版本号后执行发版流程(测试 → bump 版本文件 → changelog → 安全检查 → **打 tag(版本串与 changelog 标题一致)** → build → publish)
124
124
 
125
125
  发版时若不确定版本号,先用本 skill 决策,再交给 dwy-publish 落地。
126
126
 
@@ -143,7 +143,7 @@ curl -X POST http://localhost:8000/tasks \
143
143
 
144
144
  ```json
145
145
  {
146
- "code": 200,
146
+ "code": "SUCCESS",
147
147
  "message": "success",
148
148
  "data": {
149
149
  "id": "task_a1b2c3d4...",
@@ -184,7 +184,7 @@ curl "http://localhost:8000/tasks?task_type=process_data"
184
184
  curl -X POST http://localhost:8000/tasks/task_a1b2c3d4.../cancel
185
185
  ```
186
186
 
187
- 仅 `pending` 和 `running` 状态的任务可取消。已结束的任务返回 400。
187
+ 仅 `pending` 和 `running` 状态的任务可取消。已结束的任务抛 `BusinessError`,HTTP **422**(`TASK_ALREADY_FINISHED`)。
188
188
 
189
189
  ### 自定义路由前缀
190
190
 
@@ -0,0 +1,57 @@
1
+ # 自媒体 skills(uc-media)
2
+
3
+ ## 处理流程
4
+
5
+ ```text
6
+ 跨集 channel-profile · topic-backlog · design-defaults?
7
+
8
+ 有主题 ─────────────────────┐
9
+ 无主题 → 0005 ★人选 ────────┤
10
+ ▼
11
+ 【0010 产品卡 · 一步】
12
+ ① 竞品 + 差异化
13
+ ② AI 自动推荐演讲地图
14
+ (讲/不讲 · 内容柱 · 时长)
15
+ ★ 不做则停;可改 §3 地图
16
+ ▼
17
+ 【0030 事实】按内容柱扩展深库
18
+ ▼
19
+ 【0040 脚本】按地图蒸馏口播
20
+ ▼
21
+ 0050→0060→0070→0080→render
22
+ 可选 0090 包装
23
+ ```
24
+
25
+ **因果:** 主题 → **看清赛道并自动生成讲什么** → 为地图备事实 → 蒸馏成片。
26
+
27
+ | 编号 | 决定什么 | 主文档 |
28
+ |------|----------|--------|
29
+ | 0005 | 拍哪个主题(可选) | topic-backlog.md |
30
+ | **0010** | 竞品差在哪 + **AI 推荐讲什么** | `0010-product/产品卡-*.md` |
31
+ | 0030 | 按地图扩事实 | `0030-facts/事实-*.md` |
32
+ | 0040 | 口播分镜 | `0040-script/脚本-*.md` |
33
+ | 0050–0080 | 设计·素材·成片·工厂 | … |
34
+ | 0090 | 多平台包装(可选) | 0070-package/ |
35
+
36
+ | 模式 | 行为 |
37
+ |------|------|
38
+ | **fast** | 0010→0030 连跑后停;0040/0050 停;连 0060–0070;0080 停 |
39
+ | **standard** | 每步确认(含是否改 0010 地图) |
40
+
41
+ ## Skills
42
+
43
+ | Skill | 作用 |
44
+ |-------|------|
45
+ | uc-media-flow | 编排 |
46
+ | uc-media-0005-ideation | 选题发现 |
47
+ | **uc-media-0010-product** | **竞品 + AI 演讲地图(合并)** |
48
+ | uc-media-0030-facts | 按地图扩事实 |
49
+ | uc-media-0040-script … 0080-factory | 脚本与制作 |
50
+ | media-platform-packaging | 0090 可选 |
51
+ | dwy-doubao-tts | 口播配音(豆包声音复刻 2.0,可选) |
52
+
53
+ 契约:[`uc-media-flow/CONTRACT.md`](./uc-media-flow/CONTRACT.md)
54
+
55
+ ## 兼容
56
+
57
+ 旧分步 `0010-topic` + `0020-product` → 单一 `0010-product`;无 0020 目录。