harveyz-skill 0.19.0 → 0.22.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 (154) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/package.json +19 -15
  3. package/skills/coding/capture-vocab/SKILL.md +94 -0
  4. package/skills/coding/init-goal/SKILL.md +155 -0
  5. package/skills/coding/init-goal/references/templates.md +78 -0
  6. package/skills/coding/init-goal/tests/init-goal.bats +83 -0
  7. package/skills/coding/init-workflow/SKILL.md +22 -4
  8. package/skills/coding/init-workflow/references/conflict-analysis.md +47 -1
  9. package/skills/coding/init-workflow/references/lock-file-format.md +6 -1
  10. package/skills/coding/question-me/SKILL.md +205 -0
  11. package/skills/coding/question-me/scripts/__pycache__/render_tree.cpython-314.pyc +0 -0
  12. package/skills/coding/question-me/scripts/__pycache__/test_render_tree.cpython-314.pyc +0 -0
  13. package/skills/coding/question-me/scripts/render_tree.py +287 -0
  14. package/skills/coding/question-me/scripts/test_render_tree.py +97 -0
  15. package/skills/creative/capture-todo/SKILL.md +6 -2
  16. package/skills/design/sync-design/SKILL.md +294 -177
  17. package/skills/meta/sync-hotfix/SKILL.md +188 -0
  18. package/skills/mint/fix-skill/SKILL.md +153 -0
  19. package/skills/mint/fix-skill/references/caller-integration-template.md +46 -0
  20. package/skills/mint/fix-skill/references/fix-record-template.md +37 -0
  21. package/skills/{meta → mint}/publish-skill/SKILL.md +2 -2
  22. package/skills/{meta → mint}/scout-philosophy/SKILL.md +21 -3
  23. package/skills/research/extract-cognition/SKILL.md +541 -0
  24. package/skills/research/extract-cognition/evals/evals.json +97 -0
  25. package/skills/research/extract-cognition/references/article-analysis-methods.md +729 -0
  26. package/skills/research/extract-url/SKILL.md +117 -51
  27. package/skills/research/extract-url/experiment/two-phase-tagging/INSTRUCTIONS.md +55 -0
  28. package/skills/research/extract-url/experiment/two-phase-tagging/expected-output.yaml +30 -0
  29. package/skills/research/extract-url/experiment/two-phase-tagging/fixture-article.txt +66 -0
  30. package/skills/research/extract-url/experiment/two-phase-tagging/fixture-fixed-tags.txt +23 -0
  31. package/skills/research/extract-url/experiment/two-phase-tagging/v1-prompt.txt +102 -0
  32. package/skills/research/extract-url/references/__pycache__/article_utils.cpython-314.pyc +0 -0
  33. package/skills/research/extract-url/references/article_utils.py +91 -1
  34. package/skills/research/extract-url/references/file-format.md +27 -1
  35. package/skills/research/extract-url/scripts/__pycache__/config.cpython-314.pyc +0 -0
  36. package/skills/research/extract-url/scripts/__pycache__/playwright_web.cpython-314.pyc +0 -0
  37. package/skills/research/extract-url/scripts/__pycache__/playwright_xcom.cpython-314.pyc +0 -0
  38. package/skills/research/extract-url/scripts/count_article_stats.py +35 -0
  39. package/skills/research/extract-url/scripts/playwright_xcom.py +78 -17
  40. package/skills/research/extract-url/scripts/validate_article.py +10 -2
  41. package/skills/research/extract-url/tests/__pycache__/conftest.cpython-314-pytest-9.0.2.pyc +0 -0
  42. package/skills/research/extract-url/tests/__pycache__/test_config.cpython-314-pytest-9.0.2.pyc +0 -0
  43. package/skills/research/extract-url/tests/__pycache__/test_count_article_stats.cpython-314-pytest-9.0.2.pyc +0 -0
  44. package/skills/research/extract-url/tests/__pycache__/test_dedup_check.cpython-314-pytest-9.0.2.pyc +0 -0
  45. package/skills/research/extract-url/tests/__pycache__/test_playwright_web.cpython-314-pytest-9.0.2.pyc +0 -0
  46. package/skills/research/extract-url/tests/__pycache__/test_playwright_xcom.cpython-314-pytest-9.0.2.pyc +0 -0
  47. package/skills/research/extract-url/tests/__pycache__/test_validate_article.cpython-314-pytest-9.0.2.pyc +0 -0
  48. package/skills/research/extract-url/tests/test_article_utils_tags.py +139 -0
  49. package/skills/research/extract-url/tests/test_count_article_stats.py +91 -0
  50. package/skills/research/extract-url/tests/test_playwright_xcom.py +28 -0
  51. package/skills/research/extract-url/tests/test_validate_article.py +58 -1
  52. package/skills/research/learn-video/SKILL.md +6 -6
  53. package/skills/writing/forge-doc/scripts/__pycache__/md_to_pdf.cpython-314.pyc +0 -0
  54. package/skills-index.json +113 -70
  55. package/tools/hub/docs/cli-reference.md +209 -0
  56. package/tools/hub/hub/__pycache__/__init__.cpython-314.pyc +0 -0
  57. package/tools/hub/hub/__pycache__/__main__.cpython-314.pyc +0 -0
  58. package/tools/hub/hub/cli/__pycache__/__init__.cpython-314.pyc +0 -0
  59. package/tools/hub/hub/cli/__pycache__/git.cpython-314.pyc +0 -0
  60. package/tools/hub/hub/cli/__pycache__/projects.cpython-314.pyc +0 -0
  61. package/tools/hub/hub/cli/__pycache__/tasks.cpython-314.pyc +0 -0
  62. package/tools/hub/hub/core/__pycache__/__init__.cpython-314.pyc +0 -0
  63. package/tools/hub/hub/core/__pycache__/db.cpython-314.pyc +0 -0
  64. package/tools/hub/hub/core/__pycache__/migrate.cpython-314.pyc +0 -0
  65. package/tools/hub/hub/core/__pycache__/projects.cpython-314.pyc +0 -0
  66. package/tools/hub/hub/core/__pycache__/tasks.cpython-314.pyc +0 -0
  67. package/tools/hub/hub/core/__pycache__/todo_sync.cpython-314.pyc +0 -0
  68. package/tools/hub/hub/core/todo_sync.py +20 -2
  69. package/tools/hub/hub/tui/__pycache__/__init__.cpython-314.pyc +0 -0
  70. package/tools/hub/hub/tui/__pycache__/app.cpython-314.pyc +0 -0
  71. package/tools/hub/hub/tui/__pycache__/git.cpython-314.pyc +0 -0
  72. package/tools/hub/hub/tui/panels/__pycache__/__init__.cpython-314.pyc +0 -0
  73. package/tools/hub/hub/tui/panels/__pycache__/git.cpython-314.pyc +0 -0
  74. package/tools/hub/hub/tui/panels/__pycache__/projects.cpython-314.pyc +0 -0
  75. package/tools/hub/hub/tui/panels/__pycache__/tasks.cpython-314.pyc +0 -0
  76. package/tools/hub/hub.sh +1 -1
  77. package/tools/hub/tests/__pycache__/__init__.cpython-314.pyc +0 -0
  78. package/tools/hub/tests/__pycache__/test_cli.cpython-314-pytest-9.0.2.pyc +0 -0
  79. package/tools/hub/tests/__pycache__/test_cli.cpython-314-pytest-9.1.0.pyc +0 -0
  80. package/tools/hub/tests/__pycache__/test_db.cpython-314-pytest-9.0.2.pyc +0 -0
  81. package/tools/hub/tests/__pycache__/test_db.cpython-314-pytest-9.1.0.pyc +0 -0
  82. package/tools/hub/tests/__pycache__/test_migrate.cpython-314-pytest-9.0.2.pyc +0 -0
  83. package/tools/hub/tests/__pycache__/test_migrate.cpython-314-pytest-9.1.0.pyc +0 -0
  84. package/tools/hub/tests/__pycache__/test_projects.cpython-314-pytest-9.0.2.pyc +0 -0
  85. package/tools/hub/tests/__pycache__/test_projects.cpython-314-pytest-9.1.0.pyc +0 -0
  86. package/tools/hub/tests/__pycache__/test_scan.cpython-314-pytest-9.0.2.pyc +0 -0
  87. package/tools/hub/tests/__pycache__/test_scan.cpython-314-pytest-9.1.0.pyc +0 -0
  88. package/tools/hub/tests/__pycache__/test_tasks.cpython-314-pytest-9.0.2.pyc +0 -0
  89. package/tools/hub/tests/__pycache__/test_tasks.cpython-314-pytest-9.1.0.pyc +0 -0
  90. package/tools/hub/tests/__pycache__/test_todo_sync.cpython-314-pytest-9.0.2.pyc +0 -0
  91. package/tools/hub/tests/__pycache__/test_tui_app.cpython-314-pytest-9.0.2.pyc +0 -0
  92. package/tools/hub/tests/__pycache__/test_tui_app.cpython-314-pytest-9.1.0.pyc +0 -0
  93. package/tools/hub/tests/__pycache__/test_tui_git.cpython-314-pytest-9.0.2.pyc +0 -0
  94. package/tools/hub/tests/__pycache__/test_tui_git.cpython-314-pytest-9.1.0.pyc +0 -0
  95. package/tools/hub/tests/__pycache__/test_tui_git_panel.cpython-314-pytest-9.0.2.pyc +0 -0
  96. package/tools/hub/tests/__pycache__/test_tui_git_panel.cpython-314-pytest-9.1.0.pyc +0 -0
  97. package/tools/hub/tests/__pycache__/test_tui_projects_panel.cpython-314-pytest-9.0.2.pyc +0 -0
  98. package/tools/hub/tests/__pycache__/test_tui_projects_panel.cpython-314-pytest-9.1.0.pyc +0 -0
  99. package/tools/hub/tests/__pycache__/test_tui_tasks_panel.cpython-314-pytest-9.0.2.pyc +0 -0
  100. package/tools/hub/tests/__pycache__/test_tui_tasks_panel.cpython-314-pytest-9.1.0.pyc +0 -0
  101. package/tools/hub/tool.json +1 -1
  102. package/tools/sync-agent/pyproject.toml +24 -0
  103. package/tools/sync-agent/sync.sh +33 -0
  104. package/tools/sync-agent/sync_agent/__init__.py +0 -0
  105. package/tools/sync-agent/sync_agent/__main__.py +9 -0
  106. package/tools/sync-agent/sync_agent/cli.py +201 -0
  107. package/tools/sync-agent/sync_agent/config.py +57 -0
  108. package/tools/sync-agent/sync_agent/launchd.py +45 -0
  109. package/tools/sync-agent/sync_agent/syncthing.py +85 -0
  110. package/tools/sync-agent/tests/__init__.py +0 -0
  111. package/tools/sync-agent/tests/test_cli.py +124 -0
  112. package/tools/sync-agent/tests/test_config.py +56 -0
  113. package/tools/sync-agent/tests/test_syncthing.py +153 -0
  114. package/tools/sync-agent/tool.json +8 -0
  115. package/skills/coding/close-task/SKILL.md +0 -150
  116. package/skills/coding/close-task/references/output-templates.md +0 -76
  117. package/skills/coding/dispatch-task/SKILL.md +0 -167
  118. package/skills/coding/dispatch-task/references/agent-mapping.md +0 -59
  119. package/skills/coding/dispatch-task/references/task-template.md +0 -145
  120. package/skills/research/extract-url/scripts/__pycache__/config.cpython-312.pyc +0 -0
  121. package/skills/writing/forge-doc/scripts/__pycache__/md_to_pdf.cpython-312.pyc +0 -0
  122. package/skills/writing/manage-docs/SKILL.md +0 -130
  123. package/skills/writing/manage-docs/references/custom-categories.md +0 -32
  124. package/skills/writing/manage-docs/references/index-template.md +0 -29
  125. package/tools/hub/hub/__pycache__/__init__.cpython-312.pyc +0 -0
  126. package/tools/hub/hub/__pycache__/__main__.cpython-312.pyc +0 -0
  127. package/tools/hub/hub/core/__pycache__/__init__.cpython-312.pyc +0 -0
  128. package/tools/hub/hub/core/__pycache__/db.cpython-312.pyc +0 -0
  129. package/tools/hub/hub/core/__pycache__/migrate.cpython-312.pyc +0 -0
  130. package/tools/hub/hub/core/__pycache__/projects.cpython-312.pyc +0 -0
  131. package/tools/hub/hub/core/__pycache__/tasks.cpython-312.pyc +0 -0
  132. package/tools/hub/hub/tui/__pycache__/__init__.cpython-312.pyc +0 -0
  133. package/tools/hub/hub/tui/__pycache__/app.cpython-312.pyc +0 -0
  134. package/tools/hub/hub/tui/__pycache__/git.cpython-312.pyc +0 -0
  135. package/tools/hub/hub/tui/panels/__pycache__/__init__.cpython-312.pyc +0 -0
  136. package/tools/hub/hub/tui/panels/__pycache__/git.cpython-312.pyc +0 -0
  137. package/tools/hub/hub/tui/panels/__pycache__/projects.cpython-312.pyc +0 -0
  138. package/tools/hub/hub/tui/panels/__pycache__/tasks.cpython-312.pyc +0 -0
  139. /package/skills/{meta → mint}/archive-skill/SKILL.md +0 -0
  140. /package/skills/{meta → mint}/contribute-skill/SKILL.md +0 -0
  141. /package/skills/{meta → mint}/dedup-skill/SKILL.md +0 -0
  142. /package/skills/{meta → mint}/dedup-skill/references/auto-scan.md +0 -0
  143. /package/skills/{experiment → mint}/init-skill/SKILL.md +0 -0
  144. /package/skills/{experiment → mint}/init-skill/references/skill-authoring-guide.md +0 -0
  145. /package/skills/{experiment → mint}/init-skill/references/skill-standard.md +0 -0
  146. /package/skills/{research → mint}/learn-skill/SKILL.md +0 -0
  147. /package/skills/{research → mint}/learn-skill/evals/evals.json +0 -0
  148. /package/skills/{meta → mint}/runby-opencode/SKILL.md +0 -0
  149. /package/skills/{experiment → research}/learn-paper/SKILL.md +0 -0
  150. /package/skills/{experiment → research}/probe-session/SKILL.md +0 -0
  151. /package/skills/{experiment → research}/probe-session/data/strategies.json +0 -0
  152. /package/skills/{experiment → research}/probe-session/scripts/list_profiles.py +0 -0
  153. /package/skills/{experiment → research}/probe-session/scripts/probe.py +0 -0
  154. /package/skills/{experiment → research}/probe-session/vars.json +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.22.0] - 2026-07-06
