hunter-harness 0.1.0 → 0.1.2

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 (71) hide show
  1. package/dist/bin.js +1033 -219
  2. package/package.json +2 -2
  3. package/resources/harness/general/.harness-build.json +1 -1
  4. package/resources/harness/general/harness-archive/SKILL.md +215 -215
  5. package/resources/harness/general/harness-codebase-map/SKILL.md +112 -112
  6. package/resources/harness/general/harness-codebase-map/templates/map-summary.md +3 -3
  7. package/resources/harness/general/harness-knowledge-ingest/SKILL.md +246 -246
  8. package/resources/harness/general/harness-knowledge-query/SKILL.md +164 -164
  9. package/resources/harness/general/harness-plan/SKILL.md +127 -127
  10. package/resources/harness/general/harness-review/SKILL.md +156 -156
  11. package/resources/harness/general/harness-run/SKILL.md +132 -132
  12. package/resources/harness/general/harness-submit/SKILL.md +159 -159
  13. package/resources/harness/general/harness-sync/SKILL.md +82 -82
  14. package/resources/harness/general/harness-test/SKILL.md +180 -180
  15. package/resources/harness/general/scripts/harness_deploy.py +580 -580
  16. package/resources/harness/java/.harness-build.json +1 -1
  17. package/resources/harness/java/harness-apidoc/SKILL.md +86 -86
  18. package/resources/harness/java/harness-archive/SKILL.md +215 -215
  19. package/resources/harness/java/harness-codebase-map/SKILL.md +112 -112
  20. package/resources/harness/java/harness-codebase-map/templates/map-summary.md +3 -3
  21. package/resources/harness/java/harness-knowledge-ingest/SKILL.md +246 -246
  22. package/resources/harness/java/harness-knowledge-query/SKILL.md +164 -164
  23. package/resources/harness/java/harness-package/SKILL.md +87 -87
  24. package/resources/harness/java/harness-plan/SKILL.md +127 -127
  25. package/resources/harness/java/harness-review/SKILL.md +156 -156
  26. package/resources/harness/java/harness-run/SKILL.md +148 -148
  27. package/resources/harness/java/harness-submit/SKILL.md +166 -166
  28. package/resources/harness/java/harness-sync/SKILL.md +82 -82
  29. package/resources/harness/java/harness-test/SKILL.md +192 -192
  30. package/resources/harness/java/scripts/harness_deploy.py +580 -580
  31. package/resources/harness/manifests/general.json +13 -33
  32. package/resources/harness/manifests/java.json +15 -35
  33. package/resources/harness/migrations/0.1.1/general.json +358 -0
  34. package/resources/harness/migrations/0.1.1/java.json +398 -0
  35. package/resources/bootstrap-ir/manifest.json +0 -19
  36. package/resources/bootstrap-ir/skills/harness-apidoc.yaml +0 -24
  37. package/resources/bootstrap-ir/skills/harness-archive.yaml +0 -24
  38. package/resources/bootstrap-ir/skills/harness-codebase-map.yaml +0 -24
  39. package/resources/bootstrap-ir/skills/harness-knowledge-ingest.yaml +0 -24
  40. package/resources/bootstrap-ir/skills/harness-package.yaml +0 -24
  41. package/resources/bootstrap-ir/skills/harness-plan.yaml +0 -24
  42. package/resources/bootstrap-ir/skills/harness-review.yaml +0 -24
  43. package/resources/bootstrap-ir/skills/harness-run.yaml +0 -24
  44. package/resources/bootstrap-ir/skills/harness-skill-optimizer.yaml +0 -28
  45. package/resources/bootstrap-ir/skills/harness-submit.yaml +0 -24
  46. package/resources/bootstrap-ir/skills/harness-sync.yaml +0 -24
  47. package/resources/bootstrap-ir/skills/harness-test.yaml +0 -24
  48. package/resources/bootstrap-ir/templates/claude-code-skill.md +0 -12
  49. package/resources/harness/general/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-01-10-ledger-reconciliation/reports/final/summary-data.json +0 -43
  50. package/resources/harness/general/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-02-14-ledger-snapshot-followup/reports/final/summary-data.json +0 -38
  51. package/resources/harness/general/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-03-05-webhook-contract/reports/final/summary-data.json +0 -36
  52. package/resources/harness/general/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/project.yaml +0 -1
  53. package/resources/harness/general/harness-knowledge-ingest/tests/test_harness_knowledge.py +0 -1792
  54. package/resources/harness/java/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-01-10-ledger-reconciliation/reports/final/summary-data.json +0 -43
  55. package/resources/harness/java/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-02-14-ledger-snapshot-followup/reports/final/summary-data.json +0 -38
  56. package/resources/harness/java/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-03-05-webhook-contract/reports/final/summary-data.json +0 -36
  57. package/resources/harness/java/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/project.yaml +0 -1
  58. package/resources/harness/java/harness-knowledge-ingest/tests/test_harness_knowledge.py +0 -1792
  59. package/resources/manifest.json +0 -19
  60. package/resources/skills/harness-apidoc/SKILL.md +0 -50
  61. package/resources/skills/harness-archive/SKILL.md +0 -48
  62. package/resources/skills/harness-codebase-map/SKILL.md +0 -53
  63. package/resources/skills/harness-knowledge-ingest/SKILL.md +0 -48
  64. package/resources/skills/harness-package/SKILL.md +0 -48
  65. package/resources/skills/harness-plan/SKILL.md +0 -51
  66. package/resources/skills/harness-review/SKILL.md +0 -50
  67. package/resources/skills/harness-run/SKILL.md +0 -48
  68. package/resources/skills/harness-skill-optimizer/SKILL.md +0 -54
  69. package/resources/skills/harness-submit/SKILL.md +0 -47
  70. package/resources/skills/harness-sync/SKILL.md +0 -48
  71. package/resources/skills/harness-test/SKILL.md +0 -50