11
+
12
+ ### Added
13
+ - `capture-vocab`:项目级领域术语字典 skill,支持 add/query/update/remove,上下文自动推断字段
14
+
15
+ ### Changed
16
+ - `sync-design` v5.0.0:模式路由(sync/design),设计阶段流程(新建/修改草稿),三检查点草稿删除,`linkedEntryId` 自动回填
17
+ - `question-me` v3.0.0:重构为 section-structure 标准;v2.0.0 动态树 + 遍历顺序漏洞修复
18
+ - `extract-url` v2.3.0:章节结构重组,新增 `count_article_stats.py` 完成回报卡片
19
+ - `scout-philosophy`:新增阶段八——产出可直接复制的起始模板(`standard.md`)
20
+ - `init-goal`:移至 `coding/` bundle,`installScope` 改为 global
21
+ - `learn-skill`:移至 `mint` bundle
22
+
23
+ ### Removed
24
+ - `dispatch-task`、`close-task`:归档
25
+
26
+ ## [0.21.0] - 2026-07-01
27
+
28
+ ### Added
29
+ - `init-workflow` v4.1.x:Step 4e git config 健康检查(`core.hooksPath` + `merge.ff`),类型 E 冲突检测与自动修复;lock 文件新增 `git_config` 节
30
+ - `sync-hotfix` v1.1.x:Step 5 全文件差异扫描安全网,Step 1 不再退出确保 Step 5 始终执行
31
+ - `extract-url` v2.2.0:X Notes 内容根节点修复、嵌套 tweet 过滤;tag 固定集(`fixed_tags.txt`)与候选集分离,两阶段打标流程
32
+ - `fix-skill` v2.1.0:多轮 AI 修复 + per-skill session doc(含 HOTFIXES.md 写入)
33
+ - `extract-cognition` v0.2.0:学习导向重设计——五阶段 evidence/audit layer + 学习层(Stage 5-6)
34
+ - `skill-map.html`:全景参考页面,Grid 布局按 bundle 分组展示所有 35 个 skill
35
+ - `sync-design` v3.1.0:`.hskill/` outputDir 默认路径 + legacy path 迁移
36
+
37
+ ### Changed
38
+ - Bundle 重组:`meta` 拆分为 `mint`(skill 生命周期)和 `devops`(项目运维);`experiment` 解散,各 skill 回归领域 bundle
39
+ - `publish-skill` v1.3.1:F7 动词词表新增 `survey`
40
+ - `capture-todo` v4.5.1:修复 merge dual-hook 兼容性(`--no-commit` 解耦 MERGE_MSG 与 commit-msg)
41
+ - Pre-commit hook:允许 remote staging sync merge 不被拦截
42
+
43
+ ### Removed
44
+ - `manage-docs`:归档(功能已由 `manage-dir` + `references/built-in/diataxis.md` 覆盖)
45
+
46
+ ## [0.20.0] - 2026-06-25
47
+
48
+ ### Added
49
+ - `init-goal`:对话式向导 skill,为 `/loop` 命令生成结构化 Goal Prompt 文本;深度优先解析用户输入、自动匹配五类模版(Fix Until Green / Research Loop / Refine Until Satisfied / Monitor & React / Explore & Map)、渐进式披露(模版数据提取至 references/templates.md)
50
+ - `learn-video`:新增 Bilibili 视频支持(YouTube + Bilibili 双平台)
51
+
52
+ ### Changed
53
+ - `init-goal`:迁移至 `coding` bundle(原 `meta`)
54
+
10
55
  ## [0.19.0] - 2026-06-22
11
56
 
12
57
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harveyz-skill",
3
- "version": "0.19.0",
3
+ "version": "0.22.0",
4
4
  "description": "Skill manager for Claude Code, Cursor, and Codex",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,38 +16,42 @@
16
16
  "bundles.json",
17
17
  "skills-index.json",
18
18
  "CHANGELOG.md",
19
- "skills/research/learn-skill/",
19
+ "skills/mint/learn-skill/",
20
20
  "skills/research/extract-url/",
21
21
  "skills/research/extract-vision/",
22
22
  "skills/research/learn-video/",
23
+ "skills/research/survey-skillrepo/",
24
+ "skills/research/learn-paper/",
25
+ "skills/research/extract-cognition/",
26
+ "skills/research/probe-session/",
23
27
  "skills/creative/capture-todo/",
24
28
  "skills/creative/capture-insight/",
25
29
  "skills/coding/init-workflow/",
26
30
  "skills/coding/setup-debug/",
27
- "skills/coding/dispatch-task/",
28
- "skills/coding/close-task/",
31
+ "skills/coding/init-goal/",
32
+ "skills/coding/question-me/",
33
+ "skills/coding/capture-vocab/",
29
34
  "skills/writing/forge-doc/",
30
35
  "skills/writing/draw-diagram/",