@@ -1,112 +1,112 @@
1
- ---
2
- name: harness-codebase-map
3
- description: "分析现有代码库并生成 .harness/codebase/map/ 下的结构化代码库地图。用于陌生项目理解、重大改造前梳理、harness-sync 提示 map 过期后的人工刷新。"
4
- argument-hint: "[--fast] [--focus tech|arch|quality|concerns|tech+arch] [--paths <p1,p2,...>] [--status|--diff|--refresh]"
5
- effort: high
6
- allowed-tools: [Read, Glob, Grep, Write, Edit, Agent, Bash(powershell.exe:*)]
7
- disallowed-tools:
8
- - Bash(git *)
9
- - Bash(mvn *)
10
- - Bash(ls *)
11
- - Bash(find *)
12
- - Bash(grep *)
13
- - Bash(cat *)
14
- - Bash(cp *)
15
- - Bash(mv *)
16
- - Bash(rm *)
17
- - Bash(mkdir *)
18
- - Bash(touch *)
19
- - Bash(sed *)
20
- - Bash(awk *)
21
- - Bash(curl *)
22
- ---
23
- <!-- generated by harness_deploy.py; core=8917528f7dfdc5ca; overlay=java; do not edit -->
24
- # harness-codebase-map — 代码库地图
25
-
26
- ## Purpose
27
-
28
- 生成 hunter-harness 自有代码库地图 → `.harness/codebase/map/`(7 类文档)+ `map-summary.md` + `map-manifest.json`。供 plan/run/review 快速理解项目结构。
29
-
30
- ## 核心边界
31
-
32
- - **只写** `.harness/codebase/map/`、`map-summary.md`、`map-manifest.json`、`.harness/reports/codebase-map-*.md`
33
- - **禁止** `.planning/`、Git 写操作、修改 `.codegraph/`、自动 commit/push
34
- - `harness-sync` 只**建议**刷新,不自动跑全量 map
35
-
36
- ## When to Use
37
-
38
- 首次接入、map 过期(sync 提示)、大型重构前、用户说「刷新 codebase map」。跳过:空项目(<5 源文件)、纯符号查询(用 CodeGraph)。
39
-
40
- ## Arguments
41
-
42
- | 参数 | 含义 |
43
- |------|------|
44
- | (无) | 全量 7 文档 |
45
- | `--fast` | STACK + STRUCTURE + CONCERNS |
46
- | `--focus *` | tech / arch / quality / concerns / tech+arch |
47
- | `--paths p1,p2` | 增量路径(非法路径 → WARN,全非法须确认) |
48
- | `--status` / `--diff` | 只检查,不刷新 |
49
- | `--refresh` | 显式全量刷新 |
50
-
51
- ## Workflow(薄编排)
52
-
53
- | Phase | 动作 |
54
- |-------|------|
55
- | 0 | 读 SKILL + `reference.md` / `checklist.md` / `templates/` + protocols |
56
- | 1 | 解析 `$ARGUMENTS` → 模式与扫描范围 |
57
- | 2 | 检查现有 map / manifest → `--status` 可在此结束 |
58
- | 3 | `New-Item` 确保输出目录(PowerShell,禁止 Bash mkdir) |
59
- | 4 | Glob/Grep/Read 扫描;git 只读查询经 PowerShell |
60
- | 5 | 写 7 文档(`templates/` + frontmatter)— 可并行 mapper agents |
61
- | 6 | 写 summary + manifest(schema → `templates/map-manifest.schema.json`) |
62
- | 7 | 更新 `.harness/context-index.json` codebase 入口(若存在) |
63
- | 8 | 控制台 + `.harness/reports/codebase-map-*.md` 报告 |
64
-
65
- 逐步细节、frontmatter 字段、git 允许列表 → `reference.md` / `checklist.md`
66
-
67
- ## Mapper Agent 策略
68
-
69
- 优先并行 mapper(tech/arch/quality/concerns);Agent 直写文档,主会话汇总。不可用 → 主会话顺序扫描 + 🟡WARN。
70
-
71
- ## P0 执行可信度规则
72
-
73
- - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
74
- - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
75
- - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
76
-
77
- ## 关键规则
78
-
79
- | # | 规则 |
80
- |---|------|
81
- | 1 | 唯一输出 `.harness/codebase/map/` |
82
- | 2 | `generated_reviewable`,不建议手工改 map 正文 |
83
- | 3 | 不 Git 写操作、不改业务代码 |
84
- | 4 | 不管理 CodeGraph |
85
- | 5 | 敏感信息脱敏 → `sensitive-info-protocol` |
86
- | 6 | 证据化输出 → `evidence-based-reporting-protocol` |
87
-
88
- ## Output Format
89
-
90
- 模式、范围、7/7 文档路径与行数、manifest/summary、context-index 状态、WARN/FAIL → `reference.md` 报告模板
91
-
92
- ## 渐进披露
93
-
94
- - **Read `checklist.md`** — 执行前后检查
95
- - **Read `reference.md`** — manifest、mapper、扫描模式
96
- - **Read `templates/*`** — 各文档模板
97
-
98
- ## 交互白名单
99
-
100
- **无** AskUserQuestion;参数/默认值 + `decision` 事件
101
-
102
- ## 执行日志
103
-
104
- `events.ndjson` 为唯一事实源(schema_version 2,`note` 承载人类可读摘要);`logs/execution-log.md` 由 `harness_events.py` 渲染,**禁止手工 Edit**。结构 → [[../protocols/report-pipeline-protocol.md|report-pipeline-protocol]]
105
-
106
- ```powershell
107
- python <skills-root>/scripts/harness_events.py append --change-dir ".harness/changes/<change-name>" --phase <phase> --type phase.start --note "<触发指令>"
108
- ```
109
-
110
- > **脚本接线**:`harness_events.py append`;`harness_archive.py finalize`;`harness_preflight.py check`;`harness_ledger.py can-reuse`;`harness_service.py ensure/stop`(须 `--files`/`serviceStart.inputFiles`)。JSON 输出按 D13 护栏解读。
111
-
112
- > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
1
+ ---
2
+ name: harness-codebase-map
3
+ description: "分析现有代码库并生成 .harness/codebase/map/ 下的结构化代码库地图。用于陌生项目理解、重大改造前梳理、harness-sync 提示 map 过期后的人工刷新。"
4
+ argument-hint: "[--fast] [--focus tech|arch|quality|concerns|tech+arch] [--paths <p1,p2,...>] [--status|--diff|--refresh]"
5
+ effort: high
6
+ allowed-tools: [Read, Glob, Grep, Write, Edit, Agent, Bash(powershell.exe:*)]
7
+ disallowed-tools:
8
+ - Bash(git *)
9
+ - Bash(mvn *)
10
+ - Bash(ls *)
11
+ - Bash(find *)
12
+ - Bash(grep *)
13
+ - Bash(cat *)
14
+ - Bash(cp *)
15
+ - Bash(mv *)
16
+ - Bash(rm *)
17
+ - Bash(mkdir *)
18
+ - Bash(touch *)
19
+ - Bash(sed *)
20
+ - Bash(awk *)
21
+ - Bash(curl *)
22
+ ---
23
+ <!-- generated by harness_deploy.py; core=47a5159f5c4b49b8; overlay=java; do not edit -->
24
+ # harness-codebase-map — 代码库地图
25
+
26
+ ## Purpose
27
+
28
+ 生成 hunter-harness 自有代码库地图 → `.harness/codebase/map/`(7 类文档)+ `map-summary.md` + `map-manifest.json`。供 plan/run/review 快速理解项目结构。
29
+
30
+ ## 核心边界
31
+
32
+ - **只写** `.harness/codebase/map/`、`map-summary.md`、`map-manifest.json`、`.harness/reports/codebase-map-*.md`
33
+ - **禁止** `.planning/`、Git 写操作、修改 `.codegraph/`、自动 commit/push
34
+ - `harness-sync` 只**建议**刷新,不自动跑全量 map
35
+
36
+ ## When to Use
37
+
38
+ 首次接入、map 过期(sync 提示)、大型重构前、用户说「刷新 codebase map」。跳过:空项目(<5 源文件)、纯符号查询(用 CodeGraph)。
39
+
40
+ ## Arguments
41
+
42
+ | 参数 | 含义 |
43
+ |------|------|
44
+ | (无) | 全量 7 文档 |
45
+ | `--fast` | STACK + STRUCTURE + CONCERNS |
46
+ | `--focus *` | tech / arch / quality / concerns / tech+arch |
47
+ | `--paths p1,p2` | 增量路径(非法路径 → WARN,全非法须确认) |
48
+ | `--status` / `--diff` | 只检查,不刷新 |
49
+ | `--refresh` | 显式全量刷新 |
50
+
51
+ ## Workflow(薄编排)
52
+
53
+ | Phase | 动作 |
54
+ |-------|------|
55
+ | 0 | 读 SKILL + `reference.md` / `checklist.md` / `templates/` + protocols |
56
+ | 1 | 解析 `$ARGUMENTS` → 模式与扫描范围 |
57
+ | 2 | 检查现有 map / manifest → `--status` 可在此结束 |
58
+ | 3 | `New-Item` 确保输出目录(PowerShell,禁止 Bash mkdir) |
59
+ | 4 | Glob/Grep/Read 扫描;git 只读查询经 PowerShell |
60
+ | 5 | 写 7 文档(`templates/` + frontmatter)— 可并行 mapper agents |
61
+ | 6 | 写 summary + manifest(schema → `templates/map-manifest.schema.json`) |
62
+ | 7 | 更新 `.harness/context-index.json` codebase 入口(若存在) |
63
+ | 8 | 控制台 + `.harness/reports/codebase-map-*.md` 报告 |
64
+
65
+ 逐步细节、frontmatter 字段、git 允许列表 → `reference.md` / `checklist.md`
66
+
67
+ ## Mapper Agent 策略
68
+
69
+ 优先并行 mapper(tech/arch/quality/concerns);Agent 直写文档,主会话汇总。不可用 → 主会话顺序扫描 + 🟡WARN。
70
+
71
+ ## P0 执行可信度规则
72
+
73
+ - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
74
+ - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
75
+ - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
76
+
77
+ ## 关键规则
78
+
79
+ | # | 规则 |
80
+ |---|------|
81
+ | 1 | 唯一输出 `.harness/codebase/map/` |
82
+ | 2 | `generated_reviewable`,不建议手工改 map 正文 |
83
+ | 3 | 不 Git 写操作、不改业务代码 |
84
+ | 4 | 不管理 CodeGraph |
85
+ | 5 | 敏感信息脱敏 → `sensitive-info-protocol` |
86
+ | 6 | 证据化输出 → `evidence-based-reporting-protocol` |
87
+
88
+ ## Output Format
89
+
90
+ 模式、范围、7/7 文档路径与行数、manifest/summary、context-index 状态、WARN/FAIL → `reference.md` 报告模板
91
+
92
+ ## 渐进披露
93
+
94
+ - **Read `checklist.md`** — 执行前后检查
95
+ - **Read `reference.md`** — manifest、mapper、扫描模式
96
+ - **Read `templates/*`** — 各文档模板
97
+
98
+ ## 交互白名单
99
+
100
+ **无** AskUserQuestion;参数/默认值 + `decision` 事件
101
+
102
+ ## 执行日志
103
+
104
+ `events.ndjson` 为唯一事实源(schema_version 2,`note` 承载人类可读摘要);`logs/execution-log.md` 由 `harness_events.py` 渲染,**禁止手工 Edit**。结构 → [[../protocols/report-pipeline-protocol.md|report-pipeline-protocol]]
105
+
106
+ ```powershell
107
+ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/changes/<change-name>" --phase <phase> --type phase.start --note "<触发指令>"
108
+ ```
109
+
110
+ > **脚本接线**:`harness_events.py append`;`harness_archive.py finalize`;`harness_preflight.py check`;`harness_ledger.py can-reuse`;`harness_service.py ensure/stop`(须 `--files`/`serviceStart.inputFiles`)。JSON 输出按 D13 护栏解读。
111
+
112
+ > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
@@ -16,9 +16,9 @@ status: active
16
16
 
17
17
  # Codebase Map Summary
18
18
 
19
- **Generated At:** <YYYY-MM-DD HH:mm>
20
- **Mode:** <full|fast|focus|paths|status|diff>
21
- **Profile:** <profile-or-unknown>
19
+ **Generated At:** <YYYY-MM-DD HH:mm>
20
+ **Mode:** <full|fast|focus|paths|status|diff>
21
+ **Profile:** <profile-or-unknown>
22
22
  **Commit:** <sha-or-unknown>
23
23
 
24
24
  ## Project Snapshot