31
- "skills/writing/manage-docs/",
32
36
  "skills/writing/manage-dir/",
33
37
  "skills/writing/migrate-spec/",
34
38
  "skills/design/scout-brand/",
35
39
  "skills/design/build-style/",
36
40
  "skills/design/sync-design/",
37
- "skills/experiment/init-skill/",
38
- "skills/research/survey-skillrepo/",
41
+ "skills/mint/init-skill/",
42
+ "skills/mint/publish-skill/",
43
+ "skills/mint/archive-skill/",
44
+ "skills/mint/dedup-skill/",
45
+ "skills/mint/contribute-skill/",
46
+ "skills/mint/fix-skill/",
47
+ "skills/mint/runby-opencode/",
48
+ "skills/mint/scout-philosophy/",
39
49
  "skills/meta/clean-git/",
40
- "skills/meta/archive-skill/",
41
- "skills/meta/dedup-skill/",
42
- "skills/meta/contribute-skill/",
43
- "skills/meta/publish-skill/",
44
- "skills/meta/runby-opencode/",
45
50
  "skills/meta/release-project/",
51
+ "skills/meta/sync-hotfix/",
46
52
  "skills/meta/sync-agent/",
47
- "skills/experiment/probe-session/",
48
- "skills/experiment/learn-paper/",
49
- "skills/meta/scout-philosophy/",
50
53
  "tools/hub/",
54
+ "tools/sync-agent/",
51
55
  "hooks/check-similar-branch/"
52
56
  ],
53
57
  "engines": {
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: capture-vocab
3
+ version: "1.1.1"
4
+ description: Use when you need to add, query, update, or remove project-specific domain terms — invoke with /capture-vocab add|query|update|remove <term> to manage a shared vocabulary file at hskill/capture-vocab/vocab.md
5
+ user_invocable: true
6
+ ---
7
+
8
+ # Domain Vocabulary
9
+
10
+ ## 概述
11
+
12
+ 管理项目级领域术语字典。词汇表存于 `hskill/capture-vocab/vocab.md`,供用户和 agent 定义、查询业务专有名词。每个术语包含:规范名称、定义、Avoid 列表、Reference(可选)。
13
+
14
+ 词汇表只存业务领域概念(跨前后端、跨 AI/人类对话都会出现的词)。函数名、变量名等技术命名不进词汇表。
15
+
16
+ ## 用法
17
+
18
+ ```
19
+ /capture-vocab add <term>
20
+ /capture-vocab query <term>
21
+ /capture-vocab update <term>
22
+ /capture-vocab remove <term>
23
+ ```
24
+
25
+ ## 词汇文件
26
+
27
+ `<project-root>/hskill/capture-vocab/vocab.md`
28
+
29
+ ```markdown
30
+ # Domain Vocabulary
31
+
32
+ ## 术语名
33
+ 定义文本(一到两句话,说清楚概念是什么)。
34
+ _Avoid_: 旧叫法, 混用词
35
+ _Reference_: src/models/order.ts:42, docs/business/order-flow.md
36
+ ```
37
+
38
+ `_Avoid_:` 和 `_Reference_:` 均为可选,不填时省略该行。`_Reference_:` 为自由文本,可写代码文件路径+行号、文档位置、任意引用。
39
+
40
+ ## 操作
41
+
42
+ ### add `<term>`
43
+
44
+ 1. 检查 `hskill/capture-vocab/vocab.md` 是否存在 `## <term>` section(大小写不敏感匹配)
45
+ 2. 若已存在:输出"术语 '<term>' 已存在,请用 `update` 修改"并退出
46
+ 3. 若不存在,**先从当前对话上下文推断**各字段:
47
+ - **定义**:从对话中该词的使用方式推断一到两句话的定义;无法推断则留空
48
+ - **Avoid**:从对话中出现过的同义词或混用叫法推断;无法推断则留空
49
+ - **Reference**:从对话中提到的代码文件/文档位置推断;无法推断则留空
50
+ 4. 展示推断结果,格式如下,请用户确认或修改:
51
+ ```
52
+ 准备添加以下条目,请确认或直接修改:
53
+
54
+ ## <term>
55
+ <推断的定义,或"(请输入)"若无法推断>
56
+ _Avoid_: <推断的 avoid,或省略>
57
+ _Reference_: <推断的 reference,或省略>
58
+
59
+ 确认添加?(y / 直接输入修改内容)
60
+ ```
61
+ 5. 用户确认后(输入 `y` 或不输入内容直接回车)写入;若用户输入了修改内容,用修改后的值写入
62
+ 6. 若目录 `hskill/capture-vocab/` 不存在,创建它;若 `vocab.md` 不存在,创建并写入 `# Domain Vocabulary\n`
63
+ 7. 在文件末尾追加新 section,Avoid/Reference 为空时省略对应行
64
+
65
+ ### query `<term>`
66
+
67
+ 1. 检查 `hskill/capture-vocab/vocab.md` 是否存在;若不存在,输出"词汇表尚未初始化,请先用 `add` 添加术语"并退出
68
+ 2. 按 `## <term>` 标题匹配(大小写不敏感),读取该 section 直到下一个 `##` 或文件末尾
69
+ 3. 返回该 section 的完整内容(定义 + Avoid + Reference)
70
+ 4. 若未找到,输出"未找到术语 '<term>'",然后列出 vocab.md 中所有 `##` 标题作为已有术语名
71
+
72
+ ### update `<term>`
73
+
74
+ 1. 检查词汇表存在且包含该术语;若文件不存在或术语不存在,输出对应错误后退出
75
+ 2. 展示当前条目的完整内容
76
+ 3. **从当前对话上下文推断**需要更新的字段(定义/Avoid/Reference);若无新信息可推断,各字段显示为原值
77
+ 4. 展示推断后的新条目,请用户确认或修改(格式同 add 步骤 4)
78
+ 5. 用最终值替换该 section 内容,写回文件;未修改的字段保持原值不变
79
+
80
+ ### remove `<term>`
81
+
82
+ 1. 检查词汇表存在且包含该术语;若不存在,输出对应错误后退出
83
+ 2. 展示该术语的当前条目
84
+ 3. 提示"确认删除 '<term>'?(y/N)",等待用户输入
85
+ 4. 若输入 `y`:删除该 section(含前后空行),写回文件
86
+ 5. 若输入其他:输出"已取消"并退出
87
+
88
+ ## Agent 加载约定
89
+
90
+ 本 Skill 不自动注入词汇表到 session 上下文。如需在每次 session 开始时加载术语,在项目 `CLAUDE.md` 中加入:
91
+
92
+ ```markdown
93
+ 每次 session 开始,读取 `hskill/capture-vocab/vocab.md`(如存在)。
94
+ ```
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: init-goal
3
+ version: "1.3.0"
4
+ description: "Generate a structured /loop Goal Prompt through guided dialogue. Parses user's initial message to auto-fill known fields and match the best template, then clarifies only what's missing (depth-first, one question at a time). Outputs the Goal Prompt as text — the skill writes no files; the loop agent persists prompt.md/log.md/summary.md during execution per the embedded rules. Triggers: user says /init-goal, 'initialize a loop goal', 'set up a GOal', 'help me use /loop to accomplish X', or describes a repetitive autonomous task they want Claude to run in a loop."
5
+ user_invocable: true
6
+ ---
7
+
8
+ # init-goal
9
+
10
+ 对话式向导,帮助用户为 `/loop` 命令生成一段结构化的 **Goal Prompt 文本**。
11
+
12
+ **这个 skill 的唯一产物就是这段 Goal Prompt 文本。** 它内含「执行期间维护文档」的规则——这些规则是写给跑 loop 的 agent 的指令,由那个 agent 在执行 loop 时落盘三个文件。**init-goal 自己不创建任何目录、不写任何文件。**
13
+
14
+ 执行期间由 loop agent 生成的文件(slug 取自 GOAL):
15
+ - `~/.hskill/init-goal/<goal-slug>/prompt.md`(agent 首轮存档,静态不变)
16
+ - `~/.hskill/init-goal/<goal-slug>/log.md`(agent 每轮追加)
17
+ - `~/.hskill/init-goal/<goal-slug>/summary.md`(agent 退出时生成)
18
+
19
+ **规则:每次只发一条消息,等用户回复后再继续。**
20
+
21
+ ---
22
+
23
+ ## Step 0 — 解析输入,自动填充,深度优先澄清
24
+
25
+ ### 0a: 解析
26
+
27
+ 从用户的初始消息中提取所有已知信息,填入对应字段:
28
+
29
+ | 字段 | 提取什么 |
30
+ |---|---|
31
+ | GOAL | 用户想达成的目标,含成功标准 |
32
+ | EXECUTION | 用户描述的每轮步骤或动作 |
33
+ | EVAL | 用户提到的衡量进展的方式 |
34
+ | CONSTRAINTS | 用户提到的限制(不能改什么、最多多少轮…) |
35
+ | EXIT_EXPLICIT | 用户提到的停止条件 |
36
+ | EXIT_FALLBACK | 用户提到的兜底行为 |
37
+
38
+ ### 0b: 匹配模版
39
+
40
+ 根据用户描述,选最匹配的模版,用模版默认值填充所有**用户未提供**的字段:
41
+
42
+ | 匹配信号 | 模版 |
43
+ |---|---|
44
+ | 测试 / test / bug / 修复 / fix | Fix Until Green |
45
+ | 研究 / 搜索 / 信息收集 / search | Research Loop |
46
+ | 优化 / 改进 / 迭代 / refine / 润色 | Refine Until Satisfied |
47
+ | 监控 / 检查状态 / watch / monitor | Monitor & React |
48
+ | 探索 / 代码库 / 结构 / map / 未知领域 | Explore & Map |
49
+ | 无明显匹配 | 从零开始(所有字段留空) |
50
+
51
+ 置信度高时直接套用,不问用户确认模版名称。
52
+
53
+ 匹配后,读取 `references/templates.md` 中对应模版的字段值,填入用户未提供的字段。
54
+
55
+ ### 0c: 深度优先澄清
56
+
57
+ 按以下优先级,逐一澄清**缺失或不够具体**的字段。每次只问一个,等回复后再判断是否还需要继续问。
58
+
59
+ **优先级(从高到低):**
60
+
61
+ 1. **GOAL** — 如果目标不够具体(缺少成功标准、范围不清楚),先把这个搞清楚。其他一切从 GOAL 派生。
62
+ 2. **EXIT_EXPLICIT** — 如果用户没有明确说"达到什么状态停止",问这个。这是 loop 的终点,必须清晰。
63
+ 3. **CONSTRAINTS** — 如果用户提到了限制但不完整(比如"不能改某些文件"但没说具体哪些),确认一下。
64
+ 4. **EXECUTION** — 如果模版默认步骤明显不适用当前场景,才问。通常不需要问。
65
+ 5. **EVAL / EXIT_FALLBACK** — 几乎不需要问;模版默认值在绝大多数情况下够用。
66
+
67
+ **什么时候停止澄清:**
68
+ - GOAL 足够具体(有明确的成功标准)
69
+ - EXIT_EXPLICIT 已知
70
+ - 其余关键字段都有合理的值(用户提供的或模版默认值)
71
+
72
+ 澄清完成后,进入 Step 1。
73
+
74
+ ---
75
+
76
+ ## Step 1 — 展示预填摘要,确认
77
+
78
+ 展示所有字段的当前值(用户已提供的 + 模版默认值),一次性呈现:
79
+
80
+ ---
81
+ **这是根据你的描述整理的 loop 配置,请确认:**
82
+
83
+ **目标:** [GOAL]
84
+
85
+ **每轮执行:**
86
+ [EXECUTION]
87
+
88
+ **评估指标:** [EVAL]
89
+
90
+ **约束:** [CONSTRAINTS]
91
+
92
+ **退出条件:**
93
+ - 明确:[EXIT_EXPLICIT]
94
+ - 兜底:[EXIT_FALLBACK]
95
+
96
+ ---
97
+
98
+ 询问:「确认后直接生成文件,或告诉我需要调整哪个字段。」
99
+
100
+ 若用户要调整,只修改被指出的字段,重新展示摘要。直到用户确认。
101
+
102
+ ---
103
+
104
+ ## Step 2 — 生成并输出 Goal Prompt 文本
105
+
106
+ 这一步**不写任何文件**。init-goal 的产物就是下面这段文本——把它生成出来,直接展示给用户,由用户拿去喂给 `/loop`。文本里的 `## 文档维护` 段是写给执行 loop 的 agent 的指令,三个文档由那个 agent 在跑 loop 时落盘。
107
+
108
+ **先生成 goal-slug:**
109
+ 若 GOAL 是英文,转为 kebab-case(小写 + 连字符),截取前 40 字符。
110
+ 若 GOAL 是中文,生成一个简短的英文描述(5-8 个单词,kebab-case)。
111
+ 把生成的 slug 填进下面文本里所有 `[goal-slug]` 占位处。
112
+
113
+ **生成并展示这段 Goal Prompt 文本**(占位符全部替换为实际值后呈现):
114
+
115
+ ```markdown
116
+ ## GOal
117
+
118
+ [GOAL]
119
+
120
+ ## 每轮执行
121
+
122
+ [EXECUTION]
123
+
124
+ ## 评估(每轮末尾)
125
+
126
+ [EVAL]
127
+
128
+ ## 约束
129
+
130
+ [CONSTRAINTS]
131
+
132
+ ## 退出条件
133
+
134
+ - 明确条件:[EXIT_EXPLICIT]
135
+ - 兜底逻辑:[EXIT_FALLBACK]
136
+
137
+ ## 文档维护(由运行本 loop 的 agent 负责,工作目录 ~/.hskill/init-goal/[goal-slug]/)
138
+
139
+ - **首轮:** 若 prompt.md 不存在,`mkdir -p` 工作目录并把本 prompt 完整存为 prompt.md(静态存档,之后不改)。
140
+ - **每轮:** 开始前读 log.md 末条 Round 获取上下文(首轮无则跳过);结束时向 log.md 追加一条 `### Round N — YYYY-MM-DD HH:MM`,含三行——执行内容 / 评估结果 / 下一轮建议。
141
+ - **退出时**(明确条件 / 兜底 / 用户中断):在同目录写 summary.md,含——目标、结果(一句话)、关键轮次、退出原因、总轮数、可选下一步。
142
+ ```
143
+
144
+ **展示完文本后,附上启动说明:**
145
+
146
+ ---
147
+ ✅ Goal Prompt 已生成(如上)。复制整段,启动 loop(interval 自选):
148
+
149
+ ```
150
+ /loop <interval> <粘贴上面整段 Goal Prompt>
151
+ ```
152
+
153
+ 首轮运行时,loop agent 会按 `## 文档维护` 的指令把它存为 `~/.hskill/init-goal/[goal-slug]/prompt.md`,每轮追加 `log.md`,结束时写 `summary.md`。
154
+
155
+ ---
@@ -0,0 +1,78 @@
1
+ # init-goal 模版数据
2
+
3
+ 套用模版时读取此文件,取对应模版的字段值填入未由用户提供的字段。
4
+
5
+ ---
6
+
7
+ ## Fix Until Green
8
+
9
+ ```
10
+ GOAL: 持续修复代码问题,直到所有测试通过。
11
+ EXECUTION:
12
+ 1. 运行测试套件,记录当前通过数和失败列表
13
+ 2. 分析失败用例,定位根因
14
+ 3. 针对根因做最小化修复(每轮最多修改 3 个文件,不修改测试文件)
15
+ 4. 重新运行测试,记录新的通过数
16
+ EVAL: 测试通过率(通过数 / 总数),本轮净增通过数。
17
+ CONSTRAINTS: 不修改测试文件本身;每轮最多修改 3 个源文件。
18
+ EXIT_EXPLICIT: 所有测试通过(通过率 100%)
19
+ EXIT_FALLBACK: 连续 2 轮通过率无变化则停止,汇报当前卡点和失败原因。
20
+ ```
21
+
22
+ ## Research Loop
23
+
24
+ ```
25
+ GOAL: 持续搜索和整理信息,直到对目标主题有足够深度的理解。
26
+ EXECUTION:
27
+ 1. 回顾当前已知信息和未解答的问题
28
+ 2. 选择下一个最有价值的搜索方向(不重复已用关键词组合)
29
+ 3. 执行搜索(每轮不超过 5 个查询)
30
+ 4. 摘要新发现,追加到 log
31
+ EVAL: 本轮新增有效信息条数;预设问题中已有答案的比例。
32
+ CONSTRAINTS: 每轮搜索不超过 5 个查询;不重复已搜索过的关键词组合。
33
+ EXIT_EXPLICIT: 所有预设问题均已有答案,且连续 1 轮无新发现。
34
+ EXIT_FALLBACK: 连续 2 轮无新发现则停止,输出当前已知信息汇总。
35
+ ```
36
+
37
+ ## Refine Until Satisfied
38
+
39
+ ```
40
+ GOAL: 反复优化指定输出,直到质量达到满意标准。
41
+ EXECUTION:
42
+ 1. 评审当前版本,列出最重要的 3 个改进点
43
+ 2. 执行改进(每轮只改 3 处,不推翻上一轮已确认的改动)
44
+ 3. 对新版本自评分(1-10),说明理由
45
+ EVAL: 自评分(1-10),记录分数变化趋势。
46
+ CONSTRAINTS: 每轮只改进不超过 3 处;不推翻上一轮已确认的改动。
47
+ EXIT_EXPLICIT: 自评分 ≥ 8。
48
+ EXIT_FALLBACK: 连续 2 轮分数不再提升则停止,说明当前瓶颈。
49
+ ```
50
+
51
+ ## Monitor & React
52
+
53
+ ```
54
+ GOAL: 持续监控指定状态,发现变化时执行响应动作。
55
+ EXECUTION:
56
+ 1. 检查目标状态
57
+ 2. 与上轮状态(见 log 最后条目)对比,判断是否有变化
58
+ 3. 若有变化则执行预定响应动作(仅限预定范围)
59
+ 4. 记录本轮状态快照
60
+ EVAL: 状态是否稳定;本轮是否触发响应动作。
61
+ CONSTRAINTS: 响应动作仅限预定范围,不做范围外操作。
62
+ EXIT_EXPLICIT: 目标状态连续 3 轮稳定。
63
+ EXIT_FALLBACK: 超过 20 轮未达到稳定则停止并上报当前状态。
64
+ ```
65
+
66
+ ## Explore & Map
67
+
68
+ ```
69
+ GOAL: 系统性探索未知领域/代码库,建立完整的结构地图。
70
+ EXECUTION:
71
+ 1. 从未探索节点中选择下一个最重要的节点
72
+ 2. 深入分析该节点(结构、依赖、行为)
73
+ 3. 记录发现与关联,更新探索进度
74
+ EVAL: 已探索节点数 / 总节点估算数;覆盖率百分比。
75
+ CONSTRAINTS: 每轮只深入一个节点;不跳跃式探索。
76
+ EXIT_EXPLICIT: 覆盖率达到目标阈值,或确认无新节点。
77
+ EXIT_FALLBACK: 连续 2 轮无新节点则汇总已知结构并停止。
78
+ ```
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env bats
2
+
3
+ SKILL_MD="$(cd "${BATS_TEST_DIRNAME}/.." && pwd)/SKILL.md"
4
+
5
+ _fm() {
6
+ local field="$1"
7
+ awk 'BEGIN{n=0} /^---/{n++; if(n==2)exit; next} n==1{print}' "${SKILL_MD}" \
8
+ | grep "^${field}:" | head -1 \
9
+ | sed "s/^${field}:[[:space:]]*//" | tr -d '"'"'"
10
+ }
11
+
12
+ @test "SKILL.md exists" {
13
+ [ -f "${SKILL_MD}" ]
14
+ }
15
+
16
+ @test "frontmatter: name is init-goal" {
17
+ [ "$(_fm name)" = "init-goal" ]
18
+ }
19
+
20
+ @test "frontmatter: version is present and semver-like" {
21
+ local v
22
+ v="$(_fm version)"
23
+ [ -n "${v}" ]
24
+ echo "${v}" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$'
25
+ }
26
+
27
+ @test "frontmatter: user_invocable is true" {
28
+ [ "$(_fm user_invocable)" = "true" ]
29
+ }
30
+
31
+ @test "frontmatter: description is non-empty" {
32
+ local d
33
+ d="$(_fm description)"
34
+ [ -n "${d}" ]
35
+ }
36
+
37
+ @test "body: contains the three core steps (0/1/2)" {
38
+ grep -q "## Step 0" "${SKILL_MD}"
39
+ grep -q "## Step 1" "${SKILL_MD}"
40
+ grep -q "## Step 2" "${SKILL_MD}"
41
+ }
42
+
43
+ @test "body: Step 0 has parse/template/clarify sub-steps (0a/0b/0c)" {
44
+ grep -q "0a" "${SKILL_MD}"
45
+ grep -q "0b" "${SKILL_MD}"
46
+ grep -q "0c" "${SKILL_MD}"
47
+ }
48
+
49
+ @test "body: skill outputs Goal Prompt text, does not write files itself" {
50
+ grep -q "唯一产物" "${SKILL_MD}"
51
+ grep -q "不写任何文件" "${SKILL_MD}"
52
+ }
53
+
54
+ @test "body: doc-lifecycle rules are addressed to the loop agent" {
55
+ grep -q "## 文档维护" "${SKILL_MD}"
56
+ grep -q "运行本 loop 的 agent" "${SKILL_MD}"
57
+ }
58
+
59
+ @test "body: contains all 5 template names" {
60
+ grep -q "Fix Until Green" "${SKILL_MD}"
61
+ grep -q "Research Loop" "${SKILL_MD}"
62
+ grep -q "Refine Until Satisfied" "${SKILL_MD}"
63
+ grep -q "Monitor & React" "${SKILL_MD}"
64
+ grep -q "Explore & Map" "${SKILL_MD}"
65
+ }
66
+
67
+ @test "body: prompt.md output format includes all required sections" {
68
+ grep -q "## GOal" "${SKILL_MD}"
69
+ grep -q "## 每轮执行" "${SKILL_MD}"
70
+ grep -q "## 评估" "${SKILL_MD}"
71
+ grep -q "## 约束" "${SKILL_MD}"
72
+ grep -q "## 退出条件" "${SKILL_MD}"
73
+ grep -q "## 文档维护" "${SKILL_MD}"
74
+ }
75
+
76
+ @test "body: references log.md and summary.md" {
77
+ grep -q "log.md" "${SKILL_MD}"
78
+ grep -q "summary.md" "${SKILL_MD}"
79
+ }
80
+
81
+ @test "body: references ~/.hskill/init-goal data directory" {
82
+ grep -q "~/.hskill/init-goal" "${SKILL_MD}"
83
+ }
@@ -2,7 +2,7 @@
2
2
  name: init-workflow
3
3
  description: "Initialize or update git branch management standards: reads .hskill/init-workflow/workflow-config.yml, audits config, incrementally generates and deploys git hooks (pre-commit, commit-msg, pre-push, post-checkout), and generates workflow docs. Triggers: initializing a new git repo, first-time git setup, user asks to set/update branch protection or naming rules, reinstalling git hooks, or syncing after skill/template updates."
4
4
  user_invocable: true
5
- version: "4.1.0"
5
+ version: "4.1.2"
6
6
  ---
7
7
 
8
8
  # Git 工作流初始化
@@ -79,7 +79,22 @@ echo "" | grep -E "<pattern>" > /dev/null 2>&1; echo $?
79
79
  提取每个 hook 中 MANAGED 块外的用户手写代码,识别其中引用的分支名、提交类型、pattern、外部脚本调用。
80
80
 
81
81
  #### 4d. 冲突检测
82
- 综合 4a/4b/4c,识别四种冲突类型(A 条件重叠、B 引用断裂、C 手改冲突、D 新增重叠)。类型定义与选项见 `references/conflict-analysis.md`。
82
+ 综合 4a/4b/4c,识别四种冲突类型(A 条件重叠、B 引用断裂、C 手改冲突、D 新增重叠);第五种类型 E(git config 漂移)由 Step 4e 另行检测。类型定义与选项见 `references/conflict-analysis.md`。
83
+
84
+ #### 4e. git config 健康检查
85
+
86
+ 检查以下两项本地 git config:
87
+
88
+ ```bash
89
+ git config --local core.hooksPath # 期望:.githooks
90
+ git config --local merge.ff # 期望:false
91
+ ```
92
+
93
+ 1. 读取 lock 文件的 `git_config` 节(不存在则跳过对比,直接检测实际值)
94
+ 2. 执行上述命令,获取实际值
95
+ 3. 实际值与期望不符,或实际值缺失 → 类型 E 冲突
96
+
97
+ 类型 E 冲突在 Step 5 列出(附期望值 vs 实际值),默认选项为"自动修复(A)"。Step 6 写入 hooks 后立即执行修复命令。类型 E 完整定义见 `references/conflict-analysis.md`。
83
98
 
84
99
  ---
85
100
 
@@ -212,7 +227,8 @@ python3 <skill-path>/references/render_docs.py \
212
227
  .githooks/commit-msg UNCHANGED
213
228
  .githooks/pre-push UNCHANGED
214
229
  .githooks/post-checkout NEW
215
- core.hooksPath = .githooks
230
+ core.hooksPath = .githooks ✅(或 ❌ 已修复 / ❌ 未修复)
231
+ merge.ff = false ✅(或 ❌ 已修复 / ❌ 未修复)
216
232
  docs/reference/git-workflow.md UPDATED
217
233
  CLAUDE.md 已有引用,跳过
218
234
  ─────────────────────────────────────────────────────
@@ -222,6 +238,8 @@ CLAUDE.md 已有引用,跳过
222
238
  [3/3] wip 类型引用断裂 → 用户选择保留用户代码
223
239
  ```
224
240
 
241
+ 首次安装时 Step 4 整体跳过,Step 6 直接设置两项配置;Step 9 对应行均显示 `✅`。
242
+
225
243
  若有保留的无法映射规则,附注提示。
226
244
 
227
245
  ---
@@ -231,7 +249,7 @@ CLAUDE.md 已有引用,跳过
231
249
  | 文件 | 说明 | 读取时机 |
232
250
  |------|------|---------|
233
251
  | `references/workflow-config.yml` | 配置文件模板 | Step 2:用户无配置时复制 |
234
- | `references/conflict-analysis.md` | 4a–4d 实现脚本、冲突类型 A/B/C/D 完整定义与选项、Step 5 呈现格式 | Step 4/5:执行分析前读取 |
252
+ | `references/conflict-analysis.md` | 4a–4e 实现脚本、冲突类型 A/B/C/D/E 完整定义与选项、Step 5 呈现格式 | Step 4/5:执行分析前读取 |
235
253
  | `references/hook-templates.md` | 4 个 hook 的代码模板、块 ID 规范、hash 计算、多行写入技巧 | Step 6:生成 hooks 前 |
236
254
  | `references/acceptance-test.md` | 验收场景 bash 脚本、期望结果、结果表格格式 | Step 6.5:用户选 Y 时读取 |
237
255
  | `references/lock-file-format.md` | lock 文件 YAML 格式 | Step 9:写入 lock 文件前 |
@@ -1,6 +1,6 @@
1
1
  # 冲突分析实现细节
2
2
 
3
- Step 4(4a–4d)的具体实现方法,Step 5 冲突类型的完整定义。
3
+ Step 4(4a–4e)的具体实现方法,Step 5 冲突类型的完整定义。
4
4
 
5
5
  ---
6
6
 
@@ -124,3 +124,49 @@ actual_hash=$(printf '%s' "<block_content>" | git hash-object --stdin | cut -c1-
124
124
  ```
125
125
 
126
126
  其他冲突类型按同样格式呈现,选项见上方类型定义。
127
+
128
+ ---
129
+
130
+ ## 类型 E — git config 漂移
131
+
132
+ **触发条件:** `core.hooksPath` 或 `merge.ff` 与期望值不符,或在本地 git config 中缺失。
133
+
134
+ **严重程度:** 高(hooks 已部署但完全失效)
135
+
136
+ **检测方式(Step 4e):**
137
+
138
+ ```bash
139
+ git config --local core.hooksPath # 期望:.githooks
140
+ git config --local merge.ff # 期望:false
141
+ ```
142
+
143
+ 判定规则:
144
+ - 值正确 → 无问题
145
+ - 值存在但不正确 → 类型 E 冲突(配置漂移)
146
+ - 值缺失(命令返回空 / exit 1) → 类型 E 冲突(配置丢失)
147
+
148
+ lock 文件含 `git_config` 节时,优先与 lock 中记录的值对比;lock 缺失该节时直接检测实际值。
149
+
150
+ **Step 5 呈现格式(每项独立列出,最多两条):**
151
+
152
+ ```
153
+ ─────────────────────────────────────────────────────────
154
+ [N/M] git config 漂移(类型 E)
155
+ 问题:core.hooksPath 未配置,.githooks/ 中的 hooks 不会被 git 加载
156
+ 期望:core.hooksPath = .githooks
157
+ 实际:(未设置)
158
+ 影响:所有分支保护、提交信息校验、push 限制均失效
159
+
160
+ 选项:
161
+ A) 自动修复(推荐):运行 git config core.hooksPath .githooks
162
+ B) 跳过(保持当前状态,hooks 继续失效)
163
+ ─────────────────────────────────────────────────────────
164
+ ```
165
+
166
+ `merge.ff` 缺失时替换对应字段:`问题` 改为"merge.ff 未配置,fast-forward 合并未被禁止",`期望` 改为 `merge.ff = false`,`影响` 改为"所有合并均将 fast-forward,pre-commit hook 无法检查合并来源分支"。
167
+
168
+ **默认选项:A(自动修复)。**
169
+
170
+ **Step 6 修复执行时机:** 写入 hooks 后,对用户选择 A 的每一条类型 E 冲突立即执行对应的 `git config` 命令,无需用户手动操作。
171
+
172
+ **用户选 B(跳过)时:** Step 9 对应行显示 `❌ 未修复`,并附注"hooks 当前不生效"。
@@ -29,6 +29,11 @@ tags:
29
29
  push_rules:
30
30
  enforce: true
31
31
  block_force_push: [main, staging]
32
+ git_config:
33
+ core_hooks_path: ".githooks" # 上次运行时设置的值
34
+ merge_ff: "false" # 上次运行时设置的值
32
35
  ```
33
36
 
34
- 只记录影响 hook 生成的字段,不需要照搬 `workflow-config.yml` 的完整结构。
37
+ 只记录影响 hook 生成的字段,不需要照搬 `workflow-config.yml` 的完整结构。`git_config` 节与其他字段同属一个 YAML 文档,追加在末尾。
38
+
39
+ **4e 读取逻辑(仅在 skill 重新运行时执行,首次安装时 Step 4 整体跳过):** lock 文件缺少 `git_config` 节时(即 skill 在本功能加入前已运行过),跳过与 lock 的对比,直接检测当前实际值;若实际值不符或缺失,仍报类型 E 冲突。